Post by daksh0079 » Thu Nov 25, 2021 3:58 pm

Can someone help me troubleshoot :
When i upload an image in admin->catalog->products
if the name is in hebrew then the name gets changed
how to solve this issue? i tried:

Code: Select all

 <file path="admin/controller/common/filemanager.php">
    <operation>
      <search><![CDATA['name'  => implode(' ', $name),]]></search>
      <add position="replace" ><![CDATA['name'  => implode('', $name),]]></add>
    </operation>
  </file>
but this only helps in spaces

Newbie

Posts

Joined
Wed Nov 17, 2021 4:22 pm

Post by ADD Creative » Thu Nov 25, 2021 6:01 pm

You need to provide more information if you want help. Such as OpenCart version, PHP version, operating system, etc.

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by daksh0079 » Thu Nov 25, 2021 6:14 pm

Opencart Version 3.0.3.8
Php latest verion
and How does OS matters? as when i upload in admin its happening (mostly with RTL languages)
I am new to this so please excuse me

Newbie

Posts

Joined
Wed Nov 17, 2021 4:22 pm

Post by by mona » Thu Nov 25, 2021 7:00 pm

the file manager first splits the name after 14 characters:

Code: Select all

$name = str_split(basename($image), 14);
then later sticks them together again with a space added in between.

Code: Select all

'name'  => implode(' ', $name),
Presumably to enable word wrapping to not mess up the grid layout.
That is why you see these strange names with spaces in them.

DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.


Spinning Social : Links : Menus : Payments : Socials : Ads : Screen Backgrounds : Galleries : Headers : Banners : Promos


Active Member

Posts

Joined
Mon Jun 10, 2019 9:31 am

Post by daksh0079 » Thu Nov 25, 2021 7:33 pm

Ya i have done that but still the issue persists
Can i encode it somehow?
in which file do i need to edit

Newbie

Posts

Joined
Wed Nov 17, 2021 4:22 pm

Post by by mona » Thu Nov 25, 2021 7:44 pm

Done what?

DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.


Spinning Social : Links : Menus : Payments : Socials : Ads : Screen Backgrounds : Galleries : Headers : Banners : Promos


Active Member

Posts

Joined
Mon Jun 10, 2019 9:31 am

Post by daksh0079 » Thu Nov 25, 2021 7:50 pm

removed the block spaces

Code: Select all

 <file path="admin/controller/common/filemanager.php">
    <operation>
      <search><![CDATA['name'  => implode(' ', $name),]]></search>
      <add position="replace" ><![CDATA['name'  => implode('', $name),]]></add>
    </operation>
  </file>

Newbie

Posts

Joined
Wed Nov 17, 2021 4:22 pm

Post by by mona » Thu Nov 25, 2021 7:54 pm

by mona wrote:
Thu Nov 25, 2021 7:00 pm
the file manager first splits the name after 14 characters:

Code: Select all

$name = str_split(basename($image), 14);
then later sticks them together again with a space added in between.

Code: Select all

'name' => implode(' ', $name),
Presumably to enable word wrapping to not mess up the grid layout.
That is why you see these strange names with spaces in them.
and what about preventing the split in the first instance?
Note: The word “changed” is not particularly descriptive ..

DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.


Spinning Social : Links : Menus : Payments : Socials : Ads : Screen Backgrounds : Galleries : Headers : Banners : Promos


Active Member

Posts

Joined
Mon Jun 10, 2019 9:31 am

Post by ADD Creative » Fri Nov 26, 2021 1:35 am

daksh0079 wrote:
Thu Nov 25, 2021 6:14 pm
Opencart Version 3.0.3.8
Php latest verion
and How does OS matters? as when i upload in admin its happening (mostly with RTL languages)
I am new to this so please excuse me
There have been a few issues and changes in the past with PHP that only affected certain operating systems. Please also give the full PHP version, latest can mean different things to different people.

When you say the name gets changed. Does this mean in the file manger, on the server or both? What gets changed? Can you give an example?

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom
Who is online

Users browsing this forum: No registered users and 13 guests