Problem with widget javascript

Nick Kellett's Avatar

Nick Kellett

08 Nov, 2009 06:06 PM

Hi guys, I am using Tender App's widget on my website, at http://help.clockworkwf.com . A visitor just reported the following:

Hi Nick

Tried to access the site but get a JS error, which causes the whole page not to show. I am on Windows 2008 Server, with IE 8.0.

Give us a shout when its fixed and I will have a look.

The JS Error is this :

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; WOW64; Trident/4.0; SLCC1; .NET CLR 2.0.50727; InfoPath.2; .NET CLR 3.5.30729; .NET CLR 3.0.30618; OfficeLiveConnector.1.3; OfficeLivePatch.0.0)
Timestamp: Sun, 8 Nov 2009 11:49:14 UTC

Message: 'document.body' is null or not an object
Line: 57
Char: 3
Code: 0
URI: http://clockwork-web-framework-for-net.tenderapp.com/tender_widget.js

  1. 1 Posted by Nick Kellett on 08 Nov, 2009 06:14 PM

    Nick Kellett's Avatar

    Let me amend the link - the widget is actually on www.clockworkwf.com .

  2. 2 Posted by rick on 09 Nov, 2009 01:54 AM

    rick's Avatar

    The docs tell you to do this:

    <script type="text/javascript" defer="defer">
    var baseSslHost = (("https:" == document.location.protocol) ? "https://" : "http://");
    document.write(unescape("%3Cscript src='" + baseSslHost + "help.tenderapp.com/tender_widget.js' type='text/javascript'%3E%3C/script%3E"));
    </script>
    

    Try writing the script tag out manually instead of generating it:

    <script src="https://clockwork-web-framework-for-net.tenderapp.com/tender_widget.js" type="text/javascript></script>
    
  3. 3 Posted by nick@griffonsol... on 09 Nov, 2009 02:08 AM

    nick@griffonsolutions.com's Avatar

    Hi, now it causes an error with UserVoice, which is also on the page:

    Webpage error details

    User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; WOW64; Trident/4.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; InfoPath.2; .NET CLR 1.1.4322; .NET CLR 3.5.21022; .NET CLR 3.5.30729; OfficeLiveConnector.1.3; OfficeLivePatch.0.0; MS-RTC LM 8; .NET CLR 3.0.30729; .NET4.0C; .NET4.0E)
    Timestamp: Mon, 9 Nov 2009 02:07:14 UTC

    Message: 'UserVoice' is undefined
    Line: 130
    Char: 21
    Code: 0
    URI: http://test.clockworkwf.com/

    I'm testing it on this page:
    http://test.clockworkwf.com/

    Nick Kellett
    CEO / Co-Founder, Griffon Solutions
    Email: [email blocked] | Phone: +1 (819) 918-6097
    LinkedIn: www.linkedin.com/in/nicholaskellett
    Twitter: @NickKellett or www.twitter.com/nickkellett
    Blog: planetmoss.blogspot.com

    -----Original Message-----
    From: rick [mailto:[email blocked]]
    Sent: Sunday, November 08, 2009 8:54 PM
    To: [email blocked]
    Subject: Re: Problem with widget javascript [Problems]

  4. 4 Posted by rick on 09 Nov, 2009 02:09 AM

    rick's Avatar

    We don't interact with the UserVoice widget, are you sure the error is
    coming from our widget?

  5. 5 Posted by nick@griffonsol... on 09 Nov, 2009 02:14 AM

    nick@griffonsolutions.com's Avatar

    Yes, when I remove it the UserVoice widget works. I only got the UserVoice-related error when I added the javascript reference as you suggested. Before, when I manually created the Tender App Javascript as per the docs, I got the original error. In either case, I didn't have this error before I added the Tender App widget.
    Thanks,

    Nick Kellett

    -----Original Message-----
    From: rick [mailto:[email blocked]]
    Sent: Sunday, November 08, 2009 9:09 PM
    To: [email blocked]
    Subject: Re: Problem with widget javascript [Problems]

  6. 6 Posted by rick on 09 Nov, 2009 02:20 AM

    rick's Avatar

    The error is coming from that block of script code underneath where
    the UV code is loaded:

    @@@
    129 <script type="text/javascript">
    130 UserVoice.Tab.show({
    131 /* optional */
    132 alignment: 'left',
    @@@

    It looks like the UV code isn't being loaded properly. The error
    you're seeing isn't the real error -- another error is occurring,
    which causes the error you see to occur. It works fine for me, so
    I'll have to wait until tomorrow to try it on our windows box.

    Well, it looks like you removed it, so I can't do much to help.

  7. 7 Posted by nick@griffonsol... on 09 Nov, 2009 02:22 AM

    nick@griffonsolutions.com's Avatar

    I have added it back in again on http://test.clockworkwf.com and will check the UserVoice widget code to see what's happening.
    Thanks for the follow up.

    Nick Kellett
    CEO / Co-Founder, Griffon Solutions
    Email: [email blocked] | Phone: +1 (819) 918-6097
    LinkedIn: www.linkedin.com/in/nicholaskellett
    Twitter: @NickKellett or www.twitter.com/nickkellett
    Blog: planetmoss.blogspot.com

    -----Original Message-----
    From: rick [mailto:[email blocked]]
    Sent: Sunday, November 08, 2009 9:20 PM
    To: [email blocked]
    Subject: Re: Problem with widget javascript [Problems]

  8. 8 Posted by rick on 09 Nov, 2009 02:26 AM

    rick's Avatar

    I see both tabs in Safari. Firefox only shows the Tender tab with no
    javascript errors. Strange!

  9. 9 Posted by nick@griffonsol... on 09 Nov, 2009 02:28 AM

    nick@griffonsolutions.com's Avatar

    Now I remember why I hate javascript :)
    For the moment I'm using a link to the Tender App site so this isn't urgent. Please let me know if you can figure this out and I will be happy to add the Tender App widget back on the main site.
    Thanks

    Nick Kellett
    CEO / Co-Founder, Griffon Solutions
    Email: [email blocked] | Phone: +1 (819) 918-6097
    LinkedIn: www.linkedin.com/in/nicholaskellett
    Twitter: @NickKellett or www.twitter.com/nickkellett
    Blog: planetmoss.blogspot.com

    -----Original Message-----
    From: rick [mailto:[email blocked]]
    Sent: Sunday, November 08, 2009 9:27 PM
    To: [email blocked]
    Subject: Re: Problem with widget javascript [Problems]

  10. 10 Posted by rick on 09 Nov, 2009 09:52 PM

    rick's Avatar

    You can't self-close script tags:

    <script src="https://clockwork-web-framework-for-net.tenderapp.com/tender_widget.js" type="text/javascript" />
    
  11. 11 Posted by rick on 09 Nov, 2009 09:55 PM

    rick's Avatar

    I just changed the script line to:

    <script src="https://clockwork-web-framework-for-net.tenderapp.com/tender_widget.js" type="text/javascript"></script>
    

    I've attached a working local html file. It worked fine for me in Firefox.

  12. 12 Posted by nick@griffonsol... on 10 Nov, 2009 02:45 PM

    nick@griffonsolutions.com's Avatar

    Thanks Rick, it works perfectly now. I will test a little more and then add it back to my home page. I appreciate the help.
    Incidentally this is for an Open Source project. I think I'm supposed to contact you guys about that?

    Nick Kellett
    CEO / Co-Founder, Griffon Solutions
    Email: [email blocked] | Phone: +1 (819) 918-6097
    LinkedIn: www.linkedin.com/in/nicholaskellett
    Twitter: @NickKellett or www.twitter.com/nickkellett
    Blog: planetmoss.blogspot.com

    -----Original Message-----
    From: rick [mailto:[email blocked]]
    Sent: Monday, November 09, 2009 4:55 PM
    To: [email blocked]
    Subject: Re: Problem with widget javascript [Problems]

  13. 13 Posted by Tim on 10 Nov, 2009 05:12 PM

    Tim's Avatar

    FYI, we had the same issue with IE8 yesterday here: http://ParticipateDB.com

    Writing the script tag out manually seems to have fixed it.

  14. 14 Posted by rick on 10 Nov, 2009 08:00 PM

    rick's Avatar

    Thanks guys. I've fixed the documentation and will push it out shortly.

  15. rick closed this discussion on 07 Dec, 2009 07:38 AM.

Discussions are closed to public comments.
If you need help with Tender please start a new discussion.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac