Problem/Motivation

I setup a really trivial 8.9.x core test site. Testing out the 2.1.x branch. I can't get it to query the Amazon API for books using ISBN values. I can only query other kinds of Amazon products directly via ASIN.

When I went back to the 8.x-1.x branch and rebuilt, did the same tests with the same ISBNs, everything worked.

So it's a new (imho critical) bug in the 2.1.x series.

Steps to reproduce

  1. Install core test site with only 8.9.x.
  2. Install amazon_pa 2.1.0-beta6.
  3. Enable amazon_pa and asin.
  4. Add `field_asin` to the 'Basic page' node type.
  5. Create a basic page (A) with an ISBN (e.g. 1930469101)
  6. Create another basic page (B) with an ASIN (e.g. B01KQPV71Y)
  7. Look at all values in the {amazon_item} table.

Expected: Should see entries for both.
Actual: Only see values for the ASIN row

Proposed resolution

Find and fix the bug.

Remaining tasks

  1. Write some test coverage for this.
  2. Figure out why it's broken.
  3. Fix it.
  4. Reviews / refinements.
  5. RTBC.
  6. Commit.
  7. New release.

User interface changes

The module would start working again as expected.

API changes

TBD.

Data model changes

TBD, hopefully none.

CommentFileSizeAuthor
#3 3224809-3.asin-vs-isbn.png140.12 KBdww

Comments

dww created an issue. See original summary.

marcoka’s picture

Do we need that for legacy sites?
What i learned is that data like this is not always reliable. I recommend only adding products by ASINs in general on new sites.

I suggest:
We or me can put back the function that transforms "isbn to asin". So you input the isbn into the field, query gets done transforms ISBN to ASIN and saves the asin to the field.
Next time you view the edit page the data with ASIN will be loaded above but the ASIN will be in the field.
That will be introduced with #3185958: Regression: D8 asin_text field widget no longer displays product titles for known ASINs

Or do you want to display the ISBN inside the field and also load it that way if a node gets edited? Like for legacy reasons. Was it like that before?

dww’s picture

StatusFileSize
new140.12 KB

AFAICT, there is *no* "native" ASIN for Amazon book products. They always use the ISBN:

https://www.amazon.in/gp/help/customer/display.html?nodeId=200533860

We absolutely need this, not just for legacy sites, but any sites dealing with books at all.

For example, what's the ASIN on this product?

https://www.amazon.com/dp/1250185653

Amazon product details screenshot for ISBN 1250185653

If there even is a separate ASIN associated with this book, there's no way for end users to find it and use it in an asin field widget or otherwise.

Everything I found online about ASINs for books says that amazon uses the 10-digit ISBN, since it's a standard unique ID for books. They invented ASIN to handle everything else they sell, but they still use ISBNs for books.

marcoka’s picture

Status: Active » Needs review

Ok this works in my latest 2.1.x
I think the removal of the logging feature fixed that. So there is no separate commit for this.

I tested it. Went here: https://www.amazon.de/dp/3969670233
Put that number in the asin field, saved, image and data, using a field formatte appears.

dww’s picture

Status: Needs review » Fixed

Confirmed. 2.1.x now works with ISBN values again.

Opened #3224989: Add Kernel test for field widget for test coverage of this (and other things).

Thanks!
-Derek

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.