- Issue created by @kevinfunk
- Status changed to Needs work
4 months ago 6:32pm 10 July 2024 The patch supplied is for the example components. Doesn't really help for the custom ones built.
- 🇺🇸United States foodslover
Here’s the solution I used—I hope it helps!
1. **Update the Component Version**:
First, I updated the component to version `1.0.0-rc5`. Then, to resolve the issue in my custom module, `module_abc`, I applied the approach from [this patch]( https://www.drupal.org/files/issues/2024-07-10/3460633-02-unable-to-find... → ). Following the file structure in this patch, I mirrored the setup used for `component_example`.2. **Add the `components.yml` Configuration File**:
I created a `components.yml` configuration file for the custom component within `module_abc`. According to the example in the patch, the path should look like this:```plaintext
/docroot/modules/custom/custom_module_abc/modules/module_abc/components//.component.yml
```Inside this file, I used content similar to the patch:
```yaml
name: module abc
description: '......'
props:
type: object
properties: {}
```3. **Create the Required `.twig` Template File**:
In Drupal 10.3 and above, each component also requires a corresponding `.twig` template file. I added this `.twig` file in the same directory as the `.component.yml` file and named it according to the component:```plaintext
/docroot/modules/custom/custom_module_abc/modules/module_abc/components//.twig
```Inside the `.twig` file, I included the following basic structure:
```twig
{#
/**
* @file
* Required Twig template for components as of Drupal 10.3.
*/
#}
```After creating this empty `.twig` file, the error was resolved, and no further code changes were needed. The module is now functioning as expected.