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

Forum: 
Jeremy Davis's picture

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.

Jeremy, I really don't know what I did wrong while searching the web for hours but I wasn't able to find what you did quickly...

I just followed the instruction in your link and installed a fixed deb-file from the mentioned site. And wow, what should I say: the media manager and the sitemap in my dokuwiki is working like a charm again!

So Jeremy, thank you very very much for your fast and excellent support, great work!

Best regards,

Mike

Jeremy Davis's picture

Really glad to hear that I could steer you in the right direction. Thanks for confirming that that did the trick.

TBH I'm not really sure what to say re you not finding that and me finding it fairly quickly, other than to note that my google-fu is pretty good! :)

FYI IIRC I just googled the error message "PHP Fatal error: Call to undefined method PostInput::filter() in /usr/share/dokuwiki/lib/exe/ajax.php on line 18". Out of interest, I just did that again and the Debian bug was the second result (the first was your post on the Dokuwiki forums and the third was your thread here).

Perhaps Google's AI has got to know me and the sort of things that I'm looking for and it gave ma helping hand?

Add new comment