Community Forums

Welcome to the community forums! Wants you register, you'll have access to submit anything that is related to the categories.

  1. Please note that our support is not available every week from : Thursday 15:00 (GMT+2) to Saturday 13:00 (GMT+2)
    Dismiss Notice

Resolved stickyMojo error when hiding breadcrumb

Discussion in 'Suggests & Bugs Report' started by justinhowe, Dec 12, 2016.

  1. justinhowe

    justinhowe New Member Dec 12, 2016


    When hiding the breadcrumb on forum home in [Doh Theme] --> General style settings, or when hiding the bottom breadcrumb on the same settings page, there is an error on page load indicating that function 'top' is undefined for settings.footerID.offset() in stickyMojo.js. This is because, on page load, you are injecting:

    $('.sidebar').stickyMojo({footerID: '.breadBoxBottom', contentID: '.mainContainer'});
    however the style .breadBoxBottom is set as 'display: none;' when the bottom breadcrumb or the forum home breadcrumb is disabled. As you may know, jQuery cannot read the top (or any) value of offset() when the element being called is display:none, hence why 'top' is undefined.

    Since I don't use sticky sidebars, I simply disabled the "Sticky Sidebar" option in [Doh Theme] --> Sidebar which of course resolves the problem since the xen:if block that contains the offending code above does not execute. But for those users of yours who do use sticky sidebar, I would wrap the .breadBoxBottom element in another div (like .breadBoxBottomContainer) and call this instead, which should resolve the error since you're no longer setting a value that's display:none if the user hides the breadcrumb on forum home, or the bottom breadcrumb all together :

    $('.sidebar').stickyMojo({footerID: '.breadBoxBottomContainer', contentID: '.mainContainer'});
  2. Dohtheme

    Dohtheme Administrator Staff Member Feb 1, 2017

    Fixed on Tomorrow's update

    justinhowe likes this.
  3. ClubRunner

    ClubRunner New Member Apr 4, 2017

    I'm still getting this, or a similar issue:

    Uncaught TypeError: Cannot read property 'top' of undefined
        at calculateLimits (stickyMojo.js:64)
        at stick (stickyMojo.js:105)
        at dispatch (jquery-1.11.0.min.js:3)
        at r.handle (jquery-1.11.0.min.js:3)

Share This Page