• Home
  • Get help
  • Ask a question
Last post 44 min ago
Posts last week 89
Average response time last week 30 min
All time posts 67711
All time tickets 10463
All time avg. posts per day 21

Helpdesk is open from Monday through Friday CET

Please create an (free) account to post any question in the support area.
Please check the development versions area. Look at the changelog, maybe your specific problem has been resolved already!
All tickets are private and they cannot be viewed by anyone. We have made public only a few tickets that we found helpful, after removing private information from them.

#5632 – 404 errors display the homepage instead of showing its respective page.

Posted in ‘sh404SEF’
This is a public ticket. Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.
Thursday, 28 February 2019 00:57 UTC
mormenel
I'm having some troubles with the component and how it is handling the 404 errors. For some reason after enabling the URL optimization, all 404 errors display the homepage but without changing the URL.

For example, if I visit https://xxxx.net/some-random-page when the URL optimization is on, the website shows the homepage but the address bar still shows https://xxxx.net/some-random-page. image01

It doesn't matter how I setup the options in the 404 tab in the configuration panel, the page refuses to show the error page. At this moment, the only settings I'm using for this tab are:

- 404 error handling: Use Joomla error page
- Sub-template: error

The rest of the options are disabled or set in none.

Also, looking at the webtools, the network tab isn't showing a 404 status code instead it show 200. image02

This website isn't new, from what I know it was design and build some time ago. So there is a chance that the source of the problem could be a conflict with some component, template or something else.

If I disable URL optimization, the website works normally and the 404 error page shows again. image03
Thursday, 28 February 2019 08:42 UTC
wb_weeblr
Hi

- 404 error handling: Use Joomla error page
Please revert to "Override Joomla error page"

For some reason after enabling the URL optimization, all 404 errors display the homepage but without changing the URL.
This is because by default the sh404SEF error page is displayed using the home page menu item. Joomla uses menu items to decide on which template and modules to use. In your case, your template is most likely removing all Joomla content from the home page thus also removing the sh404SEF error page content.

To change that, in sh404SEF error page setting, on the EN-GB tab, select any other Menu item than the home page to display the sh404SEF erro rpage.

the network tab isn't showing a 404 status code instead it show 200. image02
That is the most serious problem and in most cases it comes from having enabled back the Joomla router. sh404SEF itself will never use a 200 code, it's actually designed to fix that issue which happens quite a bit with Joomla routing.

You may have enabled back the Joomla router if:

- you enabled "301 redirect from Joomla SEF to sh404SEF" under the "Advanced" tab of sh404SEF configuration (is off by default)
- you set any component to "Use Joomla router" under the "By component" tab of sh404SEF configuration. (they all use "Use default handler" by default)

If none of the above fixes the 200 response code issue, then there are less common external reasons that we can get into.

Best regards


 
Thursday, 28 February 2019 16:00 UTC
mormenel
- you set any component to "Use Joomla router" under the "By component" tab of sh404SEF configuration. (they all use "Use default handler" by default)


It seems that this was the source of the problem, reverting all setting to default make the 404 function to work again.

I had Hikashop set to use the Joomla router because it the component was making some heavy changes to the URLs that could impact SEO. For example, from https://xxxx.net/products/pet to https://xxxx.net/pet/product/listing

I guess we have to manually review each URL and set the correct alias. Right?

Hikashop has also some SEO functions with a canonical URL field. Is there a chance of a conflict between this options and sh404sef?
Thursday, 28 February 2019 16:06 UTC
wb_weeblr
Hi

I guess we have to manually review each URL and set the correct alias. Right?
Another option is to go to "BY components" and set Hikashop to:

- Use default handler on 1st dropdown
- Use router.php with menu item

The delete all the Hikashop URL in the URL manager and navigate to the shop start page. This configuration should provide URLs nearly if not entirely identical to the Joomla ones.

Hikashop has also some SEO functions with a canonical URL field. Is there a chance of a conflict between this options and sh404sef?
If you talk about something like "Use canonical URLs" in Hikashop, you cannot use that. What it does is simply bypass the entire Joomla routing system, which means also bypassing sh404SEF for creation of most URLs. THis will generate 404 basically.

Best regards
 
Friday, 01 March 2019 21:39 UTC
mormenel
Hikashop is now showing the correct URL, but now I discover that other menu items are removing their parent menu. For example: http://xxxx.net/blog/video is now http://xxxx.net/video. This is a common single article menu.

How can I fix this? Which component manage this options?
Monday, 04 March 2019 10:29 UTC
wb_weeblr
Hi

How can I fix this? Which component manage this options?
sh404SEF. The thing to understand is that to fight duplicate content issues in Joomla, sh40SEF does not use menu items to build URLs, at least not for Joomla content and with default settings.

What you did above with Hikashop (select "Use router.php with menu item") was to force it to use menu items for Hikashop. You keep same URLs as before but sh404SEF cannot prevent any duplicate content issue.

With Joomla content such as your video article, the default settings are to build a URL with: /category-name/article-name. So if this article got a /video URL then maybe it's an article called Video in the "Uncategorizd" category?

There are settings under the Extensions -> Joomla tab of sh404SEF configuration to decide which URL structure you want to use. If you change any setting there, remember to delete the undesired URLs from the URL manager so that new ones can be created again with the new parameters.

An even easier alternative, if you have only a few URLs is to simply change them manually. For instance for the /video link:

- click on the the "video" URL in the SEF URL manager
- change the SEF URL to /blog/video
- save

Customization is described on this page of the documentation.

Best regards

 
Tuesday, 05 March 2019 22:13 UTC
mormenel
Ok. I get it now. Just one last question. How will the component behave with components that don't use a "category system" similar to Joomla's default one.
Wednesday, 06 March 2019 07:45 UTC
wb_weeblr
Hi,

sh404SEF provides plugins to build URLs for all of Joomla native content then a few other ones such as Virtuemart or Community Builder components. Then for all the others, we use the same router.php file that they provide for Joomla SEF. Except that by default we use them without using the menu item part of it.
So using or not the category system is not relevant here, we only care about which URLs the components themselves build.

Best regards
 
Thursday, 21 March 2019 05:34 UTC
system
This ticket has been automatically closed. All tickets which have been inactive for a long time are automatically closed. If you believe that this ticket was closed in error, please contact us.
This ticket is closed, therefore read-only. You can no longer reply to it. If you need to provide more information, please open a new ticket and mention this ticket's number.