Developer forum

Forum » Dynamicweb 9.0 Upgrade issues » Dashes missing in product url after upgrade

Dashes missing in product url after upgrade

Martin Møller Christensen
Reply

Hi,

I have upgraded to DW 9.6.3 and somehow the dashes are missing in product urls.

See example:

Before

After: https://www.website.dk/shop/27x27cmgrillpande-pro-iq/27-x-27-cm-2

Before: https://www.website.dk/shop/27x27-cm-grillpande-pro-iq/27-x-27-cm-2

Any ideas as to why this is happening?

 


Replies

 
Martin Møller Christensen
Reply

Update:

It seems to work if I remove the space from the name, save, and then re-add the space and save.

Unfortunately I can't do this for all the products. There are a lot! Is there some way I can notch it?

 
Nicolai Pedersen
Reply

Hi Martin

I looked at the solution and can see the reason is that you have 2 types of spaces in your product names. See the dump #1.

So you have regular spaces and you have non-breaking spaces. Probably coming from an integration.

We did update the URL name sanitizer this summer, so that might be the reason you see this issue.

To fix a quick solution is to run a database replace on that character - something like this:

UPDATE EcomProducts SET ProductName = REPLACE(ProductName, NCHAR(0x00A0), ' ')

I will also make a fix for url sanitizer to handle all types of whitespace.

Sorry about the inconvenience, Nicolai

Capture.PNG
 
Martin Møller Christensen
Reply

Great Nicolai :-)

When can I expect this fix to arrive?

The problem with the solution that you suggest, is that our import removes the products and re-adds them. Whichs means I would have to run this SQL query everyday.

 
Nicolai Pedersen
Reply

Hi Martin

You can take the latest Dynamicweb from Nuget: https://www.nuget.org/packages/Dynamicweb/9.6.23

BR Nicolai

 

You must be logged in to post in the forum