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
This question about Installation of Foswiki: More info required

EditChapterPlugin not working

I just upgraded from Foswiki 1.1.3 to 1.1.9, After a Perl upgrade by the provider, 1.1.3 had stopped working. Foswiki is installed on a shared server without shell access; I installed it via FTP. This has always worked previously.

In 1.1.3 I had used the EditChapterPlugin without any problems Now, after updating to 1.1.9 and installing it through the configure/Expensions interface, I cannot get it to run.

The chapter headings display the pen when I mouse-over them, but clicking the pen has no effect. Only when I have no net connection, I get a popup that says "error"

From the InstallLog, I cannot see any errors; see attached below. I did make sure the plugin was also enabled afterwards.

As there was mention of an optional dependency to the NatEditPlugin, I tried to install that, too. This didn't succeed, as a required dependency to TopicInteractionPlugin did not install - the installation returned an empty page with just the FW logo. So there seems to be an issue with installing the TopicInteractionPlugin as well, but it should not really be the reason for the EditChapterPlugin to fail, as it is not "required"

Could you please give me any pointers what I can try?

Thanks a lot!

Here is the EditChapterPlugin-2014XX-XXXXXX-Install.log. I only edited the path to the wiki.
Installing EditChapterPlugin...
uselocal disabled, download required
Unpacking /tmp/_5ZBQgihZw.tgz..., Size: 18175 Modified: Mon Dec 15 02:36:03 2014 for package archive 
Saving /tmp/_5ZBQgihZw.tgz to /<path to foswiki>/working/configure/download/EditChapterPlugin.tgz
Checked in: data/System/EditChapterPlugin.txt  as System.EditChapterPlugin
Attached:   pub/System/EditChapterPlugin/Makefile to System/EditChapterPlugin
Attached:   pub/System/EditChapterPlugin/ecpjavascript.js to System/EditChapterPlugin
Attached:   pub/System/EditChapterPlugin/ecpjavascript.js.gz to System/EditChapterPlugin
Attached:   pub/System/EditChapterPlugin/ecpjavascript.uncompressed.js to System/EditChapterPlugin
Attached:   pub/System/EditChapterPlugin/ecpstyles.css to System/EditChapterPlugin
Attached:   pub/System/EditChapterPlugin/ecpstyles.css.gz to System/EditChapterPlugin
Attached:   pub/System/EditChapterPlugin/ecpstyles.uncompressed.css to System/EditChapterPlugin
Attached:   pub/System/EditChapterPlugin/pencil.png to System/EditChapterPlugin
Attached:   pub/System/EditChapterPlugin/ueb.png to System/EditChapterPlugin
Attached:   pub/System/EditChapterPlugin/uweb-g.gif to System/EditChapterPlugin
Installed:  lib/Foswiki/Plugins/EditChapterPlugin.pm as /<path to foswiki>/lib/Foswiki/Plugins/EditChapterPlugin.pm
Installed:  lib/Foswiki/Plugins/EditChapterPlugin/Core.pm as /<path to foswiki>/lib/Foswiki/Plugins/EditChapterPlugin/Core.pm
Installed:  locale/EditChapterPlugin/Foswiki.pot as /<path to foswiki>/locale/EditChapterPlugin/Foswiki.pot
Installed:  locale/EditChapterPlugin/de.po as /<path to foswiki>/locale/EditChapterPlugin/de.po
Installed:  templates/edit.chapter.tmpl as /<path to foswiki>/templates/edit.chapter.tmpl
Installed:  templates/editjavascript.chapter.tmpl as /<path to foswiki>/templates/editjavascript.chapter.tmpl
Installed:  templates/edittoolbar.chapter.tmpl as /<path to foswiki>/templates/edittoolbar.chapter.tmpl
Installed:  EditChapterPlugin_installer to /<path to foswiki>/working/configure/pkgdata

Running Post-install exit for EditChapterPlugin...

Before you can use newly installed plugins, you must enable them in the Enabled Plugins section in configure.
EditChapterPlugin 

-- AndreasStullkowski - 15 Dec 2014

Do you use script suffixes (e.g. view.pl)? If so, perhaps this relates to Tasks.Item12715.

-- LynnwoodBrown - 06 Jan 2015

Some more things to check out:
  • Are you getting any Javascript errors in the browser. Check the javascript console or error logs
  • When you updated to 1.1.9, did you use your existing LocalSite.cfg? If so, you'll probably have to set a new JQuery version in Extensions -> JQueryPlugin tab.

-- GeorgeClark - 12 Jan 2015

Thanks a lot for the hints! Unfortunately I didn't get it to run yet..

'> Do you use script suffixes (e.g. view.pl)? If so, perhaps this relates to Tasks.Item12715.

I replaced ecpjavascript.js and ecpjavascript.uncompressed.js with the patched versions posted at Tasks.Item12715, and reset file permissions. This did not fix the issue

'> Are you getting any Javascript errors in the browser. Check the javascript console or error logs

The WebConsole logs one warning: "Use of getPreventDefault() is deprecated. Use defaultPrevented instead."

The Debugger shows this:
jQuery(function($){"use strict";$(document).on("click",".ecpEdit",function(){var $this=$(this),href=$this.attr("href"),opts=$.extend({id:$this.parent().attr("id"),title:$this.attr("title")},$this.data());$.jsonRpc(foswiki.getPreference("SCRIPTURL")+"/jsonrpc"+foswiki.getPreference("SCRIPTSUFFIX"),{namespace:"EditChapterPlugin",method:"lock",params:{topic:opts.web+"."+opts.topic},success:function(){if(typeof href==="undefined"||href=="#"||href==""){href=foswiki.getPreference("SCRIPTURL")+"/rest"+foswiki.getPreference("SCRIPTSUFFIX")+"/RenderPlugin/template?"+"name=edit.chapter"+"&expand=dialog"+"&topic="+opts.web+"."+opts.topic+"&from="+opts.from+"&to="+opts.to+"&title="+opts.title+"&id="+opts.id+"&t="+(new Date).getTime()}$.get(href,function(content){var $content=$(content);$content.hide();$("body").append($content);$content.data("autoOpen",true)})},error:function(json,textStatus,xhr){alert(json.error.message)}});return false});$(".ecpForm:not(.ecpInitedForm)").livequery(function(){var $this=$(this),topic=$this.find("input[name='topic']").val(),$dialog=$this.parent();$dialog.on("dialogclose",function(ev){$.jsonRpc(foswiki.getPreference("SCRIPTURL")+"/jsonrpc"+foswiki.getPreference("SCRIPTSUFFIX"),{namespace:"EditChapterPlugin",method:"unlock",params:{topic:topic},error:function(json,textStatus,xhr){}});$dialog.dialog("close").remove()});setTimeout(function(){$dialog.find(".natedit").focus()},500);$this.addClass("ecpInitedForm").submit(function(){var before=$this.find("[name=beforetext]"),after=$this.find("[name=aftertext]"),chapter=$this.find("[name=chapter]"),text=$this.find("[name=text]"),chapterText,lastChar;if(!before.length||!after.length||!chapter.length){return false}chapterText=chapter.val();lastChar=chapterText.substr(chapterText.length-1,1);if(lastChar!="\n"){chapterText+="\n"}text.val(before.val()+chapterText+after.val())})});$(".ecpHeading:not(.ecpDisabled)").hoverIntent({timeout:500,over:function(event){$(this).addClass("ecpHover")},out:function(event){$(this).removeClass("ecpHover")}})});

'> When you updated to 1.1.9, did you use your existing LocalSite.cfg? If so, you'll probably have to set a new JQuery version in Extensions -> JQueryPlugin tab.

I had set the new version when installing - it is using v 2.0.2.

-- AndreasStullkowski - 13 Jan 2015

To clarify, my question about script suffixes was not about javascript files but the perl scripts in /bin directory. See Tasks.Item12715 for more info on possible connection. You also mentioned problem with installing TopicInteractionPlugin. I would try again to install it. There shouldn't be any problem installing that and if there is, perhaps it points to other issues in your installation. The JS console warning about getPreventDefault() is inconsequential afaik. I don't think it's related. It is odd that the js console doesn't show any other issues if nothing happens when you click the edit button. Have you checked your apache log?

-- LynnwoodBrown - 14 Jan 2015

'> ... my question about script suffixes was not about javascript files but the perl scripts in /bin directory. See Tasks.Item12715 for more info on possible connection ...

Tasks.Item12715 refers to Support/Question1395, where some fixed js files for the EditChapterPlugin are linked for download. I was referring to these.

'> It is odd that the js console doesn't show any other issues if nothing happens when you click the edit button.

Just tried again. Firefox menu > Tools > Web Developer > Web Console. No message at all when I click the section edit button

'> ... problem with installing TopicInteractionPlugin. I would try again to install it. There shouldn't be any problem installing that and if there is, perhaps it points to other issues in your installation ...

Just tried it again. Goes into installation, but finishes with a blank page with the FW logo.

The Web Console shows one warning: "A form was submitted in the windows-1252 encoding which cannot encode all Unicode characters, so user input may get corrupted. To avoid this problem, the page should be changed so that the form is submitted in the UTF-8 encoding either by changing the encoding of the page itself to UTF-8 or by specifying accept-charset=utf-8 on the form element."

This doesn't look like a show stopper, does it?

'> ... the perl scripts in /bin directory. ... Have you checked your apache log?

My access to the web space is limited to ftp. So I don't think I can either get to /bin or the apache log? I'm obviously nat an expert here. I can try to check with my provider's support, maybe they can look at it.

Just to make sure - I used the EditChapterPlugin installed in the same way without issues in FW 1.1.3

Thanks for any input you can give!

-- AndreasStullkowski - 30 Jan 2015
 

QuestionForm edit

Subject Installation of Foswiki
Extension EditChapterPlugin
Version Foswiki 1.1.9
Status More info required
Related Topics
Topic revision: r6 - 30 Jan 2015, AndreasStullkowski - This page was cached on 17 Sep 2018 - 23:38.

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