Support » Plugin: Simple Code Block » JavaScript errors

  • Resolved Dekadinious

    (@dekadinious)


    I get a lot of errors in the console, and the theme is not showing correctly. I just get basic code blocks. It works fine in post-preview-mode and in Gutenberg. But not in a published post. The errors are to files that supposedly should exist on the path “domain/post-name”. But they don’t.

    9702a.js:5 GET domain/post-name/theme-monokai.js net::ERR_ABORTED 404
    t.loadScript @ 9702a.js:5
    t.loadModule @ 9702a.js:5
    setTheme @ 9702a.js:5
    setTheme @ 9702a.js:5
    (anonymous) @ 9702a.js:9
    each @ jquery.js:2
    each @ jquery.js:2
    (anonymous) @ 9702a.js:9
    dispatch @ jquery.js:3
    r.handle @ jquery.js:3
    load (async)
    add @ jquery.js:3
    a.event.add @ 9702a.js:3
    (anonymous) @ jquery.js:3
    each @ jquery.js:2
    each @ jquery.js:2
    ra @ jquery.js:3
    on @ jquery.js:3
    bind @ jquery.js:5
    a.fn.<computed> @ 9702a.js:3
    (anonymous) @ 9702a.js:9
    (anonymous) @ 9702a.js:9
    9702a.js:5 GET domain/post-name/mode-php.js net::ERR_ABORTED 404
    t.loadScript @ 9702a.js:5
    t.loadModule @ 9702a.js:5
    setMode @ 9702a.js:5
    (anonymous) @ 9702a.js:9
    each @ jquery.js:2
    each @ jquery.js:2
    (anonymous) @ 9702a.js:9
    dispatch @ jquery.js:3
    r.handle @ jquery.js:3
    load (async)
    add @ jquery.js:3
    a.event.add @ 9702a.js:3
    (anonymous) @ jquery.js:3
    each @ jquery.js:2
    each @ jquery.js:2
    ra @ jquery.js:3
    on @ jquery.js:3
    bind @ jquery.js:5
    a.fn.<computed> @ 9702a.js:3
    (anonymous) @ 9702a.js:9
    (anonymous) @ 9702a.js:9
    9702a.js:5 GET domain/post-name/mode-html.js net::ERR_ABORTED 404
    t.loadScript @ 9702a.js:5
    t.loadModule @ 9702a.js:5
    setMode @ 9702a.js:5
    (anonymous) @ 9702a.js:9
    each @ jquery.js:2
    each @ jquery.js:2
    (anonymous) @ 9702a.js:9
    dispatch @ jquery.js:3
    r.handle @ jquery.js:3
    load (async)
    add @ jquery.js:3
    a.event.add @ 9702a.js:3
    (anonymous) @ jquery.js:3
    each @ jquery.js:2
    each @ jquery.js:2
    ra @ jquery.js:3
    on @ jquery.js:3
    bind @ jquery.js:5
    a.fn.<computed> @ 9702a.js:3
    (anonymous) @ 9702a.js:9
    (anonymous) @ 9702a.js:9
    9702a.js:5 GET domain/post-name/mode-javascript.js net::ERR_ABORTED 404
    t.loadScript @ 9702a.js:5
    t.loadModule @ 9702a.js:5
    setMode @ 9702a.js:5
    (anonymous) @ 9702a.js:9
    each @ jquery.js:2
    each @ jquery.js:2
    (anonymous) @ 9702a.js:9
    dispatch @ jquery.js:3
    r.handle @ jquery.js:3
    load (async)
    add @ jquery.js:3
    a.event.add @ 9702a.js:3
    (anonymous) @ jquery.js:3
    each @ jquery.js:2
    each @ jquery.js:2
    ra @ jquery.js:3
    on @ jquery.js:3
    bind @ jquery.js:5
    a.fn.<computed> @ 9702a.js:3
    (anonymous) @ 9702a.js:9
    (anonymous) @ 9702a.js:9
    9702a.js:5 GET domain/post-name/mode-css.js net::ERR_ABORTED 404
Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Contributor sumapress

    (@sumapress)

    Hello

    It seems that the installation does not load the necessary files well,
    Does the code look well but without styles? What is the display failure?

    Maybe there are an incompatibility with your theme or others plugins…
    Do you use any cache plugin? There may be the problem in the cache configuration.

    On the other hand… Have your never seen it well before? Or maybe the errors you are commenting have appeared some time after using this plugin?

    I very well could be a caching issue. The code blocks look normal, except for the styles. I have just started using them and just saw this after posting the first post with them.

    Can you advise what files I should exclude from caching to test it?

    Plugin Contributor sumapress

    (@sumapress)

    Inside the plugin folder Gutenberg:

    
    src/frontend.blocks.js
    src/ace-editor/ace.js
    

    Excluding these files from the cache solved the issue. Have a great day!

    Plugin Contributor sumapress

    (@sumapress)

    great!, thanks for the feedback 🙂

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.