I run into the following error while trying to install the module with some menu items already created on Drupal 8.7.0-beta1
em class="placeholder">Drupal\Core\Entity\EntityStorageException</em>: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'bundle' cannot be null: UPDATE {menu_link_content} SET revision_id=:db_update_placeholder_0, bundle=:db_update_placeholder_1, uuid=:db_update_placeholder_2, langcode=:db_update_placeholder_3
WHERE id = :db_condition_placeholder_0; Array
(
[:db_update_placeholder_0] => 2
[:db_update_placeholder_1] =>
[:db_update_placeholder_2] => a335513a-6781-4cc2-a49e-3df2421481cc
[:db_update_placeholder_3] => en
[:db_condition_placeholder_0] => 1
)
in <em class="placeholder">Drupal\Core\Entity\Sql\SqlContentEntityStorage->save()</em> (line <em class="placeholder">847</em> of <em class="placeholder">core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php</em>).
Drupal\Core\Database\Statement->execute(Array, Array) (Line: 631)
Drupal\Core\Database\Connection->query('UPDATE {menu_link_content} SET revision_id=:db_update_placeholder_0, bundle=:db_update_placeholder_1, uuid=:db_update_placeholder_2, langcode=:db_update_placeholder_3
WHERE id = :db_condition_placeholder_0', Array, Array) (Line: 358)
Drupal\Core\Database\Driver\mysql\Connection->query('UPDATE {menu_link_content} SET revision_id=:db_update_placeholder_0, bundle=:db_update_placeholder_1, uuid=:db_update_placeholder_2, langcode=:db_update_placeholder_3
WHERE id = :db_condition_placeholder_0', Array, Array) (Line: 148)
Drupal\Core\Database\Query\Update->execute() (Line: 946)
Drupal\Core\Entity\Sql\SqlContentEntityStorage->doSaveFieldItems(Object) (Line: 657)
Drupal\Core\Entity\ContentEntityStorageBase->doSave('1', Object) (Line: 448)
Drupal\Core\Entity\EntityStorageBase->save(Object) (Line: 838)
Drupal\Core\Entity\Sql\SqlContentEntityStorage->save(Object) (Line: 394)
Drupal\Core\Entity\EntityBase->save() (Line: 116)
Drupal\menu_item_extras\Service\MenuLinkContentService->updateMenuItemsBundle('footer') (Line: 21)
menu_item_extras_install()
call_user_func_array('menu_item_extras_install', Array) (Line: 392)
Drupal\Core\Extension\ModuleHandler->invoke('menu_item_extras', 'install') (Line: 303)
Drupal\Core\Extension\ModuleInstaller->install(Array, 1) (Line: 83)
Drupal\Core\ProxyClass\Extension\ModuleInstaller->install(Array) (Line: 460)
Drupal\system\Form\ModulesListForm->submitForm(Array, Object)
call_user_func_array(Array, Array) (Line: 111)
Drupal\Core\Form\FormSubmitter->executeSubmitHandlers(Array, Object) (Line: 51)
Drupal\Core\Form\FormSubmitter->doSubmitForm(Array, Object) (Line: 590)
Drupal\Core\Form\FormBuilder->processForm('system_modules', Array, Object) (Line: 319)
Drupal\Core\Form\FormBuilder->buildForm('system_modules', Object) (Line: 93)
Drupal\Core\Controller\FormController->getContentResult(Object, Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 582)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 151)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 68)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 693)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
A similar error happens on uninstall but it is because the schema was not properly installed on hook_install.
This doesn't happen on Drupal 8.6.13.
I investigated a bit and it has to do with the bundle
column of the menu_link_content table not being updated to be an entity reference during the install.
I'm going to try to provide some tests and hopefully some kind of solution.