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.
I got that message during upgrade.
Maybe we have to just change line 16 of taxonomy_image.install from:
$query = db_select('term_image')
to:
$query = db_select('term_image', 't')
Comment | File | Size | Author |
---|---|---|---|
#19 | broken_upgrade-1498352-3.patch | 6.92 KB | splash112 |
#18 | broken_upgrade-1498352-2.patch | 7.05 KB | splash112 |
#16 | broken_upgrade-1498352.patch | 5.49 KB | splash112 |
#13 | 1498352-taxonomy_image-upgrade.patch | 6.61 KB | mandreato |
Comments
Comment #1
mandreato CreditAttribution: mandreato commentedAfter that, I get other errors:
Comment #2
apratt CreditAttribution: apratt commentedI'm getting the same types of errors. I guess this really is dev stuff - not even beta. What I'm wondering is how the field gets associated with the content type. It appears to me that it needs to be intantiated. I'll try and dig into this whole fields in core thing today since I'm not eager to manually recreate 3,000 taxonomy images. Maybe Joachcim's field convert is the way to go. It looks really comprehensive and it worked well for my image migration.
Comment #3
Niklas Fiekas CreditAttribution: Niklas Fiekas commentedI want to give this another blind stab before I go look at it more closely: http://drupalcode.org/project/taxonomy_image.git/commitdiff/725d975.
Thanks a lot @mandreato for testing and the excellent error reports. Sorry for the delay. I wasn't subscribed to all issues.
@apratt: Field convert would probably be a good alternative. Help on this is appreciated :)
Comment #4
mandreato CreditAttribution: mandreato commentedI've retried a full D6 --> D7 upgrade and I get a different message now:
Comment #5
mandreato CreditAttribution: mandreato commentedis the cause of missing bundle and it should be corrected into the following:
Comment #6
Niklas Fiekas CreditAttribution: Niklas Fiekas commentedGood catch, thanks mandreato! Committed and pushed http://drupalcode.org/project/taxonomy_image.git/commitdiff/c6b68a1. Does this fix the upgrade path or are there more issues?
Comment #7
mandreato CreditAttribution: mandreato commentedWe're getting closer, step by step, but there is another problem: after applying fixes and upgrading, the taxonomy terms have empty images and I get an error if I try to delete/replace them:
I think that a better manage of URI it is needed during conversion, but I'm not an expert... Maybe the Ubercart catalog module would be a good example, since it does similar upgrade --> see uc_catalog.install
Comment #8
Niklas Fiekas CreditAttribution: Niklas Fiekas commentedThanks again.
Maybe this is enough for our purpose (?):
Next I should really setup a test site with some images myself.
Comment #9
mandreato CreditAttribution: mandreato commentedI've retried, now there is another problem:
Maybe this is due to the fact that some taxonomy term on my site uses the same image filename as of certain products (nodes).
For example:
- node A has the image filename imageA.png stored in ...\sites\default\files
- taxonomy term A has the same image filename imageA.png stored in ...\sites\default\files\category_pictures
This is similar to #1176186: D6 -> D7 upgrade: Duplicate files cause Integrity constraint violation: 1062 Duplicate entry 'xx' for key 'PRIMARY' so I think I can resolve it by forcing a unique filename for every taxonomy term...
Comment #10
mandreato CreditAttribution: mandreato commentedI've retried again, after deleting all image name duplications.
Now there is another kind of problem:
Comment #11
mandreato CreditAttribution: mandreato commentedFYI I was able to merge logic from uc_catalog.install into the following taxonomy_image.install and it worked !
Comment #12
Niklas Fiekas CreditAttribution: Niklas Fiekas commentedSounds awesome. Thanks mandreato. Can you upload a patch?
Comment #13
mandreato CreditAttribution: mandreato commentedSee the attached patch. Warning: newbie here !
Comment #14
Niklas Fiekas CreditAttribution: Niklas Fiekas commentedThanks again. The patch looks good except a few whitespace issues and line breaks, but I can fix that myself.
I am a bit worried about this one:
Does that mean we would no longer page the query, but instead try to import all files at once? That might exceed execution time, when there are lots of rows.
Comment #15
mandreato CreditAttribution: mandreato commentedI tried to keep the range statement, but it caused to process only 10 records. Keep in mind that I'm not an expert in PHP... So, since I have <200 terms, I preferred to work them all together.
Comment #16
splash112 CreditAttribution: splash112 commentedNew patch, mostly based on the work of mandreato
- made sure image module is enabled
- batch.api working
- tried to clean up some mess with duplicate file entries from drupal 5 #1260938: d6 to d7 update fails on file duplicates '#7061 Integrity constraint violation'
Somehow, some of the images are not in the files table and will not get upgraded. Rest seems to work pretty ok.
Comment #17
splash112 CreditAttribution: splash112 commentedComment #18
splash112 CreditAttribution: splash112 commentedNew version, should now upgrade as much information as possible
Comment #19
splash112 CreditAttribution: splash112 commentedtoo late for me tonight. Just a small bugfix. All images not in the files directory should be attached as well.
Comment #20
mandreato CreditAttribution: mandreato commentedI've done another upgrade cycle with patch #19 and all taxonomy images were managed correctly.
Thanks !
Comment #21
tjharman CreditAttribution: tjharman commentedMy upgrade from D6-D7 didn't carry across all the images.
I've been running my D7 site in production for a while now, so I can't roll it back.
Is there some way to trigger the taxonomy_image upgrade again though?
Disabling and re-enabling the module doesn't work. Now I've applied the patch in #19 I'd like to try again in the hope all my images follow me this time.
Thanks!
Comment #22
tjharman CreditAttribution: tjharman commentedJust a re-ask of the #21.
Would like to "try again" but can't see seem to trigger the upgrade attempt.
Comment #23
GStegemann CreditAttribution: GStegemann commentedHow about setting the schema_version in the system table of this module to something lower than 7000 and running update.php again?