Uncaught TypeError: Cannot read property 'hasChanged' of undefined

EDIT: I bolded the 4 occurances of hasChanged in the above. Perhaps that actually useful to someone?

Matt gets the award for sending the most code…

I usually get this error when I have not defined an sObject for a model.  Maybe you started to set up a model and then stopped to do somthing else and forgot about it?  Happens to me all the time. 

My two cents. Don’t think it has anything to do with hasChanged. That’s skuid js and I don’t it’s their js that has a bug. Maybe, but I doubt it.

Does your page models point to any custom objects/fields. If not, I’ll take a look at the page if you want copy the page XML to here.

Rob, all the models have sObjects.

Pat, Thanks… it’s entirely custom objects.

I’m guessing it has something to do with how the models are set up, but I haven’t been able to diagnose.

What’s the last change you made? Assuming this worked before that.

I made some changes early this week to which model would get the url parameter, and reordered the models. But everything seems to be set up the way it should with the models & conditions.

I’d make a clone and start to remove one model at a time to see when the page starts to work again.

Well… that was strange.

I realized that just before I noticed the error, I had added a field editor with a single field.

I removed that field editor, and voila! I worked.

I then added a field editor and the same field back again, and it still works!

So, I remain confused, but I have a working page. :slight_smile:

How many lines of xml is the page?

1592

Hi Matt,

We consider any javascript error that comes from our code a problem with Skuid.  Even if something is horribly wrong with your XML, Skuid Javascript should give you a nice error.  One really cool feature I found recently in Chrome Dev Tools is the “Pretty Print” button on the “Sources” tab.



In the future, if you want to get closer to where the error is happening, click that button and it will turn one line of minified nastiness into lots of lines of slightly more understandable nastiness.  I absolutely love that feature though.

Yup. I have no idea.

Sweet. Thanks, Ben!

WOW!!! That button is awesome!!!

this whole thread is so helpful!  i ♥ the Skuid community!

I just wanted to add to the conversation that i got this same error. The cause was from deleting a model.  The table that was based on the model went away.  And when i looked in the UI to change the models saved from my Save button on the page, the removed model was no longer listed there.  However, when l looked at the XML, the deleted model was still in the XML to be updated by the save button.  So I wanted to report this mismatch between the XML and the UI!   If you have more questions or need clarification, let me know.

Thanks Rebecca.  Great sleuthing!  I’ll pass the issue along. 

Just a note that I ran into the same issue as Rebecca. Removing a model in the builder does not remove it from lists of models behind pagetitle save/cancel buttons.

Hmm.  This does not happen for me any longer?  ARe you on the latest version of Skuid?  Check out Get the Latest Skuid Releases & Everything That Came Before

Nope, looks like I was on the previous patch. Thanks!