Having the issue with back covers showing in D6. It started about a week ago. In /admin/config/services/amazon/test the url used in the array is pointing straight to the back cover image and not to the front-image. If there are more than two images for one product, the second images is shown under /admin/config/services/amazon/test.
Pls help
Greetz Bavra
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | amazon-fix-image-order-2508265-7.patch | 869 bytes | smitty |
| #6 | amazon-fix-image-order-2508265-6.patch | 735 bytes | kamescg |
Comments
Comment #1
bavramor commentedComment #2
dandaman commentedI'm seeing this on my 7.x site too. See this page:
http://www.da-man.com/my-movie-collection
Until recently they were giving me the first image, a nice-looking cover image of the movie title. But now it seems to be no longer doing that.
Just a thought: maybe the content owners are making Amazon not show their copyrighted stuff via the API? If so; it's a shame--I'm linking to Amazon so I'd expect they might even sell a bit more product for having the nice images on my page.
Comment #3
shearstock commentedI'm having the same issue. Any fixes?
Comment #4
kamescg commentedFrom what I can tell it looks like Amazon XML results offset the image array by 1 - so the first image actually appears last.
You can see the raw XML request at http://codebin.org/view/b962c60f - I'm still trying to figure out if it's caused by the Amazon Module request or Amazon API simply changed.
Comment #5
kamescg commentedEDIT: Use the patch below!
Comment #6
kamescg commentedAttached is a patch will reverse the ImageSets->ImageSet array order, so the first one is the one that shows up.
This could be a temporary fix, because I am not sure, whether it's the module or Amazon API causing the problem...
Comment #7
smitty commentedThe last patch did not work for me. Syntax errors ...
So I did have a look inside the problem and came out with the attached patch.
Might be a little cumbersome but it seems to work.
Comment #8
kamescg commentedSmitty: Yes - sorry about that. I pushed out the update a little to swiftly :)
I just want to make sure we're both tackling the correct problem. The ticket says it's for 6.x-1.x so maybe we're submitting the patch in the wrong place?
Maybe you want to submit you patch to https://www.drupal.org/node/2497913 - the one you marked as duplicate? We can apply a patch to 6.x-1.x separately?
Comment #9
smitty commentedWell, I didn't see that 6.x-1.x/7.x-1.x-stuff. Sorry!
The code should be the same in both cases.
So to make the patch work correctly we just have to change the line-numbers, I think.
Please feel free to change the patch and to supply two different patches for 6/7.
Comment #10
kamescg commentedI'd be happy too - I'll have to get Drupal 6 up and running though and double check about the line number.
Do you want to submit the patch to the other thread? https://www.drupal.org/node/2497913
BTW good find on the "Category=primary" - I completely missed that when reviewing the XML request.
Comment #11
jenniferannwalsh commentedTried both the 6 and 7 patches on this page but neither worked for me. The 6 version led to parse errors (Parse error: syntax error, unexpected '['). The 7 version had no errors but still seeing the backs of books instead of the front. Both had to be applied by hand as the patch command failed. This is on a D6 site running Amazon Module 6.x-1.x-dev. Happy to help test any D6 versions. Will check back frequently. // jen
Comment #12
smitty commentedMight be you have to clear all caches to get the changes working ...
Comment #13
jenniferannwalsh commentedThanks smitty. I had cleared cache (or so I thought!?) but didn't see changes immediately. Just checked back now and all is well. Thank you! The 7 version is what worked for me.
Comment #14
kamescg commentedWhat's happening is the old images are still being referenced from the amazon_item_image table. To test if the patch is working run the Product ASIN through the API Test (admin/config/services/amazon/test) which will cause the database to drop the old database reference and run a new Amazon API XML request - storing the new primary image in the database.
Comment #15
smitty commentedYes, I had forgotten to mention: It takes the time you have configured for the "Amazon refresh schedule" in admin/config/services/amazon/storage to refresh he images.
Maybe reconfiguring this setting will empty the database and force a reload of the images.
Comment #16
dandaman commentedHas the Amazon API turned itself around wholly? It seemed tome it was doing it one some products and not on some others.
For now I just took the cover art of my little blog site as it's not that useful as some show the nice cover and some show something else.
Comment #17
AntiNSA commentedIt seems I am only getting default image and unable to get product images completely even wiht patch ... any ideas?
Comment #18
kamescg commented@dandaman I can't speak for all of Amazon's Product API request, but from the ones I tested the primary image is now displayed last in the array and marked in XML as ""
@AntiNSA Can you just confirm what version of Drupal you are using? Currently, no one has uploaded a patch for 6.x - Smitty and I simply posted the patch in the wrong thread. The thread for 7.x https://www.drupal.org/node/2497913 contains more information regarding the topic.
Comment #19
AntiNSA commentedI had thought this was the correct patch for d6 https://www.drupal.org/files/issues/amazon-fix-image-order-2508265-6.patch , posted by the OP of this thread?
Is that not the correct patch to be using?
Comment #20
AntiNSA commentedCan someone make it clear which d6 version patch to be using? @kamescg ..... you are saying that the correct patch for d6 has not been uploaded yet? Comment # 7 is not it? I greatly appreciate any working patch. I am on d6.
Comment #21
jvieille commentedThe patch of d7 works on d6 (applied manually)
However, the cache clearing is painful.
Actually, I only succeeded by submitted every book to the API test
Comment #22
AntiNSA commentedIm not having much luck getting the d7 version working on d6..... are you saying clearing cache 101 times might work?
Comment #23
jvieille commentedNo, even 102 will not make it.
You should submit all your items to the API test at this page /admin/settings/amazon/test
Comment #24
goldschmidt.a commentedI was having the same issue with the unwanted second image showing up instead of the nice first image (on D7, using Amazon module version 7.x-1.1). I just wanted to confirm that yes, this patch that kamescq and smitty posted in comment #7 worked for me in the amazon.module file: https://www.drupal.org/files/issues/amazon-fix-image-order-2508265-7.patch
Also, after applying this patch, I just followed what smitty said in comment #15 to update all of my images at once (no manual entry into the ASIN tester needed):
1. At ...admin/config/services/amazon/storage, Change the Amazon refresh schedule to be as short as possible [1 hour].
2. At ...admin/reports/status, Run cron manually. This will refresh your Amazon cache for any items that haven't been refreshed within the past 1 hour. Clearing caches doesn't work, and running cron seems to only update based on the Amazon refresh schedule.
Thanks so much for this patch @kamescg and @smitty ! ! ! :-)
Comment #25
travisc commentedWondering if this has been committed to Dev?