Active
Project:
Canvas Bootstrap
Version:
1.0.8
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
2 Sep 2026 at 17:19 UTC
Updated:
2 Sep 2026 at 17:19 UTC
Jump to comment: Most recent
When a component provider is a theme (e.g., bootstrap_theme), the method CanvasBootstrapFormHooks::resolveComponentMetadataPath() attempts to call:
$this->pathResolver->getPath('module', $provider);
This generates:
User warning: The following module is missing from the file system: bootstrap_theme
followed by:
Deprecated function: dirname(): Passing null to parameter #1 ($path)
because getPath() returns null for missing extensions.
Use a custom theme with sdc components and canvas_bootstrap togheter.
Check if provider is a theme or is a module before calling getPath():
$theme = \Drupal::service('theme_handler')->getTheme($provider);
if ($theme) {
// Is a theme
}
elseif (\Drupal::service('module_handler')->moduleExists($provider)) {
// Is a module
}
None
None
None
None
Comments