Steps to reproduce
1) Upgrade Module page version 8.x-2.9 to the latest version.
2) Run drush updb for database updates.
3) We get the following error -
Expected result - Database update should be smooth even if the module upgrade is from 8.x-2.9 to any version >= 8.x-2.13
Root cause -
On `drush updb` the below code for entity load is expecting `modal_page_modal__roles` table.
$modals = \Drupal::entityTypeManager()->getStorage('modal_page_modal')->loadMultiple();
https://git.drupalcode.org/project/modal_page/-/blob/8.x-2.13/src/Entity...
Proposed resolution -
Instead of setting the field value the entity way we can update the `auto_open` and `enable_dont_show_again_option` field using database api.
Comment | File | Size | Author |
---|---|---|---|
#6 | AfterPatch.png | 12.96 KB | paulocs |
#2 | db_updates_fix-3162395-2.patch | 1.51 KB | wil2091 |
Screenshot 2020-07-30 at 1.22.38 PM.png | 1.04 MB | wil2091 |
Comments
Comment #2
wil2091 CreditAttribution: wil2091 as a volunteer and at Moonraft Innovation Labs commentedAdding patch for the fix.
Comment #3
wil2091 CreditAttribution: wil2091 as a volunteer and at Moonraft Innovation Labs commentedComment #4
renatogWoow good catch! Really Looks good!
I'll test it
Comment #5
dvym CreditAttribution: dvym commentedGreat Work!!
Comment #6
paulocsAfter applied patch #2, the update is running cleanly.
Comment #7
renatogTested and really works well also for me
Comment #9
renatogCommitted and pushed to the dev branch.
Thanks for your review Paulo and thank you so much for your solution @wil2091
Your contributions are amazing!
I'll generate a new release for this
Comment #10
renatog