AssertionError: assert($component_config !== NULL)

Created on 8 September 2024, 2 months ago
Updated 9 September 2024, 2 months ago

Overview

Been doing lots of SDDS testing. See details for setup here:

πŸ› XBEndpointRenderer & processResponseAssets() do not support `ajaxPageState` β‡’ duplicate CSS/JS loading Fixed

I had to comment out an assert to keep moving and I don't know how to best debug:

diff --git a/src/Controller/SdcController.php b/src/Controller/SdcController.php
index feede9a..8d5037a 100644
--- a/src/Controller/SdcController.php
+++ b/src/Controller/SdcController.php
@@ -96,7 +96,11 @@ final class SdcController extends ControllerBase {
         $component_id = $tree->getComponentId($component_instance_uuid);
         // @todo the current quick-and-dirty UI PoC unfortunately prevents any prop from being named `name`, because it expects that to convey the component name
         $component_config = Component::loadByComponentMachineName($component_id);
-        assert($component_config !== NULL);
+        // @fixme KP
+        //assert($component_config !== NULL);
+        if (!$component_config) {
+          continue;
+        }
         $model[$component_instance_uuid]['name'] = $component_config->label();
       }
       if (isset($full_tree[$component_instance_uuid])) {

Proposed resolution

TBD

User interface changes

No fatal error popup.

πŸ’¬ Support request
Status

Closed: outdated

Component

Page builder

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

  • Issue created by @Kristen Pol
  • Status changed to Postponed: needs info 2 months ago
  • πŸ‡§πŸ‡ͺBelgium wim leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί

    This is too cryptic to reproduce πŸ˜…

    The assertion is there for a good reason: you shouldn't ever be able to hit the point where you're interacting with an SDC in the XB (JS) UI that does not have a Component config entity. The only viable explanation is that all Component config entities were wiped while using the XB (JS) UI and that hence critical information was deleted mid-interaction.

  • Status changed to Closed: outdated 2 months ago
  • πŸ‡ΊπŸ‡ΈUnited States Kristen Pol Santa Cruz, CA, USA

    I did some SDDS cleanup to get rid of random errors that seemed unrelated and did a fresh install over everything and I'm not seeing this anymore. Yay! Crossing fingers. I also switched us to D11.

Production build 0.71.5 2024