[ABTEST-531] Test variants on root page breaks navfn.navItems function Created: 31/Aug/22  Updated: 05/Jan/23

Status: Open
Project: A/B Testing
Component/s: None
Affects Version/s: 1.0.1
Fix Version/s: None

Type: Bug Priority: Neutral
Reporter: Peter Varga Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File All-tests-A-B-n-Testing-CLOUD.png     PNG File Travel-Home-1.png     PNG File Travel-Home.png     PNG File image-2022-08-31-09-48-40-067.png     PNG File image-2022-08-31-09-50-10-862.png     PNG File image-2022-09-02-13-25-00-277.png    
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:
Epic Link: AuthorX Support
Team: AuthorX

 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.

 


Generated at Sun Feb 11 22:57:09 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.