Jump to content

Subfolder installation name clash with language code?


mehistaken

Recommended Posts

Hi there, I have a bit of a peculiar situation here.

First, some background:

 

I inherited a multi-install project and have been working on it for a few weeks, this is my first time working with PS.

I meant multi-install, as in there are multiple copies of PS installed on a single server (1.5.3.1)

Aside from development and backup copies, there are:

1. /root/ - multistore

2. /root/cn/ - China specific store

 

They had to use a separate store for China for reasons that are lost to me, but this is set and cannot be changed.

 

Recently I've had to do some module work (abandoncart) on all sites. Done everything and all is well until I had to deploy to /cn/

 

Module installs and everything looks fine until I try to edit email template translations in the BO, where I get the following errors (attached), for CN language only. other languages work fine, and other sections of translation work fine (front/back office, etc. only email templates fail)

 

I have tried to do what it suggested, putting en inside cn again but to no avail. I have tried other solutions posted by others with a similar issue e.g. copying /root/mails/cn/ folder into /root/themes/mytheme/mails/cn/, deleting the /mails/cn/ folder and let BO create it.

 

I suspect the language code "cn" is clashing with the subfolder name of which it's installed in.

If that's the case I can think of 2 solutions:

- move the /root/cn/ installation to a folder that does not clash with any language code

- clone the cn language pack and call it something else

 

For SEO reasons, if I went with the first solution I would like to keep the client-facing URLs unchanged (i.e. keep mysite.com/cn/) and use .htaccess to route requests to the new folder. Can someone provide some insights on this?

 

What are my options?

 

Thanks in advanced!

Adam

post-1356678-0-83118600-1483674780_thumb.jpg

post-1356678-0-74848200-1483674786_thumb.jpg

Edited by mehistaken (see edit history)
Link to comment
Share on other sites

Solved the problem.

 

I was correct in suspecting it was a clash between the folder name and ISO code of the language "cn"

 

in /controllers/admin/AdminTranslationsController.php - 1851

$dir_en = str_replace('/' . $this->lang_selected->iso_code . '/', '/en/', $dir);

Edited the code so it only replace the last instance of the iso_code instead of all of them.

 

Adam

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...