To fix the problem in version 1.1.19.6305 you have to change the
following lines:

Filename: %root%/cake/libs/controller/controller.php line 664
$objRegistryModel =& ClassRegistry::getObject($modelKey);
to
$objRegistryModel =& ClassRegistry::getObject($model);

Filename: %root%/cake/libs/view/templates/scaffolds/view.thtml line 30
$objModel =& ClassRegistry::getObject($modelKey);
to
$objModel =& ClassRegistry::getObject($modelName);


This bug has been fixed in version 1.2.0.6311 beta.
%root% is your cake application root directory.


[EMAIL PROTECTED] wrote:
> CREATE TABLE IF NOT EXISTS `line_items` (
>   `id` int(11) NOT NULL auto_increment,
>   `title` varchar(32) NOT NULL,
>   PRIMARY KEY  (`id`)
> ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
>
> The model in models/line_item.php:
> <?php
> class LineItem extends AppModel {
>   var $name = 'LineItem';
> }
> ?>
>
>
> The controller in controllers/line_items_controller.php
> <?php
> class LineItemsController extends AppController {
>   var $name = 'LineItems';
>   var $scaffold;
> }
> ?>
>
> The errors from http://localhost/line_items/:
> Notice: Trying to get property of non-object in /home/scott/
> public_html/cakeblog/cake/libs/controller/controller.php on line 666
>
> Notice: Trying to get property of non-object in /home/scott/
> public_html/cakeblog/cake/libs/controller/controller.php on line 666
>
> Warning: Invalid argument supplied for foreach() in /home/scott/
> public_html/cakeblog/cake/libs/controller/controller.php on line 666
>
> Notice: Trying to get property of non-object in /home/scott/
> public_html/cakeblog/cake/libs/controller/controller.php on line 801
>
> Warning: Invalid argument supplied for foreach() in /home/scott/
> public_html/cakeblog/cake/libs/controller/controller.php on line 801
>
> The table displayed in the view doesn't have the 'id' or 'title'
> column. What's wrong?

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to