This question about Using an extension: Task filed

DirectedGraphPlugin works, but PlantUMLPlugin fails

On my upgraded wiki, on pages where I'm using <plantuml>-tags, no images are being generated.

Instead, I see code, as if the plugin wasn't installed or not enabled:

You get: (if installed) actor Foo1 boundary Foo2 control Foo3 entity Foo4 database Foo5 Foo1 → Foo2 : To boundary Foo1 → Foo3 : To control Foo1 → Foo4 : To entity Foo1 → Foo5 : To database

The DirectedGraphPlugin works as it did before and the images are being generated nicely. I also tested if this was a caching problem, by altering diagrams. The Example on DirectedGraphPluginExamples changed, and on PlantUMLPluginExamples nothing happened.

I have tested plantuml from the command line, and it works:
$ java -jar /opt/plantuml/plantuml.jar -testdot
The environment variable GRAPHVIZ_DOT has been set to /usr/bin/dot
Dot executable is /usr/bin/dot
Dot version: dot - graphviz version 2.38.0 (20140413.2041)
Installation seems OK. File generation OK

The PerlDependencyReport looks OK, exept for the unrecognized Version number for Image::Magick.

Is there anything else I can do to debug this?

-- BirgitNietsch - 01 Feb 2018

Are there any errors in your InstalledPlugins page?

-- GeorgeClark - 01 Feb 2018

Yes. It seems that PlantUML has been deactivated due to some Problems with the XML Store Contrib. I have totally removed and reinstalled both PlantUML and the XML Store Contrib, but the errors persist:
Foswiki::Plugins::PlantUMLPlugin could not be loaded.  Errors were:
Experimental keys on scalar is now forbidden at /srv/www/foswiki/htdocs/lib/Foswiki/Contrib/XMLStoreContrib.pm line 227.
 at /srv/www/foswiki/htdocs/lib/Foswiki/Contrib/XMLStoreContrib.pm line 227.
   require Foswiki/Contrib/XMLStoreContrib.pm called at /srv/www/foswiki/htdocs/lib/Foswiki/Plugins/PlantUMLPlugin/GraphMetaStore.pm line 30
   Foswiki::Plugins::PlantUMLPlugin::GraphMetaStore::BEGIN() called at /srv/www/foswiki/htdocs/lib/Foswiki/Contrib/XMLStoreContrib.pm line 227
   eval {...} called at /srv/www/foswiki/htdocs/lib/Foswiki/Contrib/XMLStoreContrib.pm line 227
   require Foswiki/Plugins/PlantUMLPlugin/GraphMetaStore.pm called at /srv/www/foswiki/htdocs/lib/Foswiki/Plugins/PlantUMLPlugin.pm line 384
   Foswiki::Plugins::PlantUMLPlugin::BEGIN() called at /srv/www/foswiki/htdocs/lib/Foswiki/Contrib/XMLStoreContrib.pm line 227
...

-- BirgitNietsch - 02 Feb 2018

Try the following patch.

diff --git a/lib/Foswiki/Contrib/XMLStoreContrib.pm b/lib/Foswiki/Contrib/XMLStoreContrib.pm
index 329d265..65e12c9 100644
--- a/lib/Foswiki/Contrib/XMLStoreContrib.pm
+++ b/lib/Foswiki/Contrib/XMLStoreContrib.pm
@@ -224,8 +224,8 @@ sub save {
     # Remove all nodes associated with the updated topic from the most
     # recent document, then add the possibly changed nodes back in.
     my $diskroot = $doc->documentElement();
-    foreach my $web (sort keys $self->{'updated'}) {
-        foreach my $topic (sort keys $self->{'updated'}->{$web}) {
+    foreach my $web (sort keys %{ $self->{'updated'} }) {
+        foreach my $topic (sort keys %{ $self->{'updated'}->{$web} }) {
             my @nodes = $doc->findnodes(
                 "/" . $self->{'rootname'} . "/" . $self->{'nodename'} .
                 "[\@web='$web' and \@topic='$topic']");

It appears that you are using a newer version of perl and some syntax used in the plugin has been deprecated. I don't have a setup here to test these changes, and I'm unfamiliar with the actual data structure, so this is really a guess. Please report back if it resolves your issue.

-- GeorgeClark - 02 Feb 2018

I've filed Item14615 for this issue.

-- GeorgeClark - 02 Feb 2018

This patch has solved my problems. Thank you so much! smile

-- BirgitNietsch - 02 Feb 2018

Adding a comment: I have just seen that when I have more than one PlantUML Salt diagram on my page, the last salt diagram "wins the game". They are all "PlantUMLPlugin_1.png". Even if there are several non-salt diagrams on the page, one single salt wil spoil the show. The ditaa feature doesn't work at all, as if the keyword was not recognized, and I don't know if this caused by PlantUMLPlugin, by PlantUML itself, or by XMLStoreContrib. I'll have to look into the details on monday.

-- BirgitNietsch - 02 Feb 2018

Sounds like another bug. If you could, please report them in PlantUMLPlugin or XMLStoreContrib

-- GeorgeClark - 02 Feb 2018
 

QuestionForm edit

Subject Using an extension
Extension PlantUMLPlugin
Version Foswiki 2.1.4
Status Task filed
Related Topics Tasks.Item14615
Topic revision: r7 - 02 Feb 2018, GeorgeClark
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