Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment #1
Anonymous (not verified) CreditAttribution: Anonymous commentedOh I just saw the error stems from Ctools. Ill check that out. I think its the installation profile that doesnt work properly.
Comment #2
tmcw CreditAttribution: tmcw commentedHey, 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?
Comment #3
tmcw CreditAttribution: tmcw commentedAlso, 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)?
Comment #4
Anonymous (not verified) CreditAttribution: Anonymous commentedHi, I'm using MySQL Community Server 5.1.45 on Windows,
This happened on a new install:
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.Comment #5
tmcw CreditAttribution: tmcw commentedSo the errors you reported earlier were not from a new install? And does the new install work correctly?
Comment #6
Anonymous (not verified) CreditAttribution: Anonymous commentedNo, 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:
to
Can't use default for type: text.
(Change it 2x in openlayers.install - around lines 115 and 163)
Comment #7
tmcw CreditAttribution: tmcw commentedYour 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.
Comment #8
Anonymous (not verified) CreditAttribution: Anonymous commentedOk, I'll switch off strict mode. But the tables were not created!
Comment #9
tmcw CreditAttribution: tmcw commentedIs 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.
Comment #10
tmcw CreditAttribution: tmcw commentedDid disabling strict mode do the trick?
Comment #11
Anonymous (not verified) CreditAttribution: Anonymous commentedHi, 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.Comment #12
tmcw CreditAttribution: tmcw commentedI'll commit a patch. This error is very minor, because it only affects Windows users with MySQL in strict mode.
Comment #13
tmcw CreditAttribution: tmcw commentedFixed in http://drupal.org/cvs?commit=354134