This question about Configuration: Answered

Captcha not working and JsonRpcContrib is not enabled or is not installed

I installed Foswiki and several extensions including CaptchaPlugin. When I tried to register, the captcha image does not show and I couldn't find the captcha javascript source loading anywhere. I checked to ensure that the plugin and its dependency, JsonRpcContrib, were enabled and I could not find an enable checkbox for JsonRpcContrib. When I entered the plugin order JsonRpcContrib, CaptchaPlugin, it warned me: "JsonRpcContrib is not enabled or is not installed". But when I go to thie list of extensions to install, it is already installed. I also "reinstalled" it. And also "uninstalled" it and installed it again. Still no show in the list to enable. Although it does have a button up in the top of the extension configuration page, but clicking on it produces no options. Anyone have any ideas?

# tail -n 100 foswiki/working/logs/warn201408.txt 
| 2014-08-02T16:57:46Z warning | Foswiki::Plugins::CaptchaPlugin could not be loaded.  Errors were:
Can't locate Foswiki/Contrib/ in @INC (you may need to install the Foswiki::Contrib::JsonRpcContrib module) (@INC contains: /home/sites/ /etc/perl /usr/local/lib64/perl5/5.18.2/x86_64-linux /usr/local/lib64/perl5/5.18.2 /usr/lib64/perl5/vendor_perl/5.18.2/x86_64-linux /usr/lib64/perl5/vendor_perl/5.18.2 /usr/local/lib64/perl5 /usr/lib64/perl5/vendor_perl /usr/lib64/perl5/5.18.2/x86_64-linux /usr/lib64/perl5/5.18.2 /home/sites/ /home/sites/ /home/sites/ /home/sites/ at /home/sites/ line 50.
BEGIN failed--compilation aborted at /home/sites/ line 50.
Compilation failed in require at (eval 126) line 2.
BEGIN failed--compilation aborted at (eval 126) line 2.

-- ThomasAnderson - 02 Aug 2014

# tail -n 100 foswiki/working/logs/configure/JsonRpcContrib-20140802-204355-Install.log 
Installing JsonRpcContrib
Loading package installer
fetching installer from ... succeeded

Dependency Report for JsonRpcContrib ...
===== INSTALLED =======
JSON version 2.90 loaded

Creating Backup of JsonRpcContrib ...
Backup saved into /home/sites/ 
   Archived as /home/sites/ 

Running Pre-install exit for JsonRpcContrib ...

Installing JsonRpcContrib...
uselocal disabled, download required
Unpacking /tmp/iZv7Lf1WrY.tgz..., Size: 20208 Modified: Sat Aug  2 16:43:56 2014 for package archive 
Saving /tmp/iZv7Lf1WrY.tgz to /home/sites/
Installed:  bin/jsonrpc as /home/sites/
Checked in: data/System/JsonRpcContrib.txt  as System.JsonRpcContrib
Attached:   pub/System/JsonRpcContrib/Makefile to System/JsonRpcContrib
Attached:   pub/System/JsonRpcContrib/jquery.jsonrpc.js to System/JsonRpcContrib
Attached:   pub/System/JsonRpcContrib/jquery.jsonrpc.js.gz to System/JsonRpcContrib
Attached:   pub/System/JsonRpcContrib/jquery.jsonrpc.uncompressed.js to System/JsonRpcContrib
Attached:   pub/System/JsonRpcContrib/json2.js to System/JsonRpcContrib
Attached:   pub/System/JsonRpcContrib/json2.js.gz to System/JsonRpcContrib
Attached:   pub/System/JsonRpcContrib/json2.uncompressed.js to System/JsonRpcContrib
Installed:  lib/Foswiki/Contrib/ as /home/sites/
Installed:  lib/Foswiki/Contrib/JsonRpcContrib/Config.spec as /home/sites/
Installed:  lib/Foswiki/Contrib/JsonRpcContrib/ as /home/sites/
Installed:  lib/Foswiki/Contrib/JsonRpcContrib/ as /home/sites/
Installed:  lib/Foswiki/Contrib/JsonRpcContrib/ as /home/sites/
Installed:  lib/Foswiki/Contrib/JsonRpcContrib/ as /home/sites/
Installed:  lib/Foswiki/Contrib/JsonRpcContrib/ as /home/sites/
Installed:  JsonRpcContrib_installer to /home/sites/

Running Post-install exit for JsonRpcContrib...

-- ThomasAnderson - 02 Aug 2014

I hate to say I'm not really sure what is going on. Everything appears to have been installed correctly. I just ran through an install of both plugins on my test 1.1.9 system and it worked okay - except for some unrelated file permissions issues.

I'm wondering if it could be a deeper dependency down in one of the JsonRpcContrib modules. It reports that it requires JSON and you have that. But internally it also loads:
use Encode;
use Error qw( :try );

Error is shipped with Foswiki, so that should not be an issue. Encode comes with perl, but some distributions package things optionally.

I'm not sure what else to check.

-- GeorgeClark - 02 Aug 2014

Regarding "JsonRpcContrib is not enabled or installed", Contrib's don't get processed directly by Foswiki. There is no enable/disable for contribs, and no plugin to load. So you should not add it to the PluginOrder. It will not show up as enabled, and does not need to be.

One more thing to try. From your CLI shell: Change to the foswiki install directory. (Directory above lib). and try the following commands. One or more might fail with more information about what is missing.

perl -I lib -e"require Foswiki::Contrib::JsonRpcContrib"
perl -I lib -e"require Foswiki::Contrib::JsonRpcContrib::Server"
perl -I lib -e"require Foswiki::Contrib::JsonRpcContrib::Request"
perl -I lib -e"require Foswiki::Contrib::JsonRpcContrib::Response"
perl -I lib -e"require Foswiki::Contrib::JsonRpcContrib::Error"

-- GeorgeClark - 02 Aug 2014

Thanks for the response. It appears that maybe the JSON module wasn't installed properly -- perhaps the path was to an old Perl version or something. When I reinstalled it, this error went away.

-- ThomasAnderson - 06 Aug 2014

QuestionForm edit

Subject Configuration
Extension CaptchaPlugin, JsonRpcContrib
Version Foswiki 1.1.9
Status Answered
Related Topics
Topic revision: r5 - 06 Aug 2014, GeorgeClark - This page was cached on 17 Feb 2019 - 22:30.

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