Problem/Motivation
After updating the module to the latest version(8.x-1.4), these are some database updates available. make_group_revisionable update fails.
Steps to reproduce
1. Update to 8.x-1.4 version
2. Run drush updb
See comments below. The error is related to lightning_workflow or lightning_scheduler as a dependency. A patch for lightning_workflow is linked. A similar patch needs to be created for the standalone version of lightning_scheduler.
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #28 | Group related tables in the database.png | 360.96 KB | kanchamk |
| #25 | group-fix-revision-3224379.patch | 794 bytes | o_timoshchuk |
Comments
Comment #2
saurabh-2k17 commentedComment #3
philjubb commentedSame for me. Core 8.9.18
Error is:
> [notice] Update started: group_post_update_make_group_revisionable
> [error] Exception thrown while performing a schema update. SQLSTATE[42S02]: Base table or view not found: 1146 Table 'drupal.group__scheduled_transition_date' doesn't exist: SELECT t.*
> FROM
> {group__scheduled_transition_date} t
> WHERE (entity_id IN (:db_condition_placeholder_0, :db_condition_placeholder_1, :db_condition_placeholder_2, :db_condition_placeholder_3, :db_condition_placeholder_4, :db_condition_placeholder_5)) AND (deleted = :db_condition_placeholder_6) AND (langcode IN (:db_condition_placeholder_7, :db_condition_placeholder_8, :db_condition_placeholder_9))
> ORDER BY delta ASC; Array
> (
> [:db_condition_placeholder_0] => 2
> [:db_condition_placeholder_1] => 3
> [:db_condition_placeholder_2] => 4
> [:db_condition_placeholder_3] => 5
> [:db_condition_placeholder_4] => 6
> [:db_condition_placeholder_5] => 8
> [:db_condition_placeholder_6] => 0
> [:db_condition_placeholder_7] => en
> [:db_condition_placeholder_8] => und
> [:db_condition_placeholder_9] => zxx
> )
>
> [error] Update failed: group_post_update_make_group_revisionable
[error] Update aborted by: group_post_update_make_group_revisionable
[error] Finished performing updates.
Comment #4
abaracus commentedSame issue over here as well. Any quick work arounds for now? :/
Comment #5
lesleyfernandes commentedFacing the same issue here.
Comment #6
lesleyfernandes commentedComment #7
caesius commentedGetting this as well on Drupal 9.2.7; we had been using the 1.x-dev version previously:
Comment #8
kristiaanvandeneyndeCan you all please specify the exact version you came from and if using dev (which you really shouldn't) which commit? Can you also tell me if you are using any invasive patches such as the one that allows config entities to be grouped?
Comment #9
caesius commentedIn our case we are unfortunately using several patches on commit 2310cbf
Additionally we have a custom patch to lightning_scheduler for Group integration, which... seems to be where the
scheduled_transition_datefield comes from. In other words we'll probably need to develop a solution to this ourselves. Sorry for the trouble!Comment #10
rokzabukovec commentedPlease check if the groups_revision, groups_field_revision, group_revision__field_ tables exists already in the database. In my case the issue was that this db update already ran once and the tables were already in the db. The error message was that those tables already exists.
Comment #11
kristiaanvandeneyndeOkay given the latest comments, closing this.
Comment #12
caesius commentedFor the record I just noticed that #3 has the same error with the same table that I had, even though as far as I can tell the patch we use for Group integration with Lightning Scheduler is custom and does not exist elsewhere on the web. So it may be that this issue occurs when updating Group while also having Lightning Scheduler installed and our custom patch had nothing to do with it.
(update: just consulted internally with the devs that actually wrote our custom patch and it appears that all the patch does is integrate scheduling permissions with group permissions, so it seems more likely that this is an OOTB bug with Lightning Scheduler + Groups)
That said, I don't have the expertise to figure out if this is an issue with the Group module or the Lightning Scheduler module. Perhaps the Lightning Scheduler module is providing the
scheduled_transition_datefield in a way that the Group update hook doesn't account for? Either it's uncommon (Group's fault) or incorrect (LS's fault)Hopefully we will be able to figure this out internally and come back with an update, but it will take some time.
Comment #13
philjubb commented#8 coming from 1.3 -> 1.4. Not using dev.
#12 we're also using Lighting Workflow (includes Scheduler) but not using any custom integration with Groups. I can't see the LW messing around with Group tables though.
We're not getting errors about existing tables, just missing tables.
Comment #14
kristiaanvandeneyndeRe #12: Please do come back if you have a definitive answer that points to a bug in Group. or even if it doesn't just to let the others know :)
Comment #15
scottalan commented@lesleyfernandes I'm getting the same error you were/are getting in #6
Were you able to resolve this issue? If so, how?
Comment #16
philjubb commentedThis was closed but based on a comment from someone other than the OP. The original issue was that the tables were missing, not that they were already there. So the thread was hijacked with a different issue and should have spawned a separate issue.
Comment #17
kristiaanvandeneyndeRight, I'm going to close this one because:
The IS states that this will happen with the following steps:
Yet the amount of people reporting this is minimal, so it's obviously not happening on all installations of Group. Please provide proper steps to reproduce in a new issue and then we can discuss this without being sidetracked. Most importantly see if you can trigger this error on a clean install.
Comment #18
joshuami@kristiaanvandeneynde, I've been able to reproduce this error and it is definitely a lightning_workflow or lightning_scheduler issue depending on which module you are using. There is a patch in #3126343 that will unblock the update of group for anyone using lightning_workflow with its lightning_scheduler submodule. That patch will not work if you are using the lightning_scheduler module.
I wonder if closed duplicate would be a better status so that folks are sure to look at the root cause. I hate to change a closed status on a maintainer. :o)
Comment #19
joshuamiComment #20
kristiaanvandeneyndeSeems like the right call
Comment #21
vrwired commented[error] Update failed: group_post_update_make_group_revisionable occurred in our case due to not having dropped the database before importing production
Comment #22
caesius commentedIt is always the case that if a database update makes a schema change then the update will fail if you don't drop the dev database before importing production, so your scenario is not really specific to the bug that this issue addresses. Always drop your database before importing.
Comment #23
sam.foster commentedSo I came across this issue when preparing to move from D8 to D9. I was updating contrib modules in order to prepare for that update.
Our build had standalone lightning_scheduler, and I couldn't get groups updated to 1.4 because of this issue.
I tried the usual Drush approaches to uninstalling the lightning_scheduler module but it wouldn't uninstall either so I resorted to this
https://drupal.stackexchange.com/questions/72927/manually-disable-a-module
and used the one liner to uninstall the lightning_scheduler module
then enabled it with drush ('drush pm-enable lightning_scheduler')
ran drush updb to see if all ok and it was
Now I am about to UAT the site and check it works as it should!
Sam
PS this was all on my local and before I do anything re deploying the codebase to our Acquia environments I'll be getting the database from there and running updates to see if this flushes out an issue I may still have
If anyone has had any other solutions to this issue that avoid what I did pls do speak up - this is not my preferred way to do things. Better when the just work right! ;-)
Comment #24
joseph.olstadI had the same issue, we're getting rid of lightning.
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.
Comment #25
o_timoshchuk commentedI had the same issue and found two empty revision tables in the database. To resolve it, I created a patch.
Comment #26
kanchamk commentedI updated the
groupmodule from1.2to1.6and got the below error. Any idea?Comment #27
joseph.olstad@kanchamk, please make a backup of your dump file before trying this.
based on comment #25
Comment #28
kanchamk commented@joseph, These tables

groups_revisionandgroups_field_revisiondid not exist in the database in the first place even after upgrading thegroupmodule from1.2to1.6. Attached screenshot for reference.Comment #29
joseph.olstad@kamchamk, if you look at my explanation , I'll repeat again what I did myself to fix this.
#24
Before I elaborate on this explanation, please check to see if you're using any module who's name starts with "lightning" or "Lightning"
My go-to for a quick module verification is this:
drush pml | grep lightning -iIf you are unable to do this for some reason then use the web interface for Drupal.
Comment #30
kanchamk commentedHi @joseph, I don't have any modules starting with
lightninginstalled. FYI, I am using opigno_lms v3.2.7. Recently migratedopigno_lmsfrom3.1.0to3.2.7Comment #31
joseph.olstadThis 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?
Comment #32
joseph.olstadGood 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.
Comment #33
kanchamk commented@joseph, I can't update
groupmodule asopigno_lmshas fixed its group dependency version to 1.6. This is failing in post_update functiongroup_post_update_make_group_revisionableingroup.post_update.phpComment #34
joseph.olstadThe word "can't" doesn't exist in my Drupal vocabulary.
override opigno_lms in your
composer.jsonfile as follows:Add a line to your require section
"drupal/group": "3.2.2 as 1.6",or, for 2.x
"drupal/group": "2.2.2 as 1.6",If it's the last item of the section, remove the trailing comma, otherwise you will need the comma
Then run
composer up drupal/groupI'd suggest trying 3.2.2 first. We're using 3.2.2.
Comment #35
kanchamk commentedI was able to resolve this issue by doing the following:
/admin/group/types/manage/learning_path/fields, herelearning_pathis my group type.drush updbagain. This error issue was resolved and nowgroupfields are revisionable@joseph, thank you for your help.
Comment #36
joseph.olstadVery 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.
Comment #37
firstlut commentedI 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.
Comment #38
agileadamI too am having a similar issue to kanchamk, however resaving the learning path fields does not fix the issue. Following, while I work on it.
Comment #39
jwjoshuawalker commented@firstlut What field was it for you?
Same issues here during Opigno 3.1.0 -> 3.2.7 upgrade. Group module going from 1.2 to 1.6.
It starts out as:
Column not found: 1054 Unknown column 'field_learning_path_duration_target_id' in 'INSERT INTO': INSERT INTO "tmp_3a2a85group_r__e3b0c44298"Then, if I edit & save that field on the learning_path group type, it becomes this error when trying to updb:
ValueError: array_combine(): Argument #1 ($keys) and argument #2 ($values) must have the same number of elements in array_combine()Stemming from: group/group.post_update.php(156) where: