Item9877: WikiDrawPlugin doesn't play nice with NatSkin

pencil
Priority: Normal
Current State: Closed
Released In: n/a
Target Release: n/a
Applies To: Extension
Component: WikiDrawPlugin
Branches:
Reported By: PaulHarvey
Waiting For: Main.SvenDowideit
Last Change By: PaulHarvey
NatSkin is still in the skin path (or maybe NatSkinPlugin is hijacking the template system a bit) and somehow tries to load a bunch of JS which will fail because the rendered HTML isn't what is expected.

So add ;skin=default on the edit/create links? It's what I've done to get it going on our site.

-- PaulHarvey - 25 Oct 2010

diff --git a/WikiDrawPlugin/templates/wikidraw.tmpl b/WikiDrawPlugin/templates/wikidraw.tmpl
index de1b48b..3eb9509 100755
--- a/WikiDrawPlugin/templates/wikidraw.tmpl
+++ b/WikiDrawPlugin/templates/wikidraw.tmpl
@@ -8,7 +8,7 @@
 %TMPL:DEF{svg-view-html}%<div class="wikiDrawing">
 <img id="%IMG_ID%" class="wikiDraw wikiDrawView" src="%IF{"%DRAWINGEXISTS%" then="%IMAGEURL%" else="%ANNOTATE%"}%" />
 %BR%
-[[%SCRIPTURL{edit}%/%BASEWEB%/%BASETOPIC%?template=WikiDrawEdit;drawing=%DRAWING%;topicbased=%DRAWINGFILE%;annotateurl=%ANNOTATE%;returnto=%SCRIPTURL{view}%/%BASEWEB%/%BASETOPIC%][%IF{
+[[%SCRIPTURL{edit}%/%BASEWEB%/%BASETOPIC%?skin=default;template=WikiDrawEdit;drawing=%DRAWING%;topicbased=%DRAWINGFILE%;annotateurl=%ANNOTATE%;returnto=%SCRIPTURL{view}%/%BASEWEB%/%BASETOPIC%][%IF{
                      "%DRAWINGEXISTS%"
                      then="%MAKETEXT{Edit}%"
                      else="%MAKETEXT{Create}%"
@@ -53,7 +53,7 @@ border: 0px solid gray;
    type="frame"
    id="%IMG_ID%" 
    class="wikiDraw wikiDrawView"
-   caption="[[%SCRIPTURL{edit}%/%BASEWEB%/%BASETOPIC%?template=WikiDrawEdit;drawing=%DRAWING%;topicbased=%DRAWINGFILE%;annotateurl=%ANNOTATE%;returnto=%SCRIPTURL{view}%/%BASEWEB%/%BASETOPIC%][%IF{
+   caption="[[%SCRIPTURL{edit}%/%BASEWEB%/%BASETOPIC%?skin=default;template=WikiDrawEdit;drawing=%DRAWING%;topicbased=%DRAWINGFILE%;annotateurl=%ANNOTATE%;returnto=%SCRIPTURL{view}%/%BASEWEB%/%BASETOPIC%][%
                      "%DRAWINGEXISTS%"
                      then="%MAKETEXT{Edit}%"
                      else="%MAKETEXT{Create}%"

Shall I commit?

-- PaulHarvey - 25 Oct 2010

yeah, go on.

I'd call that a bug in NatSkinPlugin etc, as its bruteish, but there's a bunch of tissues like this.

-- SvenDowideit - 26 Oct 2010
 
Topic revision: r3 - 12 Nov 2010, PaulHarvey
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