Closed (fixed)
Project:
Simplenews
Version:
3.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
30 Dec 2020 at 14:53 UTC
Updated:
14 Feb 2021 at 15:14 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
berdirThe problem is that you can't have hardcoded menu links/local tasks/actions that depending configuration. needs to be moved to a alter hook to check if the view exists. Or the opposite, remove it if it doesn't.
Comment #3
adamps commentedThe right place to define a menu is directly on the view. However the view already has a menu tab and we can't define both on the view.
I did some testing (see code below) and it seems that hook_menu_links_discovered_alter() doesn't get called when a view is enabled/disabled. Probably it can be done with a deriver class but I'm out of time for now.
Comment #4
mohit.bansal623 commentedI have removed that menu.yml code as that route does not exists anywhere. After that it works fine.
Comment #5
adamps commentedThe route comes from the view
views.view.simplenews_newsletters.yml.However I think I am in favour of the simple option of just removing the link. It's not a huge loss and the current bug is major. If we solve #3053111: Issue status should not be stored on issue entity then we can most likely put the link back with a route entity.simplenews_issue_status.collection. I will add a @todo comment then commit.
Comment #6
mohit.bansal623 commented@AdamPS, please review. If we have separate issue for the same, we can close this ticket.
Comment #7
adamps commentedI suggest that the work required is:
Thanks
Comment #8
adamps commentedComment #11
adamps commented