Loading...
 

uploading pdfs in file galleries fails when automatic indexing of file content is active

Status
Open
Subject
uploading pdfs in file galleries fails when automatic indexing of file content is active
Version
18.x Regression
Category
  • Bug
Feature
File Gallery (elFinder or standard UI)
Search
Resolution status
New
Submitted by
Jean-Marc Libs
Lastmod by
Jean-Marc Libs
Rating
(1)
Description

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 :

<feff>{"files":{%22size%22:15295,%22name%22:%22document_BBB_02_argentine.pdf%22,%22type%22:%22application\/pdf%22,%22fileId%22:%225788%22,%22galleryId%22:%22137%22,%22md5sum%22:%227a035db1d92779f8dcdefe083b292d94%22,%22info%22:{%22fileId%22:%225788%22,%22galleryId%22:%22137%22,%22name%22:%22Document BBB 02 Argentine%22,%22description%22:%22%22,%22created%22:%221554159196%22,%22filename%22:%22document_BBB_02_argentine.pdf%22,%22filesize%22:%2215295%22,%22filetype%22:%22application\/pdf%22,%22data%22:null,%22user%22:%22Jyhem%22,%22author%22:%22%22,%22hits%22:%220%22,%22maxhits%22:null,%22lastDownload%22:null,%22votes%22:null,%22points%22:null,%22path%22:%2290792de52961c34118f976ebe4af3a75%22,%22reference_url%22:null,%22is_reference%22:null,%22hash%22:%227a035db1d92779f8dcdefe083b292d94%22,%22search_data%22:%22\n%22,%22metadata%22:%22%22,%22lastModif%22:%221554159196%22,%22lastModifUser%22:%22Jyhem%22,%22lockedby%22:%22%22,%22comment%22:%22%22,%22archiveId%22:%220%22,%22deleteAfter%22:null},%22syntax%22:%22^File is not an image.^%22},{%22size%22:15741,%22name%22:%22document_BBB_01_bresil.pdf%22,%22type%22:%22application\/pdf%22,%22fileId%22:%225789%22,%22galleryId%22:%22137%22,%22md5sum%22:%2250d71753a6487af8c023f28d8df58d24%22,%22info%22:{%22fileId%22:%225789%22,%22galleryId%22:%22137%22,%22name%22:%22Document BBB 01 Bresil%22,%22description%22:%22%22,%22created%22:%221554159196%22,%22filename%22:%22document_BBB_01_bresil.pdf%22,%22filesize%22:%2215741%22,%22filetype%22:%22application\/pdf%22,%22data%22:null,%22user%22:%22Jyhem%22,%22author%22:%22%22,%22hits%22:%220%22,%22maxhits%22:null,%22lastDownload%22:null,%22votes%22:null,%22points%22:null,%22path%22:%22c84d5b2eb5e278b26a0d60ab7bc4c606%22,%22reference_url%22:null,%22is_reference%22:null,%22hash%22:%2250d71753a6487af8c023f28d8df58d24%22,%22search_data%22:%22\n%22,%22metadata%22:%22%22,%22lastModif%22:%221554159196%22,%22lastModifUser%22:%22Jyhem%22,%22lockedby%22:%22%22,%22comment%22:%22%22,%22archiveId%22:%220%22,%22deleteAfter%22:null},%22syntax%22:%22^File is not an image.^%22}}


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 -



Importance
8
Easy to solve?
5
Priority
40
Demonstrate Bug
Please demonstrate your bug on show2.tikiwiki.org

 About show2.tikiwiki.org

To help developers solve the bug, we kindly request that you demonstrate your bug on a show2.tikiwiki.org instance. To start, simply select a version and click on "Create show2.tikiwiki.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.tikiwiki.org.

Version: Create show2.tikiwiki.org instance
Ticket ID
7074
Created
Wednesday 08 May, 2019 17:58:31 GMT-0000
LastModif
Friday 31 May, 2019 10:32:51 GMT-0000

Attachments

 filenamecreatedhitscommentversionfiletype 
No attachments for this item


Keywords

The following is a list of keywords that should serve as hubs for navigation within the Tiki development and should correspond to documentation keywords.

Each feature in Tiki has a wiki page which regroups all the bugs, requests for enhancements, etc. It is somewhat a form of wiki-based project management. You can also express your interest in a feature by adding it to your profile. You can also try out the Dynamic filter.

Accessibility (WAI & 508)
Accounting
Administration
Ajax
Articles & Submissions
Backlinks
Banner
Batch
BigBlueButton audio/video/chat/screensharing
Blog
Bookmark
Browser Compatibility
Calendar
Category
Chat
Comment
Communication Center
Consistency
Contacts Address book
Contact us
Content template
Contribution
Cookie
Copyright
Credits
Custom Home (and Group Home Page)
Database MySQL - MyISAM
Database MySQL - InnoDB
Date and Time
Debugger Console
Directory (of hyperlinks)
Documentation link from Tiki to doc.tiki.org (Help System)
Docs
DogFood
Draw
Dynamic Content
Preferences
Dynamic Variable
External Authentication
FAQ
Featured links
Feeds (RSS)
File Gallery
Forum
Friendship Network (Community)
Group
Help
History
Hotword
HTML Page
i18n (Multilingual, l10n, Babelfish)
Image Gallery
Import-Export
Install
Integrator
Interoperability
Inter-User Messages
InterTiki
jQuery
Kaltura video management
Karma
Live Support
Logs (system & action)
Lost edit protection
Mail-in
Map
Menu
Meta Tag
Missing features
Visual Mapping
Mobile
Mods
Modules
MultiTiki
MyTiki
Newsletter
Notepad
OS independence (Non-Linux, Windows/IIS, Mac, BSD)
Organic Groups (Self-managed Teams)
Packages
Payment
PDF
Performance Speed / Load / Compression / Cache
Permission
Poll
Profiles
Quiz
Rating
Realname
Report
Revision Approval
Scheduler
Score
Search engine optimization (SEO)
Search
Security
Semantic links
Share
Shopping Cart
Shoutbox
Site Identity
Slideshow
Smarty Template
Social Networking
Spam protection (Anti-bot CATPCHA)
Spellcheck
Spreadsheet
Staging and Approval
Stats
Survey
Syntax Highlighter (Codemirror)
Tablesorter
Tags
Task
Tell a Friend, alert + Social Bookmarking
Terms and Conditions
Theme
TikiTests
Timesheet
Token Access
Toolbar (Quicktags)
Tours
Trackers
TRIM
User Administration
User Files
User Menu
Watch
Webmail and Groupmail
WebServices
Wiki History, page rename, etc
Wiki plugins extends basic syntax
Wiki syntax text area, parser, etc
Wiki structure (book and table of content)
Workspace and perspectives
WYSIWTSN
WYSIWYCA
WYSIWYG
XMLRPC
XMPP




Useful Tools