Coming from #661606: Support unique targets in mappers.
Generic bundle handling... Given the current architecture, it's a good idea. Each processor does basically the same thing, just a bit differently. I think it will reduce code weight, get more consistent behavior, and we could finally do some decent error handling when no bundles exist.
I would like to see FeedsProcessor split up. Feeds is not dependent on entities. I wrote a processor the other day that just sticks data into a table. I had to fake an entity type, or else re-implement a lot of code. My favorite idea would be to remove the entity bits from FeedsProcessor into a FeedsEntityProcessor. We can't do that, for backwards compatibility reasons, so I propose FeedsBaseProcessor and FeedsProcessor.
Things to do off the top of my head.
- Implement FeedsProcessor::bundleType(). For the various Processors.
- Implement a FeedsProcessor::bundleOptions(). A method to provide a list of available bundles for the config form.
- Error handling when no bundles exist. Currently, it doesn't really exist. There shouldn't be any way to run an import without choosing a bundle.
Comments
Comment #1
twistor CreditAttribution: twistor commentedSplitting up FeedsProcessor into 2 classes might be overkill for this issue.
Comment #2
twistor CreditAttribution: twistor commentedStarting this.
Comment #3
twistor CreditAttribution: twistor commentedhttp://drupalcode.org/project/feeds.git/commit/f54cac1
We need to add a big notice to the changelog about this. Probably post a bunch of issues to other processors.
Comment #4
twistor CreditAttribution: twistor commentedFollow-up for tests.
http://drupalcode.org/project/feeds.git/commit/e21af4c
Comment #5
scottrigbyExcellent!
twistor++
Comment #7
vinmassaro CreditAttribution: vinmassaro commentedJust a heads up, I am running the 7.x-2.0-alpha7+19-dev version and I get this warning when running updates:
This code was introduced here and references this issue. Thanks.
Comment #8
SocialNicheGuru CreditAttribution: SocialNicheGuru commentedI am getting this too