Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Good afternoon,
I've noted that when you use the Remove Trailing Zero Argument option, the trailing zero will be removed (it's ok, that's the idea), but it will remove all the zeros before the last "/".
For example, if you have the url http://www.example.com/taxonomy/term/10/0, you'll be redirected to http://www.example.com/taxonomy/term/1 (as you can see, the taxonomy term id changed from 10 to 1). The same thing will happen if your term id is 100, 1000, 10000, etc, all of them will redirect to the term id 1.
I'm available if you need me to do some tests.
Good bye.
Comment | File | Size | Author |
---|---|---|---|
#12 | 867654-trailing-zero-greedy.patch | 1.17 KB | Dave Reid |
#8 | globalredirect-867654-8.patch | 437 bytes | mikeytown2 |
Comments
Comment #1
YK85 CreditAttribution: YK85 commentedsubscribing
Comment #2
nicholasThompsonWell spotted! I can confirm this as a bug and will get this sorted in the next release.
Comment #3
mikeytown2 CreditAttribution: mikeytown2 commented+1
Comment #4
juankvillegas CreditAttribution: juankvillegas commentedGreat news... thank you for taking care of this.
I'll try to modify my Global Redirect version until yours is available.
Comment #5
jiakomo CreditAttribution: jiakomo commentedHello,
is this fixed in current -dev ?
Comment #6
YK85 CreditAttribution: YK85 commentedI was wondering if any further progress has been made with this issue?
Thank you very much
Comment #7
juankvillegas CreditAttribution: juankvillegas commentedI modified it manually because the current 6.x-1.x-dev version hasn't solved it yet... and the solution is very very very very simple.
Between lines 112 and 116 it has:
Just replace line 115 to have this:
Comment #8
mikeytown2 CreditAttribution: mikeytown2 commentedComment #9
jiakomo CreditAttribution: jiakomo commentedThis seems to work for me with no side-effects.
Comment #10
mikeytown2 CreditAttribution: mikeytown2 commentedComment #11
juankvillegas CreditAttribution: juankvillegas commentedThere is a new dev version and this was not included. What can we do to have this included?
Comment #12
Dave ReidLast patch did not include any test to verify that it works nor prevent this functionality from regressing again. Attached patch includes a test that should help round this out.
Comment #13
Dave ReidHrm, seems the tests don't actually check with the de-trailing zero option enabled at all.
Comment #14
nicholasThompsonFix from #8 (D6) and #12 (D7) committed to dev branch.
Also updated the test suites on both to include the taxonomy/term/10/0 test AND fixed the missing trailing_zero settings toggle (well spotted Dave!).
In doing so its exposed an interesting behaviour in D7 where we expect it to 301 on the 10/0 term if trailing_zero is enabled, however if you have menu_check enabled too it will just 404 as the term doesn't exist (and therefore the menu item fails?! I guess...) Due to this I have separated out the menu_check test and trailing_zero test.
Maybe in the future, we should improve the test suite to handle more setting combinations.