Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#29245 closed defect (bug) (fixed)

Media Grid: .tiff files uploaded through uploader encounter an error

Reported by: doomwaxer's profile doomwaxer Owned by: wonderboymusic's profile wonderboymusic
Milestone: 4.0 Priority: normal
Severity: normal Version: 4.0
Component: Media Keywords: has-patch
Focuses: javascript, administration Cc:

Description

When uploading a .tiff file using the new tile library media uploader, the file appears as a broken image. Additionally, when selecting the file the modal editing window does not appear. You can navigate to the file by selecting a previous item using arrows to get to the .tiff, however the .tiff's edit page is blank.

Attachments (2)

29245.patch (775 bytes) - added by ocean90 10 years ago.
29245.2.patch (1.5 KB) - added by ocean90 10 years ago.

Download all attachments as: .zip

Change History (6)

#1 @ocean90
10 years ago

  • Focuses javascript added
  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to 4.0
  • Summary changed from .tiff files uploaded through the tile library media uploader encounter an error to Media Grid: .tiff files uploaded through uploader encounter an error

Thanks for the report.

Rendering a .tiff image depends on the browser, AFAIK only Safari does this.
That the modal does not open is indeed an error. From the JS console: "Uncaught TypeError: Cannot read property 'full' of undefined".

@ocean90
10 years ago

@ocean90
10 years ago

#2 @ocean90
10 years ago

  • Keywords has-patch added; needs-patch removed

29245.patch checks if the property exists and fixes the JS error from above.

29245.2.patch checks additonally for data.sizes: This property isn't set when WordPress couldn't generate any metadata for the image. In this case this is true, the default icon is shown: https://cloudup.com/cWgSi1xBFoy

.2 is probably out of the scope, because it's not a regression.

Last edited 10 years ago by ocean90 (previous) (diff)

#3 @adamsilverstein
10 years ago

this fixes the console error, and the default icon looks good in the grid.

i do see an error when going in to 'Edit Image': Image data does not exist. Please re-upload the image. (http://cl.ly/image/1Q0l0y3e1S0L)

Since we can't edit .tif files, lets hide the Edit Image button.

#4 @wonderboymusic
10 years ago

  • Owner set to wonderboymusic
  • Resolution set to fixed
  • Status changed from new to closed

In 29528:

Media Grid: don't try to display images that don't have data.sizes set. Also, don't show the "Edit Image" button.

Props ocean90.
Fixes #29245.

Note: See TracTickets for help on using tickets.