Path Pattern redirects to ugly URL when using it to access view mode

Created on 5 April 2017, over 8 years ago
Updated 22 July 2025, 19 days ago

Sorry, i think that title is confusing.

So, i ran into what i think is a weird situation. Not sure if its a bug, or an implementation issue on my part, so I'm hoping someone can help me sort it out.

I have two (2) environments where I'm using this module: local, and demo.

I installed the View Mode Page module, made sure required modules were installed and updated, and set up a path pattern. It worked perfectly!
My path pattern was "/%/advanced" --
So when I click a link like: href="/something/node-name/advanced" -- it goes to http://www.site-name.com/something/node-name/advanced and renders my "Advanced Reading" view mode. Perfect, works exactly as expected.

I duplicated these steps on my demo site. But on that environment, instead of going to "http://www.site-name.com/something/node-name/advanced" when I click my link, it redirects to "http://www.site-name.com/view_mode_page/advanced_reading/node/1946"
It still renders the correct view mode, but goes to this really ugly URL instead.
In this ugly URL, I can tell that "advanced_reading" is the machine name of the view mode I'm displaying, and "node/1946" is the non-aliased ID of the node that I'm viewing.

Any ideas on whether this is a true bug, or if I missed something on my demo site that I did on my local site? Or if this is some kind of weird conflict with another module causing that unexpected URL redirect?

thanks very much for your help, and all your work! Aside from this issue, this module was exactly what I needed.

πŸ› Bug report
Status

Fixed

Version

3.0

Component

Miscellaneous

Created by

πŸ‡ΊπŸ‡ΈUnited States nkraft

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024