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.
feeds_entity_property_info_alter() defines the Feed Nid an imported node belongs to. Two problems:
- The property is not defined as type node. We should not remove the integer nid at this point and rather add an additional full node property.
- The getter callback does not work with newly created import nodes, as they don't have an entity ID yet. We should check the object itself if there is a feed_item already set.
Comment | File | Size | Author |
---|---|---|---|
#4 | Screenshot from 2013-08-22 17:08:39.png | 31.57 KB | peterjlord |
#1 | feeds-property-1978722-1.patch | 1.31 KB | klausi |
Comments
Comment #1
klausiPatch attached.
Comment #2
twistor CreditAttribution: twistor commentedLooks good. Did you mean to remove the integer, or are you leaving it for some reason?
Comment #3
klausiExisting code or rules might depend on the nid integer property already and I don't wanted to introduce an API change. So I thought we just keep both, which is a bit ugly but does not break existing configurations and people can update the Feeds module without hassle.
Comment #4
peterjlord CreditAttribution: peterjlord commentedHi there,
Thanks for the patch. I've been trying https://drupal.org/project/path_breadcrumbs and the feeds only exposes the feed nid and looking at the source code it seems that it gets from entities. I was hoping that this patch would fix.
There is more exposed but seems to be in a loop
Comment #5
ultimikeThis patch looks great - works exactly as I had hoped!
-mike
Comment #7
twistor CreditAttribution: twistor commentedOuch, seems I lost this.
Thanks for the review and bump Mike.