Several features not working in PlantUML for Confluence Cloud addon.
Asked by Flemming Steffensen:

I'm currently manually restoring (don't ask!) some documentation from an old Confluence Server to Confluence Cloud.

During the process, I find a number of things in the PlantUML plugin to no longer work or have errors and I can't seem to find any documentation for a number of things.

I'm using the latest cloud version, which is 1.2021.3 - one version higher than the [current online PlantUML guide](http://plantuml.com/guide).

<br />

**1. Math is sometimes not rendered on the confluence page.**   
Latex math formulas are working in the preview editor and most of the time on the Confluence page.  
However once in a while, the raw formula is displayed on the Confluence page, instead of the rendered version.  
There appears to be no pattern to this, it occurs on several browsers and can suddenly appear on a page reload. May be subject to caching as it often requires many reloads (5-10 times) to switch from working to a broken state.

Tested with this code:

```
@startmath
scale 5
color red
f(t)=(a_0)/2 + sum_(n=1)^ooa_ncos((npit)/L)+sum_(n=1)^oo b_n\ sin((npit)/L)
@endmath
```

**2. Inline \<math\> does not render on the page**   
It does render in the preview editor, though.  
This may be related to the issue described above.

Tested with this code:

```
@startuml
Bob -> Alice : Can you solve: <math>ax^2+bx+c=0</math>
Alice --> Bob: <math>x = (-b+-sqrt(b^2-4ac))/(2a)</math>
@enduml
```

**3. XEarth produces syntax errors**   
The xearth keywords produces a syntax error.  
Did the syntax change compared to [how it's documented](https://plantuml.com/xearth)?

Tested with this code:

```
@startuml
xearth
@enduml
```

**4. JCCKit crashes the preview editor.**   
It looks like support for jcckit has either dissapeared or been renamed. When I try using @startjcckit and @endjcckitd, the preview editor appears to crash =\> Nothing happens, including no errors are shown , and it's not possible to exit the preview editor. This results in all edits to the Confluence page being lost, as you have to reload the page to recover. It isn't even possible to save code starting with @startjcckit before the rendering.

It looks like to documentation has dissapeared, too, as the only documentation and examples I can find are [on the wayback machine](https://web.archive.org/web/20190504145640/http://plantuml.com:80/jcckit).

Tested with (among others) this code:

    @startjcckit(600,300)data/curves = curve2 errors2 curve1 errors1data/curve1/title = curve 1data/curve1/x = 0.02 0.11  0.18  0.3   0.42  0.49 0.61data/curve1/y = 0.68 0.61  0.52  0.41  0.27  0.21 0.11data/errors1/x = 0.021 0.01  0.017 0.024 0.023 0.025 0.027data/errors1/y = 0.034 0.028 0.031 0.039 0.03  0.032 0.041data/curve2/title = curve 2data/curve2/x = 0.4   0.5  0.6   0.7   0.8   0.9data/curve2/y = 0.17  0.29 0.45  0.61  0.64  0.66data/errors2/x = 0 0 0 0 0 0data/errors2/y = 0.05 0.036 0.059 0.07 0.061 0.053background = WhitedefaultCoordinateSystem/ticLabelAttributes/fontSize = 0.03defaultCoordinateSystem/axisLabelAttributes/fontSize = 0.04defaultCoordinateSystem/axisLabelAttributes/fontStyle = boldplot/coordinateSystem/xAxis/ = defaultCoordinateSystem/plot/coordinateSystem/xAxis/minimum = 	0.1plot/coordinateSystem/yAxis/ = defaultCoordinateSystem/plot/initialHintForNextCurve/className = jcckit.plot.PositionHintplot/initialHintForNextCurve/origin = 0.06 0.1#plot/initialHintForNextCurve/position = 0 0plot/curveFactory/definitions = cdef1 edef1 cdef2 edef2plot/curveFactory/cdef1/symbolFactory/className = jcckit.plot.ErrorBarFactoryplot/curveFactory/edef1/symbolFactory/className = jcckit.plot.ErrorBarFactoryplot/curveFactory/edef1/symbolFactory/attributes/className = jcckit.graphic.ShapeAttributesplot/curveFactory/edef1/symbolFactory/attributes/fillColor = 0xcafeplot/curveFactory/edef1/symbolFactory/attributes/lineColor = 0plot/curveFactory/edef1/symbolFactory/size = 0.01plot/curveFactory/edef1/withLine = falseplot/curveFactory/edef1/softClipping = falseplot/curveFactory/cdef2/symbolFactory/className = jcckit.plot.ErrorBarFactoryplot/curveFactory/cdef2/symbolFactory/symbolFactory/className = jcckit.plot.SquareSymbolFactoryplot/curveFactory/cdef2/symbolFactory/symbolFactory/attributes/className = jcckit.graphic.ShapeAttributesplot/curveFactory/cdef2/symbolFactory/symbolFactory/attributes/fillColor = 0x40c0plot/curveFactory/cdef2/symbolFactory/symbolFactory/attributes/lineColor = plot/curveFactory/edef2/ = plot/curveFactory/edef1/plot/curveFactory/edef2/symbolFactory/attributes/fillColor = plot/curveFactory/edef2/symbolFactory/attributes/lineColor = 0plot/curveFactory/edef2/symbolFactory/size = 0@endjcckitd

Note: Above edited to include full graph.

**5. @pause and @unpause sometimes fails.**   
It seems that sometimes @pause is treated as @enduml, causing the subsequent @unpause to generate a syntax error.  
This always happens on the Confluence page, never in the preview editor.

I can only find [limited documentation](https://forum.plantuml.net/?qa=1525/%40pauseuml-for-splitting-uml-code#a1639) of the feature.

Tested with this code:

```
@startuml
actor bob
@pause
@unpause
actor alice
@enduml
```


Answers:
author: Boris Jockov _Stratus Add-ons_
body: Hello,

As we've notified you in the ticket, we have added support for XEarth and JCCKIT.

We continue to investigate other points of your post.

comments: author: Flemming Steffensen
body: Hi Boris,

Just a quick status for you and the rest of the community before the summer holidays.

First of all, thank you for adding support for XEarth and JCCKIT.

Also thank you for the online debug session we went through, which resulted in the discovery that the root cause for most of the errors may in fact be the same issue - which for lack of a better word can be called a cache problem, namely that a previous version of the image is displayed - and in some cases, these previous versions are not even in the list of historical versions of the image.

For the last months, my colleagues and I have observed the error once in a while, but have not been able to capture it, so we still do not have a proper way to reproduce it. For me, it feels like it's decreasing in occurrences, but I may also be using Confluence less, so it's hard to really benchmark.


author: Kelly Arrey
body: Hi Flemming, I'm running into similar issues, you might want to raise tickets for these at:  

<https://stratusaddons.freshdesk.com/support/home>

comments: author: Flemming Steffensen
body: Thank you. Already did. Boris is on the case and will answer here. :-)


author: Burak Kahraman
body: is there any update on this topic, we are also not able to neither add a new diagram not update an existing one...


author: Flemming Steffensen
body: Boris has been investigating and has several times requested additional info from me to debug - latest yesterday. I have still not had status from him, but he has promised to reply as an answer to my original question.

I'm curious, though, when you say you can not add new diagrams or update existing ones, is it then using xearth, JCCKit, or (inline) math?

I'm asking, as if it's not one of those cases, then it's probably not related to this question, and you would be better off asking a new question.


author: Burak Kahraman
body: yes indeed, I am using PlantUML plugin in confluence for drawing sequence diagrams.


author: Kelly Arrey
body: I'm able to add diagrams using the \`/PlantUML\` macro in "new" editor pages. I wasn't able to do that in "old" editor pages. For each page with a PlantUML diagram:

1. I copied and pasted the code from the diagrams in the old editor page to a temporary code block somewhere
2. Then I converted the old page to the "new" editor
3. Then I deleted the old PlantUML macros from the new editor page
4. Then I added a new \`/PlantUML\` macro
5. Then I copied the code from the temporary code block and pasted it in the new \`/PlantUML\` macro.

Hope this helps,


author: Boris Jockov _Stratus Add-ons_
body: Hi Kelly,

older Confluence cloud page editor used a curly braces syntax as opposed to the new editor which uses the "/" syntax.

In both cases, contents of macros are the same. It's just adding macros to the page has changed in Confluence.

Regards,

Boris.


author: Kelly Arrey
body: Hi Boris, we were on Confluence Server 6.13.4 and avono PlantUML for Confluence 6.31, so the above was the only way I could get the diagrams to display after we migrated to cloud.  
Kel


Tags: addon-com.mxgraph.confluence.plugins.plantuml

cloud

confluence-cloud

plant-uml