pjkersten / plantuml Goto Github PK
View Code? Open in Web Editor NEWPlantUML plugin for MediaWiki
PlantUML plugin for MediaWiki
Hallo, is it still support for mediawiki extensions?
For example:
<uml ext="wbs">
...
</uml>
render to
@startwbs
...
@endwbs
empty or unsupported ext equals to "uml"
Does this depend on the Graphviz extension? It is not clear...
[55caca79fad6a1fb28d8e865] [no req] Error from line 327 of /var/www/mediawiki/code/extensions/PlantUML/PlantUML.body.php: Call to a member function getTitle() on null
When Extension:PlantUML runs exec() in renderPlantUML(), it never bothers to check exec's return value or report any error messages. I'd recommend switching to Symfony\ProcessBuilder, which is very easy to use and will also handle I/O redirection and all the platform-specific issues that make correct and portable forking a pain.
After upgrading Ubuntu and MediaWiki, I received the error: [An error occured in PlantUML extension].
How could I nail down the issue?
After upgrading to a faster server we did run into a strange issue that did cost us quite some time to find the reason.
On the old server renderUML always has been slow enough so that onPageContentSave (which seems to run in parallel) completed before renderUML created the image file. On the new server renderUML completes very fast, so that onPageContentSave finds the freshly created image file and deletes it. The result is that the UML diagram won't show up in the wiki article.
For now we managed to solve this by calling the cleanup function from within renderUML (before writing the new file obviously) and call the cleanup function from onPageContentSave only if the page content does not include any <uml>
tag.
This does not seem like a proper fix, so maybe you want to provide a better solution.
We are using Mediawiki 1.34.0 by the way.
Right now Extension:PlantUML puts all its functions into the global namespace. Most of its functions have unique names but there are a few like cleanImages
, getPageTitle
, getImage
, renderSVG
, renderPNG
and setProperty
that are fairly generic and seem likely to cause conflicts with other extensions. Moving everything into a static class (or, for bonus points, a non-static class) would eliminate this potential for conflicts.
When PlantUML renders an image, it puts both the image and its uml directly into /images. Using an extension-specific subdirectory like /images/plantuml would make image management much easier and cleaner.
I'm a Korean native speaker.
I've just found it doesn't work with Korean language.
Hi,
for your information, i just release a quick patch wich allow setting a proxy while getting plantuml generated image in cloud mode.
I document it here : http://www.mediawiki.org/wiki/Extension_talk:PlantUML#PlantUML_with_a_dedicated_plantuml_server_behind_proxy
maybe you could include this option into your next release? ;)
anyway, thanks for this useful extension.
regards
Boly38
<uml>
class Züchter {
}
</uml>
renders as
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" height="65pt" style="width:101px;height:65px;" version="1.1" viewBox="0 0 101 65" width="101pt">
<text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="54"
x="35" y="28.1543">Z�chter</text>
</svg>
but should render "Züchter" instead.
The temporary file
@startuml
class Züchter {
name
}
@enduml
seems to be correct - so there seems to be some option missing in calling plantuml.jar
Further investigation shows that the file is written as ISO-8859 instead of UTF-8
file /tmp/test.uml
/tmp/test.uml: ISO-8859 text
I am using -charset ISO-8859 option as a workaround now but think it would be better if the extension would work correctly out of the box.
when reading image_map_data the file size is not checked and might lead to an error message
When Extension:PlantUML detects that plantuml.jar has created an image, it doesn't create the proper database entries for that file. This means that if someone is attempting to use PlantUML from a wiki where image authentication is enabled, img_auth.php will see a request for a file that's not listed in the image
table and will return a 404.
The code looks like it's a pain to implement but Extension:GraphViz seems to get it right and is licensed under the same terms as this extension. Extension:PlantUML might even be able to use GraphViz::uploadImages() directly though I haven't tested this.
I'd love to be able to deploy this extension. If I don't have time to come up with a fix, I will at least commit to testing potential fixes.
I'm unable to use PlantUML notation to create a diagram with the extension notation using a form. Other PlantUML diagrams work via the form, but the <|-- results in the following error:
"|" is not allowed, except within {{...}}, [[...]], or special tags
I would expect that this should work as the "|" symbol is defined within the tag. Any pointers on this? Is there some alternate notation that I can substitute?
I tried to create a wiki page like this:
salt { Just plain text [This is my button]() Unchecked radio (X) Checked radio [] Unchecked box [X] Checked box "Enter text here " ^This is a droplist^ }But I get a rendering which displays an error:
[From ... (line 3) ]
@startuml
salt
Forbidden line salt
Throughout PlantUML.php
there are commented-out calls to unlink()
. These should either be active, deleted or put behind a config variable, e.g. $wgPlantUmlDeleteTempFiles
.
Check that plantuml handle section editing effiiciently that is only updates the diagrams in the section.
I did not find any license information in the source or in the README.
Could you please add licensing information for the plugin?
I personally would prefer MIT or Eclipse Public License. PlantUML itself is tri-licensed. LGPL, Apache, and EPL: http://plantuml.sourceforge.net/download.html
On my Server PlantUML does not load:
php ~/PlantUML/PlantUML.php
PHP Parse error: syntax error, unexpected T_STRING in ~/PlantUML/PlantUML.php on line 298
php -v
PHP 5.3.3-7+squeeze14 with Suhosin-Patch (cli) (built: Aug 6 2012 14:18:06)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
with Suhosin v0.9.32.1, Copyright (c) 2007-2010, by SektionEins GmbH
Hello,
with the version 8059 the name of the jar file is now plantuml-8059.jar. As I guess this name will evolve, I propose the following initialisation in PlantUml.php (of course the exact path is for my installation...)
$plantumlJar = exec("ls /var/lib/tomcat/webapps/plantuml/WEB-INF/lib/plantuml*.jar");
greetings
Nicolas
It would be great if this project would use git Release Tags. Ideally using http://semver.org/ style.
httpd-2.4.41-12
php-fpm-7.3.15-1
mediawiki-1.32.4-1
PlantUML version 1.2020.00 (Sat Jan 11 12:30:53 GMT 2020)
gchrome 79.0.3945.130
Sometimes, my httpd/php/mediawiki + plantuml generates rendering correctly, as it appears when I browse the page, and right after editing UML, or reloading the page, sometimes my browser renders this, as observed by chrome F12:
<object
class="plantuml"
type="image/svg+xml"
data="/wiki/images/uml-e6c4dc4987dc8b0ce38b7b8e14db172d-9e9d73063f2edcfa17ff371ad768db47.svg"
svg=""
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
contentscripttype="application/ecmascript"
contentstyletype="te>Your browser has no SVG support. Please install <a href=" http:="" www.adobe.com="" viewer="" install="" "="">Adobe SVG Viewer plugin (for Internet Explorer) or use <a href="http://www.getfirefox.com/">Firefox</a>, <a href="http://www.opera.com/">Opera</a> or <a href="http://www.apple.com/safari/download/">Safari</a> instead.
</object>
Any ideas why it works sometimes and not others.
Promote this on English Wikipedia with an article on PlantUML and plugin.
Also request Wikipedia to activitate this plugin as a standard service in their articles.
Example:
Alice -> Bob: Authentication Request Bob --> Alice: Authentication ResponseNot working
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.