If the path module is enabled feeds should be able to map a source field to the path alias for Nodes, Terms and Users.

Comments

StatusFileSize
new2.24 KB

See the attached patch.

StatusFileSize
new2.86 KB

Here's an updated patch I removed some cruft and implemented setTargetElement for UserProcessor and TermProcessor.

StatusFileSize
new967 bytes

Tristan;

Your patches will not apply cleanly to future versions of Feeds, as they do not include any context. Please remove -0 when you do cvs diff -up so that 2 lines of context can be included before and after each hunk. This allows the patch command to apply the patch correctly even if the file has changed in other places.

Here is the Drupal 6 version of this patch for the FeedsNodeProcessor only.

Tristan; What are you working on? It looks like we have at least a little bit of overlap in the features we are working on. I am building a lightweight port of Wordpress Import that depends on Feeds for the heavy lifting, and am implementing several new targets, including comments, comment status, sticky and others yet TBD. Perhaps we can collaborate?

StatusFileSize
new3.84 KB

Sorry about that here is an updated flag with the correct cvs flags. Unfortunately I don't think I'll have much time to collaborate with you in the near future I have a bunch of big projects coming up and it won't leave for much spare time. Good luck though! See the attached updated patch.

Status:Needs review» Needs work

This will most likely need tests to get in.

StatusFileSize
new1.44 KB

I think this solves the same dilemma in a simpler fashion.

I was able to get the patch in #6 working great, but there is a problem where if you keep importing, it seems to create multiple aliases over and over.

Version:7.x-2.x-dev» 6.x-1.x-dev
Status:Needs work» Fixed

/*
for me also, values were repeating in url_alias table for the nid,
i got the solution for that, i just make "pathauto_perfom_alias = false"(please check below)
*/

$node->path = $dst;
$node->pathauto_perform_alias = false;

Status:Fixed» Needs work

Did this actually make it into Feeds? Or was it just marked "Fixed"?

Version:6.x-1.x-dev» 7.x-2.x-dev

I don't think allabakash.g realised what (s)he was doing.

Status:Needs work» Needs review

I found the patch in #6 useful and think it should be included in an upcoming version of Feeds. This makes it very easy to import the content and import it's legacy URL at the same time.

Status:Needs review» Reviewed & tested by the community

#6
everything seems works fine.

#6 is working properly for feeds dev

it looks like #6 and pathauto both create aliases when creating an entity.
i replaced
$target_item->path['alias'] = $value;
with

$target_item->path['alias'] = $value;
$target_item->path['pathauto'] = 0;

it unchecks "Generate automatic URL alias" and make pathauto skip processing entity to avoid duplicates in url_alias table

del.

garfild812 useful addition!

Small question. It is normal, that every time you update node with url, create a new url alias for node? I have several alias for the url nodes after each it change in import.

will the patch be re-rolled with #15 addition?

Oh! You're right! I don't update my nodes, i use this import only for creating new content. I tried to update node with new url and it really creates second alias for it.
I don't think it is normal... i hope you'll find how to fix it. I myself can't do it now being short of time. luck

Status:Reviewed & tested by the community» Needs work

The bug from #16 is because path_load is not called on node_load anymore. It would need to be called manually.

So this needs to be re-evaluated. There are a few problems that are mostly my fault.

  1. There's no technical reason to depend on path.module being enabled to set aliases. In D7, path CRUD was moved to path.inc. path.module provides just the ui to manage paths.
  2. That being said, I think we probably should still check.
  3. In moving the functionality from the Node and Term Processors to the base Processor, we can set aliases for any entity. This is valid, but path.module only supports saving aliases automatically from nodes and terms.
  4. So, we would need to use the uri callback to set the alias, but on initial import, there's no id.

Status:Needs work» Needs review
StatusFileSize
new2.75 KB

Let's move this along.

The duplicate issue should be fixed.

I tested the FeedsNodeProcessor patch from #20 with the aplha5 version of feeds and it is working.

as per msti, alpha5 patched with #20 works great

Version:7.x-2.x-dev» 6.x-1.x-dev
Status:Needs review» Patch (to be ported)

Thanks everybody, committed to 7.x

http://drupalcode.org/project/feeds.git/commit/c2190c9

Anyone wondering why you're alias is not being saved: #1665450: Path alias target when using pathauto

Not exists in 7-x!!! When?

It's in 7.x. I don't understand your question.

he's probably alluding to the fact that not all of this is in the alpha7 even though the release notes say it is. Either that or some drush wonkiness. I'll see if I can narrow down since it seems like the pathauto patches are applying cleanly still.

Version:6.x-1.x-dev» 7.x-2.0-alpha7

I tested the FeedsNodeProcessor patch from #20 with the 7.x-2.0-alpha7 version of feeds and it is working.
But after this i am not able to open view listing page and also notable to disable the feed module.
After undo the patch both are again working may be there are some issues which not suitable for views and also make an impact on disable module.

Status:Patch (to be ported)» Postponed (maintainer needs more info)

Can you test on a clean installation? I think it's rather odd that this patch would cause this.

Version:7.x-2.0-alpha7» 6.x-1.x-dev
Status:Postponed (maintainer needs more info)» Patch (to be ported)

Please open a follow up if you're not getting the path mapper.

Category:task» feature

Was this ever committed to 6.x? I just updated from 6.x-1.0-beta11 to 6.x-1.0-beta13, but I do not get a selection in the Target drop down for "path alias". This would definitely be useful as I need to bring in a defined alias from an external source and can't let pathauto create automatic aliases.

Issue summary:View changes

I have the same question, was the patch committed to 6.x? Thanks a lot!!!