Module cannot be enabled

Created on 26 February 2024, 9 months ago
Updated 28 February 2024, 9 months ago

Problem/Motivation

I get this message when I try to activate EPT Slick Slider module (/admin/modules): The EPT Slick Slider needs to be created "Image" Media type. (Currently using Media type Image version Not created)

I have a media type "Image (PB)" in /admin/structure/media

Not sure what else needs to be created?

Steps to reproduce

Try to install EPT Slick Slider module. Not sure if this is related but I already have https://www.drupal.org/project/paragraphs_bundles installed.

🐛 Bug report
Status

Closed: works as designed

Version

1.4

Component

Code

Created by

🇩🇪Germany gruberroland

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @gruberroland
  • 🇷🇸Serbia levmyshkin Novi Sad, Serbia

    Hi gruberroland, EPT modules expect default Media types bundle machine names (image, remote_video, video, document). It's needed for configs import:
    /admin/structure/media/manage/image

    You can create a new Media type Image with machine name 'image' or you can patch EPT Slick Slider module and replace 'image' bundle name in .install and .yml files in config/install folder.

    I don't think that it's possible not to assign direct media machine name, I will try to play around with configs.

  • Status changed to Needs work 9 months ago
  • 🇷🇸Serbia levmyshkin Novi Sad, Serbia
  • 🇩🇪Germany gruberroland

    Thanks, this helped to install the module. Maybe these media types can be installed automatically by EPT Core?

  • Status changed to Closed: works as designed 9 months ago
  • 🇷🇸Serbia levmyshkin Novi Sad, Serbia

    It's possible to install media types automatically, like Standard installation profile does or Paragraph pack module with own media type name. But I wanted to use default type intentionaly to make installing EBT/EPT modules seamless for existing site. For example, you have default Image media type, which supposed to be on the most Drupal installations, and you already set up Media Library, Entity Browser for existing media type. But if I will include another Image media type, you will need to set up Entity Browser again, check all your custom code to avoid empty variables for Image media items.

    So EPT/EBT modules are designed to use default media types, lets keep them in this way and see how it will work for other developers. In other case we already have coupled bulletproof solutions like Paragraph Pack, Layout Builder Kit, Varbase, which use own entity types, settings and configs:
    https://www.drupal.org/project/paragraphs_pack
    https://www.drupal.org/project/layout_builder_kit
    https://www.drupal.org/project/varbase

    EPT/EBT tend to be as small as possible modules, to use them as small bricks.

    I will close this issue, feel free to open it or create new one, if you have some ideas.

    Thank you for using EBT/EPT modules!

  • 🇩🇪Germany gruberroland

    Full ack on using the default types. But which module is installing these? I do not have the default Image media type. You mentioned it should be preexisting on most Drupal installations. But how does it get there?

  • 🇷🇸Serbia levmyshkin Novi Sad, Serbia

    I just tested it on clean Drupal 10.2 Standard installation. I enabled Media and Media Library modules and all default Media types appeared:

    It should be Media Library module creates all default media types.

Production build 0.71.5 2024