ChronoEngine.com homepage

Forums

Please write a review for the extension you are using on the Joomla extensions directory before posting a new question as we are being spammed by many negative reviews.

Thank you for your support!

Corrupts file name

Hugamur 01 Feb, 2018
Hello.

In the ChronoForms I use a multi-file upload.
When the file name in English language is no problem.
But if the file name is in Russian language then the first word in the file name disappears.

Look at this problem on Debugger screenshot.


File name provider I use {var:upload4.file.name}.{var:upload4.file.extension}


Sorry for my bad english

corrupts_file_name.png
Max_admin 11 Feb, 2018
Hi Hugamur,

I checked the code and there is a PHP function will work correctly with the file name only if your server has the Russian locale installed/enabled.

You may also try to find the file name in the data array, where is the rest of the debug ?

Best regards
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
Hugamur 12 Feb, 2018
My server is located in Russia. The server uses PHP version 7.0
Link to my form is here. Debugger is on.

Full debug log.
[pre]Array
(
[view] => form
[chronoform] => internet_priemnaya_v2
[event] => submit
[Obrashhaetes_kak] => Fiz_Lico
[Familiya] => test
[Imya] => test
[Otchestvo] => test
[Nazvanie_organizacii] =>
[Kontaktnyj_telefon] => +1(111)111-1111
[E-mail] => test@test.ru
[Pochtovyj_adress] => test
[Tekst_obrashheniya] => test
[Otvet_poluchit] => pochtoviy-adress
[file19] => Array
(
[0] => экрана от 2017-09-07 17-26-14.png
)

[Soglasen_na_obrabotku_personalnyh_dannyh] => да
[g-recaptcha-response] => 03AA7ASh0epS8VNsjQZv-11zG_Slyt-lQxndqYPBbgIp65Zmbs7Sysgqxc3IRA4wC1XSQE2e1zLaJjtnXTBvLgj_dBkLFgmb0ciSjjjjV2p_YC66XC18xXwAFpB2GOxB582SkNeOufbNJL2NtaNhosydlfpf5noLE-YKo99UzqVjaZuSuWeexfGktUSljO5ItISFsfWaFNQRUhmH51RUj74BUVik3mtunBwItolSU7z-hWMNydfa22SN29lJy654UEhtZLqWeyLbU9xTfqqt2oSx2ipMgHgWCnCjoH0NvIjypJ6fZnEGPwvt2FXwSNa-PQ0wIEUcZwAzqiMHUuh1HEsM7NCgV4-ZDQt5YB4nsZhC2fPAzooO9PIntODux6NvqGbWw1Qz_CJJHfBTFmjNna7CwgdRwJwErCTwOMYOdDg8iTCCMK_g6_FxM
[button_send] =>
[Itemid] => 386
[option] => com_chronoforms6
)

Array
(
[upload4] => Array
(
[path] => /home/clients/huga_ftp1/domains/kacha-mo.ru/html/components/com_chronoforms6/chronoforms/uploads/
[file19] => Array
(
[extensions] => Array
(
[0] => odt
[1] => doc
[2] => docx
[3] => pdf
[4] => txt
[5] => ods
[6] => xls
[7] => xlsx
[8] => jpg
[9] => png
[10] => gif
)

[saved] => 1
)

[var] => Array
(
[file19] => Array
(
[0] => Array
(
[path] => /home/clients/huga_ftp1/domains/kacha-mo.ru/html/components/com_chronoforms6/chronoforms/uploads/ экрана от 2017-09-07 17-26-14.png
[filename] => экрана от 2017-09-07 17-26-14.png
[name] => Снимок экрана от 2017-09-07 17-26-14.png
[size] => 275648
)

)

)

)

[google_nocaptcha7] => Array[br] ([br] [response] => Array[br] ([br] [success] => 1[br] [challenge_ts] => 2018-02-12T05:53:45Z[br] [hostname] => www.kacha-mo.ru[br] )[br][br] [_success] => The NoCaptcha verification was successfull.[br] [var] => 1[br] )[br][br] [save_data9] => Array[br] ([br] [data] => Array[br] ([br] [created] => 2018-02-12 05:54:58[br] [user_id] => 0[br] [Obrashhaetes_kak] => Fiz_Lico[br] [Familiya] => test[br] [Imya] => test[br] [Otchestvo] => test[br] [Nazvanie_organizacii] => [br] [Kontaktnyj_telefon] => +1(111)111-1111[br] [E-mail] => test@test.ru[br] [Pochtovyj_adress] => test[br] [Tekst_obrashheniya] => test[br] [Otvet_poluchit] => pochtoviy-adress[br] [file19] => [" экрана от 2017-09-07 17-26-14.png"][br] [Soglasen_na_obrabotku_personalnyh_dannyh] => да[br] )[br][br] [_success] => Data saved successfully[br] [log] => Array[br] ([br] [0] => INSERT INTO `kmo_chronoforms_data_internet_priemnaya_v2` (`created`, `user_id`, `Obrashhaetes_kak`, `Familiya`, `Imya`, `Otchestvo`, `Nazvanie_organizacii`, `Kontaktnyj_telefon`, `E-mail`, `Pochtovyj_adress`, `Tekst_obrashheniya`, `Otvet_poluchit`, `file19`, `Soglasen_na_obrabotku_personalnyh_dannyh`) values ('2018-02-12 05:54:58', '0', 'Fiz_Lico', 'test', 'test', 'test', '', '+1(111)111-1111', 'test@test.ru', 'test', 'test', 'pochtoviy-adress', '[" экрана от 2017-09-07 17-26-14.png"]', 'да');[br] )[br][br] [var] => Array[br] ([br] [created] => 2018-02-12 05:54:58[br] [user_id] => 0[br] [Obrashhaetes_kak] => Fiz_Lico[br] [Familiya] => test[br] [Imya] => test[br] [Otchestvo] => test[br] [Nazvanie_organizacii] => [br] [Kontaktnyj_telefon] => +1(111)111-1111[br] [E-mail] => test@test.ru[br] [Pochtovyj_adress] => test[br] [Tekst_obrashheniya] => test[br] [Otvet_poluchit] => pochtoviy-adress[br] [file19] => [" экрана от 2017-09-07 17-26-14.png"][br] [Soglasen_na_obrabotku_personalnyh_dannyh] => да[br] [aid] => 5[br] )[br][br] )[br][br])[br][/pre]
Max_admin 12 Feb, 2018
Answer
1 Likes
Hi Hugamur,

Please try to add this line of code in a PHP block ABOVE the upload action:
setlocale(LC_ALL,'ru_RU.UTF-8');
If this does not work then please wait for the new update (scheduled for later today) and use this syntax in the filename provider:
{var:upload4.file.fullname}
to get the original file name

Best regards
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
Hugamur 12 Feb, 2018
1 Likes
Thank you. This solution helped me
Please try to add this line of code in a PHP block ABOVE the upload action:
setlocale(LC_ALL,'ru_RU.UTF-8');
This topic is locked and no more replies can be posted.

2Checkout.com

2CheckOut.com Inc. (Ohio, USA) is an authorized retailer for goods and services provided by ChronoEngine.com