Fix warnings caused when viewing components in XB

Created on 28 August 2024, 21 days ago
Updated 11 September 2024, 7 days ago

Problem/Motivation

See details on getting the components in XB here:

πŸ“Œ Finetune SDDS examples so previews look decent in XB Active

When loading the XB page with the components, there are some log errors that need addressing:

https://starshot.ddev.site/xb/node/1/component/static-static-card1ab
Message	Warning: Trying to access array offset on null in Drupal\experience_builder\Form\ComponentPropsForm->buildForm() (line 73 of /var/www/html/web/modules/contrib/experience_builder/src/Form/ComponentPropsForm.php)
https://starshot-clean.ddev.site/xb/node/1/component/static-static-card1ab
Message	Warning: Undefined array key "cta2" in Drupal\experience_builder\Form\ComponentPropsForm->buildForm() (line 73 of /var/www/html/web/modules/contrib/experience_builder/src/Form/ComponentPropsForm.php)
https://starshot-clean.ddev.site/xb/node/1/component/static-static-card1ab
Message	Warning: Undefined array key "cta1" in Drupal\experience_builder\Form\ComponentPropsForm->buildForm() (line 73 of /var/www/html/web/modules/contrib/experience_builder/src/Form/ComponentPropsForm.php)
https://starshot-clean.ddev.site/xb/node/1/component/static-static-card1ab
Message	Warning: Undefined array key "subheading" in Drupal\experience_builder\Form\ComponentPropsForm->buildForm() (line 73 of /var/www/html/web/modules/contrib/experience_builder/src/Form/ComponentPropsForm.php)
#0 /var/www/html/web/core/includes/bootstrap.inc(166): _drupal_error_handler_real()

Steps to reproduce

Proposed resolution

It looks like these may be issues with XB and not SDDS, so test without installing SDDS to see if there are these types of warnings. If so, we'll move this to the XB issue queue.

Remaining tasks

  • Install XB via the dev guide
  • If you already have civictheme and starshot_demo themes installed, uninstall these themes like ddev drush theme:uninstall civictheme; ddev drush theme:uninstall starshot_demo
  • Load the XB UI
  • Look at the logs: https://starshot.ddev.site/admin/reports/dblog
  • See if there are similar warnings
  • If so, stop as the warnings are from XB
  • If not, enable the themes per the dev guide
  • Look at XB UI again
  • Look at logs again
  • See if there are similar warnings
  • If so, figure out where they are coming from and fix
  • Create an MR
  • Review and test

User interface changes

Not in UI but to warnings in logs.

API changes

Data model changes

πŸ“Œ Task
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States Kristen Pol Santa Cruz, CA, USA

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

Comments & Activities

Production build 0.71.5 2024