Open robbieaverill opened 6 years ago
So we might need to rewrite relative URLs to be absolute during the PDF generation process
HTTP::absoluteURLs()
to the rescue :)
I've moved this to the pdfexport repository, assuming it affects CWP 2.x as well
Migrated from GitLab
cc @PsukheDelos
This can be replicated on a local dev environment with a base install of the CWP 1.7.0 Recipe with PDF Exporting enabled.
External links, Email links, etc. appear to work as expected. However, links that were created via "Link to: A Page" and "Link to: Download a File".
"Link to: Download a File"
Create a page and add a Link to download a file. If you inspect any of that element on the page, you'll see the link appears as: href="/assets/Test.png".
"Link to: A Page"
On this same page, Add a Link to a page. A link to a contact us page, for example, would look like: href="/contact-us/"
Export the PDF and open it in your System Viewer. (Viewing inside Chrome's built in PDF Viewer can mask the issue). Click on any of the links and it will attempt to serve the link from the base url of "file:///" instead of the expected "http://cwp.local/"