Closed (outdated)
Project:
Drupal core
Version:
7.x-dev
Component:
database update system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
14 Dec 2011 at 22:53 UTC
Updated:
14 May 2020 at 13:13 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
twowheeler commentedThat works. I had the same error, but no multisite install. Drupal is installed in a subdirectory under the web root and RewriteBase is set to /web in .htaccess, but I don't know if that matters. At any rate, adding this line to text.install allowed the upgrade to complete. Thanks!
Comment #2
bok11 commentedI confirm - this solution works :)
Comment #3
dkingofpa commentedI was having this issue as well when upgrading core from 6.24 to 7.12 via the drush updatedb command.
I set a dependency on the text module so it's upgrade isn't run before the fields module is enabled (system_7020). Patch attached.
Comment #4
dkingofpa commentedComment #5
zach.bimson commentedI've hit exactly the same problem with my site..
I've tried the first fix and the patch both resulting in the same thing.
It gets me past the update but returning to the update.php all the same updates are still available..
It then fails to this error..
Thats not the whole error as its huge but gives you an idea..
Any suggestions ?
Comment #6
dkingofpa commented@zach.bimson
That's a separate issue and I would suggest opening a new ticket if you can't find any previously submitted tickets. Google "drupal upgrade integrity constraint violation primary role permission". Integrity constraint violations with permissions seem to be common during drupal upgrades.
Comment #7
zach.bimson commented@dkingofpa
Thanks for the fast response, i will do.
Comment #8
xtfer commentedThe solution posted in the original post solves this issue.
I havent tested the patch in #3.
Comment #9
xtfer commentedStrike that. Patch in #3 seems to fix it, original solution does not.
Comment #10
tim.plunkettThis could likely use tests. Also, are we sure this doesn't need anything in 8.x first?
Comment #11
Anonymous (not verified) commentedpatch #3 fixes the issue, pls commit
Comment #12
dawnbuie commentedShould patch #3 be applied to the new Drupal 7 install? Or has it already been committed and should be included in the latest Drupal 7 version?
I'm getting this error after using Drush sup command - upgrading from one local directory to another.
thanks.
Comment #13
tim.plunkettIt has not been committed yet. It still needs automated tests.
Comment #14
dawnbuie commentedI tried applying the patch from #3 and got the message
Is this the whole patch or is it missing something?
Comment #15
mustanggb commentedComment #16
dawnbuie commentedOk I see the patch did actually work - just gave confusing output.
Well the patch was applied, I ran the upgrade:
$drush sup @new_sitereusing the Drupal 7 core I had patched.
That time I didn't get the 7000 field error but I got the message:
updatedb failed for corewith no further info.
I see other people have been encountering update_7000_field_read_fields() errors as well:
http://drupal.org/node/1228488
http://drupal.org/node/1220602#comment-4776144
I don't know what to try next? Turn off the CCK content module in Drpal 6 before starting the upgrade process?
Try a manual upgrade rather than using the drush site-upgrade module?
Strangely I did have success with drush site-upgrade 2 months ago. I'm not sure if a new bug has been introduced into Drupal 6,7 or Drush site-upgrade.
Comment #17
mustanggb commentedComment #18
philsward commentedI'm going to throw in my $0.02 about this situation... I too ran into the same error and arrived upon this post. I applied the patch and while it was successful in it's intended purpose, I still had problems with the install. A PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry... The point is, I believe this error is directly related to a subsequent error, not a failed upgrade on the text module... What turned out to fail (causing this error originally) was System Update #7007. I noticed in the following PDOexception error that something to do with the permissions of panels was causing #7007 to fail. I re-enabled all of the panels modules and noticed that my "administrator" role, was not checked for mini panels. (Looking at the original untouched site, this was indeed checked). I think that when disabling all of the contrib modules (and I do core too) something messed up the permissions for that module. I re-enabled the permission setting, disabled panels and ctools again and the upgrade went through without a hitch.
If you are getting the error described here, "continue to the error page" link on your site. You should be presented with the normal drupal error's of why the upgrade failed. "If" you're getting a PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry... error, chances are you have some permissions that are completely borked. The very first item should give you an idea of where to start, for example in http://drupal.org/node/1421518, he has a problem with '14-3-workflow_access'. I'm guessing something to do with the permissions for his workflow module or content type is causing the problem.
Hope this helps someone else!
Comment #19
vojnar commented#3works please commit
Comment #20
philsward commentedIn doing some more testing, my theory (in my case) for my comment #18 was indeed the cause of the error.
Panels "mini-panels" permissions for the "Administrator Role", caused the hangup in my upgrade. My fix was to simply uncheck the mini-panels permissions for the administrator role on D6, before the upgrade. (I didn't re-check and save, just left them unchecked and upgraded) The upgrade went through without a hitch!
It appears to me that the permissions are getting borked on various modules. Instead of creating a workaround to the issue, it might be worth adding something to the upgrade process to check / rebuild all of the module permissions before performing the upgrade? Just a thought.
Comment #21
leo pitt commentedThe patch in #3 works for me also ... please commit
Comment #22
13rac1 commented@vojnar and @Leo Pitt this patch cannot be committed until tests are written.
Comment #23
parasolx commentedTested and work. upgrading D6 to D7 with 10000+ nodes without any problem.
Comment #24
13rac1 commentedIf you want this committed someone must write the automated tests. Please stop changing the status.
Comment #25
rituraj.gupta commentedHi,
I am migrating a drupal 6 website to drupal 7 and I am facing so many issues. when update is done, below some issues occur:
The following updates returned messages
node module
Update #7000
Failed: DatabaseSchemaObjectExistsException: Cannot rename field node_type.module to base: target field already exists. in DatabaseSchema_mysql->changeField() (line 457 of /home/ds00/public_html/touchoncology/includes/database/mysql/schema.inc).
block module
Update #7002
Failed: DatabaseSchemaObjectExistsException: Cannot rename blocks to block: table block already exists. in DatabaseSchema_mysql->renameTable() (line 307 of /home/ds00/public_html/touchoncology/includes/database/mysql/schema.inc).
system module
Update #7002
Failed: DatabaseSchemaObjectExistsException: Table blocked_ips already exists. in DatabaseSchema->createTable() (line 657 of /home/ds00/public_html/touchoncology/includes/database/schema.inc).
please help.
Comment #26
Infinitee commentedrituraj.gupta #25
This error message does not belong in this thread but, try running update repeatedly until all updates are completed.
Comment #27
dkinzer commented#3 works.
Comment #28
aitala commentedI am running into this issue now trying to go to D7.56 on a site where I had no issues a few months back - at least doing the Drupal update. I got into doing the CCK field migration just fine...
The patch does not seem to work.
Does anyone have an idea?
Thanks,
Eric
Comment #29
Aldu_boy commentedDrupal 7.69, ungraded from 6.38
The issue is still there.
Edited text.installb manually by addding changed from patch (I have no ssh to apply patch) and added the line:
require_once DRUPAL_ROOT . '/modules/field/field.install';
this fixed the issue.