Announcement

Collapse
No announcement yet.

Standard Facet show/hide trigger

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Standard Facet show/hide trigger

    The Primary branch of a dev site is Shadows 2. They show/hide as expected.
    The dev branch has a lot more going on and the same standard facet defaults to HIDE mode. The click doesn't expand to the facet options -- SHOW the facets. The facet data is being created. My conclusion there is a conflict or an ITEM isn't turned on in the branch. I've checked and these appear to be a match to the primary branch. If that's the case it's likely a JS error, which the console shows as a "queryselector" error. How or what is missing or conflicting?

    Thanks,

    Scott
    Need to offer Shipping Insurance?
    Interactive Design Solutions https://www.myids.net
    MivaMerchant Business Partner | Certified MivaMerchant Web Developer
    Competitive Rates, Custom Modules and Integrations, Store Integration
    AutoBaskets|Advanced Waitlist Integration|Ask about Shipping Insurance Integration
    My T-shirt Collection is mostly MivaCon T-shirts!!

    #2
    Hi Scott,

    What is the "queryselector" error you are seeing? I have not experienced an issue when using a branch like this; although there weren't any big changes.
    Matt Zimmermann

    Miva Web Developer
    Alchemy Web Development
    https://www.alchemywebdev.com
    Site Development - Maintenance - Consultation

    Miva Certified Developer
    Miva Professional Developer

    https://www.dev4web.net | Twitter

    Comment


      #3
      Here it is:

      json.mvc?Store_Code=S&Function=JavaScriptCombinedR esource_Output&JavaScriptCombinedResource_Code=scr ipts&T=c069f55f:685

      Uncaught TypeError: Cannot read properties of null (reading 'querySelector')
      at json.mvc?Store_Code=S&Function=JavaScriptCombinedR esource_Output&JavaScriptCombinedResource_Code=scr ipts&T=c069f55f:685:28
      at json.mvc?Store_Code=S&Function=JavaScriptCombinedR esource_Output&JavaScriptCombinedResource_Code=scr ipts&T=c069f55f:897:2
      Scott
      Need to offer Shipping Insurance?
      Interactive Design Solutions https://www.myids.net
      MivaMerchant Business Partner | Certified MivaMerchant Web Developer
      Competitive Rates, Custom Modules and Integrations, Store Integration
      AutoBaskets|Advanced Waitlist Integration|Ask about Shipping Insurance Integration
      My T-shirt Collection is mostly MivaCon T-shirts!!

      Comment


        #4
        Hi Scott,

        Are you able to see any issues at those line items?
        Matt Zimmermann

        Miva Web Developer
        Alchemy Web Development
        https://www.alchemywebdev.com
        Site Development - Maintenance - Consultation

        Miva Certified Developer
        Miva Professional Developer

        https://www.dev4web.net | Twitter

        Comment


          #5
          No. The JS appears to be in the mini-basket function:

          685:
          let mbContent = mbElement.querySelector('[data-hook="mini-basket__content"]');
          897: closing curly brace.

          When I disable the item on the page, the error isn't changing.
          Also, no items in the basket.
          If there is an issue with the mini-basket, could the Facet not triggering just be a side-effect? Shouldn't have been taken care of by disabling the mini-basket? There isn't any code in the mini-basket function that is dependent on facets is there?

          Scott

          Need to offer Shipping Insurance?
          Interactive Design Solutions https://www.myids.net
          MivaMerchant Business Partner | Certified MivaMerchant Web Developer
          Competitive Rates, Custom Modules and Integrations, Store Integration
          AutoBaskets|Advanced Waitlist Integration|Ask about Shipping Insurance Integration
          My T-shirt Collection is mostly MivaCon T-shirts!!

          Comment


            #6
            Hi Scott,

            To the best of my memory, none of the Shadows extensions are reliant on any of the others. Does the site use the mini-basket? If not, then you might try removing the script.
            Matt Zimmermann

            Miva Web Developer
            Alchemy Web Development
            https://www.alchemywebdev.com
            Site Development - Maintenance - Consultation

            Miva Certified Developer
            Miva Professional Developer

            https://www.dev4web.net | Twitter

            Comment


              #7
              It happens with and without the miniBasket on. But, I just found this fun piece of code in the Facet layout:

              Code:
              <mvt:assign name="g.facet_listings" value="'&' $ l.settings::facet:code $ '=' $ l.settings::facet_value:value"/>
              I can't even speculate and will assume it's a bug. What is with the double colon?

              Scott
              Need to offer Shipping Insurance?
              Interactive Design Solutions https://www.myids.net
              MivaMerchant Business Partner | Certified MivaMerchant Web Developer
              Competitive Rates, Custom Modules and Integrations, Store Integration
              AutoBaskets|Advanced Waitlist Integration|Ask about Shipping Insurance Integration
              My T-shirt Collection is mostly MivaCon T-shirts!!

              Comment


                #8
                Hi Scott,

                Yeah, that looks like a typo; thanks for alerting me to it.
                Matt Zimmermann

                Miva Web Developer
                Alchemy Web Development
                https://www.alchemywebdev.com
                Site Development - Maintenance - Consultation

                Miva Certified Developer
                Miva Professional Developer

                https://www.dev4web.net | Twitter

                Comment


                  #9
                  Unfortunately, it doesn't appear to have solved this issue. Is the JS required to trigger the facet show/hide also in extensions.js? If not, can you tell me where and maybe even what function?
                  The other question about the facets is, isn't the default to "show" facets?

                  Scott
                  IDS
                  Need to offer Shipping Insurance?
                  Interactive Design Solutions https://www.myids.net
                  MivaMerchant Business Partner | Certified MivaMerchant Web Developer
                  Competitive Rates, Custom Modules and Integrations, Store Integration
                  AutoBaskets|Advanced Waitlist Integration|Ask about Shipping Insurance Integration
                  My T-shirt Collection is mostly MivaCon T-shirts!!

                  Comment


                    #10
                    Hi Scott,

                    Yes, the default should be for the facets to be "open". On the facet content there should be an attribute, "data-a11y-toggle-open", if that is what you are looking for. This functionality is controlled by the Show Related extension.
                    Matt Zimmermann

                    Miva Web Developer
                    Alchemy Web Development
                    https://www.alchemywebdev.com
                    Site Development - Maintenance - Consultation

                    Miva Certified Developer
                    Miva Professional Developer

                    https://www.dev4web.net | Twitter

                    Comment


                      #11
                      OK. Thanks.
                      Need to offer Shipping Insurance?
                      Interactive Design Solutions https://www.myids.net
                      MivaMerchant Business Partner | Certified MivaMerchant Web Developer
                      Competitive Rates, Custom Modules and Integrations, Store Integration
                      AutoBaskets|Advanced Waitlist Integration|Ask about Shipping Insurance Integration
                      My T-shirt Collection is mostly MivaCon T-shirts!!

                      Comment

                      Working...
                      X