I am looking at using Feeds to import CSV data as nodes and wanted to assign all the nodes coming from a particular configuration to a specific user.
Seems this can be achieved relatively simply by adding a variable through FeedNodeProcessor.inc. A variable in the configDefaults() function, a field (with autocomplete) to the configForm(), and pulling that value out and assigning to node at the process() function.
I've attached a file that shows the final UI.
If this makes sense as functionality to have within Feeds and the method is ok (or could be improved) happy to roll a patch.
One complication might be that if one wants to assign different nodes to different users at the node import stage, based on a value in the feed through a mapper we would have to override the user assigned through the method described here (or resort to this user as the default one).
Comment | File | Size | Author |
---|---|---|---|
#72 | feeds-anon-652180-72.patch | 2.84 KB | drasgardian |
#67 | feeds-anon-652180-67.patch | 1.1 KB | giorgio79 |
#55 | 652180-55_assign_author.patch | 4.23 KB | alex_b |
#53 | feeds-standalone-assignuser1.patch | 3.13 KB | ronald_istos |
#50 | feeds-standalone-assignuser.patch | 2.41 KB | ronald_istos |
Comments
Comment #1
alex_b CreditAttribution: alex_b commentedIf we get user assignment to nodes we should offer at least 3 options:
- anonymous
- specific user (this screenshot)
- inherit from feed node (only available if an importer config is actually attached to a content type).
I'd appreciate your patch as it's a step in the right direction. Ideally we can get the inherit option before committing. In any case, this feature warrants tests.
Comment #2
rjbrown99 CreditAttribution: rjbrown99 commentedI also need this functionality.
In FeedAPI, I had the 'source' content type called feeds, and I had a node that initiated the download/import. In this case, I was able to set the authoring information on that node. All of the resulting imported nodes were then owned by the author information specified. In your example I am guessing this would be 'inherit from feed node'.
In Feeds, I have the exact same setup - source content type Feeds, a CSV feed configured, and authoring information. In this case, it is not respecting the authoring field. All of the resulting imported/created nodes are owned by 'anonymous'.
I don't quite know how to develop this, but I would love to have it fixed if someone submits a patch.
In FeedAPI, it seems this magic happened in feedapi_node.module, in the _feedapi_node_save function. There is a $node->uid = $feed_node->uid; statement right before the node_save($node); at the end of the function. I'm assuming this is what set it.
Comment #3
rjbrown99 CreditAttribution: rjbrown99 commentedOK, here is my completely unscientific patch that replicates the functionality from FeedAPI. I simply grab the node ID of the feed node, run a node_load against it, and map the UID. There is probably a better way to do this that doesn't involve node_load, but I really needed this to work tonight.
I'm wondering if it's a better idea to move the node_load above the foreach. That way it is loaded only one time.
Comment #4
alex_b CreditAttribution: alex_b commented#3: certainly one of the puzzle pieces required here. Setting to NW as there's a patch.
Comment #5
rjbrown99 CreditAttribution: rjbrown99 commentedHere's a new version of the patch. The only difference is the node_load was moved outside of the loop. Now it just does a single node_load of the original feed node instead of doing it on every loop. I don't believe it would ever change so I don't think it really needs to be done inside of the loop.
Comment #6
rjbrown99 CreditAttribution: rjbrown99 commentedSetting the status back, sorry it defaulted to active.
Comment #7
ronald_istos CreditAttribution: ronald_istos commentedJust posting the patch that adds the functionality as shown in the image at the top for now - @rjbrown99 definitely adds another piece of the puzzle - will try to incorporate both as soon as a I get some time.
To sum up we have two scenarios so far:
1. The author of the imported items is set to be the same as the author of the Feed (in the case where you do create a feed and its not a standalone import)
2. The author of imported items is chosen from amongst the users through the config form
We should have an option to either do 1 or 2 but only when we are importing via a node as 1 does not really apply when importing on standalone.
Should also write some tests for these as well eventually
Comment #8
kaakuu CreditAttribution: kaakuu commentedYes, scenario 1 in #7 will be much helpful and needed very much as this is what happened normally with feedapi-6.x-1.8 and this is what is normally expected in a multiuser scenario.
For example, let us suppose a drupal site like blogger.com, where each user has his blog and wants to occasionally import from feed of his other blogs, like wordpress.com blog or similar. What he imports need to be under his authorship in his blog (irrespective of whether he is the true author or user names are same across the net).
Assign_author.png is good at the "Admin" level, but at user (auth user) level the user needs to simply have the feed items/posts filling up his blog as blog posts (when feed item=blog content type)
Thanks for the patch, I got refererred here from #664348: Blog posts imported by an user do not show up in his blog and will highly be obliged if a patched FeedsNodeProcessor.inc is made available for download as a whole file.
Comment #9
Gábor HojtsyAs I'v blogged about at http://hojtsy.hu/blog/2009-dec-17/highlighting-some-tweets-my-blog-exper... I'd be very supportive of this functionality. (Did not test the actual patch yet).
Comment #10
ronald_istos CreditAttribution: ronald_istos commentedHi,
got a patch that covers the three cases - default to anonymous, can set user explicitly or inherit from Feed node (if Feed attached to Node).
UI wise it is all in settings section of NodeProcessor. Ideally the inherit author setting should be grayed out if the Feed is not set as "attachable" to a node - any suggestions on how to achieve that simply would be great.
Didn't test extensively - but hope this helps to move things forward.
Also, user choice happens outside the loop to avoid having to repeatedly load the Feed node to get the user id.
Attached is the Patch, the entire FeedsNodeProcessor (just replace your existing one..) and an image with the UI.
Comment #11
tic2000 CreditAttribution: tic2000 commentedThe patch doesn't apply (it needs to be with the module folder as root, not drupal as root).
If applied manually the patch works as expected, but here is a style review.
Trailing space on the empty line.
There should be a space after //
Agains space after the //
It needs space before and after ==, ||, ==. There should be a space between ) and {. There is trailing spaces at the end of the line.
It needs to be inline with the code below it. It needs a space after //
Again space after //. Remove trailing space after the first line.
Space before and after ==. Space between ) and {
Space before and after =
Space before and after =>
Trailing space at the end of the line (nothing else changes in this line)
No need to add the empty line, but if you do, remove the trailing space.
This review is powered by Dreditor.
Comment #12
Jackinloadup CreditAttribution: Jackinloadup commentedOk so i tested this patch and it works wonderfully. It applied correctly to HEAD. I reworked the patch to patch from the module root and I believe I made all the style changes mentioned above.
Thanks istos & rjbrown99 for the work!
Comment #13
alex_b CreditAttribution: alex_b commentedGreat.
1. "Feed attached to Node" should be "Importer attached to Content type" - on UI and in code.
2. Add a period after all comments.
3. Can we grey out the widget for inherit_author if the importer is not attached to a content type?
4. Both modes: inherit and explicit need tests.
Comment #14
ronald_istos CreditAttribution: ronald_istos commentedexcellent - thanks all. should be able to have a look at this next week I absolutely agree with 3 from alex_b, just need to have to figure out a good way to do it.
Comment #15
rjbrown99 CreditAttribution: rjbrown99 commentedSome of the code in FeedsNodeProcessor.inc will change if/when #600584: Use Batch API is committed. This patch currently conflicts with #7 in that thread.
Assuming that patch is applied first, only the first hunk of this fails. It's pretty trivial to reconcile, but I thought it was worth mentioning.
Comment #16
marcushenningsen CreditAttribution: marcushenningsen commentedSubscribing
Comment #17
.............................................. CreditAttribution: .............................................. commentedthanks a lot. this is exactly what i needed.
edit: as mentioned above this patch isn't working anymore in alpha-11 due to code changes.
Comment #18
paulap CreditAttribution: paulap commentedI need this feature too!
One idea: create a rule to set the owner when a new feed item node was created!
Comment #19
iaminawe CreditAttribution: iaminawe commentedThis is a necessity for a site I am currently working on.
Please fix to work with Alpha 11
Thank you for awesome module
Comment #20
jerdavisThis is great if you're using the Feed API method and attaching feeds to a feed node, but what about support for the stand alone form? In a number of the use cases I've worked with we wouldn't actually want a whole content type just to attach the import form to. Feeds claims support for this, and starts to provide it - but falls very short in a number of cases like this where it goes back to relying on feed_nid.
Right now I'm getting around this by just hard coding a nid in a custom node importer class which is easy enough thanks to the way feeds was built, but some of this would be nice out-of-the-box.
How would you propose UID selection for nodes generated from a stand alone form? One thought would be to provide a drop down or some other form element (perhaps just a field where you enter a UID) on the node processor's configuration. If there are some consistent thoughts on this topic I can likely through together a patch.
Comment #21
alex_b CreditAttribution: alex_b commented#20:
This is actually taken care of. See the patch in #12 and my suggestion in #13 3.
Revisiting the patch in #12 I notice that we shouldn't store the user's name but her uid. The name can change.
There are some rough edges, indeed. One of them that using "feed_nid" as a variable name to identify a source is plain misleading. It should be "source_id" or plain "id" (although that starts to conflict with FeedsImporter's id). However, there aren't many hard assumptions on that feed_nid is actually a node. If there are, we should clean them up. Recently I used feed_nid to attach sources to users (uid = feed_nid) without any problems. Please open follow up issues if you find concrete items that need clarification or clean up. Thanks.
Related: #702734: Rename FeedsSource->feed_nid to FeedsSource->sid and FeedsImporter->id to FeedsImporter->name
Comment #22
jerdavisAh, that's what I get for not taking the time to read over the entire issue. Sorry about that Alex. I knew I'd glanced over this in the past and had missed that addition when coming back today.
I'll review the other items I was having troubles with and see what their state is and open issues as needed. Thanks!
Comment #23
jerdavisQuick re-roll of #12 against CVS HEAD. I tried to account for alex_b's comments in #13, although I didn't see an easy way of doing item 3. I'm not seeing a good way of determining the state of content type attachment from FeedsNodeProcessor::configForm();. If you have some ideas I'd be happy to try it again. Also, no tests. I don't have the time at present to roll them.
Comment #24
alex_b CreditAttribution: alex_b commentedThe configuration of a plugin is present as an array (from within a plugin) at $this->config.
Comment #25
jerdavisRight, but within FeedsNodeProcessor::configForm(); $this is the FeedsNodeProcessor object, and $this->config only seems to contain the mappings and items from FeedsNodeProcessor::configForm();. I'm not seeing the content type attachment setting. I'm sure it's probably available, I just haven't found it.
Comment #26
alex_b CreditAttribution: alex_b commentedUh - sorry. The content type attachments are importer level. You can get them through feeds_importer($this->id)->config from within a processor.
There is only one possible importer for a given processor and that is the importer with the same id.
Comment #27
iaminawe CreditAttribution: iaminawe commentedThanks for the patch but No 3 is the functionality I am chasing. Using the default RSS importer, changed to import blog posts, I need the Author of the imported blog posts to be the same as the author of the feed used to import them.
My php knowledge is is not up to this challenge but I would be happy to test.
Thanks
Gregg
Comment #28
rjbrown99 CreditAttribution: rjbrown99 commentedFor what it's worth, I moved to using the patch from #12 which does what I originally wanted it to do in #3. I create a node of type feed which contains my feed settings. While editing that node at the bottom in the "authoring information" section, I assign the owner to be the user ID of whoever I want to own the created nodes. During the creation process it correctly sets the owner of the nodes.
Look at your feed node and make sure you have authoring information set to the correct user.
Comment #29
iaminawe CreditAttribution: iaminawe commentedThanks.
I tried this but my use case involves a variety of different users importing blog posts through Feed.
The posts need to be the same author as the feed and they do not have access to the feed importer settings to manually set a userid
Any other ideas?
Thanks
Gregg
Comment #30
EnekoAlonso-1 CreditAttribution: EnekoAlonso-1 commentedIs there a way to map a drupal user to the author of the feed entry? I'm thinking on matching the feed author field with a profile field on user accounts or something similar. Any ideas?
Comment #31
vinoth.3v CreditAttribution: vinoth.3v commentedany updates on this?
is any possibilities to know when this patch will be updated to the latest release?
Comment #32
alex_b CreditAttribution: alex_b commented4vinoth: What you see is the state of the art. Patch should apply against 6.x 1.x dev.
Comment #33
vinoth.3v CreditAttribution: vinoth.3v commentedOK alecx, Thanks for the update,
But when I can expect this issue is fixed, because without this i am unable to use this module. :(
Comment #34
alex_b CreditAttribution: alex_b commented#33 - Looking at the movement on this issue in the last days and weeks, I wouldn't wait for anybody. You will either have to step up yourself and work on the patch or get somebody to do it for you. Remember, this is open source ;-)
Comment #35
jweedman CreditAttribution: jweedman commentedI applied the patch from #23 - worked fantastically. Are the maintainers of the Feeds module planning on making this a part of the first dev release?
Anyway, thanks for the work you guys put it on this - you got one thankful 'customer' !!
Comment #36
alex_b CreditAttribution: alex_b commented#23: great.
The plan is to commit the patch when #13 - 3 and 4 are addressed. I am looking for volunteers to bring this puppy home.
Comment #37
geerlingguy CreditAttribution: geerlingguy commentedSubscribe - this causes a headache for content managers who have to sort the imported content, as they have to switch the input format manually from Filtered HTML to Full HTML, since the anonymous user defaults to Filtered HTML :(
Comment #38
ronald_istos CreditAttribution: ronald_istos commentedHi alex_b was trying to figure out where I should be looking so that we can make a decision about whether to grey out the checkbox or not (point 3 of #13).
I thought it would be a case of having to check the value of $this->config['content_type'] that is available in configForm. However, no matter what the setting of Attached To in the actual form that variable is always feed_item. Which means that I am probably looking in the wrong place so any pointers would be greatly appreciated and I will try to take care of the remaining bits to wrap this issue up.
Comment #39
pdcarto CreditAttribution: pdcarto commentedI just found this issue. FWIW, I posted a patch on Feeds Inherit settings from parent feed node (like taxonomy). All I did was merge the feedapi inherit code into feeds. So it allows you to have your feed items inherit the following settings from the feed node: organic groups, author, taxonomy, and language.
Should one of these issues be marked as a duplicate of the other?
Comment #40
alex_b CreditAttribution: alex_b commented#39: Indeed, there is overlap on the inheritance patch that picked up speed now: #632920: Inherit properties from parent feed node (taxonomy, author, OG, language). That patch will cover the inherit author option. This patch can now focus on assigning a specified user to a feed item.
#38: this question is now not relevant anymore, but what you're looking for is:
feeds_importer($this->id)->config['content_type']
.Comment #41
ronald_istos CreditAttribution: ronald_istos commentedgreat - so should we assume that if a user assigns an author through the Feed setup form they don't want to inherit settings from the node and perhaps make that assumption clear in the interface? - something along the lines of "setting the author here will override the Feed node author"
Comment #42
alex_b CreditAttribution: alex_b commentedThe contradiction is pretty self explaining, right? I would suggest to deal with this on validation - throw an error with a brief explanation if both options are set:
"A feed item cannot both have an assigned author and inherit its author from the feed node."
Comment #43
iaminawe CreditAttribution: iaminawe commentedI can confirm that patch from #39 works nicely to fix the author inherit issue.
It does not seem to be inheriting the authors default input filter so all imported items still default to the site default which in my case is plain text.
Comment #44
Grayside CreditAttribution: Grayside commentedI second #30.
The best approach strikes me as a custom mapper that tries to find the source author in the local usernames. Failing that, default to the selected UID assignment described here.
Should something like this be in a separate project?
Comment #45
ndame CreditAttribution: ndame commentedsubscribing
Comment #46
deggertsen CreditAttribution: deggertsen commentedsubscribe
Comment #47
alex_b CreditAttribution: alex_b commented#44/#30: yes. This patch should either accept a uid or a name for specifying an item's author.
#23 accepts a name.
In order to make sure we're all on the same page, I'll reiterate what I've stated in #40: #632920: Inherit properties from parent feed node (taxonomy, author, OG, language) will cover inheritance of authorship from feed nodes, hence this patch can focus on assigning a specific author user to a node.
Comment #48
jackalope CreditAttribution: jackalope commentedsubscribe
Comment #49
hampshire CreditAttribution: hampshire commentedI applied the patch in #23 to Alpha 15 and get a 500 error when visiting the admin section of feeds, anyone else having this problem?
Comment #50
ronald_istos CreditAttribution: ronald_istos commentedHi, updated patch for this. It will now work against current head.
Given that inherit author from feed node issue gets solved somewhere else the option to assign a user explicitly only shows up when you choose Standalone form as an option.
Still doesn't handle assigning a user by uid which I need to fix but at least the issue is re-activated and people can go ahead and look at this once more. Will do more testing + refinements over the next couple of days.
---
one note: in order to check whether this is a standalone or whether it is attached to a content type I use
maybe we could assign a specific value to this (e.g. 'none')?
Comment #51
hampshire CreditAttribution: hampshire commentedI am assuming a few things here and may be wrong so with that said, I assume #50 is a reply to #49, and acknowledges that patch feeds-652180-2.patch (#23) does not work with Alpha 15. I also assume that the patch in #50 is meant to be applied after the patch in #23. If all these assumptions are correct I have a Hunk #2 FAILED at 68 error. If my assumptions are incorrect then it is only logical that I have an error.
Comment #52
alex_b CreditAttribution: alex_b commented#50: The patch should store a uid for an assigned author instead of a name. Thus we can avoid doing a user_load() when it's expensive: when importing items. configFormValidate() might be your friend here.
Further, it assigns a user object to $node->uid which will break.
Comment #53
ronald_istos CreditAttribution: ronald_istos commented#52: Now storing uid (but only showing users the user name) - configFormValidate is a friend - hope I used it properly.
silly mistake the result of last minute re-org. Not a problem anymore - tested a bit before submitting :-)
#51 hampshire - you don't need to apply any other patch. This patch should apply against the latest version of Feeds from CVS head.
ronald.
Comment #54
alex_b CreditAttribution: alex_b commentedThis is looking good. Need to get some time to do a good review.
Comment #55
alex_b CreditAttribution: alex_b commented- simplified
- added tests
I am going to commit this soon.
Comment #56
alex_b CreditAttribution: alex_b commentedCommitted. Thank you.
http://drupal.org/cvs?commit=382136
Comment #58
jvieille CreditAttribution: jvieille commentedI am new with Feeds, still wandering in its quite complex settings and future promised features (compared to Feed API we are invited to move from)
Apparently, this was committed in Beta 2, and it only gives the possibility to assign a specific author to all feed items coming through a given importer. If I set several Feeds, all items get the same author or anonymous depending on the choice.
It seems that it was discussed here (#30, #44) the possibility to inherit the author from the feed item, at the item level, but I don't find any such option.
1) is the latest beta2 incorporate the discussed features?
2) If yes, does it provides the possibility to inherit the author name from the feed item (providing the name matches a Drupal user I suppose)?
3) If yes, how to do that?
Thanks
Comment #59
alex_b CreditAttribution: alex_b commented1-3 will be available with #632920: Inherit properties from parent feed node (taxonomy, author, OG, language)
Comment #60
jvieille CreditAttribution: jvieille commentedI succeeded to get the feed item authored by the Feed author thanks to
http://drupal.org/node/632920
My second issue seems to be the subject of this discussion: how to assign the original article author to the feed item Drupal node?
The node processor mapping offers the "Author" information as source, but nothing is selectable on the target side to link this to the feed item node author.
Thanks
Comment #61
pribeh CreditAttribution: pribeh commentedsubscribing.
Comment #62
alex_b CreditAttribution: alex_b commented#60: You're looking for #699176: Mapper for user id and user name
Comment #63
baff CreditAttribution: baff commentedsubscribe
PS: I am using mailhandler + feeds to import emails as nodes.
The athor is set to some user which I never defined to do so ...
At the moment I am using a rule which changes the author after node is saved.
Comment #64
BeaPower CreditAttribution: BeaPower commentedhas this ever been committed? Don't see it in the current dev...
Comment #65
jordiserra CreditAttribution: jordiserra commentedI'm interested on this too... any news?
Comment #66
Anonymous (not verified) CreditAttribution: Anonymous commentedI need to automaticaly assign author of imported nodes same as user who is importing .... In the 7.x-2.x-dev version is only option to manually assign author .... ive tried all patches what ive found , but nothing is working with this release... Im really stuck at this point ....only option what ive found its inserting userID into one column of imported xls, and then map this column as UserID .... but this is pointless for me, because , all users can importing nodes as the other users.... so it will point to absolute mess ....
Comment #67
giorgio79 CreditAttribution: giorgio79 commentedI also faced this issue, namely that if author is left empty nodes are imported to anonymous.
This patch changes this so if author is left empty for node processor, the current user will be set to the owner. I think noone would want to import nodes as anonymous...
Comment #68
nyleve101 CreditAttribution: nyleve101 commentedHi,
is the patch in #67 for the current dev branch? If so, will it be committed?
Thanks,
Evelyn
Comment #70
ss81 CreditAttribution: ss81 commented#67: feeds-anon-652180-67.patch queued for re-testing.
Comment #72
drasgardian CreditAttribution: drasgardian commented#67 wasn't working for me. I found a few more lines that needed to default to the current user id. I've also added back in default_value on the form selection of author.
Comment #74
avilao CreditAttribution: avilao commentedIf I understood correctly by this thread, the #72 patch is supposed to give me the chance to set the author as the user who actually imported the CSV?
That's exactly what I'm looking for, could anyone please confirm it. Also, is it only for the dev version?
Thank you.
Comment #75
Nikolay Borisov CreditAttribution: Nikolay Borisov commentedActually the #72 patch is working when submitting ... but after that if the feed is set to fire (e.g.) every 30 minutes - those that are imported are not assigned to the author of the feed content
edit: sorry I just saw it is about CSV - so it is always about submitting a file - so I confirm this patch is working as it should be.
Just not to leave it as a lame answer I would recommend using hook_feeds_preserve() instead.
Here is how it could be done without patching:
Comment #76
hilrap CreditAttribution: hilrap commentedsubscribe
Comment #77
seehive CreditAttribution: seehive commentedi was working with same and found a simple solution by changing
$this->config['author'] in FeedsNodeProcessor.inc file
goto protected function newEntity(FeedsSource $source)
and change
$node->uid = $this->config['author'];
TO
$node->uid = $user->uid;
it will automatically assign the node author to the logged in user
Comment #78
Nikolay Borisov CreditAttribution: Nikolay Borisov commented@seehive - you don't have to hack the module, when you could do the exact same thing in hook_feeds_preserve ... this way - when the new version of feeds appear - you don't have to apply your changes again - instead you could just update the module as recommended
Comment #79
blogook CreditAttribution: blogook commented@flesheater,
can you pls explain how to do what you suggest?
thanks :)
edit : just noticed #75 .. so never mind :)
Comment #80
ngreenup CreditAttribution: ngreenup commentedI have been struggling with assigning the author of an imported node based on the feed node author. Below is the module file code in a custom module called "jlsa_feeds". This seems to have no effect. The module is enabled and my feed importer settings are as follows:
Basic Settings:
Attach to content type: "Import"
Parser:
CSV Parser
Processor:
Node Processor
Bundle: Log Entry
Author: anonymous
I create a "import" node and feed it my csv. It imports the nodes(log_entry) just fine but the author is anonymous. Any ideas on where I am going wrong? I would also like to do something similar with a list(text) field but I figured I would get author working first.
Comment #81
julien.reulos CreditAttribution: julien.reulos commentedCode from #75 doesn't work for me either. Code from #77 does the trick, but I prefer to use the combination of Feeds, Feeds Tamper and Feeds Tamper PHP modules to get the user:
- go to Edit tab of your feed importer
- go to Mapping tab
- in "Source", put a dummy number that represents an empty column from your CSV file. For exemple if your CSV has 6 columns, put "7".
- in "Target", choose "User ID (uid)" from the select dropdown
- Hit Save
- go to Tamper tab
- click "Add plugin" link in the "7 -> User ID" table footer
- Choose the "Execute PHP code" option from the select dropdown
- In the PHP code textarea, add:
Still, there is one bug I am struggling with. In the Basic settings of my feed importer, I checked both "Import on submission" and "Process in background" options, so when I start to import nodes from the CSV file, a first bunch of nodes is created, while the rest of it is created on cron runs. Well, the first bunch has the correct user (the current logged in user that did the import) while the rest of the nodes created on cron runs has Anonymous (user uid 0)...
Comment #82
NWOM CreditAttribution: NWOM commentedIs there any more work being done on this? Would love to be able to assign author on import, otherwise rules may be an option. Thanks.
Comment #83
nithinkolekar CreditAttribution: nithinkolekar commentedwhy sailing on different boat?
there are many threads for this feature
#1414080: Automatically assign the userneme that imported nodes to the node author
#632920: Inherit properties from parent feed node (taxonomy, author, OG, language)
and also very old issue at SO with some methods which claimed working at that time using hook_nodeapi and hook_feeds_presave. But none of them is working with current dev.
#10 is exactly what this issue all about and needs to be ported to 7-x.
Comment #85
TotalNoob CreditAttribution: TotalNoob commentedI had this issue I was fortunate enough to have found a fix for pretty much any content type.
Just add another column in your CSV file and map it in the feeds module (whatever you upload)
I called it User Name in column 1 and linked it to User Name field and placed that first in the feed mapper (up top) and the title (unique) in column 2 just below the User Name.
The rest is easy. I have No issues now and that works on all user configurable content types and views. I am using D7 with ubercart, ubercart marketplace, ubercart auction and ubercart feeds.
If you want an easier time and less access for files that took you a long time to create select delete feed on import. If you have a column full of terms you will need to use tamper to separate them correctly via explode.
Hope that helps :-)
Comment #86
Drupal_8_TTerm CreditAttribution: Drupal_8_TTerm as a volunteer commentedHi guys,
thank you very much for your help in solving this problem. Especially to Attribution: julien.reulos whose solution worked great for me. I made a short tutorial on Youtube on how to implement this solution in combination with Node View Permissions module: https://youtu.be/xqWQSRUwDRU
Hope I could help to make the Drupal community even better :)
Comment #87
NWOM CreditAttribution: NWOM commentedChanging title back, since it was most likely accidentally changed.
Comment #88
pinueve CreditAttribution: pinueve commented++1, #86, thanks a lot!!!
Comment #89
drvdt CreditAttribution: drvdt commented#72 worked
Many thanks
Comment #90
NWOM CreditAttribution: NWOM commentedThe module (for a few years now) has the ability to assign author directly when importing. There are user fields that can always be mapped by default.