FIX in EntityDisplayFormBase-3166929-13.patch: modify core patch to handle paragraph fields correctly
Patch #11 unfortunately did not worked for me anymore. I am on Drupal Version 10.3.10, PHP 8.1.30. Drupal log was flooded with messages as
Warning: Undefined array key "simple_sitemap" in Drupal\field_ui\Form\EntityDisplayFormBase->copyFormValuesToEntity() (Zeile 643 in /var/www/html/web/core/modules/field_ui/src/Form/EntityDisplayFormBase.php).
and
Warning: Trying to access array offset on value of type null in Drupal\field_ui\Form\EntityDisplayFormBase->copyFormValuesToEntity() (Zeile 643 in /var/www/html/web/core/modules/field_ui/src/Form/EntityDisplayFormBase.php).
Even worse, on my local installation, the fields on content types' form display page (admin/structure/types/manage//form-display) could not be edited anymore, showing more and more of these messages on top of the page, leading to:
*Drupal\Core\Database\DatabaseExceptionWrapper*: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: SELECT 1 AS "expression" FROM "sessions" "sessions" WHERE "sid" = :db_condition_placeholder_0; Array ( [:db_condition_placeholder_0] => bSH7ZZvbRVb_7-exNS2ItOFW-U3CvuFPPFamw54fVuM ) in *Drupal\Core\Session\SessionHandler->Drupal\Core\Session\{closure}()* (line *95* of */app/web/core/lib/Drupal/Core/Session/SessionHandler.php*)
This post directed me to the right solution: Stackoverflow – Message: Trying to access array offset on value of type null
The function copyFormValuesToEntity() in core/modules/field_ui/src/Form/EntityDisplayFormBase.php did not check for value NULL and existence of array value in two places. Previous versions of PHP may have been less strict on such mistakes and silently swallowed the error / notice.
Here is a
patch →
that works for in our drupal installation. Hope it helps.