Problem/Motivation
When Rabbit Hole is configured to perform an action and a content admin views a page where that action would perform for a visitor, it is not clear to the staff admin what action will perform for an anonymous visitor.
Proposed resolution
Add a message on pages that would perform an action indicating what that action would be.
Remaining tasks
Work out how to do this.
Provide a patch.
User interface changes
When someone who has admin access and would not be affected by normal page actions, views a page where an action would perform, they will see a message explaining what that action would be.

Configuration form:

API changes
TBD
Data model changes
n/a
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | 3341902-config-form.png | 60.6 KB | matroskeen |
| #7 | Screenshot from 2023-07-06 19-30-27.png | 12.94 KB | matroskeen |
Issue fork rabbit_hole-3341902
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
damienmckennaFYI in Field Redirection we display this message to admins:
Comment #3
anybodyThank you @DamienMcKenna once again, just ran into exactly the same idea! Once again hero of the day and +1 here!
Comment #4
anybodyComment #5
matroskeenI really like the idea! This feature will be included in
2.0.xversion.I'll submit an MR with the proof of concept shortly. The next steps would be:
1) Decide on what level it would be configured. Possible options: a) global (save in
rabbit_hole.settings); b) bundle (save inrabbit_hole.behavior_settings.*). Also, keep in mind #3099245: Add option to apply rabbit hole behaviors to all users including administrators as both features are mutually exclusive if they're applied globally.2) Add configuration option and adjust conditions;
3) Decide on the message wording. It should look good and clear for all available actions, potentially including custom ones.
Current message:
Possible actions: "Page not found", "Access Denied", "Page redirect".
4) Add test coverage.
Comment #7
matroskeenAdding screenshots to the issue description
Comment #9
matroskeen1) There is a new checkbox, saved in the bundle settings;
2) Done;
3) Suggestions/improvements will be accepted in the follow-up issue;
4) Done.
Thank you!