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
    What help do you need today!
    Interactive Design Solutions http://www.southbound.com
    MivaMerchant Business Partner | Certified MivaMerchant Web Developer
    My T-shirt Collection is mostly MivaCon T-shirts!!
    Competitive Rates, Popular Modules, and Integrations:
    Product Copy | AutoBaskets | Waitlist Integration| Wholesale Integration

    #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
    Front-End Development Director / Miva, Inc.

    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
      What help do you need today!
      Interactive Design Solutions http://www.southbound.com
      MivaMerchant Business Partner | Certified MivaMerchant Web Developer
      My T-shirt Collection is mostly MivaCon T-shirts!!
      Competitive Rates, Popular Modules, and Integrations:
      Product Copy | AutoBaskets | Waitlist Integration| Wholesale Integration

      Comment


        #4
        Hi Scott,

        Are you able to see any issues at those line items?
        Matt Zimmermann
        Front-End Development Director / Miva, Inc.

        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

          What help do you need today!
          Interactive Design Solutions http://www.southbound.com
          MivaMerchant Business Partner | Certified MivaMerchant Web Developer
          My T-shirt Collection is mostly MivaCon T-shirts!!
          Competitive Rates, Popular Modules, and Integrations:
          Product Copy | AutoBaskets | Waitlist Integration| Wholesale Integration

          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
            Front-End Development Director / Miva, Inc.

            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
              What help do you need today!
              Interactive Design Solutions http://www.southbound.com
              MivaMerchant Business Partner | Certified MivaMerchant Web Developer
              My T-shirt Collection is mostly MivaCon T-shirts!!
              Competitive Rates, Popular Modules, and Integrations:
              Product Copy | AutoBaskets | Waitlist Integration| Wholesale Integration

              Comment


                #8
                Hi Scott,

                Yeah, that looks like a typo; thanks for alerting me to it.
                Matt Zimmermann
                Front-End Development Director / Miva, Inc.

                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
                  What help do you need today!
                  Interactive Design Solutions http://www.southbound.com
                  MivaMerchant Business Partner | Certified MivaMerchant Web Developer
                  My T-shirt Collection is mostly MivaCon T-shirts!!
                  Competitive Rates, Popular Modules, and Integrations:
                  Product Copy | AutoBaskets | Waitlist Integration| Wholesale Integration

                  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
                    Front-End Development Director / Miva, Inc.

                    Comment


                      #11
                      OK. Thanks.
                      What help do you need today!
                      Interactive Design Solutions http://www.southbound.com
                      MivaMerchant Business Partner | Certified MivaMerchant Web Developer
                      My T-shirt Collection is mostly MivaCon T-shirts!!
                      Competitive Rates, Popular Modules, and Integrations:
                      Product Copy | AutoBaskets | Waitlist Integration| Wholesale Integration

                      Comment

                      Working...
                      X