• Resolved gerg1

    (@gerg1)


    I work for a digital marketing company as a web developer. One of our clients runs the website https://www.ssinorthamerica.com/.
    They use the Custom Post Type UI plugin and we’ve discovered an issue with the plugin. They use the plugin for pages like this one https://www.ssinorthamerica.com/pentadecor-3d-laminates/, to display popups for bigger images/info about materials they sell or have. The issue is on that page the website locks up and the user can’t click any of the nav menu items or any links on the page. The user can only open the little info icon on each box but not the expand button.

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

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Normally I’d suggest reaching out to theme support, but it sounds like you may be the theme support.

    This is likely much more an issue with how the page is being created and more specifically something to do with some javascript being implemented. It very much feels like some JS somewhere is preventing the default click handling, and potentially across more of the page than intended. However, I’m not managing to determine what, from my quick poking around with my browser dev tools.

    We don’t directly interact with the frontend and the themes with CPTUI itself, what we would be doing is merely getting the post types and taxonomies registered as appropriate.

    Thread Starter gerg1

    (@gerg1)

    What would you suggest for trying to debug this issue?

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Not sure how live the site is, but i’d start by commenting out any javascript file loading/enqueuing till the issue goes away, and then slowly re-add each, refreshing after each one, until the issue comes back.

    Not sure if it’d be feasible, possible, or potentially helpful to temporarily switch themes, but that may at least confirm it’s coming from the theme itself.

    Thread Starter gerg1

    (@gerg1)

    We found that this script was causing the Nav menu / links to break:

    <!-- SCRIPT BREAKING NAV
    <script>
    jQuery( document ).ready(function($) {
    /* Basic Gallery */
    /* $( '.swipebox-custom' ).click(function(e){
    e.preventDefault();
    
    var gallery = [];
    $( '.swipebox-custom' ).each(function(){
    var imageobj = new Object();
    imageobj.href = $(this).attr('data-href');
    imageobj.title = $(this).attr('title');
    gallery.push( imageobj);
    });
    $.swipebox( gallery );
    }); */
    $( '.swipebox-custom' ).swipebox();
    $( '.box-modal' ).click(function(){
    var id = $(this).attr( 'data-id' );
    $( '#'+id ).show();
    return false;
    });
    $('.hover_bkgr_fricc').click(function(){
    $('.hover_bkgr_fricc').hide();
    });
    $('.popupCloseButton').click(function(){
    $('.hover_bkgr_fricc').hide();
    });
    //$( '.swipebox-custom' ).swipebox();
    });
    </script>
    -->

    Disabling the script stops the swatches at the bottom of the page to not pop up anymore

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Good find, but doesn’t necessarily help get things resolved and workable for everything. Not sure what to suggest regarding getting around that and still retaining use of the lightbox functionality.

    Thread Starter gerg1

    (@gerg1)

    I don’t know too much javascript to try and debug the code, but this section `$( ‘.swipebox-custom’ ).click(function(e){
    e.preventDefault();

    var gallery = [];
    $( ‘.swipebox-custom’ ).each(function(){
    var imageobj = new Object();
    imageobj.href = $(this).attr(‘data-href’);
    imageobj.title = $(this).attr(‘title’);
    gallery.push( imageobj);
    });
    $.swipebox( gallery );
    });`
    Seems to be the main cause. commenting it out, lets links work again but the popup feature doesn’t

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Is this a spot that was inherited when you were brought in for this client? or is it something done custom since you started? Trying to determine who you could potentially reach out to regarding it.

    From what I know, it’s trying to gather up all the items with the “swipebox-custom” class, and create new objects out of it, assigning each box’s data-href attribute and the title, before pushing into this gallery plugin.

    I just don’t have a good solution to get around this.

    Thread Starter gerg1

    (@gerg1)

    Our company didn’t build the website. As far as I’m aware the function was working when we acquired this website.

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Hmm. Good to know, but also doesn’t bring me anything new to suggest regarding the issue overall.

    Thread Starter gerg1

    (@gerg1)

    I just tested the code again without commenting anything out and links work still but the popup feature doesnt.

    Thread Starter gerg1

    (@gerg1)

    Correction. We’ve been testing majority of this issue on a copy of the website on our server. The live website is on another server. If I keep the script normal with no commenting out on the test site, Nav menu/links work but not the popup feature.

    If I do the same thing on the live site, If I comment out certain sections of the script: the nav/links are still broken, the info popup works but not the image expand popup
    If comment the whole script out: nav/links work, neither popup works

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Wish I had more to contribute here, but this is essentially a theme/theme functionality issue more than anything with CPTUI at the moment.

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

The topic ‘Plugin causing pages to get stuck’ is closed to new replies.