Problem/Motivation

The flowdrop_ui_components:editor SDC component defines playground_url as type: string in its schema, but WorkflowController::edit()
explicitly passes NULL when the flowdrop_playground module is not enabled:

  $playground_url = NULL;
  if ($this->moduleHandler()->moduleExists('flowdrop_playground')) {
    $playground_url = Url::fromRoute('flowdrop_playground.page', [...])->toString();
  }
  

This causes a Twig runtime error:

  [flowdrop_ui_components:editor/playground_url] NULL value found, but a string or an object is required.
  

The template already handles NULL correctly with {% if playground_url %}, so the issue is purely in the schema definition.

Steps to reproduce

  1. Install flowdrop with flowdrop_workflow enabled but without flowdrop_playground
  2. Navigate to any workflow editor page
  3. The page crashes with a Twig RuntimeError about playground_url

Proposed resolution

Change the playground_url prop type in editor.component.yml from type: string to type: ['string', 'null'] to allow NULL values.

Remaining tasks

Review and merge.

User interface changes

None.

API changes

None.

Data model changes

None.

Issue fork flowdrop-3573707

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

stmh created an issue. See original summary.

d34dman’s picture

Status: Active » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.