Jump to content

translation.bundle.js SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data

Recommended Posts



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:



(( 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, Php 7.2, Centos 7







Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More