Hey Casey,
How to reproduce:
- Create new menu item with any path
- Go to menu listing
- Reorder menu items and hit save
You will see that all menu items with any path are deleted. Most obviously it happens because validation runs upon form submission and looks like it fails.
Cheers!
| Comment | File | Size | Author |
|---|---|---|---|
| #22 | any_menu_path-reorder_with_bigmenu-1851824-23.patch | 1.13 KB | briantbailey |
| #12 | any_menu_path_1851824_sorting-2.patch | 1.78 KB | wizonesolutions |
| #7 | any_menu_path_1851824_sorting.patch | 0 bytes | wizonesolutions |
Comments
Comment #1
caseyc commentedVery interesting. I'm not sure I agree with your diagnosis. It looks like it's simply resetting the 'external' link to 0 in the menu_item table and because there's not a valid path it's not showing up. Just an interesting byproduct of what we're doing with the module.
I'll dig in and figure out what is doing this to see if we can re-set the menu_item entry to external = 1 with some hook somewhere.
Comment #2
caseyc commentedThis is resolved in the 7.x-1.1 release!
Comment #3
caseyc commentedComment #3.0
caseyc commentedTypo fixed
Comment #5
njbarrett commentedThis bug appears to be occurring in 7.x-1.dev now
Comment #6
tisteegz commentedI am currently using 7.x-1.5 and am experiencing this issue.
I created 20 menu links and the parent menu item had no path validation selected. When I created a second parent menu item and re arranged them I lost all my menu items.
This is quite a serious issue so I am changing the status.
Comment #7
wizonesolutionsThis was introduced in #2237615: External links are converted to internal links. @hanoii removed the functions that dealt with ensuring Any Menu Path items didn't lose their
externalstatus during reorders. I have restored the code, am attaching the patch, and am committing it.Comment #9
wizonesolutionsComment #10
wizonesolutionsAlso, @tisteegz, please open follow-up issues when the issue you're looking at has been re-introduced in a later version. You can add the old issue as a related lssue link.
Comment #11
wizonesolutionsGotta add an update hook to fix menu items that got broken.
Comment #12
wizonesolutionsThe actual path (also committed).
Comment #14
alext77 commentedhi,
I tried the dev version, but the links still disappear after submit.
I think it's because the new submit function is not called since it's commented :
Comment #15
thihathit commentedStill happening on both dev and release.
Comment #16
wizonesolutionsYikes, sorry about that. I was testing the fix but committed it that way. Going to do another release, so check soon.
Comment #18
wizonesolutionsComment #19
gregra commentedStill happening for me on version 1.6 (Drupal version 7.40). This works for newly created content.Comment #20
wizonesolutions@gregra Yeah, you probably already ran update.php. It will fix the existing content if you run this query and then run it again:
UPDATE system SET schema_version = 7100 WHERE name='any_menu_path' AND type='module'Comment #22
briantbailey commentedI recently ran into this bug on a site we are building and I was using the latest release of this module. I thought the bug still existed even though this tread seemed to say it was fixed. I did some additional testing and research and found out the problem was happening due to a conflict with another module I was using, Big Menu (bigmenu). I was able to patch the Any Menu Path module to work with the Big Menu module. All I had to do was add another implementation of hook_form_FORM_ID_alter to add the same submit handler that is in the any_menu_path_form_menu_overview_form_alter implementation. I added any_menu_path_form_bigmenu_overview_form_alter right below the existing hook with the same exact code. This fixed the problem. I have tested this update with both Big Menu enabled and disabled and Any Menu Path works as expected in both cases now. I thought I would provide this comment and patch in case anyone in the future runs into this problem or if the module maintainer thinks it should be committed to the main release.