I'm trying to get an action script to run in bureaucracy and am having problems with both bureaucracy and debugging.
I copied the example from
https://www.dokuwiki.org/plugin:bureaucracy#script_mode and put it in
/var/www/html/dokuwiki/conf/plugin/bureaucracy/example.php. Mode is 750, owner apache:apache, SELinux is Permissive.
I then added the example lines into my playground. I see the box containing the textbox and the submission button. When I write something and press the button I get a partial screen (Welcome notice and "you are here" line) but nothing else.
I have tried the following:
* Adding
~~NOCACHE~~ to the page
* Turned on ALLOWDEBUG in the configuration manager
* Tried
&do=debug[/m] and [m]&httpdebug on the URL
I see nothing in the cache directory (or indeed anywhere else in the DW tree) resembling a debug log. In the third case above I see lots of debugging information (but no error statement) displayed on the screen, not what I was expecting but probably correct.
I then turned to DW's accounting/audit log, but there was nothing of relevance. Going to
/var/log/httpd the access log has:
and the error log has:
[Sun Mar 15 15:09:00.592196 2020] [:error] [pid 31360] [client ::1:60242] PHP Parse error: syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in /var/www/html/dokuwiki/lib/plugins/bureaucracy/helper/actionscript.php on line 45, referer:
http://localhost/dokuwiki/doku.php?id=playground:playground
I looked at line 45 of
/var/www/html/dokuwiki/lib/plugins/bureaucracy/helper/actionscript.php and it contains
if (!is_a($handler, dokuwiki\plugin\bureaucracy\interfaces\bureaucracy_handler_interface::class)) {
so the error report makes some sense.
To sum up:
1) Is there a bug in bureaucracy that is stopping it from handling action scripts?
2) Is the documented example at fault?
3) How on earth do you get DW to give meaningful debug messages/log entries?
Thanks.