Developer forum

Forum » CMS - Standard features » Shortcut to PDF results in 404-error

Shortcut to PDF results in 404-error

Ton Martens
Reply

Hi,

Customer on 8.7.1.3

Creating a shortcut to a file (PDF) instead of a page, results in an error 404 on the front-end when visiting the page with the shortcut. The error occurs when the original page is at least one level below the root of pages. This is because the Path of pages is included in the URL, where it should not. Please see screenshot which illustrates this.

The page with shortcut is below "Vestigingen / Alkmaar". The shortcut should redirect to the PDF without "..../Vestigingen/Alkmaar/....." in the URL.

A workaround can be applied by changing properties of the pages "Vestigingen" and "Alkmaar": 

Use in URL : Do not include URL in subpage URLs, checked

This prevents the 'path' to be included with the URL to the file. Obviously, "Do not include URL in subpage URLs" is not always a desired situation.

Maybe we overlook something, but otherwise I think this is a bug. 

 

Please advise

Thanks,

Ton

DW-Shortcut-to-file-fails.png

Replies

 
Nicolai Høeg Pedersen
Reply

Are you sure you did not disable base href in MC? See "Do not add base href" setting under Designs & Layout

http://manual.dynamicweb-cms.com/Default.aspx?ID=6701

 
Ton Martens
Reply

will check. Thanks.

 
Ton Martens
Reply

It's not checked. It shouldn't be checked I think?

 
Nicolai Høeg Pedersen
Reply

It should not.

And oh, just saw that it was a shortcut on the page (you had written it :-)).

Try adding a / in front of the path.

 
Ton Martens
Reply

Thanks, but already tried that. It doesn't work.

 
Nicolai Høeg Pedersen
Reply

Check your navigation xslt if it does something it should not. If the path starts with "/Files" instead of "Files" it will work.

If that does not get it working, you can create a case and we will have a look.

 
Ton Martens
Reply

The XSLT results in a link to Default.aspx?ID=.....

This is correct, since it is the page which contains the redirect to the pdf. I doubt if the XSLT could fix (or break) this, since the redirect happens at the moment the page is vitisited, which is a responsibility of DW, I think.

I logged the network access while clicking that link.

The request gets at Default.aspx?ID=.....

Which does a 301 redirect to the pdf (with the wrong path, including the names of the parent pages)

Which results in a 404

 

This shouldn't be hard to reproduce.

 
Nicolai Høeg Pedersen
Reply

I've sent it to QA and we will reproduce and possible fix.

Thanks, Nicolai

 
Oleg Rodionov
Reply

Hi Ton,

I've tested the issue on solutions based on last 88 version and have Files/Files or Files/Filer file structure of File Manager, 'Do not include URL in subpage URLs' and 'Do not add base href' were disabled. I was not able to reproduce the issue. Please, find the prooof here  - http://screencast.com/t/rKyjCMn7 . Probably, it's a specific issue of your solution (should be submitted to DW support service for extra research).  

BR, Oleg QA

 
Ton Martens
Reply

Hi Oleg,

Thanks for making the effort to reproduce this. Our customer is on 8.7.1.3. Since you reproduced this on a different, newer version, I don't know if this is meaningful for our problem.

Ton

 

You must be logged in to post in the forum