Closed (fixed)
Project:
Cufón
Version:
6.x-1.0-beta4
Component:
Miscellaneous
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
9 Sep 2010 at 21:08 UTC
Updated:
23 Aug 2012 at 11:31 UTC
Using cufon generates 2 different javascript errors in IE and FF. Cufon still renders the text, but the error breaks all of the following javascript.
In IE, the error is:
Message: 'B' is null or not an object
Line: 7
Char: 6941
Code: 0
URI: http://mysite.com/sites/all/modules/cufon/js/cufon-yui.js?J
This is obviously a cufon error. In FF, I suspect that this error (the only error I receive) is related:
Error: uncaught exception: [Exception... "Could not convert JavaScript argument arg 0 [nsIDOMViewCSS.getComputedStyle]" nsresult: "0x80570009 (NS_ERROR_XPC_BAD_CONVERT_JS)" location: "JS frame :: http://grasmickwebdesign.com/sites/all/modules/cufon/js/cufon-yui.js?J :: anonymous :: line 7" data: no]
Any ideas on what could be causing this?
Thanks!
Comments
Comment #1
apt94jesse commentedI encountered the same error however the "Null" line gave me the clue to fix it.
In my case, I had several cufon selectors in the module settings page, then I removed one, but I forgot to take the font out of the select box on the right. That meant it was trying to apply a font to no selector, or null. Removing the font from the dropdown fixed the issue right away.
FYI, you probably had the error in chrome too. I initially thought it was just FF and IE, but using the Chrome js console revealed it was happening across the board.
Hope this helps, I don't think it's really a bug that needs to be fixed in the module, although error-proofing the form so that if a selector is not input, the font is removed from the dropdown might avoid confusion in the future.
Comment #2
grasmash commentedYou're right! That absolutely fixed the problem. Thank you!
Comment #3
gateone commentedConfirming this. Great hint - this really happens quite often when developing! ;-)
Comment #4
maedi commentedCufon should probably throw a validation error when saving an empty field with a corresponding font selected. Let me know if you'd like a patch.
Comment #5
troky commentedProbably fixed in 6.x-1.x-dev.
Re-open issue if problem persists.