verbb / cp-nav

Control Panel Nav is a Craft CMS plugin to help manage your Control Panel navigation.
MIT License
130 stars 11 forks source link

Missing "products" menu entry from Craft Commerce #120

Open goraxan opened 1 year ago

goraxan commented 1 year ago

Describe the bug

After installing Craft Commerce (v4.2.4) I've noticed that the "Products" menu entry is missing, it only shows up if I disable the cp-nav plugin. Looks like it doesn't detect it image Whereas if I disable the plugin, it's shown properly image

Steps to reproduce

  1. Install cp-nav
  2. Install craft commerce
  3. Products entry is not shown under Commerce section
  4. Disable cp-nav
  5. Products entry is shown

Craft CMS version

4.3.6.1

Plugin version

4.0.9

Multi-site?

No

Additional context

No response

engram-design commented 1 year ago

This would be due to the conditional logic of only showing products when there are product types. We don't currently check for subnav items on whether they're updated or not (we do for top level items) purely for performance reasons. We really want to minimise the amount of queries run on a CP page request.

The only course of action is to reset the nav (or add the nav item yourself, manually) for the time being.

goraxan commented 1 year ago

Ok, that make sense. It'd be nice to have a "refresh" button to regenerate the entries without loosing your manual changes, though. For now I'll just manually add the "products" entry since I don't want to loose my other manual changes by resetting the nav.

engram-design commented 1 year ago

Yep, a good idea!