Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image tag doesn't include path to file when uploading to a different page in textarea #2003

Closed
texnixe opened this issue Aug 14, 2019 · 3 comments

Comments

@texnixe
Copy link
Contributor

commented Aug 14, 2019

Describe the bug
Consider a textarea definition like this:

text:
  type: textarea
  uploads:
    parent: page.parent

The files are uploaded to the parent page correctly, but the resulting image tag only contains the filename, not the needed path to the file, resulting in wrong image URLs.

To Reproduce
Steps to reproduce the behavior:

  1. Add the above field to a subpage blueprint, e.g. album.yml in the Starterkit.
  2. Open a page with this blueprint in the Panel
  3. In the textarea field, upload an image.
  4. See how the image tag only contains the filename.

The same happens when selecting a file from another page, while the path is inserted correctly when dragging & dropping a file from a files section.

Expected behavior
The image tag should include the path to the file.

Kirby Version
Tested with 3.2.3

@distantnative

This comment has been minimized.

Copy link
Contributor

commented Sep 11, 2019

So the expected behavior would be relative image name when on the same page, but full URL for images-files not on the same page. Correct?

@texnixe

This comment has been minimized.

Copy link
Contributor Author

commented Sep 11, 2019

When on the same page, the filename as is currently the case is correct. The expected behaviour is to have the same result as when you drag and drop an image from a files section. I.e. the ID of the file, not the URL.

@distantnative distantnative added this to the 3.2.5 milestone Sep 14, 2019
@distantnative distantnative self-assigned this Sep 14, 2019
distantnative added a commit that referenced this issue Sep 14, 2019
distantnative added a commit that referenced this issue Sep 14, 2019
distantnative added a commit that referenced this issue Sep 15, 2019
@bastianallgeier

This comment has been minimized.

Copy link
Contributor

commented Sep 16, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
3 participants
You can’t perform that action at this time.