Page MenuHomePhabricator

GraphViz extension: updating DOT code does not lead to new diagram
Closed, ResolvedPublic

Description

Author: Martin.Schneider

Description:
Intention:
I use the GraphViz extension v1.3.0 on top of MediaWiki v1.19.17 to draw diagrams from DOT code. The diagram is created in the correct way. But when updating the DOT code and saving the MediaWiki page again the diagram is not updated (the old diagram is shown.)

Steps to Reproduce:

  1. Versions: MediaWiki 1.19.17, GraphViz extension 1.3.0
  2. Create a page with a simple GraphViz example on it:

simple graphViz test

Example 1 from http://www.mediawiki.org/wiki/Extension:GraphViz

<graphviz border='frame' format='png'>
digraph example1 {Hello->"World!"}
</graphviz>

  1. Save the page.
  2. The page is shown with the diagram in the correct way.
  3. Edit the DOT code on the page, e.g. add another node and edge:

simple graphViz test

Example 1 from http://www.mediawiki.org/wiki/Extension:GraphViz

<graphviz border='frame' format='png'>
digraph example1 {Hello->"World!";
Hello->Goodbye;}
</graphviz>

  1. Save the changes
  2. The old diagram is shown without the additional node "Goodbye" and the edge from "Hello" to "Goodbye"

Actual Results:
The old diagram is shown.

Expected Results:
The updated diagram should be shown.

Reproducible: Always


Version: REL1_19-branch
Severity: normal

Details

Reference
bz67587

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 3:38 AM
bzimport set Reference to bz67587.

Thanks for taking the time to report this!

CC'ing GraphViz' maintainer (plus wondering if there is a dedicated bugtracker for GraphViz that I'm not aware of - if there is, then I fail to find out on https://www.mediawiki.org/wiki/Extension:GraphViz ).

I've confirmed this bug and have a fix ready. Please assign this bug to me.

The problem is that the GraphViz extension 1.0+ uses two hooks and one function that were introduced in MW 1.21 (PageContentSave, PageContentSaveComplete and WikiPage::doEdit respectively).

The fix is for the extension to use the older hooks and function for MW versions <1.21 (ArticleSave, ArticleSaveComplete and WikiPage::doEditContent respectively).

Change 144467 had a related patch set uploaded by Welterkj:
Backward compatibility fix for MW version <1.21.

https://gerrit.wikimedia.org/r/144467

Change 144467 merged by jenkins-bot:
Backward compatibility fix for MW version <1.21.

https://gerrit.wikimedia.org/r/144467

The fix is now available from Git and Packagist (via Composer). See the installation instructions and confirm you have version 1.3.1 when verifying this fix.