Did something change overnight? Like a new version pushed?

  • 1
  • Problem
  • Updated 3 years ago
I have some  buttons with conditional enabling  which have been working fine all week (since I created them).

1) I have not made any changes to that part, and today they stopped working , for an unknown reason

On popup

Button named "Save & trigger....." has a condition to enable button when Model Account has unsaved changes



IF I make changes on any field from that model , button does not enable

Looking a console, when inspect element i see a bunch of errors, not sure if related



2) similarly, On the main page, for other buttons with enable condition, it works the first time i make a change in the model's field, but a second time(after saving first), unless i refresh....
Photo of Dave

Dave

  • 5,538 Points 5k badge 2x thumb

Posted 3 years ago

  • 1
Photo of Zach McElrath

Zach McElrath, Employee

  • 49,056 Points 20k badge 2x thumb
No, there have not been any new versions pushed.

Looks like you're getting errors such as "Cannot call method on button prior to initialization: attempted to call method 'disable' / 'enable'". 

What actions does your button call? If the button is in a popup, it may be that you're closing the popup as part of one of your actions, before the Conditional Enabling occurs, which could conceivably throw this error.

I think we'd have to see more details about your specific page to understand what you're doing to give an opinion on this one. 

I've tried to do basic Conditional Enabling on a button to enable it only when a Model has unsaved changes, and have not been able to reproduce the issue you're describing. 
Photo of Dave

Dave

  • 5,538 Points 5k badge 2x thumb
Ok let's take it a step back and look at simplest issue, as i think they are all related.

As i had explained on #2 of my original post,

For this button, it's a simple button with 1 action type: Save

it has a render Condition, Account model has unsaved changes =True


The 1st time I make a change on a field from account model, the button Renders and allows to me to save



After it saved, let's say I try to make another change on a field from account model,

The button does not render



The login access for Skuid is still active in case you want to see it for yourself

the test skuid page , ism working on (feel free to make any changes, it's a clone) is named:
 
CLONE_Advance_Loan_snippet_on_Account__12_17_15
Photo of Dave

Dave

  • 5,538 Points 5k badge 2x thumb
Hey Zach,

Just want to give an update on this issue.

As I wanted to get to the bottom of this issue, I started going back to older versions of my Skuid page , until i got to one that worked as expected.

20 versions later, I finally found it, and found the issue, but for the life of me cannot understand the reason behind it.

On my main Skuid page, the save/cancel mentioned in previous post (on the left , of view fundings button) had a render condition, to render if Account model has changes, and that was cause of issue.

After removing those conditions, everything worked as expected.

Why? No idea...maybe some sort of conflict between 2 different save buttons, one with a render condition and the other with enable condition?

Just in case it's a bug and you want me to reproduce it for your devs or wtv, let me know

Thx
Photo of Zach McElrath

Zach McElrath, Employee

  • 49,056 Points 20k badge 2x thumb
So the problem went away when you removed the "Render Conditions" - but you still had the Enable Conditions?
Photo of Dave

Dave

  • 5,538 Points 5k badge 2x thumb
Yes , Render condition was on 1 set of Save/Cancel
And had on same page another set of Save Cancel with Enable conditions

When removed from 1st set the render condition, all worked fine