New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stable10] Opening the trashbin causes errors in log for files without preview #1397

Merged
merged 2 commits into from Sep 13, 2016

Conversation

Projects
None yet
4 participants
@MorrisJobke
Member

MorrisJobke commented Sep 13, 2016

  • put a file without a generated preview in the trashbin
    (e.g. a *.docx file)
  • open the trashbin
  • following errors will show up in the nextcloud.log:
    • filesize(): stat failed for ...
    • fopen(...): failed to open stream: No such file or directory at ...
    • fread() expects parameter 1 to be resource, boolean given at ...
    • fclose() expects parameter 1 to be resource, boolean given at ...
    • imagecreatefromstring(): Empty string or invalid image at ...

This is because the preview code tries to load an SVG image, which
is obviously only text.

The fix simply handles this before the loading happens and the web UI
keeps showing the default mimetype icon.

cc @nickvergessen @rullzer @icewind1991 @LukasReschke @blizzz

@MorrisJobke MorrisJobke added this to the Nextcloud 10.0.1 milestone Sep 13, 2016

@MorrisJobke

This comment has been minimized.

Show comment
Hide comment
@MorrisJobke

MorrisJobke Sep 13, 2016

Member

backport of #1338

Member

MorrisJobke commented Sep 13, 2016

backport of #1338

@nickvergessen

This comment has been minimized.

Show comment
Hide comment
@nickvergessen

nickvergessen Sep 13, 2016

Member

Works, but the log spam was debug only anyway. 👍

Member

nickvergessen commented Sep 13, 2016

Works, but the log spam was debug only anyway. 👍

@rullzer

This comment has been minimized.

Show comment
Hide comment
@rullzer

rullzer Sep 13, 2016

Member

LGTM

Member

rullzer commented Sep 13, 2016

LGTM

@rullzer rullzer added 4. to release and removed 3. to review labels Sep 13, 2016

Opening the trashbin causes errors in log for files without preview
* put a file without a generated preview in the trashbin
  (e.g. a *.docx file)
* open the trashbin
* following errors will show up in the nextcloud.log:
	- filesize(): stat failed for ...
	- fopen(...): failed to open stream: No such file or directory at ...
	- fread() expects parameter 1 to be resource, boolean given at ...
	- fclose() expects parameter 1 to be resource, boolean given at ...
	- imagecreatefromstring(): Empty string or invalid image at ...

This is because the preview code tries to load an SVG image, which
is obviously only text.

The fix simply handles this before the loading happens and the web UI
keeps showing the default mimetype icon.
@MorrisJobke

This comment has been minimized.

Show comment
Hide comment
@MorrisJobke

MorrisJobke Sep 13, 2016

Member

Rebased to send the drone hook again.

Member

MorrisJobke commented Sep 13, 2016

Rebased to send the drone hook again.

@LukasReschke

This comment has been minimized.

Show comment
Hide comment
@LukasReschke
Member

LukasReschke commented Sep 13, 2016

LGTM

@MorrisJobke

This comment has been minimized.

Show comment
Hide comment
@MorrisJobke

MorrisJobke Sep 13, 2016

Member

Restarted drone to fix the mysql race condition.

Member

MorrisJobke commented Sep 13, 2016

Restarted drone to fix the mysql race condition.

@MorrisJobke

This comment has been minimized.

Show comment
Hide comment
@MorrisJobke

MorrisJobke Sep 13, 2016

Member

I added #1400 to this to avoid the mysql race condition

Member

MorrisJobke commented Sep 13, 2016

I added #1400 to this to avoid the mysql race condition

@MorrisJobke MorrisJobke merged commit 1f0bd6f into stable10 Sep 13, 2016

4 checks passed

Scrutinizer 3 new issues, 1 updated code elements
Details
approvals/lgtm this commit looks good
continuous-integration/drone/pr the build was successful
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@MorrisJobke MorrisJobke deleted the stable10-backport-1338 branch Sep 13, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment