- Issue created by @benjifisher
While testing
π
Fix the issues reported by phpcs
Needs review
with the Minimal installation profile, I noticed that the configuration page /admin/structure/paragraphs_type/ptoc
generated a WSOD. This is because the Minimal profile does not enable the field_ui
module.
minimal
installation profile.ptoc
module and its dependencies./admin/structure/paragraphs_type/ptoc
.The result is a WSOD, with this error in the logs:
Symfony\Component\Routing\Exception\RouteNotFoundException: Route "entity.entity_view_display.paragraph.view_mode" does not exist. in Drupal\Core\Routing\RouteProvider->getRouteByName() (line 206 of /var/www/html/core/lib/Drupal/Core/Routing/RouteProvider.php).
Some sites do not enable the field_ui
module on production, so adding that as a dependency is not a good option.
The code in PtocConfigForm::buildForm()
should check that the route exists before generating the URL:
$url = Url::fromRoute('entity.entity_view_display.paragraph.view_mode', [
'paragraphs_type' => $bundle,
'view_mode_name' => 'ptoc',
]);
No WSOD when field_ui
is not enabled.
None
None
Active
1.0
Code