• Home
  • Get help
  • Ask a question
Last post 7 hours 21 min ago
Posts last week 89
Average response time last week 30 min
All time posts 67739
All time tickets 10468
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.

#7383 – 404 Front End Problem

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.
Monday, 07 September 2020 13:39 UTC
Rollmodl

Hello.

I have a page that occasionally shows up as a 404 on the front end, but in admin, it's listed as a SEF URL, not a 404 request. I have to delete the URL to reset the page. Here is the link to the page:

https://xxxx.com/contests

 
Monday, 07 September 2020 14:36 UTC
wb_weeblr

Hi

On your screenshot, I can see the Joomla URL for that page is:

index.php?option=com_k2&Itemid=2137&id=%3Acontests&lang=en&view=item

The %3Acontests does not seem correct, there should not be a %3A here.

I cannot really test because "301 redirect from non-sef to SEF" is enabled. Could you please provide us with superadmin credentials to your website. You can create a temporary account, and delete it afterward, but it must have superuser level.

Best regards

Yannick Gaultier

weeblr.com / @weeblr

 

 

 
Monday, 07 September 2020 14:49 UTC
Rollmodl

Username: xxxx

Password: xxxx

 

 
Monday, 07 September 2020 14:55 UTC
wb_weeblr

Hi

Thanks for that. So the problem does not actually come from sh404SEF itself because if I try to access the direct URL:

https://xxxx.com/index.php?option=com_k2&Itemid=2137&id=%3Acontests&lang=en&view=item

I also get a 404 URL. So there's a problem with that URL.

I went to K2 admin and searched for "contest" in the items list but could not find any such item. So what is this page supposed to be? which K2 item is it supposed to link to?

Best regards

Yannick Gaultier

weeblr.com / @weeblr

 

 
Monday, 07 September 2020 14:57 UTC
Rollmodl

The component for that URL is SIMContests

 
Monday, 07 September 2020 15:07 UTC
wb_weeblr

Hi

The component for that URL is SIMContests

Unfortunately that component is set to "Use Joomla router" so basically sh404SEF is disabled for it. What's happening here is that you have this /contests URL recorded for K2. So when a request for /contests comes in, sh404SEF translate back the URL to the K2 internal URL - which is a bogus one and this generate a 404 as it should, because K2 does not know this item.

So problems are:

1 - WHy do you use Joomla router for Simcontest?

2 - Why are all those bogus URLs recorded for K2? I think some of those might come from having "301 redirect from non-SEF to SEF" enabled. I disabled that setting now, so those bogus URLs should not come back.

As you have many of them in the SEF URL list, I would suggest deleting them. They don't work anyway and just use space while sometimes causing issues such as the one we see here.

Best regards

Yannick Gaultier

weeblr.com / @weeblr

 

 
Monday, 07 September 2020 15:17 UTC
Rollmodl

1 - WHy do you use Joomla router for Simcontest?

Because the default does not work with the component. I just switched to default, deleted the SEF URL and now the page directs to the forum. How would I get it to work with the component?

2. 2 - Why are all those bogus URLs recorded for K2? I think some of those might come from having "301 redirect from non-SEF to SEF" enabled. I disabled that setting now, so those bogus URLs should not come back. As you have many of them in the SEF URL list, I would suggest deleting them. They don't work anyway and just use space while sometimes causing issues such as the one we see here.

Not clear. What am I deleting, the SEF URL's for K2?

 
Monday, 07 September 2020 17:23 UTC
wb_weeblr

Hi

Not clear. What am I deleting, the SEF URL's for K2?

Yes, all those bogus K2 URLs.

I just switched to default, deleted the SEF URL

I see no com_Simcontest URL in the URL manager. Where are the links for those pages? on which page can I find a link to that component?

now the page directs to the forum

As there is no link to Simcontests pages, I'm not sure which URL exactly you are trying but in any case this will trigger a 404. As "Try to autoredirect 404" is enabled, I assume the closest URL sh404SEF can find is the forum page. I strongly advise against enabling "Try to autoredirect 404" unless there's a specific use case for it where it can work fine. 

Best regards

Yannick Gaultier

weeblr.com / @weeblr

 

 
Monday, 07 September 2020 18:00 UTC
Rollmodl

It doesn't seem the Simcontest urls are showing in the URL manager. Any reason for that? Here is a link to the contest page https://xxxx.com/component/com_simcontests/Itemid,3780/view,frontpage/

 
Monday, 07 September 2020 20:03 UTC
Rollmodl

To follow up on my last response. The Joomla router seems to be the only option to achieve a SEF URL with SIMContest component. When I switched to the Joomla router the URL now reads https://xxxx.com/contests instead of https://xxxx.com/component/com_simcontests/Itemid,3780/view,frontpage/. Is there a reason why I shouldn't use the Joomla router for this component?

 
Tuesday, 08 September 2020 07:32 UTC
wb_weeblr

Hi

It doesn't seem the Simcontest urls are showing in the URL manager

But where can a link be found on your site? URLs can only be recorded and then found in the URL manager if you have a link to one of this component page somewhere on a page.

Is there a reason why I shouldn't use the Joomla router for this component?

Joomla router should not be used as long as there is no other solution. It does not properly handle 404 URLs (it accepts as valid URLs that really are 404) and it generally will allow duplicate content.

/component/com_simcontests/Itemid,3780/view,frontpage/

I see. This kind of URLs happens when a component does not have any router - it's missing a router.php file and relies entirely on Joomla router to build URLs. It's very rare these days, because it forces users to create menu items for each of that component pages to have a proper URL so all proper components come with a router.php file.

What should work for this type of component is to, under By component:

- Select "Use default handler" for SimContests in 1st column

- Select "Use router.php with menu item" in 2nd column

Now this can only work if there are actual links to that component pages somewhere on your site. If not, then "Use Joomla router" is indeed the only option.

Best regards

Yannick Gaultier

weeblr.com / @weeblr

 

 
Friday, 09 October 2020 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.