I'm hoping someone else has run into this and has a resolution. In my 5 years of working with Drupal, I've not run into this before and the things that I have tried have not worked.
I'm using D6.20 and all the latest versions of my installed modules with PHP 5.2.15 and MySQL 5.1.53.
Out of the blue, on a live and previously working site, while trying to add a node through a custom cck type, I am getting Invalid argument supplied for foreach() in .../sites/all/modules/cck/content.module on line 1061, and Illegal offset type in .../sites/all/modules/content_access/content_access.module on line 82. These two messages always appear together.
At first, when trying to create the node as admin user, (Let's say the content type is called Article - it has one computed field and three plain text fields) instead of the the normal "Article has been created" message it just showed "has been created" - the message didn't include the content type. So, I looked at my content and it listed a blank node title, with Anonymous as the author (even though user 1 created the node). I could view it, but it was blank. I could edit it, but the data entered into the CCK fields was not there. I even checked the database and the field values for the node showed NULL. The only field that had a value was the computed field and it only showed up after I tried to edit and resave the node.
I rebuilt permissions, cleared caches, ran update, all without success. I figured that somehow my tables had been corrupted so I deleted the content type and re-created it using a new content type name and new field names. Now, I get a "The post could not be saved." message. BUT, even though it says it couldn't be saved, the node IS created and appears in the content list. Again, the cck fields are blank and the values in the database are NULL. It's like the nodes with this specific content type are not being saved properly, and even after editing and resaving the node, the values are not being written to the database. The computed field value is the only one that appears to be working.
The other weird thing is that I can create nodes of a different content-type without any problems at all, so I am completely perplexed as to why this specific content type is not working. Any ideas on what may be causing this behavior based on the error messages above, or any tips on what to try next would be greatly appreciated!!
Comments
Try reading through
Try reading through this.
http://drupal.org/node/255687
Not sure if this could be the same type of issue for you.
Cheers,
Michael
Thanks
Thanks for responding Michael,
I did find one node in my node table that had been created from my deleted content type, but deleting it didn't work in my case.
I should probably also mention that when the node is "created" albeit faulty, the node does retain the Title, just not the cck values. I also tried uninstalling cck and re-installing cck with a fresh copy just to eliminate problems with the copy I was using, but that didn't work either.
One other thing to try
If you didn't clear your cache after you deleted that node, you should try that as well.
It definitely sounds db related. If you've made a backup in the last couple days I would try to import it (making a backup of your current faulty db of course!).
Cheers,
Michael
Thanks, I did that too, no
Thanks,
I did that too, no go. I do have a backup but because I use uc_views module, I am also plagued with this problem: http://drupal.org/node/448038.
So the database I need, I can't use, because it won't import without throwing errors. When I follow their suggestion to disable and uninstall uc_views, perform backup and then import, the import works, but then I have the faulty cck stuff again.
That sucks x 2. Not sure what
That sucks x 2.
Not sure what else to say. I hope you can figure it out.