Skip to content

[Bug]: URL to PDF in media folder #5943

@katagen

Description

@katagen

What is the bug? (in English)

I have a projet on Lizmap 3.6. On a layer, I have an attribut for a link to a PDF, which is like that:
<a href="media/pdf/Fiches_CNP/CNP_NP01_Etang Long.pdf" target="_blank">Fiche CNP</a>

Now, I'm doing a new project on Lizmap 3.8, but to display the same PDF, I have to have in the attribut table this:
<a href="media/getMedia?repository=pabiodivsion&project=LIZ_Plan_action_biodiversite_Sion_region&path=media/pdf/Fiches_CNP/CNP_NP01_Etang Long.pdf" target="_blank">Fiche CNP</a>

Is it normal? Why Lizmap can't "build" the correct URL with only media/pdf/Fiches_CNP/CNP_NP01_Etang Long.pdf

Steps to reproduce the issue

Use a 3.6 lizmap layer with an attribute url_to_pdf, like <a href="media/pdf/Fiches_CNP/CNP_NP01_Etang Long.pdf" target="_blank">Fiche CNP</a>

If you use it on Lizmap 3.8, it points to nothing, cause it have to be like <a href="media/getMedia?repository=pabiodivsion&project=LIZ_Plan_action_biodiversite_Sion_region&path=media/pdf/Fiches_CNP/CNP_NP01_Etang Long.pdf" target="_blank">Fiche CNP</a>.

Versions, safeguards, check summary etc

Versions :

  • Lizmap Web Client : 3.8.7 - commit bee4379 bee4379f1
  • Lizmap plugin : 4.5.3
  • QGIS Desktop : 3.40.6
  • QGIS Server : 3.40.6
  • Py-QGIS-Server or QJazz : not used
  • QGIS Server plugin atlasprint : 3.4.2
  • QGIS Server plugin lizmap_server : 2.13.1
  • QGIS Server plugin wfsOutputExtension : 1.8.3
List of Lizmap Web Client modules :
* Version Lizmap Web Client 3.8 needed
List of safeguards :
* Mode : normal
* Allow parent folder : no
* Prevent other drive : yes
* Prevent PG service : yes
* Prevent PG Auth DB : yes
* Force PG user&pass : yes
* Prevent ECW : yes

Check Lizmap plugin

  • I have done the step just before in the Lizmap QGIS desktop plugin before opening this ticket. Otherwise, my ticket is not considered valid and might get closed.

Operating system

Ubuntu 20.04

Browsers

Firefox

Browsers version

140.0.4

Relevant log output

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions