Page "warn users if page has unsaved changes" not working.

  • 1
  • Problem
  • Updated 3 years ago
  • Not a Problem
If I set the page-wide parameter for "warn users if page has unsaved changes" to No, I still get warnings about unsaved changes.

If I set it to Yes, and set the model-specific settings ("prevent users from leaving page if this model has unsaved changes") to No, it works as expected.
Photo of Matt Sones

Matt Sones, Champion

  • 31,478 Points 20k badge 2x thumb

Posted 3 years ago

  • 1
Photo of Zach McElrath

Zach McElrath, Employee

  • 49,004 Points 20k badge 2x thumb
Matt, I just tried to replicate this and was not able to --- any more details about the page where this is happening? Are you using Master/Child Pages perhaps, or Page Includes? 
Photo of Matt Sones

Matt Sones, Champion

  • 31,478 Points 20k badge 2x thumb
Zack,

Yes, the settings are on a page include. The page include is being used by a child page that has a master. The master is a header, and the child is essentially just a page include component.

I've been using that set-up quite a bit to be able to 'reuse' pages with different masters/headers.


I suppose that if the master OR the child (which is the parent of the include) have "warn users if page has unsaved changes" to Yes... it would override the value in the page include?
(Edited)
Photo of Zach McElrath

Zach McElrath, Employee

  • 49,004 Points 20k badge 2x thumb
Okay, so let's say you have a Master Page, and then a Child Page using that Master, and then the Child Page has a Page Include in it.

If any of these 3 "pages" have "Warn users if page has unsaved changes" set to "Yes", then for each page where its set to "Yes", then Skuid should check just the Models associated with that particular page to see if they have unsaved changes.

So for example say that the Master Page has Models M-1 and M-2, the Child Page has Models C-1 and C-2, and the Page Include has Models INC-1, INC-2.

If Master Page has "Warn users if page has unsaved changes" set to "Yes", but the Child Page has "Warn users if page has unsaved changes" set to "No", then the Child Page's setting should apply to unsaved changes in Models C-1 and C-2, but not to M-1 and M-2. Same for Page Include Models -- unsaved changes warning should only be applied if the Model's immediate parent page has "Warn users if page has unsaved changes" set to "Yes".
Photo of Chelsea Curtis

Chelsea Curtis

  • 1,300 Points 1k badge 2x thumb
I'm having a similar issue in the developer edition. I have a Master page that contains a header and page region for the child pages. I saved the Master page and started creating Child pages before I realized I wanted to turn the warning for unsaved changes off.

I set the warning field to "No" in the Master page, and it showed the change in the Page Properties of the Master and Child pages. However, I was still getting the warning for certain pages. I looked at the XML of the child pages still throwing warnings and it was still written as "Yes" for unsaved changes. I updated this without any change to the warning.

I updated to the latest version of Banzai as well (7.20). Any ideas on the issue?

Thanks.