Needs work
Project:
Menu Node API
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
23 Oct 2013 at 15:28 UTC
Updated:
2 Apr 2015 at 18:24 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
l0keThis patch makes Menu Node API work with NodeSymlinks.
Comment #2
gabriel.achille commentedchange status for automated test.
Comment #3
gabriel.achille commentedI'm not a fan of having module-specific logic in here. And why did you need to modify an old hook update function for drupal 6 in this patch (menu_node_update_6003) ?
Comment #4
l0keThe changes if menu_node_update_6003 wasn't the point but it can be used for Drupal 6 NodeSymlinks support.
Yes, it has some NodeSymlinks specific router_path, but is also faced the problem that
str_replace('node/', '', $link['link_path'])doesn't work correctly if link path contains trailing slash, and usingpreg_replace('/(node\/)([\d]*)(.*)/', '$2', $link['link_path'])solves this problem.Comment #5
l0keComment #6
dgtlmoon commentedThis looks to be a duplicate of #1691508: Install fails with exception
Comment #7
bohemier commentedThanks for the patch. Works fine here. With this patch, when creating a node Symlink, the Menu Node API table gets also updated, so the symlinks can be retrieved with Menu Node Views to get the proper menu structure. Please consider merging...
Comment #8
cameron prince commentedThis issue is related to #1691508 in that it seems to include the same fix, but it does more.
The problem is that nodesymlinks don't get their own row in the menu_node table this module provides. The views filters provided by Menu Node Views rely on this table and will never display menu items that don't have a row there.
I applied this patch and it does solve the problem for newly created nodesymlinks. Unfortunately, it's not working retroactively, i.e. existing nodesymlinks aren't added to menu_node.
Comment #9
bohemier commentedYes, I had to recreate the missing db entries... Perhaps this can be done with the schema version?
Comment #10
cameron prince commentedHere's a quick command-line script to create the rows for existing nodesymlinks.