Overview
With the latest HEAD, I'm getting following error after following the installation steps and navigating to XB:
Error: Typed property Drupal\experience_builder\EventSubscriber\ApiMessageValidator::$validatorBuilder must not be accessed before initialization in Drupal\experience_builder\EventSubscriber\ApiMessageValidator->isValidationEnabled() (line 165 of modules/custom/experience_builder/src/EventSubscriber/ApiMessageValidator.php).
Drupal\experience_builder\EventSubscriber\ApiMessageValidator->shouldValidate() (Line: 93)
Drupal\experience_builder\EventSubscriber\ApiMessageValidator->onMessage() (Line: 246)
Symfony\Component\EventDispatcher\EventDispatcher::Symfony\Component\EventDispatcher\{closure}() (Line: 206)
Symfony\Component\EventDispatcher\EventDispatcher->callListeners() (Line: 56)
Symfony\Component\EventDispatcher\EventDispatcher->dispatch() (Line: 159)
Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 76)
Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 53)
Drupal\Core\StackMiddleware\Session->handle() (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 28)
Drupal\Core\StackMiddleware\ContentLength->handle() (Line: 32)
Drupal\big_pipe\StackMiddleware\ContentLength->handle() (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 36)
Drupal\Core\StackMiddleware\AjaxPageState->handle() (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle() (Line: 709)
Drupal\Core\DrupalKernel->handle() (Line: 19)
Proposed resolution
User interface changes
Issue fork experience_builder-3471201
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
Comment #2
wim leersComment #3
wim leersReproduced. It required me to undo
… but that is supposed to be optional.
#3466555: Also validate request bodies against the OpenAPI spec introduced this, and likely that's my fault 😅
Comment #4
wim leersTurns out @traviscarden introduced this regression by making this change:
👆 that causes PHP to be more strict, and it no longer defaults to
NULLby default! 🤪Thankfully the fix is trivial:
Comment #5
wim leersComment #7
wim leersComment #8
wim leersManually tested again, merging this single-line MR without additional review to avoid others having their productivity impacted by this 😬
What a wild ride! 🤠 This was definitely nobody's fault, it's just a tiny, super obscure thing. Chances of such a regression getting reintroduced are vanishingly thin.
🚢
Comment #10
wim leers