aymeric69001 Posted September 4, 2018 Share Posted September 4, 2018 Hello, I am facing a bug that I could not solve. When I want to reach this URL: https://www.example.com/adminaad748s5/index.php/international/translations?lang=fr&type=back&locale=fr-FR&_token=4zRdcMNgY-dsdD748KPHITJTT Which is the URL generated when you click on "Modify" in the section "Modify translations" in the "Translations" page, see below: (this 1st image was from my localhost store, just to show you the button translated in english :)) So, when I click on the button (on my store online) I get this result : And inspecting the javascript console I get this: So, I went to see this file: in admin456dsd/themes/new-theme/public/translations-bundle.js, and here is the peace of code corresponding to the error: function(t){n.i(s.a)("error",t.bodyText?JSON.parse(t.bodyText).error:t.statusText)} (( to recall, the error is: SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data )) When I console.log t.bodyText, I obtain 'undefined' so I added a condition like so: if(typeof t.bodyText !== 'undefined'){n.i(s.a)("error",t.bodyText?JSON.parse(t.bodyText).error:t.statusText);} But the code still present the same error (cache is disable). I am really stuck here. Need some help. Here are my configurations: Prestashop 1.7.4.2, Php 7.2, Centos 7 Thanks Aymeric Link to comment Share on other sites More sharing options...
kreatywneprojektowan Posted October 27, 2019 Share Posted October 27, 2019 Overwrite the : admin/themes/new-theme/public/translations.bundle.js file Link to comment Share on other sites More sharing options...
Mian Waqas Posted July 28, 2020 Share Posted July 28, 2020 On 9/4/2018 at 11:45 PM, aymeric69001 said: Hello, I am facing a bug that I could not solve. When I want to reach this URL: https://www.example.com/adminaad748s5/index.php/international/translations?lang=fr&type=back&locale=fr-FR&_token=4zRdcMNgY-dsdD748KPHITJTT Which is the URL generated when you click on "Modify" in the section "Modify translations" in the "Translations" page, see below: (this 1st image was from my localhost store, just to show you the button translated in english :)) So, when I click on the button (on my store online) I get this result : And inspecting the javascript console I get this: So, I went to see this file: in admin456dsd/themes/new-theme/public/translations-bundle.js, and here is the peace of code corresponding to the error: function(t){n.i(s.a)("error",t.bodyText?JSON.parse(t.bodyText).error:t.statusText)} (( to recall, the error is: SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data )) When I console.log t.bodyText, I obtain 'undefined' so I added a condition like so: if(typeof t.bodyText !== 'undefined'){n.i(s.a)("error",t.bodyText?JSON.parse(t.bodyText).error:t.statusText);} But the code still present the same error (cache is disable). I am really stuck here. Need some help. Here are my configurations: Prestashop 1.7.4.2, Php 7.2, Centos 7 Thanks Aymeric Hi, i am facing same issue, please can you tell me how you had resolved it? Regards Link to comment Share on other sites More sharing options...
Mian Waqas Posted July 28, 2020 Share Posted July 28, 2020 On 10/27/2019 at 6:10 AM, kreatywneprojektowan said: Overwrite the : admin/themes/new-theme/public/translations.bundle.js file hi, this did not helped. 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