[FREEZE-12] freezeToggle in userMenu - NPE Created: 27/Aug/23  Updated: 27/Aug/23

Status: Open
Project: Freeze
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Neutral
Reporter: Mykola Assignee: Andrew Warinner
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

DX Core 6.2.29


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

 Description   

Steps to reproduce

  1. Create /freeze-configuration light-module
  2. Add decoration for userMenu.yaml
  3. Add toggleFreeze with jcrCommandAction
  4. After reloading try to click new Freeze button while:
    • inside the Pages app with selected node
    • inside the Pages app w/o selected node
    • all applications are closed (in admincentral root)

/freeze-configuration/decorations/admincentral/dialogs/userMenu.yaml

 

actions:
  toggleFreeze:
    label: Toggle Freeze
    $type: jcrCommandAction
    icon: icon-publish
    command: toggleGlobalFreeze
    catalog: freeze
    asynchronous: true

Tried adding 

availability:
  nodes: false
  root: true 

or

availability:
  nodes: false
  root: true
  rules:
    JcrRootRuleDefinition:
      class: info.magnolia.ui.availability.rule.JcrRootRuleDefinition 

First configuration works only when any page in app is selected
Second throws NPE (NullPointerException)
Third sometimes throws a.u.c.b.a.ActionbarPresenter: Action toggleFreeze defined in group publish not found

 

 

 

Expected results

Button should work w/o context of the apps

Actual results

The only way to fire this command from userMenu is to select node in application

 

Module version: magnolia-freeze 2.0


Generated at Mon Feb 12 02:03:25 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.