Make WordPress Core

Opened 6 years ago

Closed 5 years ago

#11887 closed defect (bug) (fixed)

Thumbnail filename is damaged

Reported by: pavelevap Owned by:
Milestone: 3.1 Priority: high
Severity: normal Version: 2.9.1
Component: Media Keywords: has-patch
Focuses: Cc:

Description (last modified by scribu)

Probaly partially related to my previous ticket #10252

When you upload attached picture with name "Šířky-strojů-Platz-Max-NLK", thumbnail filename is cut to only "ky-strojů-Platz-Max-NLK" and is not shown in Media library.

Using 2.9.1, Czech version.

Attachments (3)

Šířky-strojů-Platz-Max-NLK.jpg (5.8 KB) - added by pavelevap 6 years ago.
bmb_0007_t11887.patch (542 bytes) - added by bumbu 6 years ago.
bmb_0008_t11887.patch (2.2 KB) - added by bumbu 6 years ago.
this is full patch

Download all attachments as: .zip

Change History (13)

#1 @pavelevap
6 years ago

  • Cc pavelevap@… added

#2 @bumbu
6 years ago

  • Cc bmbalex@… added
  • Keywords has-patch added

problem is in function basename()
if first letter of filename is non latin, then function will not take in account those letters till it will get latin symbol.

in patch after each slash is added one letter, and after getting name of file, this name letter is erased.

but I am not sure about universal use of this function, it may not work on windows because of slash.

also in DB in table wp_postmeta the name of thumbnail is bad, but it still work ok, I just can't find where to change title which goes to DB.

6 years ago

this is full patch

#3 @bumbu
6 years ago

ok, now I added around php function 'basename' adding letter 'a' after each slash and backslash, with furtherer first 'a' letter deleting

Maybe it is good idea to have special global function which will replace 'basename' function because this function will have problems till php6

#4 @nacin
6 years ago

  • Milestone changed from 2.9.3 to 3.1

#5 @pavelevap
6 years ago

Delayed? It is really serious problem for our language :-( There are many users asking why they can not see thumbnails of uploaded pictures in Media Library...

#6 @nacin
5 years ago

  • Cc scribu@… added
  • Milestone changed from Awaiting Triage to 3.1
[2006-05-01 22:55 UTC] you have to wait PHP6, it will address this problems.

Hooray for fast development cycles.

So... scribu introduced a friendly basename() in [15923]. Maybe we can use it here.

#7 @scribu
5 years ago

  • Description modified (diff)

#8 @scribu
5 years ago

(In [16154]) Introduce wp_basename() and use it for media handling. See #11887

#9 @scribu
5 years ago

(In [16155]) Use wp_basename() in WP_Query too. See #11887

#10 @scribu
5 years ago

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.