• Home
  • Get help
  • Ask a question
Last post 14 hours 33 min ago
Posts last week 141
Average response time last week 4 hours 42 min
All time posts 67805
All time tickets 10478
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.

#5893 – after enable sh404 there some url are given error bat url

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, 11 July 2019 10:31 UTC
simonelli
 Hello sir,

i recently buy your extensions and try to setup in our site. in our site we use one or more custom component and also use falang. so now after enable sh404 many link of site are not work and given error. so would you please look at that issue and guide us how to solve this problem and whole site run perfectly after enable sh404 .

Please reply me asap.

Thanks.
Thursday, 11 July 2019 11:24 UTC
wb_weeblr
Hi

That's quite possible as it is one of sh404SEF to creates links that are different from Joomla native SEF system. I cannot comment on your custom components really: do they have router.php files to create SEF URLs?

Anyway, the recommended setttings to get URLs as close as possible in cases such as yours are:

- under the By component tab of configuration, select:

1st option: "Use default handler"
2nd option: "Use router.php with menu item"

After making those changes, Purge URLs using the Purge button in the SEF URLs manager and then:
- Purge ALL Joomla cache
- Purge browser cache
- Go to your home page and then navigate through pages to check if links are the same or not.

Very important: sh404SEF can only create links if your component follow the Joomla API: ie they call the JRoute::_() function on all links they create.

Note: As specified in the requirements, we only support Joomla native multilingual system. That said, we also have plenty of users with Falang and it's been several years since we have heard of any issue with it.

Best regards
 
Thursday, 11 July 2019 13:54 UTC
simonelli
Hello sir,

i follow step those you mention in above reply.

1st option: "Use default handler"
2nd option: "Use router.php with menu item"

after this clear cache, purge url and check but issue are remain same. I check all url are with JRoute::(). Well if we disable the sh404 and then check all link those are work correct so i doubt there is some problem in configration with sh404 component due to this happen.

Please can you help us to resolve this issue. let me know if you need admin access of our site.

Thanks.
Thursday, 11 July 2019 14:24 UTC
wb_weeblr
Hi

1 -
Well if we disable the sh404 and then check all link those are work correct so i doubt there is some problem in configration with sh404 component due to this happen
Please provide at least one sample of code in your component(s) where the JRoute::_() is used, showing what non-sef URL you pass to it.

2 -
let me know if you need admin access of our site.
I may need that later but currently I need to determine what exactly is causing this.

3 - Do the links on the site work normally? is it only the links in your component that break?

4 - Please provide only one example of:

- a page where I can find such a broken link. for instance, the /en-us/user_profile/4295.html: where on your site do you have a link to this page?

If I need to log-in to see this link, then yes please provide superadmin credentials.

Best regards
 
Tuesday, 16 July 2019 09:15 UTC
simonelli
Hello sir,

1) here is example of route url link of our component.

JRoute::_('index.php?option=com_weipharmamedic&view=user_profile&profile=2632&Itemid='.$profileItemid);

3 - Do the links on the site work normally? is it only the links in your component that break?

>> yes problem with our component, article link we make that work fine.

4 - Please provide only one example of:

open our site link and click on "pharmamedic italic" (refer attached image) text and it's come error if sh404 is enable. for now we disable sh404 component. I provide you login access of super user so you able to login in backend and enable sh404 and then check those same link it's given error.

login: xxxx
pass: xxxx

https://xxxx.com (frontend)

https://xxxx.com/administrator

Thanks.
Tuesday, 16 July 2019 09:24 UTC
wb_weeblr
Hi

This link works perfectly fine after enabling sh404SEF:
[xxxx]

I suspect you are trying to load those pages before they have been displayed. If you want to go to, for instance, https://xxxx.com/fr/user-profile/user_profile/2632.html, you have first to display a page where there's a link to https://xxxx.com/fr/user-profile/user_profile/2632.html.
When a page with the link to that user profile is displayed, that's whent the URL is created and recorded in the database:

[xxxx]

When the URL is in the database, you can start loading it in your browser.

Best regards

 
Tuesday, 16 July 2019 10:43 UTC
simonelli
Hi,

i think you checking after login those page, will you please check without login and click on same link please.

Thanks.
Tuesday, 16 July 2019 11:14 UTC
wb_weeblr
Hi

You are right. So the problem is that if I visit that page while not logged in , the link is a different URL:

https://xxxx.com/en/user-profile/user_profile/2632.html

That's not a problem in itself: the problem is that this URL is not stored in sh404SEF database, which means that either:

- you do not call JRoute:_() for user not logged in
- OR you cache the content somehow and we're still seeing the old page, with the old link

I cleared all Joomla cache but that did not change anything.

The other strange thing happening is that:

- when NOT logged in, visiting https://xxxx.com/?lang=en displays the "home" page and the Pharmamedi Italia link is:
index.php?option=com_weipharmamedic&view=user_profile&profile=2632&Itemid=266&lang=en
- when logged in, visiting the same URL I am redirected to index.php?option=com_weipharmamedic&view=user_profile&profile=2632&Itemid=136&lang=en

That should not matter too much I think, Itemid=136 is the home page while Itemid=266 is the user profile menu item. One way or the other, the problem is that the second URL is not added to the sh404SEF URL database. Again, that means JRoute is not called on it somehow, or your router.php file works differently when user is logged in I think.

Best regards


 
Wednesday, 17 July 2019 05:49 UTC
simonelli
Hello sir,

yes you are right for login and without login both have different page, so as per item id are different for link. in case without login we use vue.js so in script using JRoute we store url in javascript variable and use it using vue.js look at this example.

$document->addScriptOptions('profileUrl', Uri::root() . ltrim(Route::_('index.php?option=com_weipharmamedic&view=user_profile&profile=0000&Itemid='.$profileItemid), '/'));

and this profileUrl we use in html page like this

<a :href="getLink(profileUrl, post.s_profile_id)">{{ post.s_username }}</a>

so will you please guide me in this way when we use link those JRoute entry not conduct in sh404 database?

Please check and explain me what change we done so it's work with sh404.

Thanks.
Wednesday, 17 July 2019 07:54 UTC
wb_weeblr
Hi

Please check and explain me what change we done so it's work with sh404.
Unfortunately we do not provide support for custom programming but the general rule is simple: URLs are recorded in the database when JRoute:_() is used.

If you create a link in javascript only , the URL is not created and you get a 404. The fix is simple: create all URLs you need on the server and include them as options as you do for 'profileUrl'. Do not create any URL in javascript.

Best regards
 
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.