Problem/Motivation

If a page is defined with a dual context path under the user path, "?=user/autocomplete/QUERY" will 404.

Steps to reproduce

Before adding the problematic page, head to "SITE_BASE_PATH/?=user/autocomplete/QUERY" and if things are working correctly you should see a JSON response.

Now go to Pages:

  1. Add custom page
  2. Enter into the path field: user/%user/%some_identifier
  3. Check the "Contexts" box.
  4. For the first context assign "User: ID"
  5. For the second context any other context type can be chosen as it does not seem to change the outcome (try string for testing)
  6. Continue and choose a layout, add some content and save.

Test out "SITE_BASE_PATH/?=user/autocomplete/QUERY" again and this time it will 404. Disable the new page and the autocomplete page will start working again.

Note if there is a fixed path value between the two contexts (e.g user/%user/seperate/%some_identifier) the autocomplete path will work again so that is some kind of workaround.

Seems some kind of menu path priority handling needs to be done but I don't think Drupal 7 has any kind of path priority weighting in the menu routing table. As far as I understand how it works, the "weight" column is used only for the rendered menu links ordering. Page Manager already sets its module weight high so that won't fix it. Thus off the top of my head Page managers menu handling would need to check if it has a value of user/%/%, if so it checks for any other user/somepath first and hands back control to what was expected. At the very least I think user/autocomplete could be hard coded to be ignored in someway.

Comments

magicmyth created an issue. See original summary.

magicmyth’s picture

Issue summary: View changes