Adding sections to a page broken

Created on 24 April 2025, 21 days ago

Overview

Steps to reproduce:

  1. Add a component to a page
  2. Right click the component to create a section
  3. Add the newly created section to the page
  4. You should be getting an error now

The error from the response:

{
    "message": "assert($component instanceof Component)",
    "file": "\/var\/www\/html\/web\/modules\/contrib\/experience_builder\/src\/Controller\/ClientServerConversionTrait.php",
    "line": 125,
}

Proposed resolution

User interface changes

🐛 Bug report
Status

Active

Version

0.0

Component

Page builder

Created by

🇫🇮Finland lauriii Finland

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

Merge Requests

Comments & Activities

  • Issue created by @lauriii
  • 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺

    Next time, please include the request body too, not just the response. 🙏 Saves some reproducing steps.

    First step: updating the it('Can create and add section', () => { test in component-operations.cy.js to reproduce this bug. 🙏

  • 🇫🇮Finland lauriii Finland

    Will do, that's easy for me to do! I just didn't realize it would be helpful 😊

  • 🇫🇷France anavarre 🇪🇺

    This might just be what I ran into today with alpha6 when trying to click on any "Container" section.

  • 🇦🇺Australia larowlan 🇦🇺🏝.au GMT+10

    Picking this up too

  • 🇦🇺Australia larowlan 🇦🇺🏝.au GMT+10

    This one is tricky.
    I've expanded the cypress test to the exact steps and it doesn't fail.
    I've manually tested and in some cases it occurs and others it doesn't.
    So this points to a race condition.

    On the backend the 'type' is the pattern name and not the component name.
    Digging further, I suspect perhaps an optimistic update might be the issue here.

  • 🇦🇺Australia larowlan 🇦🇺🏝.au GMT+10

    Ah the reproduction requires drag and drop not click to add, will see if I can reproduce that in a test

  • 🇦🇺Australia larowlan 🇦🇺🏝.au GMT+10
  • 🇦🇺Australia larowlan 🇦🇺🏝.au GMT+10

    I wrote a test here for adding a single component but then after realising the issue was with drag and drop, tried to rewrite it to work with drag and drop.
    We have no tests that drag and drop from the library to the canvas/viewport/preview so I time-boxed this.
    After an hour I had no joy getting this working and decided this isn't something we're going to be able to test with our current Cypruss setup

    Looks like playwright has baked in support so _maybe_ when we get there? https://playwright.dev/docs/input#drag-and-drop

    So the MR is fix only now - as this is critical and the lack of drag and drop from library tests is pre-existing I figure that's ok

  • 🇦🇺Australia larowlan 🇦🇺🏝.au GMT+10

    Tagging for playwright follow-up if we get there

  • Pipeline finished with Skipped
    17 days ago
    #483635
  • First commit to issue fork.
  • 🇬🇧United Kingdom jessebaker

    Whoops, this was my bad, I totally missed out the section functionality when implementing the new overlay with Dnd kit

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

Production build 0.71.5 2024