You are here: Foswiki>Tasks Web>Item14531 (20 Nov 2017, MichaelDaum)Edit Attach

Item14531: GraphvizPlugin errors when using the TML table format input

pencil
Priority: Normal
Current State: Closed
Released In: n/a
Target Release: n/a
Applies To: Extension
Component: GraphvizPlugin
Branches: master
Reported By: BramVanOosterhout
Waiting For:
Last Change By: MichaelDaum
-- BramVanOosterhout - 20 Nov 2017

This error is reported as Support.Question1904 : GraphvizPlugin table example: string ran past end of line. I reproduced the problem and believe I have solved it. The patch is:
--- a/lib/Foswiki/Plugins/GraphvizPlugin/TableParser.pm
+++ b/lib/Foswiki/Plugins/GraphvizPlugin/TableParser.pm
@@ -47,7 +47,7 @@ sub getNodes {
       $index++;
       next if $index == 1;# skip header
       my @attrs = ();
-      push @attrs, "$params->{nodeattrcol}]\"" if defined $params->{nodeattrcol};
+      push @attrs, "$row->[$params->{nodeattrcol}]" if defined $params->{nodeattrcol};
       my $attrs = '';
       $attrs = "[".join(", ", @attrs)."]" if @attrs;
       push @lines, "  \"$row->[$params->{nodecol}]\" $attrs";
@@ -77,7 +77,7 @@ sub getEdges {
       next if $index == 1;# skip header
       my @attrs = ();
       push @attrs, "xlabel=\"$row->[$params->{labelcol}]\"" if defined $params->{labelcol};
-      push @attrs, "$params->{edgeattrcol}]\"" if defined $params->{edgeattrcol};
+      push @attrs, "$row->[$params->{edgeattrcol}]" if defined $params->{edgeattrcol};
       my $attrs = '';
       $attrs = "[".join(", ", @attrs)."]" if @attrs;
       push @lines, "  \"$row->[$params->{sourcecol}]\" -> \"$row->[$params->{targetcol}]\" $attrs";

I will commit and attempt to upload the change to github with this Item number

I have created a pull request.

-- BramVanOosterhout - 20 Nov 2017
 
Topic revision: r5 - 20 Nov 2017, 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