Page MenuHomePhabricator

Javascript error: $j(".lqt-drop-zone").droppable is not a function
Closed, ResolvedPublic

Description

When I open (logged out) a thread[1] and click on "Drag to new location" I get the following in the error console (I'm using Mozilla/5.0 (X11; U; Linux i686; pt-BR; rv:1.9.2.17pre) Gecko/20110322 Ubuntu/10.10 (maverick) Namoroka/3.6.17pre)

$j(".lqt-drop-zone").droppable is not a function
https://secure.wikimedia.org/w/extensions-1.17/LiquidThreads/lqt.js?301-2
Line 1190

On Google Chrome (10.0.648.204) the error message is:
Uncaught TypeError: Object #<Object> has no method 'droppable'
liquidThreads.activateDragDroplqt.js:1190
jQuery.event.handleload.php:27
jQuery.event.add.elemData.handle.eventHandleload.php:22

This makes it impossible to use the feature.

[1] E.g.:
https://secure.wikimedia.org/wikibooks/pt/wiki/Tópico:Wikilivros:LiquidThreads/abcde?uselang=en


Version: unspecified
Severity: major
URL: https://secure.wikimedia.org/wikipedia/mediawiki/wiki/Thread:Extension_talk:LiquidThreads/Drag_to_new_location_-_strange_behaviour;_not_working_correctly

Details

Reference
bz28407

Event Timeline

bzimport raised the priority of this task from to High.Nov 21 2014, 11:31 PM
bzimport set Reference to bz28407.
bzimport added a subscriber: Unknown Object (MLST).

I raised the error level, because this bug renders the whole Lqt unusable (in its GUI, what this extension should improve over standard talk pages), at least in the wild.

This bug annoys users, and should -please- be fixed with a higher priority than before. I also will have a look now (since at least this bug confirms my and my wiki users observations) and try to find the problem.

I analysed and found the same error.

the javascript

$IP/resources/jquery.ui/jquery.ui.droppable.js

is not loaded, but needs to be loaded.
Because I do not set undertand the new method how such things are loaded, I kindly ask someone of you experts to fix that.

Perhaps, "drag to new location" works then.

Good news: problem found. Fix will be submitted soon.

fixed in r89102

solution: added jquery.ui.droppable.js code to jquery.ui.dialog.js

reverted r89120; fixed in r89122

Index: trunk/extensions/LiquidThreads/LiquidThreads.php

  • trunk/extensions/LiquidThreads/LiquidThreads.php (revision 89120)

+++ trunk/extensions/LiquidThreads/LiquidThreads.php (revision 89121)
@@ -71,7 +71,7 @@
$wgResourceModules['ext.liquidThreads'] = $lqtResourceTemplate + array(

	'styles' => array( 'lqt.css', 'jquery/jquery.thread_collapse.css', 'lqt.dialogs.css' ),
	'scripts' => array( 'lqt.js', 'js/lqt.toolbar.js', 'jquery/jquery.thread_collapse.js', 'jquery/jquery.autogrow.js' ),
  • 'dependencies' => array( 'jquery.ui.dialog' ),

+ 'dependencies' => array( 'jquery.ui.dialog', 'jquery.ui.droppable' ),

	'messages' => $lqtMessages

);

oops, actually the bug was fixed in r89121

Index: trunk/extensions/LiquidThreads/LiquidThreads.php

  • trunk/extensions/LiquidThreads/LiquidThreads.php (revision 89120)

+++ trunk/extensions/LiquidThreads/LiquidThreads.php (revision 89121)
@@ -71,7 +71,7 @@
$wgResourceModules['ext.liquidThreads'] = $lqtResourceTemplate + array(

	'styles' => array( 'lqt.css', 'jquery/jquery.thread_collapse.css', 'lqt.dialogs.css' ),
	'scripts' => array( 'lqt.js', 'js/lqt.toolbar.js', 'jquery/jquery.thread_collapse.js', 'jquery/jquery.autogrow.js' ),
  • 'dependencies' => array( 'jquery.ui.dialog' ),

+ 'dependencies' => array( 'jquery.ui.dialog', 'jquery.ui.droppable' ),

	'messages' => $lqtMessages

);

Thanks for investigating this bug — it looks like the person who converted LiquidThreads to use the resource loader made a mistake.

  • Bug 29205 has been marked as a duplicate of this bug. ***
  • Bug 29205 has been marked as a duplicate of this bug. ***