CB Field Groups and Cyrillic

7 months 2 weeks ago #314642 by Pena007
Files whose names contain numbers or numbers and letters of the Latin alphabet are loaded normally. Nested groups are not used
7 months 2 weeks ago #314664 by beat

Pena007 wrote: Files whose names contain numbers or numbers and letters of the Latin alphabet are loaded normally. Nested groups are not used


At this stage, only latin-filenames are supported by Community Builder. Any non-latin alphanumeric chararcters (and _ and -) are filtered out (with following preg-expression), and at this stage we don't expect CB to support non-latin characters as it becomes very file-system dependant. Now if not a single character is latin, then there is no filename left, hence your error message. Sorry about that inconvenience.
/[^-a-zA-Z0-9_]/

Beat - Community Builder Team Member

Before posting on forums: Read FAQ thoroughly -- Help us spend more time coding by helping others in this forum, many thanks :)
CB links: Our membership - CBSubs - Templates - Hosting - Forge - Send me a Private Message (PM) only for private/confidential info
7 months 2 weeks ago #314686 by Pena007
You could add this option: in the settings of the field of type "File" add the option to select that the downloaded file was renamed to a name containing only the letters of the Latin language? For example, so you have works booting avatar.
7 months 2 weeks ago #314688 by beat
Maybe it works already like that if there is a single latin character in the filename ? Can you please confirm ?

Beat - Community Builder Team Member

Before posting on forums: Read FAQ thoroughly -- Help us spend more time coding by helping others in this forum, many thanks :)
CB links: Our membership - CBSubs - Templates - Hosting - Forge - Send me a Private Message (PM) only for private/confidential info
7 months 1 week ago #314689 by Pena007
Yes, if there is at least one Latin character or digit, then the file is loaded
7 months 1 week ago #314691 by beat

Pena007 wrote: Yes, if there is at least one Latin character or digit, then the file is loaded


Ok, thank you for your report, found the bug and proposing a fix to test:

in file components/com_comprofiler/plugin/user/plug_cbcore/cb.core.php line 6772:
replace:
$uploaded_name                  =       preg_replace( '/[^-a-zA-Z0-9_]/', '', pathinfo( $value['name'], PATHINFO_FILENAME ) );
with
$uploaded_name   =       pathinfo( $value['name'], PATHINFO_FILENAME );

And it should work properly.

Thank you for reporting back if it fixes it for you.

We should then add it the fix to a nightly soon.

forge.joomlapolis.com/issues/7740

Beat - Community Builder Team Member

Before posting on forums: Read FAQ thoroughly -- Help us spend more time coding by helping others in this forum, many thanks :)
CB links: Our membership - CBSubs - Templates - Hosting - Forge - Send me a Private Message (PM) only for private/confidential info
The following user(s) said Thank You: nant
Moderators: beatnantkrileon
Time to create page: 0.401 seconds

Facebook Twitter LinkedIn