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
Helpdesk is open from Monday through Friday CET
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
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
Username: xxxx
Password: xxxx
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
The component for that URL is SIMContests
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
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?
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
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/
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?
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