lpaulsen93 / dokuwiki-plugin-odt

Exports a page to the Open Document format used by OpenOffice.org and other word processors
http://www.dokuwiki.org/plugin:odt
13 stars 26 forks source link

GeSHi (DokuWiki built-in Syntax Highlight) and Wrap plugin CSS styles isn't applied on ODT export #291

Closed eduardomozart closed 1 year ago

eduardomozart commented 1 year ago

Hello, When attempting to export the attached TXT page to ODT using ODT plugin, Wrap CSS style to it's boxes (important, caution, info etc.) isn't being applied (as can be seen into the attached ODT file). The following errors are being thrown with the display_errors PHP directive set to On.

Warning: Undefined array key "background-color" in /home/robertinho/public_html/wiki/lib/plugins/wrap/helper.php on line 656

Warning: Undefined array key "background-image" in /home/robertinho/public_html/wiki/lib/plugins/wrap/helper.php on line 657

Warning: Undefined array key "margin-top"
[wiki-plugin-include.odt](https://github.com/lpaulsen93/dokuwiki-plugin-odt/files/11332446/wiki-plugin-include.odt)
 in /home/robertinho/public_html/wiki/lib/plugins/wrap/helper.php on line 658

Warning: Undefined array key "margin-right" in /home/robertinho/public_html/wiki/lib/plugins/wrap/helper.php on line 659

Warning: Undefined array key "margin-bottom" in /home/robertinho/public_html/wiki/lib/plugins/wrap/helper.php on line 660

Warning: Undefined array key "margin-left" in /home/robertinho/public_html/wiki/lib/plugins/wrap/helper.php on line 661

At first glance, this error seems to be related to Wrap plugin, but it didn't seem to be the cause as it was working as expected into the past and there was no code changes to the Wrap plugin. My theory is that ODT plugin isn't importing the CSS styles for wrap_ classes prefix.

indexmenu.txt

image

wiki-plugin-indexmenu (new).odt

Here's the ODT export using an older ODT plugin version (2019-07-27):

image

wiki-plugin-indexmenu (old).odt

eduardomozart commented 1 year ago

Fix available on https://github.com/lpaulsen93/dokuwiki-plugin-odt/pull/290.