manlio Posted May 9, 2015 Share Posted May 9, 2015 Hi I have a multilanguage website with code internationalization that I can manage easily on localhost, but when I put online I'm not able to edit files and I receive the attached error. The only way it works is to modify files locally and upload json files directly. Anyone knows how to fix this? Thank you. Link to comment Share on other sites More sharing options...
Christophe Posted May 9, 2015 Share Posted May 9, 2015 Hello, How is it that the message displays /site\templates\homepage.php instead of /site/templates/homepage.php? Is your localhost on Windows (if so, which version is it)? Are you using Wamp, Xampp, easyPHP...? It seems it doesn't find the file(s) because the path is incorrect. Link to comment Share on other sites More sharing options...
manlio Posted May 13, 2015 Author Share Posted May 13, 2015 Sorry for late reply, but I forgot to follow this topic and was waiting email notification... I also noticed this, but I don't know how to change or fix this problem. Locally I work on windows 8.1 with wamp server and in fact the same problem happens on two different unix websites. As an additional notice both websites works correctly, only that admin screen is not working properly. Thank you. Link to comment Share on other sites More sharing options...
mr-fan Posted May 13, 2015 Share Posted May 13, 2015 Maybe a PHP Version Problem? PHP < 5.5 "file": "site\/templates\/blog-side-bar.inc" PHP >= 5.5 "file": "site\\templates\\blog-side-bar.inc" Just short via mobile....regards mr-fan Link to comment Share on other sites More sharing options...
manlio Posted May 13, 2015 Author Share Posted May 13, 2015 Thank you mr-fan. Unluckily local version is 5.5.12 and online version is 5.5.24 Link to comment Share on other sites More sharing options...
manlio Posted June 15, 2015 Author Share Posted June 15, 2015 I'm sorry to resume this post, but thanks to mr-fan I was able to fix the problem, but now I would like to know what to change or search in my php local settings to change this behaviour that writes path like "file": "site\/templates\/blog-side-bar.inc" instead of what is used on my webservers "file": "site\\templates\\blog-side-bar.inc". I'm using wamp and php version is 5.5.12 Thank you Link to comment Share on other sites More sharing options...
SiNNuT Posted June 15, 2015 Share Posted June 15, 2015 I also recently ran into this problem on a live site on Unix where i wanted to do a quick edit. I think this was the first time trying to edit translations on the live site, and encountered the wrong paths. Because there where only a few translatable strings i deleted the translation and re-translated it on the live site, which then works correctly with a good path. It was developed on a Windows machine so i think there is some kind of directory separator issue. Link to comment Share on other sites More sharing options...
manlio Posted June 15, 2015 Author Share Posted June 15, 2015 I can live with this, but would be good to work with same files, because a lot of times I need to develop and test new contents locally and it is not comfortable renaming all the paths. Thank you Link to comment Share on other sites More sharing options...
ryan Posted June 18, 2015 Share Posted June 18, 2015 It does sound like a directory separator issue, but not really clear where. Can someone post a translation JSON file that has the issue? Link to comment Share on other sites More sharing options...
manlio Posted June 22, 2015 Author Share Posted June 22, 2015 Hi Ryan, sorry for late reply but I'm overwhelmed by work during these days. I have copied the online DB on my local installation and apparently now seems to work like expected. The translation files were like this { "file": "site\/templates\/footer.inc", "textdomain": "site--templates--footer-inc", "translations": { "07ff124762cd9515484510b0f5d1c231": { "text": "Hello" }, "aea9a2d9c308f1d9202144beff707244": { "text": "Contacts" }, "0ece81856ca39d612fd74576435cb894": { "text": "Company location" }, "8c449a82a3d729e4b52f74e417f6d63c": { "text": "Bye" } } } and I simply changed them to this (I changed only the first line) { "file": "site//templates//footer.inc", "textdomain": "site--templates--footer-inc", "translations": { "07ff124762cd9515484510b0f5d1c231": { "text": "XXXXYYYYY" }, "aea9a2d9c308f1d9202144beff707244": { "text": "Contacts" }, "0ece81856ca39d612fd74576435cb894": { "text": "Company location" }, "8c449a82a3d729e4b52f74e417f6d63c": { "text": "XXXXX" } } } After I copied the remote DB to Local installation, it seems to work properly. I will make more test as soon I have some time. Thank you. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now