You are here: Foswiki>Tasks Web>Item11778 (02 May 2012, MyqLarson)Edit Attach

Item11778: FindElsewherePlugin prevents jquery.json.js from loading

pencil
Priority: Normal
Current State: Closed
Released In: n/a
Target Release: n/a
Applies To: Extension
Component: FindElsewherePlugin
Branches: trunk
Reported By: MyqLarson
Waiting For:
Last Change By: MyqLarson
Using the FindElsewherePlugin causes jquery.json.js not to load. This is needed by Extensions.EditChapterPlugin to work correctly.

-- MyqLarson - 19 Apr 2012

Confirmed. On a default install of 1.1.5, with EditChapterPlugin installed and working, it's sufficient to just enable FindElsewherePlugin, and the jquery.json.js file disappears.

The following lines are removed from the rendered topic:

...
<!-- [if lte IE 7]>
<script type='text/javascript' src='/pub/System/JsonRpcContrib/json2.js?version=1.0'></script>
<![endif]--><!--JQUERYPLUGIN::JSON2-->
...
<script type='text/javascript' src='/pub/System/JsonRpcContrib/jquery.jsonrpc.js?version=1.0'></script><!--JQUERYPLUGIN::JSONRPC-->
...

This didn't only remove json2.js but also a slew of other stuff being added to the html head later on in the init process of the engine.

The error basically is caused by FindElsewherePlugin calling expandCommonVariables() inside its initPlugin() handler. This turns out to be a BadThingToDo(tm) as other plugins arent fully initialized yet.

-- MichaelDaum - 19 Apr 2012

Released plugin version 2.4, with fixes from MichaelDaum and a few more changes.

-- GeorgeClark - 19 Apr 2012

Wow, fast! Thank you very much!

-- MyqLarson - 02 May 2012
 
Topic revision: r9 - 02 May 2012, MyqLarson
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy