Closed (fixed)
Project:
Content Construction Kit (CCK)
Version:
6.x-1.x-dev
Component:
content.module
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
16 Dec 2006 at 05:39 UTC
Updated:
9 Feb 2007 at 13:00 UTC
Not sure whether this might be expected behaviour, but if a content type is renamed, it will leave the DB tables with the old name. This essentially makes a renamed content type unusable.
Apologies if this is a) completely obvious or b) already been addressed...
Comments
Comment #1
karens commentedYou've marked this as 5.x and in 5.x content types are maintained by the node module. CCK has no control over them.
Comment #2
beginner commentedThis is not fixed.
Changing the type or machine name of any node type will create a sql error:
Comment #3
agentrickardIs the original bug report against CCK or Drupal core?
In Drupal core, node names are defined by modules and (it is assumed) will not be changed. If a module developer did change the machine-readable name, then an update function would need to address that in a point release. So, in that instance, the error is the developers fault, and this bug is 'by design.'
If you're talking about CCK-defined nodes, then this is a bug for the CCK module, which should update the node table when a node type name is changed.
Comment #4
beginner commentedMy apologies. I just tested with all cck module disabled, and I cannot reproduce.
But the bug reappears when enabling the content module (cck), so it's definitely a problem with that module.
Comment #5
karens commentedI can't reproduce this problem. I can rename a content type and all the appropriate tables get updated with no errors. Do you have other modules installed and does it behave this way if you disable everything but core and CCK? If so, what OS and php versions are you using?
Comment #6
agentrickardA better question for me is "What the heck is node_page.frm"? Where does that come from? The forms module?
Find that, and I bet you find the problem.
Comment #7
karens commented'node_page' is be a table created by CCK to hold field info for the 'page' content type. 'node_page.frm' would be one of the mysql files for that table. So something is wrong with that table, but there is no way to know what it is or why it happened without more info.
Knowing what that file is doesn't help me at all. Knowing what else is installed, what OS, php, CCK, and Drupal versions are being used and whether the problem exists if all other contrib modules are turned off would be much more helpful, which is why I asked those questions.
Comment #8
beginner commentedI tested with recently updated Drupal HEAD and content.module HEAD.
I started with a fresh install (new database).
After installing, I go to admin/content/types and I can update the type (machine-readable name) of both story and page (the two node types enabled by default).
I then enable content.module (i.e. only the base Drupal install + content.module), but if I repeat the same operation, I get the error mentioned above.
local setup:
linux mandriva,
php 4.4.0
mysql 4.0.26
Drupal HEAD (5.0-dev).
I have the same behavior on a remote server with the same configuration and module version but for mysql 4.1.11.
In the database, the node_page or node_story tables do not exist which is I believe is the reason of the problem.
When are they supposed to be created?
Comment #9
beginner commentedbtw, I checked the updates: updates 1000 and 1001 of content.module are already done, and I have "no updates available" pre-selected.
Comment #10
karens commentedThanks for the details. I'll try to follow these steps and see what is going on.
Comment #11
beginner commentedsee: http://drupal.org/node/112916
Comment #12
beginner commentedComment #13
karens commentedI think the fixes just commited for http://drupal.org/node/112916 have fixed this, too. Reopen if not.
Comment #14
(not verified) commented