- 🇨🇭Switzerland grumpy74 Geneva, CH 🇨🇭
@dkosbob , @sagarchauhan, I had the same problem as you guys !
Be careful to place your components folders and files under the "templates" folder of your theme (where you usually place your Drupal templates .html.twig). The plugin discovery manager only check in those locations apparently.
Hope that helps !
By the way, thank you @e0ipso for the great job on that modules ecosystem.
- Status changed to Active
over 1 year ago 1:08am 2 April 2023 - 🇵🇹Portugal LuisPimentelLopes Lisbon 🇵🇹🇪🇺
Hi, I also installed Storybook with Drupal integration with the reproduction steps and got the same issue but on the 2.0.0-alpha1.
After a quick debug, it seems the controller is trying to create an instance of a plugin that doesn't exists.
/** * Creates an instance. * * @throws \Drupal\sdc\Exception\ComponentNotFoundException * * @internal */ public function createInstance($plugin_id, array $configuration = []): Component { $configuration['app_root'] = $this->appRoot; $configuration['enforce_schemas'] = $this->shouldEnforceSchemas( $this->definitions[$plugin_id] ?? [] ); try { $instance = parent::createInstance($plugin_id, $configuration); if (!$instance instanceof Component) { throw new ComponentNotFoundException(sprintf( 'Unable to find component "%s" in the component repository.', $plugin_id, )); } return $instance; } catch (PluginException $e) { // Cast the PluginNotFound to a more specific exception. $message = sprintf( 'Unable to find component "%s" in the component repository. [%s]', $plugin_id, $e->getMessage() ); throw new ComponentNotFoundException($message, $e->getCode(), $e); } }
- 🇩🇪Germany woldtwerk Stralibu
got the same error. plugin definitions is always an empty array.
- 🇺🇸United States markdorison
We have experienced this issue when creating a new component but (so far) have been able to resolve it by rebuilding Drupal's cache.