Some things are wrong with the asin field:
When an invalid ASIN is given, the following errors are thrown:

"Warning: htmlspecialchars() expects parameter 1 to be string, array given in check_plain() (line 1476 of /var/www/includes/bootstrap.inc).
No Amazon product with the ASIN "" could be located."

That's not exactly what we want.
Reason is that _asin_load_items() takes $items by reference and cryptically manipulates on it, even though it returns everything needed. As this helper function is being called only once and is overly abstracted, I removed it altogether.

Also, the form_set_error on the ASIN field does not work.
Finally, I refactored asin_field_formatter_view

CommentFileSizeAuthor
asin_fix_lookup.patch2.89 KBPancho
asin_field_error.png38.34 KBPancho
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Pancho’s picture

Status: Needs review » Fixed
rfay’s picture

So great for this module to be getting such excellent love.

Status: Fixed » Closed (fixed)

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