Problem/Motivation
When choosing a layout for a section, the following error appears:
Twig\Error\LoaderError: Template "/asmbly/web/modules/contrib/bootstrap_styles/images/ui/layout.svg" is not defined in "__string_template__1d495723f3fb6444e2a82660924999132ec13ce5ff97e15d708cd688b66b4683" at line 1. in Twig\Loader\ChainLoader->getCacheKey() (line 142 of D:\xampp\htdocs\asmbly\vendor\twig\twig\src\Loader\ChainLoader.php).
Steps to reproduce
Using Drupal 8.9.11, Bootstrap 3.
Upgraded the module to 2.0.0 with composer. Enabled Bootstrap Styles.
When trying to choose a layout for a section in Layout Builder (clicking on e.g. Bootstrap 2 Cols), the layout details do not show and the above error appears in watchdog.
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | 2020-12-20_211314.jpg | 197.73 KB | g0105 |
| #3 | Error_when_choosing_a_layout-3188729-3.patch | 782 bytes | jordik |
Comments
Comment #2
jordik commentedComment #3
jordik commentedRemoving the base_path() while generating the tabs with icons solved the issue for me.
Comment #4
jordik commentedComment #5
g0105 commentedHello, the patch didn't help. I am using Drupal 9.1.0, Drupal Commerce 2.21, Bootstrap Layout Builder 2.0.0
When editing the layout in Commerce / admin / commerce / config / product-types / default / edit / display / default / layout
I see huge icons and non-working sections
Comment #6
rajab natshahHaving the same issue with Drupal 9.
And when the site is located in a sub-directory.
And when the site is a multilingual website with a URL language selection.
much like
#3183443: Fix Unable to add a block in layout and it gives ajax error
Suggesting to remove base_path or change it to the original path
\Drupal::request()->getSchemeAndHttpHost() . \Drupal::request()->getBaseUrl()Removing the base_path is the better option in my opinion.
Comment #7
rajab natshahComment #8
rajab natshahComment #9
rajab natshahComment #10
jordik commented@RajabNatshah - please explain the difference between the patch you provided in #8 and the patch provided in #3.
Comment #11
rajab natshahOh sorry Jordan
They are the same!
I think I mixed that up with
#3183443: Fix Unable to add a block in layout and it gives ajax error
They had
'/' .in the patchalso
#3191446: Fix base path issues with multilingual websites and if Drupal was located in a sub-directory
I'm testing this nice module along with the Bootstrap Styles, Layout Builder Blocks .. modules
#3190716: Start a 10.0.x branch for Varbase Layout Builder to use Bootstrap Styles and Bootstrap Layout Builder
I removed my patch file to have yours back in the default list
Comment #12
rajab natshahComment #13
jordik commentedThank you for the clarification Rajab! Can you confirm the patch in #3 works for you?
Comment #14
rajab natshahPatch #3 is working well.
Thank you.
Send to RTBC
Comment #16
mahmoud-zayed commentedComment #17
mahmoud-zayed commented