the entry for new Url in the plugin value was not changed
All parameters were added to the entry. Ugly urls are created
Newest Joomla 4.0.6
The solution
plugins\system\redirect\redirect.php
change the lines 225 and the following lines as follows:
$oldUrlParts = parse_url($redirect->old_url);
$newUrlParts = parse_url($redirect->new_url);
if ($urlQuery !== '' && empty($oldUrlParts['query']) && empty($newUrlParts['query']))
{
$newUrl = $redirect->new_url . '?' . $urlQuery;
} else {
$newUrl = $redirect->new_url;
}
$dest = Uri::isInternal($newUrl) || strpos($newUrl, 'http') === false ?
Route::_($newUrl) : $newUrl;
Labels |
Added:
No Code Attached Yet
|
Sorry, but I really got scared when I realized that my entries were overwritten. I was first afraid that I was hacked and then realized that it was related to the latest update of Joomla. For me, it resulted in 100 "server errors" on Google Search Console. Is not great and was certainly not the goal of the programmer.
Thanks but for the great work of Joomla! I will not write more bug next time!
Probably now not only the counter is updated, but also the adjusted newUrl.
Hmm you could be right and it was introduced with the last release with the feature to always incremental the hits counter with every 404.
For reference: The change was introduced with PR #34640 .
@tonypartridge Could you check if your PR could have caused this issue? Thanks in advance.
I'll check the issue out. But it has nothing to do with that PR directly since that just does a DB count update.
For reference: The change was introduced with PR #34640 .
@tonypartridge Could you check if your PR could have caused this issue? Thanks in advance.
@tonypartridge It writes the complete object and not just the hits count, so that could be the problem, but maybe I am missing something.
You are correct, but it's due to poor previous logic. I'll create a PR. Thanks for your issues @Gratia-Mira
You are correct, but it's due to poor previous logic.
@tonypartridge Yeah, that was what I expected, I did not think your PR broke something, only that it may have unmasked an older issue.
Don’t know how it’s been missed this long tbh! Directly changing the new
value which should never be changed unless done by a user in the admin.
On Thu, 27 Jan 2022 at 14:24, Richard Fath @.***> wrote:
You are correct, but it's due to poor previous logic.
@tonypartridge https://github.com/tonypartridge Yeah, that was what I
expected, I did not think your PR broke something, only that it may have
unmasked an older issue.—
Reply to this email directly, view it on GitHub
#36862 (comment),
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAKWBFUKNOVS3BRW3C3UF3LUYFIRHANCNFSM5M4DZLIQ
.
You are receiving this because you were mentioned.Message ID:
@.***>
--
Tony Partridge
Xtech Web Services Ltd
Managing Director/Developer
@tonypartridge Thanks back for your work!
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2022-01-27 18:37:34 |
Closed_By | ⇒ | richard67 |
I had the same error after updating to Joomla 4.1! Was the error not fixed?
I think it missed that release
How do you know so sure that it is a bug so you add „Bug“ to the title? Does it work differently in Joomla 3?
A bug is when a software behaves in a way not intended by the programmer. It is not necessarily a bug when it does not behave like some users want.
You should leave it to us to classify if it is a bug or not.