'noop' component in the model which prevents saving

Created on 6 December 2024, 4 months ago

Overview

I don't have the specific steps for how this happened but during the recording of DrupalCon Singapore demo, I managed somehow to get a component with 'noop' ID in the model:

{
  "layout": {
    "uuid": "root",
    "nodeType": "root",
    "name": "root",
    "children": [
      ...
    ]
  },
  "model": {
    ...
    "noop": {},
  }
}

This is a major bug because this prevents saving content:

"No component stored for noop. Caused by either incorrect logic or `props` being out of sync with `tree`."

Proposed resolution

Should the frontend remove components from model that are not in the layout so that content can be saved?

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

Comments & Activities

  • Issue created by @lauriii
  • 🇫🇮Finland lauriii Finland
  • 🇺🇸United States luke.leber Pennsylvania

    I saw this today too, but chalked it up to me removing, adding, and refactoring props and slots on the fly without any regard for B/C.

    For the most part XB seemed to be pretty forgiving, but I did run into this a couple times.

  • Status changed to Postponed: needs info 30 days ago
  • 🇬🇧United Kingdom jessebaker

    Without steps to reproduce this is a tricky one to address. There are a few instances of 'noop' in the XB FE codebase. At a guess I would suggest something like the props of an instance of a component on the page are being changed but the component is unknown. (unknown because the list of components was not loaded yet/failed to load or the component has been deleted since it was added?).

    However in response to:

    Should the frontend remove components from model that are not in the layout so that content can be saved?

    I think that the error handling/robustness should be on the server side, not the client. Kinda following the idea of 📌 Improve server-side error handling Active .

  • 🇫🇮Finland lauriii Finland

    I've not seen this in months at this point so I think it would be fine to close this as outdated. We probably need a follow-up to handle this more generically in the backend still.

Production build 0.71.5 2024