Are you a GenerateCustomer?

Do you have an active GP Premium or GenerateBlocks Pro license key?

Create a GenerateSupport account for GeneratePress and GenerateBlocks support in one dedicated place.

Create an account
Already have a GenerateSupport account? Login

Just browsing?

Feel free to browse the forums. Support for our free versions is provided on WordPress.org (GeneratePress, GenerateBlocks).

Want to become a premium user? Learn more below.

GB Pattern Library thumbnails not loading

  • A quick headsup.
    Tracked the issue down to the Footer Scripts in GP Elements.
    The DOMContentLoaded event listener is being called on each preview load, as each preview is an actual front end render. And for some reason Chrome has a ( bigger ) issue with that.
    We will take a look at what we can do to prevent this in the preview, although i am not sure what yet.

    Will keep you updated.

    In the meantime , the Element you could set the USER Display Rules to Logged Out , it won’t fire then in the admin ( or on the front end for logged in users ).

  • Understood. Thanks.

    If you can think of any script alternatives, let me know.

  • You’re code just needs to conditional checks, try this:

    
    document.addEventListener('DOMContentLoaded', function() {
        var closeButton = document.querySelector('.plp-footer-alert-close-button');
        var banner = document.querySelector('.plp-footer-alert');
    
        // Check if sessionStorage has the 'bannerHidden' key and if its value is 'true'
    
        if ( banner && sessionStorage.getItem('bannerHidden') === 'true') {
    	banner.classList.add('plp-footer-alert-close');
        }
    
        if ( closeButton ) {
            closeButton.addEventListener('click', function(event) {
    	    event.preventDefault(); // Prevent the default link click action
    	    banner.classList.add('plp-footer-alert-close');
    	    sessionStorage.setItem('bannerHidden', 'true');
            });
        }
    });
    

    It simply checks that the queried objects are found before it tries to add the event listeners

  • Nice. Much appreciated.

  • With that new script you should notice an improvement in the pattern library with the current release version of GB.

    Thank you for sharing the server login, as this issue has helped us to identify other areas for improvement, which we will be pushing out at a later date.

    So thanks again, we no longer need the login.

  • Philip Gledhill

    “Patch for the chrome loading issue.”

    I use a Windows 10 local host using XAMPP and Microsoft Edge.
    All software is up to date.

    Only the first few patterns loaded in any tab, but the patch worked for me.
    Thank you.

Viewing 6 posts - 17 through 22 (of 22 total)
  • You must be logged in to reply to this topic.