If you only click the alacarte button in xfce4-panel's menu plugins, alacarte creates the following menu file: <!DOCTYPE Menu PUBLIC '-//freedesktop//DTD Menu 1.0//EN' 'http://standards.freedesktop.org/menu-spec/menu-1.0.dtd'> <Menu> <Name>Xfce</Name> <MergeFile type="parent">/opt/xfce/etc/xdg/menus/xfce-applications.menu</MergeFile> </Menu> This file results in an empty menu; removing the type="parent" makes it work again.
To help with the discussions, this is what the menu specification says about type="parent": If the type attribute is set to "parent" and the file that contains this <MergeFile> element is located under one of the paths specified by $XDG_CONFIG_DIRS, the contents of the element should be ignored and the remaining paths specified by $XDG_CONFIG_DIRS are searched for a file with the same relative filename. The first file encountered should be merged. There should be no merging at all if no matching file is found. It also says: Compatibility note: The filename specified inside the <MergeFile> element should be ignored if the type attribute is set to "parent", it should however be expected that implementations based on previous versions of this specification will ignore the type attribute and that such implementations will use the filename inside the <MergeFile> element instead.
In this case, the panel tries to access ~/.config/menus/xfce-applications.menu. That file is in $XDG_CONFIG_HOME. $XDG_CONFIG_HOME is considered part of $XDG_CONFIG_DIRS conceptually, so the correct behavior would be to ignore the /opt/xfce/... path in the <MergeFile> and check if the first dir in $XDG_CONFIG_DIRS has menus/xfce-applications.menu, then check the second dir etc. The first one to have xfce-applications.menu wins and that file should be merged into the <Menu> element. It seems like in this case, the panel/garcon is either not doing this or $XDG_CONFIG_DIRS does not contain a path where menus/xfce-applications.menu exists.
echo $XDG_CONFIG_DIRS => /etc/xdg:/etc/xdg:/opt/xfce/etc/xdg So no problems there.
Found the problem, break was in the wrong position. Fixed in c22e3fe.