Forum archive
PHP Fatal error: Call to undefined method PostInput::filter()
Hi all,
first of all I hope I'm posting in the right section.
I suddenly have an issue with my dokuwiki, more precisely with the media manager and site map. When I try to upload an image via the media manager or even check the already uploaded files via the media manager I receive an HTTP 500 error.
Checking the error.log from apache I found the following line with regard to the error:
[Thu Oct 04 19:16:03.037298 2018] [:error] [pid 1178] [client 10.0.0.65:56828] PHP Fatal error: Call to undefined method PostInput::filter() in /usr/share/dokuwiki/lib/exe/ajax.php on line 18, referer: https://raspberrypi.fritz.box/dokuwiki/doku.php?id=start:manuals&do=medi...
Looking at line 18 in the /usr/share/dokuwiki/lib/exe/ajax.php I found this:
$call = $INPUT->post->filter('utf8_stripspecials')->str('call');
Another thing I recognized is that I'm not able to expand the namespaces in the site map. I get the same error as mentioned above.
Do you guys have any ideas what could be the problem?
Thanks a lot in advance.
Mike
Just did a quick google and found this. It looks like the bug is due to a missing method. FWIW in our v14.x Dokuwiki appliances (based on Debian 8/Jessie), we used the Debian package (as discussed in that thread). For v15.0 (based on Debian 9/Stretch), we install from upstream source (i.e. direct from the developers) as the package didn't make it into Debian Stretch.
From my reading, it appears that that thread includes a number of ways to work around the bug. Either manually editing the specific code, rebuilding from source package (and applying the specified patch), or downloading and installing the third party binary deb file. Unfortunately, it appears that it's still not fixed in the Debian repos. Hopefully a fixed package will be uploaded sometime soon, but as Debian Jessie has now moved to LTS, I'm not sure how long it might take.
I can't vouch for the fix, nor the third party files, but on face value they all appear legit.
Note that under "normal" circumstances, it is not recommended to manually adjust package managed file (e.g. files within the /usr/share path). However, under these circumstance, it is legit. Worst case scenario is that a future update (perhaps a security update which fixes something else, but doesn't include this particular fix) might re-break it.
Please let us know how you go.