The drush update script first moves modules to a backup directory and then downloads and extracts fresh copies. The problem is that because of where jquery_ui requires you to place the jquery.ui folder, the library gets lost when you run drush update. The attached patchs solves this problem by allowing users to place the jquery.ui folder in sites/all/libraries, similar to how the wysiwyg module has you place the tinymce library there now instead of in the module directory. Now, when you run drush update, the module will get replaced without deleting the jquery.ui folder.

CommentFileSizeAuthor
jquery_ui.patch3.4 KBseanr

Comments

sun’s picture

+++ README.txt	5 Aug 2009 20:48:28 -0000
@@ -31,6 +31,10 @@
+    /sites/all/libraries/jquery.ui/
+    
+    or
+    

Trailing white-space here (blank lines should be blank).

+++ jquery_ui.module	5 Aug 2009 20:33:56 -0000
@@ -18,10 +18,20 @@
-  define('JQUERY_UI_PATH', drupal_get_path('module', 'jquery_ui') . '/jquery.ui');
+  if (file_exists(drupal_get_path('module', 'jquery_ui') . '/jquery.ui/version.txt')) {
+    define('JQUERY_UI_PATH', drupal_get_path('module', 'jquery_ui') . '/jquery.ui');
+  }
+  else{
+    define('JQUERY_UI_PATH', 'sites/all/libraries/jquery.ui');
+  }

Given this limited implementation, I think we should merge this issue with #489140: Libraries API.

This review is powered by Dreditor.

sun’s picture

Status: Needs review » Closed (duplicate)

Thanks for taking the time to report this issue.

However, marking as duplicate of #489140: Libraries API. You can follow up on that issue to track its status instead. If any information from this issue is missing in the other issue, please make sure you provide it over there.