Last modified: 2012-09-27 01:11:06 UTC
From https://de.wikipedia.org/w/index.php?title=Benutzer:Ireas/d%C3%BCp-helperfunctions-monobook.js&oldid=99977855 right after this line is executed: $("div#p-cactions ul").append(li); it produces this strange error on this page: https://de.wikipedia.org/wiki/Datei:Logo_African_Pygmy_Goat.png?debug=true [08.03.2012 22:27:47] JavaScript - https://de.wikipedia.org/wiki/Datei:Logo_African_Pygmy_Goat.png?debug=true Inline script thread Uncaught exception: TypeError: Cannot convert '$.collapsibleTabs.getSettings( $( data.collapsedContainer ).children( data.collapsible+":first" ) )' to object Error thrown at line 84, column 4 in <anonymous function: handleResize>() in https://de.wikipedia.org/w/resources-1.19/resources/jquery/jquery.collapsibleTabs.js: if( $( data.collapsedContainer + ' ' + data.collapsible ).length > 0 called via Function.prototype.call() from line 658, column 5 in <anonymous function: each>(object, callback, args) in https://bits.wikimedia.org/de.wikipedia.org/load.php?debug=true&lang=de&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=20120228T025649Z: if ( callback.call( object[ i ], i, object[ i++ ] ) === false ) called from line 271, column 2 in <anonymous function: each>(callback, args) in https://bits.wikimedia.org/de.wikipedia.org/load.php?debug=true&lang=de&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=20120228T025649Z: return jQuery.each( this, callback, args ); called from line 70, column 3 in <anonymous function: handleResize>(e) in https://de.wikipedia.org/w/resources-1.19/resources/jquery/jquery.collapsibleTabs.js: $.collapsibleTabs.instances.each( function() { called from line 30, column 2 in <anonymous function: $.fn.collapsibleTabs>(options) in https://de.wikipedia.org/w/resources-1.19/resources/jquery/jquery.collapsibleTabs.js: $.collapsibleTabs.handleResize(); called from line 89, column 1 in <anonymous function>($) in https://bits.wikimedia.org/w/extensions-1.19/Vector/modules/ext.vector.collapsibleTabs.js: $( '#p-views ul' ).bind( 'beforeTabCollapse', function() { called via Function.prototype.apply() from line 1046, column 4 in <anonymous function: jQuery.Callbacks>(context, args) in https://bits.wikimedia.org/de.wikipedia.org/load.php?debug=true&lang=de&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=20120228T025649Z: if ( list[ firingIndex ].apply( context, args ) === false && flags.stopOnFalse ) called from line 1081, column 6 in <anonymous function: add>() in https://bits.wikimedia.org/de.wikipedia.org/load.php?debug=true&lang=de&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=20120228T025649Z: fire( memory[ 0 ], memory[ 1 ] ); called from line 279, column 2 in <anonymous function: ready>(fn) in https://bits.wikimedia.org/de.wikipedia.org/load.php?debug=true&lang=de&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=20120228T025649Z: readyList.add( fn ); called from line 198, column 3 in <anonymous function: init>(selector, context, rootjQuery) in https://bits.wikimedia.org/de.wikipedia.org/load.php?debug=true&lang=de&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=20120228T025649Z: return rootjQuery.ready( selector ); --------- the function should add a tab to the tab page or file pages as it does on Monobook and with *my* FF10 on Vector. The above error is from Vector in Opera 11.6. Strangely, another user of this script uses FF10 and has the same error. If debug=true is not added the script just fails and no error is shown - bad behaviour. I blame Ressource Loader. ;-)
The "li" which is to be appended is as follows (before it is tried to add it to the tab bar): <li class="collapsible"> <span> <a style="cursor: default"> <span>DÃœP</span> </a> </span> </li>
I'm
It might be failing due to the misplaced <span> tag. The contents of the portlet link can be anything, that's OK. But the structure between the portlet-container and the <a> link itself is strict. This script was clearly written for monobook and not vector. By using addPortletLink (or mw.util.addPortletLink) the difference in skin is covered and this problem should not occur. Did this start happening only after MediaWiki 1.19? If using addPortletLink does not fix it, or if this bug didn't happen on 1.18, feel free to re-open.
Okay, thank you. I will try to change it to addPortletLink. note: it was not only Opera - for another user it also fails in FF10. Why does it work in my FF10? A "mistake"? ;-) Also the error reporting is *not* okay. Errors should not be buried if not "debug=true" as it apparently happens - that makes it very hard to debug. Should I open a new bug? > Did this start happening only after MediaWiki 1.19? Although most users of this script use Monobook I got no error reports before yesterday when a new user wanted to use this script. The script is around sinec 2008. I tested it at 2011-03-18 with Vector and it worked (like it still does for my FF).