WordPress.org

Make WordPress Core

Opened 4 years ago

Last modified 3 years ago

#11887 closed defect (bug)

Thumbnail filename is damaged — at Version 7

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.

Change History (10)

comment:1 pavelevap4 years ago

  • Cc pavelevap@… added

bumbu4 years ago

comment:2 bumbu4 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.

bumbu4 years ago

this is full patch

comment:3 bumbu4 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

comment:4 nacin4 years ago

  • Milestone changed from 2.9.3 to 3.1

comment:5 pavelevap4 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...

comment:6 nacin3 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.

comment:7 scribu3 years ago

  • Description modified (diff)
Note: See TracTickets for help on using tickets.