I am running Drupal 4.7.6 on PHP 5 with version 4.7.x-1.2 of the Amazon associate tools module.
The problem I have is when I create a new "amazon" node and list several (my tests were with 7) related books, upon submitting, the page loads until the server times out the request, about 5 minutes in my case. The Apache error log indicates a premature end of script headers in the php5.cgi that my web host uses, with "/node/add/amazon" as the referrer. When I check the database, there are ~230 new amazon_node rows in the nodes table, 3 new rows in the amazonitem table, and zero rows in the amazonnode table. Of the 230 amazon_nodes in the nodes table, there are only 3 unique rows (the same ones that are in the amazonitem table).
I did some digging around in the code and determined that the correct XML response was being returned from Amazon, and it was being correctly parsed into an array of objects by amazon.module. The problem seems to be with the amazon_nodeapi function, in the 'insert' case. It almost looks like it's infinitely looping through the related books, maybe due to a problem in the _to_amazonnode function. I'm just not familiar enough with the Drupal API at this point to find the root of the problem.
Any thoughts? This is an unmodified installation of the module, and the database tables didn't exist before I installed it.
Thank you.
Comments
Comment #1
Prometheus6 commentedI have seen this question before and have never been able to duplicate it. Now I see the problem...the amazon and amazon_node types were never intended to use that related links field. It has the same internal name as the ASIN field and that WILL make it loop.
The proper fix for this is to eliminate the possibility of using it, from my perspective.
Comment #2
slower commentedI'm actually not using the "related links" module, and the "related books" field I'm referring to comes straight out of amazontools/amazon.module around line 400.
Comment #3
Prometheus6 commentedOkay, I'm going to try this while I'm away this time. The failure to communicate is on my part.
The problem is, the internal name of field labeled 'ASIN' in the two node types created by the module is the same as the internal name of the field labeled 'Related books'. If in configuring the node types 'amazon' or 'amazon_node" you check the box to enable Amazon.com related product links, you will run into this problem. These types were never intended to use Amazon.com related product links...I anticipated people would use that related_links module.
I will have to prevent the possibility.
Comment #4
MGParisi commented4.7 sorry 4.7 is no longer supported!