SID-02469: TinyMCEPlugin not working
| Status: |
Asked |
TWiki version: |
6.1.0 |
Perl version: |
5.28.1 |
| Category: |
TinyMCEPlugin |
Server OS: |
Debian 10 |
Last update: |
4 years ago |
Installed TWiki 6.1 on a new host, copied data and pub files from old host running TWiki 4.2. Everything working fine except when editing a Wiki entry. On new host, Edit button opens Wiki entry for editing in Raw Mode; on old host Edit button opens Wiki entry for editing in WYSIWYG editor, presumably
TinyMCE. On new host, bottom of page has selection for WYSIWYG; on old host, bottom of page has selection for Raw Edit. When WYSIWYG selection clicked on new host, brings up directions for WYSIWYG edit (
TinyMCE) but there is no editing Window.
WYSIWYGPlugin and
TinyMCEPlugin should be installed and enabled in Twiki 6.1. Configuration shows both are enabled. In Configuration, went into Extensions / Find More Extensions which showed upgrades for Twiki 6.1 for both WYSIWYGPlugin and
TinyMCEPlugin. Installed upgrades for both, WYSIWYGPlugin installed correctly,
TinyMCEPlugin failed as follows:
Install pub/TWiki/TinyMCEPlugin/tinymce/jscripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2, permissions 0644
Error: Installer returned errors:
Failed to move /tmp/HRzDQ_znoH/pub/TWiki/TinyMCEPlugin/tinymce/jscripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2 to pub/TWiki/TinyMCEPlugin/tinymce/jscripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2: Is a directory
at /var/www/apache2-default/twiki/lib/CGI/Carp.pm line 353.
CGI::Carp::realdie("Failed to move /tmp/HRzDQ_znoH/pub/TWiki/TinyMCEPlugin/tinymc"...) called at /var/www/apache2-default/twiki/lib/CGI/Carp.pm line 443
CGI::Carp::die("Failed to move /tmp/HRzDQ_znoH/pub/TWiki/TinyMCEPlugin/tinymc"...) called at tools/extender.pl line 841
TWiki::Extender::_emplace("/tmp/HRzDQ_znoH") called at tools/extender.pl line 963
TWiki::Extender::_install(ARRAY(0x5590ddb53f08), "TinyMCEPlugin") called at tools/extender.pl line 1057
TWiki::Extender::install("https://twiki.org/p/pub/Plugins", "TinyMCEPlugin", "TinyMCEPlugin", "MANIFEST", "data/TWiki/TinyMCEFrequentlyAskedQuestions.txt,0644,\x{a}data/TWi"..., "DEPENDENCIES", "TWiki::Plugins::WysiwygPlugin,>=1,1,perl,Translator module\x{a}TW"...) called at /var/www/apache2-default/twiki/TinyMCEPlugin_installer line 105
require /var/www/apache2-default/twiki/TinyMCEPlugin_installer called at /var/www/apache2-default/twiki/lib/TWiki/Configure/UIs/EXTEND.pm line 177
eval {...} called at /var/www/apache2-default/twiki/lib/TWiki/Configure/UIs/EXTEND.pm line 175
TWiki::Configure::UIs::EXTEND::ui(TWiki::Configure::UIs::EXTEND=HASH(0x5590dab2b3a0)) called at /var/www/apache2-default/twiki/bin/configure line 690
TWiki::_actionInstallExtension() called at /var/www/apache2-default/twiki/bin/configure line 460
at /var/www/apache2-default/twiki/lib/CGI/Carp.pm line 353.
CGI::Carp::realdie("Failed to move /tmp/HRzDQ_znoH/pub/TWiki/TinyMCEPlugin/tinymc"...) called at /var/www/apache2-default/twiki/lib/CGI/Carp.pm line 443
CGI::Carp::die("Failed to move /tmp/HRzDQ_znoH/pub/TWiki/TinyMCEPlugin/tinymc"...) called at /var/www/apache2-default/twiki/lib/TWiki/Configure/UIs/EXTEND.pm line 179
eval {...} called at /var/www/apache2-default/twiki/lib/TWiki/Configure/UIs/EXTEND.pm line 175
TWiki::Configure::UIs::EXTEND::ui(TWiki::Configure::UIs::EXTEND=HASH(0x5590dab2b3a0)) called at /var/www/apache2-default/twiki/bin/configure line 690
TWiki::_actionInstallExtension() called at /var/www/apache2-default/twiki/bin/configure line 460
You may be able to resolve these errors and complete the installation from the command line, so I will leave the installed files where they are.
Installation finished.
File /var/log/apache2/error.log shows:
Could not create pub/TWiki/TinyMCEPlugin/tinymce/jscripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2.bak: Is a directory
Note: on Twiki 4.2 on old host, skins directory does not exist.
Kurt
--
Kurt Rosenhagen - 2021-06-08
Discussion and Answer
This looks like a permission issue. Make sure all files and directories below your twiki installation directory are owned by your webserver user. If this still does not help when updating the
TinyMCEPlugin, delete or rename
twiki/pub/TinyMCEPlugin, and try installing again.
--
Peter Thoeny - 2021-06-08
Thank you Peter. I tried both, no change.
I assumed that by "try install again" you meant upgrading the plugin as I described, from Configuration going into Extensions / Find More Extensions, and clicking on "upgrade" for
TinyMCEPlugin. Should I be doing this differently?
I've been running installer directly from Configure by going into into Extensions / Find More Extensions which showed upgrade for Twiki 6.1 for
TinyMCEPlugin. That downloads
TinyMCEPlugin.tgz from twiki.org/p/plug/Plugins/TinyMCEPlugin/TinyMCEPlugin.tgz, saving
TInyMCEPlugin_installer to pub. After install upgrade from Configure fails, I've tried installing from command line by "sudo perl
TinyMCEPlugin_installer" but I get this message:
**********************************************************
Could not load installer script from tools/extender.pl.
If this is a TWiki release prior to 4.2, please download the
latest version of the script from:
http://twiki.org/cgi-bin/view/Codev/ExtenderScript
and place it in the 'tools' directory below your installation
root (create the directory if necessary).
If this is TWiki 4.2 or later, the script is missing from
your installation, or may be broken.
**********************************************************
I think that by running installer from command line I'll be able to see more clearly what is going on.
Looking forward to any further suggestions.
--
Kurt Rosenhagen - 2021-06-09
TinyMCEPlugins_installer is downloaded from Configuration when going into Extensions / Find More Extensions, and clicking on "upgrade" for
TinyMCEPlugin. In the file
TinyMCEPlugins_installer, the MANIFEST includes directory pub/TWiki/TinyMCEPlugin/tinymce/jscripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2, but does NOT include other directories such as the skins directory above clearlooks2 or the img directory below clearlooks2. Possible the directory clearlooks2 should not be included in the MANIFEST?
If I could run installer from command line I'd be able to try this and other ideas.
Kurt
--
Kurt Rosenhagen - 2021-06-09
I checked the MANIFEST, and indeed there is a bug: The
pub/TWiki/TinyMCEPlugin/tinymce/jscripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2 is a directory, and directories do not belong in there. I removed it and updated the package, new release
2021-06-09. Please try again.
Also, it is possible to manually install a plugin package: Simply copy/overwrite files over to your installation, while preserving the directory structure. If you do that make sure everything is owned by the webserver user.
--
Peter Thoeny - 2021-06-09
Thanks Peter. Upgrade of
TinyMCEPlugin now runs without error. Already upgraded WYSIWYGPlugin without errors. Both plugins are enabled in Configure. But Edit button still brings up Raw edit instead of
TinyMCE editor. And at bottom of page, instead of a button for "Raw Edit", there's a button for "WYSIWIG" which when clocked does not bring up any edit window (but the edit help window does come up. I'm searching the web bit any further suggestions would be very welcome.
--
Kurt Rosenhagen - 2021-06-10
By adding to Web Preferences I'm able to change behavior of Edit button and change whether "Raw Edit" or "WYSIWYG" buttons appear at bottom of page. But either way, "Edit" button and "WYSIWIG" button does not bring up
TinyMCE editing window.
I used:
"Set EDITMETHOD = wysiwyg" - Edit button shows edit help for
TinyMCE but edit window doesn't appear.
"Set EDITMETHOD = raw" - Edit button shows edit help for raw edit window and edit window for raw text editing appears.
"Set NOWYSIWYG = 0" - Edit button shows edit help for
TinyMCE but edit window doesn't appear.
"Set NOWYSIWYG = 1" - Edit button shows edit help for raw edit window and edit window for raw text editing appears.
"Set TINYMCEPLUGIN_DISABLE = off" - Edit button shows edit help for
TinyMCE but edit window doesn't appear.
"Set TINYMCEPLUGIN_DISABLE = on" - Edit button shows edit help for raw edit window and edit window for raw text editing appears.
So it appears that WYSIWYG edittng is being enabled but
TinyMCE editing window doesn't appear. I checked log files in twiki/data - log file, warn file, and configuration files. Only message is in warn file when
TinyMCEPlugin is enabled and
WysiwygPlugin is not enabled:
| 2021-06-11 - 12:31:29 |
(TWiki::Plugins::TinyMCEPlugin) TinyMCEPlugin is enabled but WysiwygPlugin is not. Both must be installed and enabled for TinyMCE. |
| 2021-06-11 - 12:31:29 |
TWiki::Plugins::TinyMCEPlugin::initPlugin did not return true (0) |
All other combinations of enables do not produce any messages.
FIle data/configuration.txt shows changes to
TinyMCEPlugin and
WysiwygPlugin as I have made changes in configuration file.
Is there anywhere else I could look or anything else I could try?
Kurt
--
Kurt Rosenhagen - 2021-06-11
Also,
TinyMCE editor is running fine on our previous installation of Twiki 4.2
Kurt
--
Kurt Rosenhagen - 2021-06-11
Turning on developer options in browser and pausing on exceptions identified problems with
JQueryPlugin Although my TWiki configuration showed
JQueryPlugin was enabled there was no JQuery folder in pub folder. Using TWiki configuration I upgraded the
JQueryPlugin. WYSIWYG editing with
TinyMCE editor now works.
Note that the only dependency listed for
TinyMCEPlugin is
WysiwygPlugin. Probably should add
JQueryPlugin is also a dependency for
TinyMCEPlugin.
--
Kurt Rosenhagen - 2021-06-15
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.