Am trying to get upgraded, getting stuck here...
The following updates returned messages
taxonomy module
Update #7005
Failed: PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'node-2-2-0-0-und' for key 1: INSERT INTO {field_revision_taxonomyextra} (entity_type, entity_id, revision_id, bundle, language, delta, taxonomyextra_tid) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6); Array ( [:db_insert_placeholder_0] => node [:db_insert_placeholder_1] => 2 [:db_insert_placeholder_2] => 2 [:db_insert_placeholder_3] => weblinks [:db_insert_placeholder_4] => und [:db_insert_placeholder_5] => 0 [:db_insert_placeholder_6] => 72 ) in taxonomy_update_7005() (line 695 of /home/hoslot5/public_html/modules/taxonomy/taxonomy.install).
Comment | File | Size | Author |
---|---|---|---|
#31 | 1140746_taxonomy_module_install_upgrade_failure.patch | 1.43 KB | DuttonMa |
Comments
Comment #1
Starminder CreditAttribution: Starminder commentedComment #2
Starminder CreditAttribution: Starminder commentedComment #3
catchLooks like the update is attempting to insert the same delta twice.
Could you run SELECT * FROM term_node WHERE nid = 2; and paste the results in here?
Comment #4
Starminder CreditAttribution: Starminder commentedDid you really mean SELECT * FROM `taxonomy_term_node` WHERE nid = 2?
SQL result
===Database hoslot5_hosr
== Table structure for table taxonomy_term_node
|------
|Field|Type|Null|Default
|------
|nid|int(10) |No|0
|//**vid**//|int(10) |No|0
|//**tid**//|int(10) |No|0
== Dumping data for table taxonomy_term_node
|2|2|112
|2|2|1645
|2|2|72
|2|2|150
|2|2|1644
|2|2|246
|2|2|149
|2|2|108
|2|2|969
|2|2|1643
|2|2|1642
|2|2|156
== Table structure for table taxonomy_term_node
|------
|Field|Type|Null|Default
|------
|nid|int(10) |No|0
|//**vid**//|int(10) |No|0
|//**tid**//|int(10) |No|0
If I did it wrong just holler :) Thanks Catch!
Comment #5
catchThat looks normal to me. Are you trying to re-run an update?
If you are, then that's not supported - if you get an error updating, you need to restore a backup of your Drupal 6 site, then run the upgrade from scratch again. You can then work through the errors one at a time, and eventually it should complete successfully.
Comment #6
Starminder CreditAttribution: Starminder commentedack. funny thing happened, thought I had a good backup of the db but it appears I do not. any other suggestions?? :)
Comment #7
moshe weitzman CreditAttribution: moshe weitzman commentedComment #8
Starminder CreditAttribution: Starminder commentedSo...do I have ANY options here?
Comment #9
catchTruncate the field data table for that field before rerunning the update may get you through it, but you don't have many options if you haven't kept a backup.
Comment #10
Starminder CreditAttribution: Starminder commentedTruncate worked! YAY! I still have a ton of issues related to the upgrade, but I think this was the largest.
Comment #11
Starminder CreditAttribution: Starminder commentedComment #12
surfer_1 CreditAttribution: surfer_1 commentedI am getting same error when upgrade from d6 to d7. What is truncate? anyone help me please. How can apply it?
Comment #13
Jean Gionet CreditAttribution: Jean Gionet commentedI'm still getting this error while trying to upgrade from 6.22 to 7.4
any fixes or workarounds? I've tried emptying the tables it mentions and still no go!
Comment #14
lionel.a CreditAttribution: lionel.a commentedHi,
The solution at #9 worked also for me :
TRUNCATE TABLE `taxonomy_term_node`;
I tried at first to delete only the line with problem (in my case, it wasn't 2 but 20). After that, the problem moved to 24. So, the truncate option was better.
Thanks !
Comment #15
Aurochs CreditAttribution: Aurochs commentedThanx - but am i losing some data or terms after truncate? it actually helped me and i had no mor emistakes after that. but still migrating so what can be the results of such action?
Comment #16
darrick CreditAttribution: darrick commented@Aurochs You'll want to TRUNCATE field_data_taxonomyextra, field_revision_taxonomyextra and all the field_data_taxonomy_vocabulary_x and field_revision_taxonomy_vocabulary_X tables. Not the the taxonomy_term_node table which is your source data.
I ran into the problem because I had a nodes with negative created dates which caused inserts to taxonomy_index to fail. Which is another table you should TRUNCATE.
Comment #17
steveOR CreditAttribution: steveOR commentedHad this come up today on a local environment 6.22 -> 7.10 upgrade. Looks like the 7005 update is a bit slow if you have lots of taxonomy vocabs/terms, so this error in my case was caused by re-running update.php after a php script timeout on the previous try. Here was my solution:
php.ini - change max_execution_time to 300 (was set at 60 seconds)
restarted apache
truncated these tables only:
field_data_taxonomyextra
field_data_taxonomy_vocabulary_x (one table per vocabulary id)
field_revision_taxonomyextra
field_revision_taxonomy_vocabulary_x (one table per vocabulary id)
ran update.php
VaVoom! The 7005 update completes successfully and the other update scripts can continue. If at any point you get another script timeout, you need to truncate again before retrying.
Now onto more D7 upgrade tasks...
:)
Comment #18
fixus971 CreditAttribution: fixus971 commentedHi, I'm tried many time and in many mode using #17 without success:
From Drupal 6.22 to Drupal 7.10 without modules/themes; PHP time limit set to 600; update in 1min.20sec
If retry for last 7 update tasks:
Some time get red error:
Comment #19
fixus971 CreditAttribution: fixus971 commentedSame problem using Drupal-DEV
Comment #20
fixus971 CreditAttribution: fixus971 commentedSOLVED!!
After reading: http://drupal.org/node/1301582
I realize mean of error text so as #16
I ran into the problem because I had a nodes with negative created dates which cause error on inserts.
To solve problem simply go in DB on Node table ordered by date.
Copy a normal value to negative dates elements.
Update.php->All done ok! ^_^ finally
Comment #21
xjmInteresting! I wonder what was setting negative created dates. Glad you got it working.
Comment #22
iamEAP CreditAttribution: iamEAP commentedI'm actually experiencing the same thing.
#17 does not work for me. Setting my max_execution_time absurdly high, though successful in making the updates run in a single go, does not make taxonomy_update_7005 succeed. Truncating all of the relevant tables and then running the update again also does not work.
#20 was not relevant to me as I have no nodes with negative create dates.
I also looked at the relevant values mentioned by catch in #3 and found nothing unusual (i.e. no duplicate values for the offending insert).
Any other ideas?
Comment #23
xjmAlso, it's generally probably better to file a new issue rather than reopening an old one; this one seems to be a collection of various different errors.
Comment #24
iamEAP CreditAttribution: iamEAP commentedThanks for the quick response!
Comment #25
xjmHmm, lots of potential issues there. My first guess would be content taxonomy. Second would be i18n. As for trying to reproduce it, having devel generate enabled to generate the content should be fine. Thanks!
Comment #26
iamEAP CreditAttribution: iamEAP commentedCreated a new issue on what may be a bug, with patch: #1526436: taxonomy_update_7005() sometimes fails when inserting into field_data_taxonomy_vocabulary_N Going to re-close this now.
Thanks again, xjm.
Comment #27
stoickthevast CreditAttribution: stoickthevast commentedI have problem here as well.
Thanks
Comment #28
rajeevkHello, I am getting this error while migrating -
Can any body help ?
Thanks,
RajeevK
Comment #29
neozerosv CreditAttribution: neozerosv commentedDrop the table taxonomy_update_7005 and restart the update. After that see if theres an error.
Anyway, you should start the update from zero, i mean woth the D6 database.
Comment #30
dddave CreditAttribution: dddave commentedClosing again
Comment #31
DuttonMa CreditAttribution: DuttonMa commentedRe-opening this as I had the same problem and using some of the truncate solutions above causes me to lose important taxonomy data during the upgrade.
I have added a try / catch around the offending insert queries and have specifically caught the integrity constraint exception (PDOEXCEPTION). This means that the appropriate table is only truncated when absolutely necessary and therefore no data is lost.
This solved my upgrade problem (which I had been stuck on for 3 days !).
Comment #32
geekinpink CreditAttribution: geekinpink commented#9 and #29 both worked for me
First i dropped table taxonomy_update_7005 table and then truncated table `taxonomy_term_node`;
Thnaks a lot:)
Comment #33
newswatch CreditAttribution: newswatch commentedYes, #32 worked for me too :)
Smooth!
Comment #34
steinmb CreditAttribution: steinmb as a volunteer commentedFor whats it's worth. Debugging Drupal 7 date module in PostgreSQL and got this upgrading from Drupal 6 to 7.
How to reproduce:
* Install Drupal 6 LTS - default profile.
* Run upgrade to Drupal 7
* Remove all terms and vocabulary does not help.
Removing default 'story' content type and uninstall taxonomy module before upgrading to 7 does not help. Have not checked if the Taxonomy module in Drupal 6 really clean up, aka. remove its tables, when I uninstall. If not it could explain why 7005 trigger...
Comment #35
steinmb CreditAttribution: steinmb as a volunteer commentedBTW: Patch in #31 does not address it, nor does workaround in #29
Comment #36
steinmb CreditAttribution: steinmb as a volunteer commentedDid not mean to do that.