DokuwikiAndroid
DokuwikiAndroid copied to clipboard
Request: Support "summary" and "minor update" parameters for page edits
In PageTextDownUpLoader.java
, assuming I'm reading it correctly, the sendPageText() method seems to be sending the params
to wiki.putPage as "{}"
.
It appears that in recent version of PHP (8.2.1 on my system), this is interpreted as a string rather than an empty array, causing page updates from the app to silently fail (the Dokuwiki error logs record ApiCore.php(524) TypeError: Cannot access offset of type string on string
and the page does not get updated, and edits made in the app are lost and discarded).
In my case I've managed to make things work by editing the dokuwiki source (wrapping the offending lines of ApiCore.php
in an if (isarray($params)){
[...], but I presume if DokuwikiAndroid passed an array(/HashMap?) it would Just Work.
Indeed, with php8 the behavior of args array seems to be different. I've started working on a fix for this, and sending an empty Vector instead of {} is working locally for the putPage command. I'm shortly validating this (I need to ensure this works also for older version of php) to have a first fix available on the app soon.