i installed module and added an ECK type (called eck_paragraph), added a few bundles (eck_text, eck_image etc), added a few bundle instances. i created a node type to hold a reference to "eck paragraph". i then deleted the bundles and the eck type (in reverse order). this has left a hanging reference to a non-existent type which has crashed my site.

when i try to list content im getting a white ECK type screen with message: "The website encountered an unexpected error. Please try again later". same when i try to view ECK types. same when trying to view/edit the node with the hanging reference.

this problem is due to not checking useage of the entity through an entityreference so i have a rogue content type in the system that holds a reference to a non-existent entity type that is preventing me using drush cr and ECK.

that this has happened shows a major tight-coupling flaw in drupal. a faulty node should not break the site, and certainly not disable major drush functions... i thought drush cr might fix it but its broken drush cr... i have no way to remove the eck_paragraphs type....

ontawesome@virtualmin:~/public_html/drupal-8.4.2/sites/default$ drush cr
Drupal\Component\Plugin\Exception\PluginNotFoundException: The "eck_paragraphs" entity type   [error]
does not exist. in
/home/fontawesome/public_html/drupal-8.4.2/core/lib/Drupal/Core/Entity/EntityTypeManager.php:133
Stack trace:
#0
/home/fontawesome/public_html/drupal-8.4.2/core/lib/Drupal/Core/Entity/EntityManager.php(54):
Drupal\Core\Entity\EntityTypeManager->getDefinition('eck_paragraphs', true)
#1
/home/fontawesome/public_html/drupal-8.4.2/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php(116):
Drupal\Core\Entity\EntityManager->getDefinition('eck_paragraphs')
#2
/home/fontawesome/public_html/drupal-8.4.2/core/modules/field/src/Entity/FieldStorageConfig.php(451):
Drupal\Core\Field\Plugin\Field\FieldType\EntityReferenceItem::schema(Object(Drupal\field\Entity\FieldStorageConfig))
#3
/home/fontawesome/public_html/drupal-8.4.2/core/modules/field/src/Entity/FieldStorageConfig.php(488):
Drupal\field\Entity\FieldStorageConfig->getSchema()
#4 /home/fontawesome/public_html/drupal-8.4.2/core/modules/views/views.views.inc(312):
Drupal\field\Entity\FieldStorageConfig->getColumns()
#5 /home/fontawesome/public_html/drupal-8.4.2/core/modules/views/views.views.inc(761):
views_field_default_views_data(Object(Drupal\field\Entity\FieldStorageConfig))
#6 [internal function]: core_field_views_data(Object(Drupal\field\Entity\FieldStorageConfig))
#7
/home/fontawesome/public_html/drupal-8.4.2/core/lib/Drupal/Core/Extension/ModuleHandler.php(391):
call_user_func_array('core_field_view...', Array)
#8 /home/fontawesome/public_html/drupal-8.4.2/core/modules/views/views.views.inc(184):
Drupal\Core\Extension\ModuleHandler->invoke('core', 'field_views_dat...', Array)
#9 [internal function]: views_views_data()
#10
/home/fontawesome/public_html/drupal-8.4.2/core/lib/Drupal/Core/Extension/ModuleHandler.php(391):
call_user_func_array('views_views_dat...', Array)
#11 /home/fontawesome/public_html/drupal-8.4.2/core/modules/views/src/ViewsData.php(245):
Drupal\Core\Extension\ModuleHandler->invoke('views', 'views_data')
#12 /home/fontawesome/public_html/drupal-8.4.2/core/modules/views/src/ViewsData.php(162):
Drupal\views\ViewsData->getData()
#13
/home/fontawesome/public_html/drupal-8.4.2/modules/ds/src/Plugin/Derivative/DsEntityRow.php(91):
Drupal\views\ViewsData->get('block_content')
#14
/home/fontawesome/public_html/drupal-8.4.2/core/lib/Drupal/Component/Plugin/Discovery/DerivativeDiscoveryDecorator.php(101):
Drupal\ds\Plugin\Derivative\DsEntityRow->getDerivativeDefinitions(Array)
#15
/home/fontawesome/public_html/drupal-8.4.2/core/lib/Drupal/Component/Plugin/Discovery/DerivativeDiscoveryDecorator.php(87):
Drupal\Component\Plugin\Discovery\DerivativeDiscoveryDecorator->getDerivatives(Array)
#16
/home/fontawesome/public_html/drupal-8.4.2/core/lib/Drupal/Core/Plugin/DefaultPluginManager.php(283):
Drupal\Component\Plugin\Discovery\DerivativeDiscoveryDecorator->getDefinitions()
#17
/home/fontawesome/public_html/drupal-8.4.2/core/lib/Drupal/Core/Plugin/DefaultPluginManager.php(174):
Drupal\Core\Plugin\DefaultPluginManager->findDefinitions()
#18
/home/fontawesome/public_html/drupal-8.4.2/core/lib/Drupal/Component/Plugin/Discovery/DiscoveryCachedTrait.php(22):
Drupal\Core\Plugin\DefaultPluginManager->getDefinitions()
#19
/home/fontawesome/public_html/drupal-8.4.2/core/lib/Drupal/Core/Plugin/Factory/ContainerFactory.php(16):
Drupal\Core\Plugin\DefaultPluginManager->getDefinition('node_rss')
#20
/home/fontawesome/public_html/drupal-8.4.2/core/lib/Drupal/Component/Plugin/PluginManagerBase.php(84):
Drupal\Core\Plugin\Factory\ContainerFactory->createInstance('node_rss', Array)
#21
/home/fontawesome/public_html/drupal-8.4.2/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php(818):
Drupal\Component\Plugin\PluginManagerBase->createInstance('node_rss')
#22
/home/fontawesome/public_html/drupal-8.4.2/core/modules/views/src/Plugin/views/style/StylePluginBase.php(122):
Drupal\views\Plugin\views\display\DisplayPluginBase->getPlugin('row')
#23
/home/fontawesome/public_html/drupal-8.4.2/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php(821):
Drupal\views\Plugin\views\style\StylePluginBase->init(Object(Drupal\views\ViewExecutable),
Object(Drupal\views\Plugin\views\display\Feed), Array)
#24 /home/fontawesome/public_html/drupal-8.4.2/core/modules/views/src/ViewExecutable.php(883):
Drupal\views\Plugin\views\display\DisplayPluginBase->getPlugin('style')
#25
/home/fontawesome/public_html/drupal-8.4.2/core/modules/views/src/ViewExecutable.php(1840):
Drupal\views\ViewExecutable->initStyle()
#26
/home/fontawesome/public_html/drupal-8.4.2/core/modules/views/src/Plugin/views/display/PathPluginBase.php(132):
Drupal\views\ViewExecutable->getTitle()
#27
/home/fontawesome/public_html/drupal-8.4.2/core/modules/views/src/Plugin/views/display/PathPluginBase.php(220):
Drupal\views\Plugin\views\display\PathPluginBase->getRoute('frontpage', 'feed_1')
#28
/home/fontawesome/public_html/drupal-8.4.2/core/modules/views/src/EventSubscriber/RouteSubscriber.php(120):
Drupal\views\Plugin\views\display\PathPluginBase->collectRoutes(Object(Symfony\Component\Routing\RouteCollection))
#29 [internal function]: Drupal\views\EventSubscriber\RouteSubscriber->routes()
#30
/home/fontawesome/public_html/drupal-8.4.2/core/lib/Drupal/Core/Routing/RouteBuilder.php(146):
call_user_func(Array)
#31
/home/fontawesome/public_html/drupal-8.4.2/core/lib/Drupal/Core/ProxyClass/Routing/RouteBuilder.php(83):
Drupal\Core\Routing\RouteBuilder->rebuild()
#32 /home/fontawesome/public_html/drupal-8.4.2/core/includes/common.inc(1142):
Drupal\Core\ProxyClass\Routing\RouteBuilder->rebuild()
#33 /home/fontawesome/public_html/drupal-8.4.2/core/includes/utility.inc(52):
drupal_flush_all_caches()
#34 /home/drush/vendor/drush/drush/commands/core/cache.drush.inc(302):
drupal_rebuild(Object(Composer\Autoload\ClassLoader),
Object(Symfony\Component\HttpFoundation\Request))
#35 /home/drush/vendor/drush/drush/includes/command.inc(422): drush_cache_rebuild()
#36 /home/drush/vendor/drush/drush/includes/command.inc(231): _drush_invoke_hooks(Array,
Array)
#37 /home/drush/vendor/drush/drush/includes/command.inc(199): drush_command()
#38 /home/drush/vendor/drush/drush/lib/Drush/Boot/BaseBoot.php(67): drush_dispatch(Array)
#39 /home/drush/vendor/drush/drush/includes/preflight.inc(66):
Drush\Boot\BaseBoot->bootstrap_and_dispatch()
#40 /home/drush/vendor/drush/drush/drush.php(12): drush_main()
#41 {main}
fontawesome@virtualmin:~/public_html/drupal-8.4.2/sites/default$ 

CommentFileSizeAuthor
#6 2925809-6.patch2.18 KBnginex

Comments

laurencefass created an issue. See original summary.

Syntapse’s picture

Title: crash on deleting ECK type? » site crash on deleting ECK type?
Issue summary: View changes
Syntapse’s picture

i cant tell you what the log says either because the system log is not viewable either.

matroskeen’s picture

Priority: Critical » Major
Issue tags: +LutskGSW18
nginex’s picture

Assigned: Unassigned » nginex
Status: Active » Needs work

I will take a look at this bug and fix on Drupal Global Sprint Weekend in Lutsk 27.01.18

nginex’s picture

Assigned: nginex » Unassigned
Status: Needs work » Needs review
StatusFileSize
new2.18 KB

I have reproduced this bug. I have implemented functionality to remove all related fields in others entities which have relation to the removed ECK entity type. After testing the bug is disappeared and can't be reproduced again.

Syntapse’s picture

hi thanks will this be included in next release?

still sounds like a drupal error that it could occur in the first place....

pifagor’s picture

Status: Needs review » Reviewed & tested by the community

+1

alex_optim’s picture

+1

legolasbo’s picture

Thanks for your contribution. The patch looks good to me. I'll commit it today.

  • legolasbo committed d0004e3 on 8.x-1.x authored by nginex
    Issue #2925809 by nginex, alex_optim, Matroskeen, legolasbo, pifagor:...
legolasbo’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed to 8.x-1.x. Thanks!

Status: Fixed » Closed (fixed)

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