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 editor not working #1190

Closed
flexseth opened this issue Apr 3, 2024 · 1 comment
Closed

Image editor not working #1190

flexseth opened this issue Apr 3, 2024 · 1 comment
Labels
[Type] Bug An existing feature does not function as intended [Type] Documentation Improvements or additions to documentation [Type] Question Further information is requested

Comments

@flexseth
Copy link
Collaborator

flexseth commented Apr 3, 2024

Issue description

Can't save image rotation in crop media dialogue

edit.image.in.post.editor.mov

Dialogue

image

Select image in editor, select crop, rotate clockwise twice, click apply

  • Notice the image does not stay rotated (see video)

Error message

In post editor

Could not edit image. Unable to edit this image.

In the console
api-fetch.min.js?ver…85334c5ec26e149cc:2 POST https://playground.wordpress.net/scope:0.9335353820609578/index.php?rest_route=%2Fwp%2Fv2%2Fmedia%2F7%2Fedit&_locale=user 500 (Internal Server Error)

{
  "code": "rest_no_route",
  "message": "No route was found matching the URL and request method.",
  "data": {
    "status": 404
  }
}

Errors in media library

In media library image editor
image

Image rotation is not supported by your web host


Affects

  • all versions of Playground
  • post editor
  • media library

Caveats

Is this a known limitation?
If so, provide documentation...
Albeit, editing images is pretty important!

@flexseth flexseth added [Type] Bug An existing feature does not function as intended [Type] Documentation Improvements or additions to documentation [Type] Question Further information is requested labels Apr 3, 2024
@adamziel
Copy link
Collaborator

adamziel commented Apr 3, 2024

That's a limitation of the lightweight PHP bundle, it works if I switch to the kitchen sink bundle. It's probably because it lacks the finfo extension and also has no access to the gd extensoin.

I infer that from this error – it says "unknown image file type".

{
    "code": "rest_unknown_image_file_type",
    "message": "Unable to edit this image.",
    "data": {
        "status": 500
    }
}

I'm starting to wonder, should the "kitchen sink" be the default bundle with "light" as an option 🤔

@adamziel adamziel closed this as not planned Won't fix, can't repro, duplicate, stale Apr 3, 2024
adamziel added a commit that referenced this issue Apr 3, 2024
Many reported issues are caused by Playground defaulting to the
"light" PHP build. It saves 6MB of initial downloads, but it confuses
new users with issues like [broken image editing](#1190).

This PR changes the PHP bundle loaded by default to the "kitchen sink"
one that ships with PHP extensions like finfo, GD, libxml.

 ## Testing instructions

* Confirm the e2e tests passed.
* Go to local Playground
* Visit "/phpinfo.php" in Playground, confirm libxml is enabled (the
  output should contain --enable-xmlreader)
* Open Playground configuration modal, uncheck the additional PHP
  extensions, confirm your choice
* Confirm phpinfo.php now reports libxmls is disabled
* Interact with that modal again, turn on the PHP extensions, confirm
  libxml is loaded again

CC @flexseth @dmsnell @bgrgicak @brandonpayton
adamziel added a commit that referenced this issue Apr 3, 2024
Many reported issues are caused by Playground defaulting to the "light"
PHP build. It saves 6MB of initial downloads, but it confuses new users
with issues like [broken image
editing](#1190).

This PR changes the PHP bundle loaded by default to the "kitchen sink"
one that ships with PHP extensions like finfo, GD, libxml. The change
affects all APIs: Query, Blueprints, JS.

I don't like increasing the bundle size, but the `light` one is still an
option for apps requiring less transfer and this should reduce the
number of confused users and error reports.

## Related issues

*
https://wordpress.slack.com/archives/C06Q5DCKZ3L/p1712040143578229?thread_ts=1711960560.447319&cid=C06Q5DCKZ3L
* #1190

 ## Testing instructions

* Confirm the e2e tests passed.
* Go to local Playground
* Visit "/phpinfo.php" in Playground, confirm libxml is enabled (the
  output should contain --enable-xmlreader)
* Open Playground configuration modal, uncheck the additional PHP
  extensions, confirm your choice
* Confirm phpinfo.php now reports libxmls is disabled
* Interact with that modal again, turn on the PHP extensions, confirm
  libxml is loaded again

CC @flexseth @dmsnell @bgrgicak @brandonpayton
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Bug An existing feature does not function as intended [Type] Documentation Improvements or additions to documentation [Type] Question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants