Fixed processing of NavBarModule for process tickets and submenus #463
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Proposed change
EDIT: Extended the fix.
The customer frontend in Znuny 7 changed in a way that there are no sub menus by default anymore. The processing of NavBarModule for process tickets doesn't work correctly after this change.
It adds an 'empty' menu entry that is clickable and will be highlighted on mouse over.
This problem was also the reason for the bug #355. This bug has been fixed by hiding the wrongly created empty sub menus.
My fix stops the creation of the wrong submenus, so i also reverted the fix for that problem and added some css, so that sub menus now work normally and in a small window.
This all is because the entry for process tickets isn't deleted correctly and the NavBarModule-hash get's a bit scrambled up.
Before the NavBarModule for process tickets is checked it looks like this:
After the NavBarModule for process tickets tries to delete the entry for process tickets:
With this fix, the entry get's deleted correctly:
1 - 🐞 bug 🐞
Breaking change
I removed the return of the menu entries, since they are passed as a reference anyways. This might be a breaking change if there are NavBarModule in use that i don't know about, but they would likely also create ghost entries and would have to be changed.
Checklist