Problem/Motivation

Add field group > Select "Layouts", give it a label, select any layout, click "Save & Continue" > get 2 errors:

  1. Warning: Undefined property: stdClass::$group_name in Drupal\field_group_layout\Plugin\field_group\FieldGroupFormatter\LayoutFormatter->settingsForm() (line 73 of modules/contrib/field_group_layout/src/Plugin/field_group/FieldGroupFormatter/LayoutFormatter.php).
  2. Warning: Undefined array key "" in Drupal\field_group_layout\Plugin\field_group\FieldGroupFormatter\LayoutFormatter->settingsForm() (line 73 of modules/contrib/field_group_layout/src/Plugin/field_group/FieldGroupFormatter/LayoutFormatter.php).

Then go add or edit a content for which the field group layouts were used, get another 2 errors, repeated for the amount of layout elements that were added:
Warning: include_once(/var/www/html/web/core/modules/layout_discovery/layouts/onecol/templates/theme.inc): Failed to open stream: No such file or directory in include_once() (line 237 of core/lib/Drupal/Core/Theme/ThemeManager.php).
Warning: include_once(): Failed opening '/var/www/html/web/core/modules/layout_discovery/layouts/onecol/templates/theme.inc' for inclusion (include_path='/var/www/html/vendor/pear/archive_tar:/var/www/html/vendor/pear/console_getopt:/var/www/html/vendor/pear/pear-core-minimal/src:/var/www/html/vendor/pear/pear_exception:.:/usr/share/php') in include_once() (line 237 of core/lib/Drupal/Core/Theme/ThemeManager.php).

Plus this one at the end:
Warning: Undefined array key "#wrapper_element" in template_preprocess_field_group__layout_twocol_bricks() (line 207 of modules/contrib/field_group_layout/templates/theme.inc).

Now remove all the "Layouts" fielg groups from that entity type manage form display, go back to edit the entity and you get even more errors (3 for every layout template).

Tested on a new dev site on Drupal 10.2.4 (core-recommended), with Gin Admin Theme 8.x-3.0-rc9 enabled and Layout Builder & Field Layout disabled.

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

kopeboy created an issue. See original summary.

ady1503’s picture

Same issue.

Need patch.

adarshv’s picture

Assigned: Unassigned » adarshv
adarshv’s picture

Assigned: adarshv » Unassigned

praveen rani made their first commit to this issue’s fork.

Praveen rani’s picture

To resolve the above warning messages, I have created MR please review it.

rajan kumar@2026’s picture

Status: Active » Needs work
StatusFileSize
new48.19 KB

hii @kopeboy

i am not getting error Add field group > Select "Layouts", give it a label, select any layout, click "Save & Continue" refrence schreenshot attached hare.

rajan kumar@2026’s picture

Status: Needs work » Needs review
matsbla’s picture

Title: It works, but with many error messages » Errors when adding field group
matsbla’s picture

Title: Errors when adding field group » Adding field groups causes errors
matsbla’s picture

Status: Needs review » Needs work

I tested this patch, but I still received the same error:
https://git.drupalcode.org/project/field_group_layout/-/merge_requests/4.diff

Amandeep123 made their first commit to this issue’s fork.

amandeep123’s picture

hy @matsbla, please review merge request 6 as this error is resolved on my site .
thanks

manish-31 made their first commit to this issue’s fork.

manish-31’s picture

Status: Needs work » Needs review

Not sure why we have opened two MR's we can close MR !4.

I have updated merge request !6, replaced property_exits() check with isset() to avoid another unnecessary check.

Needs review. Thanks!

ady1503’s picture

Hello.

After update to Versión de Drupal 10.2.6. To many errors apear without add Field Group Layout to content type:

Warning: include_once(/home/***/public_html/***/web/core/modules/layout_builder/layouts/twocol_section/templates/theme.inc): Failed to open stream: No such file or directory in include_once() (line 515 of core/lib/Drupal/Core/Theme/Registry.php).

Warning: include_once(): Failed opening '/home/***/public_html/***/web/core/modules/layout_builder/layouts/twocol_section/templates/theme.inc' for inclusion (include_path='/home/***/public_html/***/vendor/pear/archive_tar:/home/***/public_html/***/vendor/pear/console_getopt:/home/***/public_html/***/vendor/pear/pear-core-minimal/src:/home/***/public_html/***/vendor/pear/pear_exception:.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in include_once() (line 515 of core/lib/Drupal/Core/Theme/Registry.php).

Warning: include_once(/home/***/public_html/***/web/core/modules/layout_builder/layouts/threecol_section/templates/theme.inc): Failed to open stream: No such file or directory in include_once() (line 515 of core/lib/Drupal/Core/Theme/Registry.php).

Warning: include_once(): Failed opening '/home/***/public_html/***/web/core/modules/layout_builder/layouts/threecol_section/templates/theme.inc' for inclusion (include_path='/home/***/public_html/***/vendor/pear/archive_tar:/home/***/public_html/***/vendor/pear/console_getopt:/home/***/public_html/***/vendor/pear/pear-core-minimal/src:/home/***/public_html/***/vendor/pear/pear_exception:.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in include_once() (line 515 of core/lib/Drupal/Core/Theme/Registry.php).

Warning: include_once(/home/***/public_html/***/web/core/modules/layout_builder/layouts/fourcol_section/templates/theme.inc): Failed to open stream: No such file or directory in include_once() (line 515 of core/lib/Drupal/Core/Theme/Registry.php).

Warning: include_once(): Failed opening '/home/***/public_html/***/web/core/modules/layout_builder/layouts/fourcol_section/templates/theme.inc' for inclusion (include_path='/home/***/public_html/***/vendor/pear/archive_tar:/home/***/public_html/***/vendor/pear/console_getopt:/home/***/public_html/***/vendor/pear/pear-core-minimal/src:/home/***/public_html/***/vendor/pear/pear_exception:.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in include_once() (line 515 of core/lib/Drupal/Core/Theme/Registry.php).

Warning: include_once(/home/***/public_html/***/web/core/modules/layout_discovery/layouts/onecol/templates/theme.inc): Failed to open stream: No such file or directory in include_once() (line 515 of core/lib/Drupal/Core/Theme/Registry.php).

Warning: include_once(): Failed opening '/home/***/public_html/***/web/core/modules/layout_discovery/layouts/onecol/templates/theme.inc' for inclusion (include_path='/home/***/public_html/***/vendor/pear/archive_tar:/home/***/public_html/***/vendor/pear/console_getopt:/home/***/public_html/***/vendor/pear/pear-core-minimal/src:/home/***/public_html/***/vendor/pear/pear_exception:.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in include_once() (line 515 of core/lib/Drupal/Core/Theme/Registry.php).

Warning: include_once(/home/***/public_html/***/web/core/modules/layout_discovery/layouts/twocol/templates/theme.inc): Failed to open stream: No such file or directory in include_once() (line 515 of core/lib/Drupal/Core/Theme/Registry.php).

Warning: include_once(): Failed opening '/home/***/public_html/***/web/core/modules/layout_discovery/layouts/twocol/templates/theme.inc' for inclusion (include_path='/home/***/public_html/***/vendor/pear/archive_tar:/home/***/public_html/***/vendor/pear/console_getopt:/home/***/public_html/***/vendor/pear/pear-core-minimal/src:/home/***/public_html/***/vendor/pear/pear_exception:.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in include_once() (line 515 of core/lib/Drupal/Core/Theme/Registry.php).

Warning: include_once(/home/***/public_html/***/web/core/modules/layout_discovery/layouts/twocol_bricks/templates/theme.inc): Failed to open stream: No such file or directory in include_once() (line 515 of core/lib/Drupal/Core/Theme/Registry.php).

Warning: include_once(): Failed opening '/home/***/public_html/***/web/core/modules/layout_discovery/layouts/twocol_bricks/templates/theme.inc' for inclusion (include_path='/home/***/public_html/***/vendor/pear/archive_tar:/home/***/public_html/***/vendor/pear/console_getopt:/home/***/public_html/***/vendor/pear/pear-core-minimal/src:/home/***/public_html/***/vendor/pear/pear_exception:.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in include_once() (line 515 of core/lib/Drupal/Core/Theme/Registry.php).

Warning: include_once(/home/***/public_html/***/web/core/modules/layout_discovery/layouts/threecol_25_50_25/templates/theme.inc): Failed to open stream: No such file or directory in include_once() (line 515 of core/lib/Drupal/Core/Theme/Registry.php).

Warning: include_once(): Failed opening '/home/***/public_html/***/web/core/modules/layout_discovery/layouts/threecol_25_50_25/templates/theme.inc' for inclusion (include_path='/home/***/public_html/***/vendor/pear/archive_tar:/home/***/public_html/***/vendor/pear/console_getopt:/home/***/public_html/***/vendor/pear/pear-core-minimal/src:/home/***/public_html/***/vendor/pear/pear_exception:.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in include_once() (line 515 of core/lib/Drupal/Core/Theme/Registry.php).

Warning: include_once(/home/***/public_html/***/web/core/modules/layout_discovery/layouts/threecol_33_34_33/templates/theme.inc): Failed to open stream: No such file or directory in include_once() (line 515 of core/lib/Drupal/Core/Theme/Registry.php).

Warning: include_once(): Failed opening '/home/***/public_html/***/web/core/modules/layout_discovery/layouts/threecol_33_34_33/templates/theme.inc' for inclusion (include_path='/home/***/public_html/***/vendor/pear/archive_tar:/home/***/public_html/***/vendor/pear/console_getopt:/home/***/public_html/***/vendor/pear/pear-core-minimal/src:/home/***/public_html/***/vendor/pear/pear_exception:.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in include_once() (line 515 of core/lib/Drupal/Core/Theme/Registry.php).

Warning: include_once(/home/***/public_html/***/web/modules/contrib/vefl/layouts/onecol/templates/theme.inc): Failed to open stream: No such file or directory in include_once() (line 515 of core/lib/Drupal/Core/Theme/Registry.php).

Warning: include_once(): Failed opening '/home/***/public_html/***/web/modules/contrib/vefl/layouts/onecol/templates/theme.inc' for inclusion (include_path='/home/***/public_html/***/vendor/pear/archive_tar:/home/***/public_html/***/vendor/pear/console_getopt:/home/***/public_html/***/vendor/pear/pear-core-minimal/src:/home/***/public_html/***/vendor/pear/pear_exception:.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in include_once() (line 515 of core/lib/Drupal/Core/Theme/Registry.php).

When add to content type:

Deprecated function: strnatcasecmp(): Passing null to parameter #2 ($string2) of type string is deprecated in Drupal\Core\Layout\LayoutPluginManager->Drupal\Core\Layout\{closure}() (line 204 of core/lib/Drupal/Core/Layout/LayoutPluginManager.php).

Deprecated function: strnatcasecmp(): Passing null to parameter #2 ($string2) of type string is deprecated in Drupal\Core\Layout\LayoutPluginManager->Drupal\Core\Layout\{closure}() (line 204 of core/lib/Drupal/Core/Layout/LayoutPluginManager.php).

Deprecated function: strnatcasecmp(): Passing null to parameter #2 ($string2) of type string is deprecated in Drupal\Core\Layout\LayoutPluginManager->Drupal\Core\Layout\{closure}() (line 204 of core/lib/Drupal/Core/Layout/LayoutPluginManager.php).

Deprecated function: strnatcasecmp(): Passing null to parameter #2 ($string2) of type string is deprecated in Drupal\Core\Layout\LayoutPluginManager->Drupal\Core\Layout\{closure}() (line 204 of core/lib/Drupal/Core/Layout/LayoutPluginManager.php).

Deprecated function: strnatcasecmp(): Passing null to parameter #2 ($string2) of type string is deprecated in Drupal\Core\Layout\LayoutPluginManager->Drupal\Core\Layout\{closure}() (line 204 of core/lib/Drupal/Core/Layout/LayoutPluginManager.php).

Warning: Undefined array key "field_layout" in Drupal\field_group_layout\Plugin\field_group\FieldGroupFormatter\LayoutFormatter->settingsForm() (line 81 of modules/contrib/field_group_layout/src/Plugin/field_group/FieldGroupFormatter/LayoutFormatter.php).

As you can see, it is affecting other modules that "Layout Builder" uses.

When I uninstall the module "Field Group Layout" there is no errors.

Thanks

matsbla’s picture

Status: Needs review » Needs work

Both MR 4 or MR 6 does not fix the error adressed in this issue.

Warning: Undefined property: stdClass::$group_name in Drupal\field_group_layout\Plugin\field_group\FieldGroupFormatter\LayoutFormatter->settingsForm() (line 73 of modules/contrib/field_group_layout/src/Plugin/field_group/FieldGroupFormatter/LayoutFormatter.php).

Warning: Undefined array key "" in Drupal\field_group_layout\Plugin\field_group\FieldGroupFormatter\LayoutFormatter->settingsForm() (line 73 of modules/contrib/field_group_layout/src/Plugin/field_group/FieldGroupFormatter/LayoutFormatter.php).

apaderno changed the visibility of the branch 3433241-it-works-but to hidden.

vlad.dancer’s picture

matsbla’s picture

Status: Needs work » Fixed

Please upgrade to 2.0.0-alpha1, this should be fixed now.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.