First off - This may be expected behaviour so I'm happy to be wrong and close this issue, the behaviour just seemed wrong to me.
The issue is that wildcards on block visibility settings seem to resolve too soon.
Say you have a Menu like this
Home
-- Level 1 - URL - /level1
---- Level 2 - URL - /level1/level2/
And you want a block to show on all level 2 pages. So in the block settings you set the block visibility settings to show on pages with the pattern /*/*.
To me I would expect this pattern to only show the block on level two pages. However, this pattern shows the block on any level 1 pages as well.
Hopefully that makes sense, I can include some screenshots after work to try make it clearer.
What are the steps required to reproduce the bug?
- Create simplytest me site of drupal 8.6.1
- Create two pages
- Level 1 - URL alias - /level1
- Level 2 - URL alias - /level1/level2
- On the search block, set the block visibility settings to show only with the pattern /*/*
What behavior were you expecting?
I would expect the search block to show only on the level 2 page.
What happened instead?
The block showed on the level 1 and the level 2 page.