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.
Would be nice to have the URL and other fields of the feed to map.
D7 verion of #735530: Map feed Title and feed URL (not feed item title and url) (kept this separate as architecture changed so no plain backport)
Comments
Comment #1
geek-merlinand here's the implementation. only testing url thoroughly for now.
Comment #2
geek-merlinhere's the latest.
Comment #3
RoSk0Great job!
Tested on 7.x-2.0-alpha7. Works as expected.
Comment #4
Ken Hawkins CreditAttribution: Ken Hawkins commentedThis also worked for me on 7.x-2.0-alpha7.
Being bold and setting to reviewed and tested.
Comment #5
twistor CreditAttribution: twistor commentedThere are a few coding standard violations.
I can understand parent:title and feed_source:url, but importer name and description??
Comment #6
RoSk0Description looks fine to me. Reapplied #2 patch at latest 7.x-2.x-dev. Fixed some code style issues.
Comment #7
twistor CreditAttribution: twistor commentedSure, it looks fine. But at some point we have to ask ourselves what features are useful and necessary, and what's just cluttering things up. I've never even set a description for an importer.
Comment #8
Anonymous (not verified) CreditAttribution: Anonymous commentedPatch in #6 works good for me.
fwitw I'm only using the title field but core fields I think would be useful so happy with the ones added by this patch.
Comment #9
favosys CreditAttribution: favosys commentedHow is this supposed to work?
I tried patches #2 and #6 separately and then I go to:
mysite.com/admin/structure/feeds/my_feed/mapping
And then I click on Mapping in the node processor and I would expect to be able to map the feed title but nothing has changed, there are no new options.
Am I missing something here?
Comment #10
Nikolay ShapovalovPatch #6 attach new mapping sources only when it attached to contet_type.
I've fix this, also I change option name:
from Feed source: URL to Feed source: Source.
I have test this patch only with HTTP Fetcher, so please test it with files.
Please use patch from #11.
Comment #11
Nikolay ShapovalovComment #12
MegaChriz CreditAttribution: MegaChriz as a volunteer commentedI tested the patch in action and I found no issues with it. I tested with an importer attached to a content type and with the fetchers HTTP fetcher and File fetcher.
Code review:
These lines could be improved a bit. According to the code standards, if control structure condition tend to get long it's better to prepare the conditions separately.
https://www.drupal.org/coding-standards#linelength