When I go to a prospective parent node and click "Attach existing [content type]", I get a "page not found" error when trying to access [mysite]/relativity/listnodes/[contenttype]/parent/[nid]. I can create new child nodes and remove existing child nodes from the hierarchy with no problem, but I am utterly unable to add existing nodes to the hierarchy. Furthermore, in an old version of my site running Relativity 6.x-1.3, I can add existing nodes without any problem. I have all the Node Relativity permissions enabled (and am logged in as user 1 besides), and I tried disabling Pathauto after read about a similar issue, but the problem persists.
Comment | File | Size | Author |
---|---|---|---|
#4 | 990642_relativity_page_not_found.patch | 982 bytes | blackdog |
Comments
Comment #1
walktalker CreditAttribution: walktalker commentedfacing the same problem, even cleared cache, run cron, rebuild permission...
Comment #2
lucas.matias CreditAttribution: lucas.matias commentedFacing the same problem too.
any solution?
Comment #3
blackdog CreditAttribution: blackdog commentedSomething is indeed wrong.
Comment #4
blackdog CreditAttribution: blackdog commentedHere's a quick fix to the issue, that at least gets the page loaded. Not really sure what that load function actually do, so if someone can shed some light here that would be nice.
Comment #5
toddchris CreditAttribution: toddchris commentedI'm having the same problem, and it would really be a nice feature. Has anyone tried the patch above?
TC
Comment #6
blackdog CreditAttribution: blackdog commentedI have the patch running without issues, but we need a maintainer or someone with better knowledge of the module to review the changes.
Comment #7
draxiom CreditAttribution: draxiom commentedThe patch did not work for me. I was able to workaround this problem by just adding new relationships directly into the relativity mysql table. It is fairly straight forward... nid and parent_nid. I inserted the appropriate nids and the relationship showed up on the site. The "Attach existing Page" link is still dead, but at least the page hierarchy is in there.
Comment #8
dineshcooper CreditAttribution: dineshcooper commentedSame problem here - patch did not work for me.
Comment #9
jonhattanSorry I'm unable to reproduce this bug report. The diff between 1.3 and 1.4 in this area is:
Drupal should catch this change upon a menu rebuild. You can trigger a menu rebuild by submitting the admin/build/modules form.
Can anyone reproduce this bug with a fresh install of drupal+relativity?
Comment #10
yosepkur CreditAttribution: yosepkur commentedI tried changing the following lines and it loads the page successfully.
I've also updated the following function:
Hope it helps.
Comment #11
jennifer.chang CreditAttribution: jennifer.chang commentedyosepkur , comment #10 is right.
Keep %node in 'relativity/addparent/%node/parent/%node'
but rework function relativity_addparent($child_nid = "", $parent_nid = "") {...} to accept two nodes instead:
relativity_addparent($child_node, $parent_node) {...}
No need to rely on arg().
Comment #12
jennifer.chang CreditAttribution: jennifer.chang commentedyosepkur is right for 'relativity/listnodes/%relativity_node_list/parent/%node'.
There is a conflict with the node loader called with %node and the 'load arguments' => array(4).
The relativity_node_list_load() already checks that the nid is valid.
The code is a bit ugly though. It is trying to be too clever with the menu API but it's not using the wildcards exactly the way it was intended.
The badly named relativity_node_list_load() should not check whether the node->nid exist. It's done for us by node_load() thanks to the wildcard %node.
Instead relativity_node_list_load() should simply check that the node type is within relativity_node_list() and return either FALSE if not, or the machine node type.
Then both the node type and the fully loaded node can be passed to relativity_list_possible_children().
Comment #13
jennifer.chang CreditAttribution: jennifer.chang commentedpassing '2' to node_get_types within hook_menu does not work either:
'title arguments' => array('!type' => node_get_types('name', 2))
The patch in #4 is pointing at this problem but it's merely offering a hack, breaking the original intend.
I don't think that we can use 'title arguments' the way it's used here. Remove it completly and use drupal_set_title() manually in the callback function.