Hi:
Late last week, I installed MN 6.x-1.0-beta6. All appeared to be well then, when switching to map mode, I began receiving ctools related errors to the effect that tables such as 'mfeeds.openlayers_layers' and 'mfeeds.openlayers_styles' do not exist (the prefix mfeeds. is, obviously, my install specific).
On investigation, the only openlayers table created during MN install is one named 'openlayers_map_presets'. Reinstalling does not resolve the issue. Reverting to 6.x.1.0-beta5 does not resolve the problem. Updating the OpenLayers module to the latest stable version causes the install to fail.
I have tried this on both WinXP and Win2K3 with the following: Apache 2.2.14, MySQL 5.1.4.1, and PHP 5.2.10.
This does not seem to have been experienced by anyone else. Maybe I'm just lucky!
A puzzle perhaps but, with luck, one you can shed some light on! :)
Thanks in advance,
David.
Comments
Comment #1
tmcw commentedHi,
It looks like the problem is that you're using a dot in the prefix to your database tables. That's probably the center of the problem, as I just tried to do the same and it didn't work. My guess is that your database is also called mfeeds, so the installer installed tables as mfeeds.openlayers_presets (thus creating the table openlayers_presets in mfeeds), instead of creating a table in mfeeds called mfeeds.openlayers_presets. Probably the logic for creating OpenLayers tables with ctools is different than that logic, and fails here.
The fix is basically to install with a prefix that doesn't contain a dot. I'm surprised that Drupal permits this at all, and I'll look around to see if this is a valid bug against Drupal's installer.
Comment #2
priorint commentedHi!
Thanks for getting back to me on this.
I did a complete removal of all MN elements and then ran an install of 6.x-1.0-beta5 against a database called mfeedsdatabase with no table prefixes. I get exactly the same problem.
Error messages received look like: "user warning: Table 'mfeedsdatabase.openlayers_layers' doesn't exist query: SELECT * FROM openlayers_layers in D:\Appliance_Root\Shared\Apache Group\Apache2\htdocs\mfeeds\profiles\managingnews\modules\contrib\ctools\includes\export.inc on line 139." Substitute various openlayers table names for other errors.
Again, mfeedsdatabase.openlayers_presets is the only table created.
It is very strange as all the hook code for table creation seems to be present, and openlayers_presets is not the first one in the list.
Again, any assistance greatly appreciated.
Thanks,
David.
Comment #3
gregglesI just installed it yesterday on a debian php5 mysql5 environment without issue. Maybe you can try out installing it in other environments and see if it works? Or try installing some other install profiles in this same Windows environment to see if those work?
Comment #4
priorint commentedHi!
I don't have any *nix systems to hand but I have managed to install and update the Atrium installation profile in the same environment without any issues at all.
Thanks,
David.
Comment #5
priorint commentedHi.
OK - this was bugging me (pun intended!) so I have been experimenting with 6.x-1.0-beta6 at home. The OS here is WinXPProSP3 rather than Win2K3 but the underlying components remain the same (Apache 2.2.14, MySQL 5.1.4.1, and PHP 5.2.10).
I put some traps into the install.php script which advised that all modules were installed per the arrays set up in the managingnews profile. Despite that, I got exactly the same error - namely that openlayers_layers and openlayers_styles tables were not being created.
Referring to the watchdog table (which would have been good to know about before (I'm not a Drupal person, does it show?)) I find two errors around the same issue. The first error reports:
a:4:{s:6:"%error";s:12:"user warning";s:8:"%message";s:375:"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 */";s:5:"%file";s:47:"D:\scratch\apache2\htdocs\includes\database.inc";s:5:"%line";i:529;}
The second is identical, but for the fact that it refers to the openlayers_styles table.
Apparently this is a result of MySQL being in strict mode (as recommended by the MySQL installer) as reported here: http://drupal.org/node/188364 According to that note, this is a problem when moving from Linux to Windows.
According to the MySQL 5 Developer Docs, BLOB/TEXT columns are not allowed to have default values of null but can have default values of '' (empty string).
I shutdown MySQL and Apache, deleted my MN database, modified the MySQL my.ini to comment out the line 'sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"', and restarted.
Rerunning the MN install shows the missing tables are created this time and the errors have disappeared.
Hope this helps, thanks for the help offered.
David.
Comment #6
gregglesVery interesting. Here's a slightly better title. Looking at the query, it's setting a default of '' for the column so I'm not sure what's going on.
Comment #7
ernest commentedI had the same error (beside others) after update. I have no prefix, the name in front of the *.name_table is the name of the folder where the application is installed and not a prefix of the tables.
Before the update all tables are created in the databank, the application was working, after the update there are missing tables, and a lot of errors.
I started to update first drupal 6.14 to 6.15 (was working), and then with the other modules.
The problem appears after the update purl, ctools, theme and mn_core.
mn_core:
Table ' xxx.data_taxonomy' doesn't exist query: INSERT INTO data_taxonomy(id, data_table_name, tid) SELECT id, 'feeds_data_syndication', tid FROM data_table_term in xxx/profiles/managingnews/modules/features/mn_core/mn_core.install on line 72.
mn_core.install - file:
// Migrate to new data_taxonomy module.
if (module_exists('data_node')) {
_drupal_install_module('data_taxonomy');
module_enable(array('data_taxonomy'));
}
This doesn't work.
Table missing: data_table_node, data_table_term
Other errors:
Illegal offset type in xxxx/profiles/managingnews/modules/contrib/purl/purl.module on line 708.
Object of class stdClass could not be converted to string in xxx/includes/path.inc on line 167.
Illegal offset type in xxx/includes/path.inc on line 172.
array_slice() expects parameter 1 to be array, null given in xx/includes/menu.inc on line 312.
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') ORDER BY fit DESC LIMIT 0, 1' at line 1 query: SELECT * FROM menu_router WHERE path IN () ORDER BY fit DESC LIMIT 0, 1 in xx/includes/menu.inc on line 315
call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'tao_blocks' was given in xxx/includes/theme.inc on line 617
The update with jake and tao also not work, maybe of the reason, that there are the others problems, I tried this at the last step.
Don't know, maybe I have updated the modules in the wrong order.
But I tried several ways, each time the same errors.
The required tables are not created during the update as required.
Comment #8
tmcw commentedThis has been fixed upstream in OpenLayers; text fields no longer have defaults.