Uploaded image for project: 'A/B Testing'
  1. A/B Testing
  2. ABTEST-531

Test variants on root page breaks navfn.navItems function

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Neutral
    • None
    • 1.0.1
    • None

    Description

      We are using a slightly modified version of the MTK navigation macro example for building the navigation menu. The relevant part:

       

      [#assign siteRoot = cmsfn.siteRoot(content)]
      <ul class="navbar-nav">
          [#assign navItemsRootLevel = navfn.navItems(siteRoot)]    
          [#list navItemsRootLevel as navItemRoot] 
          <a href="${navfn.link(navItemRoot)!'#'}">          ${navItemRoot.navigationTitle!navItemRoot.title!navItemRoot.@name!' '}</a>
      ...

      The siteRoot assignment seems to be correct (it's path is '/home' in our case) but the navItems list comes back as an empty list when the ab test is running. Pausing or aborting it is enough for the menu to reappear.

       

      Steps to reproduce

      1. Creating ab test variants on the root page
      2. Using  navfn.navItems templating function to build the menu
      3. when the test runs the menu disappears
      4. pausing the test makes the menu reappear

      Please check whether it's a bug or an error on our approach, and advice for a workaround or a different method to build the menu.

       

      Checklists

        Acceptance criteria

        Attachments

          1. All-tests-A-B-n-Testing-CLOUD.png
            All-tests-A-B-n-Testing-CLOUD.png
            194 kB
          2. image-2022-08-31-09-48-40-067.png
            image-2022-08-31-09-48-40-067.png
            557 kB
          3. image-2022-08-31-09-50-10-862.png
            image-2022-08-31-09-50-10-862.png
            565 kB
          4. image-2022-09-02-13-25-00-277.png
            image-2022-09-02-13-25-00-277.png
            194 kB
          5. Travel-Home.png
            Travel-Home.png
            1.46 MB
          6. Travel-Home-1.png
            Travel-Home-1.png
            1.46 MB

          Activity

            People

              Unassigned Unassigned
              vpeter Peter Varga
              AuthorX
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:

                Checklists

                  Bug DoR
                  Task DoD