So I have been playing around with the poll module in Drupal8-beta14 and I just upgraded the site to RC1. I am trying to uninstall the poll module now but i get this error everytime
exception 'PDOException' with message 'SQLSTATE[42S22]: Column not found: 1054 Unknown [error]
column 'base_table.id' in 'field list'' in
/srv/www/dtadev2/core/lib/Drupal/Core/Database/Statement.php:64
the only place i can find the string "base_table" in the poll module at all is in the @ContentEntityType annotation
@ContentEntityType(
* id = "poll",
* label = @Translation("Poll"),
* handlers = {
* "access" = "\Drupal\poll\PollAccessControlHandler",
* "storage" = "Drupal\poll\PollStorage",
* "translation" = "Drupal\content_translation\ContentTranslationHandler",
* "list_builder" = "Drupal\poll\PollListBuilder",
* "view_builder" = "Drupal\poll\PollViewBuilder",
* "views_data" = "Drupal\poll\PollViewData",
* "form" = {
* "default" = "Drupal\poll\Form\PollForm",
* "edit" = "Drupal\poll\Form\PollForm",
* "delete" = "Drupal\poll\Form\PollDeleteForm",
* "delete_vote" = "Drupal\poll\Form\PollVoteDeleteForm",
* "delete_items" = "Drupal\poll\Form\PollItemsDeleteForm",
* }
* },
* links = {
* "canonical" = "/poll/{poll}",
* "edit-form" = "/poll/{poll}/edit",
* "delete-form" = "/poll/{poll}/delete"
* },
* base_table = "poll",
* data_table = "poll_field_data",
* admin_permission = "administer polls",
* field_ui_base_route = "poll.poll_list",
* translatable = TRUE,
* entity_keys = {
* "id" = "id",
* "label" = "question",
* "uuid" = "uuid",
* "category" = "category",
* "langcode" = "langcode"
* }
* )
So all I can think of is that for some reason when uninstalling the module Drupal is supposed to use poll but is take base_table instead.
Is this something in RC1 or is there an easy syntax error I am missing?
edited to add the backtrace info
exception 'PDOException' with message 'SQLSTATE[42S22]: Column not found: 1054 Unknown column [error]
'base_table.id' in 'field list'' in /srv/www/dtadev2/core/lib/Drupal/Core/Database/Statement.php:64
Stack trace:
#0 /srv/www/dtadev2/core/lib/Drupal/Core/Database/Statement.php(64): PDOStatement->execute(Array)
#1 /srv/www/dtadev2/core/lib/Drupal/Core/Database/Connection.php(615):
Drupal\Core\Database\Statement->execute(Array, Array)
#2 /srv/www/dtadev2/core/lib/Drupal/Core/Database/Driver/mysql/Connection.php(73):
Drupal\Core\Database\Connection->query('SELECT base_tab...', Array, Array)
#3 /srv/www/dtadev2/core/lib/Drupal/Core/Database/Query/Select.php(481):
Drupal\Core\Database\Driver\mysql\Connection->query('SELECT base_tab...', Array, Array)
#4 /srv/www/dtadev2/core/lib/Drupal/Core/Entity/Query/Sql/Query.php(262):
Drupal\Core\Database\Query\Select->execute()
#5 /srv/www/dtadev2/core/lib/Drupal/Core/Entity/Query/Sql/Query.php(89):
Drupal\Core\Entity\Query\Sql\Query->result()
#6 /srv/www/dtadev2/core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php(74):
Drupal\Core\Entity\Query\Sql\Query->execute()
#7 /srv/www/dtadev2/core/lib/Drupal/Core/Entity/ContentUninstallValidator.php(47):
Drupal\Core\Entity\ContentEntityStorageBase->hasData()
#8 /srv/www/dtadev2/core/lib/Drupal/Core/Extension/ModuleInstaller.php(539):
Drupal\Core\Entity\ContentUninstallValidator->validate('poll')
#9 /srv/www/dtadev2/core/lib/Drupal/Core/Extension/ModuleInstaller.php(343):
Drupal\Core\Extension\ModuleInstaller->validateUninstall(Array)
#10 /srv/www/dtadev2/core/lib/Drupal/Core/ProxyClass/Extension/ModuleInstaller.php(95):
Drupal\Core\Extension\ModuleInstaller->uninstall(Array, true)
#11 /home/ubuntu/.composer/vendor/drush/drush/commands/core/drupal/environment.inc(227):
Drupal\Core\ProxyClass\Extension\ModuleInstaller->uninstall(Array)
#12 /home/ubuntu/.composer/vendor/drush/drush/commands/core/drupal/pm_8.inc(80):
drush_module_uninstall(Array)
#13 /home/ubuntu/.composer/vendor/drush/drush/commands/pm/pm.drush.inc(1190): _drush_pm_uninstall(Array)
#14 [internal function]: drush_pm_uninstall('poll')
#15 /home/ubuntu/.composer/vendor/drush/drush/includes/command.inc(364):
call_user_func_array('drush_pm_uninst...', Array)
#16 /home/ubuntu/.composer/vendor/drush/drush/includes/command.inc(215): _drush_invoke_hooks(Array,
Array)
#17 [internal function]: drush_command('poll')
#18 /home/ubuntu/.composer/vendor/drush/drush/includes/command.inc(183):
call_user_func_array('drush_command', Array)
#19 /home/ubuntu/.composer/vendor/drush/drush/lib/Drush/Boot/BaseBoot.php(62): drush_dispatch(Array)
#20 /home/ubuntu/.composer/vendor/drush/drush/drush.php(70):
Drush\Boot\BaseBoot->bootstrap_and_dispatch()
#21 /home/ubuntu/.composer/vendor/drush/drush/drush.php(11): drush_main()
#22 {main}
Next exception 'Drupal\Core\Database\DatabaseExceptionWrapper' with message 'SQLSTATE[42S22]: Column not
found: 1054 Unknown column 'base_table.id' in 'field list': SELECT base_table.id AS id, base_table.id AS
base_table_id
FROM
{poll} base_table
GROUP BY base_table.id
LIMIT 1 OFFSET 0; Array
(
)
' in /srv/www/dtadev2/core/lib/Drupal/Core/Database/Connection.php:676
Stack trace:
#0 /srv/www/dtadev2/core/lib/Drupal/Core/Database/Connection.php(640):
Drupal\Core\Database\Connection->handleQueryException(Object(PDOException), 'SELECT base_tab...', Array,
Array)
#1 /srv/www/dtadev2/core/lib/Drupal/Core/Database/Driver/mysql/Connection.php(73):
Drupal\Core\Database\Connection->query('SELECT base_tab...', Array, Array)
#2 /srv/www/dtadev2/core/lib/Drupal/Core/Database/Query/Select.php(481):
Drupal\Core\Database\Driver\mysql\Connection->query('SELECT base_tab...', Array, Array)
#3 /srv/www/dtadev2/core/lib/Drupal/Core/Entity/Query/Sql/Query.php(262):
Drupal\Core\Database\Query\Select->execute()
#4 /srv/www/dtadev2/core/lib/Drupal/Core/Entity/Query/Sql/Query.php(89):
Drupal\Core\Entity\Query\Sql\Query->result()
#5 /srv/www/dtadev2/core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php(74):
Drupal\Core\Entity\Query\Sql\Query->execute()
#6 /srv/www/dtadev2/core/lib/Drupal/Core/Entity/ContentUninstallValidator.php(47):
Drupal\Core\Entity\ContentEntityStorageBase->hasData()
#7 /srv/www/dtadev2/core/lib/Drupal/Core/Extension/ModuleInstaller.php(539):
Drupal\Core\Entity\ContentUninstallValidator->validate('poll')
#8 /srv/www/dtadev2/core/lib/Drupal/Core/Extension/ModuleInstaller.php(343):
Drupal\Core\Extension\ModuleInstaller->validateUninstall(Array)
#9 /srv/www/dtadev2/core/lib/Drupal/Core/ProxyClass/Extension/ModuleInstaller.php(95):
Drupal\Core\Extension\ModuleInstaller->uninstall(Array, true)
#10 /home/ubuntu/.composer/vendor/drush/drush/commands/core/drupal/environment.inc(227):
Drupal\Core\ProxyClass\Extension\ModuleInstaller->uninstall(Array)
#11 /home/ubuntu/.composer/vendor/drush/drush/commands/core/drupal/pm_8.inc(80):
drush_module_uninstall(Array)
#12 /home/ubuntu/.composer/vendor/drush/drush/commands/pm/pm.drush.inc(1190): _drush_pm_uninstall(Array)
#13 [internal function]: drush_pm_uninstall('poll')
#14 /home/ubuntu/.composer/vendor/drush/drush/includes/command.inc(364):
call_user_func_array('drush_pm_uninst...', Array)
#15 /home/ubuntu/.composer/vendor/drush/drush/includes/command.inc(215): _drush_invoke_hooks(Array,
Array)
#16 [internal function]: drush_command('poll')
#17 /home/ubuntu/.composer/vendor/drush/drush/includes/command.inc(183):
call_user_func_array('drush_command', Array)
#18 /home/ubuntu/.composer/vendor/drush/drush/lib/Drush/Boot/BaseBoot.php(62): drush_dispatch(Array)
#19 /home/ubuntu/.composer/vendor/drush/drush/drush.php(70):
Drush\Boot\BaseBoot->bootstrap_and_dispatch()
#20 /home/ubuntu/.composer/vendor/drush/drush/drush.php(11): drush_main()
#21 {main}
describe poll shows this
+-------+---------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------+---------+------+-----+---------+-------+
| pid | int(11) | NO | PRI | 0 | |
+-------+---------+------+-----+---------+-------+