cross
New Foswiki release 2.1.6 is available with important security fixes.
Sourceforge foswiki email lists being discontinued. Subscribe to the new Foswiki announce and discuss lists at MailingLists
You are here: Foswiki>Tasks Web>Item13667 (10 Oct 2015, GeorgeClark)Edit Attach

Item13667: Templates with leading comments disturb jquery-ui.

pencil
Priority: Urgent
Current State: Closed
Released In: 2.0.2
Target Release: patch
Applies To: Extension
Component: JQueryPlugin
Branches: master
Reported By: MichelMallejac
Waiting For: MichaelDaum
Last Change By: GeorgeClark
In the SideBar, pressing the + button does nothing.

Also is the topic Main.UserNameLeftBar - from PatternSkin - used by NatSkin ?

-- MichelMallejac - 03 Sep 2015

No, it doesn't. Please install ListyPlugin as that gives you the best "my links" experience.

-- MichaelDaum - 04 Sep 2015

Ok, I'd like to try Listy. Not found any doc. It is already installed, probably as a dependency of another plugin. Any information on how to use it ?

-- MichelMallejac - 04 Sep 2015

I've checked my setup : ListyPlugin is correctly installed. So I've done a test within an empty topic with the following, as found in templates/sidebar.nat.tmpl :

%LISTY{"mylinks"
  hidenull="off"
  width="100%"
  topic="%WIKIUSERNAME%"
  type="topic,external"
}%

the green + button Add Item is there, but nothing happens when pressing it.

-- MichelMallejac - 11 Sep 2015

Which browser are you using? There probably is a javascript error that can be seen opening up the developer tools (F12 in chrome, firefox). Anything there being reported to the console?

-- MichaelDaum - 11 Sep 2015

Firefox latest on Ubuntu. Yes, I get the following : TypeError: this.element[0].style is undefined jquery-ui.js:7:882

-- MichelMallejac - 13 Sep 2015

Which jquery version are you using?

-- MichaelDaum - 14 Sep 2015

in bin/configure JQueryPlugin version is 16 Jun 2015, so up to date

in pub/System/JQueryPlugin I see some of them, but latest are :
  • jquery-1.11.2.js
  • jquery-2.1.3.js

Same behavior on Chromium.

Also - maybe not related - on Chromium and only there I have an alert saying that one of my extensions has an update available. But no : none of the installed extensions mention an update available. Last week I noticed as well that 4 updates were available but actually I could only find 3 in the list, using Chromium. Should I file another task for this ?

-- MichelMallejac - 14 Sep 2015

Damn, I can't reproduce the error. Any chance of a traceback for the error happening in jquery-ui.js?

What's the list of plugins you've got installed on your platform?

-- MichaelDaum - 15 Sep 2015

Using Chromium instead I got same behaviour but not exactly the same error message. See 1442330807.png

I've also attached a PDF with my InstalledPlugins topic

-- MichelMallejac - 15 Sep 2015

Could you enable ListyPlugin on your test site, please? I just registered to be able to test there wink

-- MichaelDaum - 15 Sep 2015

smile Done !

-- MichelMallejac - 15 Sep 2015

Maybe be the requested template for the dialog is not well-formed in a way jquery-ui-dialog want's it. Could you for testing install PageOptimizerPlugin and enable CleanUpHTML, please?

Yep, that's it. The leading =<-- -->= was freaking out the dialog component.

Hotfix:
diff --git a/JQueryPlugin/lib/Foswiki/Plugins/JQueryPlugin/RENDER.pm b/JQueryPlugin/lib/Foswiki/Plugins/JQueryPlugin/RENDER.pm
index 86325f9..8ba62ff 100644
--- a/JQueryPlugin/lib/Foswiki/Plugins/JQueryPlugin/RENDER.pm
+++ b/JQueryPlugin/lib/Foswiki/Plugins/JQueryPlugin/RENDER.pm
@@ -61,6 +61,9 @@ sub restTmpl {
       || '';
     $result = Foswiki::Func::renderText( $result, $web ) if $doRender;
 
+    # Item13667: clean up html that could disturb jquery-ui
+    $result =~ s/<!--[^\[<].*?-->//g;
+
     my $response = $session->{response};
 

-- MichaelDaum - 16 Sep 2015

PageOptimizerPlugin installed and CleanUpHTML enabled ==> working great now !! thanks a lot

Not sure about what's going on with this task : I let you take care of closing it or ?

-- MichelMallejac - 16 Sep 2015

Next release of JQueryPlugin will have above patch in it to clean up jquery templates without the help of PageOptimizerPlugin.

-- MichaelDaum - 16 Sep 2015
 

ItemTemplate edit

Summary Templates with leading comments disturb jquery-ui.
ReportedBy MichelMallejac
Codebase 2.0.1
SVN Range
AppliesTo Extension
Component JQueryPlugin
Priority Urgent
CurrentState Closed
WaitingFor MichaelDaum
Checkins distro:f4be8f0aae09
TargetRelease patch
ReleasedIn 2.0.2
CheckinsOnBranches master
trunkCheckins
masterCheckins distro:f4be8f0aae09
ItemBranchCheckins
Release01x01Checkins
Topic revision: r18 - 10 Oct 2015, GeorgeClark - This page was cached on 03 May 2018 - 20:11.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License