Skip to content

File version preview icon not showing up after upgrading from 9.1.5 to 10.0.0 #27770

Closed

Description

@yzjJosh

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

  1. PVince81 commented on May 12, 2017

    @PVince81
    Contributor

    Confirmed on 10.0.0
    file-noext-broken

  2. added this to the triage milestone on May 12, 2017
  3. PVince81 commented on May 31, 2017

    @PVince81
    Contributor

    Could not bisect, the merge base is bad too. So this was broken in a 9.1.0 version too and got fixed.

    The merge base e668cf1a33c93b75a2f64231f58a212fbda42009 is bad.
    This means the bug has been fixed between e668cf1a33c93b75a2f64231f58a212fbda42009 and [b642b26f7229c99b33e49cde86b38fdc6e8e5f21].
    
  4. modified the milestones: development, on Sep 18, 2017
  5. PVince81 commented on Nov 2, 2017

    @PVince81
    Contributor

    @yzjJosh any more chance with 10.0.3 ?

  6. modified the milestones: development, triage on Nov 2, 2017
  7. DeepDiver1975 commented on Nov 2, 2017

    @DeepDiver1975
    Contributor

    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

    $mimeIconWebPath = \OC::$server->getMimeTypeDetector()->mimeTypeIcon($this->mimeType);
    if (empty(\OC::$WEBROOT)) {
    $mimeIconServerPath = \OC::$SERVERROOT . $mimeIconWebPath;
    } else {
    $mimeIconServerPath = str_replace(\OC::$WEBROOT, \OC::$SERVERROOT, $mimeIconWebPath);
    }
    $image->loadFromFile($mimeIconServerPath);

    this looks really fishy

  8. DeepDiver1975 commented on Nov 2, 2017

    @DeepDiver1975
    Contributor

    OMG! This is related to the change where we killed all pngs and have only svgs. OC_Image cannot handle svg.

  9. added a commit that references this issue on Nov 2, 2017
    e70008c
  10. ownclouders commented on Jan 11, 2018

    @ownclouders
    Contributor

    Hey, this issue has been closed because the label status/STALE is 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.)

  11. removed this from the triage milestone on Apr 10, 2018
  12. lock commented on Jul 30, 2019

    @lock

    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.

  13. locked as resolved and limited conversation to collaborators on Jul 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions