- 🇺🇦Ukraine o_timoshchuk
I had the same issue and found two empty revision tables in the database. To resolve it, I created a patch.
- 🇮🇳India kanchamk
I updated the
group
module from1.2
to1.6
and got the below error. Any idea?> [notice] Update started: group_post_update_make_group_revisionable > [error] Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'database.tmp_2d4eecgroup_r__e3b0c44298' doesn't exist: INSERT INTO "tmp_2d4eecgroup_r__e3b0c44298" ("entity_id", "revision_id", "bundle", "delta", "langcode", "field_learning_path_duration_target_id") VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5); Array > ( > [:db_insert_placeholder_0] => 67 > [:db_insert_placeholder_1] => 67 > [:db_insert_placeholder_2] => learning_path > [:db_insert_placeholder_3] => 0 > [:db_insert_placeholder_4] => de > [:db_insert_placeholder_5] => 630 > ) > in Drupal\Core\Entity\Sql\SqlContentEntityStorage->saveToDedicatedTables() (line 1403 of C:\xampp\htdocs\opigno-composer\web\core\lib\Drupal\Core\Entity\Sql\SqlContentEntityStorage.php). > [error] The entity update process failed while processing the entity type group, ID: 67. > [error] Update failed: group_post_update_make_group_revisionable
- 🇨🇦Canada joseph.olstad
@kanchamk, please make a backup of your dump file before trying this.
drush sqlq 'drop table if exists groups_revision;'; drush sqlq 'drop table if exists groups_field_revision;';
- 🇮🇳India kanchamk
@joseph, These tables
groups_revision
andgroups_field_revision
did not exist in the database in the first place even after upgrading thegroup
module from1.2
to1.6
. Attached screenshot for reference.
- 🇨🇦Canada joseph.olstad
@kamchamk, if you look at my explanation , I'll repeat again what I did myself to fix this.
#24
In my case I actually had more luck removing lightning by using fake lightning modules that I generated with drush gen module.
once I used the fake lightning* modules I was able to complete the schema upgrade and then uninstall lightning but for each site will be different challenge if your custom modules require lightning you'll have to unravel that. Also lightning brings in some other modules you may need a composer require for those.
Before I elaborate, please check to see if you're using any module who's name starts with "lightning" or "Lightning"
- 🇮🇳India kanchamk
I don't have any modules starts with
lightning
installed. FYI, I am using<a href="https://www.drupal.org/project/opigno_lms">opigno_lms 3.2.7</a>
. Recently migratedopigno_lms
from3.1.0
to3.2.7
- 🇨🇦Canada joseph.olstad
This table: tmp_2d4eecgroup_r__e3b0c44298 is a strange one that I've never seen or heard of, is this expected by the hook_update? check the group.install code
which hook_update is failing? - 🇨🇦Canada joseph.olstad
Good luck on this @kamchamk , you may want to instead switch to group 2 or version 3 instead and try upgrading to those instead.
check the release notes. - 🇮🇳India kanchamk
@joseph, I can't update
group
module asopigno_lms
has fixed its group dependency version to 1.6. This is failing in post_update functiongroup_post_update_make_group_revisionable
ingroup.post_update.php
- 🇨🇦Canada joseph.olstad
The word "Can't" doesn't exist in my Drupal vocabulary.
override opigno_lms in your
composer.json
file as follows:Add a line to your require section
drupal/group: "3.2.2 as 1.0.6"
or, for 2.x
drupal/group: "2.2.2 as 1.0.6"
Then run
composer up drupal/group
- 🇮🇳India kanchamk
I was able to resolve this issue by doing the following:
- Go to
/admin/group/types/manage/learning_path/fields
, herelearning_path
is my group type. - "Edit" every field and click on "Save" to update the field.
- Run
drush updb
again. This error issue was resolved and nowgroup
fields are revisionable
@joseph, thank you for your help.
- Go to
- 🇨🇦Canada joseph.olstad
Very cool, thanks for the followup, that is good to know in case I come accross another project that needs upgrading your trick may come in handy.
- 🇺🇸United States firstlut
I am updating Opigno LMS, as well, and I tried the "edit fields" trick, and that merely changed the nature of the error. Then I got an error that the preUpdateEntityTypeSchema function in SqlContentEntityStorageSchema.php was getting mismatched arrays. There was one field that wasn't getting a corresponding revision field created.
I deleted the offending field for now just so I could move on, but I'll have to address it eventually.