Posted by mdupont on September 2, 2009 at 8:38am
2 followers
| Project: | Link checker |
| Version: | 6.x-2.3 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (duplicate) |
Issue Summary
Hi,
I'm using Node Hierarchy and Link Checker on my multilingual website. If I turn on automatic updates of redirected (301) links, Link Checker will create a new revision (good), the link will be updated (good), but the Node Hierarchy information (i.e. Parent Node) will be lost.
It's problematic since it can make nodes "disappear" from the website if we rely on Node Hierarchy to display the structure.
Comments
#1
Do you know how Node Hierarchy works? Otherwise I need to review if Node Hierarchy does some strange - non API things... Please explain how to repro... I never used Node Hierarchy nor have an idea how to config... maybe easy... but I do not know it.
#2
Aside - do you know what "breaks" if we look on the raw data?
#3
Node Hierarchy allows to have a hierarchical node structure by specifying a parent node for any given node. So you can have "the node 'Drupal' has the node 'CMS' as a parent".
From what I know, Node Hierarchy creates a new database table with 2 columns : 1 for the nid of the source node, and 1 for the nid of the parent node. This information is revision independant ; it is attached to the node, not to the revision.
To reproduce, just have Node Hierarchy enabled, one or more nodes with parents and sporting a link to a 301 redirect, and Link Checker set up to update 301 redirected links automatically. When Link Checker updates the content to fix the link, it will create a new revision with "Anonymous" as a user. Strangely, all nodes that will be processed by Link Checker will no longer have a parent node. I had this problem with 15 or so nodes that were updated last night by Link Checker.
In the attached screenshots (from the editing interface) you can see how the parent node information is affected.
The issue could also come from Node Hierarchy's management of updates, i'll fill an issue there too.
#4
I believe that the node hierarchy is the source of this issue. linkchecker only loads the node, change the link and save it back. If node hierarchy does not keep their fields... what should I do there? It sounds like a bug in the nodeapi hook.
For now I would better disable the auto update on your site until it's investigated further.
Please do not duplicate issues... we can move an issue between projects. Marking as a duplicate of #566354: Node hierarchy lost if other modules load/update nodes.