Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
STR:
- on a D6 site, create a node with multiple revisions
- unpublish the node
- upgrade to D7
Poof! The node body has disappeared from all but the current revision. It's not just hidden; the data is no longer in the database. Working on a fix + tests.
Comment | File | Size | Author |
---|---|---|---|
#9 | nr_2.patch | 3.13 KB | Jody Lynn |
#7 | nr.patch | 3.09 KB | moshe weitzman |
#1 | 926794-1-keep-node-revisions.patch | 2.54 KB | ksenzee |
Comments
Comment #1
ksenzeeActually, I think it's even published node revisions that get lost in the upgrade. In the query that collected revision data, we were joining on vid instead of nid, which meant we only got current revisions. Patch with tests attached.
Comment #2
ksenzeeComment #3
bjaspan CreditAttribution: bjaspan commentedYikes, I suspect this was my fault.
I don't have the time to think about it carefully at the moment, but I did at least notice that I think we're computing $total['sandbox'] wrong too:
That will count only the number of nodes, not the number of node revisions, so the progress bar will be displayed incorrectly.
Comment #4
chx CreditAttribution: chx commentedThat's one easy fix!
Comment #5
chx CreditAttribution: chx commentedWell, ksenzee fixed the bug and barry's is a different issue but i guess it belongs here,yes.
Comment #6
plachsub
Comment #7
moshe weitzman CreditAttribution: moshe weitzman commentedAdded fix for progress per barry's note.
Comment #8
Jody LynnI'm reviewing.
Comment #9
Jody LynnPatch looks good to me except I found a problem in the new Simpletest: in the upgrade simpletest database there are some revisions that legitimately do have empty bodies- the poll nodes. So I just adjusted the test to avoid the poll nodes. All other nodes have bodies.
Comment #10
moshe weitzman CreditAttribution: moshe weitzman commentedNice catch. Ready to fly.
Comment #11
webchickLift off!!
Committed to HEAD. NICE catch. That would've been highly unfortunate to have been found after beta. :)
Comment #12
webchickEdit: Sorry, janky wifi.
Comment #13
bjaspan CreditAttribution: bjaspan commentedIt seems to me the test should have been updated to check whether the original node had an empty body and then verify the new body based on whether it did, instead of hard-coding that in the current test data poll nodes have no body. I guess it will be fine until it causes some other test to fail, at which point it will be fixed.
Comment #14
webchickAw, crap.
This (or something like it) resurfaced on the drupal.org D7 upgrade with project nodes. :( One last beta blocker...
Sergeant ksenzee is on the case!
Comment #15
ksenzeeApparently the bug that surfaced on the d.o upgrade is #895014: All fields of a node type are lost on module disable, and captain chx has it under control.