Problem/Motivation
The resulting problem is a fatal error, bringing the site offline with the following error:
The website encountered an unexpected error. Try again later.
Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'base_table.id' in 'SELECT': SELECT "base_table"."id" AS "id", "base_table"."id" AS "base_table_id" FROM "history" "base_table" LIMIT 1 OFFSET 0; Array ( ) in Drupal\Core\Entity\Query\Sql\Query->result() (line 288 of core/lib/Drupal/Core/Entity/Query/Sql/Query.php).
Drupal\Core\Database\Statement\StatementBase->clientExecute() (Line: 89)
Drupal\Core\Database\StatementWrapperIterator->execute() (Line: 666)
Drupal\Core\Database\Connection->query() (Line: 521)
Drupal\Core\Database\Query\Select->execute() (Line: 288)
Drupal\Core\Entity\Query\Sql\Query->result() (Line: 85)
Drupal\Core\Entity\Query\Sql\Query->execute() (Line: 108)
Drupal\eck\Controller\EckEntityTypeListBuilder->buildRow() (Line: 308)
Drupal\Core\Entity\EntityListBuilder->render() (Line: 23)
Drupal\Core\Entity\Controller\EntityListController->listing()
call_user_func_array() (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 634)
Drupal\Core\Render\Renderer::Drupal\Core\Render\{closure}()
Fiber->start() (Line: 635)
Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 121)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext() (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 183)
Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 76)
Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 53)
Drupal\Core\StackMiddleware\Session->handle() (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 28)
Drupal\Core\StackMiddleware\ContentLength->handle() (Line: 32)
Drupal\big_pipe\StackMiddleware\ContentLength->handle() (Line: 118)
Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 92)
Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 53)
Drupal\Core\StackMiddleware\AjaxPageState->handle() (Line: 54)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle() (Line: 745)
Drupal\Core\DrupalKernel->handle() (Line: 19)
Steps to reproduce
1. Install ECK module and enable it.
2. Enable the core History module if not already enabled.
3. Create an ECK entity and bundle with the machine name “history”.
4. Add a field called “ID” to the newly created ECK entity and save the field.
5. Attempt to add another field, the above error occurs, bringing site offline.
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
Comments
Comment #2
lisa.rae commentedComment #3
dieterholvoet commentedAre you using the latest version of the ECK module? Looking at the stack trace, I don't think you are.
Comment #4
dieterholvoet commentedNever mind, I was looking at an older version myself. Will look into it.
Comment #6
dieterholvoet commentedComment #7
robloachLooks solid. Adding a small fix around the `setErrorByName` call.
Comment #8
robloach