Everything is working fabulously importing an RSS feed except my automatic URL alias for Feed item is set to feed/[node:feed-source]/feed-item/[node:nid] and the [node:feed-source] token is not getting replaced properly when the Feed item is created by the importer -- the URL is /feed/feed-item/#.

If I selected all Feed items in the Content list and do 'Update URL alias' from the Update Options, the URLs are changed to /feed/my-feed-name/feed-item/# as they should be.

I tried to work around this using the Rules module to update the alias whenever a Feed item was created, but this also failed (more drastically).

(It's important that my Feed items URLs to have the Feed URL to start with so that I can use the Menu position rules module to have my menus and breadcrumbs updated properly for Feed items.)

Comments

doompal’s picture

Same problem, I suspect (guess) that node:feed-source isn't set, where do I get more information? D7 in use.

tragic.rich’s picture

subscribing. Same problem d7 feeds 7.x-2.0-alpha4

AndrewKWilson’s picture

Same problem here. You must edit and save then re-save the node before the automatic alias works. Similar to performing the update noted by @JustMagicMaria

faunt’s picture

Here with the same concern.

@JustMagicMaria and @AndrewKWilson note that you can bulk delete and bulk update url path aliases for all “content” to achieve same effect as if re-publishing node.

Also have had no luck setting up Rules to combat the issue. Successfully runs on Cron maintenance task, or when new feed-item nodes created, but cannot access the node:feed-source token in URL rewriting.

mareks’s picture

Yeah. Same problem.

mareks’s picture

Does anybody have a workaround for this issue?

Perhaps updating Feed-item paths after the item(s) have been created? But how to do it automatically?

faunt’s picture

My workaround involved replicating name of node:feed-source as a field on the node-feed-item content type. Then URL path alias worked by grabbing the content of that field, rather than the as-yet unavailable node:feed-source.

mareks’s picture

Sry, for some reason I am not following you... Can you please explain it in few more words? Thanks,

faunt’s picture

In other words: take for granted you will not be able to use the node:feed-source token in URL path aliasing. So start looking for another way to make the source of your feed-items available, as I’ve done through the following process:

  1. Add a field to feed-items node called “feed_source” or “parent_feed” or something (/admin/structure/types/manage/feed-item/fields)
  2. In Feed Importers (/admin/structure/feeds), add mapping of feed source name to that new field. (Was possible in my case, as the XPath Parser named the feed source in the //channel/description provided in the XML.)
  3. After reimporting all the feed-items with their feed source now mapped to a field in their content type, your can update URL path alias pattern to include that field where you had previously tried to use the node:feed-source token — probably something like [node:field_parent_feed] if you used “parent_feed” above.
IT100’s picture

Version: 7.x-2.0-alpha4 » 7.x-2.0-alpha5

csv example:

Source site:

1) Make sure 'path' is available in the data to be imported (path column), I use views Data export to create the necessary data.

Destination site:

1) Make sure you have a extra field available in your content type (admin/structure/types/your_type). I use url_feeds_path text field which gives field_url_feeds_path as system name. (temporary import field)

2) Make sure you have a mapping in feeds importers (admin/structure/feeds/) "source" is Data export field label (path), destination is field_url_feeds_path

3) Go to url-alias patterns (/admin/config/search/path/patterns) and enter [node:field_url_feeds_path] so the path can be picked up automatically.

4) import content.

5) protect imported urls from future updates: go to /admin/config/search/path/settings and select:

- update action, do nothing leave old alias intact.

6) Go to url-alias patterns (/admin/config/search/path/patterns) and restore original setting: [node:title] in my case.

7) field_url_feeds_path in admin/structure/types/your_type can be removed. Because of (5) the url will remain.

Job done.

bluegeek9’s picture

Issue summary: View changes
Status: Active » Closed (outdated)
//www.flaticon.com/free-icons/thank-you Thank you for your contribution!

Unfortunately, Drupal 7 is End of Life and no longer supported. We strongly encourage you to upgrade to a supported version of Drupal.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.