I have only noticed this with webform nodes, and not every time I export one. Certain webform nodes when exported will have a vid field that is equal to the vid in the source export array.
This causes the node to be wholely in the database. But it causes the node_load function to return false which produces a 404 when you try to view or edit the node.
For instance the vid on my dev system is 11599. It gets export to my staging system and a new vid is created, we'll say 15221. Instead of the vid column in the node table being set to 15221 it is set to the vid of 11599 which does not exist on my staging system. Resulting in the node_load function returning false.
This query will repair the node which is my current workaround.
UPDATE node n
LEFT JOIN node_revisions r ON r.vid = n.vid
LEFT JOIN node_revisions cr ON cr.nid = n.nid
SET n.vid = cr.vid
WHERE r.vid IS NULL;
My current relevant stack is:
- Webform 6.x-3.18
- Universally Unique IDentifier 6.x-1.0-rc2
- Node export 6.x-3.4
- Revisioning 6.x-3.15
Comments
Comment #1
yonailo CreditAttribution: yonailo commentedHello,
I've experienced the same problem, in my case the vid changes due to this node_save()
Replacing "node_save" by "drupal_write_record('node', $node, 'nid');" fixes the problem for me.
Comment #2
yonailo CreditAttribution: yonailo commentedSorry I was wrong, in my case the culprit was the module "revisioning" which was resettings the vid column in the node table when nodeapi op = update
Comment #3
danielb CreditAttribution: danielb commented