yakecan / dropthings

Automatically exported from code.google.com/p/dropthings
0 stars 0 forks source link

Several instances of same widget #160

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.
2.
3.

What is the expected output? What do you see instead?
When using a widget several times with a shared javascript-file, there are som 
issues when reloading. When dragging two instances of the same widget on the 
droparea, they both load. But when I reload/revisit, only one of the widgets 
appear with contents loaded. In my error-window in the browser I get the 
errormessage that "<javscript-variable> is not defined". 

What version of the product are you using? On what operating system?
2.6.5. Windows XP. 

Please provide any additional information below.

Original issue reported on code.google.com by ingve.s...@gmail.com on 25 Nov 2010 at 11:19

GoogleCodeExporter commented 9 years ago
forgot to put in steps, but they are explained in the next paragraph.

Original comment by ingve.s...@gmail.com on 25 Nov 2010 at 11:20

GoogleCodeExporter commented 9 years ago
Did you use WidgetHelper.RegisterScript to register the javascript file?

If the script is added to the page, all the functions, variables will be 
declared twice and thus produce JS error.

Original comment by omaralzabir@gmail.com on 21 Feb 2011 at 2:54

GoogleCodeExporter commented 9 years ago
You can reproduce this problem on the live Dropthings web site. Just add more 
than one Fast Flickr widget, refresh the page and you will get a javascript 
error: FastFlickrWidget is undefined. From here the widget will not work as 
expected.

This widget uses the WidgetHelper.RegisterWidgetScript in OnPreRender event.

Original comment by iancarri...@googlemail.com on 7 Mar 2011 at 11:41

GoogleCodeExporter commented 9 years ago
Could it be that there is some sort of timing issue rather than/as well as 
variables declared twice? The reason I say this is; for a page with 2 
FastFlickr widgets, the "FastFlickrWidget is undefined" js error message 
appears BEFORE the FastFlickrWidget.js file is actually loaded. See attached 
for proof of this. This only occurs when there is more than one widget.

Original comment by iancarri...@googlemail.com on 7 Mar 2011 at 12:40

Attachments:

GoogleCodeExporter commented 9 years ago
Dear Mr. Al Zabir,  I am using an older version of dropthings, and in Issue 144 
(a duplicate of this issue) you advise trying the latest code, however, I am 
hesitant to do a complete version change if it is at all possible to remedy the 
problem with a bit of code. So, if you could, will you please tell me what 
exactly needs to be changed in order to fix this issue, assuming it has been 
fixed in the newer Dropthings versions.

Thanks a lot.

Original comment by noah.cou...@gmail.com on 30 Jun 2011 at 4:59

GoogleCodeExporter commented 9 years ago
I am trying to debug the issue. Let's see if I can reproduce it.

Original comment by omaralzabir@gmail.com on 10 Jul 2011 at 2:11

GoogleCodeExporter commented 9 years ago
This has been fixed in the new 2.7.6 version.

Original comment by omaralzabir@gmail.com on 19 Jul 2011 at 7:55