DRINGOT / dokuwiki-plugin-survey

Dokuwiki Survey Plugin
http://www.dokuwiki.org/plugin:survey
2 stars 1 forks source link

cannot make survey work #18

Open fromero1 opened 3 years ago

fromero1 commented 3 years ago

Hi, I can install the survey plugin using the GUI (extension manager) without any problem. But when I create a page with the survey it doesn't work. It doesn't render anything. I have read the note about the inlcude plugin, but I don't have it installed. I have copied the example:

* What's the species? * Human * Animal * Has it claws? * Yes * No * Is it big? * Yes * It's an [[http://en.wikipedia.org/wiki/Elephant|Elephant]]! * No * Plant

Can you help, please? I don't know what to do. I have try in a another dokuwiki of a friend of mine with the same result.

DokuWiki version: Release 2020-07-29 "Hogfather" PHP version 7.4.3

the permissions seem ok, the survey directory belong to www-data as the rest of the plugins

root@wiki:/var/www/html/dokuwiki/lib/plugins# ls -l survey total 32 drwxr-xr-x 2 www-data www-data 4096 Jun 30 20:01 helper drwxr-xr-x 17 www-data www-data 4096 Jun 30 20:01 lang -rw-r--r-- 1 www-data www-data 121 Jun 30 20:01 manager.dat -rw-r--r-- 1 www-data www-data 247 Jun 23 11:57 plugin.info.txt -rw-r--r-- 1 www-data www-data 1251 Jun 23 11:57 README.md -rw-r--r-- 1 www-data www-data 2658 Jun 23 11:57 script.js -rw-r--r-- 1 www-data www-data 1253 Jun 23 11:57 style.css drwxr-xr-x 2 www-data www-data 4096 Jun 30 20:01 syntax

List of plugins installed

root@wiki:/var/www/html/dokuwiki# ./bin/plugin.php extension list acl b 2015-07-25 ACL Manager by Andreas Gohr
authad bd 2015-07-13 Active Directory Auth Plugin by Andreas Gohr
authldap bd 2015-07-13 LDAP Auth Plugin by Andreas Gohr
authpdo bd 2016-08-20 authpdo plugin by Andreas Gohr
authplain b 2015-07-18 Plain Auth Plugin by Andreas Gohr
config b 2015-07-18 Configuration Manager by Christopher Smith
dw2pdf i 2021-02-07 Dw2Pdf plugin by Andreas Gohr and Luigi Micco
extension b 2015-07-26 Extension Manager by Michael Hamann
indexmenu i 2020-07-31 Indexmenu Plugin by Samuele Tognini
info b 2020-06-04 Info Plugin by Andreas Gohr
navi i 2021-02-16 Navigation Plugin by Andreas Gohr
orphanswanted i 2017-06-25 orphanswanted plugin by Doug Edmunds, Cyrille37, Federico Ariel Castagnini, Andy Webber, Matthias Schulte
popularity bd 2015-07-15 Popularity Feedback Plugin by Andreas Gohr
revert b 2015-07-15 Revert Manager by Andreas Gohr
safefnrecode b 2012-07-28 safefnrecode plugin by Andreas Gohr
smtp i 2020-11-21 smtp plugin by Andreas Gohr
styling b 2020-06-14 styling plugin by Andreas Gohr
survey i 2021-06-23 survey plugin by Donovan Ringot
template:ad-hominem id 2021-06-14 Ad Hominem by Sascha Leib
template:dokuwiki b 2015-07-26 DokuWiki Template by Anika Henke
translation i 2020-03-24 Translation Plugin by Andreas Gohr
upgrade i 2021-05-19 DokuWiki Upgrade Plugin by Andreas Gohr
usermanager b 2015-07-15 User Manager by Chris Smith
wrap i 2018-04-22 Wrap Plugin by Anika Henke

Thanks BR Francisco

fromero1 commented 3 years ago

I found the problem, it is in the file dokuwiki/var/lib/plugins/survey/syntax.php public function render($format, Doku_Renderer $renderer, $data) { if ($mode != "xhtml") { return false; }

The bold variable mode should be format as in the render($format,......)

Correct: public function render($format, Doku_Renderer $renderer, $data) { if ($format != "xhtml") { return false; }