Developer forum

Forum » Dynamicweb 10 » Url is prettified from ToggleFavorite.cshtml

Url is prettified from ToggleFavorite.cshtml

Justin Sjouw Dynamicweb Employee
Justin Sjouw
Reply

Hi, 

I'm having some trouble with favorites. In ToggleFavorite.cshtml, the url is built up, and I can see that this result in :  /Default.aspx?ID=1250&ProductID=ART02520&VariantId=&ProductVariantId=&ShowButtonText=False&FavoriteListId=221

When I click the toggle button, the url is changed to https://testing.ddranken.nl/swift-tools/services/favorites-service/gulpener-pilsner-50l?VariantId=&ProductVariantId=&ShowButtonText=False&FavoriteListId=0&LayoutTemplate=Swift_PageClean.cshtml

Which will then result in a 404.

I'm not sure if I need to change a setting to stop this url from being rewritten?

Thanks,

Justin


Replies

 
Justin Sjouw Dynamicweb Employee
Justin Sjouw
Reply

Found that this is the cause: 

I think at some point I checked this, because I noticed some URL's were indexed by google this way. Maybe a warning that this will break things in Swift might be an idea, or an option to override this setting for certain pages, so that I can have the service pages work despite of this setting.

Cheers,

Justin

 
Justin Sjouw Dynamicweb Employee
Justin Sjouw
Reply

I thought it was solved but it is not allas ;-)

When I directly request the URL in my browser, the url is not rewritten: https://testing.ddranken.nl/Default.aspx?ID=1250&ProductID=ART02520&VariantId=&ProductVariantId=&ShowButtonText=False&FavoriteListId=221

But when the relative URL is requested via javascript during the onclick of the favorite button, it is stil rewritten and i get:

I have both these options unchecked:

Not sure if the uncheck of the Internal Url's should be even necessary.

Any ideas?

Thanks,

Justin

 

You must be logged in to post in the forum