Twig loader issue when using "Default" display and SDC row plugin
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3590371. --> Reported by: [ultimike](https://www.drupal.org/user/51132) Related to !13 !11 >>> <p>@lostcarpark and I stumbled across this bug while manually testing <span class="drupalorg-gitlab-issue-link drupalorg-gitlab-link-wrapper"><a href="https://git.drupalcode.org/project/views_row_sdc/-/work_items/3590280" class="drupalorg-gitlab-link">https://git.drupalcode.org/project/views_row_sdc/-/work_items/3590280</a></span>.</p> <p><code>Twig\Error\LoaderError: Template "" is not defined in "__string_template__111883bdd7f89a285ea0a269a5180538" at line 2. in Twig\Loader\ChainLoader-&gt;getCacheKey() (line 111 of /var/www/html/vendor/twig/twig/src/Loader/ChainLoader.php).</code></p> <p>To reproduce:</p> <p>Create a new view, do not add a page nor block display to start.<br> Click "Field" in the "Show" section to change the row plugin to "Single Directory Component".<br> Click "Apply" to switch the row plugin and a standard "Oops, something went wrong. Check your browser's developer console for more details." error will appear.</p> <p>There will also be a message (pasted above) in "Recent log messages."</p> <p>Adding a simple Views template to the module doesn't solve this issue. </p> <p>plugin class: </p> <pre>#[ViewsRow(<br>&nbsp; id: "sdc_component",<br>&nbsp; title: new TranslatableMarkup("Single Directory Component"),<br>&nbsp; help: new TranslatableMarkup("Display each row of the result in a Single Directory Component"),<br>&nbsp; display_types: ["normal"],<br>&nbsp; theme: "views_view_views_row_sdc_row",<br>)]</pre><p>.module file: </p> <pre>function views_row_sdc_theme() {<br>&nbsp; return [<br>&nbsp;&nbsp;&nbsp; 'views_view_views_row_sdc_row' =&gt; [<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'variables' =&gt; [<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'content' =&gt; NULL,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ],<br>&nbsp;&nbsp;&nbsp; ],<br>&nbsp; ];<br>}</pre><p>Template file (views_view_views_row_sdc_row.html.twig):<br> <code>{{ content }}</code></p>
issue