Support » Plugin: CSS & JavaScript Toolbox » File worker-html.js not found

  • Hi, i get this error on Chrome console when navigate to /wp-admin/admin.php?page=cjtoolbox:

    File not found:
    /wp-content/plugins/css-javascript-toolbox/framework/js/ace/worker-html.js

    I can’t find this file in the repository neither. Plugin seems to work fine.

    Thanks
    Alex.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author wipeoutmedia

    (@wipeoutmedia)

    Hello Alex,

    Thanks for reporting.
    Can you please provide more information on how you got this issue/error? You say the plugin works fine, but I need to know what you did for it to want this file loaded.

    I have performed a wide search on this file and you are right, it does not exist in CSS & JavaScript Toolbox Free (CJT on WordPress.org) and CJT PLUS edition. Are you running the latest version or an older version of CJT?

    I have checked Github for that file in the ACE editor and it does exist here: https://github.com/ajaxorg/ace-builds/tree/c915483e909bc1b3061cabaaf932f796c723226b/src

    Maybe you can download it and add it to the ‘ace’ folder.
    That said, I believe we did not include this file for a reason, which we would need to investigate this further.

    Thank you.

    Regards,
    Damian Baker

    Hi Damian, just created three code blocks, a JS one and two HTML blocks that also contain javascript. When I open again CJT tool panel on WordPress admin, to modify blocks, I can see the message in the console. I’ll download the file to see if is there is any behaviour difference.

    Also a remark, when I create a JS block, I must include the <script> tag, but the editor shows me a syntax error: [Expected an identifier and instead saw ‘>’. Missing “;” before statement]. But if I remove <script> tag, code is shown in the page instead of executed.

    See you
    Alex.

    Plugin Author wipeoutmedia

    (@wipeoutmedia)

    Hi Alex,

    Thank you for looking into this further to find out if there are any behaviour differences. I appreciate that. 🙂

    Regarding whether you need to add the <script> </script> tags in your JS code block, the answer is yes.
    When you change the code block editor language to JS for example, the editor will now be set to check for JavaScript errors. The thing is, the <script> tag is a HTML tag and will show an ‘ACE editor’ JS error when the editor is set to JS. Changing the language to HTML, you will see the error go away. It is a catch 22, so if you don’t want to add the <script> tag and instead write JS code straight into the code block, then you would need to create a code file instead.
    You can click Master near the code block title, and then create a new code file. Set this code file as JS, which will save the file on your server as a .js file.
    Then when you assign a page or post or whatever, CJT will load the code as a code file instead. This would be quicker then reading your JS code from a code block, which is stored in the database.

    Search for Code Files in this webpage for more clarity.
    https://css-javascript-toolbox.com/features/

    I hope this makes sense.

    Regards,
    Damian Baker

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘File worker-html.js not found’ is closed to new replies.