Page 1 of 1

Bug? SEO url NOT working when using mutliple hyphens in last category!

Posted: Tue Apr 03, 2018 9:39 pm
by kec
Hi,

After building several OC 2.3.0.2. shops (standard theme) I noticed that there seems a big bug inside these version?

When creating a seo url like this: www.domain.com/my-product/product-with-2-sides

will end up in a redirect to: www.domain.com

But when changing this to: www.domain.com/my-product/product-with-2_sides

it's working.

The bug seems that when using 2 (or more) hyphens in one last subcategory SEO url field you get a redirect. Changing the last hyphen into an underscore (or space) will end up in a working SEO url again.

This bug is present on at least 4 OC shops (2.3.0.2 - standard) that we build.

How to solve this?

Kind regards,
Kec

Re: Bug? SEO url NOT working when using mutliple hyphens in last category!

Posted: Tue Apr 03, 2018 10:09 pm
by straightlight
Assuming you are using the SEO URLs from the core, I would rather suggest the use of an extension from the Marketplace to ease the manipulation of SEO URLs from your store(s).

Re: Bug? SEO url NOT working when using mutliple hyphens in last category!

Posted: Tue Apr 03, 2018 10:24 pm
by kec
Hi,

Thank you for your answer. I will look at it. But changing hundreds and hundreds of seo urls by hand is out of the question. It would be better if there is any solution for this behaviour.

Kind regards,

Kec

Re: Bug? SEO url NOT working when using mutliple hyphens in last category!

Posted: Tue Apr 03, 2018 10:26 pm
by straightlight
Which is why, an extension may provide guidance on this rather than having to change SEO URLs manually for thousands of data which, understandably, would be inhuman to handle.

Re: Bug? SEO url NOT working when using mutliple hyphens in last category!

Posted: Tue Apr 03, 2018 10:58 pm
by kec
https://www.opencart.com/index.php?rout ... date_added

This one I will give it a try after our client gives us their approval.

If anyone else knows a solution (may be via htaccess) then please share. :)

Re: Bug? SEO url NOT working when using mutliple hyphens in last category!

Posted: Tue Apr 03, 2018 11:20 pm
by thekrotek
I'm afraid, you have a bug somewhere in your store and it's not related to OpenCart. Just changed SEO URL for one of my products on OC 2.3 test installation to "product-with-2-sides" and it worked like a charm.

Re: Bug? SEO url NOT working when using mutliple hyphens in last category!

Posted: Wed Apr 04, 2018 1:42 am
by kec
Small update:

I have this error on 4 shops 2.3.0.2. On a 2.1 shop there is no problem.

What I did was disable all vqmods but the error still persists.

Remarkable: When I change the url from

www.domain.com/category/sub-category/this-is-a-product

into:

www.domain.com/category/sub-category/This-is-a-product (so with a capitol)

it will work too.

When I change it back to a normal letter it's wrong again.

Re: Bug? SEO url NOT working when using mutliple hyphens in last category!

Posted: Wed Apr 04, 2018 2:23 am
by thekrotek
Like I said before, it works perfectly on my OC 2.3 test installation with your own example. Problem IS NOT with OpenCart and actually can't be, because in OC SEF URLs conversion is pretty straight forward.

Re: Bug? SEO url NOT working when using mutliple hyphens in last category!

Posted: Wed Apr 04, 2018 3:18 am
by kec
Thank you.

Edited, disabled and cleared all mods but same issue. Leaving no other choise then to edit all infected categories.

Thnx for responding all. :)

Re: Bug? SEO url NOT working when using mutliple hyphens in last category!

Posted: Wed Apr 04, 2018 5:38 pm
by paulfeakins
kec wrote:
Wed Apr 04, 2018 3:18 am
Edited, disabled and cleared all mods but same issue. Leaving no other choise then to edit all infected categories.
Or you could find a developer from the Commercial Support Forum to fix the actual issue :crazy:

Re: Bug? SEO url NOT working when using mutliple hyphens in last category!

Posted: Thu Apr 05, 2018 10:15 pm
by kec
It seems that we found the error. The errors were RewriteRule ^ in the htaccess that were redirected to the mainpage. Problem solved.....you think.

After we deleted those lines still have the same problems. Is there any way that we can 'refresh' the htaccess??

Re: Bug? SEO url NOT working when using mutliple hyphens in last category!

Posted: Thu Apr 05, 2018 10:19 pm
by straightlight
The .htaccess file should be refreshed instantaneously once the date file being modified. If you go back to the file, ensure the content you have re-uploaded uses UTF-8 without BOM. It if is without BOM and that you are absolutely sure that the file is not corrupted, then you might be looking at a server-delayed cache period which, normally, doesn't happen on the .htaccess file.

Re: Bug? SEO url NOT working when using mutliple hyphens in last category!

Posted: Thu Apr 05, 2018 11:01 pm
by kec
Thank you for your respond. At the end we decided to change the SEO name of the affected urls from a - to a _ and they work now.
I will check after installing mods on every change what could cause this strange behaviour.

Thank you all for taking the time to respond and give answers. This is highly appreciated.