Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pkp/pkp-lib#10511 fix and cleanup invalid series navigation menu items #1772

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

kaitlinnewson
Copy link
Member

No description provided.

YvesLepidus and others added 2 commits November 22, 2024 10:49
…rt a menu item with the series type.

Signed-off-by: yves <[email protected]>
…map with keys.

Co-authored-by: Jonas Raoni Soares da Silva <[email protected]>
Copy link
Contributor

@jonasraoni jonasraoni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @kaitlinnewson! I just requested one update.

@jonasraoni
Copy link
Contributor

Ah, I've spotted another problem...

The offending menu item can be the parent of other menu items, so if you remove it, the dependent items will be gone as well... In fact not, because a foreign key was forgotten (I'll create/update another issue to cover it), anyway, it needs to be addressed 🙃

So again, we have two options:

  • Removing such item should cause its children to take its place on the tree.
  • We setup the path with null and "convert" such items to a placeholder (it doesn't exist, so the closest to it would be a URL item pointing perhaps to ./).

@jonasraoni
Copy link
Contributor

FYI the current behavior is to hide everything which is under an orphan menu item, which I don't think it's ideal 🤔

@kaitlinnewson
Copy link
Member Author

@jonasraoni PR has been updated and ready for another look. I noticed there is only one level of nesting in the menus, so I opted to set the parent to null instead, which keeps it assigned in the navigation menu. Alternatively we could delete it from navigation_menu_item_assignments and then it would still exist but just not be assigned to the menu.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[OMP] Fatal error when creating a series menu item without content
3 participants