Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem:
Uploading a new image on a Media Image ajax form fails.
Steps to reproduce:
- Enable media_library module
- Set image widget to media library on a node's media image field
- Put a check in the Media checkbox on the Gatsby admin form under "Entity types to send to Gatsby Preview Server"
- Create/edit node and use the media image ajax form to upload a new image (note: selecting an existing image works just fine)
- After entering the alt text, click the save button; the form doesn't exit as it should, and there is an ajax error in the browser's console
I've traced the error through a debugger, and found that the form doesn't finish processing correctly after the POST to the Gatsby Preview server in GatsbyPreview->updatePreviewEntity
.
Comment | File | Size | Author |
---|---|---|---|
#10 | 3129452-10-entity-bundling.patch | 2.44 KB | scottalan |
#8 | 13617511-8-entity-bundling.patch | 2.44 KB | scottalan |
Comments
Comment #2
codekarate CreditAttribution: codekarate at Gatsby commentedThis is an upstream issue with jsonapi_extras entityToJsonApi as I reported in https://www.drupal.org/project/jsonapi_extras/issues/3135950
I have an in progress workaround that should be released to the dev version of the module shortly.
Comment #4
codekarate CreditAttribution: codekarate at Gatsby commentedThis is working in the newest dev version of the module and will included in the next release.
Comment #5
codekarate CreditAttribution: codekarate at Gatsby commentedComment #6
codekarate CreditAttribution: codekarate at Gatsby commentedThere are still some entity bundling issues.
Comment #7
scottalan CreditAttribution: scottalan at Phase2 commentedI will be uploading a patch soon that should fix the entity bundling issues mentioned.
Comment #8
scottalan CreditAttribution: scottalan at Phase2 commentedComment #9
scottalan CreditAttribution: scottalan at Phase2 commentedI botched the patch name. It should use 3129452 for the issue id. I can easily update this if necessary
Edit: I'll be uploading a new patch as it does not apply, should have tested that first.
Edit: The patch does apply cleanly when applying directly but with composer...not so much. Stand by...
Comment #10
scottalan CreditAttribution: scottalan at Phase2 commentedComment #12
codekarate CreditAttribution: codekarate at Gatsby commentedThis has been committed to dev and is working for my tests.
Comment #13
codekarate CreditAttribution: codekarate at Gatsby commentedComment #14
codekarate CreditAttribution: codekarate at Gatsby commented