• Resolved gipraw

    (@gipraw)


    Using Elementor’s lightbox, so disabled the OceanWP lightbox JS in Theme Panel -> Scripts & Styles, in order to avoid two lightboxes opening.

    This action seems to remove style.min.css from the preview when editing those pages in Elementor, most evident with an unstyled header/footer menu, and other styling quirks. Re-enabling the lightbox js restores the correct styles.

    Disabling various other scripts here seems not to do this.

Viewing 10 replies - 1 through 10 (of 10 total)
  • Theme Author oceanwp

    (@oceanwp)

    Hello, if this option doesn’t work, you can disable the Elementor lightbox via Elementor > Settings, click on the Style tab and uncheck the “Image Lightbox” field.

    Thread Starter gipraw

    (@gipraw)

    Thank you for the suggestion, and the nice theme.

    I would prefer to use the Elementor lightbox, as it works well on mobile.

    Since this seems like a bug I am noting it, and I am curious if it might be addressed.

    Thanks

    Theme Author oceanwp

    (@oceanwp)

    Hello, unfortunately, I cannot do anything, on some host the Scripts & Styles feature doesn’t work well.
    You have this issue only when you disable the Lightbox script or any other script?

    Thread Starter gipraw

    (@gipraw)

    This only happens with the Lightbox script, from the ones I’ve tried. It also seems to work fine outside of the Elementor editor frame… so I’m a bit confused about what is happening.

    I can make changes to the host, so if I know a bit more I might be able to resolve.

    Also would be ok with forcing it to not load somehow, manually or through child theme?

    Theme Author oceanwp

    (@oceanwp)

    Hi, the lightbox script is in the main JS file so if you want to do this via your child theme, you need to unregister the parent JS file and add the JS codes you want via a new file from your child theme.
    You will need to register this new JS file via the functions.php file but it is quite complicated if you do not have any knowledge with the scripts.

    It is really weird that you have this issue only when you disable the Lightbox script. On some host, when you disable a style or script, your website will have no CSS and JS anymore because the uploads folder and/or the files are not writable but it happen if you disable any scripts or styles not just one.

    Thread Starter gipraw

    (@gipraw)

    This should help.

    I have noticed that while using the https version, console notes main-scripts.js and main-style.css are blocked for being served over http.

    Loading same page on http works fine.

    Thread Starter gipraw

    (@gipraw)

    The other scripts I tested weren’t messing with the css, and the regular style.min.css loaded, so things appeared ok.

    Theme Author oceanwp

    (@oceanwp)

    Hi, for HTTP, you have to do it via your site, I use WP Rocket and there is an option to remove HTTP from scripts and styles for not having this kind of problem.

    Thread Starter gipraw

    (@gipraw)

    I was able to resolve things by forcing everything over ssl going forward.

    Thanks for your assistance.

    Theme Author oceanwp

    (@oceanwp)

    Hello, I had not even thought about this, glad that your problem is solved ??

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Disabling Lightbox in Scripts & Styles breaks CSS in Elementor editor’ is closed to new replies.