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.
Hi,
I have this configuration:
- A simple node page with path "shop" (show normal text as overview)
- A simple "child" node page with path "shop/term-conditions" (show normal text)
- A Views page with path "shop/used-accessories" (show a list of nodes, no arguments, no %, nothing complicated: a very simple view page)
- A simple hierarchical menu that links all the above:
MyMenu: --shop ----Term and conditions ----Used accessories
With sub-pathauto DISABLED:
I obtain the correct behaviour, such as:
- Clicking on "shop" menu item, the relative "shop" node is correctly shown
- Clicking on "Term and conditions" menu item, the relative "term-conditions" node is correctly shown
- Clicking on "Used accessories" menu item, the relative "used-accessories" view page is correctly shown
With sub-pathauto ENABLED:
I obtain a wrong behaviour, such as:
- Clicking on "shop" menu item, the relative "shop" node is correctly shown
- Clicking on "Term and conditions" menu item, the relative "term-conditions" node is correctly shown
- Clicking on "Used accessories" menu item, the relative "used-accessories" view page IS NOT SHOWN and the node "shop" is shown instead.
This bug is also triggered even if I increment the "Maximum depth of sub-paths to alias" value in sub-pathauto settings.
What's wrong?
Thank you very much
Comments
Comment #0.0
MXTMinor typo
Comment #1
jaymcgraw CreditAttribution: jaymcgraw commentedWitnessing this same behavior with sub-pathauto when page (and therefore path) is defined by a view.
Comment #1.0
jaymcgraw CreditAttribution: jaymcgraw commentedSorry, another minor typo
Comment #2
MXTIf I change the views path from "shop/used-accessories" to "node/37/used-accessories" all works fine.
(37 is the nid of my node with "shop" alias)
So, using sub-pathauto module we have to use system path with hard coded NIDS (e.g. node/37) in all views paths? Even if it's not necessary? (In my case I don't need % in my views path)
Thank you for some explanation.
Comment #3
MXTAnd also I have to add the system path in the "Show block on specific pages" blocks setting to correctly trigger a block visibility on the above pages, like this:
Things now work in this way, but I think this is not a correct behaviour (think the complications for node translations for esample, where I have different NIDS in different languages for the same pages!), so I mark this as 'major' bug
Thank you very much
Comment #4
MXTComment #5
BWPanda CreditAttribution: BWPanda commentedI too came across this behaviour:
I have an 'About' page node at www.example.com/about. I want to display a view so the URL is www.example.com/about/my-view, however this doesn't work (same as original post above) and I have to instead use www.example.com/node/1/my-view...
The URL then displays correctly as www.example.com/about/my-view, however hard-coding node IDs in the URL is not ideal. A solution that allows us to use regular (aliased) paths in Views would be good.
Comment #6
den33775 CreditAttribution: den33775 commentedHave you tried this module in combination with http://drupal.org/project/views_url_alias ?
I have same problem and am going to try this as a solution. Looks like a perfect answer in theory!
Comment #7
Dave ReidPlease test the following patch in #1691054: Sub-pa shouldn't recursively check existing aliases which should resolve this issue.
Comment #7.0
Dave Reidtypo