- Issue created by @Foxy-vikvik
Currently, when using a formatter to redirect a node to a link defined in an entity reference or link field, an error occurs if the target link does not exist or if an alias is mistakenly used instead of an actual reference. This can break the user experience and lead to 404 or fatal errors.
There is no built-in fallback mechanism to handle missing or invalid links gracefully.
Observe the error or broken redirect behavior.
Add an additional option to the redirect formatter configuration that defines what to do when the target link is invalid or missing. Possible fallback options could include:
Update the formatter plugin to include a fallback setting.
In the formatter settings for the redirect field, a new select field will be added:
"If link does not exist:"
Options:
It is good implemented on the Rabbit hole https://www.drupal.org/project/rabbit_hole β
Active
2.0
Code