Problem/Motivation
On text format overview page (admin/config/content/formats) configure links are supplied with destination parameter. So there is no point to set redirect in format edit form. Currently submitting edit form takes you the overview page, even when you have removed the destination parameter from URL. This is a bit annoying.
Proposed resolution
Move $form_state->setRedirect('filter.admin_overview');
from FilterFormatFormBase
to FilterFormatAddForm
.
Remaining tasks
Discuss and create a patch.
User interface changes
No changes, because of destination parameter in configure operation links.
Comment | File | Size | Author |
---|---|---|---|
#13 | interdiff-11-13.txt | 814 bytes | msankhala |
#13 | 2977054-13.patch | 5.46 KB | msankhala |
#3 | 2977054-3.patch | 1.11 KB | msankhala |
Comments
Comment #2
Chi CreditAttribution: Chi commentedComment #3
msankhala CreditAttribution: msankhala as a volunteer and at Srijan | A Material+ Company commentedHere is the first version of the patch.
Comment #5
veerasekar.r89 CreditAttribution: veerasekar.r89 commentedMoved $form_state->setRedirect('filter.admin_overview'); from FilterFormatFormBase to FilterFormatAddForm.
Comment #7
maboresev CreditAttribution: maboresev at SDOS commentedI have applied @veerasekarr89 patch to my drupal and it works properly. I don't know why It doesn't passed the tests.
The proposed solution works properly.
Comment #8
msankhala CreditAttribution: msankhala as a volunteer and at Srijan | A Material+ Company commented@veerasekar.r89 How the patch #5 is different from the patch in #3. I don't see any difference between these two except white space.
@maboresev The patch is failing because of automated test for filter admin page is expecting redirection but that is not happening for that test, That test needs to be updated as well.
Comment #9
ilya.no CreditAttribution: ilya.no as a volunteer and at Skilld for Skilld commentedAdding patch with update for tests.
Comment #11
msankhala CreditAttribution: msankhala as a volunteer and at Srijan | A Material+ Company commentedHere is updated patch with updated test cases. Hopefully this time all the test will pass.
Comment #13
msankhala CreditAttribution: msankhala as a volunteer and at Srijan | A Material+ Company commentedAnother attempt to fix error reported by test bot. There is no redirection if you disable a format.
Comment #14
barthje CreditAttribution: barthje commentedI do wonder what your use case is that you find it annoying when it goes back to the overview page. But the solution is ok because when you're going there in the normal way it will use the destination parameter.
I've reviewed and tested it and it works like discussed in this issue.
Comment #15
Chi CreditAttribution: Chi commentedIt's when you are not actually done with editing the form but want to submit it to debug something or just preserve your changes.
Comment #16
barthje CreditAttribution: barthje commentedFair enough :)
Comment #19
msankhala CreditAttribution: msankhala as a volunteer and at Srijan | A Material+ Company commentedLooks like issue with the test bot.
Comment #20
larowlanCommitted as 9b28e1f and pushed to 8.7.x.
Comment #21
larowlanHaving some d.o git issues pushing. Resetting status in meantime
Comment #23
larowlanResolved the issue