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.
If the path module is enabled feeds should be able to map a source field to the path alias for Nodes, Terms and Users.
Comment | File | Size | Author |
---|---|---|---|
#20 | feeds-path_alias-1001590-20.patch | 2.75 KB | twistor |
#6 | 1001590-6_path_alias.patch | 1.44 KB | twistor |
#4 | 1001590-5_path_alias.patch | 3.84 KB | Anonymous (not verified) |
#3 | 1001590-4_feeds-path-alias.patch | 967 bytes | Bevan |
#2 | 1001590-3_path_alias.patch | 2.86 KB | Anonymous (not verified) |
Comments
Comment #1
Anonymous (not verified) CreditAttribution: Anonymous commentedSee the attached patch.
Comment #2
Anonymous (not verified) CreditAttribution: Anonymous commentedHere's an updated patch I removed some cruft and implemented
setTargetElement
for UserProcessor and TermProcessor.Comment #3
Bevan CreditAttribution: Bevan commentedTristan;
Your patches will not apply cleanly to future versions of Feeds, as they do not include any context. Please remove
-0
when you docvs diff -up
so that 2 lines of context can be included before and after each hunk. This allows thepatch
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?
Comment #4
Anonymous (not verified) CreditAttribution: Anonymous commentedSorry 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.
Comment #5
twistor CreditAttribution: twistor commentedThis will most likely need tests to get in.
Comment #6
twistor CreditAttribution: twistor commentedI think this solves the same dilemma in a simpler fashion.
Comment #7
elly CreditAttribution: elly commentedI 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.
Comment #8
allabakash.g CreditAttribution: allabakash.g commented/*
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;
Comment #9
Offlein CreditAttribution: Offlein commentedDid this actually make it into Feeds? Or was it just marked "Fixed"?
Comment #10
Bevan CreditAttribution: Bevan commentedI don't think allabakash.g realised what (s)he was doing.
Comment #11
dandaman CreditAttribution: dandaman commentedI 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.
Comment #12
dgastudio CreditAttribution: dgastudio commented#6
everything seems works fine.
Comment #13
Masala CreditAttribution: Masala commented#6 is working properly for feeds dev
Comment #14
evgeniysolodkov CreditAttribution: evgeniysolodkov commentedit looks like #6 and pathauto both create aliases when creating an entity.
i replaced
$target_item->path['alias'] = $value;
with
it unchecks "Generate automatic URL alias" and make pathauto skip processing entity to avoid duplicates in url_alias table
Comment #15
Masala CreditAttribution: Masala commenteddel.
Comment #16
Masala CreditAttribution: Masala commentedgarfild812 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.
Comment #17
SocialNicheGuru CreditAttribution: SocialNicheGuru commentedwill the patch be re-rolled with #15 addition?
Comment #18
evgeniysolodkov CreditAttribution: evgeniysolodkov commentedOh! 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
Comment #19
twistor CreditAttribution: twistor commentedThe 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.
Comment #20
twistor CreditAttribution: twistor commentedLet's move this along.
The duplicate issue should be fixed.
Comment #21
mstiI tested the FeedsNodeProcessor patch from #20 with the aplha5 version of feeds and it is working.
Comment #22
nlambert CreditAttribution: nlambert commentedas per msti, alpha5 patched with #20 works great
Comment #23
twistor CreditAttribution: twistor commentedThanks everybody, committed to 7.x
http://drupalcode.org/project/feeds.git/commit/c2190c9
Comment #24
franzAnyone wondering why you're alias is not being saved: #1665450: Path alias target when using pathauto
Comment #25
ryumkin CreditAttribution: ryumkin commentedNot exists in 7-x!!! When?
Comment #26
twistor CreditAttribution: twistor commentedIt's in 7.x. I don't understand your question.
Comment #27
coderintherye CreditAttribution: coderintherye commentedhe'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.
Comment #28
rohit.wadhwa CreditAttribution: rohit.wadhwa commentedI 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.
Comment #29
franzCan you test on a clean installation? I think it's rather odd that this patch would cause this.
Comment #30
twistor CreditAttribution: twistor commentedPlease open a follow up if you're not getting the path mapper.
Comment #31
twistor CreditAttribution: twistor commentedComment #32
jelo CreditAttribution: jelo commentedWas 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.
Comment #33
llillf CreditAttribution: llillf commentedI have the same question, was the patch committed to 6.x? Thanks a lot!!!
Comment #34
twistor CreditAttribution: twistor as a volunteer commented