I created a menu and three link types. They've been exported to a module. When I install the site, colossal menu, machine name widget, and this new module I get the following error:

Error: Class 'Drupal\link\LinkItemInterface' not found in /var/www/modules/contrib/colossal_menu/src/Entity/Link.php on line 265 #0 /var/www/core/lib/Drupal/Core/Entity/EntityFieldManager.php(204): Drupal\colossal_menu\Entity\Link::baseFieldDefinitions(Object(Drupal\Core\Entity\ContentEntityType))
#1 /var/www/core/lib/Drupal/Core/Entity/EntityFieldManager.php(171): Drupal\Core\Entity\EntityFieldManager->buildBaseFieldDefinitions('colossal_menu_l...')
#2 /var/www/core/lib/Drupal/Core/Entity/EntityFieldManager.php(394): Drupal\Core\Entity\EntityFieldManager->getBaseFieldDefinitions('colossal_menu_l...')
#3 /var/www/core/lib/Drupal/Core/Entity/EntityManager.php(154): Drupal\Core\Entity\EntityFieldManager->getFieldStorageDefinitions('colossal_menu_l...')
#4 /var/www/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php(102): Drupal\Core\Entity\EntityManager->getFieldStorageDefinitions('colossal_menu_l...')
#5 /var/www/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php(245): Drupal\Core\Entity\Sql\SqlContentEntityStorageSchema->__construct(Object(Drupal\Core\Entity\EntityManager), Object(Drupal\Core\Entity\ContentEntityType), Object(Drupal\Core\Entity\Sql\SqlContentEntityStorage), Object(Drupal\Core\Database\Driver\mysql\Connection))
#6 /var/www/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php(1370): Drupal\Core\Entity\Sql\SqlContentEntityStorage->getStorageSchema()
#7 /var/www/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php(1466): Drupal\Core\Entity\Sql\SqlContentEntityStorage->Drupal\Core\Entity\Sql\{closure}()
#8 /var/www/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php(1371): Drupal\Core\Entity\Sql\SqlContentEntityStorage->wrapSchemaException(Object(Closure))
#9 /var/www/core/lib/Drupal/Core/Entity/EntityTypeListener.php(71): Drupal\Core\Entity\Sql\SqlContentEntityStorage->onEntityTypeCreate(Object(Drupal\Core\Entity\ContentEntityType))
#10 /var/www/core/lib/Drupal/Core/Entity/EntityManager.php(384): Drupal\Core\Entity\EntityTypeListener->onEntityTypeCreate(Object(Drupal\Core\Entity\ContentEntityType))
#11 /var/www/core/lib/Drupal/Core/Entity/EntityDefinitionUpdateManager.php(135): Drupal\Core\Entity\EntityManager->onEntityTypeCreate(Object(Drupal\Core\Entity\ContentEntityType))
#12 /var/www/core/lib/Drupal/Core/Extension/ModuleInstaller.php(219): Drupal\Core\Entity\EntityDefinitionUpdateManager->installEntityType(Object(Drupal\Core\Entity\ContentEntityType))
#13 /var/www/core/lib/Drupal/Core/ProxyClass/Extension/ModuleInstaller.php(83): Drupal\Core\Extension\ModuleInstaller->install(Array, false)
#14 /var/www/core/includes/install.core.inc(1783): Drupal\Core\ProxyClass\Extension\ModuleInstaller->install(Array, false)
#15 /var/www/core/includes/batch.inc(252): _install_module_batch('colossal_menu', 'Colossal Menu', Array)
#16 /var/www/core/includes/form.inc(872): _batch_process()
#17 /var/www/core/includes/install.core.inc(617): batch_process(Object(Drupal\Core\Url), Object(Drupal\Core\Url))
#18 /var/www/core/includes/install.core.inc(538): install_run_task(Array, Array)
#19 /var/www/core/includes/install.core.inc(115): install_run_tasks(Array)
#20 phar:///usr/local/bin/drush/includes/drush.inc(726): install_drupal(Object(Composer\Autoload\ClassLoader), Array)
#21 phar:///usr/local/bin/drush/includes/drush.inc(711): drush_call_user_func_array('install_drupal', Array)
#22 phar:///usr/local/bin/drush/commands/core/drupal/site_install.inc(80): drush_op('install_drupal', Object(Composer\Autoload\ClassLoader), Array)
...

Comments

mstef created an issue. See original summary.

davidwbarratt’s picture

Do you have the link module enabled?

What version of Drupal?

mstef’s picture

8.2.1.

I have Link as a profile and module dependency, but it looks like it also needs to be a dependency of Colossal Menu (which makes sense).

mstef’s picture

Status: Active » Needs review
StatusFileSize
new240 bytes
mstef’s picture

Issue summary: View changes

  • davidwbarratt committed 691f00c on 8.x-1.x authored by mstef
    Issue #2827879 by mstef: Error: Class 'Drupal\link\LinkItemInterface'...
davidwbarratt’s picture

Status: Needs review » Fixed

Thanks for the patch!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.