Support » Plugin: Autoptimize » Popup Maker conflict

  • Resolved Stephan

    (@luongo)


    Hi Optimizing Matters

    Really great plugin and works perfectly with ‘Popup Maker’ plugin until I embed a Caldera Forms shortcode in the body of Popup Maker to capture name and email address, then the popup doesn’t trigger anymore.

    In Chrome Developer Tools I receive the following error:
    “Uncaught ReferenceError: wp is not defined
    at Object.<anonymous> (automptimize…)
    at Object.843 (autoptimize…)
    at t (autoptimize…)
    at calderaForms.render.0 (autoptimize…)
    at autoptimise….”

    All errors refer to wp-content/cache/automptimize/js

    Is this a known issue? Any help to determine how to resolve this issue would be great.

    All latest versions installed:
    WP 5.3
    Autoptimize 2.5.1
    Caldera Forms 1.8.8
    Popup Maker 1.8.14

    Cheers
    Stephan

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Optimizing Matters

    (@optimizingmatters)

    I get the same error when trying with AO disabled (by adding ?ao_noptimize=1 to the URL) @luongo , looks like the root cause is an issue with Caldara forms (specifically plugins/caldera-forms/clients/render/build/index.min.js);

    The popup/ form does appear ultimately when AO is off, as when AO has the JS aggergated the error causes further execution of the JS to stop.

    hope this helps,
    frank

    Wow, this was amazingly quick! Thanks @optimizingmatters for the assessment. I will raise a support case with Caldera Forms.

    Thanks
    Stephan

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    well, you can always simply exclude caldera or that specific file from JS optimization and be done with it πŸ˜‰

    feel free to leave a review of the plugin and support here! πŸ™‚

    Thanks! I have excluded ‘plugins/caldera-forms/clients/render/build/index.min.js’ in AO now and the popup with the form works. This is fantastic!
    However, I still get the js error in Developer Tools. Any ideas why that persists?

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    However, I still get the js error in Developer Tools. Any ideas why that persists?

    that’s where you need Caldera’s support πŸ™‚

    Thanks again, have already lodged with CF. Provided 5-star rating. πŸ™‚

    Hi, I’m Josh from Caldera Forms.

    The error “wp is not defined” means that WordPress core’s dependencies that Caldera Forms relies on are not being loaded, therefore Caldera Forms SHOULD NOT be expected to work.

    This user explains a work-around for this issue here:
    https://github.com/CalderaWP/Caldera-Forms/issues/3141#issuecomment-550445908

    Stephan

    (@luongo)

    Hi @shelob9
    Thank you for your linking into the discussion.
    I can confirm that since excluding β€˜plugins/caldera-forms/clients/render/build/index.min.js’ in Autoptimize the popup with form appears and form submission works.

    I’ve followed your link and added the wp_enqueue_script('wp-embed-calderaform', includes_url('js/wp-embed.js'), array()); in my child theme but the JS error persists.
    Any other ideas?

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