Media Library Theme Reset not supported

Created on 3 December 2022, over 1 year ago
Updated 1 March 2024, 4 months ago

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

πŸ› Bug report
Status

Needs review

Version

2.0

Component

Code

Created by

πŸ‡­πŸ‡ΊHungary Grabby

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

Merge Requests

Comments & Activities

Not all content is available!

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

  • Merge request !22Require bootstrap_styles:^2.0 β†’ (Open) created by andileco
  • πŸ‡³πŸ‡¬Nigeria chike Nigeria

    As per #4, attempting to uninstall 'Media Library Theme Reset' is prevented,

    The following reason prevents Media Library Theme Reset from being uninstalled:
    Required by: bootstrap_styles, bootstrap_layout_builder, layout_builder_blocks

  • πŸ‡³πŸ‡¬Nigeria chike Nigeria

    As a side note, 'layout_builder_iframe_modal' broke the styles from 'bootstrap_styles' while 'layout_builder_modal' worked better.

  • πŸ‡³πŸ‡¬Nigeria chike Nigeria

    Sorry it is my bad, I shouldn't have installed 'layout_builder_blocks' and that was messing with the setup. I later found out 'layout_builder_modal' also had issues cos trying to type in a custom block, the text were not visible, they were apparently colored white and wasn't visible on the white background.

    I removed 'layout_builder_blocks' (which I should not have installed in the first place) and 'layout_builder_iframe_modal' worked while 'layout_builder_modal' continued giving the invisible text issue so I removed 'layout_builder_modal' as well.

  • πŸ‡³πŸ‡¬Nigeria chike Nigeria

    I think I have gotten myself utterly confused. I sure should install 'layout_builder_blocks' I checked my old D9 sites and I do have it enabled and it is working well with 'layout_builder_modal'.

    In D10 it is giving the above mentioned issues conflicting with both 'layout_builder_iframe_modal' and 'layout_builder_modal' as described above.

    I found this issue already reported for 'layout_builder_iframe_modal' https://www.drupal.org/project/layout_builder_blocks/issues/3238141 ✨ Support for Layout Builder iFrame Modal Active and I opened a new issue for layout_builder_modal, https://www.drupal.org/project/layout_builder_blocks/issues/3346996 πŸ› Texts not visible in CKEditor and layout_builder_modal taking so long to load Needs review

  • πŸ‡¬πŸ‡§United Kingdom dawnherald

    Trying to enable Boostrap Layout Builder

    I think I'm past the confusion but there is no progressive workable solution with layout builder iframe modal.

    Add Bootstrap Grid support to Layout Builder module.
    
    Machine name: bootstrap_layout_builder
    Requires: Bootstrap Styles (disabled)Layout Builder, Layout Discovery, Contextual Links, Block, Media Library Form Element (disabled), Media Library, Media, File, Field, Image, User, System, Views, Filter, Media Library Theme Reset (disabled)

    It seems impossible to implement bootstrap layout builder without media Library Theme Reset, despite its deprecated status and advocation for Layout Builder Iframe Modal.

    If someone has implemented this, could they say how?

    I tried the approved release and dev release of Bootstrap Layout Builder, both require Media Library Theme Reset.

    I know its hard to remove it post install, so would very much appreciate guidance on getting Bootstrap Layout Builder correctly with Layout Builder IFrame Modal.

    Is there a risk of going with Media Library Theme reset and not being able to update to the current and future correct Boostrap Layout Builder ecosystem?

    What is the current Bootstrap Layout Builder eco system of modules?

    https://www.drupal.org/project/bootstrap_layout_builder β†’
    https://www.drupal.org/project/bootstrap_styles β†’
    https://www.drupal.org/project/layout_builder_iframe_modal β†’
    https://www.drupal.org/project/layout_builder_blocks β†’ (requires styles, so questionable)

    https://www.drupal.org/project/section_library β†’
    https://www.drupal.org/project/block_library β†’

    composer require 'drupal/bootstrap_styles:2.0.x-dev@dev' still requires Bootstrap styles 1.1, regardless of bootstrap styles 2 being recommended.

    Answers and a best way to proceed for anyone beginning with bootstrap layout builder would be much appreciated.

  • First commit to issue fork.
  • Status changed to Needs review about 1 year ago
  • πŸ‡ΊπŸ‡ΈUnited States shaunole

    Rebased previous commit in issue fork against 2.x.

  • πŸ‡§πŸ‡ͺBelgium flyke

    @andileco
    My colleague @yospyn and I tested using bootstrap_styles:^2.0 with bootstrap_layout_builder:2.0.1 (we had to trick Composer to allow us to do this)
    How Exactly ?
    I am trying to update bootstrap_layout_builder and layout_builder_blocks in my project, but having difficulties.
    Problem 1
    - drupal/bootstrap_layout_builder[dev-2.x, 2.x-dev] require drupal/bootstrap_styles ^1.1 -> found drupal/bootstrap_styles[1.1.0] but it conflicts with your root composer.json require (2.0.x-dev@dev as 1.0).
    - drupal/bootstrap_layout_builder 2.x-dev is an alias of drupal/bootstrap_layout_builder dev-2.x and thus requires it to be installed too.
    - Root composer.json requires drupal/bootstrap_layout_builder 2.x-dev@dev -> satisfiable by drupal/bootstrap_layout_builder[2.x-dev (alias of dev-2.x)].

  • πŸ‡ΊπŸ‡ΈUnited States potassiumchloride

    I appreciate @mark_fullmer giving a list of steps, but I do not see consensus on how to move forward. Like @dawnherald, I have questions about how the preferred set of modules.

    I've got a Drupal 9.5.10 site with: Bootstrap Layout Builder 2.1.1, Bootstrap Styles 1.10, Media Library Theme Reset 8.x-1.5, Layout Builder Modal 8.x-1.2, Layout Builder iFrame Modal 1.3.0, and Layout Builder Restrictions 8.x-2.19 installed.

    This was working perfectly until updating to CKEditor 5 and installing Layout Builder iFrame Modal, and now the WYSIWYG for blocks (only while using Layout Builder) are showing white text on a white background (like @chike but without Layout Builder Blocks installed), rendering them nearly impossible to use.

    @mark_fullmer (above) said this:

    Switching to Layout Builder Iframe Modal
    The project page of Bootstrap Layout Builder 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.

    If there's folks in my position with Layout Builder iFrame Modal, Layout Builder Modal, and Media Library Theme Reset installed and enabled, should the steps be these?

    1. Update Bootstrap Layout Builder (2.1.2) and Bootstrap Styles (1.1.1)
    2. Disable "Layout Builder iFrame Modal"
    3. Uninstall "Layout Builder Modal," and remove it from the codebase.
    4. Enable "Layout Builder iFrame Modal."
    5. Uninstall "Media Library Theme Reset" and remove it from the codebase.

    Because @flyke ran into the requirements still for Media Library Theme Reset, does anyone know:

    Does Bootstrap Layout Builder 2.1.2 still require Media Library Theme Reset?
    Does Bootstrap Styles 1.1.1 still require Media Library Theme Reset?

  • πŸ‡§πŸ‡ͺBelgium flyke

    For me the steps were:

    - Download layout_builder_iframe_modal
    composer require 'drupal/layout_builder_iframe_modal:^1.3'

    - Add this diff from this issue for bootstrap_layout_builder in composer.json:

                "drupal/bootstrap_layout_builder": {
                    "#3325151": "https://git.drupalcode.org/project/bootstrap_layout_builder/-/merge_requests/22.diff"
                },

    composer install

    - Add patch #22 from issue #3325150 πŸ› Media Library Theme Reset not supported Needs work for bootstrap_styles in composer.json:

                "drupal/bootstrap_styles": {
                    "#3325150": "https://www.drupal.org/files/issues/2023-06-30/3325150-remove-media-library-theme-22.patch"
                },

    ddev composer require 'drupal/bootstrap_styles:^1.1' --prefer-source
    (just composer install did not work for me to apply the patch)

    - Enable Layout Builder iFrame Modal
    drush en layout_builder_iframe_modal

    - Disable Media Library Theme Reset
    drush pmu media_library_theme_reset

    Now it disabled media_library_theme_reset without having to disable other modules in my case.

  • πŸ‡¬πŸ‡ͺGeorgia almador

    Thank you flyke!

    The solution in #19 helped me to uninstall the "Media Library Theme Reset".

  • πŸ‡ΊπŸ‡ΈUnited States yospyn

    Confirming flyke's solution in #19 worked for me as well. Very helpful thanks!

    layout_builder_iframe_modal is a bit wacky looking at least for me, but it works.

  • πŸ‡¨πŸ‡¦Canada TrevorBradley

    Just wandered in here from Media Library Theme Reset. It looks like the transition is finally here. The module is no longer "deprecated" but has now moved into "unsupported" state. See: https://www.drupal.org/project/media_library_theme_reset β†’

  • πŸ‡¨πŸ‡¦Canada TrevorBradley

    Just a heads up for anyone having issues deploying this.

    I previously had bootstrap_layout_builder 2.1.2, which required bootstrap_styles 1.1.5, which required media_library_theme_reset 1.5.0

    The strategy of the patch is to require bootstrap_styles:^2.0 - a little dicey as bootstrap_styles 2.x doesn't have a release branch, but let's run with it.

    It's insufficient to simply patch composer.json, as the composer dependencies don't care for patches. To get around this, you need to (temporarily) install bootstrap_layout_builder from a different source, to avoid composer dependencies. In the repositories section of composer.json:

            {
                "type": "package",
                "package": {
                    "name": "drupal_git/bootstrap_layout_builder",
                    "version": "2.1.2",
                    "type": "drupal-module",
                    "source": {
                        "url": "https://git.drupalcode.org/project/bootstrap_layout_builder.git",
                        "type": "git",
                        "reference": "2.1.2"
                    }
                }
            }

    Then in the patches section of composer.json:

    wget https://git.drupalcode.org/project/bootstrap_layout_builder/-/merge_requests/22.diff
    mv 22.diff patches/3325151-bootstrap_layout_builder-media_library_theme_reset_not_supported-20231215.diff
                "drupal_git/bootstrap_layout_builder": {
                  "3325151: Media Library Theme Reset not supported": "patches/3325151-bootstrap_layout_builder-media_library_theme_reset_not_supported-20231215.diff"
                }
    

    (don't put merge_requests directly into your composer.json, kids)

    And in the require section of composer.json:

    "drupal_git/bootstrap_layout_builder": "^2.1.2",

    (Usually I reserve this drupal_git repository trick for patched dev branches, but it'll work here for now. This whole drupal_git business )

    Run composer install to get bootstrap_layout_builder installed.

    For some reason, this didn't upgrade bootstrap_styles for me. I had to do the following steps:

    1) composer require drupal/bootstrap_styles:^2.0
    2) I had to do a drush cex (to capture changes to bootstrap_styles.settings.yml), remove media_library_theme_reset: 0 from my core.extension.yml and do a drush cim

    I think this leaves me with a system upgraded to bootstrap_styles-2.x dev branch, no dependency on media_library_theme_reset (imposed by bootstrap_styles 1.1.5) and media_library_theme_reset removed from my system.

    Initial testing suggests this is working fine. My Bootstrap Layout Builder admin menu is working as expected, my odd custom bootstrap layout sections appear to be working. Going to deploy this to my dev server and see if it survives further testing...

  • πŸ‡¨πŸ‡¦Canada TrevorBradley

    Testing looks good on my systems here. Layout Builder styles seem to apply well, no weirdness, errors on editing, creating styles, etc.
    +1 to switching to bootstrap_styles 2.x branch. :D

  • πŸ‡­πŸ‡ΊHungary janoka

    I tested with the feedback of @flyke (thanks for the information!), and it worked well with the patch.

    Review: So, with the given description of the modification suitable.

  • πŸ‡ΊπŸ‡ΈUnited States Amstercad

    This new recipe with layout_builder_iframe_modal is working for me on a newly developed Drupal 10.2.2 website, however the functional style-sheets of one of the modules fails to load in the new modal window when a Section is clicked. What displays is only HTML except for the section at the bottom which uses a stylesheet from the Claro theme.

    Selecting a desired radio button to set section widths successfully is not something obvious to do, and tabbing to select isn't possible either. In my case, clicking about 3cm to the right and down a bit selects the desired radio button. Most people would regard a setup like mine as failing completely, but aside from a critical stylesheet failing to load, Bootstrap Layout Builder and Bootstrap Styles are functional and overall useful on this website, thank goodness! I need the Layout Builder breakpoints more than anything.

    It is not clear to me what stylesheet is failing to load, or why. Or even which module it belongs to. The console doesn't give a clue either, however FireFox devtools sometimes displays an error message that can be clicked away that says a stylesheet failed to load. So far I cannot consistently make that error message appear.

    For what it is worth, this is a new install so I never had this recipe working with Media Library Theme Reset earlier. This is my composer.json:

    require section:

            "drupal/bootstrap_layout_builder": "^2.1",           <-- 2.1.2
            "drupal/bootstrap_styles": "^1.1",                        <-- 1.1.5
            "drupal/layout_builder_iframe_modal": "^1.3",    <-- 1.3.0
    

    Patches section:

                "drupal/bootstrap_layout_builder": {
                    "#3325151": "https://git.drupalcode.org/project/bootstrap_layout_builder/-/merge_requests/22.diff",
                    "3335356: Clean up UI for 2x branch": "https://git.drupalcode.org/project/bootstrap_layout_builder/-/merge_requests/24.diff"
                },
                "drupal/layout_builder_iframe_modal": {
                    "3342501: Uncaught exception 'TypeError' with message": "https://www.drupal.org/files/issues/2023-12-04/check_for_non_null_route_name.patch"
                },
                "drupal/bootstrap_styles": {
                    "#3325150: Media Library Theme Reset not supported":  "https://www.drupal.org/files/issues/2023-12-15/3325150-media-library-theme-reset-ns-31.patch",
                    "3282082: Support Bootstrap 5 on bootstrap_styles module.": "https://www.drupal.org/files/issues/2022-06-14/Fix-support-bootstrap-5-on-bootstrap-styles-3282082-%233.patch",
                    "3402358: aos.local is never loading": "https://www.drupal.org/files/issues/2023-11-17/bootstrap_styles-3402358-2.patch",
                    "3402978: Text Alignment icons do not appear with Bootstrap 5": "https://www.drupal.org/files/issues/2023-11-20/3402978-text-alignment-bootstrap5-compatibility-2.patch"
                }
  • πŸ‡ΊπŸ‡ΈUnited States Amstercad

    ...for whatever reason, my prior comment failed to include this screen scapture of what I see on a fresh Drupal install when I try to edit a Section using these tools, given the details I've previously written about.

  • πŸ‡ΊπŸ‡ΈUnited States drupler8

    Hi,
    I am seeking help on what the correct solution is. I have spent a while looking at this and have confused myself.

    Option 1: Are we supposed to go with a solution like @flyke #19 which looks like #27?
    Option 2: Are we supposed to go with @TrevorBradley #23 an not use the iframe modal?
    Option 3: Should I remain calm and wait for official releases of drupal/bootstrap_styles and drupal/layout_builder_blocks to come out?

    I was able to get option 1 (#19)working, but it really looks pretty poor so far and .

    I was able to get option 2 (#23) almost working, I have Media Library Theme Reset uninstalled via drush, but I can not remove it via composer :(.

    Any guidance would be great. I just want to go in the correct direction.

    Thanks!

  • πŸ‡ΊπŸ‡ΈUnited States imrodmartin

    also getting the formatting issues from #27 after applying #19 and agree with #28 - what's the best approach please? Very much appreciate all the work going on to make Layout Builder a very usable tool.

  • Same here - just did #19 and ran into the same issues like #27.
    How to handle this here?

  • πŸ‡©πŸ‡ͺGermany mericone

    There is no way around replacing Media Library Theme Reset with Layout Builder iFrame Modal as the former is no longer supported.

    After following #19, you need to go to /admin/config/content/layout_builder_iframe_modal and exclude Bootstrap Layoutbuilder from being displayed in a modal (see screenshot, I am sorry, but I only have a German version). This should help anyone having problems with the Bootstrap Layoutbuilder interface not displaying properly.

  • πŸ‡¦πŸ‡ΊAustralia nickgeorgiou

    Also facing the styling issues in #27 with Claro theme. Is it possible that we need to render it in the Front-End theme still? There should be an option to choose which theme it renders in.

  • πŸ‡§πŸ‡ͺBelgium flyke

    This is the relevant composer setup that worked for me to be able to remove media_library_theme_reset and use layout_builder_iframe_modal:

    {
        ...
        "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"
                }
            }
        }
    }

    With this setup, I was able to disable media_library_theme_reset.
    drush pmu media_library_theme_reset

  • πŸ‡ΊπŸ‡ΈUnited States imrodmartin

    thank you to everyone !

    #19 worked for me - then the update to config at #31! (#33 works as well)

    have updated several sites already - works great!

  • πŸ‡¨πŸ‡¦Canada dac_ca

    Hi folks. I am a new Drupal user and this module is required for a tutorial I am following. I am an experienced bootstrap user but do not have any Drupal sites in production either with or without this module :). If you were me, would you follow the instructions in #19+#31 (#33) or simply wait for a module update that removes the dependency on media_library_theme_reset?

  • πŸ‡ΊπŸ‡ΈUnited States imrodmartin

    @dac_ca

    there's no telling when the patch will be committed. If you are doing tutorials - go ahead and do 19+31. If you want a completed site with those patches done already - you can grab my starter site. (you'll need a gitpod.io account) - https://rodsurl.com/startersite. Username/pw is admin.

    It's a setup I use for training and you're more than welcome to it. It's a completely finished layout builder config.

    otherwise - yep - go ahead and patch whatever you're working on. You'll likely need this blog post to learn how to do a patch if you don't already know - https://gorannikolovski.com/blog/how-to-apply-a-patch-in-drupal
    hth

  • πŸ‡¨πŸ‡¦Canada dac_ca

    @imrodmartin

    Thank you for the help! I'll follow your advice and I'll check out the patch info. I've been a software developer for years so I hope the patching will be easy. I'll also check out gitpod.io and your site. If its ok with you, I'll see if I can copy your sample site to my development system so I can play with it. Thanks again. I hope all is well.

  • πŸ‡³πŸ‡¬Nigeria chike Nigeria

    @dac_ca I thought about this two days when I installed a new site using steps at #33 then I found layout_builder_iframe_modal wasn't showing a good UI so I tried to remove it but found out I couldn't cos the method at #33 made bootstrap_layout_builder require it so I had to unstall bootstrap_layout_builder before I would be able to uninstall layout_builder_iframe_modal.

    I then realized the implication of one using his own methods, if the module finally makes an update to remove the dependency on media_library_theme_reset and the way the modules goes does not play with your custom way, you have to roll back to follow the module and if you have built a heavy site, it wouldn't be easy rolling back. E.g. before I could uninstall layout_builder_iframe_modal I had to disable all layouts made with bootstrap_layout_builder and then uninstall bootstrap_layout_builder. I could do that because it was still a new site, if I had gone far with the project it won't be that easy removing layout_builder_iframe_modal. Perhaps there could be some type of way of requiring all the projects independently in localhost and overwriting in production. But to be safer I would suggest waiting for the module to make an update so you are not left to fight your fires alone.

Production build 0.69.0 2024