[wp-trac] [WordPress Trac] #37989: Unexpected change to media title behavior in WP 4.6.1

WordPress Trac noreply at wordpress.org
Tue Sep 27 03:58:42 UTC 2016


#37989: Unexpected change to media title behavior in WP 4.6.1
---------------------------------------------+------------------------
 Reporter:  arhenderson63                    |       Owner:  joemcgill
     Type:  defect (bug)                     |      Status:  reopened
 Priority:  normal                           |   Milestone:  4.6.2
Component:  Media                            |     Version:  4.6.1
 Severity:  major                            |  Resolution:
 Keywords:  has-patch has-unit-tests commit  |     Focuses:
---------------------------------------------+------------------------

Comment (by Coptic-Treasures):

 @SergeyBiryukov :
 Thanks a lot for the detailed reply.
 Sorry I am new to the system. Does your reply means that I need to provide
 more testing, or this issue will be looked after by the Wordpress team?
 Thanks.
 .
 Replying to [comment:44 SergeyBiryukov]:
 > Finally got a chance to look at this ticket again.
 >
 > For the 4.6 branch, [38615] is enough, no additional fixes needed.
 (However, I think the issue is important enough to backport [38615] to
 other affected branches listed in comment:3, since media management is
 essentially broken for non-ASCII locales.)
 >
 > For the 4.7 branch, it's a bit more complicated. The issue with
 `pathinfo()` is that it depends on PHP locale and does not always work
 correctly with UTF-8 characters, leading to an issue with truncated titles
 mentioned in comment:40.
 >
 > We've encountered similar issues with `basename()` before, see #21217
 and #23267.
 >
 > [attachment:37989.4.diff] uses `wp_basename()`, which is the i18n-
 friendly version of `basename()`, designed to work correctly with
 multibyte file names.
 >
 > I've also updated my workaround in comment:11 to use the same solution.
 (It should work in 3.9.14+, as the `wp_insert_attachment_data` filter does
 not exist in 3.7.x or 3.8.x).

--
Ticket URL: <https://core.trac.wordpress.org/ticket/37989#comment:45>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list