Support » Plugin: Popups for Divi » 2.1.0-> 2.1.1 API JS events now failing silently e.g. ‘DiviPopup:Ready’…

  • Resolved simonreading

    (@simonreading)


    A simple test case that was working prior to last update.:

    jQuery(document).on(“DiviPopup:Ready”,function(event){console.log(“Open information”);
    });’

    Results as expected on 2.1.0 …

    ALL events fail on 2.1.1 ,
    Also tested –
    ‘DiviPopup:OptionsReady’
    ‘DiviPopup:Init’

    I have also tried with the ‘Parent’ Class Keyword: “DiviArea” e.g.
    jQuery(document).on(“DiviArea:Ready”, …..) just in case there is (now) undocumented removal of “DiviPopup” in favour of DiviArea … this fails as well

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Philipp Stracker

    (@strackerphil-1)

    Hi @simonreading

    Sorry to hear about the trouble you’re having with the last update.

    We have changed the API almost eight months ago and deprecated the jQuery(document) integration. At that point, we also updated all our documentation to show the new API functions – in case you have the link to a page that still displays the jQuery(document).on('DiviPopup:Init')-method, please let me know, and we will update it at once.

    It’s true, with the last release we removed the deprecated API in favor of a more WordPress standardized system:

    DiviArea.addAction("load", callback) // before anything is initialized
    DiviArea.addAction("ready", callback) // after all popups are ready

    And also, note that DiviPopup and DiviArea are the same objects. DiviPopup is just an alias for DiviArea.
    You can find more details about the JS hooks here: https://divimode.com/knowledge-base/debug-options/#default-output-in-your-js-console

    I’m sorry that the deprecation notice was not clear enough, and I hope that this information helps you to update your code.

    Let me know if you need more details or help with a specific function.

    Thanks, Philipp from divimode.com

    Thread Starter simonreading

    (@simonreading)

    Errrmmmm…. Sorry Mr Phillip, sir šŸ™‚ – But…..

    The documentation is on the MAIN ‘Divi-Popup’ page …
    https://divimode.com/divi-popup/
    Please scroll to the “The JavaScript Events” section…
    It is also the page linked to from the WP Plugins inf. popup…(before install) and (once installed) “How it works” …. this is essentially the ‘Divi-Popup'”front page”.

    I understood about DiviPopup being an alias for DiviArea – that is derived from the ‘master’ package for DiviArea’s – That’s why I tried it.

    Thank you for that alternative – I will institute it now

    I should hasten to add for anybody finding this thread :
    IMHO : Popups for Divi is the best “popover” plugin for Divi on WordPress I have found – a 5 star plugin ….

    Thread Starter simonreading

    (@simonreading)

    Sorry – But also – can you point me to the updated documentation for the API : all I can find is the page I pointed you towards….

    Plugin Author Philipp Stracker

    (@strackerphil-1)

    Whoa, I cannot explain how we could not see that šŸ˜³
    Thank you for pointing it out, I’ll fix that at once!

    We did a significant API upgrade in the past weeks – that’s why we have removed the deprecated “DiviPopup:event” methods – and I’ll be writing documentation about those changes in the coming days.

    I’ll give you a shoutout here when the new actions/functions are inside the codex.

    Also, thank you for the awesome rating in your previous comment – it really makes a difference for us! Love it šŸ™‚

    Thread Starter simonreading

    (@simonreading)

    Thanks for the update on the Docs.
    The full API is really useful for us devs – there are always a million+1 use cases (inc. edge cases) that the API helps facilitate with ease as opposed to writing a raft of hinkey special case code snippets. : So, I am looking forward to it.
    Re: Rating – You provide this plugin for free: its wonderfully efficient , a super timesaver and also very versatile, so I feel you deserve a big shout out.

    Plugin Author Philipp Stracker

    (@strackerphil-1)

    Possibly you have noticed the API changes in version 2.2.0 – we have also spent much time to update our knowledge base and code documentation to explain what’s possible.

    A good place to start would be here: https://divimode.com/knowledge-base/action-reference/

    Or head over to https://divimode.com/article-categories/js-api/ and browse through the articles to find out more.

    Philipp šŸ™‚

    Plugin Author Philipp Stracker

    (@strackerphil-1)

    Btw: I’ll finally mark this thread as “resolved.” If you have any problems with or questions about the API, please let us know.

    Either open a new thread, re-open this thread, or create a private ticket at divimode.com/get-support/

    Thread Starter simonreading

    (@simonreading)

    Sorry, But you are going to come accross another thread related to DiviArea.addAction(“ready”, callback) being broken … šŸ™

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘2.1.0-> 2.1.1 API JS events now failing silently e.g. ‘DiviPopup:Ready’…’ is closed to new replies.