Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Entry missing after deleting it's entry type #3899

Closed
rinusvandam opened this issue Feb 25, 2019 · 1 comment
Closed

Entry missing after deleting it's entry type #3899

rinusvandam opened this issue Feb 25, 2019 · 1 comment

Comments

@rinusvandam
Copy link

rinusvandam commented Feb 25, 2019

Description

I have a section called pages with different entry types. When I delete an entry type, the entries that had the entry type attached are missing. When I check the trashed entries i get the following error: An unknown error occurred.

Had the same error some time ago and it was fixed. Slightly different situation. Reference: 63160b0

2019-02-25 14:34:40 [-][1][-][error][Twig_Error_Runtime] yii\base\InvalidConfigException: Invalid entry type ID: 45 in sites/company/craft/vendor/craftcms/cms/src/elements/Entry.php:756
Stack trace:
#0 sites/company/craft/vendor/craftcms/cms/src/elements/Entry.php(912): craft\elements\Entry->getType()
#1 sites/company/craft/vendor/craftcms/cms/src/base/Element.php(1815): craft\elements\Entry->tableAttributeHtml('type')
#2 sites/company/craft/vendor/twig/twig/lib/Twig/Extension/Core.php(1626): craft\base\Element->getTableAttributeHtml('type')
#3 sites/company/craft/vendor/craftcms/cms/src/helpers/Template.php(73): twig_get_attribute(Object(craft\web\twig\Environment), Object(Twig_Source), Object(craft\elements\Entry), 'getTableAttribu...', Array, 'method', false, false)
#4 sites/company/craft/storage/runtime/compiled_templates/d0/d0e6c8150d8c8ce0e581b4fd3dc4866ca1228af68dec8978536d135d3470e3e0.php(142): craft\helpers\Template::attribute(Object(craft\web\twig\Environment), Object(Twig_Source), Object(craft\elements\Entry), 'getTableAttribu...', Array, 'method')
#5 sites/company/craft/vendor/twig/twig/lib/Twig/Template.php(386): __TwigTemplate_7630ad5863f54c1652b04ac21013133910f476a15e049d88b46d60aa5ed7cf21->doDisplay(Array, Array)
#6 sites/company/craft/vendor/craftcms/cms/src/web/twig/Template.php(49): Twig_Template->displayWithErrorHandling(Array, Array)
#7 sites/company/craft/vendor/twig/twig/lib/Twig/Template.php(363): craft\web\twig\Template->displayWithErrorHandling(Array, Array)
#8 sites/company/craft/vendor/craftcms/cms/src/web/twig/Template.php(31): Twig_Template->display(Array, Array)
#9 sites/company/craft/storage/runtime/compiled_templates/59/5937871a543463df7b79fa750a05733dcbbcc9f2e621f9663018956ed8e18fc7.php(81): craft\web\twig\Template->display(Array)
#10 sites/company/craft/vendor/twig/twig/lib/Twig/Template.php(386): __TwigTemplate_747ddee4feef818f83e0b86cfdd47009154eb2d2787c164fb7330751ac12aa02->doDisplay(Array, Array)
#11 sites/company/craft/vendor/craftcms/cms/src/web/twig/Template.php(49): Twig_Template->displayWithErrorHandling(Array, Array)
#12 sites/company/craft/vendor/twig/twig/lib/Twig/Template.php(363): craft\web\twig\Template->displayWithErrorHandling(Array, Array)
#13 sites/company/craft/vendor/craftcms/cms/src/web/twig/Template.php(31): Twig_Template->display(Array, Array)
#14 sites/company/craft/vendor/twig/twig/lib/Twig/Template.php(371): craft\web\twig\Template->display(Array)
#15 sites/company/craft/vendor/twig/twig/lib/Twig/Environment.php(289): Twig_Template->render(Array)
#16 sites/company/craft/vendor/craftcms/cms/src/web/View.php(337): Twig_Environment->render('_elements/table...', Array)
#17 sites/company/craft/vendor/craftcms/cms/src/base/Element.php(449): craft\web\View->renderTemplate('_elements/table...', Array)
#18 sites/company/craft/vendor/craftcms/cms/src/controllers/ElementIndexesController.php(391): craft\base\Element::indexHtml(Object(craft\elements\db\EntryQuery), Array, Array, 'section:91c8000...', 'index', true, true)
#19 sites/company/craft/vendor/craftcms/cms/src/controllers/ElementIndexesController.php(121): craft\controllers\ElementIndexesController->_elementResponseData(true, true)
#20 [internal function]: craft\controllers\ElementIndexesController->actionGetElements()
#21 sites/company/craft/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#22 sites/company/craft/vendor/yiisoft/yii2/base/Controller.php(157): yii\base\InlineAction->runWithParams(Array)
#23 sites/company/craft/vendor/craftcms/cms/src/web/Controller.php(109): yii\base\Controller->runAction('get-elements', Array)
#24 sites/company/craft/vendor/yiisoft/yii2/base/Module.php(528): craft\web\Controller->runAction('get-elements', Array)
#25 sites/company/craft/vendor/craftcms/cms/src/web/Application.php(297): yii\base\Module->runAction('element-indexes...', Array)
#26 sites/company/craft/vendor/craftcms/cms/src/web/Application.php(561): craft\web\Application->runAction('element-indexes...', Array)
#27 sites/company/craft/vendor/craftcms/cms/src/web/Application.php(281): craft\web\Application->_processActionRequest(Object(craft\web\Request))
#28 sites/company/craft/vendor/yiisoft/yii2/base/Application.php(386): craft\web\Application->handleRequest(Object(craft\web\Request))
#29 sites/company/web/index.php(21): yii\base\Application->run()
#30 {main}

Steps to reproduce

  1. Create a structured section
  2. Create different entry types
  3. Create different entries with different entry types in the section
  4. Delete a entry type that has entries attached
  5. See trashed items

Additional info

  • Craft version: Craft Pro 3.1.14
  • PHP version: 7.2.10
  • Database driver & version: MySQL 5.7.23
@brandonkelly
Copy link
Member

Just fixed this for the next release. In the meantime if you click the cog icon in the Entries index sidebar, and uncheck “Entry Type” for the selected source, then the trashed entries should show up without any errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants