I never tried to add items into plugin's menu from another plugin, but I
think the issue here is that plugin registration is not ordered in any way.
So if you have plugin A with
sub_menu :top_menu, :ConfigMonitor
and plugin B with:
menu :top_menu, :patchmanagement, :parent => :ConfigMonitor
your B plugin may be registered before A, so B is trying to add items into
menu that does not yet exist.
You can get list of already registered plugins if you put a breakpoint
right before the Foreman::Plugin.register block in your Engine
and call Foreman::Plugin.registered_plugins
You could try to create a third plugin, whose sole purpose would be to add
menu into navbar and make it a dependency for your existing plugins. Then
adding the items into common menu could work, but I haven't really tried it.
You received this message because you are subscribed to the Google Groups
To unsubscribe from this group and stop receiving emails from it, send an email
For more options, visit https://groups.google.com/d/optout.