Can't update displayed route after it is created

Feb 21, 2012 at 9:35 PM
Edited Feb 21, 2012 at 9:35 PM

There seems to be an issue updating routes after they are initially created. It doesn't make any difference if the item is versionable or not. I can still access the item using the new route (actually all of them continue to work) but the one that is generated in ItemDisplayLink and ItemDisplayUrl is always an old one.

What seems to be happening is that instead of updating the AutoroutePartRecord and AliasRecord, instead a new one is created each time, and the modules are not consistent in which one they read when generating and displaying the routes. The correct 'permalink' value is displayed in the TextBox when I edit the item, but after I save/publish and go back to the Content admin page and look at the item's View link, the url hasn't changed, also when I use Url.ItemDisplayUrl or Html.ItemDisplayLink it uses the wrong one as well. Restarting the site in IIS (to flush any memory caches) also does not fix it.

Looking inside the database it is even less clear to me what is going on because the values of CustomPattern remain the original and don't update, while (the most recent) DisplayAlias looks correct. Looking over to the AliasRecord table reveals that of the 3 records that it's created so far it is actually the second one that it's using to generate the url right now?! Not the first, not the last.

Help? :)

Jun 6, 2012 at 9:38 AM
Edited Jun 6, 2012 at 9:39 AM

I ran into this issue too. In our custom module I made some MVC routes. If the routing value I created exists in those tables the Controller in the module won't get the control. Unfortunately I cannot solve the issue from UI I have to get into the database and remove the redundant records manually.

It isn't so friendly is it?

Each publishing of a content creates new records in those tables even if nothing has been changed.

I don't think it's a function related to versioning because the old value is still accessible and there1s no difference between the records.