unable to uninstall

Created on 23 July 2021, over 3 years ago
Updated 18 January 2024, 10 months ago

Problem/Motivation

Thanks for the release of 8.x-2.0-beta1.
In order to use 8.x-2.0-beta1, trying to uninstall 8.x-1.0-alpha6 was not possible.
The errer message is as follow:

Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'rate_widget' in 'where clause': SELECT 1 AS expression FROM {votingapi_vote} t WHERE rate_widget IS NOT NULL LIMIT 1 OFFSET 0; Array ( ) in Drupal\Core\Entity\Sql\SqlContentEntityStorage->countFieldData() (line 1808 of core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php).

ENV:core 8.9.16

Thank you.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Fixed

Component

Code

Created by

🇯🇵Japan s-jack Tokyo

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇮🇳India ravi kant Jaipur

    Hi @s-jack
    If you will upgrade module without uninstall then error will not show.

  • 🇨🇦Canada paintingguy

    Hi all... I cannot remove this as well. Tried everything with no success. Any help would be very appreciated!

  • 🇯🇵Japan s-jack Tokyo

    Hi, @ravi kant.
    Before I do that, I am trying to upgrade drupal 8.x to 9.x but I am hitting a wall.
    It is Composer spaghetti.
    Hence, I cannot upgrade the Rate module.

  • 🇨🇦Canada paintingguy

    if I could completely remove this module I would be a happy man. Any help would be greatly appreciated.

  • 🇨🇦Canada paintingguy

    Update to the latest and I get this now. Possibly this mess is due to my drupal 9 website uses drupal forums and the maintainers are missing something in the code for the forums?
    I wish I could remove this module as its a royal PITA.

    Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'rate_widget' in 'where clause': SELECT 1 AS "expression" FROM "votingapi_vote" "t" WHERE "rate_widget" IS NOT NULL LIMIT 1 OFFSET 0; Array ( ) in Drupal\Core\Entity\Sql\SqlContentEntityStorage->countFieldData() (line 1787 of core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php).

  • 🇨🇦Canada paintingguy

    I'm at a complete loss as what to do. I cannot remove rate. I cannot update it with the current build. Any help would be extremely appreciated.
    Drupal 9

    Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'rate_widget' in 'where clause': SELECT 1 AS "expression" FROM "votingapi_vote" "t" WHERE "rate_widget" IS NOT NULL LIMIT 1 OFFSET 0; Array ( ) in Drupal\Core\Entity\Sql\SqlContentEntityStorage->countFieldData() (line 1787 of core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php).

  • Status changed to Postponed: needs info 11 months ago
  • 🇦🇹Austria jordik

    Can you please describe your environment a bit more in detail? Rate version, Drupal version and when do you get this error?

  • 🇨🇦Canada paintingguy

    Hi Jordik,

    Drupal 9.5.11
    Rate 3.0.1
    PHP 8.1.26

    In Status report I see this message:

    Entity/field definitions

    Mismatched entity and/or field definitions
    The following changes were detected in the entity type and field definitions.

    Rate widget

    The Rate widget entity type needs to be installed.

    Vote

    The Rate widget field needs to be installed.
    --------------------------

    I get this error when trying to uninstall Rate. I cannot update to the current Rate version as it halts the update path as well.
    Any other question, please ask and than you for your help.

  • 🇦🇹Austria jordik

    Can you try and update the database with drush updatedb or through update.php? Seems you lost the rate_widget column somewhere on the way. After that try uninstalling.

  • 🇨🇦Canada paintingguy

    Hi Jordik,

    I tried drush updatedb just now but it says [success] No pending updates. I generally use composer to install and update everything and it also says all is good.

    When trying to uninstall I get this.

    The website encountered an unexpected error. Please try again later.

    Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'rate_widget' in 'where clause': SELECT 1 AS "expression" FROM "votingapi_vote" "t" WHERE "rate_widget" IS NOT NULL LIMIT 1 OFFSET 0; Array ( ) in Drupal\Core\Entity\Sql\SqlContentEntityStorage->countFieldData() (line 1787 of core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php).

  • 🇨🇦Canada paintingguy

    I believe you are right about a column missing. Do you know how I could add that column? I don't know much about sql .

  • 🇨🇦Canada paintingguy

    phpmyadmin < votingapi_vote column 11 needed to be renamed to rate_widget . Problem solved and I have managed to uninstall this. Thank you for your help. So happy!!!

  • Status changed to Fixed 11 months ago
  • 🇦🇹Austria jordik

    Glad to hear it worked. Closing.

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

Production build 0.71.5 2024