oleeskild / digitalgarden

261 stars 147 forks source link

Error generating images in PlantUML - deflate issue #251

Closed zanodor closed 4 months ago

zanodor commented 4 months ago

Re

I have found a near four-year-old topic here, with the problem:

The plugin you are using seems to generated a bad URL.
This URL does not look like DEFLATE data.
It looks like your plugin is using HUFFMAN encoding.
This means you have now to add an header ~1 to your data. For example, you have to change:
http://www.plantuml.com/plantuml/png/VPG_J-Cm5CTd_2ai64wAg4hQfcaHL1...
to
http://www.plantuml.com/plantuml/png/~1VPG_J-Cm5CTd_2ai64wAg4hQfcaHL1...
It will work this way

Suggestion

Would you consider a fix that tries sending either or both URLs so that the online site would generate the images?

From my investigation, it looks to me like the template uses a five-year-old 1.4.1. version of markdown-it-plantuml.

Alternative solution

Having no experience in coding, I'd find it hard to inject the header fix to the DG template but I'm open to suggestions.

Additional info

Both png and svg generation are affected and both URLs need to be patched.

Thanks for your attention, Z.

zanodor commented 4 months ago

Turns out the code contained some lines with functions or syntax now deemed deprecated? Deleting them fixed the issue.