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

Dropdowns route on files causes server error since 3.6.0 due to change in method (GET to POST) on .jpg etc. #4083

Closed
belugaed opened this issue Jan 7, 2022 · 6 comments
Labels
needs: information ❓ Requires more information to proceed needs: replication 🔬 Requires a sample to reproduce the issue

Comments

@belugaed
Copy link

belugaed commented Jan 7, 2022

The /panel/dropdown calls appear to do a POST to retrieve the API data to populate the dropdown. It posts to it’s own page, which is fine for the most part e.g. posting to https://my.domain/panel/site.

However, since the file/image page has a url such as https://my.domain/panel/pages/about/files/my-image.jpg, it’s posting to this URL structure:

http://my.domain/panel/dropdowns/pages/about/files/my-image.jpg

Since it’s an extension some shared hosting would not naturally allow - Posting to a jpg/png etc. presumed to be exclusively GETs by most host specs.

As a result we get a 403 / Forbidden.

image

The call seems to work as a GET so not sure why it needs to POST for this panel function to dropdowns.

This appears to be an issue since 3.60 and it’s pre-releases. Pre this version the url structure was a GET to

https://my.domain/api/pages/about/files/my-image.jpg?select=options

@bastianallgeier
Copy link
Member

@belugaed
Copy link
Author

I've checked this out on the 3.6.2 pre-release (thanks!).

It works to a point, but 404s if there is an @ in the filename (typical if somebody exports 2x, 3x etc. from photoshop).

Shows fine in the file picker, but then when you click through (e.g. /panel/pages/about/files/my-file-2@2x.jpg) it shows the "URL not found on server".

URL encoding the @ to %40 doesn't seem to help either.

image

image

@bastianallgeier

@bastianallgeier
Copy link
Member

@belugaed I tried but was not able to replicate this. It all works fine over here. What kind of server are you using?

@bastianallgeier bastianallgeier added the needs: information ❓ Requires more information to proceed label Feb 1, 2022
@distantnative distantnative added the needs: replication 🔬 Requires a sample to reproduce the issue label Feb 1, 2022
@belugaed
Copy link
Author

belugaed commented Feb 1, 2022

Hi @bastianallgeier

It's a cloud based provider (CloudNext / https://www.20i.com/), but ultimately it's a Linux installation with Apache, PHP 7.4.

Happy to share the git basecode with you personally or give FTP access it helps debug it.

@distantnative
Copy link
Member

@belugaed does this continue with https://github.com/getkirby/kirby/releases/tag/3.6.3-rc.1 for you? If so, yes please share your setup/code, might help to replicate the problem for us.

@bastianallgeier
Copy link
Member

We fixed this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs: information ❓ Requires more information to proceed needs: replication 🔬 Requires a sample to reproduce the issue
Projects
None yet
Development

No branches or pull requests

3 participants