4.7 -> 5 upgrade, cck content duplicated in "body"
smaki - March 17, 2008 - 18:29
| Project: | Content Construction Kit (CCK) |
| Version: | 5.x-1.6-1 |
| Component: | upgrade path |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
So I just upgraded two drupal 4 websites with flexinode to cck, and then upgraded to drupal 5. In both cases, the cck fields show up AND the old flexinode data shows up in the "body" field (even if I have the "body" field blank, meaning there should be no body). So all the nodes have same info twice.
I suspect that it is because the flexinode data is still there (because if I just upgrade drupal without doing the flexinode to cck convert, the flexinode stuff shows up in the body field). I disabled flexinode before I switched to drupal 5. I don't know what else to do or if I am even right about what the problem is.

#1
#2
Okay, so I ended up fixing this by deleting the content of the "body" field and "teaser" field for the content types that had this problem. I will post my MySQL query in case anybody else has the same problem (I did have it on two different Drupal websites, after all).
I would still be curious to hear other people's solutions too. It is possible that I could have prevented this whole thing if I deleted the flexinode tables from the DB after upgrading to CCK, before upgrading to Drupal 5.7. I am not super knowledgeable about the workings of the database so I don't know (this was an adventure for me). So if anyone else knows how to fix this problem without messing with the database that would be great!
Anyway, here are my MySQL queries. Make sure to backup database before trying:
This is the one I used to "preview" the rows I would be affecting, which I did before actually deleting the body fields:
select * from node n, node_revisions nr
WHERE nr.vid=n.vid AND
(n.`type`='content_type1' or n.`type`='content_type2' or n.`type`='content_type3');
etc. until you've entered all of the affected content types (21 types in my case!), where content_type1 is the machine readable name of the content type.
To actually empty out the body field I did this (those are two single quotes, after body):
Update node n, node_revisions nr SET nr.`body` = ''
WHERE nr.vid=n.vid AND
(n.`type`='content_type1' or n.`type`='content_type2' or n.`type`='content_type3');
#3
Sallymaki
Thank you very much for this.
I had the same problem as you [only just managed to get from 4.7 to 5, doing flexinode > cck convert first]. 4 out of 6 of my content types had this kind of duplicated content. I had no clue how to cure it till I found your suggestion. It worked fine for me.
If its any consolation, I did delete all the flexinode tables from the DB after upgrading to CCK, before upgrading to Drupal 5. That didn't cure it.
Must be a bug in the flexinode convert process?
Thanks again
Nigel
#4
PS
Still having problems though...
The node view is fine, but the teaser view can still throw up a repeat. Emptying cache doesn't clear it.
Someone has described the teaser problem here http://drupal.org/node/108036 but suggested no solution (at least not one that I can understand)
Anyone have a suggestion?
#5
Solved with the Re-tease module
#6