Closed (fixed)
Project:
Drupal core
Version:
9.5.x-dev
Component:
taxonomy.module
Priority:
Minor
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
11 Nov 2016 at 11:28 UTC
Updated:
4 Nov 2022 at 11:54 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
sourabh.singhal commentedPlease find the patch attached. Please review this.
Thanks
Sourdrup
Comment #4
sourabh.singhal commentedSince my last patch test was failed, I double checked, it is applying correctly, the changes works well so I am uploading a new patch file again. Please review
Comment #5
krina.addweb commentedPatch failed.. When creating new term it should not redirect to term view page, only editing term should redirect to term view page.
Comment #6
sourabh.singhal commentedHi krina.soni,
Problem statement: I am facing a usability issue, do review my statement:
I am trying to edit term from term view page (/taxonomy/term/termid) i.e i am clicking on the "Edit" tab from this page. After Editing the term, when I click on Save, it doesn't redirect to taxonomy term view page. It seems like, this functionality needs to be fixed.
To reproduce this functionality you need to :
1. Add new term in vocabulary. (You are not redirected from this page)
2. Go to Term Listing page and click on the term name not the "edit" link.
3. You were redirected to the Term View page.
4. Now click on "Edit" tab on term view page which will redirect you to term edit page.
5. Now you click on "Save" button which will redirect you back to term view page which was not working earlier.
Thanks
Sourdrup
Comment #7
krina.addweb commentedHi Sourabh,
You are absolutely right, this works fine for me as well. But the issue I am talking about is while creating new term. It should not redirected to term view page.Add time redirection works without patch but with patch it redirects me on view page. Please let me know if you need any clarification.
Thanks
Comment #8
sourabh.singhal commentedThanks krina.soni,
For catching this, I have attached second patch for the same and in this I have fixed the bug of redirecting from term add page.
Sourdrup
Comment #9
krina.addweb commentedHi Sourabh,
Now Patch works well as per the requirements.
Thanks
Comment #10
stefan.r commentedDoes Drupal 8 have this issue as well? If yes, it needs to be fixed there first
Comment #11
sourabh.singhal commentedHi stefan.r,
Yes you are correct, I have checked this issue in Drupal 8.2.3 and it exists in Drupal 8 also. I have prepared patch for the same. Please review.
Sourdrup
Comment #12
krina.addweb commentedHello sourdrup,
Thanks! Your patch works well with Drupal 8.2.3.
Also Thanks @stefan.r
Comment #13
David_Rothstein commentedComment #14
David_Rothstein commentedBy the way, nice job catching the fact that we want this redirect to be on the "edit" form only, not the "add" form. I definitely think that makes sense, since when adding taxonomy terms it is common to add a few at once.
Comment #15
wturrell commentedChanging this to 'needs work' – to get it into core we first a patch name without
-do-not-test, so it can be run on testbot.@sourdrup - I'll also unassign the issue so there's a greater chance of others picking it up if you don't have time yourself (see Assigning Ownership docs)
Comment #17
pk188 commentedRe rolled as #11 failed to apply. And fixed #15.
Comment #18
berdirNeeds tests. I don't understand why the path based edit check is necessary, this is already within the UPDATE case, where we know that we are updating a term?
Comment #24
jeffamUpdating this patch for 9.x and adding a couple of tests.
Comment #25
jeffamComment #26
jeffamFixed the array syntax. That's what I get from cutting and pasting from a previous patch.
Comment #27
manojithape commentedComment #28
manojithape commentedAt the time of applying patch#26 on the drupal 9.1.x dev version getting an error and not able to apply the patch. Please refer attached error screenshot.
Comment #29
manojithape commentedComment #30
dhirendra.mishra commentedHopefully this attached patch will be useful
Comment #31
vikashsoni commentedI tried to apply these patches but getting error for reference sharing screenshot
Comment #33
jeffamHere's a patch for 9.3.x
Comment #34
quietone commentedI tested this on 9.3.x, standard install and when editing a taxonomy term, clicking save, I return to the the term list page. Just to be sure I understood the problem I applied the patch and edited and saved a term. I was again sent to the term list page. The patch does not change the current behavior.
A reminder to anyone working on older patches is to reproduce the problem first. If it can't be reproduced then explain what you did in a comment and close it as cannot reproduce. Lets put our collective efforts into problems that still exist.
Closing as cannot reproduce.
Comment #35
shortspoken commented@quietone: I can reproduce the described problem. The difference lies in a small but important detail: from where you click the edit button.
As @sourabh.singhal describes it, its about the term view page ('/taxonomy/term/[tid]') where "edit" is clicked. Like you would edit a node in frontend via the edit tab. The expected behaviour when you click save would be to return to the view/full page where you clicked "edit" (as it is with nodes).
But when doing so with a taxonomy term, you click save but you stay on the edit form with success message that the term has been updated.
Yay! But please take me back to the view page. ;)
I can confirm that the patch from #33 leads to the desired behaviour.
Comment #37
quietone commented@shortspoken, thanks for the explanation. I retested on 9.5.x, this time correctly, and did reproduce the problem.
Setting back to NR.
Comment #38
asha nair commentedApplied patch #33 in 9.5.x successfully. The patch fixes the issue. Adding screen recording for reference
Comment #39
Manibharathi E R commentedPatch #33 Applied and tested successfully on Drupal 9.5.x.
Steps to reproduce:
1. Create a new term in the Vocabulary.
2. Open the term page and click the edit page. Screen will be redirect to the term edit page.
3. Now save the edit form. Screen not redirect to the Term page.
4. Apply the Patch and try to save the edit form screen will be redirect to the term View page.
Before-Patch:

After=Patch:

Comment #40
ameymudras commentedTested on Drupal 9.5.x
- Issue summary is clear and was able to reproduce the issue
- The patch #33 applies cleanly
- After applying the patch the redirect works as expected. Not adding a before after patch coz #39 already has provided it
- Test is included
- No issues seen in the code
Moving to RTBC
Comment #42
catchCommitted/pushed to 10.1.x, cherry-picked to 10.0.x and 9.5.x, thanks!