10/Nov/2008 10:33
Today I set up the latest version of TWiki
(4.2.3) on a system running RedHat Enterprise Linux 3, which is pretty far
out of date at this point. Most things seemed to work fine, but the WYSIWYG
editor would fail with the cryptic message "There was a problem retrieving
the page: OK." I didn't find good documentation of the problem anywhere else
online, so here's what I learned.
In addition to the error in the WYSIWYG, this issue causes two other notable symptoms. In the Apache error log, you should see a message like "ERROR: (404) Invalid REST invocation (WysiwygPlugin on tml2html)". In the TWiki.InstalledPlugins page, you should see the following under Plugin Diagnostics, next to WysiwygPlugin:
TWiki::Plugins::WysiwygPlugin could not be loaded. Errors were: Too many arguments for Encode::decode_utf8 at /path/to/twiki/lib/TWiki/Plugins/WysiwygPlugin.pm line 621, near "Encode::FB_PERLQQ)" BEGIN not safe after errors--compilation aborted at /path/to/twiki/lib/TWiki/Plugins/WysiwygPlugin.pm line 665. Compilation failed in require at (eval 60) line 1. BEGIN failed--compilation aborted at (eval 60) line 1.
These errors indicate an incompatibility between the system's installed perl Encode module and your version of TWiki. Unfortunately, on RHEL the Encode module is part of the main perl package:
$ rpm -qf /usr/lib/perl5/5.8.0/Encode perl-5.8.0-98.EL3
So you won't be able to upgrade Encode to a compliant version without messing up your RHEL 3 system to at least some extent. The options I identified at this point were:
- Disable the WYSIWYG plugin, either through the TWiki "configure" web interface, or by editing the bin/LocalLib.cfg file directly.
- Install a newer perl Encode package from the awesome Dag Wieers third party RPM repository. The files in this package will conflict with the ones in the perl package, so you'll need to use rpm's --force option when you install it.
- Install the latest Encode from CPAN. I didn't try this because CPAN has an annoying habit of trying to update the system's entire perl install while chasing dependencies when you use it on an older system.
- Downgrade to TWiki 4.2.0
For more information, see: