verbb / cp-nav

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

Items keep moving and disappearing. #60

Closed KatieMFritz closed 4 years ago

KatieMFritz commented 5 years ago

Description

I'm only using a single default layout. Items keep showing up in the wrong places in the sidebar. Note Dashboard in this screenshot. Sometimes User Guide isn't showing up at all, especially if Dashboard is disabled. The issue persists and seems to get worse over time.

Screen Shot 2019-08-09 at 6 06 10 PM

Steps to reproduce

  1. Customize default profile
  2. See where items are actually showing up

Additional info

ademers commented 5 years ago

I'm having similar issues. Is the plugin supposed to be compatible with Craft 3.2.x? Thanks!

KatieMFritz commented 5 years ago

Maybe related to #49 ? @ademers have you found any workarounds?

ademers commented 5 years ago

@KatieMFritz No. I'm leaving it for now. Fortunately it's not a show stopper,

engram-design commented 5 years ago

@KatieMFritz Hmmm, I think I'll put this in the 3.0 refactor pile. I can't immediately reproduce this, but I'm going to do things from scratch that'll help a lot with performance, and these sorts of issues.

fthues commented 4 years ago

Here's what I'm seeing:

cpnav-bug

I've got a layout called "Editors" in addition to the default one. There are items missing whenever I activate the "Editors" layout. Things temporarily jump back to normal once I start editing, but when I switch to another layout and back they are gone again.

When I log in as the user group assigned to the new layout the items are missing as well.

Craft Pro 3.3.17 Control Panel Nav 2.0.9 PHP 7.4.0

fthues commented 4 years ago

Any newly created fields get saved to the database with an empty handle. The payload for the XHR request to cp-nav/navigation/new looks like this, note the empty handle:

currLabel=Stations&url=entries%2Fstations&newWindow=&customIcon=&layoutId=2&id=&handle=

The DOM looks like this, note the nav- with missing handle:

Screen Shot 2019-12-10 at 16 39 11

fthues commented 4 years ago

So for whatever reason Craft's HandleGenerator doesn't like the HUD's hidden input field. I changed it to be a regular text field and it works, see my PR #62 for reference.

fthues commented 4 years ago

For anyone affected by this issue: Alternatively you can just edit the cpnav_navigation table manually and insert the missing handles.

engram-design commented 4 years ago

This should be fixed in 3.0.0 thanks to a major refactor with how this was all done.