User tests: Successful: Unsuccessful:
Pull Request for Issue #19713
When checking old_urls for duplicates, com_redirect does not make the difference between utf8 and ascii characters. By rawurlencode them, it solves the issue.
See #19713
an old url of type http://mydomain.com/bogusurl will not be considered as different from http://mydomain.com/bøgusurl and therefore com_redirect considers it as duplicate.
After patch it does not any more and each can get a different new URL
Status | New | ⇒ | Pending |
Category | ⇒ | Administration com_redirect |
@bubi-luka
Please mark the PR as Tested OK in https://issues.joomla.org/tracker/joomla-cms/19734
I have tested this item
Tested OK.
I have tested this item
I've tested this item successfully
Status | Pending | ⇒ | Ready to Commit |
Ready to Commit after two successful tests.
Thanks for testing.
@infograf768 are you sure that this works as expected? I only did a code review and for me it looks like that automatically added urls in the plugin aren't rawurlencode.
It maybe works because the plugin database query is really strange and fault tolerant.
joomla-cms/plugins/system/redirect/redirect.php
Lines 190 to 218 in e07c7b1
Also in the same function the old_url get rawurldecoded before it get saved. So future check calls wouldn't find the current saved old_url.
Yes, I am sure it works.
bogus urls should be entered in frontend (backend accepts anything when creating a new old url and this PR does not correct it.)
What is done in this PR is just check for duplicates. It does not change the old_url as present in the db. That old_url has been saved in db as pure utf8.
By rawurlencoding them when checking for duplicates, we really differentiate them.
I suggest you just test with the bogus urls in the test instructions, or any other bogus urls, one with accent and another without.
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2018-02-26 03:10:41 |
Closed_By | ⇒ | mbabker | |
Labels |
Added:
?
?
|
Tested and it resolves the issue I was having! Thank you for the patch!