Forum:Is it just me...
Jump to navigation
Jump to search
Long story short, every time it says "cannot convert <whatever> to object", it's because the javascript is referencing an object that doesn't exist yet. Among others, our YAHOO API (YUI) isn't being included at the right time, although it definitely is being included at some point, because when the page has finished loading, var YAHOO is defined. That object, btw, is why the QVFD and tagging scripts are broke-d. ~ Thu, Jul 26 '12 7:50 (UTC)
Forums: Index > Village Dump > Is it just me...
Note: This topic has been unedited for 4208 days. It is considered archived - the discussion is over.
Or did the {{title}} template stop working? 23:49, 25 July 2012
- It's not you, it's me... Actually, its Wikia again. --Xamralco (talk) 00:11, July 26, 2012 (UTC)
- Well, at least we can add some more tweets to this now. 00:18, 26 July 2012
Uncaught exception: ReferenceError: Undefined variable: MiniEditor Error thrown at line 356, column 1124 in <anonymous function>($) in http://slot2.images.wikia.nocookie.net/__am/57085/group/-/monobook_js: MiniEditor.Wall=MiniEditor.Wall||{}; called from line 356, column 555 in http://slot2.images.wikia.nocookie.net/__am/57085/group/-/monobook_js: (function($){MiniEditor.Wall=MiniEditor.Wall||{};MiniEditor.Wall.Animations={editorActivated:function(event,wikiaEditor){var element=wikiaEditor.getEditorElement(),wrapper=wikiaEditor.getEditboxWrapper(),animation={height:wikiaEditor.config.minHeight};if(wikiaEditor.ck){var hasContent=wikiaEditor.getContent();if(this.isReady&&!hasContent){wrapper.height(element.height()).show();} Uncaught exception: TypeError: Cannot convert 'AdProviderOpenX' to object Error thrown at line 363, column 32 in http://uncyclopedia.wikia.com/wiki/Noblesse_oblige: base_url = AdProviderOpenX.getUrl("/__spotlights/afr.php", "SPOTLIGHT_FOOTER_1", "14", "", "humor", ""); Uncaught exception: TypeError: Cannot convert 'AdProviderOpenX' to object Error thrown at line 364, column 592 in http://uncyclopedia.wikia.com/wiki/Noblesse_oblige: base_url = AdProviderOpenX.getUrl("/__spotlights/afr.php", "SPOTLIGHT_FOOTER_2", "15", "", "humor", ""); Uncaught exception: TypeError: Cannot convert 'AdProviderOpenX' to object Error thrown at line 365, column 592 in http://uncyclopedia.wikia.com/wiki/Noblesse_oblige: base_url = AdProviderOpenX.getUrl("/__spotlights/afr.php", "SPOTLIGHT_FOOTER_3", "16", "", "humor", ""); Uncaught exception: TypeError: Cannot convert 'YAHOO' to object Error thrown at line 115, column 0 in http://uncyclopedia.wikia.com/wiki/MediaWiki:Gadget-quickvfd.js?action=raw&ctype=text/javascript&5204023: YAHOO.util.Event.onContentReady('p-cactions', qvfd.addQVFD); Uncaught exception: TypeError: Cannot convert 'YAHOO' to object Error thrown at line 145, column 0 in http://uncyclopedia.wikia.com/wiki/MediaWiki:Gadget-autobp.js?action=raw&ctype=text/javascript&5204022: YAHOO.util.Event.onContentReady('p-cactions', bp.add); Uncaught exception: TypeError: Cannot convert 'YAHOO' to object Error thrown at line 418, column 0 in http://uncyclopedia.wikia.com/index.php?title=User:Lyrithya/tags.js&action=raw&ctype=text/javascript&dontcountme=s: YAHOO.util.Event.onContentReady('p-cactions', tags.addtag); Uncaught exception: TypeError: Cannot convert 'YAHOO' to object
Long story short, every time it says "cannot convert <whatever> to object", it's because the javascript is referencing an object that doesn't exist yet. Among others, our YAHOO API (YUI) isn't being included at the right time, although it definitely is being included at some point, because when the page has finished loading, var YAHOO is defined. That object, btw, is why the QVFD and tagging scripts are broke-d. ~ Thu, Jul 26 '12 7:50 (UTC)
- Why do we use Yahoo YUI for title/logo/nologo? Wouldn't it be feasible, as these are objects with IDs and classy, to use bog standard JavaScript get object with ID stuff? Then we're not reliant on a scripting that is bulky and becoming outmoded. (Because I know soooo much about js.) • Puppy's talk page • 10:22 30 Jul
- Because those elements don't exist on the page when the code runs, so the code has to wait for them to load in order to replace them. However, there's no built-in .onLoad() method for individual elements (other than images, and the logo isn't an <img/> element, it's a link with a background-image). YUI simulates such a method with its .onContentReady(), which "polls" (uses a looping timer to check every n milliseconds) to see if a given element has loaded. jQuery has no such method built-in, although plugins exist, and it would be easy enough to write one. The alternative would be using window.onload(), but that doesn't fire until every last element on the page has completely loaded, which could take several seconds. ~ Mon, Jul 30 '12 10:34 (UTC)
- Most of these didn't actually kick in until window was loaded anyway. For the sacrifice of several seconds on some pages on few elements, we add back not having to load the YAHOO API on all pages. As for the logo as a background image, can we "paste" over it with a copy of the background image without the logo, and then position the "alternative" logo on top of that? • Puppy's talk page • 11:25 30 Jul
- Maybe, but many of the gadgets also use the YUI -- QVFD and Lyr's tagging script use it for both AJAX calls and for displaying UI message boxes. All the gadgets are going to have to be rewritten for jQuery. I made a new version of the QVFD and tagging scripts back in January-February, then kept forgetting to finish it...and then they upgraded us to MW 1.19, making half my code redundant. ~ Mon, Jul 30 '12 21:15 (UTC)
- What would it take to complete the stuff you did earlier in the year and get it working with MW1.19? (Given you were doing it for this reason, at least partially, maybe it's time to push it over the line.) • Puppy's talk page • 12:04 31 Jul
- I'll see what I can do as soon as I finish the social networking tool; the navboxes for SPIKE; fixing the realtime RecentChanges script (which apparently breaks now for no good reason) and integrating it with the auto-patrolling script; giving the auto-patrolling script added functionality for diff pages; and damn it all to hell but there are about thirty articles floating around this place (and ten more in my userspace) that I started to fix before being distracted by something else. Come to think of it, I should've never told anybody I was any good at javascript... ~ Tue, Jul 31 '12 11:43 (UTC)
- What would it take to complete the stuff you did earlier in the year and get it working with MW1.19? (Given you were doing it for this reason, at least partially, maybe it's time to push it over the line.) • Puppy's talk page • 12:04 31 Jul
- Maybe, but many of the gadgets also use the YUI -- QVFD and Lyr's tagging script use it for both AJAX calls and for displaying UI message boxes. All the gadgets are going to have to be rewritten for jQuery. I made a new version of the QVFD and tagging scripts back in January-February, then kept forgetting to finish it...and then they upgraded us to MW 1.19, making half my code redundant. ~ Mon, Jul 30 '12 21:15 (UTC)
- Most of these didn't actually kick in until window was loaded anyway. For the sacrifice of several seconds on some pages on few elements, we add back not having to load the YAHOO API on all pages. As for the logo as a background image, can we "paste" over it with a copy of the background image without the logo, and then position the "alternative" logo on top of that? • Puppy's talk page • 11:25 30 Jul
- Because those elements don't exist on the page when the code runs, so the code has to wait for them to load in order to replace them. However, there's no built-in .onLoad() method for individual elements (other than images, and the logo isn't an <img/> element, it's a link with a background-image). YUI simulates such a method with its .onContentReady(), which "polls" (uses a looping timer to check every n milliseconds) to see if a given element has loaded. jQuery has no such method built-in, although plugins exist, and it would be easy enough to write one. The alternative would be using window.onload(), but that doesn't fire until every last element on the page has completely loaded, which could take several seconds. ~ Mon, Jul 30 '12 10:34 (UTC)
The templates don't work? No problem!
I think the
template has no logo in it. 09:51, July 30, 2012 (UTC)