While trying to use this module to migrate from the amazon associate tools on howigotengaged.com, I found the following set of errors.

There is a SQL error in the code. The "where" clause is specified multiple times:

  $sql = "SELECT * FROM {amazon_item_node} ain WHERE ain.nid = %d ORDER BY delta ASC WHERE ain.module = 'aat_legacy'";

I think it should be:

  $sql = "SELECT * FROM {amazon_item_node} ain WHERE ain.nid = %d AND ain.module = 'aat_legacy' ORDER BY delta ASC";

In the view hook, it attempts to call theme on $product which is never defined. In addition, the nested theme calls don't appear to behave correctly.

Attaching a patch, setting severity to critical b/c this bug blocks the modules use.

With these fixes and by fixing the null-able columns mentioned in http://drupal.org/node/353285 I have been able to get the legacy nodes to show up in a amazon item view, but am still struggling to view the old nodes. It appears that when viewing the nodes it is correctly pulling back the data from the API, but am still running into the following error:

Invalid argument supplied for foreach() in C:\twamp\htdocs\hig\sites\all\modules\cck\content.module on line 1284.

I will continue to troubleshoot as time allows.

CommentFileSizeAuthor
aat_legacy.module.patch893 bytesahansen1
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

asb’s picture

Hi ahansen1,

we're having similar troubles with aat_legacy, so thank you for the patch!

Hint for other users of the patch: It has to be executed from inside the ./sites/all/modules/amazon/aat_legacy directory.

However, even after running the patch I'm unable to enable the "Amazon legacy support" sub-module:

Fatal error: Cannot use object of type stdClass as array in /var/www/migration/sites/all/modules/amazon/aat_legacy/aat_legacy.install on line 13

Possibly related issues: #231612: Upgrade path for Amazon associate tools module? and #541998: aat_legacy sub-module can't be enabled.

Greetings,- asb

ahansen1’s picture

I also had to do what is described in http://drupal.org/node/541998

rfay’s picture

Status: Active » Closed (duplicate)

Marking this a duplicate of #231612: Upgrade path for Amazon associate tools module?. AAT may not have a future. Chime in on that issue.