Hi - I just became co-maintainer of Amazon module and am trying to prioritize the many tasks in front of us.

First, I want to ask if you think it's still of value to do the long-languishing upgrade path to Amazon module.

Second, if the answer is yes, how we can pull it off, and if there are members of this community who would participate.

Would a by-hand, scripted, one-time process be acceptable? In other words, a set of documentation and scripts perhaps, instead of the normal polished upgrade we expect.

Finally, I welcome you all to participate in the development, support, and documentation of Amazon module.

-Randy

Comments

asb’s picture

Hi,

regarding the second part:

> Would a by-hand, scripted, one-time process be acceptable? In other words, a set of documentation and scripts perhaps,
> instead of the normal polished upgrade we expect.

Similar scripts like the Mediawiki maintenance scripts: definitely yes (I'm a Drush heavy user ;).

Regarding an aat_legacy.module: What makes the task of migration "Amazontools" data so ugly is that so many cases have to be taken care of (I'm thinking of the CCK ASIN Field and maybe Amazon Filter).

I never fully understood how this aat_legacy.module was supposed to work so I'm not really sure if such a module really would be what we need. I don't think that anybody seriously wants a "aat_legacy" content type; at least I'd prefer "semantic" content types like "movie" for movie reviews, or "book" for book reviews. So maybe one could store the AAT data in a temporary table/place, then use a 3rd party module like VBO or Node convert to migrate the content types appropriately, then restore the AAT data in a "Amazon" module compatible way? "Amazontools" ratings could be handled similarily and migrated to Voting API. Or one could try to migrate the "amazon" and "amazonitem" (?) nodes on D5 to appropriate CCK content types so the migration path to "Amazon" module would "only" have to take care about CCK fields?

However this might be technically handled, data should be consolidated, not spread even further (on my D5 sites I have as well "amazontools" as semantic CCK content type, utilizing ASIN field). Maybe we "Amazontools" users can do some "preprocessing" by using existing tools, to make the "Amazontools/D5" -> "Amazon/D6" migration easier?

Greetings, -asb

EvanDonovan’s picture

rfay: As the comments from #231612: Upgrade path for Amazon associate tools module? indicate, I was able to write a one-shot export script for the AAT data on my site, although it isn't 100% reliable. I would suggest that you review my code as a starting point for how the upgrade path would work. And yes, I still think this is worth doing.

Thanks for taking over co-maintainership of Amazon module.

rfay’s picture

Thanks, Evan. Do you think you could make the export/import "good enough"?

eaton’s picture

I don't think that anybody seriously wants a "aat_legacy" content type; at least I'd prefer "semantic" content types like "movie" for movie reviews, or "book" for book reviews. So maybe one could store the AAT data in a temporary table/place, then use a 3rd party module like VBO or Node convert to migrate the content types appropriately, then restore the AAT data in a "Amazon" module compatible way? "Amazontools" ratings could be handled similarily and migrated to Voting API

Just to clarify -- this kind of "Oh, but what if... and then.. oh, but also..." special casing is exactly why aat_legacy.module was never completed. Putting together the mapping for this kind of stuff was extremely complex, and was -- to be honest -- a lot more work than it was worth when a short script could do the migration for any specific case -- I whipped one up for my site in about 15 lines of PHP. The only likely implementation of the aat_legacy.module that is likely to come to fruition would be a direct mapping of the 'Amazon' and 'Amazon Node' content types so that legacy nodes would still display properly.

Or one could try to migrate the "amazon" and "amazonitem" (?) nodes on D5 to appropriate CCK content types so the migration path to "Amazon" module would "only" have to take care about CCK fields?

Actually, that approach already works. ASIN Module for D5 stores amazon data in CCK fields, and the D6 Amazon module includes a CCK field with a working, tested upgrade path. One approach might be:

  1. Make a BACKUP of your database.
  2. Add a multivalue ASIN CCK field to the Amazon nodetype on your D5 site.
  3. Write down the name of the CCK field -- usually it's something like 'field_amazon_item' or 'field_product', depending on what you named it in the UI.
  4. Run something like the following SQL: UPDATE amazonnode SET ntype = 'field_product' WHERE ntype = 'amazon' -- where 'field_product' is the machine name of the CCK field you added in step 2. The ASIN Field module does its thing by storing the name of the CCK field in the 'ntype' column of that table, instead of the name of a node type. That lets CCK handle the node type mapping.
  5. Check to make sure things look and work okay on your D5 site. The amazon items should appear via CCK on the proper nodes.
  6. Do all the assorted 'stuff' that's needed to upgrade to D6.
  7. The amazon product field should get migrated during the CCK upgrade process, as the D6 Amazon module has a clean upgrade path from the ASIN Field module.

I can't promise that everything will be perfect -- the old AAT module did some very odd things with its node types, which is one of the reasons I originally wrote the ASIN field module. But if you can get things into the ASIN fields, the upgrade should go smoothly.

asb’s picture

> Actually, that approach already works. ASIN Module for D5 stores amazon data in CCK fields,
> and the D6 Amazon module includes a CCK field with a working, tested upgrade path.

That sounds promising, but I ran into #231612: Upgrade path for Amazon associate tools module? again (#43).

However this could be a workable approach if I get Amazon CCK fields working on the migrated D6 site...

Thanks & greetings, -asb

EvanDonovan’s picture

eaton's suggestion sounds quite similar to what I suggested in #37 of the other issue, except similar. Hope that works.

As for working on my upgrade script, honestly, I don't think I have more time I could devote to it. I just wanted to make sure that you knew about it, rfay. It was a 1-to-1 mapping of amazon nodes in any case - no special casing for movies vs. books, etc.

asb’s picture

Status: Active » Closed (fixed)

Thanks to the hard work of rfay and eaton, there is now an upgrade path available! For further information, please have a look at #231612: Upgrade path for Amazon associate tools module? and the follow-up issues.

Wherever needs to move from AAT/D5 to Amazon/D6: Now is the time to do this!

To support polishing and perfecting the upgrade path, there's still some sponsoring needed. So if you gain something from these modules, it would be very welcome if you could show your appreciation!

Greetings, -asb