Navigation Menu Warnings during upgrade

OJS version: 3.3.0-7, freshly upgraded from 3.3.0-6
Primary locale: fr_CA
Other locales installed: en_US, es_ES

Greetings everyone,

A few days ago, just after upgrading to 3.3.0-7, I noticed that some of our menus were displaying keys instead of proper strings (e.g. “navigation.admin” instead of “Administration”).

After reading about a few similar issues on the forum, I realized this problem had apparently showed in my upgrade logs – for at least the last two upgrades --, but I had ignored it each time since it was marked as a mere warning:

WARNING: The NavigationMenu (ContextId: 14, Title: User Navigation Menu, Area: user) will be skipped because the specified area has already a NavigationMenu attached.
WARNING: The NavigationMenu (ContextId: 14, Title: Primary Navigation Menu, Area: primary) will be skipped because the specified area has already a NavigationMenu attached.
WARNING: The NavigationMenu (ContextId: 13, Title: User Navigation Menu, Area: user) will be skipped because the specified area has already a NavigationMenu attached.
WARNING: The NavigationMenu (ContextId: 13, Title: Primary Navigation Menu, Area: primary) will be skipped because the specified area has already a NavigationMenu attached.

(And so forth, for a total of 29 warnings…)

The problem is a minor annoyance, since it only affects some menus of a secondary locale. However, I’d like to fix it before the next upgrade.

Any suggestion about how to proceed?

Nic

Hi @nicolasd, the warnings that you see should not be related to the missing locale keys. These warnings should probably be labelled notices, because they are effectively telling you that things are already set up ok.

I wasn’t able to reproduce this with 3.3.0-7. Is it possible that you have modified the locale files, either through the Custom Locales plugin or by editing the .po files directly?

Hello @NateWr,

No, I never worked directly on the locale files. However, scouring the old update logs, I noticed those warnings (although not the whole 29 of them !?) can be traced back to updates performed before I was in charge – around 3.0.2.

Anyhow, would it be safe to just manually add the missing labels in the navigation_menu_item_assignment_settings table ? Would it interfere with further updates?

I just checked my own database and I don’t have any entries in the navigation_menu_item_assignment_settings, so maybe that’s not the right place for it? You should be able to enter your own labels for each menu item by going to Settings > Website > Setup > Navigation > Navigation Menu Items. Edit each item to change the label.

Hmm, interesting. I wasn’t even aware you could edit menu items in the UI… :sweat_smile:

Turns out you’re right about the table, @NateWr : I changed the items this way, which updated navigation_menu_item_settings while leaving navigation_menu_item_assignment_settings untouched.

Wonder if it will change anything in the logs during the next upgrade…

At any rate, problem fixed. Thanks a lot!