ImagePlugin
Foswiki v2.1.11 on Ubuntu 24.04
Zowel op mijn Strato-server als op de AWS-server op kantoor werkte de ImagePlugin niet (op de Strato van bij het begin, op de AWS-server na upgrade van Ubuntu 22.04 naar 24.04). Zie
https://foswiki.org/Support/Question2246.
Dus als volgt opgelost:
user@server:~$ sudo git clone <a href='https://github.com/ImageMagick/ImageMagick.git' rel='nofollow noopener noreferrer' target='_blank'>https://github.com/ImageMagick/ImageMagick.git</a>
...
user@server:~$ cd ImageMagick
...
user@server:~/ImageMagick$ sudo ./configure --with-modules
...
checking for libltdl...
checking for ltdl.h... no
checking if libltdl package is complete... no
configure: error: in '/home/admin/ImageMagick':
configure: error: libltdl is required for modules and OpenCL builds
See 'config.log' for more details
user@server:~/ImageMagick$ sudo apt install libltdl-dev
...
user@server:~/ImageMagick$ sudo ./configure --with-modules
...
Daarna de
ImagePlugin ingeschakeld, en jawel: ik kan weer topics met afbeeldingen openen en opslaan, drag & drop van afbeeldingen gebruiken enz.
Extract uit
FoswikiServerInformation bij werkende plugin, vermelding bij 'Loaded modules':
| Module |
Version |
Location |
| Image::Magick::Q16 |
6.9.12 |
/usr/lib/x86_64-linux-gnu/perl5/5.38/Image/Magick/Q16.pm |
| Image::Magick |
|
/usr/share/perl5/Image/Magick.pm |
Foswiki v2.1.11 vereist versie 7, maar gek genoeg staat er dus geen versievermelding hierboven, en is ook nog een versie 6.x beschikbaar.
Als volgt achterhalen we wel de versie:
$ identify --version|sed "-e s/Version: ImageMagick //" -e "s/ .*//"|head -1
7.1.1-47
of
user@server:~$ convert -version
WARNING: The convert command is deprecated in IMv7, use "magick" instead of "convert" or "magick convert"
Version: ImageMagick 7.1.1-47 Q16-HDRI x86_64 22763 https://imagemagick.org
Copyright: (C) 1999 ImageMagick Studio LLC
License: https://imagemagick.org/script/license.php
Features: Cipher DPC HDRI OpenMP(4.5)
Delegates (built-in):
Compiler: gcc (13.3)
Maar of deze versie nu overeenstemt met de versie die Foswiki gebruikt, is niet zeker. De AWS-server op kantoor zegt
7.1.2-27, terwijl de server-inforamatie spreekt van
7.1.1...
Foswiki v2.1.9
In v2.1.8,
ImagePlugin was disabled and not neccessary, even not for NatSkin, althought it is mentioned as a required dependency (
NatSkin < Extensions < Foswiki).
In v2.1.9, I got an error...
ImagePlugin depends on
ImageMagick 7.x.
Ubuntu 22.04
But Ubuntu 22.04 ships with
ImageMagick 6.x.
I installed version 7.x following the instructions from
How to Install Latest ImageMagick 7 on Ubuntu 22.04.
Then I still had some missing perl modules. And althought my @INC included the necessary paths, I had to copy those modules to foswiki/lib/CPAN:
- Data::UUID
- JSON::MaybeXS
- Time::Duration::Parse
- JSON::MaybeXS
- Log::Any
- String::RewritePrefix
- Digest::JHash
- MooX::Types::MooseLike::Base
- MooX::Types::MooseLike::Numeric
- Hash::MoreUtils
- Carp::Assert
- Time::Duration
Shared hosting
I wasn't able to get it working on the shared hosting. There I went back to the previous version of the
!TopicInteractionPlugin.
Inserted using the ImagePlugin:

Griekenland

Italië

Spanje

Frankrijk
Blahblabhblah
Inserted as attachment:
Foswiki v?
Als een plugin wordt bijgewerkt, wordt hij altijd ingeschakeld, ook als hij vooraf uitgeschakeld was, zo ook de ImagePlugin.
Als ik een image heb in een topic, krijg ik dan wel volgende fout te zien ipv de topictekst:
Foswiki detected an internal error - please check your Foswiki logs and webserver logs for more information.
Can't locate Cachepath in @INC (@INC contains: path path path path path path path path path path . path)
De oplossing is dan ook de plugin weer uit te schakelen.
Dit issue is gerelateerd aan het
FwImageMagick topic. Daarin staat dat voor NatSkin de ImagePlugin vereist is, maar eigenlijk is dat niet zo.
tags - topicinteractionplugin