Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Opening from http://drupal.org/node/1415368#comment-5805892.
Also see #1470104: duplicated views entries maybe because of product reference, from #13 on.
Comment | File | Size | Author |
---|---|---|---|
#38 | weight-upgrade1.patch | 950 bytes | torotil |
#38 | weight-upgrade2.patch | 635 bytes | torotil |
#29 | fix-batch-update-7202.patch | 464 bytes | torotil |
Comments
Comment #1
arrubiu CreditAttribution: arrubiu commentedHi!
As asked here, the schema_version in system tabel is 7204
Comment #2
davisbenThis sounds like the same problem knalstaaf was having in the other issue. Running update.php again seemed to fix it for him, but there is an underlying error causing this. Do you have a lot of nodes? It may be that weight_update_7205 is taking too long to run.
Comment #3
arrubiu CreditAttribution: arrubiu commentedYes, many nodes.. 12000 :(
The weight is active only in one content type
Comment #4
davisbenI'm going to convert that function to use Batch API, shouldn't take long.
Comment #5
davisbenFixed and committed. I found a couple other small bugs in the update functions, but everything should be working now.
Comment #6
artis CreditAttribution: artis commentedI'm having this issue also and I have 2 nodes on the entire site.
Is RC1 the fixed release or dev?
Comment #7
davisbenThis fix is in rc1.
Comment #8
artis CreditAttribution: artis commentedI still had issues with this error when upgrading to RC1.
Comment #9
davisbenThere was another similar error that was fixed after the rc1 release, it may be related to that. Could you post your error message?
Comment #10
artis CreditAttribution: artis commentedThis is what I get. Just tried the update from beta3 to r1 on a different site and got the same thing:
Comment #11
davisbenDoes the error occur while running update.php, or during use of the site?
Comment #12
artis CreditAttribution: artis commentedThat's the error that shows up when I got to update.php. But the rest of the site is broken with this error:
Comment #13
davisbenCould you check the schema_version field for Weight in your system table? The weight_weights table is created in 7205. #1515122: Update hangs at 7206 was recently fixed and will be in the next dev release. This could be related to that.
Comment #14
artis CreditAttribution: artis commentedThe schema_version is 7204.
Comment #15
davisbenI would wait until the next dev release is packaged, or grab it from git, and attempt to run update.php again. If that fails you could check your error log to see if that provides any helpful info as to what is causing the update to fail.
Comment #16
artis CreditAttribution: artis commentedI just tried the latest dev and still receive the same error.
Comment #17
davisbenCould you take a look at your servers error logs to see if there is anything there that could help pinpoint the error?
Comment #18
artis CreditAttribution: artis commentedThis is what the apache error log says:
Comment #19
davisbenI removed all calls to the modules functions from the install file, which should fix this error and allow update.php to run.
Comment #20
artis CreditAttribution: artis commentedSo, this change will be in the next dev release?
Comment #21
davisbenIt will indeed, or you can grab it from git now.
Comment #22
artis CreditAttribution: artis commentedI just tried to update from beta3 to rc2 and got the same error from comment #10
Comment #23
davisbenAre you still seeing errors in the Apache log like in #18?
Comment #24
torotil CreditAttribution: torotil commentedI still see the error from #10 in rc2. - when upgrading from 7.x-1.0
Comment #25
davisbenHi torotil,
Have you tried with the latest dev release?
Comment #26
artis CreditAttribution: artis commentedWhen updating from beta3 to the current dev release (as of 5 minutes ago) I still get this error on every page of the site and in the error logs:
I can still test this for you if you want, but I've moved my sites to using the Draggable Views module, so if you can't reproduce it and I'm the only one experiencing this error then you are welcome to close the issue.
Completely uninstalling beta3 and reinstalling the rc2 also works fine. It's just the upgrade path that is broken.
Comment #27
torotil CreditAttribution: torotil commented@10oclock : yes this is still reproducible with the current 7.x-2.x-dev
Comment #28
torotil CreditAttribution: torotil commentedSeems that I've finally tracked that one down. Here is the a backtrace showing the exception (which happens during bootstrap):
As you can see the main point is entity_load being called by redirect's redirect_url_inbound_alter implementation which in turn calls hook_node_load.
Bootstrapping is done even on update.php or drush updb.
A simple workaround for this is to disable either weight and/or redirect during bootstrap. Disabling redirect worked for me.
Another problem seems that 7202 does something infeasible for my installation. (It breaks after 10mins because it hits the 1GByte memory_limit). But I'll open a separate report for that.
Comment #29
torotil CreditAttribution: torotil commentedOk there seems to be an error in the batch-handling that was implemented earlier in this bug-report. Here's a fix.
Comment #30
davisbenThanks for your work on this! I'll have some time to review later tonight.
Comment #31
davisbenI committed the patch from #29 to fix that issue.
For the larger issue, I was able to recreate it with Redirect enabled. I'm leaning towards won't fix for this since there is an easy workaround, and the number of affected sites is going to be pretty small. I'll leave this open a bit longer to collect other opinions though.
Comment #32
wipeout_dude CreditAttribution: wipeout_dude commentedI just tried to upgrade version 1.0 to release version 2.0 from May 19th and got the following error.. Hopefully its useful..
Comment #33
davisbenDo you by chance have the Redirect module enabled?
Comment #34
wipeout_dude CreditAttribution: wipeout_dude commentedYes, this site does have redirect enabled and its needed for this particular site so disabling it isn't really an option..
Will Weight 2.0 and redirect simply not work together?
Comment #35
davisbenYou just need to disable it while running update.php the first time. The issue is that Redirect loads nodes during the update, and the node weight is trying to be added to the node before that the weight_weights table is created. Once the table is created, update.php will run normally.
Comment #36
torotil CreditAttribution: torotil commentedNote that it's enough to disable either weight or redirect. As long as non of them is uninstalled update hooks are run for both!
Perhaps you should put a notice about that somewhere prominent on the module page and the upgrade instructions in the README.txt. Redirect is a very common module (we use it for nearly all of our sites) so this is going to hit a lot of people.
For upgrading from 1.0 you actually could do something:
1. Release a new stable 1.1 version that already creates (but doesn't use) the table.
2. change the upgrade hooks so that they don't fail if the table was already created.
For the future: Maybe you shouldn't mark a stable 1.0 release as unsupported as long as there is no stable 2.0 release. This was forcing people to upgrade to 2.0 pre-releases too early.
Comment #37
davisbenComment #38
torotil CreditAttribution: torotil commentedI had to upgrade several sites which currently run 7.x-1.0 to 7.x-2.1 without interruptions. For that I've written two patches:
So the upgrade-path is:
You can forget about those patches as soon as the sites are upgraded to 2.1.
Comment #39
Marshall_Kennard CreditAttribution: Marshall_Kennard commentedComment #39.0
Marshall_Kennard CreditAttribution: Marshall_Kennard commentedAdded additional reference.