WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

#40565 closed defect (bug) (worksforme)

SVG uploads broken in 4.6.5

Reported by: homncruse Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.6.4
Component: Upload Keywords: close
Focuses: Cc:

Description

(4.6.5 was not an option in the dropdown box -- admin, please reclassify)

I am unable to upload SVG files in WordPress 4.6.5, despite explicitly allowing them in my theme as follows:

<?php
function add_svg_to_upload_mimes( $upload_mimes ) {
  $upload_mimes['svg'] = 'image/svg+xml';
  $upload_mimes['svgz'] = 'image/svg+xml';
  return $upload_mimes;
}
add_filter( 'upload_mimes', 'add_svg_to_upload_mimes', 10, 1 );

This bug seems to be identical to #39552 and fixed in r40124 (bug introduced to trunk in r39831, merged into 4.6 branch in r39833) for the 4.7 branch, but the fix was not backported to the 4.6 branch.

Change History (4)

#1 follow-up: @antpb
4 years ago

  • Keywords reporter-feedback added
  • Milestone changed from Awaiting Review to Future Release

Hi @homncruse !

is this still happening? I compared with the latest branch 4.6 and am seeing the changes from r40124 matching : https://core.trac.wordpress.org/browser/branches/4.6/src/wp-includes/functions.php

When I get some time I'll do some tests and see.

#2 in reply to: ↑ 1 @homncruse
4 years ago

I am no longer running 4.6, so I cannot confirm.

Replying to antpb:

Hi @homncruse !

is this still happening? I compared with the latest branch 4.6 and am seeing the changes from r40124 matching : https://core.trac.wordpress.org/browser/branches/4.6/src/wp-includes/functions.php

When I get some time I'll do some tests and see.

#3 @antpb
4 years ago

  • Keywords close added; reporter-feedback removed

I'll go ahead and close this out then. It seems to be good on 4.6 from my comparisons.

#4 @antpb
4 years ago

  • Milestone Future Release deleted
  • Resolution set to worksforme
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.