If the path module is enabled feeds should be able to map a source field to the path alias for Nodes, Terms and Users.
See the attached patch.
Here's an updated patch I removed some cruft and implemented setTargetElement for UserProcessor and TermProcessor.
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.
cvs diff -up
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?
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.
This will most likely need tests to get in.
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.
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;
Did this actually make it into Feeds? Or was it just marked "Fixed"?
I don't think allabakash.g realised what (s)he was doing.
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.
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;
$target_item->path['alias'] = $value;
$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
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
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.
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
Thanks everybody, committed to 7.x
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.
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.
Can you test on a clean installation? I think it's rather odd that this patch would cause this.
Please open a follow up if you're not getting the path mapper.
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.
I have the same question, was the patch committed to 6.x? Thanks a lot!!!
Drupal is a registered trademark of Dries Buytaert.