• Resolved NightL

    (@nightl)


    WP Lightbox 1.4.9.3 coexists with Autoptimize 3.1.10 to their latest 3.1.11

    Since WP Lightbox 1.5 through to 1.5.3 some div and list layouts, nothing to do with WP Lightbox, lose their set widths and display at 100% width. Media player controls lose layout and functionality. WooCommerce products listed outside of archive page which are supposed to display in list columns go individually full width with bullet points added where they should be none.

    If I turn Autoptimize off the issue disappears.

    If I roll back to WP Lightbox 1.4.9.3 the issue disappears.

    I tried unchecking “Load JavaScripts in page footer” in WP Lightbox 1.5 settings – this made no difference.

    The website link I have provided has WP Lightbox rolled back to 1.4.9.3 – the containing product lists on that page display individually at full width with bullet points when WP Lightbox 1.5 and higher is installed with Autoptimize active.

    I have the same issue on other websites with divs used for media players.

    • This topic was modified 8 months, 2 weeks ago by NightL.

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

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Contributor LightPress

    (@pandaboxwp)

    Hi,

    Unfortunately, this sounds like it could be complicated to troubleshoot and/or resolve. I will say, the changes to our plugin for 1.5 were quite minor, and very unlikely to introduce conflicts. We basically added some options to adjust a few elements of the lightbox.

    As a troubleshooting step, can you try going to Autoptimize’s settings page, unchecking the box to ‘Optimize JavaScript Code’, then check and see if you still have the issue?

    If so, try doing the same for CSS code.

    Thread Starter NightL

    (@nightl)

    Disabling “Optimise JavaScript Code?” in Autoptimize made no difference – still errors in layout.

    Disabling “Optimise CSS Code?” removed errors

    With “Optimise CSS Code?” on but “Also aggregate inline CSS?” disabled – fixed the issues I previously mentioned (but caused other problems unrelated to WP Lightbox).

    Seems I will have to find the css for WP Lightbox 1.5 to exclude in Autoptimize.

    • This reply was modified 8 months, 2 weeks ago by NightL.
    Plugin Contributor LightPress

    (@pandaboxwp)

    Great. Thanks for the extra testing. I’ll try to play around with our plugin, Autoptimize, and some third party plugins to see if I can duplicate.

    In the meantime, yes, you might play around with the options there, or try to exclude lightbox css specifically from the CSS optimizations to see if you can find a quicker fix.

    Thread Starter NightL

    (@nightl)

    I tried excluding lightbox.css, lightbox.min.css (and together), overrides.css – made no difference.

    I am away from internet for a couple of days – but can put a couple of impacted sites on staging for you to check out if it has not been resolved.

    I have nine websites with WP Lightbox?& Autoptimize combination. I stopped updating WP Lightbox when I found the issue on two sites. The site I listed here is list columns – the other is divs containing media players.

    Thread Starter NightL

    (@nightl)

    this is a screen capture of how the issue impacted the website I referred to in my first post
    https://www.dropbox.com/scl/fi/lr7h7a8ap92drckllizla/screencapture-blueearthestate-co-nz-2024-03-14-12_00_22.png?rlkey=jbzyfqtkbmtfinfckrqeje25e&dl=0

    I appreciate this update my not be an error as such – but it may impact others who will be looking for answers or information on what CSS to exclude in Autoptimize

    Plugin Contributor LightPress

    (@pandaboxwp)

    Hi – thanks for the additional detail. Given what you mentioned about inline CSS above, one thing I’d be interested to try (if you are comfortable making changes to PHP files), is to have you comment out one new line of code in our plugin that adds some inline css.

    If you go to wp-content/plugins/wp-jquery-lightbox/wp-jquery-lightbox.php, and then go to line 166, you’ll see a line that has

    wp_add_inline_style( 'jqlb-overrides', $custom_css );

    That was added recently, since 1.5. I’d be curious if you comment that line out, does the issue go away (note though that commenting this out could affect how some lightbox options/styles are applied). This is something I’d try as a quick check if I had access to your site.

    Thread Starter NightL

    (@nightl)

    the layout issue went away after commenting that line out

    Plugin Contributor LightPress

    (@pandaboxwp)

    Well, it’s good that we have a clearer sense where the issue lies. On the other hand, that’s a very routine WordPress function, so us using it should not be causing issues with another plugin. But that gives me a direction to look for why a conflict might be happening. I will try to dig into that by early next week.

    Thread Starter NightL

    (@nightl)

    To solve the issue I added
    jqlb-overrides
    to the Autoptimze CSS exclusion list

    • This reply was modified 6 months ago by NightL.
Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Clash with Autoptimize since WP Lightbox 1.5 causing list and div layout issues’ is closed to new replies.