Remove unsupported Media Library Theme Reset module

Created on 3 December 2022, over 1 year ago
Updated 29 May 2024, 18 days ago

Media Library Theme Reset , a requirement for this module, is unsupported, an alternative is needed.

🐛 Bug report
Status

Fixed

Version

1.1

Component

Code

Created by

🇭🇺Hungary Grabby

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇮🇩Indonesia drupalnesia

    Since Media Library Theme Reset is "deprecated" again now, this Bootstrap_styles module needs to update its code.

  • 🇺🇸United States SocialNicheGuru

    Upload a patch to remove the deprecated module and replace with layout_builder_iframe_modal.
    This is an initial step as other issues must be addressed.

  • 🇺🇸United States SocialNicheGuru

    This patch is a mistake

  • Status changed to RTBC about 1 year ago
  • Status changed to Needs work about 1 year ago
  • 🇺🇦Ukraine vlad.dancer Kyiv

    Path #11 is no more compatible with 1.x version.
    See https://git.drupalcode.org/project/bootstrap_styles/-/blob/1.0.x/bootstr...
    I think it was designed for 2.x version.

  • @vladdancer opened merge request.
  • Status changed to Needs review about 1 year ago
  • Status changed to RTBC about 1 year ago
  • 🇺🇸United States shaunole

    No issues found when testing//validating @vlad.dancer 's MR !55 against the 1.0.x branch. Updating status to RTBC

  • hi, the patch #11 was not working with 1.1.0, so i created this new patch, it removes media_library_form_element in both info.yml and composer.json file and replaces it with layout_builder_iframe_modal

  • if you are getting still issue in applying the patch #22 then following this article: https://chromatichq.com/insights/patching-info-files-composer/

    i used this command and the patch applied cleanly:

    composer require 'drupal/bootstrap_styles:^1.1' --prefer-source

  • Status changed to Needs review 12 months ago
  • 🇺🇸United States SocialNicheGuru

    None of the ones above applied for me.
    The MR did not apply either.
    I rerolled to apply to bootstrap_styles 1.1

  • Status changed to Needs work 12 months ago
  • 🇺🇸United States SocialNicheGuru

    in #6 🐛 Media Library Theme Reset not supported Needs work the first 2 items have not been addressed:

    1) Adjust the bootstrap_styles_page_attachments_alter hook to properly include the CSS files based on the routes configured on /admin/config/content/layout_builder_iframe_modal;
    2) Adjust the module CSS to work with layout_builder_iframe_modal;

  • 🇧🇪Belgium flyke

    Since layout_builder_iframe_modal seems problematic on frontend theme ( see this issue Support for Layout Builder iFrame Modal Active ) wouldn't it make more sense to require layout_builer_modal instead of layout_builder_iframe_modal ?

  • 🇧🇪Belgium flyke

    Forgot something in previous patch.

  • 🇧🇪Belgium flyke

    So, If you are planning to use layout_builder_iframe_modal, use patch #22.
    If you want to use layout_builder_modal, use patch #25.

    When I use layout_builder_iframe_modal then I am having serious layout problems.
    When I use layout_builder_modal, then the section settings open off canvas, which I dont want.
    So I also use patch #3214458 Move all Layout Builder operations into modal Needs review for layout_builder_modal so that the section settings also open in a modal.
    And now... everything still kinda sucks unfortunately.

    So I am open for recommended approaches.
    - I want to use modals when you create/edit sections or blocks
    - I want the content of the create/edit section or block to look ok

  • 🇧🇪Belgium flyke

    Update: the layout is actually ok when using layout_builder_modal.
    Apparently I forgot that I had gin_lb module enabled. Using bootstrap_styles + layout_builder_modal without gin_lb module is exactly what I was looking for.

  • 🇺🇬Uganda Thomas Kaisuka

    Hello flyke I have used patch #25. Initially failed to apply but with "composer require 'drupal/bootstrap_styles:^1.1' --prefer-source" did apply.

    So MLTR is now removed from all my dependencies and am good to go.

    So ma using Layout Builder Modal just as before without the worry of MLTR, which i have now disabled

  • I applied the patch from #22, and confirmed that Bootstrap Styles' info.yml and composer.json files were updated as expected. I ran `composer require 'drupal/bootstrap_styles:^1.1' --prefer-source`.

    While the patch appears to have applied correctly, composer still says that "drupal/bootstrap_styles 1.1.5 requires drupal/media_library_theme_reset (^1.0)." I can't remove MLTR, and Composer also didn't install Layout Builder iFrame Modal like I expected it to. It doesn't consider it to be a dependency, despite it being listed as such in the Bootstrap Styles composer.json.

    What am I missing? It seems like Composer must be loading the dependencies from the Drupal.org version of Bootstrap Styles as opposed to my locally installed/patched version.

  • 🇨🇦Canada TrevorBradley

    Just wandered in here from the Bootstrap Media Theme Reset module. It appears to have finally moved into its unsupported state. See: https://www.drupal.org/project/media_library_theme_reset

  • 🇺🇸United States andileco

    The --prefer-source flag was not working for us, so attempting a different version of the patch based on the 1.1.5 tag rather than the 1.0.x branch. Hoping this works!

  • Status changed to Needs review 6 months ago
  • 🇦🇷Argentina gerzenstl Resistencia

    We are planning to use layout_builder_iframe_modal module.

    I was able to apply from patch #31 by using the workaround of installing the module from source. I used the following in composer.json file:

    {
        ...
        "config": {
            "preferred-install": {
                "drupal/bootstrap_styles": "source",
                "*": "dist"
            },
        }
        ...
    }
    

    and then run `composer install`

  • 🇺🇸United States websiteworkspace

    With notes above lasting for over a year, why couldn't the maintainers of these various modules have coordinated better with each other so that users of these modules aren't left with the glaring "Not Supported!" in their site's available updates.

    There are about three dozens reports now above about the difficulties users have experienced trying to migrate by hand from "media library them reset" to the newly support layout_builder_iframe_modal module.

    Note that #33 is just three days old, but the problem reports date back as far as an entire year.

    --

    This type of lack of planning, and lack of coordination, is part of why the Drupal user base keeps getting smaller and smaller and smaller.

    https://www.drupal.org/project/usage/drupal

  • 🇺🇸United States dehacker

    Applied patch #31 locally with ddev and was able to get the expected result. Also with #33.

    However, build failed on Pantheon, due to upstream patch error in build for unknown reasons Pantheon was not able to help resolve.

    Asking the maintainers of this module to fix that dependency problem to make this module Drupal 10 compatible.

  • 🇮🇩Indonesia drupalnesia

    Why takes more than 1 year to fix the "Media Library Theme Reset" issue?

  • 🇨🇦Canada Jaypan

    websiteworkspace - Drupal is open source. It's not fair to complain, when all the work is done by volunteers. The module wouldn't even exist in the first place without their time.

    If you want a new version released faster, speak to the developer about funding a module upgrade.

  • 🇨🇦Canada mahmoud-zayed

    Agree with you Jaypan, I love open source and I contribute to it as much as I can!

    BLB modules are widely used even by big tech companies. No doubts funding these modules will make them better, there are a lot of great ideas that can be added to improve BLB ecosystem.

  • Status changed to RTBC 5 months ago
  • 🇬🇧United Kingdom Finn Lewis

    Hey people!

    The patch in #31 works for me with the suggestion in #33

    It looks like the merge request https://git.drupalcode.org/project/bootstrap_styles/-/merge_requests/55/... does the same as the patch, so setting this RTBC as it sounds like a simple solution that is working for a few people.

    Any chance of a merge and release?

    Many thanks!

    Finn

  • 🇺🇸United States dehacker

    After updating to Drupal 10.2.3 our site has fatal error WSOD from 'Layout Builder Blocks' module, which relies on this module. The fatal error points to a problem that module has with this module. Could this issue be compounding and breaking other modules?

    Error from Layout builder blocks:
    @param \Drupal\bootstrap_styles\StylesGroup\StylesGroupManager $styles_group_manager

  • 🇦🇹Austria maxilein

    which patch? This patch? Could you please be specific?

  • 🇺🇸United States drupler8

    @mahmoud-zayed

    Mahmoud, you and your team are great! Why don't you set up something like jrockowitz https://www.drupal.org/project/webform where people can donate 5 dollars a month toward the development of bootstrap styles / layout builder.

    I would think many others are a touch nervous about the media library theme reset module messing up these great projects.
    https://www.drupal.org/project/bootstrap_layout_builder/issues/3325151#c... 🐛 Media Library Theme Reset not supported Needs review

    I posted this https://www.drupal.org/project/bootstrap_layout_builder/issues/3325151#c... 🐛 Media Library Theme Reset not supported Needs review

    Is the answer definitively to go with Layout Builder iFrame Modal?

    Thanks so much for your teams efforts and open source support!

  • 🇧🇪Belgium flyke

    I was unable to apply patch #31 to bootstrap_styles v1.1.5 for some reason.
    Testing another patch for that.

  • 🇧🇪Belgium flyke

    Nevemind.
    I am working with a main drupal project and a dependent custom drupal module on a private company repository which in turns depends on layoutbuilder etc. I have not quite nailed it in the custom module as its a bit hard to keep testing the custom module requirements and patches via the main project. On first sight there is nothing wrong with patch #31, So i'm hiding this test patch in favor of that.

  • 🇧🇪Belgium flyke

    The MR55 also works. You just have to use instructions from #33.
    Composer.json:

    {
        ...
        "require": {
            ...
            "drupal/bootstrap_layout_builder": "^2.1",
            "drupal/bootstrap_styles": "^1.1",
            "drupal/layout_builder_iframe_modal": "^1.3"
        },
        "config": {
            "preferred-install": {
                "drupal/bootstrap_styles": "source",
                "*": "dist"
            }
        },
        "extra": {
            "patches": {
                "drupal/bootstrap_layout_builder": {
                    "#3325151": "https://git.drupalcode.org/project/bootstrap_layout_builder/-/merge_requests/22.diff"
                },
                "drupal/bootstrap_styles": {
                    "#3325150": "https://git.drupalcode.org/project/bootstrap_styles/-/merge_requests/55.diff"
                }
            }
        }
    }

    This is what worked for me.
    After that, I could successfully run:
    drush pmu media_library_theme_reset

  • 🇩🇪Germany juagarc4

    Hi all,

    I tried the solution of #33 and it works properly. The patch could be applied properly.

    Information for all of you that tried to remove the source code using composer once applied the patch.

    You will never be able to remove the source code using composer, because the patch is applied after the composer installation. This
    produces that the composer-lock file still contains the requirement of media_library_theme_reset in to the bootstrap_styles entry.

    So if you try to run 'composer remove drupal/media_library_theme_reset' you will be warned that boostrap_styles still requires this module and it won't be uninstalled.

    The only way to get the source removes is not to install it at all, but it will be only possible once the MR has been merged into the base code.

    I think, it has been testet enough and can be merged into the code base.

  • 🇺🇸United States andileco

    For some reason that I can't figure out, I can't get any patch for this module to apply on my hosting provider (Pantheon). It works fine locally. So if anyone else is facing this situation, here's what I did:

    1) I removed my patch in composer.json

    2) I created replace_bootstrap_styles_yml.php inside a directory I named "scripts" inside my root, with the following inside:

    <?php
    
    // Define the path to the file.
    $file_path = './web/modules/contrib/bootstrap_styles/bootstrap_styles.info.yml';
    
    // Read the current content of the file.
    $content = file_get_contents($file_path);
    
    // Replace the specified line.
    $new_content = str_replace(
      '  - media_library_theme_reset:media_library_theme_reset',
      '  - layout_builder_iframe_modal:layout_builder_iframe_modal',
      $content
    );
    
    // Write the updated content back to the file.
    file_put_contents($file_path, $new_content);
    
    echo "Replacement complete.\n";
    

    3) I added the following inside my composer.json:

        "scripts": {
            "post-update-cmd": ["php ./scripts/replace_bootstrap_styles_yml.php"],
            "post-install-cmd": ["php ./scripts/replace_bootstrap_styles_yml.php"]
        },
    

    4) Committed and pushed (Pantheon - if you're using the "build step" - runs composer install each time you push, which triggers this script).

    Note that you'll need to adjust this based on whether or not you're using the "web" directory or if you have a different name for the folder your "contrib" modules go into.

    The code for media_library_theme_reset will still exist in your codebase, but because the dependency for it is no longer in bootstrap_styles, you can uninstall the module via Drush or via that UI.

  • 🇯🇴Jordan Rajab Natshah Jordan

    Thank you, for following up on this issue.

    Decided to only remove the media_library_theme_reset:media_library_theme_reset
    To project manage any type of modals on their way.

    Allowing Developers to use Layout Builder Modal or Layout Builder iFrame Modal

  • Status changed to Fixed 3 months ago
  • 🇵🇱Poland szy

    I'm not sure, if everything goes according to the plan ;)

    After updating the site with composer:

    Loading composer repositories with package information
    Updating dependencies
    Lock file operations: 0 installs, 1 update, 1 removal
      - Removing drupal/media_library_theme_reset (1.5.0)
      - Upgrading drupal/bootstrap_styles (1.1.5 => 1.1.6)
    Writing lock file
    Installing dependencies from lock file (including require-dev)
    Package operations: 0 installs, 1 update, 1 removal
      - Downloading drupal/bootstrap_styles (1.1.6)
      - Removing drupal/media_library_theme_reset (1.5.0)
      - Upgrading drupal/bootstrap_styles (1.1.5 => 1.1.6): Extracting archive
     0/2 [>---------------------------]   0%Deleting /var/www/html/web/modules/contrib/media_library_theme_reset - deleted

    ... I see in status report:

    The following module is marked as installed in the core.extension configuration, but it is missing:
    media_library_theme_reset

    Review the suggestions for resolving this incompatibility to repair your installation, and then re-run update.php.

    So it looks like the media_library_theme_reset is removed, but it wasn't not completely uninstalled from the system.

    Szy.

  • 🇯🇴Jordan Rajab Natshah Jordan

    Szymon, you are right.

    The module is not follwoing with latest Drupal changes.

    Removed the module.

    Unsupported

    Not supported (i.e. abandoned), and no longer being developed. Learn more about dealing with unsupported (abandoned) projects

    For sure the module can be required by the following if the project still needs it:
    composer require 'drupal/media_library_theme_reset:^1.5'

    Recommended to switch to other ways.

  • 🇦🇹Austria kevin.pfeifer

    We solved this problem with the latest version by

    1. composer require 'drupal/media_library_theme_reset'
    2. Manually uninstalling the module in the drupal backend
    3. composer remove 'drupal/media_library_theme_reset'

    would be nice if a drush updb hook would be added in the next patch release to do that automatically

  • Status changed to Needs work 3 months ago
  • 🇺🇸United States PapaGrande

    Unfortunately, this is not fixed.

    - media_library_theme_reset:media_library_theme_reset needs to be removed from bootstrap_styles.info.yml to get rid of the dependency.

  • Status changed to Fixed 3 months ago
  • 🇺🇸United States PapaGrande

    For anyone else having trouble updating to 1.1.6 and beyond, remove any special settings in repositories or conflict in your composer.json file that were added to make the patch work.

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

  • 🇳🇿New Zealand xurizaemon Ōtepoti, Aotearoa 🏝

    Updating title since patch proposes to add a replacement rather than just removing

  • 🇨🇦Canada LeDucDuBleuet Chicoutimi QC

    The module Layout Builder Iframe Modal is not required by version 1.1.6 so I removed the last part added to the title ", require Layout Builder Iframe Modal".

  • 🇳🇿New Zealand xurizaemon Ōtepoti, Aotearoa 🏝

    Thanks LeDucDeBleuet! Yeah I was assisting someone in Slack and they were referencing this issue in trying to apply the patch.

    After a closer read I see that in comment 49 🐛 Media Library Theme Reset not supported Needs work @Rajab decided

    Decided to only remove the media_library_theme_reset:media_library_theme_reset
    Developers in projects can manage any type of modals on their own way.

    I am hiding the patch from 31 (since now that #49 was committed, that patch doesn't apply).

  • 🇷🇺Russia marassa Moscow

    Shouldn't the description on the module page be corrected accordingly? I see some people confused over the requirement present in the module description but not in the module code anymore.

  • 🇨🇴Colombia Freddy Rodriguez Bogotá

    #57 +1

Production build 0.69.0 2024