You are here: Foswiki>Tasks Web>Item2345 (12 Nov 2009, IngoKappler)Edit Attach

Item2345: DpSyntaxHighlighterPlugin doesn't work correctly after upgrade if also using JSPopupPlugin

Priority: Normal
Current State: Closed
Released In:
Target Release: n/a
Applies To: Extension
Component: DpSyntaxHighlighterPlugin
Reported By: IngoKappler
Waiting For:
Last Change By: IngoKappler
After upgrading the DpSyntaxHighlighterPlugin this error occurs:

DpSyntaxHighlighterPlugin JQuery 404.png
JQuery related 404

Upgrading to the latest JQueryPlugin didn't help. Text which should be rendered and highlighted in most cases just looks as if defined to be verbatim.

If running .../foswiki/pub/System/DpSyntaxHighlighterPlugin/dp.SyntaxHighlighter/test.html the plugin works.

-- IngoKappler - 10 Nov 2009

frown, sad smile Works ok for me, but I don't have JQueryPlugin installed.

Btw, it looks like you are still using a TWiki version of the JQueryPlugin, as it is looking for /pub/TWiki/JQueryPlugin.... Can you ensure you are using the Foswiki version?

-- AndrewJones - 10 Nov 2009

Actually the above screenshot looks to be misleading. When disabling the JQueryPlugin the error also disappears but the DpSyntaxHighlighterPlugin still doesn't work correctly. Also on my production environment where the previous version of DpSyntaxHighlighterPlugin works, there is also a 404 error for .../chili/javascript.js which does not cause a visible side effect.

-- IngoKappler - 10 Nov 2009

The real issue is using the JSPopupPlugin in parallel. Using them both together renders the DpSyntaxHighlighterPlugin unusable.

-- IngoKappler - 10 Nov 2009

Ah ok, thanks.

I have never used the JSPopupPlugin, but I will see if I can find time to install them both and work out whats going wrong.

-- AndrewJones - 10 Nov 2009

Fixed and released.

For reference, the problem was that JSPopupPlugin overloaded the global JS object (with json.js), and the syntax highlighter depends on a clean global object. Both are examples of bad practice...

The fix I checked is a bit hacky, but should prevent this from happening again.

-- AndrewJones - 11 Nov 2009

Great and thanks a lot. Now the new version also works for me.

-- IngoKappler - 12 Nov 2009

Topic revision: r8 - 12 Nov 2009, IngoKappler
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