Closed (fixed)
Project:
Bootstrap Styles
Version:
2.0.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
19 Sep 2023 at 09:57 UTC
Updated:
11 Oct 2023 at 17:29 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
mahmoud barhouma commentedComment #3
rajab natshahThank you, Mahmoud, for reporting.
Comment #4
rajab natshahNot sure if this issue is related to #3388027: Cannot create bootstrap layout configuration for entities view modes
https://www.drupal.org/project/bootstrap_styles/issues/3388027#comment-1...
Try to use Bootstrap Styles 1.1.1
Add the following static require
"bootstrap_styles":"1.1.1"to your rootcomposer.jsonfilePlease, confirm if you still have the issue
Comment #5
rajab natshahComment #6
mahmoud barhouma commentedComment #7
mahmoud barhouma commentedThank you rajab will use bootstrap styles 1.1.1
Comment #8
rajab natshahI confirm the issue.
Is this in a multilingual site? And with Translatable enabled?
The AJAX is not providing the right media ID type
It could be an issue with local, and translate, trying to translate the Media ID number for the Background Media
layout_builder/configure/section/overrides/node.1/3?_wrapper_format=drupal_dialog.off_canvas&ajax_form=1&_wrapper_format=drupal_ajaxComment #9
mahmoud barhouma commentedThank you Rajab it's worked when downgrade bootstrap style, and I will check last your solution
Comment #10
jon nunan commentedI'm hitting this too.
I think I've found the issue, for a new section, submitStyleFormElements is adding `media_id` while the group_elements array for it is some form elements to select an image, and not a raw media_id like I think the code is expecting?

EDIT: to be clear if it is this, its more a Bootstrap Styles bug, so maybe this issue should be in that project?
Comment #11
rajab natshahComment #12
rajab natshahThanks Jon for the hint.
This issue was fixed in the
1.0.xbranchin #3221526: Fix rendering both Background Color and Background Image or Video
Comment #13
rajab natshahFaced the same issue in a custom Bootstrap theme.
I find out that if the front-end theme for example was Bootstrap Barrio 5.5 or a sub theme of it.
or any custom Bootstrap ~5.0 themes
The Layout Builder will call the the Media Library modal window using the front-end default Theme while editing the layout
then something is wrong with the
"views-mini-pager.html.twig"template fileIf the issue is fixed with the mini pager for the Media Library view no longer the issue will show up.
Please, check the mini pager view template format + your front-end theme + Layout Builder layout editing theme.
Comment #14
jon nunan commentedYeah sorry, should have specified, this is when using a drupal/bootstrap5 generated subtheme.
Have checked `views-mini-pager.html.twig` and I don't see anything wrong. Just seems to be some whitespace differences and a couple extra classes.

Comment #15
jon nunan commentedPatch attached fixes the issue for me,
With live preview on, the "add media" fields from media_library_form_element were the "values" for the background media image & video fields. So have added a $form_state->cleanValues(); call to remove them before processing the values further.
Have also cleaned up some logic around the value being in `media_library_selection` in some cases.
Comment #16
chikeThanks @Jon Nunan patch #15 is working for me.
Comment #17
rajab natshahThanks, Jon, for the patch
Hitting another issue on #3390195: Fix Illegal offset type error with Bootstrap Styles when media library selection is present
Feels that both should be committed
Comment #18
rajab natshahComment #19
rajab natshahComment #21
rajab natshahComment #22
rajab natshahComment #23
rajab natshah✅ Released bootstrap_styles 1.1.5