WE-Framework
WE-Framework copied to clipboard
WE-Framework does not work with Vector2022
When using the Vector2022 (which is the default), the gadgets do not appear any more. The following error appears in the browser console:
[WE-F] all WEF modules were loaded
Successfully open indexedDB connection for database PROPERTYDATA index.php:2:924408
Successfully open indexedDB connection for database STRINGPROPERTYVALUES index.php:2:924408
Successfully open indexedDB connection for database WEF_EXTERNAL_ID_LRU index.php:2:1036387
Successfully open indexedDB connection for database PARENTTYPES index.php:2:924408
Successfully open indexedDB connection for database PROPERTIESBYSPARQL index.php:2:924408
Exception in load-callback: load.php:1:852
Error: Unable to locate 'p-wef-label' ID on the page. Looks like site navigation menu is changed in a way that can't be modifid from JS
This is probably linked to a recent change in Vector-2022 (https://phabricator.wikimedia.org/T328692).
If I understand correctly how WEF works:
- the Javascript code creates the WEF menu by cloning a DOM element with id
p-tb
(a "Tools" menu) - inside that cloned element, all IDs are modified by replacing
p-tb-xxx
withp-pef-xxx
- it assumes that the
p-tb
element contains an element with idp-tb-label
, which becomesp-pef-label
in the cloned version - however, Vector-2022 still contains a
p-tb
element (now on the right part of the page), but that element does not include ap-tb-label
element any more. Therefore WEF cannot be loaded.
Therefore the Javascript code should be modified, so that it does not depend upon this id any more.
The issue is still open. Vector-2022 will become standard soon so this fix would help a lot!
Since WE-Framework does not seem to be maintained any more, my workaround is to add ?useskin=vector
in the URL when I want to use it... but other things do not seem to work well, even with the old Vector.