getgrav / grav

Modern, Crazy Fast, Ridiculously Easy and Amazingly Powerful Flat-File CMS powered by PHP, Markdown, Twig, and Symfony
https://getgrav.org
MIT License
14.5k stars 1.4k forks source link

Invalid links to media when placed in Modular Pages #3278

Open pikooh opened 3 years ago

pikooh commented 3 years ago

Hi!

I'm trying to link to an uploaded PDF file in a module (I want a long modular page with all "pages" in one) - I followed the instructions pretty close, I think :) The website itself works otherwise.

Steps I did:

What I expected:

What happened:

Screenshots: Left: Added the files in a page; Right: the files are linked correctly when accessing the page image

Left: Added the files in a module; Right: the files are linked incorrectly when accessing the modular page image (the displayed image is from the default text template, which displays the first image next/below the content - this works, funnily enough)

I'm using the default Quark Theme 2.0.3 on Grav 1.7.7.

Folder structure when I access the server with FTP: image

Is there anything I'm doing wrong?

mahagr commented 3 years ago

I'm not able to reproduce the issue with Quark theme using the latest version of Grav.

pikooh commented 3 years ago

Thanks for checking it out! Any idea what else I could do to either make it reproducible or fix it?

One thing I didn't mention in the bug description: I'm using the numeric prefix ordering for the modular pages, but also without that it doesn't fix the link. image

To be clear: the full link is https://xxxxx.xx/user/pages/01.home/07._test-modular/ausser_kontrolle.pdf - but it's displayed as https://_test-modular/ausser_kontrolle.pdf For now I am including the absolute link, which isn't a great solution because the location might change.

mahagr commented 3 years ago

Yeah, I was using modular home page, which had a numeric prefix in it, meaning that the path doesn't match the route.