Hi,
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
#...
end

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.

Ondra

-- 
You received this message because you are subscribed to the Google Groups 
"foreman-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to foreman-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to