[Week 4] Media library and fixing slideshow
Hello fellow Drupalers!
Four weeks ago I had written a blog post about the media module for Drupal 8 on which I was working on with Janez Urevc (slashrsm) and Tadej Baša (paranojik) under Google Summer Of Code 2016.
I am really excited to inform you all that we merged the gallery bundle today with the main repository. It uses the Slick media module which provides integration between the Slick Carousel and the media entity modules. Now using the media module everyone can easily publish media content of slideshow type consisting of images and/or videos as slides. The media module comes with its own image styles and view modes for the gallery items.
Before moving on to an even more exciting part, the media library, let me discuss the issues we faced with the gallery bundle. When I first opened the pull request, Travis CI tests failed with some schema errors. The error said
The test did not complete due to a fatal error.
Exception Uncaught e ConfigSchemaCheck 93 Drupal\Core\Config\Testing\ConfigSc
Drupal\Core\Config\Schema\SchemaIncompleteException: Schema errors for
views.view.media_library with the following errors:
views.view.media_library:display.entity_browser_1.display_options missing
schema in Drupal\Core\Config\Testing\ConfigSchemaChecker->onConfigSave()
This error can be resolved in two ways.
1) Fixing the schema files. This is what we did with the entity browser module. You can see the patch here.
2) Ignoring schema errors. To temporarily pass the tests you can just ignore the schema errors. Add the following code in your test classes.
/**
- Exempt from strict schema checking. *
- @see \Drupal\Core\Config\Testing\ConfigSchemaChecker *
- @var bool */ protected $strictConfigSchema = FALSE;
This error existed with the slick module too and we have opened an issue here.
Let’s talk about the media library now. We are working on media library with nice interface for Drupal which would make working with Media items a lot easier. You would be able to drag and drop to upload and embed media items or just choose from existing media items to embed with your content. Here is a sneak peak of what is about to be released soon.
The file listing tab displays media items in a grid layout using masonry ;)
I know you must be really excited to read more about the upcoming media library but I’ll just end the post here and share more details about the library next week! In the mean time you can follow the Pull Request for the media library here.
Okay see you all next week! Enjoy!
:)