Skip to main content

When generating the page HTML for a Skuid page, CSS & JS resources not not being emitted in the order specified in the page definition. I have not tried all combinations, but one specific example is that external resources are being loaded before inline resources even if inline resources comes before external in the list of resources.


As we all know, the order of loading is extremely critical to proper page function. Order is respected in some cases (e.g. external resources are emitted in their defined order) but not all.


Steps to reproduce:


  1. Create page from XML below

  2. Preview page picking an account

  3. Review the page source looking for fakefile.js & fakefile.css

Expected Behavior

The inline JS & CSS should come before the external resources


Actual Behavior

Inline JS & CSS always come last


Sample Page XML


<skuidpage unsavedchangeswarning="yes" personalizationmode="server" showsidebar="true" showheader="true" tabtooverride="Account">   <models>
<model id="Account" limit="5" query="true" createrowifnonefound="false" sobject="Account" adapter="" type="">
<fields>
<field id="Name"/>
<field id="CreatedDate"/>
</fields>
<conditions/>
<actions/>
</model>
</models>
<components>
<pagetitle model="Account" uniqueid="sk-5uc6Q-70">
<maintitle>
<template>{{Name}}</template>
</maintitle>
<subtitle>
<template>{{Model.label}}</template>
</subtitle>
<actions>
<action type="delete"/>
<action type="clone"/>
<action type="share"/>
<action type="savecancel" window="self"/>
</actions>
</pagetitle>
<skootable showconditions="true" showsavecancel="true" showerrorsinline="true" searchmethod="server" searchbox="true" showexportbuttons="false" pagesize="10" createrecords="true" model="Account" buttonposition="" mode="read" uniqueid="sk-6119O-171">
<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/>
<css>
<cssitem location="inline" name="newcss" cachelocation="false">.myclass {
display: none;
}</cssitem>
<cssitem location="external" name="fakecss" cachelocation="false" url="//testingresources.com/fakefile.css"/>
</css>
<javascript>
<jsitem location="inline" name="newInlineJS" cachelocation="false" url="">(function(skuid){
var $ = skuid.$;
$(document.body).one('pageload',function(){
var myModel = skuid.model.getModel('MyModelId');
var myComponent = skuid.component.getById('MyComponentUniqueId');
});
})(skuid);</jsitem>
<jsitem location="external" name="fakejs" cachelocation="false" url="//testingresources.com/fakefile.js" namespace="">var params = arguments[0],
$ = skuid.$;
</jsitem>
</javascript>
</resources>
<styles>
<styleitem type="background" bgtype="none"/>
</styles>
</skuidpage>

Skuid Team - Any input on this?


Skuid Team?


Barry~

Thanks for alerting us of the importance of this. The dev team has been notified of this and is considering it for a future release. 

Thanks for helping make Skuid better. Vote it up if you would like to see this too!

Karen


Thanks Karen!


Reply