Item14615: XMLStoreContrib uses forbidden perl syntax.

pencil
Priority: Urgent
Current State: Waiting for Release
Released In: n/a
Target Release:
Applies To: Extension
Component: PlantUMLPlugin, XMLStoreContrib
Branches: master
Reported By: GeorgeClark
Waiting For: JohnKnutson
Last Change By: MichaelDaum
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.

-- GeorgeClark - 02 Feb 2018

The following patch is reported as fixing the issue. See Support.Question1923.
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']");

-- GeorgeClark - 02 Feb 2018
 
Topic revision: r4 - 29 Aug 2019, MichaelDaum
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