• Resolved khalidmazhar1264

    (@khalidmazhar1264)


    Hi

    We have updated our AMP version from 0.6.2 to the latest version and we’re facing a config.js error in the console can you please assist with how to resolve that error.

    This’s the exact error we see in the console ( No config could be discovered in the page )

    we’re using amp subscription to display the pro article or non-pro article on our WordPress website

    Thanks,
    Khalid

Viewing 10 replies - 1 through 10 (of 10 total)
  • Thread Starter khalidmazhar1264

    (@khalidmazhar1264)

    please visit the below page and you can also compare this page by removing the /amp-page from the url

    https://news.artnet.com/art-world/african-nations-venice-biennale-2120365/amp-page

    Plugin Support Milind More

    (@milindmore22)

    Hello @khalidmazhar1264

    Thank you for contacting us, can you please try installing this plugin which disables AMP Disable ES Modules scripts.

    Thread Starter khalidmazhar1264

    (@khalidmazhar1264)

    is our issue will resolve after installing this plugin?

    Plugin Support Milind More

    (@milindmore22)

    Hello @khalidmazhar1264

    AMP plugin started serving ESM module scripts from version 2.1

    As you mentioned that you were using an old version of the plugin and all the console errors are pointing to .mjs files ie module js files.

    So, I doubt that ESM module scripts are not compatible with your custom work with amp-subscriptions and amp-analytics.

    I can’t confirm if this plugin will fix the issue but it’s worth try.

    Thread Starter khalidmazhar1264

    (@khalidmazhar1264)

    but I’m currently using the latest version of AMP should I need to install the above plugin that you send me above?

    Plugin Support Milind More

    (@milindmore22)

    @khalidmazhar1264

    The plugin is nothing but small code that disables javascript module scripts, which are introduced in AMP plugin 2.1, you were using AMP v0.6.4 and created custom subscription code and custom analytics code based on that.

    Now AMP plugin server two versions of scripts the module scripts are used on modern browsers which supports it ie. .mjs and simple javascript are used on older versions .js

    eg:

    <script async custom-element="amp-subscriptions" src="https://cdn.ampproject.org/v0/amp-subscriptions-0.1.mjs" type="module" crossorigin="anonymous"></script>
    <script async nomodule src="https://cdn.ampproject.org/v0/amp-subscriptions-0.1.js" crossorigin="anonymous" custom-element="amp-subscriptions"></script>

    so Yes, I will recommend installing the extension plugin that disables the javascript module scripts.

    Thread Starter khalidmazhar1264

    (@khalidmazhar1264)

    We’re having the same issue after installing the second plugin. is there any other solution?

    Plugin Support Milind More

    (@milindmore22)

    @khalidmazhar1264

    Sorry forgot to mention that you need to clear cache, plugin cache as well as Cloudflare cache once you install the plugin

    the plugin should remove all the module scripts ie. the scripts that which has extension .mjs

    <script async custom-element="amp-subscriptions" src="https://cdn.ampproject.org/v0/amp-subscriptions-0.1.mjs" type="module" crossorigin="anonymous"></script>

    Thread Starter khalidmazhar1264

    (@khalidmazhar1264)

    Currently we’re checking on our Localhost

    Plugin Support Milind More

    (@milindmore22)

    @khalidmazhar1264
    We hope our suggestion is helpful, I’ll mark this as resolved Open a new support topic if you face further issues, also feel free to leave a plugin review, we would love to hear your feedback.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘AMP Subscription not Working’ is closed to new replies.