Problem/Motivation
In #3358611: Use another approach to avoid 403/404 pages on entity save a redirect is created on content entity save which redirects back to the edit form. Presumably to prevent users seeing the rabbit hole behaviour which can be anything since it is a pluggable system.
IMO the module is a bit too opiniated what should happen here, since people can create custom plugins with special behaviours or
even permission handling built in. In those cases, the default behaviour should be untouched.
I know there is a bypass permission, but that bypasses the entire behaviour, not just the redirect.
Steps to reproduce
Just configure a node type with a rabbit hole behaviour and save a node. You will be redirected back to to the edit form instead of the canonical.
Proposed resolution
Either remove this redirect feature, or make it optional. If optional it could be done through a global setting, a per content entity type setting, or permission.
Remaining tasks
Discuss preferred solution.
User interface changes
Depending on choice settings, or permissions.
API changes
None.
Data model changes
None.
Comment | File | Size | Author |
---|---|---|---|
#3 | 3403882-3.patch | 3.87 KB | askibinski |
Issue fork rabbit_hole-3403882
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:
![Tag1 logo](http://178.128.105.246/content-http-drupal.org/files/ads/tag1-issue-sponsorship.png)
Comments
Comment #2
askibinski CreditAttribution: askibinski as a volunteer commentedComment #3
askibinski CreditAttribution: askibinski at Erasmus University Rotterdam for Erasmus University Rotterdam commentedFor starters, here is a cleanup of the hook_form_alter which is hard to read in the current state and does a lot of different things. The messages are split up in their own specific form_id or base_form_id alters and can be removed in 3.x since they only show a message.
The only thing remaining in the form alter is the redirect which checks on content entity interface which will prevent excuting unnecessary code on many other forms.
But this will make further changes depending on choice easier.
Comment #4
seantwalshI ran into this issue today. I think it would be most flexible to have an option per entity type. For example we would get a checkbox on the settings for a node type "Disable redirect to edit on save" or something like that.