Sebobo / Shel.Neos.CommandBar

A commandbar (CMK+K) for Neos CMS
MIT License
15 stars 2 forks source link

When navigating to a document not yet loaded, the UI crashes #35

Closed PRGfx closed 1 year ago

PRGfx commented 1 year ago

Describe the bug When searching for a document not previously loaded in the document-tree – for example when nested too deeply (for the configured loading-depth) – it shows the node, but selecting it crashes the UI.

To Reproduce Steps to reproduce the behavior:

  1. If necessary configure Neos.Neos.userInterface.navigateComponent.nodeTree.loadingDepth as 1
  2. Open the command bar, select "Search documents", search for a document not currently visible in the document tree
  3. Select the document with enter or clicking on it
  4. See error

Expected behavior The selected page should be loaded.

Environment:

Additional context Console prints an error at https://github.com/neos/neos-ui/blob/16ea86cf1ce85a216bd5e6bfd7b9b9ae62fbbf82/packages/neos-ui/src/Containers/RightSideBar/Inspector/index.js#L39

Cannot read properties of null (reading 'parent')

it seems that the new context-path is set as selected but not actually loaded.

Sebobo commented 1 year ago

Thx for reporting!