I having an issue with the installation logic of a custom module. I am trying to add menu links using
menu_link_save() that link to a view that is defined in my module in
I am creating a new site using a installation profile that installs this custom module by default. I'm not sure if this is related to being in the install/update environment instead of the normal page environment.
The problem I am having is that the view hasn't created any route in the menu_router table. When I add a link I get a row in menu_links, but the router_path column is empty and the row gets deleted by Drupal when it decides to rebuild the menus.
Is there way to cause the view to populate the menu_router table so that I can add links normally? Is there another way I can use for this? I would like to be able to keep my profile and, rely on a single site install action instead of having to do something after installing, as follow up.
The link never appears; Drupal deletes it from the menu_links table.