|
PKP Bugzilla – Full Text Bug Listing |
| Summary: | Galleys uploaded in Firefox not indexed for search | ||
|---|---|---|---|
| Product: | OCS | Reporter: | Michael Felczak <michael.pkp> |
| Component: | General | Assignee: | Michael Felczak <michael.pkp> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | alec, pkp-support |
| Priority: | P3 | ||
| Version: | 2.3.4 | ||
| Hardware: | All | ||
| OS: | All | ||
| Version Reported In: | 2.3.3 | Also Affects: | OHS 2.3.2, OJS 2.3.7 |
| Attachments: |
Patch against OCS 2.3.3-1
Patch against OJS 2.3.6 OCS MySQL database update OCS PostgreSQL database update OJS MySQL database update OJS PostgreSQL database update |
||
|
Description
Michael Felczak
2011-09-07 11:45:28 PDT
Created attachment 3633 [details]
Patch against OCS 2.3.3-1
PDF galleys not indexed for search https://github.com/pkp/ocs/commit/1bae4b11b82ec2983fba3ee4dd6610da773f9232 PDF galleys not indexed for search https://github.com/pkp/ocs/commit/ee865293da3790e14ca773e8bf30a6bb9adc62e4 Looking into this a bit more it appears to be a browser issue.
Firefox (OSX, 5.0) reports the file type as application/download whereas other browsers correctly identify the file as application/pdf
We really shouldn't rely on the browser for this info, i.e.
$_FILES['userfile']['type']
The mime type of the file, if the browser provided this information. An example would be "image/gif". This mime type is however not checked on the PHP side and therefore don't take its value for granted.
This should be fixed in all apps to use mime_content_type on the server.
This problem applies to other versions of Firefox on other platforms as well: https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/84880 http://forums.mozillazine.org/viewtopic.php?f=9&t=2241011 Good explanation of the issue: http://techblog.procurios.nl/k/n618/news/view/15872/14863/Mimetype-corruption-in-Firefox.html Looking at some real world data, this issue also applies to MS Word and PowerPoint galleys. Rather than application/msword and application/vnd.ms-powerpoint these are sometimes saved as application/octet-stream and will not be indexed. Need to manually fix these to the correct mime types. .docx should be saved as application/vnd.openxmlformats-officedocument.wordprocessingml.document This apparently supersedes application/msword Need to manually fix: * doc: application/msword * ppt: application/vnd.ms-powerpoint * pps: application/vnd.ms-powerpoint * docx: application/vnd.openxmlformats-officedocument.wordprocessingml.document * pptx: application/vnd.openxmlformats-officedocument.presentationml.presentation * ppsx: application/vnd.openxmlformats-officedocument.presentationml.slideshow Galleys uploaded in Firefox not indexed for search https://github.com/pkp/ocs/commit/74879827587d508675503d3079db739f1c24d203 Galleys uploaded in Firefox not indexed for search https://github.com/pkp/pkp-lib/commit/a8fbae1cabc6251069bc1e5792e9bf465aee09a6 Port to OCS master. Check and port as needed to OJS, OMP, and OHS. PDF galleys not indexed for search https://github.com/pkp/ocs/commit/baf880c2057c1aac43f66f19fc4f610009c5b316 Galleys uploaded in Firefox not indexed for search https://github.com/pkp/ojs/commit/7178b64b1aec39dcc94918ecd379ee9fe7f9c3de Galleys uploaded in Firefox not indexed for search https://github.com/pkp/ojs/commit/e24789a97ffb52f9a8d0939b7a455689dd7afa0f Don't rely on Firefox mimetype for uploaded files https://github.com/pkp/pkp-lib/commit/753aaf9ddc961cd78b92c6b5cd2768778cf582a5 Ported to OCS master, OJS, and OHS. OMP not affected. Created attachment 3657 [details]
Patch against OJS 2.3.6
Patch should also apply cleanly to older versions of OJS 2.3.x
Created attachment 3658 [details]
OCS MySQL database update
Created attachment 3659 [details]
OCS PostgreSQL database update
Created attachment 3660 [details]
OJS MySQL database update
Created attachment 3661 [details]
OJS PostgreSQL database update
The fix, database update, and search index rebuild will automatically be executed as part of the OCS 2.3.4 upgrade. To manually fix on OCS 2.3.3-1 or older: 1) Apply the patch to your OCS install 2) Manually execute the database update statements 3) Rebuild your paper search index, i.e. php tools/rebuildSearchIndex.php The fix, database update, and search index rebuild will automatically be executed as part of the OJS 2.3.7 upgrade. To manually fix on OCS 2.3.6 or older: 1) Apply the patch to your OCS install 2) Manually execute the database update statements 3) Rebuild your article search index, i.e. php tools/rebuildSearchIndex.php (In reply to comment #23) > To manually fix on OCS 2.3.6 or older: This should read "OJS 2.3.6 or older" This was already fixed. |