millsdude / dokuwiki-plugin-whoisonline

DokuWiki Plugin to track active users
0 stars 2 forks source link

Incompatibility with Greebo / php warnings #3

Open tmo26 opened 4 years ago

tmo26 commented 4 years ago

Release 2018-04-22b "Greebo" Plugin version: 2013-06-12

After installation, the following warnings are displayed:

Warning: Declaration of syntax_plugin_whoisonline::handle($match, $state, $pos, &$handler) should be compatible with DokuWiki_Syntax_Plugin::handle($match, $state, $pos, Doku_Handler $handler) in /var/www/dokuwiki/lib/plugins/whoisonline/syntax.php on line 0

Warning: Declaration of syntax_plugin_whoisonline::render($mode, &$renderer, $data) should be compatible with DokuWiki_Syntax_Plugin::render($format, Doku_Renderer $renderer, $data) in /var/www/dokuwiki/lib/plugins/whoisonline/syntax.php on line 0

Fixing those issues by simply changing syntax.php as suggested in the warnings leads to no output at all when ~~whoisonline~~ is used.

thalueng commented 4 years ago

Same after update to "Hogfather", but now it's a fatal error not just a warning. Work around see below until someone adopts maintaining the plugin, as the original contributor was not active during the past 7 years and cannot be contacted.

  1. Replace function handle($match, $state, $pos, &$handler) definition with function handle($match, $state, $pos, Doku_Handler $handler) in file lib/plugins/whoisonline/syntax.php
  2. Replace function render($mode, &$renderer, $data) definition with function render($mode, Doku_Renderer $renderer, $data) in file lib/plugins/whoisonline/syntax.php
  3. Set $conf['defer_js']=0; in file conf/dokuwiki.php