- Issue created by @peachez
- Status changed to Needs review
5 months ago 6:42pm 12 August 2024 - Merge request !9Issue #3467675: Make URL field required by default β (Open) created by Unnamed author
- πΉπThailand Nick Hope
The MR !9 (in #4) address the problem by simply making the URL field required.
This should also address these issues:
- https://www.drupal.org/project/media_entity_remote_image/issues/3467686 π Should not unset 'title' key in element array Needs review
- https://www.drupal.org/project/media_entity_remote_image/issues/3471458 π D10.3.2 Error "The URL field is required when the field is specified" Active
To me, this seems logical. I suppose someone might want to create a media entity as a placeholder, and add the URL later, but I doubt it.
@peachez Was it just an empty URL field that caused the problem? And why were you saving a media item without that value?
If anyone was able to get past the issue and actually create media remote image entities with empty URL fields, we could consider a hook_update_N() to populate empty URL fields with a placeholder value etc.. Does anyone have media remote image entities with empty URL fields?
Also uploading a patch for anyone who wants it.
- πΊπΈUnited States peachez
@nick
Yes just the media file field caused us the issue.
I believe we had a use case for media items where our client wanted to create the media items with some of the data (keeping it in draft) but had not been given the video file yet to upload.
Thanks for the help