ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Updating 1.5.2 -> 1.6: MySQL Error: Description: Field 'site_description' doesn't have a default value

June 22, 2007 2:19pm

Subscribe [4]
  • #1 / Jun 22, 2007 2:19pm

    darylh

    26 posts

    Apache 2.2 on Win XP PHP 5.2.2 mysql 5.0.41

    I navigate to update.php, click on the link and I get:

    Error: The following error was encountered
    MySQL ERROR:

    Error Number: 1364

    Description: Field ‘site_description’ doesn’t have a default value

    Query: INSERT INTO `exp_sites` (`site_id`, `site_label`, `site_name`) VALUES (‘1’, ‘The \‘Hood’, ‘the_hood’)

  • #2 / Jun 22, 2007 2:25pm

    darylh

    26 posts

    in ud_16.php, the function do_update() first creates the table and then tries to insert a row that doesn’t meet the constraints.

    $Q[] = "CREATE TABLE `exp_sites` (
                  `site_id` int(5) unsigned NOT NULL auto_increment,
                  `site_label` varchar(100) NOT NULL default '',
                  `site_name` varchar(50) NOT NULL default '',
                  `site_description` text NOT NULL,
                  `site_system_preferences` TEXT NOT NULL ,
                  `site_mailinglist_preferences` TEXT NOT NULL ,
                  `site_member_preferences` TEXT NOT NULL ,
                  `site_template_preferences` TEXT NOT NULL ,
                  `site_weblog_preferences` TEXT NOT NULL ,
                  PRIMARY KEY  (`site_id`),
                  KEY `site_name` (`site_name`))";
                
            $Q[] = $DB->insert_string('exp_sites', 
                                      array('site_id'                    => 1, 
                                              'site_label'                => $conf['site_name'],
                                              'site_name'                    => $this->create_short_name($conf['site_name'])));
  • #3 / Jun 22, 2007 2:28pm

    darylh

    26 posts

    gah, this is a strict mode issue.

  • #4 / Jun 22, 2007 3:10pm

    Sue Crocker

    26054 posts

    Are you able to get around it manually by updating in PHPMyAdmin or something similar?

  • #5 / Jun 22, 2007 3:13pm

    darylh

    26 posts

    Yeah, I just reconfigured the mysql instance and disabled strict mode.

  • #6 / Jun 22, 2007 3:15pm

    Sue Crocker

    26054 posts

    Cool. I did find a knowledge base article about how to do that.

    Enjoy 1.6!

  • #7 / Jun 22, 2007 8:37pm

    Derek Jones

    7561 posts

    We added a check for Strict mode to the installer, but had not for the update utility.  I’ve gone ahead and added it for the next build so anyone encountering this in the future will get a descriptive error message when trying to update.  Of course, long term, for 2.0, we plan to support Strict mode, but for now, this should help alleviate problems or confusion.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases