Support » Plugin: WP Photo Album Plus » Update to WP5.6: Incompatibility between WP Photo Album Plus and Popup Maker

  • Resolved mitfi

    (@mitfi)


    Dear support team,

    I am a happy user of your extremely well done and versatile, powerful plugin!

    And therefore, I just wanted to notify you about a strange behavior I encountered after updating to WP5.6:

    Suddenly, the pop-ups generated by Popup Maker didn’t show up any more when pressed or triggered.

    Using Health Check plugin and deactivating/activating one plugin after the other, I found that the pop-ups re-appear, when I deactivate WP Photo Album Plus.

    I made some cross-checks but could not identify any relation to other plugins (of course I did not undertake a full combinatory check…).

    I further don’t say where the root cause is to be found.

    And there are no jQuery Migrate Helper deprecated messages from either of the two plugins concerned so far.

    Therefore, I am wondering, whether you could shed some light onto this, having an idea where to dig?

    Thank you very much in advance.

    Best regards

    Michael

Viewing 15 replies - 1 through 15 (of 19 total)
  • Plugin Author Jacob N. Breetvelt

    (@opajaap)

    Maybe this info helps:
    – WPPA uses jQuery().dialog().
    – These are the wp supplied js files that wppa loads:

    // The js dependancies
    $js_depts = array(	'jquery',
    			'jquery-form',
    			'jquery-masonry',
    			'jquery-ui-dialog',
    );

    – There are no recent changes herein

    Dear @opajaap,

    wow, what a fast answer – thanks!

    I will check your answer with the plugin author of Popup Maker.

    Best regards

    Michael

    mitfi

    (@mitfi)

    Dear @opajaap,

    following your kind input, please see here below the response received from Daniel Iser (@danieliser), plugin author of “Popup Maker”.

    Perhaps, this can help to isolate the interference.

    Best regards

    Michael

    ——————————————————————————-

    @mitfi – Unfortunately I wouldn’t have the feintest clue where to start with debugging why their plugin is causing issues.

    I do see they made some changes a week or so ago for WP 5.6 compatibility, though I couldn’t find exactly what those were.

    It should also be noted that we can’t/shouldn’t be expected to go line by line in their plugin looking for the cause if I’m being honest. We have 600k users to support for our own code. And there is a small portion of those users, yourself included, currently saying our popups aren’t working with the latest version, most are finding, as you did, causes from 3rd party products. If we took the time to debug all of these 3rd party products code ourselves we would never be able to keep up, much less advance our own code.

    Now what we can and should do in these cases is attempt to narrow where the issue is coming from, and attempt to limit the scope of the other authors search. For example if we can point to a specific theme JS file or even specific function in that file it greatly improves the chances.

    I haven’t seen your site specifically though to be able to comment, but if you went through my previous post with the troubleshooting steps and found nothing of note you may need to just open a support ticket with us and them and try to get them to work with us to resolve it.

    That said I do see stuff in there code that won’t work in general, might be worth pointing those things out in the mean time. For example this line was added 9 days ago, but jQuery .off doesn’t work with anonymous functions, so the old version of this code was better. As it is this code likely does nothing, and since they are immediately doing a .on attaching that function again, its likely going to cause it to duplicate the render call repeatedly.

    ‘$(window).off(“fullscreenchange mozfullscreenchange webkitfullscreenchange msfullscreenchange”,function(){abort=true;setTimeout(function(){abort=false;render();},1000)});’ .

    Plugin Author Jacob N. Breetvelt

    (@opajaap)

    @mitfi
    The compatibility changes i made for wp 5.6 are just for fixing the migrate messages
    where i changed constructions like jQuery().click(myFunc) into jQuery().on('click',myFunc) etc.

    If you have no panoramas or zoomable images, the code where i remove eventhandlers will not be executed. There is a good reason for the fact that this code can be executed more than once. Btw, if it should do nothing, it should also not interfere.

    You can try this intermediate version where the not working .off() is removed https://downloads.wordpress.org/plugin/wp-photo-album-plus.7.6.03.002.zip

    Can you confirm that the previous release version https://downloads.wordpress.org/plugin/wp-photo-album-plus.7.5.10.009.zip still does not show the conflict in your current configuration?

    After downloading a zipped plugin version, simply do as if you want to install a new plugin by upload, you will be asked if the current version should be replaced, answer yes.

    Can you tell me what i should do to reproduce the issue?

    Daniel Iser

    (@danieliser)

    Following this @opajaap, let me know what insights we can offer from the Popup Maker side of things.

    Plugin Author Jacob N. Breetvelt

    (@opajaap)

    @danieliser
    I did some research on popup maker, and it looks indeed most likely that removing an event handler causes the problem.
    Therefor i reviewd my .off actions, and can tell you now that the current dev version
    https://downloads.wordpress.org/plugin/wp-photo-album-plus.7.6.03.003.zip
    only contains the following handler removals:

    Zoeken ").off(" (5 treffers in 4 uit 105 bestanden)
      C:\Users\opaja\Documents\Mijn Plugins\wp-photo-album-plus\trunk\wppa-picture.php (2 treffers)
    	Line 1039: '$(window).off("DOMContentLoaded load resize orientationchange",onResize' . $mocc . ');' .
    	Line 1044: '$("body").off("quitimage",quitImage);' .
      C:\Users\opaja\Documents\Mijn Plugins\wp-photo-album-plus\trunk\js\wppa-lightbox.js (1 treffers)
    	Line 1114: $( document ).off( 'keydown', wppaOvlKeyboardHandler );
      C:\Users\opaja\Documents\Mijn Plugins\wp-photo-album-plus\trunk\js\wppa-spheric.js (1 treffers)
    	Line 142: $(window).off("DOMContentLoaded load resize orientationchange",resize25);
      C:\Users\opaja\Documents\Mijn Plugins\wp-photo-album-plus\trunk\js\wppa-zoom.js (1 treffers)
    	Line 132: $(window).off("DOMContentLoaded load resize orientationchange",resize25);

    So, i would recommend @mitfi to install this version and test again.
    Also, it would be nice to know what events are used by him to show the popups.

    mitfi

    (@mitfi)

    Hi @opajaap and @danieliser,

    first of all: THANKS for your extraordinary engagement and enthusiasm!

    Well, I checked version 7.6.03.003 – unfortunately without success.

    As soon as I switch jQuery Migrate Helper to the current WordPress jQuery, the popups won’t load.
    Switching back to the “old” Legacy 1.12.4-wp jQuery version makes them appear again.
    Deactivating WP Photo Album Plus will do the same…

    I cannot tell, witch events I am using behind the scenes, as I am using Popup Maker to trigger on certain classes being pressed.

    I am really sorry that I am not of real help…

    Best regards

    Michael

    • This reply was modified 1 month ago by mitfi.
    • This reply was modified 1 month ago by mitfi.
    Daniel Iser

    (@danieliser)

    I don’t suspect he was using any custom events honestly from the sounds of it.

    Further if this is based on my suggestion I was just pointing out something I found while trying to see exactly what you might have changed for jQuery tweaks.

    It could be completely unrelated, just knew that .off would not work for anonymous functions and thought I’d pass it on.

    Plugin Author Jacob N. Breetvelt

    (@opajaap)

    I am very willing to help fixing this, if somebody tells me how to reproduce the issue.
    I installed popup maker and created a test popup.
    I do not want to study all documentation, simply tell me how to make the popup show up when wppa is deactivated, please.

    mitfi

    (@mitfi)

    Dear @opajaap and @danieliser,

    as I stated earlier, due to the alphabet, WP Photo Album Plus was one of the last plugins to switch on again, so I noticed that with WP Photo Album Plus, the issue with Plugin Maker appeared.

    However, in another site, I just made a test and found out that WP Photo Album Plus and Plugin Maker work fine together, even in latest WordPress 5.6 jQuery Version. So the question was: which other plugin might interfere with both.

    With deactivating – one by one – those plugins not present in the functioning set-up, I could identify “Ditty News Ticker” (Metaphor Creations) to be part of the interference issue.

    With either Ditty or WP Photo active, Plugin Maker works. With both active, it doesn’t…

    It is getting a bit complex, but I cannot tell you a better message…

    So the question is: are you still interested to solve such an 3-partite interference or shall I just look for another Newsticker?

    I will raise this in front of Ditty News Ticker, but I doubt it will be easy to determine without your participation.

    Best regards

    Michael

    Daniel Iser

    (@danieliser)

    @mitfi – To be fair, can you please try the Ditty + PM test again. Unless you also mentioned that plugin recently in the forum topic you were talking with me on, someone else has already mentioned it as a potential point of conflict as well.

    mitfi

    (@mitfi)

    @danieliser – Maybe I don’t understand correctly, but I did this test today several times.

    As I see the effect in PM only, these are the combinations tested:

    WP Photo + PM: OK
    Ditty + PM: OK
    WP Photo + Ditty + PM: NoGo

    Is there something missing?

    Best regards

    Michael

    Plugin Author Jacob N. Breetvelt

    (@opajaap)

    I finally managed to get a popup maker shortcode in a post:
    <p>[popup_trigger id="1164" tag="p"]TESTIT[/popup_trigger]</p>
    but it does not work, neither with or without wppa activated.
    No other plugins except classic editor.
    If i can not reproduce the issue i can not investigate on it.

    mitfi

    (@mitfi)

    Dear @opajaap,

    your might want to check my latest findings above…

    For Popup-Maker, you could go to its admin page to add triggers and use e.g. their classname as a trigger.
    Typically, there is as well a function to collect a selector in the admin header’s Popup Maker menu on the frontend.

    Best regards

    Michael

    Plugin Author Jacob N. Breetvelt

    (@opajaap)

    @danieliser
    I added .wppa-box to the test popup.
    All elms with class .wppa-box have this click event handler:

    function(event) {
      var $trigger = $(this),
        do_default = settings.do_default || false;
    
      // If trigger is inside of the popup that it opens, do nothing.
      if ($popup.has($trigger).length > 0) {
        return;
      }
    
      // If the popup is already open return.
      if ($popup.popmake('state', 'isOpen')) {
        return;
      }
    
      // If cookie exists or conditions fail return.
      if ($popup.popmake('checkCookies', settings) || !$popup.popmake('checkConditions')) {
        return;
      }
    
      if ($trigger.data('do-default')) {
        do_default = $trigger.data('do-default');
      } else if ($trigger.hasClass('do-default') || $trigger.hasClass('popmake-do-default') || $trigger.hasClass('pum-do-default')) {
        do_default = true;
      }
    
      // If trigger has the class do-default we don't prevent default actions.
      if (!event.ctrlKey && !pum.hooks.applyFilters('pum.trigger.click_open.do_default', do_default, $popup, $trigger)) {
        event.preventDefault();
        event.stopPropagation();
      }
    
      // Set the global last open trigger to the clicked element.
      $.fn.popmake.last_open_trigger = $trigger;
    
      // Open the popup.
      $popup.popmake('open');
    }

    The display is top bar
    I deleted all cookies of the site
    When clicking an element with .wppa-box nothing happens

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