I'am working with the last git changes of Joomla 4.0. In my component, i create the menu items for frontend part during postflight step when installing a component. The issue is that isn't able to find at this step the component ID.
In the script.php file of the component in the postflight (https://github.com/Kunena/Kunena-Forum/blob/K6.0/src/script.php#L265), i call a method to create the menu items :
$installer = new KunenaModelInstall; $installer->createMenu();
The createMenu() method is located here : https://github.com/Kunena/Kunena-Forum/blob/K6.0/src/libraries/kunena/src/Install/KunenaModelInstall.php#L3022
Why the component id isn't set at this step ? If i call the methode createMenu() after that the component is installed i don't encounter this issue