Problem/Motivation
I can't see a reason why this shouldn't be done or would be a difficult feat. This is already the goal of media_entity_embeddable_video, but the only touch point for the integration is a single plugin, the rest is a whole duplicated system of plugins and field types. For the same reason we implemented WYSIWYG integration (to consolidate video embeds into a single ecosystem/feature set), I don't see why VEF wouldn't implement this plugin and bring the existing feature set to media.
Proposed resolution
Implement the plugin type in a sub-module called video_embed_media (not a seperate project, there already seems like way too many modules to install when using media).
Remaining tasks
Validate the assumptions, talk with slashrsm and patch.
User interface changes
TBD.
API changes
TBD.
Data model changes
TBD.
| Comment | File | Size | Author |
|---|---|---|---|
| #33 | 2688927-media-entity-integration-32.patch | 23.4 KB | sam152 |
| #32 | 2688927-media-entity-integration-32.patch | 30.02 KB | sam152 |
| #32 | interdiff.txt | 1.01 KB | sam152 |
| #27 | 2688927-media-entity-integration-23.patch | 23.24 KB | sam152 |
| #23 | 2688927-media-entity-integration-23.patch | 0 bytes | sam152 |
Comments
Comment #2
sam152 commentedInitial attempt.
Comment #9
sam152 commentedAfter test_dependencies was committed to head.
Comment #10
sam152 commentedI've spoken with slashrsm on IRC. My thoughts at this stage are that for VEF to integrate into media to the same level as media_entity_embedded_video, all that was required was a <10kb patch, which includes tests and extra code to create fields for the user as a convenience.
With that in mind, with this patch included, I see VEF and MEEV as solving the same problem. Obviously having worked on and polished VEF + the associated contrib for the last 4 months, I'm interested in see how it can fit into the media picture while continuing to be a stand-alone field where required.
The media team is of course well within their rights to continue to build and support MEEV and build it in any direction required by media_entity, but I believe this falls into the bucket of duplicate effort at this stage. I'd be happy to work on any issues on an ongoing basis to keep VEF up to date with media_entity HEAD as well as work on any improvements required by the media team.
If this is a welcome contribution to reduce the amount of modules/code that the media guys are maintaining, then we should discuss bringing the integration up to snuff, otherwise, I'll probably merge this for the reasons described in #1 and exist alongside MEEV.
Comment #11
slashrsm commentedThank you for your work. This is very exciting!
Approach that media_entity takes is to make main field configurable. Instead of pre-creating it we allow site builder to decide how entity data model looks like and determine that through configuration.
If we'd be deprecating media_entity_embeddable_video I'd like list of provided fields to be equivalent. See https://github.com/drupal-media/media_entity_embeddable_video/blob/8.x-1...
This module essentially provides only Media type plugin. I don't see any reason why this couldn't live in VEF.
In general I am in favour of merging the two modules. It will reduce fragmentation and make ecosystem more sustainable. The two most important things that I'd like to achieve before we do that is to handle existing sites and achieve feature parity. I am available on IRC if needed.
Comment #12
sam152 commentedHi slashrsm,
Appreciate the review.
1. I found this user experience a bit confusing and assumed that someone creating a "video" bundle wanted a video field seemed like a safe assumption. I'll defer to the standard way of handling things however.
2. Good point!
3. We'll see what size it ends up after #4.
4. Fair enough. I'll see what I can come up with for this.
I'm am also excited to reduce the fragmentation. Lets see how far we can get with this.
Comment #13
sam152 commentedOnly half way through the above feedback, just just need a testbot run.
Comment #14
sam152 commentedComment #21
sam152 commentedTest dependencies to HEAD.
Comment #22
sam152 commentedFixed test namespace.
Comment #23
sam152 commentedThis patch is ready for review once more. It addresses the feedback in #11.
A video embed field will be created on this media bundle when you save this form. You can return to this configuration screen to alter the video field used for this bundle, or you can use the one provided.This message disappears once a field is chosen or created.
Let me know what you think.
Comment #27
sam152 commentedReal patch this time.
Comment #30
slashrsm commentedThis @file blocks are not required any more. More a FYI than a blocker.
Number of items in this result set can be very large in general. I think it would be great idea to support batch processing to prevent timeouts and other problem.
I am OK if we make this a follow-up.
While this will correctly migrate values stored in text fields it won't succeed with the ones stored in link fields (both types are supported in MEEV). I manually tested it and that also confirmed this issue.
I manually tested it and it works nicely.
Great job. Almost there. When we commit this it would make sense to release a new version on VEF. After that we can put a deprecation message on MEEV project page.
It would also make sense to update our guide at that point.
Comment #31
slashrsm commentedComment #32
sam152 commentedI think after this gets in I'll tag RC6 and then 1.0 shortly after.
I'd be happy to write any docs required. Will submit PRs the github project after this goes RTBC.
Comment #33
sam152 commentedMerged branch with 8.x-1.x. Interdiff is still the same.
Comment #34
sam152 commentedComment #36
sam152 commentedFail is in HEAD.
Comment #37
slashrsm commentedLooks good. Should we create follow-ups for batch migration and d8 guide update?
Comment #39
sam152 commentedRC 6 coming here: https://www.drupal.org/node/2699445
Created #2699443: Update the Drupal 8 media guide to include using VEF. and #2699441: Make the MEEV migration in the media integration use a batch..
Comment #40
sam152 commentedComment #41
slashrsm commentedGreat job. Added a message to MEEV project page. https://www.drupal.org/project/media_entity_embeddable_video
Comment #43
dadderley commentedI inherited a site that had hundreds of media entities of the video type created with 'Media entity embeddable video 8.x-1.0-beta2'.
Installing the latest dev version of this module (Video Embed Field 8.x-1.5+4-dev (2017-Dec-01)) saved me a whole world of hurt.
Thank you very much.
Comment #44
georg_nordhausenHi, I am trying to upgrade a drupal 8.9.20 system which heavily relies on the media_entity_embeddable_video module. I tried all the steps described here but the migration seems to srew up the database, so that all embedded videos disappear.
It seems like this is a two step pocess. First migration from media_entity_embeddable_video to VEF media entity 1.x/2.x and then migration to the core media module.
Does any of you have a hint what to do or where to look to solve this?