Redirect work but not collect 404 url-s Topic is solved

Need help with the Administration of your Joomla! 3.x site? This is the spot for you.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Post Reply
brucezly
Joomla! Apprentice
Joomla! Apprentice
Posts: 7
Joined: Wed Sep 08, 2021 12:24 pm

Redirect work but not collect 404 url-s

Post by brucezly » Wed Sep 08, 2021 12:36 pm

Hi, Joomla redirect work but not collect 404 error url-s.

- the plugin setup corrected.


Joomla 3.9.28.

I also tried redj component, the problem was the same.
Not php error in the logs...
what could be wrong?

User avatar
pe7er
Joomla! Master
Joomla! Master
Posts: 23402
Joined: Thu Aug 18, 2005 8:55 pm
Location: Nijmegen, Netherlands
Contact:

Re: Redirect work but not collect 404 url-s

Post by pe7er » Wed Sep 08, 2021 2:42 pm

Welcome to Joomla forum!

Joomla's Redirect only works when the plugin is enabled AND when your Joomla site registers a 404 error.

Do you have a custom error page?

Could you check if your Joomla site generates a 404 error in the HTTP headers when you open a non-existing page?

You could check that with Google Chrome:
use its "Inspect" > [Network] tab
and check in the headers if your site gives a HTTP 404 error code
or that it generates another HTTP status code. Like "HTTP 200 Success" because it successfully loads your custom error page.
Kind Regards,
Peter Martin, Global Moderator
https://db8.nl - Joomla specialist, Nijmegen, Nederland
The best website: https://the-best-website.com

brucezly
Joomla! Apprentice
Joomla! Apprentice
Posts: 7
Joined: Wed Sep 08, 2021 12:24 pm

Re: Redirect work but not collect 404 url-s

Post by brucezly » Thu Sep 09, 2021 6:12 am

pe7er wrote:
Wed Sep 08, 2021 2:42 pm
Welcome to Joomla forum!

Joomla's Redirect only works when the plugin is enabled AND when your Joomla site registers a 404 error.

Do you have a custom error page?

Could you check if your Joomla site generates a 404 error in the HTTP headers when you open a non-existing page?

You could check that with Google Chrome:
use its "Inspect" > [Network] tab
and check in the headers if your site gives a HTTP 404 error code
or that it generates another HTTP status code. Like "HTTP 200 Success" because it successfully loads your custom error page.
I use the original joomla error.php. (templates/system)

wrong link status 404, error.css 200

do you know where the redirect plugins should be in order?

User avatar
pe7er
Joomla! Master
Joomla! Master
Posts: 23402
Joined: Thu Aug 18, 2005 8:55 pm
Location: Nijmegen, Netherlands
Contact:

Re: Redirect work but not collect 404 url-s

Post by pe7er » Thu Sep 09, 2021 6:37 am

Good point!
Not sure if it's important with this Plugin, but always a good idea to investigate.

On one of my sites where the redirects work correctly, the Redirect plugin loaded at the end. There are only 8 default Joomla plugins loaded after it.

My System Plugins (Plugins filtered on "System" and ordered by Ordering) at the end of the list:
  • System - Redirect
  • System - Debug system
  • System - User Log
  • System - Logout
  • System - Highlight
  • System - Remember Me
  • System - db8 Skip to Content (my own plugin)
  • System - SEF
  • System - Language Code
  • System - Page Cache (disabled plugin)
Kind Regards,
Peter Martin, Global Moderator
https://db8.nl - Joomla specialist, Nijmegen, Nederland
The best website: https://the-best-website.com

User avatar
pe7er
Joomla! Master
Joomla! Master
Posts: 23402
Joined: Thu Aug 18, 2005 8:55 pm
Location: Nijmegen, Netherlands
Contact:

Re: Redirect work but not collect 404 url-s

Post by pe7er » Thu Sep 09, 2021 6:38 am

Could you use the Forum Post Assistant to give somewhat more info about your setup?
https://forumpostassistant.github.io/docs/
Kind Regards,
Peter Martin, Global Moderator
https://db8.nl - Joomla specialist, Nijmegen, Nederland
The best website: https://the-best-website.com

brucezly
Joomla! Apprentice
Joomla! Apprentice
Posts: 7
Joined: Wed Sep 08, 2021 12:24 pm

Re: Redirect work but not collect 404 url-s

Post by brucezly » Fri Sep 10, 2021 8:01 am

Your message contains 31464 characters.
The maximum number of allowed characters is 25000. :)

The FPA to big. Wich part is relevalt?

brucezly
Joomla! Apprentice
Joomla! Apprentice
Posts: 7
Joined: Wed Sep 08, 2021 12:24 pm

Re: Redirect work but not collect 404 url-s

Post by brucezly » Fri Sep 10, 2021 10:02 am

Might it be advisable to update system files?

I have tried many things:

- switching components, modules on/off
- I have emptied database tables (redirection)

fresh installation works on the same server

User avatar
pe7er
Joomla! Master
Joomla! Master
Posts: 23402
Joined: Thu Aug 18, 2005 8:55 pm
Location: Nijmegen, Netherlands
Contact:

Re: Redirect work but not collect 404 url-s

Post by pe7er » Fri Sep 10, 2021 10:57 am

brucezly wrote:
Fri Sep 10, 2021 10:02 am
Might it be advisable to update system files?
Yes, it's always advisable to update your software to the latest version and then test again.
Possible bugs might have been solved in the meantime.

btw: I am not aware of a bug with redirects in Joomla 3.9.28.
Kind Regards,
Peter Martin, Global Moderator
https://db8.nl - Joomla specialist, Nijmegen, Nederland
The best website: https://the-best-website.com

brucezly
Joomla! Apprentice
Joomla! Apprentice
Posts: 7
Joined: Wed Sep 08, 2021 12:24 pm

Re: Redirect work but not collect 404 url-s

Post by brucezly » Fri Sep 10, 2021 11:27 am

I mean that the same version (not the latest) installed fresh, works in the same place.

I would overwrite the current installation from the 3.9.28 installer. is there a proven method?

User avatar
pe7er
Joomla! Master
Joomla! Master
Posts: 23402
Joined: Thu Aug 18, 2005 8:55 pm
Location: Nijmegen, Netherlands
Contact:

Re: Redirect work but not collect 404 url-s

Post by pe7er » Fri Sep 10, 2021 1:57 pm

After you've created a backup (files + database) :

Components > Joomla Update > [Check for updates] > [Reinstall Joomla core files]
Kind Regards,
Peter Martin, Global Moderator
https://db8.nl - Joomla specialist, Nijmegen, Nederland
The best website: https://the-best-website.com

brucezly
Joomla! Apprentice
Joomla! Apprentice
Posts: 7
Joined: Wed Sep 08, 2021 12:24 pm

Re: Redirect work but not collect 404 url-s

Post by brucezly » Mon Sep 13, 2021 10:13 am

Not helped, but I found a strange things.

Switch on debug. The 404 error page call stack:

Call stack
# Function Location
1 () JROOT\libraries\src\Router\Router.php:238
2 Joomla\CMS\Router\Router->parse() JROOT\libraries\src\Router\SiteRouter.php:139
3 Joomla\CMS\Router\SiteRouter->parse() JROOT\libraries\src\Application\CMSApplication.php:1170
4 Joomla\CMS\Application\CMSApplication->route() JROOT\libraries\src\Application\SiteApplication.php:796
5 Joomla\CMS\Application\SiteApplication->route() JROOT\libraries\src\Application\SiteApplication.php:218
6 Joomla\CMS\Application\SiteApplication->doExecute() JROOT\libraries\src\Application\CMSApplication.php:225
7 Joomla\CMS\Application\CMSApplication->execute() JROOT\index.php:49


Same server working site page 404 call stack:

Call stack
# Function Location
1 () JROOT\libraries\legacy\error\error.php:200
2 JError::raise() JROOT\libraries\legacy\error\error.php:277
3 JError::raiseError() JROOT\components\com_sppagebuilder\controller.php:35
4 SppagebuilderController->display() JROOT\libraries\src\MVC\Controller\BaseController.php:710
5 Joomla\CMS\MVC\Controller\BaseController->execute() JROOT\components\com_sppagebuilder\sppagebuilder.php:20
6 require_once() JROOT\libraries\src\Component\ComponentHelper.php:402
7 Joomla\CMS\Component\ComponentHelper::executeComponent() JROOT\libraries\src\Component\ComponentHelper.php:377
8 Joomla\CMS\Component\ComponentHelper::renderComponent() JROOT\libraries\src\Application\SiteApplication.php:194
9 Joomla\CMS\Application\SiteApplication->dispatch() JROOT\libraries\src\Application\SiteApplication.php:233
10 Joomla\CMS\Application\SiteApplication->doExecute() JROOT\libraries\src\Application\CMSApplication.php:196
11 Joomla\CMS\Application\CMSApplication->execute() JROOT\index.php:49


neither temlate contains its own error.php file

brucezly
Joomla! Apprentice
Joomla! Apprentice
Posts: 7
Joined: Wed Sep 08, 2021 12:24 pm

Re: Redirect work but not collect 404 url-s

Post by brucezly » Mon Sep 20, 2021 11:52 am

I found the cause of the problem. I disabled all 3rd party plugins one by one.
Fatal error catcher (rupostel) was the cause of the problem.

User avatar
pe7er
Joomla! Master
Joomla! Master
Posts: 23402
Joined: Thu Aug 18, 2005 8:55 pm
Location: Nijmegen, Netherlands
Contact:

Re: Redirect work but not collect 404 url-s

Post by pe7er » Mon Sep 20, 2021 7:07 pm

Good to hear that you've solved it. Thanks for sharing your solution!
Kind Regards,
Peter Martin, Global Moderator
https://db8.nl - Joomla specialist, Nijmegen, Nederland
The best website: https://the-best-website.com


Post Reply

Return to “Administration Joomla! 3.x”