====== Dokuwiki Plugin PlantUML Parser ======
* [[https://www.dokuwiki.org/plugin:plantumlparser]]
* [[https://www.dokuwiki.org/plugin:plantuml]] (OLD)
La versión más moderna ya no se ejecuta en local sino se conecta a una ws, ojo a esto.
Cuando se ejecutaba en local se tuvo estos problemas (buscar la versión de dokuwiki en la que cambio a procesarse en servidor externo)
Al instalar en una wiki en PHP 7 la extensión PlantUML salio los siguientes errores (versión local):
En la parte alta de la wiki:
Warning: Declaration of action_plugin_plantuml::register(&$controller) should be compatible with DokuWiki_Action_Plugin::register(Doku_Event_Handler $controller) in C:\xampp\htdocs\dokuwiki\lib\plugins\plantuml\action.php on line 22
En la parte interna del modulo de extensiones (parecido al problema del módulo plantuml, en este caso lo saque del plug in note, porque no volvió a aparecer el problema)
Error message :
Warning: Declaration of syntax_plugin_note::handle($match, $state, $pos, &$handler) should be compatible with DokuWiki_Syntax_Plugin::handle($match, $state, $pos, Doku_Handler $handler) in /data/www/wiki/lib/plugins/note/syntax.php on line 188
Warning: Declaration of syntax_plugin_note::render($mode, &$renderer, $indata) should be compatible with DokuWiki_Syntax_Plugin::render($format, Doku_Renderer $renderer, $data) in /data/www/wiki/lib/plugins/note/syntax.php on line 188
Se arregló gracias a cambiar lo siguiente en action.php y sintax.php del módulo:
Cambiando **&$controller** por **Doku_Event_Handler $controller**
class action_plugin_plantuml extends DokuWiki_Action_Plugin {
/**
* Register the event handler
*/
function register(&$controller) {
if($this->getConf('button_enabled') == '1')
$controller->register_hook('TOOLBAR_DEFINE', 'AFTER', $this, 'insert_button', array ());
}
por
class action_plugin_plantuml extends DokuWiki_Action_Plugin {
/**
* Register the event handler
*/
function register(Doku_Event_Handler $controller) {
if($this->getConf('button_enabled') == '1')
$controller->register_hook('TOOLBAR_DEFINE', 'AFTER', $this, 'insert_button', array ());
}
y en
* **&$handler** por **Doku_Handler $handler**
* **&$renderer** por **Doku_Handler $handler**
function handle($match, $state, $pos, &$handler) {
// echo "handle: state=$state
";
// echo "handle: match=$match
";
// echo "handle: pos=$pos
";
...
function render($mode, &$renderer, $data) {
if ($mode == 'xhtml') {
$img = DOKU_BASE . 'lib/plugins/plantuml/img.php?' . buildURLParams($data);
por
function handle($match, $state, $pos, Doku_Handler $handler) {
// echo "handle: state=$state
";
// echo "handle: match=$match
";
// echo "handle: pos=$pos
";
...
function render($mode, Doku_Renderer $renderer, $data) {
if ($mode == 'xhtml') {
$img = DOKU_BASE . 'lib/plugins/plantuml/img.php?' . buildURLParams($data);
Fuente:
* [[https://forum.dokuwiki.org/d/15046-error-messages-for-plugins-after-update-to-php7/9]]
* [[https://github.com/cosmocode/dokuwiki-plugin-note/issues/1]]