WordPress.org

Ready to get started?Download WordPress

Forums

Jetpack by WordPress.com
[resolved] Conflict with BNS Inline Asides in Single Views (10 posts)

  1. Edward Caissie
    Theme Review Admin
    Posted 1 year ago #

    Although I cannot guarantee this started with version 2.0.4, this was the first reported issue.

    I have narrowed down the conflict to Jetpack activated, connected to WordPress.com, and the content being displayed in a single view (read: via single.php, page.php, etc.) This happens with every theme I have tested (my own and the Twenty series).

    The crux of the issue appears to be the inline Javascript BNS Inline Asides uses being stripped out of the content and therefore the plugin's primary functionality in single view is being removed with it. The plugin functions fine in multiple post views (i.e.: index.php, archive.php, etc.)

    A work-around will be committed to the WordPress repository shortly, although I would much prefer a better solution.

    BNS Inline Asides (WordPress): http://wordpress.org/extend/plugins/bns-inline-asides/

    BNS Inline Asides (GitHub): https://github.com/Cais/bns-inline-asides

    http://wordpress.org/extend/plugins/jetpack/

  2. Jeremy Herve
    Happiness Engineer
    Plugin Author

    Posted 1 year ago #

    Thanks for the report.

    To help us narrowing down the problem, could you let me know if you still experience the issue when deactivating the Sharing module and the Publicize module?

    You can find out how to deactivate Jetpack modules here:
    http://jetpack.me/support/#turn-off-jetpack-modules

  3. Edward Caissie
    Theme Review Admin
    Posted 1 year ago #

    Thanks for the response!

    Deactivating both Publicize and Sharing modules appears to sort out the conflict; also to note, if only one of the two modules are deactivated the conflict will return.

    I currently use the following conditional:
    if ( ( is_single() || is_page() ) && Jetpack::is_active() ) { ... }

    ... is there a more specific conditional I can use to test if both of these modules are active in its place?

  4. Jeremy Herve
    Happiness Engineer
    Plugin Author

    Posted 1 year ago #

    Thanks for the confirmation. We'll have a look at your plugin and see if there is a better way to address the conflict!

  5. Jeremy Herve
    Happiness Engineer
    Plugin Author

    Posted 1 year ago #

  6. Edward Caissie
    Theme Review Admin
    Posted 1 year ago #

    @Jeremy - Thanks for the references. I can see how there may be similarities with these conflicts; and, I can tell from reviewing the page source the JavaScript in the plugin is being stripped out when the Publicize and/or the Sharing modules are activated, which appears to be the root of the conflict.

    Although I have not tested some of the suggestions from your references I also do not see reducing (or eliminating) functionality from one plugin to serve another as the best method to go forward long-term.

    I am willing to accept they may be an alternative to writing the dynamic JavaScript I am using, but since the plugin's initial release I have not been able to successfully refactor the code to work any other way.

    Any other suggestions?

  7. Jeremy Herve
    Happiness Engineer
    Plugin Author

    Posted 1 year ago #

    As I mentioned earlier, I took note of the conflict with your plugin, and we will have a look at it and see if we can help.

    Of course, you shouldn't have to reduce or eliminate functionality from your plugin; in the links I posted earlier, the plugin authors made a change to their plugin, solved the conflict, without removing any features.

  8. Edward Caissie
    Theme Review Admin
    Posted 1 year ago #

    Thank you for the offer of assistance, and I would still appreciate more eyes on the plugin, but I also believe I have found a solution.

    It required I sort out a couple of points:

    1. How to use wp_localize_script to pass a dynamic variable to the script
    2. Putting the JavaScript into a separate file (best practice, but point 1 had to be sorted out first)
    3. Enqueue the script so it plays nice with everything else

    I will be making the commits shortly to Extend (it's already on GitHub).

  9. Jeremy Herve
    Happiness Engineer
    Plugin Author

    Posted 1 year ago #

    I wanted to let you know that we found on a work-around tolsve all these plugin conflicts. Could you try to update to Jetpack 2.2?

    Thank you.

  10. Edward Caissie
    Theme Review Admin
    Posted 1 year ago #

    Thanks for the update. The "fix" I added last month also appears to have had a beneficial impact.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic