I've found an issue when placing content via path-pased rules. For instance, if I place a block to appear on certain pages, using either the core Drupal block admin UI, or Context, the blocks do not appear on pages where Domain Path determines the path/page.
I've got 3 domains, and each has an "About us" page, which is a standard node.
example.com/about-us -> node/100
one.example.com/about-us -> node/101
two.example.com/about-us -> node/102
node/100 has a Drupal alias for 'about-us' while the other nodes use Domain Path to set their domain-specific aliases to 'about-us'.
I've created a block with Views of links to other nodes (each domain has plenty of nodes that show up in this view). However, when I place a block on certain pages using the admin UI and set 'Show block on specific pages' to 'about-us' and 'about-us/*', only the primary domain displays the block on the about-us page. I've also tried to place this block using Context and a path-based trigger, but I still don't get the block on the subdomains' pages.
As best as I can determine, this is because the domain with the *actual* alias of 'about-us' triggers the rule. The Domain Path module uses hook_url_inbound_alter which sets the active path to the cononical path, which would be node/NID. If I use 'node/*' in the block configuration it shows up fine.
Comments
Comment #1
agentrickardCorrect and not fixable. This is a trade off for having domain-specific paths.
There is a potential feature request here for setting Context conditions properly, but the core path-lookups are hard-wired and cannot, AFAIK, be overridden.
Comment #2
eric.chenchao CreditAttribution: eric.chenchao commentedIt might be helpful to anyone who also got this issue.
The idea is to write a custom context path plugin
Here is the code
Define plugin in the mymodule.module
Save this code to mymodule/plugins/context_mymodule_path.inc
And set the trigger in the mymodule.module