Closed (fixed)
Project:
Content Construction Kit (CCK)
Version:
5.x-1.2
Component:
fieldgroup.module
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
22 Jan 2007 at 15:46 UTC
Updated:
21 Feb 2007 at 14:01 UTC
Selecting a group for a field in the 'manage fields' tab and then clicking the 'update' button does nothing.
Selecting the same group for more than one field and then clicking the 'update' button causes a warning like the following one to appear for each item but the first:
user warning: Duplicate entry 'ciclogita-group-logistica-' for key 1 query: INSERT INTO arl_node_group_fields (type_name, group_name, field_name) VALUES ('my content type name', 'my group name', '') in /var/www/drupal5/includes/database.mysql.inc on line 167.
Comments
Comment #1
karens commentedSomething is seriously wrong with your installation. You have a content type name with spaces in it, a group name with spaces in is and a non-existant field name. It should not be possible for any of those names to be created. Have you manually changed anything in any of your tables? How did you create that content type? Is it coming from some other module or did you create it yourself, or did you maybe try changing the name of a content type? Was this a fresh install or an update? Did you go to update.php and run all updates?
Comment #2
karens commentedAlso, install the content_copy module and export this content type and past the results here. That may help us debug this.
Comment #3
karens commentedAfter investigating http://drupal.org/node/112944, I wonder if that is related. That bug could have created a table name with spaces in it, but shouldn't have created a group name with a space, so I'm not clear yet if this is what the problem is.
Can you confirm that your error message actually said ...VALUES ('my content type name', 'my group name', '')... and that you didn't just substitute that text in for the real names when you posted your message.
Comment #4
tiziano commentedAs you supposed, I just substituted the names when I posted your message. This is the really user warning I get:
And this is my content type definition:
Comment #5
karens commentedI imported this into a test installation (after installing the matrix and computed field modules that are used here) and everything works fine. Try updating to the latest 5.x snapshot, run update.php, then see if your problems are fixed.
Comment #6
stella commentedI have the same / similar problem. When I try to change the group of a field in the "manage fields" tab from "No group." to anything else, I get the following error:
The only way I can change the group of a field is by clicking on the "configure" link and updating it on that page. However, once I do that, it no longer appears in the field list on the "manage fields" tab.
Cheers,
Stella
Comment #7
yched commentedThe problem in both reported issues is the '' (empty string) for the field_name value in the query. It triggers a 'duplicate key entry' for the primary key, which is an aggregate of type_name+group_name+field_name.
I really can't see why this field_name value should be empty. Hard to debug since the overview form is a complex thing that I don't fully grasp...
The issue is reported against 5.x--1.2, though. Can you upgrade to latest 5.x--1.3 and see if the problem is still there ?
Comment #8
fagoand please make sure that your drupal installation uses the fieldgroup module provided with CCK. Delete all other fieldgroup modules and only leave the one in the CCK folder. And each time you upgrade, don't forget to run the drupal update script!
Comment #9
stella commentedI'm now using the latest version from CVS (taken yesterday with tag DRUPAL-5) and it still happens I'm afraid.
Stella
Comment #10
stella commentedfago, I think you found the source of the problem. I had a modules/fieldgroup directory and a fieldgroup.module in my modules/cck directory. However, only one fieldgroup module was listed on my modules admin page. So I disabled the fieldgroup module and removed the modules/fieldgroup directory. The fieldgroup module still appeared in my listing, so I re-enabled it and retested and it all seems to work now. Thanks!
However, I now no longer have a "manage fields" tab (guess that was a feature of the other one). In addition, once I've added a field to a group I can't find any way re-editing the field. It no longer appears in the "manage fields" list. It does appear on the "display fields" tab, but I can't get into to it to edit the allowed values, etc.
Stella
Comment #11
yched commentednice catch, fago :-)
For the remaining issues, you it looks like your cache table needs refreshing (though it should have been cleaned when you submitted your modules page)
Could you try one of the following ?
- re-submit your modules listing form
- or use devel.module's 'empty cache'
- or manually empty the 'cache' table in your db
Comment #12
stella commentedNever mind, I found the source of the problem. I was stupid and forgot to run update.php after sorting out the conflicting fieldgroup modules. I've run that since and can now edit my created fields and groups. Sorry about that. *head* -> *wall*
Thanks for all your help
Stella
Comment #13
yched commentedGlad to hear that :-)
Comment #14
(not verified) commented