Skip to content

[helios] When uploading media on page, htmx navigation breaks #598

Description

@Gleydar

Bug

When uploading media files like PDF or docx via the page directly instead of using the global media section, htmx navigation causes the link to load in the content area instead of opening the PDF viewer/downloading the file.

Steps to reproduce:

  1. Upload a pdf file called test.pdf using the global media tab
  2. Create a test page and upload the same pdf file using page media
  3. Inserts links to both the global and local media file

Page content:

---
title: test
---

Global Link: [test.pdf](media://test.pdf)

Local Link: [test.pdf](test.pdf)

When using htmx navigation, the global link works as expected, whereas the local link causes the PDF content to be displayed in the text area.

I would expect that only 'real' page links are handled by htmx and every other link is handled by the browser. Uploading media files locally seems to be okay according to the grav documentation https://learn.getgrav.org/17/content/media#where-to-put-your-media-files

Versions

Grav v2.0.4
Admin v2.0.9
Helios v2.1.8

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions