Skip to content

3.4-beta1: Plugin menu label consisting of multiple words breaks unfolding menu #10984

@peteeckel

Description

@peteeckel

NetBox version

v3.4-beta1

Python version

3.8

Steps to Reproduce

  1. Create a plugin menu with more than two words, separated by a blank, as its label:
menu = PluginMenu(
    label="NetBox DNS",
    groups=(
        ("DNS Configuration", (view_menu_item,
                               nameserver_menu_item,
                               zone_menu_item,
                               record_menu_item,
                               managed_record_menu_item)),
    ),
    icon_class='mdi mdi-dns',
)
  1. After restarting NetBox, open the GUI at the main menu
  2. Click on the plugin menu name

Expected Behavior

The plugin menu opens, showing the menu items.

Observed Behavior

The plugin menu is displayed in the side bar, but does not unfold when clicking on it. The tooltip for the menu shows "Go to #menuNetBox%20DNS on this page".

When you navigate to a page belonging to the plugin by entering the URL (e.g. plugins/netbox-dns/records/), the menu is displayed correctly and unfolded.

Screenshot 2022-11-19 at 18 22 42

However, after clicking on it to collapse it it is unresponsive again and the problem is the same as above. Reloading the page reopens the menu as long as one does not navigate away from the plugin specific page.

It can be worked around by removing the blank from the menu label (e.g. NetBoxDNS). Without a blank in the name everything works as expected.

Metadata

Metadata

Assignees

Labels

betaConcerns a bug/feature in a beta releasestatus: acceptedThis issue has been accepted for implementationtype: bugA confirmed report of unexpected behavior in the application

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions