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.
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

klausi’s picture

Status: Active » Needs review
FileSize
1.31 KB

Patch attached.

twistor’s picture

Looks good. Did you mean to remove the integer, or are you leaving it for some reason?

klausi’s picture

Existing 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.

peterjlord’s picture

Hi 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

ultimike’s picture

Issue summary: View changes
Status: Needs review » Reviewed & tested by the community

This patch looks great - works exactly as I had hoped!

-mike

  • twistor committed e0e80b5 on 7.x-2.x authored by klausi
    Issue #1978722 by klausi, ultimike: Entity property info for feeds node...
twistor’s picture

Status: Reviewed & tested by the community » Fixed

Ouch, seems I lost this.

Thanks for the review and bump Mike.

Status: Fixed » Closed (fixed)

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