?
avatar Kostelano
Kostelano
30 Apr 2021

As in #33449, the error is related to Russian letters, since there is no problem with renaming the file to Latin letters.

Steps to reproduce the issue

Go to the Media manager and try to rename the file using Russian letters, for example, ыыыыыыыы. We already get errors here, but one of them looks strange.

Move file is not possible as destination file already exists.

Screenshot_4

I found out that this error is due to the fact that Joomla "does not understand" Russian letters and tries to rename the file to png without a name.

Then I just copy the test__ыыы.png file to the images folder locally and try to rename it. Joomla gives several error messages, nevertheless renames it to png (no name), thereby deleting MY file.

Screenshot_1

Yes, I remember that it seems in Joomla 3.9.25 there was a change regarding the Russian-language file / directory headers (I could be wrong), but in any case, the current behavior is incorrect and needs to be improved.

avatar Kostelano Kostelano - open - 30 Apr 2021
avatar joomla-cms-bot joomla-cms-bot - change - 30 Apr 2021
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 30 Apr 2021
avatar PhilETaylor
PhilETaylor - comment - 30 Apr 2021

I found out that this error is due to the fact that Joomla "does not understand" Russian letters and tries to rename the file to png without a name.

The "bug" is that you dont have the correct PHP Extensions installed.

If you are going to use non Latin ASCII chars then you need ICONV and INTL PHP Extensions installed.

Without them installed ыыыыыыыы will become "" (Empty string)

With them installed ыыыыыыыы will become yyyyyyyyyy

avatar Kostelano
Kostelano - comment - 30 Apr 2021

How should the most common user understand this if Joomla runs its own processes without reporting anything?

I am not saying that this is a direct bug bug bug.

avatar PhilETaylor
PhilETaylor - comment - 30 Apr 2021

I guess by better feedback like #33451 however your example of "ыыыыыыыыaaaaaa" would be made safe (without transliterating) as "aaaaaa" so the file should rename to "aaaaaa" unless that file already exists.

avatar Kostelano
Kostelano - comment - 30 Apr 2021

I also think that a similar message will be enough. In any case, the most ordinary user will understand what Joomla wants from him :)

avatar PhilETaylor
PhilETaylor - comment - 30 Apr 2021

The problem is that, I cannot show you a new message about the missing extensions, because the File::makeSafe is actually working as expected and still returns a valid string of aaaaaaaa...

I guess we could (find a way to) change the current messages to give you the name of the destination file, then when you see aaaaaaaa.png you might go "ohhhhh, russian chars are missing, I need php extensions!

avatar brianteeman
brianteeman - comment - 30 Apr 2021

try with a filename that is just russian СМИ.jpg

avatar PhilETaylor
PhilETaylor - comment - 30 Apr 2021

With all Russian chars, and without transliterating I get a destination path of /application/images//png and I can report that like the folder creation issue

But with a mix of a-z and Russian МИabc.png source, the destination path is /application/images//abc.png

The // is another bug Im fixing now.

avatar PhilETaylor
PhilETaylor - comment - 30 Apr 2021

PR #33454 which fixes/addresses the // and the all use of Russian chars

avatar alikon alikon - change - 1 May 2021
Status New Closed
Closed_Date 0000-00-00 00:00:00 2021-05-01 05:47:27
Closed_By alikon
avatar alikon alikon - close - 1 May 2021
avatar alikon
alikon - comment - 1 May 2021

please test #33454

Add a Comment

Login with GitHub to post a comment