Upgrade to v15.1 breaks Javascript call to LABKEY.ext4.data.Store()

LabKey Support Forum (Inactive)
Upgrade to v15.1 breaks Javascript call to LABKEY.ext4.data.Store() Will Holtz  2015-04-07 10:12
Status: Closed
 
I just upgraded to v15.1 from v14.3 (I also did a Java v7 to v8 upgrade at the same time). I have some custom javascript in a module that calls LABKEY.ext4.data.Store() and LABKEY.ext4 is now undefined. I didn't find anything in the release notes about Javascript API changes. Any ideas what is going on?

thanks,

-Will
 
 
Jon (LabKey DevOps) responded:  2015-04-07 11:30
Hi Will,

Any chance you can provide us with your JavaScript code? Right now, we are working towards porting our existing ExtJS 3.4 code over to ExtJS 4+ (will be ready by the 15.2 release), but the module you're referring to shouldn't have any issues.

Regards,

Jon
 
Will Holtz responded:  2015-04-07 11:46
Hi Jon,

The javascript code in question is in an upload.html file. I have stripped it down to just:
<script type="text/javascript">

Ext4.onReady(function() {
            var s = new LABKEY.ext4.data.Store({
                schemaName: 'hplc',
                queryName: 'instrument'
            });
});
</script>

and I'm still getting 'TypeError: LABKEY.ext4 is undefined' in my browser's javascript console.

thanks!

-Will
 
Ben Bimber responded:  2015-04-07 12:19
hi will - if i had to throw out a guess, it is that the ext4 client API isnt being loaded on your page. it is probably best practice for your code to explicitly declare that dependency. i cant say with certainty, but it is possible some other piece of code that happened to get loaded on your assay page was requesting this library, which meant it was already available for your code.

if you're doing a file based assay, i would recommend also creating a file named upload.view.xml. you will want to add something like:

<view xmlns="http://labkey.org/data/xml/view">
    <dependencies>
         <dependency path="clientapi/ext4"/>
    </dependencies>
</view>

check out similar upload.view.xml files in the modules under /externalModules/labModules/
 
Will Holtz responded:  2015-04-07 13:28
Thanks Ben. That fixed it. For some reason I don't fully recall, I mistakenly thought using Ext4.onReady() took care of loading the ext4 client API.

-Will