When Automatic indexing of file content is active, trying to upload pdf files fails.
The pdf file is still uploaded but the end user is told that upload failed.
Try uploading pdfs in http://nycdwight-11908-6600.show.tikiwiki.org/tiki-upload_file.php?galleryId=4 ! (beware of the 8MB size limit) (verify that Automatic indexing of file content is still active)
They display an error « File upload failed: SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data ».
Only for pdfs.
This is an example return answer to /tiki-ajax_services.php?controller=file&action=upload_multiple :
The issue seems to be one or more invisible BOM (zero-length nonbreaking spaces) character before the json string.
My guess is, this regression is related to our changing the way pdfs are indexed. Since Tiki18, we use a php library bundled with Tiki. Before, we relied on a command line executable. Sadly, reverting to the old way of putting the following in tiki-admin.php?page=fgal#contentfgal_admin-5 does not work:
application/pdf: | pdftotext -enc UTF-8 %1 - |
To help developers solve the bug, we kindly request that you demonstrate your bug on a show2.tiki.org instance. To start, simply select a version and click on "Create show2.tiki.org instance". Once the instance is ready (in a minute or two), as indicated in the status window below, you can then access that instance, login (the initial admin username/password is "admin") and configure the Tiki to demonstrate your bug. Priority will be given to bugs that have been demonstrated on show2.tiki.org.
filename | created | hits | comment | version | filetype | ||
---|---|---|---|---|---|---|---|
No attachments for this item |