I have a multisites install of Drupal 5.11 (actually 2 sites : mysite.com and mysite.tv)
The 2 sites share the same DB except some tables: menus, cache, blocks, variable... (a classic multisites install).
The 2 sites share the same nodes and users.
I use CCK to create new content types.
The issue :
On mysite.com CCK handles content types in content_type_... tables
But on mysite.tv CCK tries to insert nodes in node_...tables
which creates error messages and data loss for nodes that are created on one site and updated on the other.
Comments
Comment #1
yched commentedAre you sure you ran update.php on both sites ?
Comment #2
geraud commentedWhy should I need to run the update.php script ?
This is not an upgrade.
It is a brand new install of drupal 5.11 with cck.
Comment #3
yched commentedProblem is that, since your sites share the {system} table, you installed the modules only in one of the sites, but the variable_set() made in content_install() doesn't take for the other site, since they have different {variables} table. Same problem will happen for updates. I'm not too sure how we should deal with this issue.
The immediate fix for you would be to enable devel.module, activate the 'PHP' block, and run this code :
Comment #4
moshe weitzman commentedOr use the variable editor link in devel.module block to edit that variable to a value of 1003.
Comment #5
geraud commentedThanks a lot Yched.
I digged a bit in the content module code myself and arrived at the exact same conclusion as you.
It is because of the function :
function _content_tablename($name, $entity, $version = NULL)
and the switch statement:
switch ("$version-$entity") {
case '0-'. CONTENT_DB_STORAGE_PER_CONTENT_TYPE :
return "node_$name";
case '0-'. CONTENT_DB_STORAGE_PER_FIELD :
return "node_data_$name";
case '1003-'. CONTENT_DB_STORAGE_PER_CONTENT_TYPE :
return "content_type_$name";
case '1003-'. CONTENT_DB_STORAGE_PER_FIELD :
return "content_$name";
}
Comment #6
karens commentedThe D5 version is no longer being supported. Sorry.