splitbrain / dokuwiki-plugin-translation

Easily setup a multi-language DokuWiki
http://www.dokuwiki.org/plugin:translation
23 stars 24 forks source link

Please help me install the translation plugin #266

Closed xaozai closed 4 years ago

xaozai commented 4 years ago

What I did:

if (!defined('DOKU_INC')) die(); / must be run from within DokuWiki /

$hasSidebar = page_findnearest($conf['sidebar']); $showSidebar = $hasSidebar && ($ACT=='show'); ?><!DOCTYPE html>

<?php tpl_pagetitle() ?> [<?php echo strip_tags($conf['title']) ?>]
_showTranslations(); ?>
... ``` Now dokuwiki pages don't display content. In nginx logs I see the following errors: ``` 2020/05/22 14:33:53 [error] 11597#11597: *358 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught Error: Call to a member function _showTranslations() on null in /var/www/dokuwiki/lib/tpl/dokuwiki/main.php:36 Stack trace: #0 /var/www/dokuwiki/inc/actions.php(27): include() #1 /var/www/dokuwiki/doku.php(120): act_dispatch() #2 {main} thrown in /var/www/dokuwiki/lib/tpl/dokuwiki/main.php on line 36" while reading upstream, client: 192.168.1.4, server: _, request: "GET /doku.php?id=ru:start HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.0-fpm.sock:", host: "192.168.1.2", referrer: "http://192.168.1.2/doku.php?id=ru:start&do=index" ``` How do I install this plugin correctly?
xaozai commented 4 years ago

Oops. I understand the problem. $translation = &plugin_load('syntax','translation');//need to replace "syntax" to "helper"