cp-nav
cp-nav copied to clipboard
Missing "products" menu entry from Craft Commerce
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
Whereas if I disable the plugin, it's shown properly
Steps to reproduce
- Install cp-nav
- Install craft commerce
- Products entry is not shown under Commerce section
- Disable cp-nav
- Products entry is shown
Craft CMS version
4.3.6.1
Plugin version
4.0.9
Multi-site?
No
Additional context
No response
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.
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.
Yep, a good idea!