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

twistor’s picture

Splitting up FeedsProcessor into 2 classes might be overkill for this issue.

twistor’s picture

Assigned: Unassigned » twistor

Starting this.

twistor’s picture

Assigned: twistor » Unassigned
Status: Active » Fixed

http://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.

twistor’s picture

scottrigby’s picture

Excellent!
twistor++

Status: Fixed » Closed (fixed)

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

vinmassaro’s picture

Just a heads up, I am running the 7.x-2.0-alpha7+19-dev version and I get this warning when running updates:

d7 vincentmassaro$ drush updatedb -y
The following updates are pending:

feeds module : 
  7208 -   Update to use generic bundle handling. 

Division by zero feeds.install:663                 [warning]
Performed update: feeds_update_7208                 [ok]

This code was introduced here and references this issue. Thanks.

SocialNicheGuru’s picture

I am getting this too