Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I have upgraded from a German D5 with locale module to D6. I run update.php and everything proceed without errors. After this i logged in and found duplicated menu items in my "navigation" menu.
The duplicated menu items are:
logs
settings
users
What makes me wonder is - the German links are "translated" and the newly (?) created ones are English. Both have the same target URL.
I used $update_free_access = TRUE; for the upgrade.
Comment | File | Size | Author |
---|---|---|---|
#16 | duplicated_menu_links_bug1.png | 11.42 KB | hass |
#14 | menu_update.patch | 2.48 KB | chx |
#9 | menu_update.patch | 1.82 KB | chx |
#8 | menu_update.patch | 986 bytes | chx |
Comments
Comment #1
hass CreditAttribution: hass commentedRreproduceable: always
Comment #2
JirkaRybka CreditAttribution: JirkaRybka commentedI have duplicate "Administer". (Czech localized site, played with menu items weights previously.) Yes, I know the new one is capitalized, but still it's not very nice behavior.
Comment #3
hass CreditAttribution: hass commented"Administer" is not duplicated on my box. I think i have never used weight's in admin section...
Comment #4
chx CreditAttribution: chx commentedThe menu update checks for duplicates. It might be that in some locale the two entries happen to render the same but compare menu_links table, they will differ.
Comment #5
hass CreditAttribution: hass commentedSorry - but do you think this is my or our fault if Drupal system links are duplicated? I cannot edit/delete this duplicated links in menu configuration... so i think there is something internally broken. And i'm not the only person with this problems, we cannot really fix ourself. I think this is a heavy show stopper!
Comment #6
JirkaRybka CreditAttribution: JirkaRybka commentedI examined what I can do through the UI:
- Previously, on 5.x, I "just" wanted my menu to have a logical order, so changed some weights. "administer" moved to the bottom.
- After 5.x->6.x upgrade, there is another "Administer" item. Both pointing to the same path (which I can't edit anyway).
- Observing the administrative UI (menu items id as seen in the operations links), I realized that I have not only "Administer" duplicated - I've the *whole* tree under "Administer" duplicated! (i.e. the items that survived the upgrade - 19 items)
- The only thing I can do is "reset" the old item (which only just moves it to where the new one is), or customize any (pointless), or disable (probably the only way to get rid of double display, but still my administrative menu UI is spammed with duplicate entries).
I examined menu_links table (after the additional link reset and disable), and both the links are identical, excepting 'mlid', 'p1', 'hidden', 'updated' and 'customized' fields.
Comment #7
webernet CreditAttribution: webernet commentedThe menu update needs to be changed do the following:
Basically, if you've customized any system menu items in D5, you'll currently get duplicates in D6.
Comment #8
chx CreditAttribution: chx commentedComment #9
chx CreditAttribution: chx commentedSimplified code with comments. The patch is bigger because we removed stuff.
Comment #10
hass CreditAttribution: hass commentedThis patch does not solve the problems. It makes things more worse...
Now i have a "admin/logs", but there is nothing inside and i get a "page not found2 if i click on it. Not sure, but as i remember this url should only be renamed to "admin/reports" - isn't it? All other prior duplicated links except the "log" link do not exist now.
Additional to the above - ALL my menu links are now flat. The complete menu structure is lost... :-(
Comment #11
hass CreditAttribution: hass commentedif i klick on
admin/build/menu-customize/primary-links
oradmin/build/menu-customize/secondary-links
i get "There are no menu items yet.", but items are displayed... all my other custom links inadmin/build/menu-customize/navigation
are not visible in the administration area, too. The menu themself list all items (flat mode), but i cannot edit them at all.Much more worse, for sure.
Comment #12
pwolanin CreditAttribution: pwolanin commentedI just saw this with a 5.x->6.x update of a clean 5.x install with no translations or customizations - the "Create content" link was duplicated in an odd way.
Comment #13
owahab CreditAttribution: owahab commentedReproducible on a D5 system:
1. with no change in weights.
2. with English local.
And the duplicates are:
Administer, Administer -> logs, Administer -> settings, Administer -> users.
Comment #14
chx CreditAttribution: chx commentedDrupal 5 immediately copies everything to menu table once you visit menu page, I just checked this. This means it is not possible that a child is in the menu table but it's parent is not. This means there is no need for menu links to be filled in beforehand by
menu_rebuild
. And as router paths are set to empty string anyways, there is no need for the router table to be filled in. We had a rebuild call just before the menu update finishes anyways, we now make sure it happens even if menu module is disabled. So the code can be simplified (and sped up which does not really matter on update but why not).Comment #15
catchI just tried to test this, but was unable to reproduce the duplicated items in an unpatched install. So I'm bumping this for people who've experienced the issue to review it on their setups :)
Comment #16
hass CreditAttribution: hass commentedThis patch is better then the one before (Menu tree structure not destroyed and i'm able to edit the menu links), but many more links get duplicated then before... now - others than without any of the above patches.
A screenshot is attached... that's too much to write them all down.
Comment #17
hass CreditAttribution: hass commentedFound more bugs... it looks like that menu items of modules i have installed VERY long time ago and uninstalled - now reapear. But the modules are no more installed and not available as D6...
Comment #18
webernet CreditAttribution: webernet commentedTested #14 --
-Still getting a duplicate of 'Contact form' in navigation (was moved to primary links under 5.x)
Also -- Both patched and unpatched -- on update only --
-Getting invalid 'url aliases' and 'contact form' links (under 'administer') pointing to /admin/path and /admin/contact (the correct links are also created under 'site building' and point to /admin/build/path and /admin/build/contact)
-Links to forum, aggregator, search appear -- none of these modules were enabled under 5.x, and still aren't.
Comment #19
chx CreditAttribution: chx commentedtime to attach / mail me menu table dumps.
Comment #20
chx CreditAttribution: chx commentedAfter receiving webernet's table and switching off aggregator and forum I do not see anything that should not be there. Do you? There is no duplicate of any contact link:
The admin/contact link you see comes from Drupal 4.7, delete by hand, there is no way Drupal 6 can know this is a bogus link. If I'd delete all the links which are without a router path, then when you switch back your contributed modules (which you surely switch off as per update instructions) then all the links to contributed paths would be gone. You surely do not want that. This goes to hass, too.
Lacking anything that I could work on, I set back to CNR.
As a followup we can create a contrib module or a button somewhere which deletes internal links without a router_path. This can only occur on update, menu_link_save bails out normally if router_path is not found.
Comment #21
hass CreditAttribution: hass commentedI don't have "aggregator" or "forum" used in past, nor activated at any time. If there is no better patch - this needs work! I'm able to send you my menu table via private mail... later the day if this helps with analysis.
Let me say - the problems with the latest patch are only inside "admin". I think Drupal should know best what to do with this links.
Comment #22
JirkaRybka CreditAttribution: JirkaRybka commentedI'm not currently sitting at my LAMP testing computer, but I've attached my 5.x (pre-upgrade) menu table to another issue: http://drupal.org/files/issues/menu-table.sql_.txt
I didn't test the patch here yet, though; just providing another testing data, if useful. Unpatched 6.x-dev gives me duplicate link for 'admin' (old one staying, along with some of the descendants inside, plus new one added). Going to test with patch this evening.
Comment #23
chx CreditAttribution: chx commentedI am feeling this patch is RTBC and we have a misunderstanding of what the menu upgrade can and can not do. Let me say this again: bogus links can not be identified at core upgrade time because there is no way to discern between "contrib disabled months ago" and "contrib disabled for upgrade". If you have a link which belongs to a core module and is duplicated or is not place where it should then set it back to CNW. If all you have is "wow this link was not here in D5 because I disabled / upgraded my modules/core" then please set to RTBC because that's not something we can solve. Yes, manual cleanup of the user menu will be required. Small price to pay, I say.
hass, please send your table to chx1975 at google's mail service.
Comment #24
webernet CreditAttribution: webernet commentedRe-tested #14, and this time I'm not seeing the duplicate items I was getting without the patch.
The other issues I pointed out are a separate issue --> http://drupal.org/node/196043
This patch is RTBC.
Comment #25
hass CreditAttribution: hass commentedI don't like to fight with the status here and i HAVE testet #14 patch and my site gets BROKEN. So please give me a few hours (~2-3h from now) to upload an export of my menu tree here for testing. Remember - this patch is not working for me and my menu tree is garbaged and many many items duplicated - why ever - and i'm not the menu tree developer...
Comment #26
JirkaRybka CreditAttribution: JirkaRybka commentedI tested upgrade on both 6.x-dev and 6.x-dev + patch #14. While HEAD still reproduces my problem, the patch was successful - no more duplicates, my menu looks as expected. So patch #14 works fine for me.
Giving time to #25 feedback now, but otherwise this is RTBC for me. Note that I didn't really read and understand the code, I just observed that it works for me.
Comment #27
hass CreditAttribution: hass commented@chx: i send you the table by PM.
Comment #28
chx CreditAttribution: chx commentedHass:
This is from the menu table dump you sent me. You have your primary links (pid=2) repeated in Navigation (pid=1) in your Drupal 5 database with the same
type
and the samepath
. If there is any way the menu upgrade code could know these are bogus it escapes me.Both JirkaRybka and webernet said we are fine. Your DB dump does not counter this. Expect a little manual work after upgrade.
Comment #29
hass CreditAttribution: hass commented@chx: my primary links are *not* duplicated. Duplicated links are all links inside "admin" path. This have nothing to do with my custom menus - that should nevertheless do not break anything if this upgrade works like a charm. I don't understand from the above comments, why it is required to turn of core modules (forum, aggregator) to get no links duplicated. There is nothing in docs telling me i must turn off all modules for an upgrade except a small list (whatever modules should be in this list).
I'm sure i'm not stupid and i cannot upgrade to D6 with this buggy upgrade. Have you tried and upgrade with my menu table? What happen and why are core menu links duplicated and why comes some hidden module paths back - from modules i'm no more using over one year and where i do not have this modules installed in D6?
Aside with the same menu structure i've done an upgrade from 4.7 to 5.0 - no troubles at all. This should be possible with drupal's core paths in D6, too. My navigation links and partly doubled primary links are no issues at all about this case and i have not seen any issues with this patch #14 regarding my custom links. It doesn't matter here if i have them doubled to workaround some odd menu issues or not.
Comment #30
hass CreditAttribution: hass commentedI've checked my outdated old D47 installation about the menu point names... maybe you are correct that there is nothing "duplicated" any more, and we have a different problem here that let totally outdated menu links from 4.7 reappear in D6 that have been invisible in D5 at all!? I have no idea.
This is what could be the cause of my problems... hm... i opened this case - so i could say - all discussions above are OT here and we must change the title here to something appropriate like "Drupal 4.7.x links reappear after Drupal 6 upgrade"... or i need to open a new case about this issue if you think it is different. However you have my menu table any you could take a look, why this D 4.7.x links problem occur.
Comment #31
hass CreditAttribution: hass commentedSomeone able to provide / explain how the value
menu_links.hidden
is calculated? I cannot find anything about this in D5 - so i have no idea how D5 knows to make "admin/block" (D4.7.x link) hidden and show "admin/build/block" only...Comment #32
hass CreditAttribution: hass commentedOk, i'm now moving to the problem i found and that webernet found in http://drupal.org/node/196043, too. Makes most sense after this case has been hijacked for a different bug... i cannot say this patch is RTBC, but i'm setting back as before.
Comment #33
pwolanin CreditAttribution: pwolanin commented@haas: menu_links.hidden is new for D6: -1 is a callback (hidden and can never show), 0 is a normal link, 1 is hidden (disabled) but could be re-enabled.
Comment #34
Gábor HojtsyOK, committed this one, continue at http://drupal.org/node/196043 with other issues.
Comment #35
(not verified) CreditAttribution: commentedAutomatically closed -- issue fixed for two weeks with no activity.