issue summary webpart causing issues

LabKey Support Forum (Inactive)
issue summary webpart causing issues Ben Bimber  2011-02-17 10:58
Status: Closed
 
We have a simple collaboration folder where I tried to add an issues summary webpart:

https://xnight.primate.wisc.edu:8443/labkey/project/WNPRC/WNPRC_Units/Other/IACUC%20Review/begin.view

there's 10's of folders almost exactly like this one on our site. they all work fine. for some reason, this issues WP throws errors and does not load.

The code behind the issue summary WP is very simple. It uses Ext.get() to find a div, then updates this DIV with the HTML from a given page. for some bizarre reason this folder is giving an error and not loading that content. it says 'Ext.get('issues') is null'. If I inspect with firebug, that DIV exists. My only guess is that perhaps it has something to do with the order in which that code is run? It's just weird that I can only reproduce it in this folder.


I created this folder new this morning. The only things I did was modify which users have permissions, then try to add this WP. nothing else has been done to it. i reproduced it in both chrome and firefox.

Anyone have thoughts?

Thanks for the help.
 
 
marki responded:  2011-02-17 11:02
The code inside the script block could certainly be executed before the <div> since the script block is before the div in html order.

If you wrap the code in an Ext.onReady() or if you just swap the order of the div and the script it could fix the problem.
 
Ben Bimber responded:  2011-02-17 11:08
Hi mark,

that's basically what i was thinking, although i'm baffled why it only manifests itself in this one specific folder, and not in the other folders we have that are essentially clones of this one. About the only difference I see is that this issue tracker doesnt have any threads. therefore that AJAX call might return faster, prior to the existence of that DIV.

Those are perfectly good fixes, but this is labkey's built-in webpart I'm talking about, not my code.
 
marki responded:  2011-02-17 11:21
Actually, no. I believe what you are getting is the Issues Summary webpart defined in WNPRC_Main.

It seems to be overriding the built-in one.
 
Ben Bimber responded:  2011-02-17 11:27
you are right - my apologies. i am somewhat surprised that issues page exists in WNPRC_main. it must be extremely old.