Problem/Motivation

Having the following:

 Warning: Invalid argument supplied for foreach() in varbase_layout_builder_form_layout_builder_configure_section_alter() 

Steps to reproduce

When I delete sections
When I reset to the default layout for a content type
When I revert the old variant with a changed styling options fields ( new styling options fields, or removed fields )

Proposed resolution

  • Add more checks on objects and arrays

Remaining tasks

  • Fix
  • Test
  • Release

User interface changes

N/A

API changes

Styling options objects and arrays should be valid with the current active configs before processing.

Data model changes

N/A

Comments

RajabNatshah created an issue. See original summary.

Rajab Natshah’s picture

Title: Fix to make sure that we do have a list config in the style options » Fix to make sure that we do have a list of config values in the style options

  • RajabNatshah committed ea58a54 on 9.0.x
    Issue #3175710: Fix to make sure that we do have a list of config values...

  • RajabNatshah committed 727892f on 9.0.x
    Issue #3175710: Fix to make sure that we do have a list of config values...

  • RajabNatshah committed 7863c32 on 8.x-1.x
    Issue #3175710: Fix to make sure that we do have a list of config values...
Rajab Natshah’s picture

Assigned: Rajab Natshah » Mohammed J. Razem
Status: Active » Needs review
Issue tags: +varbase-8.8.7, +varbase-9.0.0

gulp compile

rajab@vardot-dev:/var/www/html/products/varbase_layout_builder$ gulp compile
[13:49:34] Using gulpfile /var/www/html/products/varbase_layout_builder/gulpfile.js
[13:49:34] Starting 'compile'...
[13:49:34] Finished 'compile' after 340 ms

yarn phpcs

rajab@vardot-dev:/var/www/html/products/varbase_layout_builder$ yarn phpcs
yarn run v1.22.5
$ phpcs --standard=./.phpcs.xml .
Done in 1.51s.

yarn phpcbf

rajab@vardot-dev:/var/www/html/products/varbase_layout_builder$ yarn phpcbf
yarn run v1.22.5
$ phpcbf --standard=./.phpcs.xml .

No fixable errors were found

Time: 1.16 secs; Memory: 18MB

Done in 1.25s.

yarn eslint

rajab@vardot-dev:/var/www/html/products/varbase_layout_builder$ yarn eslint
yarn run v1.22.5
$ node ./node_modules/eslint/bin/eslint.js --config=.eslintrc.json .
Done in 2.26s.

yarn stylelint

rajab@vardot-dev:/var/www/html/products/varbase_layout_builder$ yarn stylelint
yarn run v1.22.5
$ npx stylelint --config=.stylelintrc.json .
Done in 2.98s.
Rajab Natshah’s picture

Assigned: Mohammed J. Razem » Unassigned
Rajab Natshah’s picture

Issue summary: View changes
Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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