I am getting this error 'Cufon' is undefined on my blog http://microreviews.org The error comes on Line 20, char1.
I also get the error 'dtsv' is undefined on Line 57 and character 3.
The errors comes only on IE7 and IE6 and no other browser. I donot really care for IE6 but the error on IE 7 is a major source of concern. What can be done to get rid of these errors?
The problem is happening in other browsers too -- check your error console.
For "Cufon is undefined", it's line 20 - that line is:
"Cufon.replace('h1, h2, h3, h4 ,h5', { fontfamily: 'Museo Sans 500' });
So .. whatever "Cufon" is supposed to be - it's not defined.
I notice that there's a link just prior to this:
http://microreviews.org/wp-content/themes/kreativ/js/cufon-yui.js
Which is resolving to a 404 error (not found) -- so that's probably your problem.
The "dtsv is undefined" problem is the same thing. Line 57:
dtsv.root = 'http://microreviews.org/wp....'
At that point, dtsv hasn't been initialized, so you can't set a property on it.
cause your Cufon file is not found, check the url to your file. And what is dstv ???
Related
I remember getting this error a lot a while before. Today I wanted to show it to a friend unfamiliar with Javascript. Chrome and Safari instead gave me something like:
> const o = {};
< undefined
> o.doge()
< TypeError: o.doge is not a function (In 'o.doge()',' 'o.doge' is undefined)
Chrome and Firefox seem to be user-friendly as well.
How can I get an original error, without this helpful message?
You will never get that error in a modern browser; the error comes from js engine itself not the browser; and if there are no others other than that Type Error, modern engines will return a more developer friendly error by applying a (similar) /(w+)/ regex on what ever typed before () and placing it in the error message check out:
v8 (chrome) message templates that will make the error string (line 51, 52):
T(CalledNonCallable, "% is not a function")
and SpiderMoneky (mozilla) message templates (at line 51, 54):
MSG_DEF(JSMSG_NOT_FUNCTION, 1, JSEXN_TYPEERR, "{0} is not a function")
non-callable test case in v8 and a SpiderMokney test case .
So the only way to a undefined is not a function error message in a modern browser is doing undefined() :)
undefined()
you can just try to find and download an older version of the browser which logged the original error. (if that version is still publicly available).
I have a script with around 30 lines, and I'm trying to to debug it in firefox, but when I get the error it doesn't tell me what line is getting the error? It says 4:370, does it mean at line 370, but I only have 30 lines?
ERROR: Execution of script 'test' failed! sessionStorage.getItem(...) is null userscript.html:4:370
That output means the error occurred on column 370 of line 4 in userscript.html. You can trace the error by clicking the userscript.html:4:370 on the right of the console and it should show you script and the line/command that caused the error.
I have a site that randomly throws this JavaScript error. If you refresh the site it almost always occurs and it prevents the site from loading. Instead, you just see a blank white page.
The console states there is an "Uncaught SyntaxError: Unexpected end of JSON input" in require.js on line 8. The line reads:
html{color:#000;background:#FFF;}body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,textarea,p,blockquote,th,td{margin:0;padding:0;}table{border-collapse:collapse;border-spacing:0;}fieldset,img{border:0;}address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal;}li{list-style:none;}caption,th{text-align:left;}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal;}q:before,q:after{content:'';}abbr,acronym{border:0;font-variant:normal;}sup{vertical-align:text-top;}sub{vertical-align:text-bottom;}input,textarea,select{font-family:inherit;font-size:inherit;font-weight:inherit;}input,textarea,select{*font-size:100%;}legend{color:#000;}
Is there something wrong with this line that I'm not seeing?
The site
Chrome console output
Firefox console output
define("lib/config", [], function() {
"use strict";
var e = document.getElementById("app-config");
return e ? JSON.parse(e.innerHTML) : {}
})
That's the problematic section of code. the app-config element isn't always loaded before this part is being executed. If possible, hard code your app-config into your html
I have following problem: No log pessage shows me in every console (builder's console absolutely useless - nothing happened at all when I click, built-in FF console shows every info about installing, uninstalling etc, Firebug shows nothing).
I used console.log(), console.error() without success.
On about:config page is every logLevel's set to 'all' and devtools.errorconsole.enabled is also true.
Please help me, I'm desperate :-(
Thank you.
Kamil
PS: log window is bellow. There are 3 css errors (by default 'cause I don't include any css file - it's something about expected declarations and skipped to next declaration). Program code is simple console.log('test') or console.error('test') inside or outside exports.main = function().
17:34:52.086 GET https://builder.addons.mozilla.org/get_latest_revision_number/1127553/ [HTTP/1.1 200 OK 207ms]
17:34:52.086 GET https://builder.addons.mozilla.org/package/check_latest_dependencies/1835317/ [HTTP/1.1 200 OK 215ms]
17:34:52.088 POST https://builder.addons.mozilla.org/xpi/prepare_test/1835317/ [HTTP/1.1 200 OK 805ms]
17:34:52.862 "XPI delayed ... try to load every 2 seconds" ide-min.js:1
17:34:53.919 GET https://builder.addons.mozilla.org/xpi/test/2dnzeahpy6adc/ [HTTP/1.1 200 OK 1494ms]
17:34:53.865 "installing from /xpi/test/2dnzeahpy6adc/" ide-min.js:1
17:34:54.863 "request is running" ide-min.js:1
17:34:56.308 Očakávaná deklarácia, ale bolo nájdené '['. Preskočené na ďalšiu deklaráciu. latest
17:34:56.309 "Add-on installed" ide-min.js:1
17:34:56.326 Chyba pri spracovaní hodnoty pre 'opacity'. Deklarácia vynechaná. latest
17:35:00.337 Chyba pri spracovaní hodnoty pre 'top'. Deklarácia vynechaná.
You have to change the logging level, which by default is error, either globally or for specific extensions.
See the related documentation.
I am trying to integrate TwitterWidget within SilverStripe.
That's the plugin I am trying to use:
https://twitter.com/about/resources/widgets/widget_profile
If I put this code in a simple *.html file the widget works. Unfortunately I get an error if I try to use it in a *.ss file.
I downloaded the source code to find out where the error occurs. After several hours I found something pretty confusing:
That's the piece of code where the error occurs:
document.write('<div class="twtr-widget" id="'+this.id+'"></div>')
FireBug:
uncaught exception: [Exception... "An attempt was made to use an object that is not, or is no longer, usable" code: "11" nsresult: "0x8053000b (NS_ERROR_DOM_INVALID_STATE_ERR)" location: "http://www.domain.com/mysite/javascript/widget.js?m=1321187964 Line: 257"]
LeftAn...8532904 (Zeile 883)
function() {return new ActiveXObject('Microsoft.XMLHTTP')},
After a few refreshes sometimes FireBug reports:
An attempt was made to use an object that is not, or is no longer, usable
[Bei diesem Fehler anhalten] document.write('<div class="twtr-widget" id="'+this.id+'"></div>')
Google Chrome JavaScript Debugger:
Uncaught TypeError: Object #<Document> has no method 'write' //widget.js:257
TWTR.Widget.init //widget.js:257
TWTR.Widget //widget.js:211
(anonymous function) //?stage=Stage&flush=1:117
f.extend._Deferred.e.resolveWith //jquery-1.6.4.min.js:2
e.extend.ready //jquery-1.6.4.min.js:2
c.addEventListener.C //jquery-1.6.4.min.js:2
This is a little incomplete to debug, but why not use one of the readily available widgets? Like http://www.silverstripe.org/twitter-widget-pack-widget/