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

If you're updating from an earlier version, this module no longer requires Media Library Theme Reset (because it's unsupported). The update might cause the module to be removed entirely from your codebase, in which case you should uninstall Media Library Theme Reset before deploying the update (it can be done manually or in a post update hook). Failure to do so will result in an error message:
The following module is marked as installed in the core.extension configuration, but it is missing:
media_library_theme_reset
If you'd still like the functionality from Media Library Theme Reset you can try
| Comment | File | Size | Author |
|---|---|---|---|
| #54 | Not-supported---Media-Library-Theme-Reset-8-1-5.png | 46.89 KB | rajab natshah |
| #28 | Screenshot 2023-11-04 at 09.34.56.png | 127.59 KB | thomas kaisuka |
| #27 | layout-builder-modal-without-gin-lb.png | 53.09 KB | flyke |
| #26 | 2-with-layout-builder-modal-and-patch-3214458.png | 52.46 KB | flyke |
| #26 | 1-before-with-layout-builder-iframe-modal.png | 87.61 KB | flyke |
Issue fork bootstrap_styles-3325150
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
mark_fullmerDue to concern over the "unsupported" status of Media Library Theme Reset, the maintainers have set it back to "supported" and instead marked the module as "deprecated." A summary of this, along with a timeline for marking it as "unsupported," is at #3325258: Mark Media Library Theme Reset as "Deprecated".
So sites using Bootstrap Styles may continue using Media Library Theme Reset. However, we encourage you to switch to using https://www.drupal.org/project/layout_builder_iframe_modal , as it will improve the user experience. I have functionally tested integration with Bootstrap Styles and Layout Builder Iframe Modal and everything works as expected, and the media library looks better: it matches whatever the site's administrative theme is, and does not employ any CSS overrides to do so.
Switching to Layout Builder Iframe Modal
The project page of Bootstrap Styles lists Media Library Theme Reset as a needed module. However, it is not a dependency in code. Therefore, sites should be able to switch as follows:
1. Add "Layout Builder Iframe Modal" to the site codebase. https://www.drupal.org/project/layout_builder_iframe_modal
2. If the site is using the alternate module "Layout Builder Modal," uninstall it and remove it from the codebase.
3. Enable "Layout Builder Iframe Modal."
4. Uninstall "Media Library Theme Reset" and remove it from the codebase.
Comment #3
rajab natshahThank you, Grabby, Mark
Following with issues which have the switch to layout_builder_iframe_modal
#3326412: Redirects to external URLs are not allowed by default. When adding or updating blocks
Comment #4
mylocaltrades commentedYou can't currently do this:
1. Add "Layout Builder Iframe Modal" to the site codebase. https://www.drupal.org/project/layout_builder_iframe_modal
2. If the site is using the alternate module "Layout Builder Modal," uninstall it and remove it from the codebase.
3. Enable "Layout Builder Iframe Modal."
4. Uninstall "Media Library Theme Reset" and remove it from the codebase.
The Bootstrap Styles module adds the Media Library Theme Reset module as a dependency in it's info.yml file.
I have tested this manually by removing the dependency and it works fine using the Layout Builder Iframe Modal module. So I think we just need to change or remove the dependency in the Bootstrap styles module info file?
Comment #5
rajab natshahWorking on that at
#3326408: Switch from Layout Builder Modal module to Layout Builder iFrame Modal module
#3326497: Switch from hard coded removes of regions and elements which not needed for the block edit form
Comment #6
hfernandes commentedI did some tests disabling the
layout_builder_modaland enabling thelayout_builder_iframe_modalmodule.Unfortunately, it's not as simple as that. The layout breaks because there are some CSS files manipulating the
#layout-builder-modaland the#drupal-off-canvas(for the default drupal behavior).My suggestion for this issue is:
1) Adjust the
bootstrap_styles_page_attachments_alterhook 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;3) Remove the
media_library_theme_resetdependency frombootstrap_styles.info.ymlandcomposer.jsonfiles;4) Update the module's
composer.jsonto "suggest" thelayout_builder_iframe_modal- https://getcomposer.org/doc/04-schema.md#suggestComment #7
rajab natshahAgrees with Halison.
It's not easy. We are doing that in Varbase 10.0.x branch.
Made all the needed changes. Still needs more refactoring work tho.
A bit of issues with styling an iframe in iframe in iframe
Some issues like:
#3326497: Switch from hard coded removes of regions and elements which not needed for the block edit form
Having more work on this to support Gin ( Dark and Light) mode, and Claro.
About the same like what Sascha did in #3276164: Add style overrides for the Gin admin theme
https://git.drupalcode.org/project/autocomplete_deluxe/-/commit/0e54417#...
Comment #8
acnimda commentedFor me the truth is.
1. Uncomment
- media_library_theme_reset:media_library_theme_resetinbootstrap_styles.yml.2. uninstall
media_library_theme_reset | drush pmu media_library_theme_reset3. Delete from codebase
composer remove drupal/media_library_theme_resetorrm -f web/modules/contrib/media_library_theme_resetConclusion:
media_library_theme_resetIs not essential to this moduleComment #9
mark_fullmerI agree with this framing of the issue, provided that there is not literally "breakage" as reported previously:
Comment #10
drupalnesia commentedSince Media Library Theme Reset is "deprecated" again now, this Bootstrap_styles module needs to update its code, see: https://www.drupal.org/project/bootstrap_styles/issues/3325150#comment-1...
Comment #11
socialnicheguru commentedUpload 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.
Comment #12
socialnicheguru commentedThis patch is a mistake. The other is fine
Comment #13
socialnicheguru commentedComment #14
ivnishPatch #11 works
Comment #15
vlad.dancerPath #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.
Comment #17
vlad.dancerComment #18
shaunole commentedNo issues found when testing//validating @vlad.dancer 's MR !55 against the 1.0.x branch. Updating status to RTBC
Comment #19
dastan56 commentedhi, the patch #11 was not working with 1.1.0, so i created this new patch, it removes media_library_theme_reset in both info.yml and composer.json file and replaces it with layout_builder_iframe_modal
Comment #20
dastan56 commentedif 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
Comment #21
dastan56 commentedComment #22
socialnicheguru commentedUpdate:
@dastan56 was correct in comment #20
not sure why that is but it does work.
--
None of the ones above applied for me.
The MR did not apply either.
I rerolled to apply to bootstrap_styles 1.1
Comment #23
socialnicheguru commentedin #6 the first 2 items have not been addressed:
Comment #24
flyke commentedSince layout_builder_iframe_modal seems problematic on frontend theme (see this issue) wouldn't it make more sense to require layout_builer_modal instead of layout_builder_iframe_modal ?
Comment #25
flyke commentedForgot something in previous patch.
Also please note that
composer require 'drupal/bootstrap_styles:^1.1' --prefer-sourceis the working command, just regular composer require or composer install wont apply the patch for some reason.
Comment #26
flyke commentedSo, 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 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
Comment #27
flyke commentedUpdate: 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.
Comment #28
thomas kaisuka commentedHello 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 am using Layout Builder Modal just as before without the worry of MLTR, which i have now disabled
Comment #29
c.altosax commentedI 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.
Edit: I can uninstall MLTR through the Drupal web UI, though its code is still present because Composer won't let me remove it. However, uninstalling it through the UI is enough for Drupal to stop warning about having a deprecated module installed. I can also install Layout Builder iFrame Modal, and it works as expected. As was mentioned in earlier comments, the styling is far from perfect, but it technically works.
Comment #30
trevorbradley commentedJust 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
Comment #31
andileco commentedThe
--prefer-sourceflag 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!Comment #32
ivnishComment #33
gerzenstl commentedWe 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:
and then apply the patch by running
composer installThe patch from #22 and #31 works on my setup.
Comment #34
websiteworkspace commentedWith 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
Comment #35
dehacker commentedApplied 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.
Comment #36
drupalnesia commentedWhy takes more than 1 year to fix the "Media Library Theme Reset" issue?
Comment #37
rajab natshah#5
#6
#7
Comment #38
jaypanwebsiteworkspace - 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.
Comment #39
mahmoud-zayed commentedAgree 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.
Comment #40
finn lewisHey 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
Comment #41
dehacker commentedAfter 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 was caused by a patch for depreciation messages emanating from this module. The solution was to remove the patch from composer.json.
Comment #42
maxilein commentedwhich patch? This patch? Could you please be specific?
Comment #43
drupler8 commented@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...
I posted this https://www.drupal.org/project/bootstrap_layout_builder/issues/3325151#c...
Is the answer definitively to go with Layout Builder iFrame Modal?
Thanks so much for your teams efforts and open source support!
Comment #44
flyke commentedI was unable to apply patch #31 to bootstrap_styles v1.1.5 for some reason.
Testing another patch for that.
Comment #45
flyke commentedNevemind.
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.
Comment #46
flyke commentedThe MR55 also works. You just have to use instructions from #33.
Composer.json:
This is what worked for me.
After that, I could successfully run:
drush pmu media_library_theme_resetComment #47
juagarc4 commentedHi 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 removed is not to install it at all, but it will be only possible once the MR has been merged into the base code.
Comment #48
andileco commentedFor 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.phpinside a directory I named "scripts" inside my root, with the following inside:3) I added the following inside my composer.json:
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.
Comment #49
rajab natshahThank you, for following up on this issue.
Decided to only remove the
media_library_theme_reset:media_library_theme_resetDevelopers in projects can manage any type of modals on their own way.
Allowing Developers to use Layout Builder Modal or Layout Builder iFrame Modal
Comment #52
rajab natshahComment #53
rajab natshahComment #54
rajab natshah✅ Released bootstrap_styles-1.1.6
Comment #55
szy commentedI'm not sure, if everything goes according to the plan ;)
After updating the site with composer:
... I see in the status report:
So it looks like the media_library_theme_reset is removed, but it wasn't completely uninstalled from the system.
Szy.
Comment #56
rajab natshahSzymon, you are right.
The module is not follwoing with latest Drupal changes.
Removed the module.
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.
Comment #57
kevin.pfeifer commentedWe solved this problem with the latest version by
would be nice if a drush updb hook would be added in the next patch release to do that automatically
Comment #58
papagrandeUnfortunately, this is not fixed.- media_library_theme_reset:media_library_theme_resetneeds to be removed from bootstrap_styles.info.yml to get rid of the dependency.Edit: Something else is blocking the update for this module.
Comment #59
papagrandeComment #60
papagrandeFor anyone else having trouble updating to 1.1.6 and beyond, remove any special settings in
repositoriesorconflictin your composer.json file that were added to make the patch work.Comment #62
xurizaemonUpdating title since patch proposes to add a replacement rather than just removing
Comment #63
leducdubleuet commentedThe 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".
Comment #64
xurizaemonThanks 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 @Rajab decided
I am hiding the patch from 31 (since now that #49 was committed, that patch doesn't apply).
Comment #65
marassa commentedShouldn'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.
Comment #66
freddy rodriguez#57 +1
Comment #67
andyf commentedJust to echo the first part of #55, if you install vanilla Drupal with bootstrap styles 1.1.5 and then update to 1.1.6 you will end up with an error message because you didn't uninstall media library theme reset before it got removed from the codebase. I think this needs a really clear warning in the release notes.
Re the last part of #57 I don't think it can be solved in code (eg. in an update) because it's plausible a site still wants the module enabled (it might even be a hard dependency of some other module on the site).
Comment #68
rajab natshahListed in the release note as provided by Andy
https://www.drupal.org/project/bootstrap_styles/releases/1.1.6
If you're updating from an earlier version, this module no longer requires Media Library Theme Reset (because it's unsupported). The update might cause the module to be removed entirely from your codebase, in which case you should uninstall Media Library Theme Reset before deploying the update (it can be done manually or in a post update hook). Failure to do so will result in an error message:
If you'd still like the functionality from Media Library Theme Reset you can try
Comment #69
rajab natshah