Opened 3 years ago

Closed 3 years ago

#11887 closed defect (bug) (fixed)

Thumbnail filename is damaged

Reported by: pavelevap Owned by:
Priority: high Milestone: 3.1
Component: Media Version: 2.9.1
Severity: normal Keywords: has-patch
Cc: pavelevap@…, bmbalex@…, scribu@…

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 3 years ago.
bmb_0007_t11887.patch (542 bytes) - added by bumbu 3 years ago.
bmb_0008_t11887.patch (2.2 KB) - added by bumbu 3 years ago.
this is full patch

Download all attachments as: .zip

Change History (13)

  • Cc pavelevap@… added

bumbu3 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.
http://bugs.php.net/bug.php?id=37268

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.

bumbu3 years ago

this is full patch

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

  • Milestone changed from 2.9.3 to 3.1

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...

  • 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.

  • Description modified (diff)

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

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

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