#3604010 Twig computed value returns empty string

WebformElementWebformComputedTwig.computedValue resolves to an empty string on non-CLI requests: WebformComputedTwig::computeValue() bails out when there is no active theme, and WebformThemeManager::hasActiveTheme() is route-based. WebformForm::buildFormRequest() builds the form under a route-less request (to keep RouteParametersWebformSourceEntity from electing a spurious source entity), so no route name is present and the Twig guard fires.

The existing value-level coverage in ComputedTest cannot catch this: the test runner is CLI, so the PHP_SAPI !== 'cli' half of the guard is always false and the bail out is skipped regardless of the route. This test asserts the build-time mechanism instead - that the form-build request carries a route so the theme manager reports an active theme.

Closes #3604010

Merge request reports

Loading