Extension talk:PlantUML

Problem with Title
Hello! I've found a bug in the classical version - at least in combination with MediaWiki 1.15: The usage of $wgTitle as MD5 source does not work - it always results in an empty string. As a result, all images are stored as "uml--(CodeHash).png" - and when another page is saved, the cleanImages deletes ALL images. Other (cached) pages then can't find their images unless they are re-created.

As a fix, instead of using global $wgTitle (which is also described as not to be used), I'm using the following function: function getPageTitle { global $wgArticle; $title = $wgArticle->getTitle->getText; return $title; } and use getPageTitle instead of $wgTitle.

I don't know whether this is the best solution, but for now it works as intended - image files are stored with a proper hash for the title AND are kept for all pages :).

- Ok, thanks, I've just made the correction (April 29th, 2011)

Actually, it seems to depend of MediaWiki, so I suggest the following code:

function getPageTitle { global $wgArticle; global $wgTitle; // Retrieving the title of a page is not that easy if (empty($wgTitle)) { $title = $wgArticle->getTitle->getText; return $title; }   return $wgTitle; } Any though ?

GraphViz
I found that GraphViz was required to have this working... you might want to add this to the install instructions?

- Ok, thanks for this suggestion!

Changed font
Hi - I installed on our test environment (without GraphWiz) and it worked fine (the first example on the article page). But on our real environment the font suddenly changed (test: Arial, real: some kind of joined up Word link font). Any idea why this is? The skin on both is the same. --Robinson Weijman 11:27, 5 February 2010 (UTC)

I am not sure to understand your issue. Could you contact me by mail (plantuml@gmail.com) ? Thanks - 13 February 2010
 * Thanks for the reply. We solved the issue - each environment had a different version of java.  Now that this is corrected, the problem is resolved.  --Robinson Weijman 09:17, 15 February 2010 (UTC)

Spaces in Windows Apache Home Path
On my windows machine I had to change:

to

Otherwise the script failed because of some spaces in the installation path of the Apache. Maybe someone with more experience in php than myself could fix this to a more robust version.

How it run into CentOS?

 * It works in Ubuntu and FreeBSD, but i can't run it into CentOS.

You should double check that the Sun JVM is used, and not the OpenJDK.

error on uploading?
hello

I get this error when doing regular uploads

Fatal error: Call to a member function getTitle on a non-object in /var/www/tids/extensions/PlantUML.php on line 181

BTW useful extension and thanks

Msevero 08:06, 30 April 2011 (UTC)

Ok, I just change the getPageTitle function. Does it work better ?

PlantUML 20:19, 30 April 2011 (UTC)