Currently we have multiple content types with all pages related to each content type, such as categories, tags, and the nodes themselves, under the same parent URL. For example pages related to an "article" content type would follow the form:
article/[n:title]
article/category/[c:title]
article/tags/[t:title]
On all of these pages we display a sidebar specific to that content type, using the blocks page rules, in the form:
article
article/*
We were hoping to use sub-pathauto so we could provide our normal content type specific sidebars on edit and revision pages as well, as there's no way of discerning what content type a node/[n:id]/edit URL belongs to. Unfortunately, the rules above don't seem to work with sub-pathauto pages.
Even if you specify the exact sub-pathauto URL in the block configuration, such as article/test-article/edit, the block will not show; however if you specify the correct node URL, say node/1/edit, the block will display when accessed from both that URL and the sub-pathauto rewritten URL.
Is there any way to get this working with sub-pathauto URLs, or is it a limitation of the implementation and not possible to show content type specific blocks on edit pages?
Comments
Comment #1
Dave ReidThis is due to a core issue: #1248626: drupal_get_path_alias() does not invoke url alter hook while drupal_get_normal_path() does
Comment #1.0
Dave ReidGrammar.
Comment #2
Pere OrgaAny idea of how to get that to work?
Comment #3
jorisx CreditAttribution: jorisx commented+1
Any work around or patches ?
here: https://www.drupal.org/node/1248626#comment-9344977