The menu import command suffers from one issue. Upon importing the menu, the import checks to see that the paths exist. If they do not, they are replaced with <front>. The problem is that when you run `drush updb` the commands get run as uid=0, but when you run them at update.php they get run as the user you are logged in as. If some of the menu items have access restrictions on them that do not allow anonymous user, or the current user, then the menu item is not built properly.

We need to add a way to override the user for menu imports so that they get built properly.

Perhaps clone the current user, and then set $user->uid = 1 and then set it back at the end of the import.

Once imported, any access callbacks for the menu items should function just fine.

Comments

swirt created an issue. See original summary.

swirt’s picture

Issue summary: View changes
swirt’s picture

Issue summary: View changes

  • swirt committed 04c2341 on 7.x-1.x
    Issue #2944556 by swirt: menu import can give unpredictable results as...
swirt’s picture

Version: 7.x-1.x-dev » 7.x-1.35
Status: Active » Fixed

This has been resolved and will go out with the next release (7.x-1.36)

swirt’s picture

Status: Fixed » Closed (fixed)