No Code Attached Yet
avatar ipresencesa
ipresencesa
18 Jan 2022

Steps to reproduce the issue

After updating to Joomla 4.0.6 I ran the site audit using an SEO tool.

Expected result

All redirected URLs should be redirected to new URLs.
Example: https://www.allmaids.co.za/gardeners --> https://www.allmaids.co.za/domestic-placements/gardeners

Actual result

Internal Server Error 500 on all on previously working redirects.

System information (as much as possible)

Joomla 4.0.6 update.

Additional comments

avatar ipresencesa ipresencesa - open - 18 Jan 2022
avatar joomla-cms-bot joomla-cms-bot - change - 18 Jan 2022
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 18 Jan 2022
avatar brianteeman
brianteeman - comment - 18 Jan 2022

that redirect is working for me

avatar richard67
richard67 - comment - 18 Jan 2022

For me, too ... I clicked the first URL in the example and got redirected to the 2nd.

Maybe that SEO tool uses a user agent which is blocked by an .htaccess rule for blocking bad user agents, like it is created by certain tools, i.e. not the default from the htaccess.txt coming with Joomla?

But on the other hand, that should not return a 500.

Update: And it should not change with an update to 4.0.6.

@ipresencesa Does the redirect work for you when testing in the browser, not with the SEO tool? What kind of SEO tool is that?

avatar ipresencesa
ipresencesa - comment - 18 Jan 2022

The SEO tool is working fine after I downgraded to 4.0.5

I found that it happens only with first level redirects.

Example:

https://www.allmaids.co.za/gardening-services

but not

https://www.allmaids.co.za/domestic-services/gardening-services

I don’t understand which it works immediately after downgrading without changing anything.

I will try upgrading again and give an update.

From: Richard Fath @.>
Sent: 18 January 2022 02:36 PM
To: joomla/joomla-cms @.
>
Cc: ipresencesa @.>; Mention @.>
Subject: Re: [joomla/joomla-cms] Internal Server Error 500 (Issue #36730)

For me, too ... I clicked the first URL in the example and got redirected to the 2nd.

Maybe that SEO tool uses a user agent which is blocked by an .htaccess rule for blocking bad user agents, like it is created by certain tools, i.e. not the default from the htaccess.txt coming with Joomla?

But on the other hand, that should not return a 500.

@ipresencesa https://github.com/ipresencesa Does the redirect work for you when testing in the browser, not with the SEO tool? What kind of SEO tool is that?


Reply to this email directly, view it on GitHub #36730 (comment) , or unsubscribe https://github.com/notifications/unsubscribe-auth/AM7P6FEJSISPFJESZQF4SN3UWVNCTANCNFSM5MHATEPA .
Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub .
You are receiving this because you were mentioned.Message ID: @.***>

--
This email has been checked for viruses by AVG.
https://www.avg.com

avatar ipresencesa
ipresencesa - comment - 18 Jan 2022

Nope, the tool and the browser give same errors.

Updating again gives same error 500.

From: Richard Fath @.>
Sent: 18 January 2022 02:36 PM
To: joomla/joomla-cms @.
>
Cc: ipresencesa @.>; Mention @.>
Subject: Re: [joomla/joomla-cms] Internal Server Error 500 (Issue #36730)

For me, too ... I clicked the first URL in the example and got redirected to the 2nd.

Maybe that SEO tool uses a user agent which is blocked by an .htaccess rule for blocking bad user agents, like it is created by certain tools, i.e. not the default from the htaccess.txt coming with Joomla?

But on the other hand, that should not return a 500.

@ipresencesa https://github.com/ipresencesa Does the redirect work for you when testing in the browser, not with the SEO tool? What kind of SEO tool is that?


Reply to this email directly, view it on GitHub #36730 (comment) , or unsubscribe https://github.com/notifications/unsubscribe-auth/AM7P6FEJSISPFJESZQF4SN3UWVNCTANCNFSM5MHATEPA .
Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub .
You are receiving this because you were mentioned.Message ID: @.***>

--
This email has been checked for viruses by AVG.
https://www.avg.com

avatar brianteeman
brianteeman - comment - 18 Jan 2022

and have you done what it tells you to do?

avatar richard67
richard67 - comment - 18 Jan 2022

Besides documentation block changes I see no other changes in the code of com_redirect between 4.0.5 and 4.0.6 so I have no idea why that should change behaviour after an update.

avatar brianteeman
brianteeman - comment - 18 Jan 2022

Besides documentation block changes I see no other changes in the code of com_redirect between 4.0.5 and 4.0.6 so I have no idea why that should change behaviour after an update.

But if you follow the instructions we will have a better idea

avatar richard67
richard67 - comment - 18 Jan 2022

Besides documentation block changes I see no other changes in the code of com_redirect between 4.0.5 and 4.0.6 so I have no idea why that should change behaviour after an update.

But if you follow the instructions we will have a better idea

@brianteeman You mean me? If so, which instructions?

avatar brianteeman
brianteeman - comment - 18 Jan 2022

no I mean @ipresencesa and the instructions on the 500 error page

avatar richard67
richard67 - comment - 18 Jan 2022
avatar ipresencesa
ipresencesa - comment - 18 Jan 2022

The following is the output after Debug = true

Error

in https://www.allmaids.co.za/how-it-works /home1/allmalvb/public_html/plugins/system/redirect/redirect.php (line 243)

  1.             // Always count redirect hits
    
  2.             $redirect->hits++;
    
  3.             try
    
  4.             {
    
  5.                 $db->updateObject('#__redirect_links', $redirect, 'id');
    
  6.             }
    
  7.             catch (Exception $e)
    
  8.             {
    
  9.                 // We don't log issues for now
    
  10.             }
    

in https://www.allmaids.co.za/how-it-works /home1/allmalvb/public_html/libraries/vendor/joomla/event/src/Dispatcher.php -> handleError (line 486)

Dispatcher->dispatch('onError', object(ErrorEvent))in https://www.allmaids.co.za/how-it-works /home1/allmalvb/public_html/libraries/src/Application/EventAware.php (line 111)

WebApplication->triggerEvent('onError', object(ErrorEvent))in https://www.allmaids.co.za/how-it-works /home1/allmalvb/public_html/libraries/src/Application/CMSApplication.php (line 309)

CMSApplication->execute()in https://www.allmaids.co.za/how-it-works /home1/allmalvb/public_html/includes/app.php (line 63)

require_once('/home1/allmalvb/public_html/includes/app.php')in https://www.allmaids.co.za/how-it-works /home1/allmalvb/public_html/index.php (line 32)

From: Brian Teeman @.>
Sent: 18 January 2022 03:36 PM
To: joomla/joomla-cms @.
>
Cc: ipresencesa @.>; Mention @.>
Subject: Re: [joomla/joomla-cms] Internal Server Error 500 (Issue #36730)

Besides documentation block changes I see no other changes in the code of com_redirect between 4.0.5 and 4.0.6 so I have no idea why that should change behaviour after an update.

But if you follow the instructions we will have a better idea


Reply to this email directly, view it on GitHub #36730 (comment) , or unsubscribe https://github.com/notifications/unsubscribe-auth/AM7P6FGV7R3LTA6KL4E25CDUWVUCXANCNFSM5MHATEPA .
Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub .
You are receiving this because you were mentioned.Message ID: @.***>

--
This email has been checked for viruses by AVG.
https://www.avg.com

avatar ipresencesa
ipresencesa - comment - 18 Jan 2022

The extended output:

Error

in https://www.allmaids.co.za/how-it-works /home1/allmalvb/public_html/plugins/system/redirect/redirect.php (line 243)

  1.             // Always count redirect hits
    
  2.             $redirect->hits++;
    
  3.             try
    
  4.             {
    
  5.                 $db->updateObject('#__redirect_links', $redirect, 'id');
    
  6.             }
    
  7.             catch (Exception $e)
    
  8.             {
    
  9.                 // We don't log issues for now
    
  10.             }
    

in https://www.allmaids.co.za/how-it-works /home1/allmalvb/public_html/libraries/vendor/joomla/event/src/Dispatcher.php -> handleError (line 486)

  1.             if ($event->isStopped())
    
  2.             {
    
  3.                 return $event;
    
  4.             }
    
  5.             $listener($event);
    
  6.         }
    
  7.     }
    
  8.     return $event;
    
  9. }
    

Dispatcher->dispatch('onError', object(ErrorEvent))in https://www.allmaids.co.za/how-it-works /home1/allmalvb/public_html/libraries/src/Application/EventAware.php (line 111)

  1.     else
    
  2.     {
    
  3.         throw new \InvalidArgumentException('The arguments must either be an event or an array');
    
  4.     }
    
  5.     $result = $dispatcher->dispatch($eventName, $event);
    
  6.     // TODO - There are still test cases where the result isn't defined, temporarily leave the isset check in place
    
  7.     return !isset($result['result']) || \is_null($result['result']) ? [] : $result['result'];
    
  8. }
    
  9. }

WebApplication->triggerEvent('onError', object(ErrorEvent))in https://www.allmaids.co.za/how-it-works /home1/allmalvb/public_html/libraries/src/Application/CMSApplication.php (line 309)

  1.                 'application' => $this,
    
  2.             ]
    
  3.         );
    
  4.         // Trigger the onError event.
    
  5.         $this->triggerEvent('onError', $event);
    
  6.         ExceptionHandler::handleException($event->getError());
    
  7.     }
    
  8.     // Send the application response.
    

CMSApplication->execute()in https://www.allmaids.co.za/how-it-works /home1/allmalvb/public_html/includes/app.php (line 63)

  1. // Set the application as global app

  2. \Joomla\CMS\Factory::$application = $app;

  3. // Execute the application.

  4. $app->execute();

require_once('/home1/allmalvb/public_html/includes/app.php')in https://www.allmaids.co.za/how-it-works /home1/allmalvb/public_html/index.php (line 32)

    • define() is used rather than "const" to not error for PHP 5.2 and lower
  1. */

  2. define('_JEXEC', 1);

  3. // Run the application - All executable code should be triggered through this file

  4. require_once dirname(FILE) . '/includes/app.php';

From: Brian Teeman @.>
Sent: 18 January 2022 03:36 PM
To: joomla/joomla-cms @.
>
Cc: ipresencesa @.>; Mention @.>
Subject: Re: [joomla/joomla-cms] Internal Server Error 500 (Issue #36730)

Besides documentation block changes I see no other changes in the code of com_redirect between 4.0.5 and 4.0.6 so I have no idea why that should change behaviour after an update.

But if you follow the instructions we will have a better idea


Reply to this email directly, #36730 (comment) view it on GitHub, or https://github.com/notifications/unsubscribe-auth/AM7P6FGV7R3LTA6KL4E25CDUWVUCXANCNFSM5MHATEPA unsubscribe.
Triage notifications on the go with GitHub Mobile for https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 iOS or https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub Android.
You are receiving this because you were mentioned.Message ID: @.***>

--
This email has been checked for viruses by AVG.
https://www.avg.com

avatar richard67
richard67 - comment - 18 Jan 2022

Closing as having a pull request. Please test #36733 . Thanks in advance.

@ipresencesa Just apply the change of that PR on your 4.0.6 and check if it helps. If it does, please mark the test result in the issue tracker here https://issues.joomla.org/tracker/joomla-cms/36733 by using the "Test this" button, selecting the appropriate test result and submitting. Thanks in advance.

avatar richard67 richard67 - change - 18 Jan 2022
Status New Closed
Closed_Date 0000-00-00 00:00:00 2022-01-18 14:46:08
Closed_By richard67
avatar richard67 richard67 - close - 18 Jan 2022

Add a Comment

Login with GitHub to post a comment