By jnunn on
I've installed the Amazon Items module (http://drupal.org/node/16254), however I am unable to get this to work. Apart from installing the module and following the installation instructions, is there something else I need to do, or install?
When I enter an ASIN (ISBN) into the New Item box in my book review section, I get the following error message ("No records matched that Asin."). I've entered the ASIN as 1-58542-314-9 and 1585423149 and get the same error. The setting for Amazon Items server is xml.amazon.com (the default).
Any suggestions or clues on how to get this to work?
Comments
All I get is warnings
I am running the latest snapshot of 4.6 and just tried installing the last version of Amazontools (http://drupal.org/files/projects/amazontools-4.6.0.tar.gz) and get the following just after activating the modules.
warning: Cannot modify header information - headers already sent by (output started at /home/httpd/vhosts/gnuker.com/subdomains/cpg/httpdocs/modules/amazontools/amazon_init.inc:1) in /home/httpd/vhosts/gnuker.com/subdomains/cpg/httpdocs/includes/common.inc on line 192.
I'm running FC1/Plesk 7.04 php 4.3.10, MySQL 4.0.24
First, Amazon associate
First, Amazon associate tools
http://drupal.org/node/18842
...is a different module than Amazon Items.
http://drupal.org/node/16254
Second, try a clean install of the latest Drupal snapshot.
Amazon_Items
Well, after installing a new drupal site, installing the Amazon Tools it is no better.
I can get all the way to add the ASIN. Once I submit it, I get a blank page.
Weird.
Another day in the life. :)
Error from Amazon_Items
This is the error from the domain log.
Amazon associate tools has
Amazon associate tools has no connection with Amazon Items. Totally different code, totally different method of getting data from Amazon.com.
Amazon_ITEMS
I incorrectly placed the question about the amazon tools link in my first post.
This is about Amazon_Items as the errors listed in my other post shows.
I installed a fresh copy of drupal and amazon_items do not work. All I get is blank pages and errors about the check_query() function in my logs.
All I have read led me to believe this had been corrected but it obviously hasn't.
Was hoping to get this working, but guess that won't be possible.
Thanks
Cool.
Cool.
That said, try Amazon associate tools. :-) It's specific to 4.6, has a random book block, allows multiple Amazon links at the end of any node EXCEPT those defined in the module...one for book reviews (which puts the link at the top of the node) and one for nothing but product info. It's still in development but if Amazon Items is what you were looking for I think you'll be satisfied with it now.
Hoorah!
warning: Cannot modify header information - headers already sent by (output started at /home/httpd/vhosts/mydomain.com/subdomains/sub/httpdocs/modules/amazontools/amazon_init.inc:1) in /home/httpd/vhosts/mydomain.com/subdomains/sub/httpdocs/includes/common.inc on line 192.New install of the latest CVS, no other mods activated, no other changes made to the code.
read manuals
check_query is covered at http://drupal.org/node/12347 this became such a FAQ I know the nid off head.
Cannot modify header information is covered in the php manual: you must make sure you put the header function before all output..otherwise you'll end up with an error such as: 'Warning: Cannot modify header information - headers already sent by'. The error message shown in this topic means that amazon_init.inc line 1 contains something that is not PHP code, thus it is sent to the browser (maybe you opened it with a brain dead editor and it put a BOM in the beginning?).
--
Drupal development: making the world better, one patch at a time. | A bedroom without a teddy is like a face without a smile.
Or, maybe I opened it in a
Or, maybe I opened it in a brain-dead editor before I committed it...which is possible, but I doubt it. And ontime is innocent as well.
That file, specifically, is UTF-8 encoded because it has category names specific to the French and German Amazon stores. And I just downloaded the module and found corrupted data at the top of it. The actual file on my local system does NOT have such corruption though, and when I (just) recommitted it the junk is still there...and every non-ASCII character in the German and French store categories is corrupted.
I think I have to zip this file in the archive or mark it as binary or something. Meanwhile I've opened a bug report and attached the copy of amazon_init.inc from my local system. And I'll ask around the development list about whether CVS is handling Unicode files properly.
I WILL fix this, because though I'm willing to support my code I have no intention of having modules around that I need to support.
Not Opened by me
I downloaded, unzipped and uploaded the module, nothing more. Hope to see it work someday.
Byte order mark
Is the "corrupted data" at the top perhaps 3 bytes, which look like  when viewed under ANSI encoding? If so, this is the UTF-8 byte order mark/signature. Your editor should allow you to choose to add one or not. It's a stupid Microsoft practice which wreaks havoc on source code and scripts.
Still, I just downloaded the .tar.gz and as far as I can tell, the particular file is now ANSI encoded, not UTF-8 encoded.
--
If you have a problem, please search before posting a question.
That is exactly the issue,
That is exactly the issue, and I told my editor (Komodo, which is the ONLY editor I use when coding PHP) to use UTF-8. That mark should be there.
I find I can add the file as text (which results in an ANSI encoded file), and adding it as binary doesn't help (I used the CVS viewer to check it just now).
It could be my admitted inexperience with CVS but I suspect I'm going to be changing the Unicode characters to HTML entities. That shouldn't be necessary in my view.
check_query
So are we required to modify code from the modules before they will work?
Been there done that. I realize 4.6 RC means release candidate, but was unaware we were required to make changes to it to make it work.
Don't get me wrong. I'm not complaining. This is the best CMS I've run acrossed and we've already committed ourselves to the point that we've migrated from php, cpg and postnuke on our sites and convinced two of our clients to switch as well.
4.5 didn't meet our needs, 4.6 RC does and we're sure 4.6 will surpass them, but we hope it isn't going to be necessary for us to correct core code to use it.
Amazon
I never opened any of the files until now to give you the first four lines from the amazon_init.inc.
and I am on a Linux box, not Windows.
Contributed modules
There are no guarantees about the quality of contributed modules. Usually they are quite okay, but they always lag behind main Drupal core a bit. The upgrading guide is of course intended for module developers and not end-users. I believe chx was merely suggesting that if you want the module to work on 4.6 RC right now, you'll have to do some work yourself.
--
If you have a problem, please search before posting a question.
Thank you
Gotcha. Thanks
I must be
I must be missing something, because even with 4.6 final and the latest download of Amazontools, Amazon Items neither work for me.
There must be something else because all I get is blank pages.
Guess I'm stuck with manually building blocks. YUCK.
Thanks anyway. Your help was much appreciated.
Blank pages are
Blank pages are not confined to me, I see. I just got a blank page here on this node after posting my last thread.
Had to refresh the page to get it back. Wished a page refresh fixed my problems with Amazon. :))
not finding ASINs II
hi today i installed Amazon_Items on my Drupal 4.6 and every time i typed in a ASIN Number from Amazon i got the Message "No records matched that Asin". Even if i enter a complete Idiot-Number or Totally correct number i got the same message.
http://www.audionewstalk.com
"...when the mothership comes, only those who have mastered NI-Reaktor will be invited back to the home world"
not finding ASINs II
hi today i installed Amazon_Items on my Drupal 4.6 and every time i typed in a ASIN Number from Amazon i got the Message "No records matched that Asin". Even if i enter a complete Idiot-Number or Totally correct number i got the same message.
http://www.audionewstalk.com
"...when the mothership comes, only those who have mastered NI-Reaktor will be invited back to the home world"
Same problem here
I've got the same problem here.
Neither Amazon Items or Amazon associate tools works
for me, anyway.
For Amazon Items I get
"No records matched that ASIN, or API changes prohibit this module from working ok, or your Developer Token in the settings page is wrong."
For Amazon associate tools, when I try to add the module into my modules file, and then click to Modules in the admin, I get:
warning: main(amazon.php4.inc): failed to open stream: No such file or directory in /home/content/j/w/a/jwaxbook/html/modules/amazon.module on line 4.
Fatal error: main(): Failed opening required 'amazon.php4.inc' (include_path='.:/usr/local/lib/php') in /home/content/j/w/a/jwaxbook/html/modules/amazon.module on line 4
Did I put a file the wrong place or something? I don't know where to put the amazon.php4.inc file if not in the includes directory.
Thanks.
-Jwax