After actions in page include firing multiple times

  • 1
  • Problem
  • Updated 3 years ago
  • Solved
We have a page where a button opens a popup containing a page include. That included skuid page has a model with some "After" actions. The first time the popup is opened, the after actions fire once as expected. The second time the popup is opened, they fire twice.

I created a simple page that demonstrates this bug:

To replicate it open the main page and click the "Show Popup" button. Click on the "Refresh" button to trigger an alert message. Next, close the popup and reopen it. Click on the "Refresh" button and you'll get the alert message twice.

Main page:
<skuidpage unsavedchangeswarning="yes" personalizationmode="server" showsidebar="true" showheader="true"><br> <models><br> <model id="AccountMainPage" limit="" query="false" createrowifnonefound="false" adapter="" type="" sobject="Account"> <fields/> <conditions/> <actions/> </model> </models> <components> <pagetitle uniqueid="sk-xN_La-82" model="AccountMainPage"> <actions> <action type="multi" label="Show Popup"> <actions> <action type="showPopup"> <popup title="New Popup" width="90%"> <components> <includepanel type="skuid" uniqueid="sk-xOhuy-169" pagename="AfterActions_TriggeredMultipleTimes_Popup" module=""/> </components> </popup> </action> </actions> </action> </actions> </pagetitle> </components> <resources> <labels/> <javascript/> <css/> </resources> <styles> <styleitem type="background" bgtype="none"/> </styles> </skuidpage>

Popup page:
<skuidpage unsavedchangeswarning="yes" personalizationmode="server" showsidebar="true" showheader="true"> <models> <model id="Account" limit="20" query="true" createrowifnonefound="false" adapter="" type="" sobject="Account"> <fields/> <conditions/> <actions> <action> <actions> <action type="custom" snippet="showAlert"/> </actions> <events> <event>models.loaded</event> </events> </action> </actions> </model> </models> <components> <pagetitle model="Account" uniqueid="sk-xO_56-103"> <actions> <action type="multi" label="Refresh Model"> <actions> <action type="requeryModel" model="Account" behavior="standard"/> </actions> </action> </actions> </pagetitle> </components> <resources> <labels/> <javascript> <jsitem location="inlinesnippet" name="showAlert" cachelocation="false"> alert('Alert!');</jsitem> </javascript> <css/> </resources> <styles> <styleitem type="background" bgtype="none"/> </styles> </skuidpage>
Photo of Kartik Sethuraman

Kartik Sethuraman

  • 798 Points 500 badge 2x thumb

Posted 3 years ago

  • 1
Photo of Zach McElrath

Zach McElrath, Employee

  • 49,056 Points 20k badge 2x thumb
Kartik, this issue has been addressed in Banzai Update 6 Patch 4, now available fromĀ the Skuid Releases page.
Photo of Kartik Sethuraman

Kartik Sethuraman

  • 798 Points 500 badge 2x thumb
Wow that was fast! Thanks Zach!
Photo of Zach McElrath

Zach McElrath, Employee

  • 49,056 Points 20k badge 2x thumb
Hah, sometimes the timing works out nicely with previously-fixed issues.