Problem/Motivation

See #2881849-15: WSOD with media in core:

We're being encouraged to use media entities instead of file fields directly. Blazy supports file fields but not entity reference fields for media entities.

For example, a new site wanting a "gallery" field would have an entity reference field to reference media entities. The field widget can be an entity browser with a number of widgets for selecting existing entities or creating new ones.

The "Blazy" display formatter is currently not available for this field.

Edit: An example of how it's being tackled with Photoswipe: #2977943: Support Media and Entity References

Proposed resolution

Make Blazy depends on Media, and identify deprecation and removal of VEF/VEM.
To reduce unpredictable by-product issues, the future works with core Media expect a brand new site with core Media without VEM or at least a successful migration from VEF/VEM into core Media. If any side issue due to legacy VEM integration, consider sticking to Blazy 8.x-1.x till you have time budget to migrate.

Remaining tasks

TODO. Let's list thing here. If anyone has been more involved than me with core Media recently, please update, and remove this line.

  • #3022743: Create a new branch for core Media
  • #2994020: Media field formatter
  • #3023230: Add a new Blazy Media oEmbed service
  • [x] Deprecate any VEF/VEM integration. Were parts of previous commits.
  • [x] Add a new base class for all video-related plugins: BlazyMediaFormatterBase
  • [x] Refine, or split BlazyMediaFormatterBase to support just a Media image without remote video, or oEmbed. Like the good old Image field without extra fields. This appears irrelevant as we have Vanilla option for advanced formatters like Slick, etc. And the Blazy/ Slick image formatter is still there, only deprecated.
  • [x] Finally, remove VEF/VEM integration prior to post full release (In case a delay with VEM upgrade path, make it post). This is till still kept to allow transitions from video_embed_field to media field.
    Irrelevant. This is no blocker.

User interface changes

None.

API changes

Few, but BC is still kept:
BlazyManager::getImage() changed into BlazyManager::getBlazy()

Data model changes

None. VEM already provides upgrade path: #2997799: Include upgrade path from video_embed_field to oEmbed

Release notes snippet

None.

Known issues

Core oEmbed has little room to extend/ modify as of this writing. This causes two known immediate issues which require solutions beyond regular JS or CSS overrides, some extra leg:

Comments

axel.rutz created an issue. See original summary.

gausarts’s picture

Category: Bug report » Task
Status: Active » Fixed

Let's close this, unless anything else to do here.

geek-merlin’s picture

Issue summary: View changes
Status: Fixed » Active

This is still an issue, copying over the text.

geek-merlin’s picture

In #2977943: Support Media and Entity References, the formatter class is used directly and some new conditions and code paths are added. My gut feeling is that it's cleaner to extend the formatter via inheritance, add a common base class or do code reuse in some other way.

I'm not working on this and might when i need it.

gausarts’s picture

Oops! Sorry about this.

We already have initial work to begin with here:
#2994020: Media field formatter

gausarts’s picture

Issue summary: View changes
gausarts’s picture

Issue summary: View changes
gausarts’s picture

Version: 8.x-1.x-dev » 8.x-2.x-dev
Issue summary: View changes
gausarts’s picture

Title: Make blazy display formatter available for media reference » Roadmap for core Media integration
Issue summary: View changes

We'll make this to track changes for core Media integrations.

gausarts’s picture

Issue summary: View changes
gausarts’s picture

Issue summary: View changes
gausarts’s picture

Issue summary: View changes
gausarts’s picture

Issue summary: View changes
gausarts’s picture

Issue summary: View changes
gausarts’s picture

Issue summary: View changes
gausarts’s picture

Issue summary: View changes
Status: Active » Fixed

Let's close this as Alpha4 marks it done with core Media:
https://www.drupal.org/project/blazy/releases/8.x-2.0-alpha4

Any side or by-product issue should not hold this from closing. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.