- Issue created by @marc.bau
- 🇧🇪Belgium flyke
Temporary fix, using CDN instead of including the necessary bootstrap file in the theme itself:
edit bootstrap.libraries.yml and add a new 'bootstrap-js' library which for now uses a CDN url for the necessary js file.
Then edit the global-styling library and add bootstrap/bootstrap-js as a dependency:global-styling: version: VERSION css: component: css/components/variables.css: { weight: -20 } css/components/affix.css: {} css/components/book.css: {} css/components/contextual.css: {} # @see https://www.drupal.org/node/2389735 css/components/feed-icon.css: {} css/components/field.css: {} css/components/header.css: {} css/components/help.css: {} css/components/icons.css: {} css/components/image-button.css: {} css/components/item-list.css: {} css/components/list-group.css: {} css/components/media.css: {} css/components/page.css: {} css/components/search-form.css: {} css/components/shortcut.css: {} css/components/sidebar.css: {} css/components/site-footer.css: {} css/components/skip-link.css: {} css/components/table.css: {} css/components/tabledrag.css: {} css/components/tableselect.css: {} css/components/tablesort-indicator.css: {} css/components/ui.widget.css: {} css/components/tabs.css: {} css/components/toolbar.css: {} css/components/user.css: { weight: -10 } # @see https://www.drupal.org/node/2389735 css/components/vertical-tabs.css: {} css/components/views.css: {} css/components/webform.css: {} css/components/ui-dialog.css: {} css/components/progress.css: { weight: -10 } theme: css/print.css: { media: print } dependencies: - core/drupal - bootstrap/bootstrap-js bootstrap-js: version: '5.3.3' js: https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.3/js/bootstrap.min.js: { type: external, minified: true }
- 🇩🇪Germany marc.bau
Well, my websites should not depend on external servers. All files must come from my machine.
- 🇧🇪Belgium flyke
I agree, its up to the maintainers of this module to include the necessary files.
This is just a workaround. - 🇩🇪Germany marc.bau
themes/contrib/bootstrap/js/bootstrap.js
is a file that exist in B3, but dot not in B5. But the references to the file still exists in code. That is the reason why this error bubbles up. Only the reference need to be removed I think. - 🇧🇪Belgium flyke
I think the file is needed, I think without it JS functions like closing a status message by clicking on the X will not work, or info popups (popper.js stuff) will also not work without it I think. But feel free to test by removing it from the libraries.yml file, clear your cache, and try to close any status message. Like when clearing caches from the frontend, try to close the all caches have been cleared message.
- 🇵🇪Peru hatuhay Lima
If the error is showing on the sass subtheme version, then themes/contrib/bootstrap/js/bootstrap.js is copied from npm loaded bootstrap folder using gulp
- Status changed to Fixed
4 months ago 1:42pm 13 September 2024 Automatically closed - issue fixed for 2 weeks with no activity.