Giter Site home page Giter Site logo

plantuml's People

Contributors

davidfr avatar de2zotjes avatar dov avatar pjkersten avatar suapapa avatar wolfgangfahl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

plantuml's Issues

update.php error

[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

no error checking on forking

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.

onPageContentSave deletes the file freshly generated by renderUML

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.

make PlantUML into a class

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.

place images in /images/plantuml instead of /images

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.

Umlaute

<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.

PlantUML is incompatible with image authentication

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.

Error on extension notation in forms

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?

MediaWiki-Plugin does not understand "salt" diagrams

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

PlantUML doesn't clean up temporary files

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.

section editing support

Check that plantuml handle section editing effiiciently that is only updates the diagrams in the section.

PHP Parse error: on Line on line 298

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

plantuml jar filename change

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

Rendering sometimes works sometimes fails

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

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.

Examples are not working

Example:

Alice -> Bob: Authentication Request Bob --> Alice: Authentication Response

Not working

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.