page does not load in builder

  • 1
  • Problem
  • Updated 4 years ago
  • Solved
  • (Edited)
We have a page that will no longer load in the builder.  When attempting to open it in the builder, the following error occurs:

Uncaught TypeError: Cannot read property 'split' of undefined in skuid_SkuidBuildersJS:2

Unfortunately I am not aware of what was done on the page prior to saving that would trigger this.  I have seen something like this once before.

I have a repro of this in a page called POViewTempUntilFixed and have granted login access if someone would like to take a look.

The POViewTempUntilFixed is a "clone" of "POView" which is the actual page that broke.  I was able to use the declarative interface to clone POView (Versions aren't available since I can't load the skuid page itself).  I then fixed POView by copy/pasting the layout fields from the prior version to the current Page record.

Thanks!
Photo of Barry Schnell

Barry Schnell, Champion

  • 18,086 Points 10k badge 2x thumb

Posted 4 years ago

  • 1
Photo of Josh Cutler

Josh Cutler, Official Rep

  • 864 Points 500 badge 2x thumb
First of all, kudos to you for your problem-solving! Not many people would have figured out how to clone the problem page and fix the XML.

It looks like several instances of model names and conditions were changed to 'PItems', which is a model that doesn't exist. When your custom Javascript ran, it attempted to pull in an undefined value (or more!).

With 'PItems' replaced with 'PO' for the model name, the page runs. 

The question we will investigate further is how the error occurred. It didn't look like something that someone could have just changed. We'll update you soon with more information. I wanted to make sure that you knew we were looking into it.

Also, any additional insight is appreciated!

-Josh
Photo of Barry Schnell

Barry Schnell, Champion

  • 18,086 Points 10k badge 2x thumb
Thanks for looking in to this Josh, glad you were able isolate what is causing the page not to render.  As you suggest, now on to trying to figure out how it happened in the first place :)

I talked with the team here regarding what they were doing that might have triggered this based on your findings thus far.  Unfortunately, I don't have a solid repro yet but here is the feedback.

We've actually seen this problem twice recently and both individuals described the same scenario.

They had "cloned" a model and were modifying the name of the model in the Model ID of the basic properties tab.  They both indicated that they had seen the error regarding the fact that a model of the same name already exists and at some point in their typing and the auto-correct that Skuid does, the name displayed in the Models list (left hand side) and the model id (basic tab on right) got out of sync and displayed different values.  They then hit save and the page would no longer load.

I've tried to generate a solid repro of this but have been unable to thus far.  I'm guessing it might be a race condition in the auto-correct code, etc. and if so, will likely be impacted by machine specs (processor, available memory, etc.)  Just guessing of course but this seems like that type of problem.  I've asked both of the folks that have seen this before to try it on their machines as well but they can't reproduce either right now.  I'll keep trying and keep you posted if I find a reliable repro.  In the meantime, possibly as a workaround, skuid could perform a "validation" step on save of a page in the builder to make sure the model names are valid.

I've also posted to https://community.skuidify.com/skuid/topics/provide_rollback_on_pages_tab looking for an "easier" way to rollback when things like this occur :)

Thanks again!