Editor component SDC schema does not allow null for playground_url prop
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3573707. -->
Reported by: [stmh](https://www.drupal.org/user/35538)
Related to !4
>>>
<h3 id="summary-problem-motivation">Problem/Motivation</h3>
<p> The <code>flowdrop_ui_components:editor</code> SDC component defines <code>playground_url</code> as <code>type: string</code> in its schema, but <code>WorkflowController::edit()</code><br>
explicitly passes <code>NULL</code> when the <code>flowdrop_playground</code> module is not enabled:</p>
<pre>
$playground_url = NULL;
if ($this->moduleHandler()->moduleExists('flowdrop_playground')) {
$playground_url = Url::fromRoute('flowdrop_playground.page', [...])->toString();
}
</pre><p> This causes a Twig runtime error:</p>
<pre>
[flowdrop_ui_components:editor/playground_url] NULL value found, but a string or an object is required.
</pre><p> The template already handles NULL correctly with <code>{% if playground_url %}</code>, so the issue is purely in the schema definition.</p>
<h4 id="summary-steps-reproduce">Steps to reproduce</h4>
<ol>
<li>Install flowdrop with flowdrop_workflow enabled but <strong>without</strong> flowdrop_playground</li>
<li>Navigate to any workflow editor page</li>
<li>The page crashes with a Twig RuntimeError about playground_url</li>
</ol>
<h3 id="summary-proposed-resolution">Proposed resolution</h3>
<p> Change the <code>playground_url</code> prop type in <code>editor.component.yml</code> from <code>type: string</code> to <code>type: ['string', 'null']</code> to allow NULL values.</p>
<h3 id="summary-remaining-tasks">Remaining tasks</h3>
<p> Review and merge.</p>
<h3 id="summary-ui-changes">User interface changes</h3>
<p> None.</p>
<h3 id="summary-api-changes">API changes</h3>
<p> None.</p>
<h3 id="summary-data-model-changes">Data model changes</h3>
<p> None.</p>
issue