Keyword

[SOLVED] Stop renaming of attached files with Greek characters

  • Greg
  • Greg's Avatar Topic Author
  • Offline
  • Junior Member
More
6 years 1 month ago #166530 by Greg
Hi, I would like to ask if anyone has reported problems with filenames that contain different to English characters. In my case the problem is spotted when in K2 items I upload (attach) files with names that contain Greek characters. Then, once the K2 item is saved the filename is converted to something else. Does anyone know how to fix this?

Thank you in advance for any assistance!

Please Log in or Create an account to join the conversation.

More
6 years 1 month ago #166537 by JoomlaWorks
Example?

Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • Greg
  • Greg's Avatar Topic Author
  • Offline
  • Junior Member
More
6 years 1 month ago #166559 by Greg
Thanks for the reply. For example, when I upload the file "1aΑΝΑΚΟΙΝΩΣΗa1.pdf", which the filename contains greek, latin and numeric characters as depicted in Fig. 1, then once the K2 item is saved the filename is converted to "1aYYYYYYYYYYa1.pdf" (Fig.2). How I can preserve the original filename? I have already tried some suggestions with no luck, e.g. settig $this->file_auto_rename = false; from class.upload.php.


Attachments:

Please Log in or Create an account to join the conversation.

More
6 years 1 month ago #166570 by JoomlaWorks
This is an unfortunate side effect of the upgrade to the "upload" class we have been using for years in K2.

The built-in filters in that PHP class did not properly handle all unicode characters, including K2.

I have fixed the issue in this commit on GitHub: github.com/getk2/k2/commit/2737316fc7769ce7597a43b15a7befab7ba919ae

And if you wish to patch your site, simply grab v2.8.1 [dev] from: github.com/getk2/k2/archive/master.zip

...and just install on top of 2.8.0.

Good catch ;)

Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

More
6 years 1 month ago #166572 by JoomlaWorks
To address this issue for everyone, we'll be issuing v2.8.1 of K2 next week.

Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • Greg
  • Greg's Avatar Topic Author
  • Offline
  • Junior Member
More
6 years 1 month ago #166591 by Greg
Thank you very much! Professional support as always!

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum