#55367 closed defect (bug) (fixed)
Requests to the media/edit endpoint are returning a 500 status
Reported by: | talldanwp | Owned by: | hellofromTonya |
---|---|---|---|
Milestone: | 6.0 | Priority: | normal |
Severity: | normal | Version: | 6.0 |
Component: | REST API | Keywords: | has-patch has-unit-tests commit |
Focuses: | Cc: |
Description
The Gutenberg e2e tests seem to have caught a bug with the media/edit
endpoint.
The endpoint is now returning a 500
status for most use cases.
Creating a ticket here as I was able to ascertain that it works on a past commit of wordpress-develop
, but is broken on the latest commit, so it's not a Gutenberg bug.
To reproduce:
- Open the browser dev tools to the network tab
- In the post editor, add an image block and upload an image
- Select ‘Crop’ from the toolbar and adjust the zoom on the image
- Click ‘Apply’
- Observe that the request to the media endpoint returns a
500
status
Attachments (1)
Change History (16)
This ticket was mentioned in Slack in #core-editor by talldanwp. View the logs.
3 years ago
This ticket was mentioned in Slack in #core-editor by zieladam. View the logs.
3 years ago
This ticket was mentioned in PR #2400 on WordPress/wordpress-develop by spacedmonkey.
3 years ago
#5
- Keywords has-patch has-unit-tests added; needs-patch removed
Trac ticket: https://core.trac.wordpress.org/ticket/55367
#6
@
3 years ago
Worked out the issue. Was getting a function does not exist message. Moving the function to functions.php seems to do the trick. Also makes sense to live there, this function is useful everywhere.
This ticket was mentioned in Slack in #core-test by spacedmonkey. View the logs.
3 years ago
#8
@
3 years ago
Test Report
Env
- Web Server: Apache (Linux)
- WordPress: 6.0-alpha-52448-src
- Browser: Chrome
- OS: Windows 10
- Theme: Twenty Twenty-Two
- Plugins: None activated.
Steps to test
- Open the browser dev tools to the
Network
tab. - In the post editor, add an image block and upload an image.
- Select
Crop
from the toolbar and adjust the zoom on the image. - Click
Apply
. - Observe that the request to the media endpoint returns a
500
status. - Apply PR 2400
- Observe that the request to the media endpoint no longer returns a
500
status.
Results
PR resolves the issue. 👍
This ticket was mentioned in Slack in #core-editor by mamaduka. View the logs.
3 years ago
This ticket was mentioned in Slack in #core-editor by get_dave. View the logs.
3 years ago
#11
@
3 years ago
Test Report
Web Server: Apache
WordPress: 6.0-alpha
Browser: Chrome 99
OS: macOS 12.2.1
Theme: Twenty Twenty-Two
Plugins: None.
Steps to test:
- Open the browser dev tools to the network tab.
- In the post editor, add an image block and upload an image.
- Select ‘Crop’ from the toolbar and adjust the zoom on the image.
- Click ‘Apply’.
- Observe that the request to the media endpoint returns a 500 status code.
- Apply 2400
- Repeat steps 1-4.
- Observe that the request ended successfully (200 status code).
The proposed PR fixes the issue and therefore it should be merged.
#12
@
3 years ago
- Keywords commit added
Thanks for adding your test report @antonvlasenko!
Marking for commit
consideration.
#13
@
3 years ago
- Owner set to hellofromTonya
- Status changed from new to reviewing
Thank you @costdev @antonvlasenko for testing and test reports. Thank you @spacedmonkey for the PR.
Assigning to me for commit.
hellofromtonya commented on PR #2400:
3 years ago
#15
Committed via changeset https://core.trac.wordpress.org/changeset/52932.
From what I can tell, the bug was introduced with this commit - https://github.com/WordPress/wordpress-develop/commit/7fc225aa87c80680df01a0a82e6bb94b7773a34c.