Add view mode detection to prevent unwanted redirection

Created on 31 July 2013, almost 12 years ago
Updated 5 January 2025, 4 months ago

We have had a number of instances recently where field redirection was happening when it wasn't supposed to. Because the teaser view mode is enabled by default for all content types by core, field redirection automatically gets configured for it when when the module is enabled. We had one instance where a node with redirection was appearing on many pages and it made it almost impossible to try to disable the setting because the site kept redirecting to an external link.

Would it be possible to detect for the view mode before redirecting? There are warnings on the module page not to use it with Teaser, Search, or RSS view modes, but if this happens accidentally, it can be potentially very hard to fix depending on how the site is configured. Does it make sense to add detection of these view modes in code, and not redirect in those cases? I would be happy to start on a patch if so. Thanks in advance.

πŸ› Bug report
Status

Closed: outdated

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States vinmassaro

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