Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I'm not 100% sure this is the right place for this, but the functionality seems sufficiently different from what media_feeds does. When #1033202: [Meta] Generic entity processor is accepted, it would be nice if the file_entity module supported importing files by URL strings (similar to how file fields work).
Patch to follow.
Comment | File | Size | Author |
---|---|---|---|
#8 | entity-processor-mapper-fixed.png | 68.49 KB | wroxbox |
#6 | entity-processor.png | 81.69 KB | wroxbox |
#6 | entity-processor-mapping.png | 72.59 KB | wroxbox |
#3 | 1430190-3-file_entity-feeds_targets.patch | 3.08 KB | jrbeeman |
#2 | 1430190-2-file_entity-feeds_targets.patch | 3.08 KB | elliotttf |
Comments
Comment #1
elliotttf CreditAttribution: elliotttf commentedComment #2
elliotttf CreditAttribution: elliotttf commentedUpdated patch to include a mapper for flie mimetype.
Comment #3
jrbeemanWhile I believe the existing patch still successfully applies against 7.x-2.x, I've attached a new one, re-rolled against latest 7.x-2.x. The related issue is still open, therefore this issue depends on it. That said, we've been running this patch and it's sister (against Feeds), successfully for a while now. I'll post back here when there's an update in the related issue.
Comment #4
derekw CreditAttribution: derekw commentedI've got the feeds-entity-processor-1033202-116.patch installed, and created a feed of Entity processor: File. Setting is set to File, type Image. (In the Entity Processor: File Settings form the entity type dropdown doesn't stay set, but the following fields are correct for File.)
Also tried patched file entity with #2 or #3 above, but no joy. In my feed mapping, my custom file fields for Image show up (Credit, Description) but no URL, Local or MimeType targets. GUID, FID... no way to have the feed grab and save the file.
Do I have the wrong expectations of how this is supposed to work?
Comment #5
ParisLiakos CreditAttribution: ParisLiakos commented#3: 1430190-3-file_entity-feeds_targets.patch queued for re-testing.
Comment #6
wroxbox CreditAttribution: wroxbox commentedI have attached generic entity processor patch and the patch from #3. In my testings those URL, Local or Mimetypes are not available as targets.
The hook "file_entity_feeds_processor_targets_alter" seems correct, but it is never called in mappings page? Should it be.
Comment #7
olli CreditAttribution: olli commentedHave you tried uncommenting drupal_alter like #1033202-119: [Meta] Generic entity processor?
Comment #8
wroxbox CreditAttribution: wroxbox commentedKiitos @Olli!
After uncommenting the line in FeedsEntityProcessor.inc the mapper looks much better :)
Comment #9
olli CreditAttribution: olli commentedGreat!
About the patch:
What happens if we don't unset this?
Do you mean like my_module_form_callback ?
Comment #10
mErilainen CreditAttribution: mErilainen commentedFor me the patch in #3 works nicely when combined with the mentioned Feeds patch. I had to uncomment the drupal_alter() as well.
It would be cool to be able to give a prefix for the File URI because I have to use often Feeds Tamper rewrite plugin to add a prefix to local or remote source when the imported path only includes the file name.
Comment #11
rwohlebFYI, I've created the Feeds Files module to handle file processing until it it properly baked into Feeds. Once it is, I'll take down the Feeds Files module.
Comment #12
aaron CreditAttribution: aaron commented#3: 1430190-3-file_entity-feeds_targets.patch queued for re-testing.