• Resolved conorseed

    (@conorseed)


    Hey there, I’ve noticed when I have ESI enabled on sites using Pro Theme by Themeco (https://theme.co/), that their page builder (Cornerstone) doesn’t load. The page just has a heap of syntax errors. As soon as ESI is disabled, Cornerstone works perfectly.

    Is this something you could look into please? Thanks ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support qtwrk

    (@qtwrk)

    Hi,

    could you please be more specific what exactly does “heap of syntax errors.” mean ?

    Best regards,

    Thread Starter conorseed

    (@conorseed)

    Hey @qtwrk – apologies for not being more specific.
    I was going to attach an image but must have forgotten!

    Here’s a screenshot of the console with all the errors with ESI enabled:
    https://drive.google.com/file/d/1ax6cVpNVFEAZDQKSmH4V59N97HcBY8Iz/view?usp=sharing

    As mentioned above, when ESI is disabled these errors don’t exist.

    Plugin Support qtwrk

    (@qtwrk)

    Hi,

    I saw a similar case on Elementor builder before , in that case, it was due to the way how it loads CSS file , as when shortcode/templated loaded by ESI , it doesn’t bring the necessary CSS file alone with it

    I suspect it could be similar but to JS file

    could you please check , on both ESI ON / OFF cases , the HTML source code and JS request lists ? see if they are identical or missing something ?

    Best regards,

    @qtwrk

    Sorry for reopen this one. But its not solved. Exactly same here.

    Pro Theme from Themeco with Cornerstone. When ESI is enabled Cornerstone will not load anymore.

    could you please check , on both ESI ON / OFF cases , the HTML source code and JS request lists ? see if they are identical or missing something ?

    Not identical. It stops on half because of an console error

    SyntaxError: Unexpected EOF

    Errors reference will be here

    <script type='text/javascript' id='wp-api-fetch-js-after'>
    wp.apiFetch.use( wp.apiFetch.createRootURLMiddleware( "https://www.example.com/wp-json/" ) );
    wp.apiFetch.nonceMiddleware = wp.apiFetch.createNonceMiddleware( "[an error occurred while processing this directive]
    " );
    wp.apiFetch.use( wp.apiFetch.nonceMiddleware );
    wp.apiFetch.use( wp.apiFetch.mediaUploadMiddleware );
    wp.apiFetch.nonceEndpoint = "https://www.example.com/wp-admin/admin-ajax.php?action=rest-nonce";
    </script>

    or

    <script type='text/javascript' id='wp-api-request-js-extra'>
            /* <![CDATA[ */
            var wpApiSettings = {"root":"https:\/\/www.example.com\/wp-json\/","nonce":"[an error occurred while processing this directive]
            ","versionString":"wp\/v2\/"};
            /* ]]> */
            </script>

    If anyone stumbles onto the issue, this happens when saving a Gutenberg block that contains a nonce (like displaying a form) and will happen with ACF sometimes. You need to disable cache for logged in users which is enabled by default – if I’m not wrong. This problem still happens if the previously mentioned conditions are met on version 4.6 of the WordPress plugin.

    • This reply was modified 2 years, 6 months ago by davidwebca.
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘ESI + Pro Theme by Themeco’ is closed to new replies.