The content editor in the backend is not displaying on my site. I'm getting the following error:

editor_template.js:1 Uncaught SyntaxError: Unexpected token <

editor_plugin.js:1 Uncaught SyntaxError: Unexpected token <

When I inspect the files, this is their content:

    <!doctype html>
<html lang="en-US">
    <head >
    var BASE_URL = 'XXXXXXXXX/index/index/key/XXXXXX/';
    var require = {
        "baseUrl": "XXXXXX/pub/static/adminhtml/Magento/backend/en_US"

The 'XXXX's are meant to obscure the URL and formkey, they're not part of the actual file.

The files don't seem to be js files at all.

The route from which the files are loaded is:

/admin/blog/post/edit/id/1/key/XXXXXX//themes/advanced/editor_template.js /admin/blog/post/edit/id/1/key/XXXXXX//plugins/layer/editor_plugin.js

These routes seem to be incorrect, but I have no idea where they are generated.

Any thoughts on how to solve this issue on Magento 2.0.7?

  • Did you ever solve this error ? I currently have the same error in console and my editor does not work in admin. Not sure whether it was after installing a plugin or updating Magento to 2.1.7 or something else today. – harri Jun 8 '17 at 17:20
  • I never completely fixed but have been working through it. I did notice that I was loading two versions of jQuery and that gave some errors. I had to debug the js files and remove characters that were problematic. It's hit and miss, not really a solution. – AlexL Jun 13 '17 at 12:55
  • We also getting same type of error. Please suggest the way to solve it. – Ashish Raj Mar 27 '18 at 12:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.