Cake's version: 1.1.20.7692

Hello. What you will read is something very weird that started to
happen today in the app I am currently building. It's not my 1st cake
app and I think I am not so newbie anymore. The story is:

I have a model, product.php, that of course belongs to a products
table. The table structure is:

CREATE TABLE `products` (
  `id` int(11) unsigned NOT NULL auto_increment,
  `nombre` tinytext,
  `created` datetime NOT NULL default '0000-00-00 00:00:00',
  `modified` datetime NOT NULL default '0000-00-00 00:00:00',
  PRIMARY KEY  (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

The product.php model code is:

<?php
class Product extends AppModel {

        var $name = 'Product';

}
?>

I have an "add" function in the products controller that saves some
products. Everything worked neat, I added some products with the form,
etc ... until I added the $validate to the model. Just adding this:

<?php
class Product extends AppModel {

        var $name = 'Product';
        var $validate = array(
                'nombre' => VALID_NOT_EMPTY
        );

}
?>

... and submitting the add form It literally KILLS my entire app (it
starts showing no access pages or missing layout errors). It only
solves after deleting the $validate lines and also deleting the
browser's cache.

I have many other models (like user, etc) with validation rules that
work just fine. So, I don't know what can it be the problem. The
table? Some cache issue?

Thanks in advance.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" 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