Hi Guys, I'm using Commerce Manager Version: 7.9 (build: 0) and CMS 7.9.1
We use the name of the catalog in the URL when displaying products to customers. We have recently changed the name (via commerce manager) of a catalog (which worked fine) however this didn't get reflected in the URL. We have also tried changing the catalog name with the Commerce plugin within CMS, this also changed the name but was not reflected in the URL. Via CMS if you take a look at "All Properties" for the catalog, I can see that the "Name" is correct, however the "Name in Url" is incorrect. If I update the "Name in Url" and publish, this saves and publishes ok, however the change is undone. Is this a known issue/bug? Can you please check if you can reproduce this.
As this doesn't get updated and published via the GUI what is the best way to update this? I'm thinking hacking the DB...
Performing a text search in the CM and CMS DB's I can see I need to update CM - "UriSegment" in dbo.CatalogLanguage and CMS - "String07" in dbo.tblBigTable
After updating these to the desired value, rebuilding the search index, and restarting IIS the product URLs all seem correct and the site works as expected, so I think this is all ok. Do you think this will be ok?
This is the expected behavior, and it's consistent with what we do in CMS. The name in url (UrlSegment/RouteSegment) is generately only once when you create the content, after that you will need to explicitly update it.
P/S: You only need to build the search index, I don't think restarting IIS is required.
Ok thanks, but if click the "Change" link and update the "Name in URL" and click publish, how come my change is undone? Is this expected or is this a bug?
You mean if you change a name in url from "product" to "product-edited", it is save but when publish it, it got published but name in url is changed back to "product"?
Then it's clearly wrong - but it should have something to do with your site. I'm quite sure that this case is verified by our QA.
If the data is updated in database but not in the Catalog UI then it might be a cache problem, but I cant say anything for sure...
Log into CMS, from the header select Commerce -> Catalog. From the Catalog Root select the catalog you want to update, then select "All Properties". From here you can change the "Name in URL" for the catalog, click publish but the changes are reverted.
So the reversion only happens with catalog? And you see data is updated correctly in the database?
Yeah I've only notice this happens when editing the catalog, I haven't actually checked the database because I'm not 100% sure where to check in the database... However to get around this issue I have manually gone into the tables I mentioned in the original post and updated the columns.
It should be in Commerce database, table CatalogLanguage, check there to see if your data is updated.
Did it show correctly value if you clear browser cache? IIS reset?
I've checked the database and the UriSegment isn't updated, when auto saved, when published, clearing browser cache, or resetting IIS. The only way I can change this is if I change it directly in the database. Hence why I think there is a bug here.
Being on 7.9 myself and update urlsegment/name in url works flawlessly for me.
Is there any custom validation code in your site?
Not that I know of, if I get some time I'll try this on a clean 7.9, but I guess for the time being I have a work around. Thanks for your help and investigation.