arsava / dokuwiki-template-vector

"vector" brings you the MediaWiki/Wikipedia 2010 look and feel for DokuWiki.
http://www.dokuwiki.org/template:vector
GNU General Public License v2.0
38 stars 9 forks source link

ODT export with CSS basic style option enable is broken #72

Closed eduardomozart closed 1 year ago

eduardomozart commented 1 year ago

When enabling the css_usage directive of ODT plugin using the default Vector template on current DokuWiki stable Release 2023-04-04a "Jack Jackrum", the following errors are being thrown when exporting a ODT file on PHP 8:


Warning: Undefined array key "compare" in /home/robertinho/public_html/wiki/lib/plugins/odt/ODT/ODTImport.php on line 838

Warning: Undefined array key "compare" in /home/robertinho/public_html/wiki/lib/plugins/odt/ODT/ODTImport.php on line 838

Warning: Undefined array key "compare" in /home/robertinho/public_html/wiki/lib/plugins/odt/ODT/ODTImport.php on line 838

Warning: Undefined array key "compare" in /home/robertinho/public_html/wiki/lib/plugins/odt/ODT/ODTImport.php on line 838

Warning: Undefined array key "compare" in /home/robertinho/public_html/wiki/lib/plugins/odt/ODT/ODTImport.php on line 838

Warning: Undefined array key "compare" in /home/robertinho/public_html/wiki/lib/plugins/odt/ODT/ODTImport.php on line 838

Warning: Undefined array key "compare" in /home/robertinho/public_html/wiki/lib/plugins/odt/ODT/ODTImport.php on line 838

Warning: Undefined array key "compare" in /home/robertinho/public_html/wiki/lib/plugins/odt/ODT/ODTImport.php on line 838

Warning: Undefined array key "compare" in /home/robertinho/public_html/wiki/lib/plugins/odt/ODT/ODTImport.php on line 838

Warning: Undefined array key "compare" in /home/robertinho/public_html/wiki/lib/plugins/odt/ODT/ODTImport.php on line 838

Warning: Undefined array key "compare" in /home/robertinho/public_html/wiki/lib/plugins/odt/ODT/ODTImport.php on line 838

Warning: Undefined array key "width" in /home/robertinho/public_html/wiki/lib/plugins/odt/ODT/ODTImport.php on line 532

Warning: Trying to access array offset on value of type null in /home/robertinho/public_html/wiki/lib/plugins/odt/ODT/ODTImport.php on line 540

Warning: Trying to access array offset on value of type null in /home/robertinho/public_html/wiki/lib/plugins/odt/ODT/css/cssimportnew.php on line 108

Warning: Trying to access array offset on value of type null in /home/robertinho/public_html/wiki/lib/plugins/odt/ODT/css/cssimportnew.php on line 108

Warning: Trying to access array offset on value of type null in /home/robertinho/public_html/wiki/lib/plugins/odt/ODT/css/cssimportnew.php on line 108

Warning: Trying to access array offset on value of type null in /home/robertinho/public_html/wiki/lib/plugins/odt/ODT/css/cssimportnew.php on line 108

Warning: Trying to access array offset on value of type null in /home/robertinho/public_html/wiki/lib/plugins/odt/ODT/css/cssimportnew.php on line 108

Warning: Trying to access array offset on value of type null in /home/robertinho/public_html/wiki/lib/plugins/odt/ODT/css/cssimportnew.php on line 108

Warning: Trying to access array offset on value of type null in /home/robertinho/public_html/wiki/lib/plugins/odt/ODT/css/cssimportnew.php on line 108

Warning: Trying to access array offset on value of type null in /home/robertinho/public_html/wiki/lib/plugins/odt/ODT/css/cssimportnew.php on line 108

Warning: Trying to access array offset on value of type null in /home/robertinho/public_html/wiki/lib/plugins/odt/ODT/css/cssimportnew.php on line 108

Warning: Trying to access array offset on value of type null in /home/robertinho/public_html/wiki/lib/plugins/odt/ODT/css/cssimportnew.php on line 108

Warning: Trying to access array offset on value of type null in /home/robertinho/public_html/wiki/lib/plugins/odt/ODT/css/cssimportnew.php on line 108

Warning: Trying to access array offset on value of type null in /home/robertinho/public_html/wiki/lib/plugins/odt/ODT/css/cssimportnew.php on line 108

Warning: Undefined array key "href " in /home/robertinho/public_html/wiki/lib/plugins/odt/ODT/css/cssimportnew.php on line 108

Warning: Undefined array key "href " in /home/robertinho/public_html/wiki/lib/plugins/odt/ODT/css/cssimportnew.php on line 108

Warning: Undefined array key "href " in /home/robertinho/public_html/wiki/lib/plugins/odt/ODT/css/cssimportnew.php on line 108

Warning: Undefined array key "href " in /home/robertinho/public_html/wiki/lib/plugins/odt/ODT/css/cssimportnew.php on line 108

Warning: Undefined array key "href " in /home/robertinho/public_html/wiki/lib/plugins/odt/ODT/css/cssimportnew.php on line 108

Warning: Undefined array key "href " in /home/robertinho/public_html/wiki/lib/plugins/odt/ODT/css/cssimportnew.php on line 108

Warning: Undefined array key "href " in /home/robertinho/public_html/wiki/lib/plugins/odt/ODT/css/cssimportnew.php on line 108

Warning: Undefined array key "href " in /home/robertinho/public_html/wiki/lib/plugins/odt/ODT/css/cssimportnew.php on line 108

Warning: Undefined array key "href " in /home/robertinho/public_html/wiki/lib/plugins/odt/ODT/css/cssimportnew.php on line 108

Warning: Undefined array key "href " in /home/robertinho/public_html/wiki/lib/plugins/odt/ODT/css/cssimportnew.php on line 108

Warning: Undefined array key "href " in /home/robertinho/public_html/wiki/lib/plugins/odt/ODT/css/cssimportnew.php on line 108

Warning: Undefined array key "href " in /home/robertinho/public_html/wiki/lib/plugins/odt/ODT/css/cssimportnew.php on line 108
TypeError: Unsupported operand types: string * int
An unforeseen error has occured. This is most likely a bug somewhere. It might be a problem in the odt plugin.

More info has been written to the DokuWiki error log.

Here's the TypeError log:

2023-06-21 14:48:31
TypeError: Unsupported operand types: string * int
/home/robertinho/public_html/wiki/lib/plugins/odt/ODT/ODTDocument.php(2407)
#0 /home/robertinho/public_html/wiki/lib/plugins/odt/ODT/ODTImport.php(445): ODTDocument->setUnorderedListParams(1, 'right', '', '')
#1 /home/robertinho/public_html/wiki/lib/plugins/odt/ODT/ODTImport.php(860): ODTImport::importUnorderedListStyles(Object(ODTInternalParams), Object(cssdocument), 'right')
#2 /home/robertinho/public_html/wiki/lib/plugins/odt/ODT/ODTImport.php(721): ODTImport::import_styles_from_css_internal(Object(ODTInternalParams), Object(cssdocument), Array, 'right')
#3 /home/robertinho/public_html/wiki/lib/plugins/odt/ODT/ODTImport.php(116): ODTImport::import_styles_from_css(Object(ODTInternalParams), 'screen', Array, 'right')
#4 /home/robertinho/public_html/wiki/lib/plugins/odt/ODT/ODTDocument.php(829): ODTImport::importCSSFromString(Object(ODTInternalParams), '.mediafile {\n ...', 'screen', Array, Array, Array, true, 'right')
#5 /home/robertinho/public_html/wiki/lib/plugins/odt/renderer/page.php(131): ODTDocument->importCSSFromString('.mediafile {\n ...', 'screen', Array, false, 'right')
#6 /home/robertinho/public_html/wiki/lib/plugins/odt/renderer/page.php(174): renderer_plugin_odt_page->load_css()
#7 /home/robertinho/public_html/wiki/lib/plugins/odt/renderer/page.php(270): renderer_plugin_odt_page->document_setup()
#8 /home/robertinho/public_html/wiki/inc/parserutils.php(700): renderer_plugin_odt_page->document_start()
#9 /home/robertinho/public_html/wiki/inc/parserutils.php(158): p_render('odt_page', Array, NULL)
#10 /home/robertinho/public_html/wiki/inc/Action/Export.php(88): p_cached_output('/home/robertinh...', 'odt_page', 'start')
#11 /home/robertinho/public_html/wiki/inc/ActionRouter.php(83): dokuwiki\Action\Export->preProcess()
#12 /home/robertinho/public_html/wiki/inc/ActionRouter.php(48): dokuwiki\ActionRouter->setupAction('export_odt_page')
#13 /home/robertinho/public_html/wiki/inc/ActionRouter.php(60): dokuwiki\ActionRouter->__construct()
#14 /home/robertinho/public_html/wiki/inc/actions.php(16): dokuwiki\ActionRouter::getInstance(true)
#15 /home/robertinho/public_html/wiki/doku.php(126): act_dispatch()
#16 {main}

Here is the page content:

====== Página principal ======

Parabéns, sua Wiki está instalada e funcionando. Aqui estão mais algumas dicas para você começar.

===== Crie suas primeiras páginas =====

Sua Wiki precisa ter uma página inicial. Enquanto não existir, este link ficará vermelho: [[:start]].

Vá em frente, siga [[:wiki:plugin:addnewpage:newpage|esse link]] e crie a página. Se precisar de ajuda com o uso da sintaxe, você pode sempre consultar a [[wiki:sintaxe|página de sintaxe]].

Você também pode usar uma barra lateral. Para criá-la, basta editar a página [[:sidebar]] (ou [[:wiki:navigation]]). Tudo nessa página será mostrado em uma coluna de margem ao lado. Leia nosso [[doku>faq:sidebar | FAQ sobre barras laterais]] para saber mais.

Esteja ciente de que nem todos os [[:wiki:template|templates]] suportam barras laterais.

===== Personalize sua Wiki =====

Quando estiver confortável com a criação e edição de páginas, você pode querer dar uma olhada nas [[this>doku.php?do=admin&page=config|definições de configuração]] (certifique-se de fazer login como superusuário primeiro).

Você também pode querer ver quais [[doku>plugins|plug-ins]] e [[doku>templates|templates]] estão disponíveis em DokuWiki.org para estender a funcionalidade e aparência de sua instalação DokuWiki.

===== Junte-se à Comunidade =====

DokuWiki é um projeto de código aberto que prospera por meio de contribuições de usuários. Uma boa maneira de se manter informado sobre o que está acontecendo e obter dicas úteis sobre como usar o DokuWiki é assinando o [[doku>newsletter]].

O [[https://forum.dokuwiki.org|Fórum de usuários DokuWiki]] é uma excelente maneira de entrar em contato com outros usuários DokuWiki e é apenas uma das muitas maneiras de obter [[doku>faq:suporte|suporte]].

É claro que ficaríamos mais do que felizes se vocês [[doku>teams:getting_involved|se envolvessem]] com o DokuWiki.
eduardomozart commented 1 year ago

Created a new issue at https://github.com/lpaulsen93/dokuwiki-plugin-odt/issues/306