Your INSTALL.txt still mentions using a .mysql file, yet none is included. I figured out that the amazon.install file is supposed to take it's place, but it doesn't appear to be documented anywhere how to actually use .install files.

I tried running update.php and moving the .install file around to root and /modules, using the little bit of discussion from this: http://drupal.org/node/43492. No luck.

I guess I'll just pull amazon.mysql out of the cvs dead files and hope it works. But please update your docs. Thanks.

Comments

benthere’s picture

Hmm...that didn't seem to work. Got error message:

Location: /admin/amazon_import
Message: Invalid argument supplied for foreach() in /home/.mahir/pfxben/test/modules/amazontools/amazon.php5.inc on line 112.

Sorry if I sounded too abrupt with my first post. Just when I thought I was getting the hang of this... ;-)

Prometheus6’s picture

Assigned: Unassigned » Prometheus6
Category: bug » support

Sorry if I sounded too abrupt with my first post.

The frustration is understandable. Changing the docs has been a low priority, but it's looking like folks are out of patience waiting for the official 4.7 release of Drupal.

The install file is cool. All you have to do is enable the module in admin/module and Drupal will run the hook_install() routine. You don't have to mess around with an sql client anymore.

benthere’s picture

Title: Please provide instructions how to use amazon.install » amazon.install needs documentation, other 4.7.0-beta6 / php5 problems

Well I guess I got myself into a bit of a mess with this. I couldn't find any way to get the hook_install() to rerun. Tried setting status and schema_version to '0' in system table, but that didn't work.

Then I rewrote the install file back to a sql statement to run it manually. And I think I got the tables in okay. But I was back to the same error I got when I tried to use the old mysql file:

# warning: Invalid argument supplied for foreach() in /home/.mahir/pfxben/test/modules/amazontools/amazon.php5.inc on line 112.
# warning: array_merge() [function.array-merge]: Argument #2 is not an array in /home/.mahir/pfxben/test/modules/amazontools/amazon.php5.inc on line 211.

----

I also fixed an error in amazon.php5.inc related to array2object function gone in 4.7:

diff amazon.php5.inc.old amazon.php5.inc
223c223
<       $AmazonItemList[] = array2object($_CurrentItem);
---
>       $AmazonItemList[] = (object) $_CurrentItem;
Prometheus6’s picture

Okay, I'll look at the php5 code. I'll admit I got lazy and didn't check the php5 include as well as I could have.

benthere’s picture

Great, thanks a lot Prometheus. I switched my hosting back to php4 and it seems to work fine. I'll try to help find php5 errors if I can, but this works good for now.

Prometheus6’s picture

I fixed the php5 include...I was accessing the wrong property when parsing editorial reviews. That and the array2object thing should do it (thanks for catching that).

benthere’s picture

Just switched back to php5. All good so far. Thanks.

Prometheus6’s picture

Status: Active » Closed (fixed)