Updating core views to render better notices

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@3934 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
phpnut 2006-11-23 09:50:20 +00:00
parent 9703a90937
commit 2d83d125e4
14 changed files with 60 additions and 202 deletions

View file

@ -30,34 +30,14 @@
?>
<h1>Missing Method in <?php echo $controller;?></h1>
<p class="error">You are seeing this error because the action <em><?php echo $action;?></em> is not defined in controller <em><?php echo $controller;?></em></p>
<p><span class="notice">If you want to customize this error message, create <?php echo APP_DIR.DS."views/errors/missing_action.thtml"; ?>.</span></p>
<p><span class="notice"><strong>Fatal</strong>: Confirm you have created the <?php echo $controller;?>::<?php echo $action;?>() in file : <?php echo APP_DIR.DS."controllers".DS.Inflector::underscore($controller).".php"; ?></p>
<p class="error">You are seeing this error because the action <em><?php echo $action;?></em>
is not defined in controller <em><?php echo $controller;?></em>
</p>
<p>
<span class="notice"><strong>Notice:</strong> this error is being rendered by the <strong>app/views/errors/missing_action.thtml</strong>
view file, a user-customizable error page for handling invalid action dispatches.</span>
</p>
<p>
<strong>Fatal</strong>: Create Method:
</p>
<p>&lt;?php<br />
&nbsp;&nbsp;&nbsp;&nbsp;class <?php echo $controller;?> extends AppController<br />
&nbsp;&nbsp;&nbsp;&nbsp;{<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function <?php echo $action;?>()<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
class <?php echo $controller;?> extends AppController {<br />
&nbsp;&nbsp;&nbsp;<strong>function <?php echo $action;?>() {<br />
&nbsp;&nbsp;&nbsp;}</strong><br />
}<br />
?&gt;<br />
</p>
<p>
in file : <?php echo "app".DS."controllers".DS.Inflector::underscore($controller).".php"; ?>
</p>
<p>
<strong>Error</strong>: Unable to execute action <em><?php echo $action;?></em> in
<em><?php echo $controller;?></em>
</p>

View file

@ -31,27 +31,14 @@
<h1>Missing Component Class</h1>
<p class="error">You are seeing this error because the component class <em><?php echo $component."Component";?></em>
you have set in <?php echo $controller."Controller";?> can't be found or doesn't exist in <em><?php echo "app".DS."controllers".DS."components".DS.$file; ?></em>
</p>
you have set in <?php echo $controller."Controller";?> can't be found or doesn't exist.</em></p>
<p>
<span class="notice"><strong>Notice:</strong> this error is being rendered by the <code>app/views/errors/missing_component_class.thtml</code>
view file, a user-customizable error page for handling non-existent component classes.</span>
</p>
<p><span class="notice"><strong>Notice:</strong> If you want to customize this error message, create <?php echo APP_DIR.DS."views/errors/missing_component_class.thtml"; ?>.</span></p>
<p><span class="notice"><strong>Fatal</strong>: Create the class below in file : <?php echo APP_DIR.DS."controllers".DS."components".DS.$file; ?></p>
<p>
<strong>Fatal</strong>: Create the Class:
</p>
<p>
<p>&lt;?php<br />
&nbsp;&nbsp;&nbsp;&nbsp;class <?php echo $component;?>Component extends Object<br />
&nbsp;&nbsp;&nbsp;&nbsp;{<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// Your component functions here<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function <em>myComponentFunction</em> ()<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
class <?php echo $component;?>Component extends Object {<br />
}<br />
?&gt;<br />
</p>
in file : <?php echo "app".DS."controllers".DS."components".DS.$file; ?>
</p>

View file

@ -30,28 +30,13 @@
?>
<h1>Missing Component File</h1>
<p class="error">You are seeing this error because the component file <em><?php echo "app".DS."controllers".DS."components".DS.$file; ?></em>
can't be found or doesn't exist.
</p>
<p class="error">You are seeing this error because the component file can't be found or doesn't exist.</p>
<p><span class="notice"><strong>Notice:</strong> If you want to customize this error message, create <?php echo APP_DIR.DS."views/errors/missing_component_file.thtml"; ?>.</span></p>
<p><span class="notice"><strong>Fatal</strong>: Create the class below in file : <?php echo APP_DIR.DS."controllers".DS."components".DS.$file; ?></p>
<p>
<span class="notice"><strong>Notice:</strong> this error is being rendered by the <code>app/views/errors/missing_component_file.thtml</code>
view file, a user-customizable error page for handling non-existent component class files.</span>
</p>
<p>
<strong>Fatal</strong>: Create the Class:
</p>
<p>
<p>&lt;?php<br />
&nbsp;&nbsp;&nbsp;&nbsp;class <?php echo $component;?>Component extends Object<br />
&nbsp;&nbsp;&nbsp;&nbsp;{<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// Your component functions here<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function <em>myComponentFunction</em> ()<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
?&gt;<br />
</p>
in file : <?php echo "app".DS."controllers".DS."components".DS.$file; ?>
</p>
class <?php echo $component;?>Component extends Object {<br />
}<br />
?&gt;<br /> </p>

View file

@ -29,11 +29,6 @@
*/
?>
<h1>Requires a Database Connection</h1>
<p class="error">Missing Database Connection: <?php echo $model;?> requires a database connection
</p>
<p>
<span class="notice"><strong>Notice:</strong> this error is being rendered by the <code>app/views/errors/missing_database.thtml</code>
view file, a user-customizable error page for handling errors within CakePHP.</span>
</p>
<p class="error">Missing Database Connection: <?php echo $model;?> requires a database connection</p>
<p><span class="notice"><strong>Notice:</strong> If you want to customize this error message, create <?php echo APP_DIR.DS."views/errors/missing_database.thtml"; ?>.</span></p>
<p><span class="notice"><strong>Fatal</strong>: Confirm you have created the file : <?php echo APP_DIR.DS."config".DS."database.php"; ?></p>

View file

@ -29,29 +29,13 @@
*/
?>
<h1>Missing controller</h1>
<p class="error">You are seeing this error because controller <em><?php echo $controller;?></em>
could not be found.
</p>
<p class="error">You are seeing this error because controller <em><?php echo $controller;?></em> could not be found.</p>
<p><span class="notice"><strong>Notice:</strong> If you want to customize this error message, create <?php echo APP_DIR.DS."views/errors/missing_controller.thtml"; ?>.</span></p>
<p><span class="notice"><strong>Fatal</strong>: Create the class below in file : <?php echo APP_DIR.DS."controllers".DS.Inflector::underscore($controller).".php"; ?></p>
<p>
<span class="notice"><strong>Notice:</strong> this error is being rendered by the <code>app/views/errors/missing_controller.thtml</code>
view file, a user-customizable error page for handling invalid controller dispatches.</span>
</p>
<p>
<strong>Fatal</strong>: Unable to load controller <em><?php echo $controller;?></em>
</p>
<p>
<strong>Fatal</strong>: Create Class:
</p>
<br />
<p>&lt;?php<br />
class <?php echo $controller;?> extends AppController<br />
{<br />
&nbsp;&nbsp;&nbsp;&nbsp;var $name = '<?php echo $controllerName;?>';<br />
class <?php echo $controller;?> extends AppController {<br />
&nbsp;&nbsp;&nbsp;var $name = '<?php echo $controllerName;?>';<br />
}<br />
?&gt;<br />
</p>
<p>
in file : <?php echo "app".DS."controllers".DS.Inflector::underscore($controller).".php"; ?>
</p>

View file

@ -30,28 +30,12 @@
?>
<h1>Missing Helper Class</h1>
<p class="error">You are seeing this error because the view helper class <em><?php echo $helperClass;?></em>
can't be found or doesn't exist in <em><?php echo "app".DS."views".DS."helpers".DS.$file; ?></em>
</p>
<p class="error">You are seeing this error because the view helper class <?php echo $helperClass;?> can't be found or doesn't exist.</p>
<p><span class="notice"><strong>Notice:</strong> If you want to customize this error message, create <?php echo APP_DIR.DS."views/errors/missing_helper_class.thtml"; ?>.</span></p>
<p><span class="notice"><strong>Fatal</strong>: Create the class below in file : <?php echo APP_DIR.DS."views".DS."helpers".DS.$file; ?></p>
<p>
<span class="notice"><strong>Notice:</strong> this error is being rendered by the <code>app/views/errors/missing_helper_class.thtml</code>
view file, a user-customizable error page for handling non-existent view helper classes.</span>
</p>
<p>
<strong>Fatal</strong>: Create the Class:
</p>
<p>
<p>&lt;?php<br />
&nbsp;&nbsp;&nbsp;&nbsp;class <?php echo $helperClass;?> extends Helper<br />
&nbsp;&nbsp;&nbsp;&nbsp;{<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// Your helper functions heree<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function <em>myHelperFunction</em> ()<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
class <?php echo $helperClass;?> extends Helper {<br />
}<br />
?&gt;<br />
</p>
in file : <?php echo "app".DS."views".DS."helpers".DS.$file; ?>
</p>

View file

@ -30,29 +30,12 @@
?>
<h1>Missing Helper File</h1>
<p class="error">You are seeing this error because the view helper file <em><?php echo "app".DS."views".DS."helpers".DS.$file; ?></em>
can't be found or doesn't exist
</p>
<p class="error">You are seeing this error because the view helper file <?php echo APP_DIR.DS."views".DS."helpers".DS.$file; ?> can't be found or doesn't exist.</p>
<p><span class="notice"><strong>Notice:</strong> If you want to customize this error message, create <?php echo APP_DIR.DS."views/errors/missing_helper_file.thtml"; ?>.</span></p>
<p><span class="notice"><strong>Fatal</strong>: Create the class below in file : <?php echo APP_DIR.DS."views".DS."helpers".DS.$file; ?></p>
<p>
<span class="notice"><strong>Notice:</strong> this error is being rendered by the <code>app/views/errors/missing_helper_file.thtml</code>
view file, a user-customizable error page for handling non-existent view helper files.</span>
</p>
<p>
<strong>Fatal</strong>: Create the Class:
</p>
<p>
<p>&lt;?php<br />
&nbsp;&nbsp;&nbsp;&nbsp;class <?php echo $helperClass;?> extends Helper<br />
&nbsp;&nbsp;&nbsp;&nbsp;{<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// Your helper functions heree<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function <em>myHelperFunction</em> ()<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
class <?php echo $helperClass;?> extends Helper {<br />
}<br />
?&gt;<br />
</p>
in file : <?php echo "app".DS."views".DS."helpers".DS.$file; ?>
</p>

View file

@ -30,11 +30,6 @@
?>
<h1>Missing Layout</h1>
<p class="error">You are seeing this error because the layout file <em><?php echo $file;?></em>
can't be found or doesn't exist.
</p>
<p>
<span class="notice"><strong>Notice:</strong> this error is being rendered by the <code>app/views/errors/missing_layout.thtml</code>
view file, a user-customizable error page for handling missing/invalid views during rendering.</span>
</p>
<p class="error">You are seeing this error because the layout file <?php echo $file;?> can't be found or doesn't exist.</p>
<p><span class="notice"><strong>Notice:</strong> If you want to customize this error message, create <?php echo APP_DIR.DS."views/errors/missing_layout.thtml"; ?>.</span></p>
<p><span class="notice"><strong>Fatal</strong>: Confirm you have created the file : <?php echo $file;?></p>

View file

@ -30,27 +30,13 @@
?>
<h1>Missing Model</h1>
<p class="error">No class found for the model <?php echo $model;?> </p>
<p class="error">No class found for the <em><?php echo $model;?></em> model</p>
<p><span class="notice"><strong>Notice:</strong> If you want to customize this error message, create <?php echo APP_DIR.DS."views/errors/missing_model.thtml"; ?>.</span></p>
<p><span class="notice"><strong>Fatal</strong>: Create the class below in file : <?php echo "app".DS."models".DS.Inflector::underscore($model).".php"; ?></p>
<p> <span class="notice"><strong>Notice:</strong> this error is being rendered by the
<code>app/views/errors/missing_model.thtml</code> view file, a user-customizable error page.</span>
</p>
<p>
<strong>Fatal</strong>: Unable to load model <em><?php echo $model;?></em>
</p>
<p>
<strong>Fatal</strong>: Create Class:
</p>
<br />
<p>&lt;?php<br />
class <?php echo $model;?> extends AppModel<br />
{<br />
&nbsp;&nbsp;&nbsp;&nbsp;var $name = '<?php echo $model;?>';<br />
class <?php echo $model;?> extends AppModel {<br />
&nbsp;&nbsp;&nbsp;var $name = '<?php echo $model;?>';<br />
}<br />
?&gt;<br />
</p>
<p>
in file : <?php echo "app".DS."models".DS.Inflector::underscore($model).".php"; ?>
</p>

View file

@ -30,10 +30,6 @@
?>
<h1>Scaffold Requires a Database Connection</h1>
<p class="error">Missing Database Connection: Scaffold Does not work without a database connection
</p>
<p>
<span class="notice"><strong>Notice:</strong> this error is being rendered by the <code>app/views/errors/missing_database.thtml</code>
view file, a user-customizable error page for handling errors within CakePHP.</span>
</p>
<p class="error">Missing Database Connection: Scaffold Does not work without a database connection</p>
<p><span class="notice"><strong>Notice:</strong> If you want to customize this error message, create <?php echo APP_DIR.DS."views/errors/missing_scaffolddb.thtml"; ?>.</span></p>
<p><span class="notice"><strong>Fatal</strong>: Confirm you have created the file : <?php echo APP_DIR.DS."config".DS."database.php"; ?></p>

View file

@ -29,9 +29,5 @@
*/
?>
<h1>Missing Database Table</h1>
<p class="error">No Database table for model <?php echo $model;?> (expected "<?php echo $table;?>"), create it first.
</p>
<p>
<span class="notice"><strong>Notice:</strong> this error is being rendered by the <code>app/views/errors/missing_table.thtml</code>
view file, a user-customizable error page.</span>
</p>
<p class="error">No Database table for model <?php echo $model;?> (expected "<?php echo $table;?>"), create it first.</p>
<p><span class="notice"><strong>Notice:</strong> If you want to customize this error message, create <?php echo APP_DIR.DS."views/errors/missing_table.thtml"; ?>.</span></p>

View file

@ -30,17 +30,6 @@
?>
<h1>Missing view</h1>
<p class="error">You are seeing this error because the view <em><?php echo $file;?></em>
for action <em><?php echo $action;?></em>
in controller <em><?php echo $controller;?></em> could not be found.
</p>
<p>
<span class="notice"><strong>Notice:</strong> this error is being rendered by the <code>app/views/errors/missing_view.thtml</code>
view file, a user-customizable error page for handling missing/invalid views during rendering.</span>
</p>
<p>
<strong>Fatal</strong>: Unable to load view file <em><?php echo $file;?></em> for
action <em><?php echo $controller.'Controller';?>::<?php echo $action;?>()</em>
</p>
<p class="error">You are seeing this error because the view for <em><?php echo $controller.'Controller';?>::<?php echo $action;?>()</em> could not be found.</p>
<p><span class="notice">If you want to customize this error message, create <?php echo APP_DIR.DS."views/errors/missing_view.thtml"; ?>.</span></p>
<p><span class="notice"><strong>Fatal</strong>: Confirm you have created the file : <?php echo $file;?></p>

View file

@ -30,6 +30,5 @@
?>
<h1>Private Method in <?php echo $controller;?></h1>
<p class="error">You are seeing this error because the private class method <em><?php echo $action;?></em>
should not be accessed directly
</p>
<p class="error">You are seeing this error because the private class method <em><?php echo $action;?></em> should not be accessed directly</p>
<p><span class="notice"><strong>Notice:</strong> If you want to customize this error message, create <?php echo APP_DIR.DS."views/errors/private_action.thtml"; ?>.</span></p>

View file

@ -29,11 +29,10 @@
*/
?>
<h1>Scaffold Error</h1>
<p>Your must implement the following method in your controller</p>
<p class="error">Your must implement the following method in your controller</p>
<p><span class="notice"><strong>Notice:</strong> If you want to customize this error message, create <?php echo APP_DIR.DS."views/errors/scaffold_error.thtml"; ?>.</span></p>
<p>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function scaffoldError()<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;function scaffoldError() {<br />
&nbsp;&nbsp;&nbsp;}<br />
</p>