Im trying to install DevSeed's ManagingNews beta 9, upon installation, it works, but has one error message:

    * user warning: Table '_devmanagingnews.openlayers_layers' doesn't exist query: SELECT * FROM openlayers_layers WHERE name IN ('world_light_small') in C:\Inetpub\wwwroot\_devManagingnews\profiles\managingnews\modules\contrib\ctools\includes\export.inc on line 101.
    * user warning: Table '_devmanagingnews.openlayers_layers' doesn't exist query: SELECT * FROM openlayers_layers WHERE name IN ('mn_news_openlayers_2') in C:\Inetpub\wwwroot\_devManagingnews\profiles\managingnews\modules\contrib\ctools\includes\export.inc on line 101.
    * user warning: Table '_devmanagingnews.openlayers_styles' doesn't exist query: SELECT * FROM openlayers_styles in C:\Inetpub\wwwroot\_devManagingnews\profiles\managingnews\modules\contrib\ctools\includes\export.inc on line 101.

The openlayers_layers table indeed doesnt exists in the database. Is this a module problem? Or a problem with DevSeed's installation profile? I dont know, so I post here. Thanks for any help. Should uninstall-reinstall the module?

Comments

Anonymous’s picture

Oh I just saw the error stems from Ctools. Ill check that out. I think its the installation profile that doesnt work properly.

tmcw’s picture

Hey, are you upgrading or installing from scratch? Upgrading from a previous managing news or installing this within a Drupal site? Can you try installing this without a underscore in the prefix?

tmcw’s picture

Also, what version of MySQL are you using? I've tried a fresh installation with an identical table name and it worked, and created the specified tables. Are you sure that you ran through the full install process (got through the 'Managing News configuration' step)?

Anonymous’s picture

Hi, I'm using MySQL Community Server 5.1.45 on Windows,

This happened on a new install:

    * user warning: BLOB/TEXT column 'description' can't have a default value query: CREATE TABLE openlayers_layers ( `name` VARCHAR(255) NOT NULL DEFAULT '', `title` VARCHAR(255) NOT NULL DEFAULT '', `description` TEXT NOT NULL DEFAULT '', `data` TEXT DEFAULT NULL, PRIMARY KEY (name), INDEX name (name) ) /*!40100 DEFAULT CHARACTER SET UTF8 */ in C:\Inetpub\wwwroot\_devManagingnews\includes\database.inc on line 550.
    * user warning: BLOB/TEXT column 'description' can't have a default value query: CREATE TABLE openlayers_styles ( `name` VARCHAR(255) NOT NULL DEFAULT '', `title` VARCHAR(255) NOT NULL DEFAULT '', `description` TEXT NOT NULL DEFAULT '', `data` TEXT DEFAULT NULL, PRIMARY KEY (name), INDEX name (name) ) /*!40100 DEFAULT CHARACTER SET UTF8 */ in C:\Inetpub\wwwroot\_devManagingnews\includes\database.inc on line 550.

Just a small query thing, probably new then in 5.1.45?

So its this part that goes wrong `description` TEXT NOT NULL DEFAULT '' -- is that added by Drupal Schema API or sth? Dont see it in the openlayers.install file.

tmcw’s picture

So the errors you reported earlier were not from a new install? And does the new install work correctly?

Anonymous’s picture

No, the new install does not work correctly.

Its because on first install it fails to create the DB tables openlayers_layer and openlayers_styles. They are missing. The first error (my post #0) reports the missing tables after install, the error from #4 is the actual first install error.

This is the fix, change:

      'description' => array(
        'type' => 'text',
        'not null' => TRUE,
        'default' => '',
        'description' => 'Layer description.',
      ),

to

      'description' => array(
        'type' => 'text',
        'not null' => TRUE,
        'description' => 'Layer description.',
      ),

Can't use default for type: text.

(Change it 2x in openlayers.install - around lines 115 and 163)

tmcw’s picture

Your MySQL database is apparently running in strict mode, I'd recommend not running it in such, but these are warnings, not errors; the tables are most likely created.

Anonymous’s picture

Ok, I'll switch off strict mode. But the tables were not created!

tmcw’s picture

Is there anything more to that SQL error message that you posted then? This is very difficult to debug if there are error messages that aren't reported here.

tmcw’s picture

Did disabling strict mode do the trick?

Anonymous’s picture

Hi, I already posted the solution in #6. Did you miss it?

The issue is that text columns can't have a default value in MySQL.

So just remove the default => '' lines in openlayers.install - around lines 115 and 163.

tmcw’s picture

I'll commit a patch. This error is very minor, because it only affects Windows users with MySQL in strict mode.

tmcw’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.