Repository navigation
Description
Steps to reproduce
1.Create a txt file and remove the .txt suffix
2.Upload that file
2.Modify that file locally
3.Use synchronizing app to sync that file
Expected behaviour
Preview icons should appear in Details->Versions section.
Actual behaviour
Preview icons cannot be loaded.
Server configuration
Operating system:
Ubuntu 16.04
Web server:
Apache 2.4.18
Database:
MySQL 14.14
PHP version:
7.0.15
ownCloud version: (see ownCloud admin page)
10.0.0.12
Updated from an older ownCloud or fresh install:
Updated from 9.1.5
Where did you install ownCloud from:
Ubuntu package
Signing status (ownCloud 9.0 and above):
No errors have been found.
The content of config/config.php:
{
"system": {
"updatechecker": false,
"instanceid": "ocao39aow54w",
"passwordsalt": "***REMOVED SENSITIVE VALUE***",
"secret": "***REMOVED SENSITIVE VALUE***",
"trusted_domains": {
"0": "***REMOVED SENSITIVE VALUE***",
"2": "***REMOVED SENSITIVE VALUE***"
},
"datadirectory": "\/var\/www\/owncloud\/data",
"overwrite.cli.url": "***REMOVED SENSITIVE VALUE***",
"htaccess.RewriteBase": "\/",
"dbtype": "mysql",
"version": "10.0.0.12",
"dbname": "owncloud",
"dbhost": "localhost",
"dbtableprefix": "oc_",
"dbuser": "***REMOVED SENSITIVE VALUE***",
"dbpassword": "***REMOVED SENSITIVE VALUE***",
"logtimezone": "UTC",
"installed": true,
"memcache.local": "\\OC\\Memcache\\Redis",
"redis": {
"host": "localhost",
"port": 6379
},
"memcache.locking": "\\OC\\Memcache\\Redis",
"appstore.experimental.enabled": true,
"skeletondirectory": "",
"trashbin_retention_obligation": "auto, 30",
"loglevel": 2,
"mail_smtpmode": "smtp",
"mail_smtpsecure": "tls",
"mail_from_address": "***REMOVED SENSITIVE VALUE***",
"mail_domain": "***REMOVED SENSITIVE VALUE***",
"mail_smtphost": "***REMOVED SENSITIVE VALUE***",
"mail_smtpport": "587",
"asset-pipeline.enabled": true,
"mail_smtpauthtype": "LOGIN",
"mail_smtpauth": 1,
"mail_smtpname": "***REMOVED SENSITIVE VALUE***",
"mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
"maintenance": false,
"theme": ""
}
}
List of activated apps:
- activity: 2.3.3
- comments: 0.3.0
- configreport: 0.1.1
- dav: 0.2.8
- federatedfilesharing: 0.3.0
- federation: 0.1.0
- files: 1.5.1
- files_antivirus: 0.10.0.0
- files_external: 0.7.0
- files_pdfviewer: 0.8.1
- files_sharing: 0.10.0
- files_texteditor: 2.1
- files_trashbin: 0.9.0
- files_versions: 1.3.0
- files_videoplayer: 0.9.8
- firstrunwizard: 1.1
- gallery: 15.0.0
- market: 0.1.0
- notifications: 0.3.0
- provisioning_api: 0.5.0
- systemtags: 0.3.0
- templateeditor: 0.1
- updatenotification: 0.2.1
Are you using external storage, if yes which one: No
Are you using encryption: no
Are you using an external user-backend, if yes which one: No
Client configuration
Browser:
Chrome 57.0.2987.133 (64-bit)
Operating system:
Mac OS X Sierra
Logs
ownCloud log (data/owncloud.log)
{"reqId":"tlklDN0kUnc9l2h0lGfs","level":3,"time":"2017-04-28T19:41:21+00:00","remoteAddr":"128.62.29.234","user":"josh","app":"PHP","method":"GET","url":"\/apps\/files_versions\/preview?file=%2Fdocs%2FUT%20Austin%2Ftest&version=1493408321","message":"file_get_contents(\/var\/www\/owncloud\/data\/josh\/files\/var\/www\/owncloud\/core\/img\/filetypes\/file.svg): failed to open stream: No such file or directory at \/var\/www\/owncloud\/lib\/private\/Files\/Storage\/Local.php#208"}
{"reqId":"tlklDN0kUnc9l2h0lGfs","level":3,"time":"2017-04-28T19:41:21+00:00","remoteAddr":"128.62.29.234","user":"josh","app":"PHP","method":"GET","url":"\/apps\/files_versions\/preview?file=%2Fdocs%2FUT%20Austin%2Ftest&version=1493408321","message":"imagecreatefromstring(): Empty string or invalid image at \/var\/www\/owncloud\/lib\/private\/legacy\/image.php#572"}
According to the log, It seems that the path to image icon is wrong. The actual path should be "/var/www/owncloud/core/img/filetypes/file.svg" instead of "/var/www/owncloud/data/josh/files/var/www/owncloud/core/img/filetypes/file.svg".
Activity
PVince81 commentedon May 12, 2017
Confirmed on 10.0.0

PVince81 commentedon May 31, 2017
Could not bisect, the merge base is bad too. So this was broken in a 9.1.0 version too and got fixed.
PVince81 commentedon Nov 2, 2017
@yzjJosh any more chance with 10.0.3 ?
DeepDiver1975 commentedon Nov 2, 2017
this issue is related to the fallback handling of preview generation - no idea if this ever worked
core/lib/private/Preview.php
Lines 1177 to 1183 in f10d105
this looks really fishy
DeepDiver1975 commentedon Nov 2, 2017
OMG! This is related to the change where we killed all pngs and have only svgs. OC_Image cannot handle svg.
Don't send back the svg image - fixes #27770
ownclouders commentedon Jan 11, 2018
Hey, this issue has been closed because the label
status/STALEis set and there were no updates for 7 days. Feel free to reopen this issue if you deem it appropriate.(This is an automated comment from GitMate.io.)
lock commentedon Jul 30, 2019
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.