Skip to main content
Nintex Community Menu Bar
Question

Page Load Snippets stopped working- Brooklyn

  • July 10, 2024
  • 10 replies
  • 1 view
  • Translate

Forum|alt.badge.img+11

All of our page load snippets don’t appear to work in Brooklyn. I’ve got a simple example where I expect to see a console log message, and I get nothing.

Example snippet:
(function(skuid){ var $ = skuid.$;
$(document.body).one(‘pageload’,function(){

console.log(“Page load snippet is running”);
});
})(skuid);

Page XML:















{{Name}}


{{Model.label}}



































(function(skuid){
var $ = skuid.$;
$(document.body).one(‘pageload’,function(){

console.log(“Page load snippet is running”);
});
})(skuid);





Did this topic help you find an answer to your question?

10 replies

Forum|alt.badge.img+7

Chandra,

What iteration of Brooklyn are you on?

Translate

Forum|alt.badge.img+11
  • Author
  • 340 replies
  • July 10, 2024

I just installed this morning, so 9.3.1

Translate

Forum|alt.badge.img+11
  • Author
  • 340 replies
  • July 10, 2024

Org ID and access provided to Skuid support team via email.

Translate

Forum|alt.badge.img+3

Hi Chandra V ,

Is this Issue fixed? As we’re also facing same Issue.

regards,
Chandra A.

Translate

Forum|alt.badge.img+4

Chandra is out today but issue is not resolved.

Translate

Forum|alt.badge.img+3

Thank you Daniel.

We have been searching for work arounds until skuid Team can fix it. 

One work around for now is using "$(document).ready(function(){"  instead of "$(document.body).one('pageload',function(){" in Inline snippet. We are still testing all our scenarios.


 Hope this may help !!


regard's,

Chandra A


Translate

Forum|alt.badge.img+18

One warning: using $(document).ready() instead of triggering on the first pageload won’t work for page includes. It is only triggered once on initial page load, so any included pages that need to run inline javascript when they’re loaded will continue to fail.

Translate

Forum|alt.badge.img+4

The code we have in a page where it is not working was as follows:

(function(skuid){

                var $ = skuid.$;

                $(document.body).one(‘pageload’,function(){

                                //var myModel = skuid.model.getModel(‘MyModelId’);

                                //var myComponent = skuid.component.getById(‘MyComponentUniqueId’);

                               

                                skuid.snippet.getSnippet(‘ClearUserFields’)();

                                console.log(‘page load snippet has run’);

                });

})(skuid);

 

When we replace:

$(document.body).one(‘pageload’,function(){

 With :

 $(window).on(‘load’,function(){

 

It works fine. Honestly don’t understand what that statement means but it runs on page load. Another user within our company was using this code successfully.

Hope this helps.



Translate

Forum|alt.badge.img+7

Hi All,

Just wanted to let you know that our developers are currently working on this, and the fix is targeted to be out in the next release. Thanks for your patience, and for sharing your workarounds with each other!

Translate

Forum|alt.badge.img+7

Hi All,

This issue is now fixed in Brooklyn Iteration 3, available from our 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.

Thanks!
Amy
 

Translate

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie Settings