Viewing 15 replies - 1 through 15 (of 41 total)
  • Thread Starter rcgordon

    (@rcgordon)

    It turns out that it’s just on posts done since the update, and it appears that the problem is that WordPress *(or something) is now adding rel values of attachment wp-att-POST_ID. It those rel values are removed, the lightbox works as normally.

    Thread Starter rcgordon

    (@rcgordon)

    Elaborating on my last post, removing the entire rel attribute works; retaining the attribute but removing the value does not seem to work.

    I would imagine that a quick fix might be to remove the attribute with a php filter, but at this point, I’m not sure what to hook into.

    I too have this problem. I’m a webdev with over 60 sites, most of which use WP Lightbox 2 and all of which are WP 4.4. Need a fix for this but I don’t have the time or script knowledge to find and flatten this bug.
    Hope someone picks it up soon!

    Thread Starter rcgordon

    (@rcgordon)

    I set up a jQuery script (hopefully, temporary) to fix the rel attribute.

    function fixRelsForLightbox() {
      var $targets = $('a[rel~="attachment"]');
      if ($targets.length) {
        $targets.each(function() {
          var $this = $(this);
          $this.prop('outerHTML', $this.prop('outerHTML').replace(/(rel=")attachment wp-att-(\d+)/g, "$1lightbox\[$2\]"));
        });
      }
    }
    fixRelsForLightbox();

    The fixRelsForLightbox() function would also need to be applied in a callback for Infinite Scroll, if that’s used.

    Thread Starter rcgordon

    (@rcgordon)

    Another update:

    Since the Lightbox fix works as well if you just ADD the necessary rel value, without removing the WordPress-generated ones, this is a modified version of the jQuery function, which adds the Lightbox code without removing the other rel values:

    function fixRelsForLightbox() {
      var $targets = $('a[rel~="attachment"]');
      if ($targets.length) {
        $targets.each(function() {
          var $this = $(this);
          $this.prop('outerHTML', $this.prop('outerHTML').replace(/(rel="attachment wp-att-)(\d+)/g, "$1$2 lightbox\[$2\]"));
        });
      }
    }
    fixRelsForLightbox();

    The substituted line is:

    $this.prop('outerHTML', $this.prop('outerHTML').replace(/(rel="attachment wp-att-)(\d+)/g, "$1$2 lightbox\[$2\]"));

    It should be noted that this routine, in either of its forms, makes no change to the post’s database code. It merely is fixing it as it loads into the browser.

    Plugin Author Devin Vinson

    (@dvinson)

    The plugin just got a 4.4. compatibility update. So you should be seeing that available shortly ??

    The update to fix 4.4, which was not broken for me, now the site has all images unable to use lightbox unless i go and force in the rel=”lightbox”. So images are not opening in Lightbox even though there are no rel tags and set to open all image links in Lightbox. Example: https://intheviewfinder.com/6573/begging-for-rain/

    Was working perfectly with 4.4 before the plugin update.

    I replaced WP Lightbox with Responsive Lightbox to fix the problem.

    I see the same as turner.jeff – this plugin is now totally broken ??

    Thread Starter rcgordon

    (@rcgordon)

    3.0.6 breaks WP Lightbox completely for me too, in 4.4.

    I reinstalled 3.0.5 to use with the script I built further up this thread.

    Plugin Author Devin Vinson

    (@dvinson)

    Anyone have a link to a site using the 3.0.6 update with things not working? I’ve checked against a new clean install locally and then on a few test sites but none have any issues with the basic settings in place.

    The more data we can get to check for issues the quicker things can get sorted out.

    Plugin Author Devin Vinson

    (@dvinson)

    3.0.6.1 bugfix should get the last update updated fully. I’ve got follow-up posts emailing me on this one so if anyone has issues after the bugfix update ping away.

    Hi Devin,
    Thank you for your efforts, but it still doesn’t work. My site is
    https://paleosmak.pl and everywhere I click I get the image URL in the browser.
    I hope you will be able to finally fix it ??
    Thank you for a fantastic plugin and all your support.

    Devin,

    you can check also here:
    https://ramon253.udiburg.com/%D7%9E%D7%A4%D7%92%D7%A9-%D7%95%D7%AA%D7%99%D7%A7%D7%99%D7%9D-2004-%D7%A2%D7%9E%D7%95%D7%93-1/

    Nothing work here or on any other page on the site.
    Should I replace to Responsive Lightbox like it was recommended here?

    Plugin Author Devin Vinson

    (@dvinson)

    @grzegorz.Janoszka – Clear any caching plugins active so the plugin updates can take effect. The current cache is from the 18th still looking at the source on that link.

    @007me – What version of WordPress are you running?

Viewing 15 replies - 1 through 15 (of 41 total)
  • The topic ‘Stopped Working with 4.4 Update’ is closed to new replies.