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
D7 upgrade: Error in upgrade related to "redirect" and "user_roles" upgrade #6367
Comments
I was able to move forward with Upgrade by going to /core/update.php after I renamed column to langcode
This is new bug since release 1.26, it was reproduced on several projects from different developers. |
However, this renaming of db columns happens automatically when upgrading from Drupal. If it did not happen, something went substantially wrong with the upgrade, I guess. But there should have been lots of nagging. As a first step we need a way to reproduce the problem. My suspicion is, that some contrib broke the upgrade workflow at some point. But we need to know which one. |
I did more testing locally (with updated steps to reproduce), and some D7 db upgrade redirect table correctly and some do not - @indigoxela , thank you for pointing me in the right direction. I will try to identify which module were in the db that fails redirect upgrade path comparing to those who upgrade correctly. The following error I get on almost every update.
|
Occasionally when upgrading, or always after the upgrade? Because if it's the latter, your users_roles table schema is wrong (not updated). Please share your findings re failing setups, when you figure out. |
Does this bug have anything to do with issue #5496 |
I saw this on an upgrade too, but there were quite a few modules so hard to debug. Would be good to start with a fresh D7 install and attempt to recreate the bug. And start adding other modules until it appears. |
This is expected though @irinaz. You should not be able to restore a Backdrop site with a D7 database without expecting errors. What I suspect happens is that after BAM finishes and tries to reload the page, Backdrop calls Note this is avoided for example in D2B module by immediate hard redirect to |
@docwilmot , your explanation is very helpful for understanding process of upgrade, but does not explain the issue in "redirect" table. I am working on setting up migrations that would allow me to capture correct scenario where this bug happens. |
For the redirect error are you performing the same steps:
|
@irinaz there is no bug here. There is no issue with the redirect table in Backdrop and there is no issue with the redirect table in Drupal. The problem you are experiencing is because you are expecting Backdrop to know how to use Drupal's redirect table. You cannot import a Drupal 7 database into a Backdrop site in the same way that you cannot import a Drupal 7 database into a Drupal 8 website or a WordPress website. The code and the database need to know how to communicate with each other. When upgrading from Drupal to Backdrop the database updates need to be completed before the website communicated with the databse. If you follow the steps for how to upgrade (in the correct order), you will not encounter this error because the Drupal database (including the redirect table) will be converted into a Backdrop database before Backdrop needs to use it.
This is not a workflow that is supported (or expected to work). Proceed at your own risk! I'm going to close this issue. |
@jenlampton , thanks. Module d2b has proven to be a great tool, so I will move this question into https://github.com/backdrop-contrib/d2b_migrate/ |
Description of the bug
I am running an upgrade for a site that does not have any custom modules and I see the following errors in update of the redirect module and in user_roles
Steps To Reproduce
At this step I sometimes see error related to users_roles
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'role' in 'field list': SELECT role FROM {users_roles} WHERE uid = :uid; Array ( [:uid] => 1 )
and sometimes
The second error does not show up always, I can provide db where I get this error ( I cannot attach it to this issue due to privacy issues)
If I go to /core/update.php I can begin db upgrade
Actual behavior
I get these errors when I try to run /core/update.php?op=info
Expected behavior
Upgrade continues.
Additional information
Add any other information that could help, such as:
The text was updated successfully, but these errors were encountered: