Problem/Motivation

On D11 going to /admin/structure/webform (Structure > webforms > form) I see: TypeError:
Drupal\Component\Utility\Html::escape(): Argument #1 ($text) must be of type string, null given, called in core/lib/Drupal/Core/Utility/LinkGenerator.php on line 200 in Drupal\Component\Utility\Html::escape() (line 433 of core/lib/Drupal/Component/Utility/Html.php).

Steps to reproduce

Opened the above link having not checked after upgrade to D11 (actually have not had need to look for a while)
Same happens with previous release (6.3.0)
I have 2 forms and for one $variables["text"] is empty, which is the cause, but not sure what this is supposed to represent (entity label?) or how it can be edited or data regenerated.
This might be an example of data inconsistencies caused by core changes in D11 upgrade as seen in another module?

Proposed resolution

Temp fix is to check for null value in core/lib/Drupal/Core/Utility/LinkGenerator.php doGenerate() and skip if so.
The page seems fine after this and both forms can be edited via Build buttons

Remaining tasks

User interface changes

API changes

Data model changes

Issue fork webform-3625548

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

jons created an issue. See original summary.

hai nguyen made their first commit to this issue’s fork.

hai nguyen’s picture

Status: Active » Needs review
andres alvarez’s picture

Version: 6.3.1 » 6.3.x-dev
andres alvarez’s picture

Tested MR !953 on 6.3.x with PHP 8.3 and Drupal 11. WebformListBuilderTest passes (4 tests). With WebformEntityListBuilder.php reverted to 6.3.x, testWebformWithoutTitle fails, so the test covers the bug.

The change covers all three $entity->label() call sites in buildRow(). The phpstan and eslint jobs fail, but both are allowed to fail and report the same errors on 6.3.x. The branch is 15 commits behind 6.3.x and needs a rebase; a test merge shows no conflicts. Moving to RTBC.

andres alvarez’s picture

Status: Needs review » Reviewed & tested by the community

liam morland made their first commit to this issue’s fork.