Package: dolibarr Version: 4.0.2+dfsg4-2 Severity: important Tags: patch After upgrading from to stretch, module EDM does not work anymore. Firefox's webconsole prints this: 'TypeError: v.selector is undefined (jquery.layout.min.js:123:157)'
After investigation it appears that this problem is Debian specific. Dolibarr from upstream includes jquery v1.12 while Debian's package provides jquery v.3.1 from package libjs-jquery and unfortunately EDM uses a jquery plugin (UI Layout) which was not updated to be compatible with jquery v3. The problem is already known: https://github.com/allpro/layout/issues/10 https://github.com/allpro/layout/issues/17 I attach a simple patch for the Debian package using the workaround proposed in issue 17. -- pitchum
Index: b/htdocs/main.inc.php =================================================================== --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -1145,6 +1145,7 @@ function top_htmlhead($head, $title='', // jQuery Layout (still used by ECM module) if (defined('REQUIRE_JQUERY_LAYOUT')) { + print '<script type="text/javascript">(function ($){$.fn.selector = { split: function() { return ""; }};})(jQuery);</script>\n'; print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/layout/jquery.layout.min.js'.($ext?'?'.$ext:'').'"></script>'."\n"; } // jQuery jnotify