EntityHelper::getPersonalizationLabel(): Return value must be of type string, null returned

Created on 23 October 2024, 22 days ago

Problem/Motivation

We are using 4.1.8 but the method throwing the error is unchanged in 4.1.9. I don't know if this is related to an upstream change in core as we recently moved from D10.2 to D10.3 and this error is occurring in content types that use paragraphs, where we make use of the personalization label field feature to identify paragraphs in the Personalization UI.

Steps to reproduce

Save a node with paragraphs in which the personalization label field is empty.

php-error web-44140 [22-Oct-2024 09:56:43 America/New_York] Uncaught PHP Exception TypeError: "Drupal\acquia_perz\EntityHelper::getPersonalizationLabel(): Return value must be of type string, null returned" at /mnt/www/html/mskcc/docroot/modules/contrib/acquia_perz/src/EntityHelper.php line 524

Proposed resolution

Check for empty values so the null return from getting the value does not clobber the default empty string set at the beginning of the method.

πŸ› Bug report
Status

Active

Version

4.1

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States fathershawn New York

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024