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

WebP Module fallback.js does not support REST API plain permalinks. #456

Closed
peterwilsoncc opened this issue Jul 28, 2022 · 0 comments · Fixed by #457
Closed

WebP Module fallback.js does not support REST API plain permalinks. #456

peterwilsoncc opened this issue Jul 28, 2022 · 0 comments · Fixed by #457
Labels
[Plugin] Modern Image Formats Issues for the Modern Image Formats plugin (formerly WebP Uploads) [Type] Bug An existing feature is broken

Comments

@peterwilsoncc
Copy link
Contributor

Bug Description

On sites with plain permalinks (ie not using rewrite rules) the rest requests in fallback.js result in 404 File Not Found errors.

The cause of the error is that the rest_route always appends the fields portion of the querystring with a question mark, for plain permalinks an ampersand should be used.

Steps to reproduce

  1. Configure WordPress to use plain permalinks
  2. Upload some a jpeg that will be converted to webp (ie, webp is the smaller file version)
  3. Include the image in a post and publish
  4. Visit the published post in a browser that does not support webp images
  5. In network tools observe that the REST request to get the fallback images fails. The URL will look something like /index.php?rest_route=/wp/v2/media/?_jsonp=wpPerfLab.webpUploadsFallbackWebpImages&per_page=100&include=38
  6. Observe the querystring has two question marks.

Screenshots

Screen Shot 2022-07-28 at 1 16 51 pm

Additional Context

  • PHP Version: 7.4
  • OS: Ubuntu?? (What ever exact version Chassis/Chassis uses)
  • Browser: macOS/Firefox Dev Edition 104b with image.webp.enabled set to false in about:config
  • Plugin Version: trunk at ab08abd
  • Device: Laptop
@peterwilsoncc peterwilsoncc added [Type] Bug An existing feature is broken [Focus] Images labels Jul 28, 2022
@swissspidy swissspidy added [Plugin] Modern Image Formats Issues for the Modern Image Formats plugin (formerly WebP Uploads) and removed [Module] WebP Support labels Jul 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Plugin] Modern Image Formats Issues for the Modern Image Formats plugin (formerly WebP Uploads) [Type] Bug An existing feature is broken
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants