SEF Weirdness
11 years 2 months ago - 11 years 2 months ago #210120
by iedwards
SEF Weirdness was created by iedwards
-- url of the page with the problem -- :
www.artistpapers.co.uk/shop/drawing-and-...paper/bristol-boards
-- HikaShop version -- : 2.5.0
-- Joomla version -- : 3.4.3
I've got a SEF related issue which is really odd.
If you go to this page..
www.artistpapers.co.uk/shop/drawing-and-...paper/bristol-boards
... and click on the product "Strathmore 200 Series Bristol" you get this SEF URL, which looks correct ...
www.artistpapers.co.uk/shop/drawing-and-...e-200-series-bristol
The trouble is it displays a similar but wrong product "Strathmore 200 Series Sequential Art Bristol" from a different category
Further investigation reveals that if a product on the bristol boards page has a similar product in the sequential art category the wrong product is displayed, so 200 series, 300 series and 500 series Bristol display the wrong, Sequential Art, product even though the link looks correct, but for the other products (400 Series and Windpower Bristol) the correct product is displayed.
With SEF disabled this all works correctly.
I have SH404SEF installed but get the same result with this switched off.
I also have some .httaccess redirects from an old site but I don't think it's a redirect as the URL would change.
Any thoughts on what could be going on?
Thanks,
Ian
-- HikaShop version -- : 2.5.0
-- Joomla version -- : 3.4.3
I've got a SEF related issue which is really odd.
If you go to this page..
www.artistpapers.co.uk/shop/drawing-and-...paper/bristol-boards
... and click on the product "Strathmore 200 Series Bristol" you get this SEF URL, which looks correct ...
www.artistpapers.co.uk/shop/drawing-and-...e-200-series-bristol
The trouble is it displays a similar but wrong product "Strathmore 200 Series Sequential Art Bristol" from a different category
Further investigation reveals that if a product on the bristol boards page has a similar product in the sequential art category the wrong product is displayed, so 200 series, 300 series and 500 series Bristol display the wrong, Sequential Art, product even though the link looks correct, but for the other products (400 Series and Windpower Bristol) the correct product is displayed.
With SEF disabled this all works correctly.
I have SH404SEF installed but get the same result with this switched off.
I also have some .httaccess redirects from an old site but I don't think it's a redirect as the URL would change.
Any thoughts on what could be going on?
Thanks,
Ian
Last edit: 11 years 2 months ago by iedwards. Reason: correct typos
Please Log in or Create an account to join the conversation.
11 years 2 months ago #210122
by lousyfool
Need help with customisations of layouts, style or other site development? PM me!
(Don't forget to turn on "E-mail notification of new messages" )
Replied by lousyfool on topic SEF Weirdness
Looks like you should set "Remove products and categories id in URLs" in the HikaShop configuration to "No" (
www.hikashop.com/support/support/documen...ig.html#features_sef
- outdated image but correct text), or enter truly unique aliases for categories and products.
Need help with customisations of layouts, style or other site development? PM me!
(Don't forget to turn on "E-mail notification of new messages" )
Please Log in or Create an account to join the conversation.
11 years 2 months ago #210123
by iedwards
Replied by iedwards on topic SEF Weirdness
Thanks for your input lousyfool.
Yes including the category id's does work, but I don't want those id's in the URL, I didn't have them in the old site I'm replacing and don't want them in this one.
The issue seems to be that hikashop sef can't tell the difference between these two aliases ...
strathmore-300-series-sequential-art-bristol
and
strathmore-300-series-bristol
Ian
Yes including the category id's does work, but I don't want those id's in the URL, I didn't have them in the old site I'm replacing and don't want them in this one.
The issue seems to be that hikashop sef can't tell the difference between these two aliases ...
strathmore-300-series-sequential-art-bristol
and
strathmore-300-series-bristol
Ian
Please Log in or Create an account to join the conversation.
11 years 2 months ago #210183
by iedwards
Replied by iedwards on topic SEF Weirdness
Would appreciate some input from Nicolas and the team on this. If my SEF works for most products except where the aliases are similar there must be a bug in router.php I would have thought? Trying to get my head around that. At the moment turning on SEF has broken some of my products.
It's so important to have human readable URL's
Another frustration to add to a difficult experience with Hikashop. So many snags.
Ian
It's so important to have human readable URL's
Another frustration to add to a difficult experience with Hikashop. So many snags.
Ian
Please Log in or Create an account to join the conversation.
11 years 2 months ago #210256
by nicolas
Replied by nicolas on topic SEF Weirdness
Hi,
Do you have the alias entered for each product ?
As lousyfool said, if you have a unique alias for each product, the system will match the correct product.
However, with the current version, that's only the case if the "alias auto fill" setting is activated.
Next version of HikaShop will have that even when it's off.
So that's probably your issue here.
Here is the router.php which will be in next version of HikaShop and which supports that matching even with the "alias auto fill" setting turned off, so you can replace it in the folder components/com_hikashop/
Do you have the alias entered for each product ?
As lousyfool said, if you have a unique alias for each product, the system will match the correct product.
However, with the current version, that's only the case if the "alias auto fill" setting is activated.
Next version of HikaShop will have that even when it's off.
So that's probably your issue here.
Here is the router.php which will be in next version of HikaShop and which supports that matching even with the "alias auto fill" setting turned off, so you can replace it in the folder components/com_hikashop/
This attachment is hidden for guests.
Please log in or register to see it.
Please log in or register to see it.
The following user(s) said Thank You: iedwards
Please Log in or Create an account to join the conversation.
11 years 2 months ago #210260
by iedwards
Replied by iedwards on topic SEF Weirdness
Thank you Nicolas!
That has fixed the problem! Yes I did have aliases set for every product but there seemed no logic as to why most products worked correctly while these few redirected to the wrong product. To add to the frustration these were our best selling products and customer's couldn't access them.
Anyway, once more your support saves the day.
Thanks again.
Ian
That has fixed the problem! Yes I did have aliases set for every product but there seemed no logic as to why most products worked correctly while these few redirected to the wrong product. To add to the frustration these were our best selling products and customer's couldn't access them.
Anyway, once more your support saves the day.
Thanks again.
Ian
Please Log in or Create an account to join the conversation.
11 years 3 weeks ago #214151
by iedwards
Replied by iedwards on topic SEF Weirdness
Hi Nicolas,
I have discovered that this new router.php breaks access to my affiliate control panel.
I have configured access to the hikashop user panel under a menu item called "Account". With the old router.php clicking on the "Access to the affiliate program" button brings up the affiliate settings page wiith a url of account/affiliate .. so far so good.
If I put in the new router.php the weirdness I reported earlier is fixed but I now get a 403 error trying to access the affiliate panel.
Ian
I have discovered that this new router.php breaks access to my affiliate control panel.
I have configured access to the hikashop user panel under a menu item called "Account". With the old router.php clicking on the "Access to the affiliate program" button brings up the affiliate settings page wiith a url of account/affiliate .. so far so good.
If I put in the new router.php the weirdness I reported earlier is fixed but I now get a 403 error trying to access the affiliate panel.
Ian
Please Log in or Create an account to join the conversation.
11 years 3 weeks ago #214168
by nicolas
Replied by nicolas on topic SEF Weirdness
Hi,
Are the URLs different between one router and the other ?
What are the URLs generated ?
What is the URL of the page from which you're accessing that 403 URL ?
Are the URLs different between one router and the other ?
What are the URLs generated ?
What is the URL of the page from which you're accessing that 403 URL ?
Please Log in or Create an account to join the conversation.
11 years 3 weeks ago #214204
by iedwards
Replied by iedwards on topic SEF Weirdness
Hi Nicolas,
I am accessing from the "Account" page URL www.artistpapers.co.uk/account
With both routers the URL for the "Access to the Affiliate program" option is www.artistpapers.co.uk/account/affiliate which is what I would expect.
With the original router this link works, with the modified router I get a 403 error.
Thanks,
I am accessing from the "Account" page URL www.artistpapers.co.uk/account
With both routers the URL for the "Access to the Affiliate program" option is www.artistpapers.co.uk/account/affiliate which is what I would expect.
With the original router this link works, with the modified router I get a 403 error.
Thanks,
Please Log in or Create an account to join the conversation.
11 years 3 weeks ago #214237
by nicolas
Replied by nicolas on topic SEF Weirdness
Hi,
Ok, I see the problem.
Change the code:
to:
in the components/com_hikashop/router.php and that should fix the problem.
Ok, I see the problem.
Change the code:
Code:
if($i == 1) $vars['ctrl'] = $name;
elseif($i == 2) $vars['task'] = $name;
Code:
if($i == 1){
$vars['ctrl'] = $name;
$vars['task'] = '';
}elseif($i == 2)
$vars['task'] = $name;
The following user(s) said Thank You: iedwards
Please Log in or Create an account to join the conversation.
11 years 3 weeks ago #214300
by iedwards
Replied by iedwards on topic SEF Weirdness
Brilliant, thank you Nicolas that seems to have fixed it.
That code occurs in two places and I have replaced both occurrences, I assume that's correct.
Thanks again,
Ian
That code occurs in two places and I have replaced both occurrences, I assume that's correct.
Thanks again,
Ian
Please Log in or Create an account to join the conversation.
Time to create page: 0.232 seconds