I have a queue component that is running it's click action multiple times.
Help?
I have no actions on any of the models.
Matt Sones, Champion
-
31,702 Points
- frustrated!
Posted 1 year ago
Matt Sones, Champion
-
31,702 Points
Clicking on item X runs the click action Y times:
X Y
1 7
2 6
3 5
4 4
5 3
6 2
Skuidward Tentacles (Raymond), Champion
-
17,398 Points
I have Nav components that open a URL in a new browser window. Now when I click them, it opens 3 browser windows in chrome.
I did not recently update Skuid. I ha s been running 10.0.5 for a while.
Mark DeSimone, Official Rep
-
11,670 Points
Skuidward Tentacles (Raymond), Champion
-
17,398 Points
Matt Sones, Champion
-
31,702 Points
Mark DeSimone, Official Rep
-
11,670 Points
I have been able to use the XML below to reproduce the behavior you're describing, but only when the model is a UI-only model - using a model on Account, the Queue running the snippet works as expected. You can use the table to add rows to the UI only model, then click one of the queue items to see the console log.
I also added a button that will adopt records from a non un-only model (in this case, the Account model) into the ui-only model. If you do this, then click on a queue item, the issue doesn't happen. It seems like because the UI-only rows are only given the fields we choose to create for them, there may be some metadata missing that the Queue uses for context.
I will continue researching this, and will let you know what I find. <skuidpage unsavedchangeswarning="yes" personalizationmode="server" showsidebar="true" useviewportmeta="true" showheader="true"> <models>
<fields>
<field id="Id"/>
<field id="Name"/>
</fields>
<conditions/>
<actions/>
</model>
<model id="UI" query="true" createrowifnonefound="true" datasource="Ui-Only" processonclient="true">
<fields>
<field id="Name" displaytype="TEXT" label="Name"/>
<field id="Id" displaytype="UUID" label="Id" ogdisplaytype="TEXT"/>
</fields>
<conditions/>
<actions/>
</model>
</models>
<components>
<buttonset model="UI" uniqueid="sk-s67UV-252">
<buttons>
<button type="multi" label="Adopt account rows into UI model" uniqueid="sk-s67kH-256">
<actions>
<action type="adoptRows" sourcemodel="Acc" targetmodel="UI" affectedrows="all"/>
</actions>
</button>
</buttons>
</buttonset>
<queue model="UI" tagrendertype="template" searchbox="true" tokenizesearch="true" showsearchbydefault="true" uniqueid="sk-s423n-94">
<rendertemplate>{{Name}}</rendertemplate>
<interactions>
<interaction type="tap">
<action type="custom" snippet="newSnippet"/>
</interaction>
</interactions>
</queue>
<skootable showconditions="true" showsavecancel="true" showerrorsinline="true" searchmethod="server" searchbox="true" showexportbuttons="false" pagesize="10" alwaysresetpagination="false" createrecords="true" model="UI" buttonposition="" mode="read" allowcolumnreordering="true" responsive="true" uniqueid="sk-s549s-209">
<fields>
<field id="Name" hideable="true" uniqueid="fi-s55NV-223"/>
<field id="Id" hideable="true" uniqueid="fi-s6huc-278"/>
</fields>
<rowactions>
<action type="edit"/>
<action type="delete"/>
</rowactions>
<massactions usefirstitemasdefault="true">
<action type="massupdate"/>
<action type="massdelete"/>
</massactions>
<views>
<view type="standard"/>
</views>
</skootable>
</components>
<resources>
<labels/>
<javascript>
<jsitem location="inlinesnippet" name="newSnippet" cachelocation="false">var params = arguments[0],
$ = skuid.$;
console.log(arguments);</jsitem>
</javascript>
<css/>
</resources>
<styles>
<styleitem type="background" bgtype="none"/>
</styles>
</skuidpage>
Mark DeSimone, Official Rep
-
11,670 Points
Mark DeSimone, Official Rep
-
11,670 Points
I'm just seeing your request for an update. It looks like this was resolved in mid-November, shortly after Millau was first released. The fix should have been in 10.0.12+ and 11.x versions. Are you still experiencing the issue? If so, please let me know which version of Skuid is involved, and any other details about your scenario.
Matt Sones, Champion
-
31,702 Points
Mark DeSimone, Official Rep
-
11,670 Points
If I'm remembering right, the snippet would run multiple times, depending on which row you clicked on. I've tried different configurations on the page, but the snippet's only running once per click.
Matt, if you're still seeing the behavior in your versions, do you have any way to spin up a sandbox or dev environment to test your affected pages in 10.0.19?
Arne-Per, are you able to provide more detail about your scenario? The screenshot is helpful, but it would be helpful to also see the queue's action sequence and the snippet that's running too many times.
-
1,446 Points
Yes the queue interaction is 'click' and the action is a simple page include update
Matt Sones, Champion
-
31,702 Points
Upgraded a dev environment to 10.0.19. Still seeing the same behavior:
Mark DeSimone, Official Rep
-
11,670 Points
Mark DeSimone, Official Rep
-
11,670 Points
In your scenario, you have a queue interaction that updates a page include, correct? When a user does this, is the issue that they're seeing multiple copies of the page include? Is it always the same number of duplicates, or is it different depending on how far down in the queue they clicked?
Also, can you tell me what the Queue's model is like? Is it a UI-only model, or is it attached to a Salesforce object?
Thanks. I'm looking for more details since I haven't yet been able to reproduce the behavior in 10.0.19 or 11.1.6, and I'm hoping to find out what you and Matt Sones have in common.
Matt Sones, Champion
-
31,702 Points
(function(skuid){
var $ = skuid.$;
$(document.body).one('pageload',function(){
skuid.snippet.getSnippet('getAvailableFields')();
});
})(skuid);
And it also runs when the SignatureFields model (the table's model) is saved.
Matt Sones, Champion
-
31,702 Points
-
1,446 Points
-
1,446 Points

<skuidpage unsavedchangeswarning="yes" personalizationmode="server" showsidebar="false" showheader="true" cachepage="true" useviewportmeta="true">
<models>
<model id="testMC" query="true" createrowifnonefound="false" datasource="salesforce" sobject="Product2">
<fields>
<field id="Name"/>
</fields>
<conditions>
<condition type="fieldvalue" value="210" enclosevalueinquotes="true" field="Name" operator="contains"/>
</conditions>
<actions>
<action>
<actions>
<action type="requeryModel" model="emQueueProd" behavior="standard"/>
</actions>
<events>
<event>condition.valueChanged</event>
</events>
</action>
</actions>
</model>
</models>
<components>
<grid uniqueid="sk-3VAMFM-177">
<divisions>
<division behavior="fit" verticalalign="top" uniqueid="qDiv">
<components>
<wrapper uniqueid="sk-3zQJos-1368">
<components>
<queue model="testMC" tagrendertype="template" searchbox="false" tokenizesearch="true" showsearchbydefault="true" uniqueid="sk-3waS_Y-2934" title="Queued Up" searchmethod="server" emptysearchbehavior="remove" instantfilters="false" hideheader="false">
<rendertemplate>{{Name}}:
{{Make__c}}:{{Description_from_DIS__c}}</rendertemplate>
<interactions>
<interaction type="tap">
<action type="updateIncludePanel" querystring="id={{Id}}" panelid="emTry3" pagename="testMultiClickPI"/>
</interaction>
</interactions>
<searchfields usesosl="false" soslfields="Name Fields"/>
<renderconditions logictype="and"/>
<filters/>
</queue>
</components>
<styles>
<styleitem type="background"/>
<styleitem type="border"/>
<styleitem type="size" width="custom">
<styles>
<styleitem property="max-width" value="50vw"/>
</styles>
</styleitem>
</styles>
<renderconditions logictype="and"/>
</wrapper>
</components>
</division>
<division behavior="flex" verticalalign="top" ratio="1" minwidth="48vw">
<components>
<wrapper uniqueid="sk-lsp-808">
<components>
<pagetitle model="testMC" uniqueid="sk-lsp-819">
<subtitle>
<template>{{Model.label}}</template>
</subtitle>
<actions/>
<maintitle>This is a Very sparse test</maintitle>
</pagetitle>
</components>
<styles>
<styleitem type="background"/>
<styleitem type="border"/>
<styleitem type="size"/>
</styles>
</wrapper>
<includepanel type="skuid" uniqueid="emTry3" querystring="" lazyload="true">
<renderconditions logictype="and"/>
</includepanel>
</components>
</division>
</divisions>
<styles>
<styleitem type="background" bgtype="none"/>
</styles>
<renderconditions logictype="and"/>
</grid>
</components>
<resources>
<labels/>
<javascript>
<jsitem location="external" name="Apex Ajax Toolkit" cachelocation="false" url="/soap/ajax/41.0/apex.js ">var params = arguments[0],
$ = skuid.$;
</jsitem>
</javascript>
<css>
<cssitem location="inline" name="CenterText" cachelocation="false">.bang2 field {
text-align: center;
}</cssitem>
<cssitem location="inline" name="addSpace" cachelocation="false">.nx-actionselect-dropdown-item {
padding-right:50px;
}</cssitem>
</css>
<actionsequences uniqueid="sk-36hz2V-1465">
<actionsequence id="16eb7e42-b15c-42aa-88f6-bb3c67a0e2fa" label="ToggleQueue" uniqueid="sk-3UZMEx-606">
<actions>
<action type="toggleRenderComponent" behavior="toggle" componentid="queRGdiv"/>
<action type="updateRow" fieldmodel="emQueueProd" affectedrows="context" field="HideFirst" enclosevalueinquotes="false" value="false"/>
<action type="updateRow" fieldmodel="emQueueProd" affectedrows="context" field="dontHideQueue" enclosevalueinquotes="false" value="true"/>
</actions>
<description/>
</actionsequence>
</actionsequences>
</resources>
<styles>
<styleitem type="background" bgtype="none"/>
</styles>
<interactions/>
</skuidpage>
______
<skuidpage unsavedchangeswarning="yes" personalizationmode="server" showsidebar="true" useviewportmeta="true" showheader="true">
<models>
<model id="difProd" limit="20" query="true" createrowifnonefound="false" datasource="salesforce" sobject="Product2">
<fields>
<field id="Name"/>
</fields>
<conditions>
<condition type="param" value="id" field="Id" operator="=" enclosevalueinquotes="true"/>
</conditions>
<actions/>
</model>
</models>
<components>
<grid uniqueid="sk-lvn-202">
<divisions>
<division behavior="flex" minwidth="100px" ratio="1">
<components>
<pagetitle uniqueid="sk-lvn-216" model="difProd">
<maintitle>{{Name}} we are ttest</maintitle>
<subtitle>
<template>{{Model.label}}</template>
</subtitle>
<actions/>
</pagetitle>
</components>
</division>
</divisions>
<styles>
<styleitem type="background" bgtype="none"/>
</styles>
</grid>
</components>
<resources>
<labels/>
<javascript/>
<css/>
<actionsequences uniqueid="sk-lvn-265"/>
</resources>
<styles>
<styleitem type="background" bgtype="none"/>
</styles>
</skuidpage>
Mark DeSimone, Official Rep
-
11,670 Points
Thank you for providing your test pages. I'm not seeing any strange behavior when trying these two test pages, unfortunately. I also don't see any eventlisteners or error messages about them. In your Queue's display template, can you try changing this
{{Name}}:
{{Make__c}}:{{Description_from_DIS__c}}
to this:
{{{Name}}}:
{{{Make__c}}}:{{{Description_from_DIS__c}}}
and let me know if that makes a difference?
Is there any script happening in the Queue actions?
Mark DeSimone, Official Rep
-
11,670 Points
-
1,446 Points
-
1,446 Points
Mark DeSimone, Official Rep
-
11,670 Points
-
1,446 Points
Matt Sones, Champion
-
31,702 Points
Here's a couple examples with just a console.log() as the queue click action. In both examples, the queues model is created with javascript on pageload. In the first example, it is a ui-only model. In the second example, it is a model on a custom salesforce object, with two newly created and unsaved rows.
Mark DeSimone, Official Rep
-
11,670 Points
Matt, I now see this issue happening in the latest maintenance release of 10.0.x ( due out shortly), but in Millau releases like 11.0.8 and 11.1.6, the snippet is only being called once per click (i.e. working as expected). We will continue investigating this issue in the 10.0.x branch.
Arne-Per, I believe this means your issue isn't related to the one that's surfaced in this email thread, even though it looks quite similar. Would you be able to set up a new post capturing the current status of that issue, and linking to it here?
Below is the XML I used to reproduce this issue, in case it's useful:
<skuidpage unsavedchangeswarning="yes" personalizationmode="server" showsidebar="true" useviewportmeta="true" showheader="true">
<models>
<model id="UI" query="true" createrowifnonefound="true" datasource="Ui-Only" processonclient="true">
<fields>
<field id="Name" displaytype="TEXT" label="Name" defaultvaluetype="fieldvalue" defaultValue="default name"/>
<field id="Id" displaytype="UUID" label="Id" ogdisplaytype="TEXT"/>
</fields>
<conditions/>
<actions/>
</model>
<model id="Acc" limit="20" query="false" createrowifnonefound="false" datasource="salesforce" type="" sobject="Account">
<fields>
<field id="Id"/>
<field id="Name"/>
</fields>
<conditions/>
<actions/>
</model>
</models>
<components>
<template multiple="false" uniqueid="sk-14kMfe-210">
<contents><ol>Steps to reproduce issue:
<li>Open browser JS console.</li>
<li>Click button to "Add a row to UI model" a few times</li>
<li>Click each newly created row in the Queue. An Interaction will run a snippet that creates a console.log().</li>
<li>Observe console for how many console logs are created</li>
</ol>
Expected Behavior: One console log should be present for each item clicked on queue
observed Behavior: Several console logs are being created. This means the script is running multiple times for each click (the lower on the list the item is, the fewer # of times the script is called).
The behavior is the same whether the model is a UI model or a standard Salesforce object model. </contents>
</template>
<grid uniqueid="sk-14kltc-257">
<divisions>
<division behavior="flex" minwidth="100px" ratio="1">
<components>
<buttonset model="UI" uniqueid="sk-s67UV-252">
<buttons>
<button type="multi" label="Add a row to UI model" uniqueid="sk-14gpw_-151">
<actions>
<action type="createRow" model="UI" appendorprepend="prepend" defaultmodefornewitems="edit" affectedrows="context">
<defaults/>
</action>
</actions>
</button>
</buttons>
</buttonset>
<queue model="UI" tagrendertype="template" searchbox="true" tokenizesearch="true" showsearchbydefault="true" uniqueid="sk-s423n-94" title="UI Model">
<rendertemplate> {{Id}} {{Name}}</rendertemplate>
<interactions>
<interaction type="tap">
<action type="custom" snippet="newSnippet"/>
</interaction>
</interactions>
</queue>
</components>
</division>
<division behavior="flex" verticalalign="top" minwidth="100px" ratio="1">
<components>
<buttonset model="Acc" uniqueid="sk-14krWh-272">
<buttons>
<button type="multi" label="Add row to Account model" uniqueid="sk-14krs6-275">
<actions>
<action type="createRow" model="Acc" appendorprepend="prepend" defaultmodefornewitems="edit" affectedrows="context">
<models>
<model>Acc</model>
</models>
</action>
</actions>
</button>
</buttons>
</buttonset>
<queue model="Acc" tagrendertype="template" searchbox="true" tokenizesearch="true" showsearchbydefault="true" uniqueid="sk-14khhJ-250" title="Account Model">
<rendertemplate>{{Name}} {{Id}}</rendertemplate>
<interactions>
<interaction type="tap">
<action type="custom" querystring="id={{Id}}" snippet="newSnippet"/>
</interaction>
</interactions>
</queue>
</components>
</division>
</divisions>
<styles>
<styleitem type="background" bgtype="none"/>
</styles>
</grid>
</components>
<resources>
<labels/>
<javascript>
<jsitem location="inlinesnippet" name="newSnippet" cachelocation="false">console.log("log a click");</jsitem>
</javascript>
<css/>
</resources>
<styles>
<styleitem type="background" bgtype="none"/>
</styles>
</skuidpage>
-
1,446 Points
-
1,446 Points
Matt Sones, Champion
-
31,702 Points
Thanks for continuing to follow through.
Yes, it does appear to be two distinct issues that are surfacing in similar ways.
-
1,446 Points
Khamla Phimmachack, Official Rep
-
1,636 Points
Thank you for your patience! Skuid has fixed this issue in the Brooklyn 10.0.21 release which is now available on the Skuid Releases page.
As a reminder, Salesforce does NOT allow reverting back to prior versions of managed packages. Skuid always recommends installing new versions in a non-business critical sandbox environment to test all mission critical functionality before installing into a production environment. We also recommend that you update out of date themes when you upgrade. Please let us know if you continue to encounter any problems with this issue after upgrading.
Related Categories
-
Skuid on Salesforce
- 2271 Conversations
- 181 Followers