cp-nav icon indicating copy to clipboard operation
cp-nav copied to clipboard

Missing "products" menu entry from Craft Commerce

Open goraxan opened this issue 2 years ago • 3 comments

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

goraxan avatar Jan 18 '23 11:01 goraxan

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.

engram-design avatar Jan 19 '23 11:01 engram-design

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.

goraxan avatar Jan 19 '23 16:01 goraxan

Yep, a good idea!

engram-design avatar Jan 19 '23 22:01 engram-design