Forum Replies Created

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter thomas2070

    (@thomas2070)

    Hi @bensibley

    No worries, I’ve figured out the issue. It turns out there was a conflict with another plugin, ASE pro tools, specifically with the “Disable REST API” option. Turning this off resolved the visitor tracking problem. Sorry for suspecting your plugin, it’s still top-notch, a 10/10! 😀

    Thanks for your prompt response!

    Thomas

    Thread Starter thomas2070

    (@thomas2070)

    Hi @mohsinbsf

    Thanks for your message. I’ve added a small Javascript snippet to my slideshow that does the trick for now. It doesn’t interfere with the original code but monitors any changes in the slideshow div classes. Basically, when ‘swiper-slide-next’ is added, the image is preloaded. This tweak has significantly improved the UX, so I hope you’ll consider incorporating something similar into the product roadmap permanently. I’ve included the code below in case it’s helpful for anyone else.

    Thanks for considering this!

    Best, Thomas

    document.addEventListener("DOMContentLoaded", function () {
        function preloadImage(imgElement) {
            if (imgElement && imgElement.dataset.src && !imgElement.src) {
                imgElement.src = imgElement.dataset.src;
                imgElement.removeAttribute('data-src');
            }
        }
    
        var callback = function (mutationsList, observer) {
            for (var mutation of mutationsList) {
                if (mutation.type === 'attributes' && mutation.attributeName === 'class') {
                    var targetElement = mutation.target;
                    if (targetElement.classList.contains('swiper-slide-next')) {
                        var imgElement = targetElement.querySelector('img');
                        preloadImage(imgElement);
                    }
                }
            }
        };
    
        var observer = new MutationObserver(callback);
        var config = { attributes: true, subtree: true, attributeFilter: ['class'] };
        var targetNode = document.querySelector('.swiper-wrapper');
        if (targetNode) {
            observer.observe(targetNode, config);
        }
    });
    Thread Starter thomas2070

    (@thomas2070)

    Fyi, meanwhile I had a look at the code, this solves the error:

    // complete unclosed tags in $content
    
    if(
    
        defined( 'LIBXML_DOTTED_VERSION' ) &&
    
        version_compare( LIBXML_DOTTED_VERSION, '2.7.0', '>' )
    
    ){
    
        $_errors = libxml_use_internal_errors(true);
    
        $dom = new DOMDocument('1.0', 'UTF-8');
    
        $convmap = array(0x80, 0xffff, 0, 0xffff);
    
        $content_encoded = mb_encode_numericentity('<div>' . $content . '</div>', $convmap, 'UTF-8');
    
        $dom->loadHTML($content_encoded, LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD);
    
        $_content = '';
    
        foreach ($dom->documentElement->childNodes as $child) {
    
            $_content .= $dom->saveHTML($child);
    
        }
    
        $content = $_content;   
    
        libxml_use_internal_errors($_errors);
    
    }
    Thread Starter thomas2070

    (@thomas2070)

    Hi,

    I am using a shortcode.

    See your support mailbox for details to access my staging site

    Thanks,
    Thomas

    Same problem on my website. When disabling the Spectra pro, I could enable the “new window” option. Turning the pro plugin back on afterwards and the option is gone again (although the url still opens in a new window)

    Thread Starter thomas2070

    (@thomas2070)

    Issue was fixed by installing the pro plugin. Not sure what is different, but it works now

Viewing 6 replies - 1 through 6 (of 6 total)