Layout editor is broken but only on one table

Hi team!

The editor is buggy (I can’t add a new section, send things to the trash, sections disappear, I can’t add fields to a section, etc.)
It seems quite random, when I refresh I sometimes see the sections just inserted, if I refresh again it might disappear.
It happens only on one table, all the other tables are working just fine!

I noticed this strange behaviour a while ago, but somehow manage to build the Summary view, but now that I want to build it from scratch, I can’t do anything!

Here is a recording: CleanShot 2021-08-25 at 18.33.47 · CleanShot Cloud

Hello @Alexis_Pipieri,

Thanks a lot for your feedback. Can you please share with the project, environment and team on which you are experiencing this issue? It might be related to a special state of your layout.

Hello @GuillaumeGautreau,

Sure, I just sent you a private message!
Thanks

Thank you for the details.

Can you open the console from the developer tools of your browser, and see if there are any errors in the logs? I cannot reproduce with a simple setup on my side.

When opening the details view of the table causin the issue, I have the following error, that I don’t have on other tables:

Uncaught (in promise) TypeError: Cannot read property 'displayName' of undefined
    at c.get (client-09f7c944021fbb55d5c8f8ca3457db78.js:12837)
    at vendor-5274ce00880a892114c98442cc88aca6.js:2679
    at e.untrack (vendor-5274ce00880a892114c98442cc88aca6.js:5121)
    at i.o.get (vendor-5274ce00880a892114c98442cc88aca6.js:2679)
    at c.filterLocation (vendor-5274ce00880a892114c98442cc88aca6.js:2638)
    at _e (vendor-5274ce00880a892114c98442cc88aca6.js:2655)
    at e.ye [as getPath] (vendor-5274ce00880a892114c98442cc88aca6.js:2654)
    at vendor-5274ce00880a892114c98442cc88aca6.js:4368
    at e.track (vendor-5274ce00880a892114c98442cc88aca6.js:5119)
    at e.t.value (vendor-5274ce00880a892114c98442cc88aca6.js:4368)
    at e.r.value (vendor-5274ce00880a892114c98442cc88aca6.js:4872)
    at ze (vendor-5274ce00880a892114c98442cc88aca6.js:2107)
    at r.i.create (vendor-5274ce00880a892114c98442cc88aca6.js:2130)
    at Object.evaluate (vendor-5274ce00880a892114c98442cc88aca6.js:4761)
    at e.t.evaluate (vendor-5274ce00880a892114c98442cc88aca6.js:4629)
    at e.t.evaluateSyscall (vendor-5274ce00880a892114c98442cc88aca6.js:4900)
    at e.t.evaluateInner (vendor-5274ce00880a892114c98442cc88aca6.js:4894)
    at e.t.evaluateOuter (vendor-5274ce00880a892114c98442cc88aca6.js:4894)
    at r.next (vendor-5274ce00880a892114c98442cc88aca6.js:4997)
    at r.execute (vendor-5274ce00880a892114c98442cc88aca6.js:4996)
    at n.r.handleException (vendor-5274ce00880a892114c98442cc88aca6.js:4915)
    at e.t.handleException (vendor-5274ce00880a892114c98442cc88aca6.js:4942)
    at e.r.throw (vendor-5274ce00880a892114c98442cc88aca6.js:4904)
    at n.evaluate (vendor-5274ce00880a892114c98442cc88aca6.js:4701)
    at e.r.execute (vendor-5274ce00880a892114c98442cc88aca6.js:4904)
    at e.t.rerender (vendor-5274ce00880a892114c98442cc88aca6.js:4945)
    at e.l.render (vendor-5274ce00880a892114c98442cc88aca6.js:2426)
    at vendor-5274ce00880a892114c98442cc88aca6.js:2454
    at e.inTransaction (vendor-5274ce00880a892114c98442cc88aca6.js:4410)
    at n.i._renderRoots (vendor-5274ce00880a892114c98442cc88aca6.js:2453)
    at n.i._renderRootsTransaction (vendor-5274ce00880a892114c98442cc88aca6.js:2458)
    at n.i._revalidate (vendor-5274ce00880a892114c98442cc88aca6.js:2458)
    at t.invoke (vendor-5274ce00880a892114c98442cc88aca6.js:5286)
    at e.t.flush (vendor-5274ce00880a892114c98442cc88aca6.js:5278)
    at e.t.flush (vendor-5274ce00880a892114c98442cc88aca6.js:5292)
    at e.n._end (vendor-5274ce00880a892114c98442cc88aca6.js:5355)
    at e.n.end (vendor-5274ce00880a892114c98442cc88aca6.js:5311)
    at e.n._run (vendor-5274ce00880a892114c98442cc88aca6.js:5357)
    at e.n._join (vendor-5274ce00880a892114c98442cc88aca6.js:5356)
    at e.n.join (vendor-5274ce00880a892114c98442cc88aca6.js:5322)
    at Array.<anonymous> (vendor-5274ce00880a892114c98442cc88aca6.js:2433)
    at e.n._trigger (vendor-5274ce00880a892114c98442cc88aca6.js:5362)
    at e.n._end (vendor-5274ce00880a892114c98442cc88aca6.js:5356)
    at e.n.end (vendor-5274ce00880a892114c98442cc88aca6.js:5311)
    at e.n._run (vendor-5274ce00880a892114c98442cc88aca6.js:5357)
    at e.n._join (vendor-5274ce00880a892114c98442cc88aca6.js:5356)
    at e.n.join (vendor-5274ce00880a892114c98442cc88aca6.js:5322)
    at Array.<anonymous> (vendor-5274ce00880a892114c98442cc88aca6.js:2433)
    at e.n._trigger (vendor-5274ce00880a892114c98442cc88aca6.js:5362)
    at e.n._end (vendor-5274ce00880a892114c98442cc88aca6.js:5356)

I don’t have any other error when playing with the layout editor.

Ok, thanks for all the details. I could reproduce your issue when

  • using a project using MongoDB
  • declaring an embedded relationship (objects are not added linked from an external collection)
  • adding a section for the related data of this special relationship

Can you confirm that the field organizationAccountWorkspaces is declared this way in your case?

I created a bug ticket on our side to tackle this issue.

We’ll let you know when it will be fixed in production.

1 Like

Yes, you’re right. This relation is declared in “accountOrganizationsV2” with

AccountOrganizations.hasMany(models.accountWorkspacesV2, {
      foreignKey: {
        name: 'organizationIdKey',
        field: 'organization_id',
      },
      as: 'organizationAccountWorkspaces',
    });

Ok, thanks for the clarification. As I could not reproduce with a sequelize project, I supposed it was related to embedded fields from MongoDB, but it’s not.

I’ll try to reproduce with the same setup.

Hey @Alexis_Pipieri,

could you please click in your console on the first line of error and send a screenshot :pray: