Developer forum

Forum » Dynamicweb 10 » Use customized URLs returns Default.aspx?ID={page} when consuming DWAPI

Use customized URLs returns Default.aspx?ID={page} when consuming DWAPI

Joakim Sjöbäck
Reply

Im running swift 1.25 on dw 10.0.26 and ive enabled Use customized URLs but dwapi/frontend/navigations/{id} returns link with format Default.aspx?ID={page}.


Replies

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

Hi Joakim

Seems to be a cache related problem for URLs. If you preview the page in regular frontend and then tries the api again, it will get the right URL.

I will create a bug to fix the caching issue.

Thanks for reporting.

 
Joakim Sjöbäck
Reply

Hi Nicolai,

 

I've tried your solution, i.e preview the page in frontend and the api still returns the same. 

Is there another way to clear the cache?

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

Hi Joakim

Is it public so I can see it?

You can try to reset the page cache though I do not think that is the issue:

And you can rebuild the URL index using:

?rebuildurlindex=true on the solution.

This is an example from our demo: https://dw10swift.public9.dynamicweb.dk/dwapi/frontend/navigations/8

 
Joakim Sjöbäck
Reply

Sorry its not public, running locally on my PC.

I noticed your demo is running swift 1.17 and dw 10.0.25, could this be an issue related to 10.0.26 or swift 1.25?

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

It is not Swift related. Locally I run the latest and greatest, and that also works....

What happens if you do access your solution with ?showurlindex=true, i.e. https://dw10swift.public9.dynamicweb.dk/?showurlindex=true

You will see the entire url index of the solution.

 
Joakim Sjöbäck
Reply

Ultimately I've resorted to using a new fresh database(Swift_20230629_Database) and the correct format for link gets rendered.

However i noticed when i deleted either of the websites(marked in red), and rebuild solution, the link format jumps back to "Default.aspx?ID={page}"

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

What happens if you do access your solution with ?showurlindex=true, i.e. https://dw10swift.public9.dynamicweb.dk/?showurlindex=true

 
Joakim Sjöbäck
Reply

Before deleting site it correctly shows the urls.

After deleting im only getting the following and no urls: Index name: Area0

 

You must be logged in to post in the forum