Sign In   Register

This article describes an issue found in Maestro forms built on the maguire-template, where a Page Load Rule is executed twice when using the Narrator controller component.

Applicable To

  • Product: Journey Maestro, Journey Springboard
  • Versions: All versions before 24.04

Prerequisites

    • Access to Journey Maestro.

    Problem

    When a Page Load Rule is applied to either the Page, or Narrator Page components in a form, using the Narrator with Maestro version below 24.04, the Page Load Rule is triggered twice.

    Steps to Reproduce

    1. Create a simple Maestro form.
    2. Assuming you already have an existing Narrator component library, add the Narrator controller component at the beginning of the Maestro form, and include a Narrator page or a new page in the form content.  
    3. Map the new page by going to Narrator controller > Properties > Page mapping. Then, provide the Key and Field reference values.
    4. Create a page load rule for the first page in the form with a simple console.log() statement.
    5. Save and build the form.
    6. We can now see two logs in the console when the first page of the form loads.

    Workaround

    The Default Click processing in the Maguire Template has been changed for the Continue and Back buttons. It is recommended to use the following code on the first page’s form load rule: Page > Properties > Page Load.

    // Workaround to stop the code below from triggering twice
    if (Form.getCurrentPageId() == data.pageLoaded){ return; }
    data.pageLoaded = Form.getCurrentPageId();

    Resolution

    • Use the Avalon template instead of Maguire, or
    • Upgrade to Maestro 24.10 or later version and update the Narrator component library to version 1.0.2 or above.

    Reference