Problem/Motivation
Currently the module creates a field storage and config automatically as soon as a media bundle of type video_embed_field is created. It is a problem in case of modules like media which import their own configurations for the media bundles with fields.
Proposed resolution
Let's check if the field for the video URL already exists for the media bundle and if it exists then not create a field automatically.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | 2743665-5.patch | 798 bytes | royal121 |
| #2 | 2743665-2.patch | 778 bytes | royal121 |
Comments
Comment #2
royal121 commentedComment #3
sam152 commentedThat makes sense. We've looked at this before and the check:
> !$media_bundle->isSyncing()
Is meant to catch the case where config is being imported, but I think it's worth being more defensive and checking the media entity config as well.
Lets use the getTypeConfiguration method instead.
Can we also check the specific "source_field" configuration option? If somehow media bundles are created in the future with some default configuration, this would break.
Comment #4
sam152 commentedComment #5
royal121 commentedComment #6
slashrsm commentedLooks good to me.
Comment #7
sam152 commentedThanks for your efforts.
Comment #8
sam152 commentedComment #10
sam152 commented