Closed (fixed)
Project:
Ubercart Addresses
Version:
7.x-1.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
27 Oct 2015 at 13:39 UTC
Updated:
21 Nov 2015 at 09:24 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
webservant316 commentedComment #3
megachrizThe problem is that the Ubercart Addresses processor doesn't invoke the hooks to alter the targets, which Feeds assumes that every processor does. The attached patch should solve this issue for Feeds 7.x-2.0-beta1 or newer.
Also attached a patch with tests only which should demonstrate the bug (and fail tests).
Comment #5
webservant316 commentedsuper thanks.
yeah I figured out that feeds was not tight enough. Seems like the better fix would be in feeds if we could :-)
Your patch is working for me, but I also tried this in line 667 of feeds_ui.admin.inc.
Comment #6
megachrizWell, in this case the Ubercart Addresses processor didn't invoke the hooks to add or alter mapping targets, which I think every Feeds processor should do anyway. The Feeds integration in Ubercart Addresses could be improved more by the way, for example all the country targets could be merged into one target with target configuration. Same applies for the zone targets. But since I have my hands full on Feeds now and I don't actively use Ubercart Addresses myself anymore, I do not find it worth to change that.
Thanks for reporting back that the solution worked for you. I commit the fix later.
Comment #7
webservant316 commentedI could not get the uc_addresses feeds import to work. It kept mismatching my addresses with the user account. I did have 'aid' selected as unique and also 'uid' was properly assigned.
I bagged the effort and just imported a table into 'uc_addresses' directly through myphpadmin.
Comment #8
megachrizYou shouldn't map to "Address ID" unless you want to update existing addresses. Ubercart Addresses sets address id's by itself and the API (thus when importing new addresses via Feeds) doesn't allow to set that directly.
Note that when you import addresses directly into phpmyadmin you may get errors in the user interface if:
Comment #9
webservant316 commentedhmmm didn't know that about the 'aid' field. yes good points about potential problems. none of cases apply to me, so I am good. thanks.
Comment #11
megachrizCommitted #3.