Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Message to change schema version from 7101 to 7103 when upgrading D7 site with paragraphs to Backdrop 1.21.1 on Pantheon hosting #119

Closed
irinaz opened this issue Feb 4, 2022 · 10 comments · Fixed by #122

Comments

@irinaz
Copy link

irinaz commented Feb 4, 2022

Hi, I am upgrading D7 site with paragraphs to Backdrop 1.21.1 on Pantheon hosting, and I am getting the following error

paragraphs module can not be updated. Its schema version is 7101. Updates up to and including 7103 have been removed in this release. In order to update paragraphs module, you will first need to upgrade to the last version in which these updates were available.

I am not sure to which version I need to upgrade.

I also get the following errors

PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'pantheon.cache_entity_paragraphs_item' doesn't exist: TRUNCATE {cache_entity_paragraphs_item} ; Array ( ) in backdrop_flush_all_caches() (line 8584 of /code/core/includes/common.inc).

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'pantheon.cache_entity_paragraphs_item' doesn't exist: TRUNCATE {cache_entity_paragraphs_item} ; Array ( )

@laryn
Copy link
Member

laryn commented Feb 6, 2022

@irinaz Could you test the PR I added here?

@irinaz
Copy link
Author

irinaz commented Feb 7, 2022

Hi @laryn, thank you so much for working on this issue. It is definitely helping, but still see some problems. Here are my steps

  • I am working on pantheon hosting
  • I updated code with new paragraph module
  • Wiped database
  • Imported D7 db and started core/update.php

This time I can complete the update but I still see the following errors

  • When I flush cache I see the following:
    SQLSTATE[42S02]: Base table or view not found: 1146 Table 'pantheon.cache_entity_paragraphs_item' doesn't exist: TRUNCATE {cache_entity_paragraphs_item} ; Array ( )

  • On the page for the entity with paragraph I see the following:

PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'base.status' in 'field list': SELECT revision.revision_id AS revision_id, base.item_id AS item_id, base.bundle AS bundle, base.field_name AS field_name, base.archived AS archived, base.status AS status, base.revision_id = revision.revision_id AS is_active_revision, CASE WHEN base.revision_id = revision.revision_id THEN 1 ELSE 0 END AS default_revision FROM {paragraphs_item} base INNER JOIN {paragraphs_item_revision} revision ON revision.revision_id = base.revision_id WHERE (base.item_id IN (:db_condition_placeholder_0)) ; Array ( [:db_condition_placeholder_0] => 12 ) in EntityPlusController->query() (line 215 of /code/modules/entity_plus/includes/entity_plus.controller.inc).

Seems that it is related to EntityPlusController. Happy to provide more details or give you full access to this testing instance on Pantheon.

@argiepiano
Copy link
Contributor

argiepiano commented Feb 7, 2022

Hi @irinaz .

So, the issue happens because Backdrop's Paragraphs added a new database column to the table paragraphs_item called status. Supposedly this column is added in paragraphs_update_1003(). This column did not exist in Drupal's version , which is why you are seeing that error.

Apparently, in your installation, this hook_update_N has not been successfully ran, meaning that the column was never added.

@laryn fixed a last_removed hook in PR #122. That PR has not been merged, so you need to manually patch Paragraphs with it before running the update. That is, you have to download the dev version, and then patch it manually with patch in your Terminal. Did you have a chance to do that?

@irinaz
Copy link
Author

irinaz commented Feb 7, 2022

@argiepiano , thank you so much, it is amazing to get help instantly! Yes, I updated code in my instance of paragraph module with new code from this commit 53f3d4c . I do not see the problems that I had before I applied this patch, but I see next iteration of errors.
I suspect that something needs to be changed in EntityPlusController - Entity Plus was not happy before I applied patch.

Thanks again!!

@argiepiano
Copy link
Contributor

Thanks, @irinaz . EntityPlusController is just doing what Paragraphs is telling it to do - basically a database query that includes a column (status) that doesn't exist in your database. So the issue is not with Entity Plus, but rather with the upgrade itself.

I could take a quick look at your test site if you want to give me access - I still have about 30 minutes of sanity before bed time haha

@argiepiano
Copy link
Contributor

argiepiano commented Feb 7, 2022

Just a quick note in case @laryn takes a look at this tomorrow: I did a test-drive with a very simple Drupal site that used Paragraphs (I was sure to create a Paragraphs bundle and create some content with it). I applied #122 and proceeded to do the upgrade to Backdrop.

Things worked for me. Granted, the site was very simple. The column status was created normally, so this issue may have to do with other problems. @irinaz, what PHP version are you using?

As I mentioned above, while the error mentions EntityPlusController, the issue stems from the fact that the database table paragraphs_item doesn't contain the status column, which leads me to believe that the hook_update_1003 did not run normally during the upgrade in @irinaz site.

@irinaz
Copy link
Author

irinaz commented Feb 7, 2022

Thanks a lot - I am using PHP 7.2 which is set in pantheon.yml file.

@laryn
Copy link
Member

laryn commented Feb 7, 2022

@irinaz I'm shutting down for the night but if you can still see the site, does the admin menu have a red circle indicating that there are still database updates that need to run? (Or check /core/update.php?op=info)

@irinaz
Copy link
Author

irinaz commented Feb 7, 2022

@laryn thank you! I broke the site completely for now, I will start tomorrow and I will double check that I run db updates - I might have missed this step. I will post updates and links here when I can repeat all steps again. thank you and good night!!

@laryn
Copy link
Member

laryn commented Feb 7, 2022

Okay, sounds good!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants