Closed (fixed)
Project:
Feeds
Version:
7.x-2.0-alpha3
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
9 Nov 2010 at 19:46 UTC
Updated:
2 Jan 2014 at 19:06 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
alex_b commentedLooking at the code I can only imagine that string list types are not supported. Is there such a thing as string list types?
Comment #2
jcarlson34 commentedWhen creating a field in Drupal 7, three List types are available in the drop down:
List (float)
List (integer)
List (text)
In the database field_config table, the type is stored as "list_text" and the module is "list". So I guess string list types are new in Drupal 7?
It'd be great to have List (text) supported in the 7.x Feeds module if possible. Thanks for a great module alex_b!
Comment #3
David Goode commentedHere's a patch which adds 'list_text' to the string mapper options. Also removes the 'list' numeric field type, which AFAIK doesn't exist? Confirmation? One outstanding issue is that for all the list fields, it doesn't verify if you are inserting an option that is one of the allowed values; makes editing the node destroy the data if this isn't true. Any thoughts on what to do about this Alex or others? May make a separate ticket.
Comment #4
johnvThis patch does not work if the imported value is numeric: value "xyz" works fine, value "123" does not, with the following list of allowed values:
1|xyz
2|123
Comment #5
jcarlson34 commentedLooks like the patch still needs a tiny modification because 'list_integer' and 'list_float' need to be added while 'list_number' needs to be deleted.
From line 22 of drupal-root/modules/field/modules/list/list.module here are the types of lists available in Drupal 7:
So the code should look like:
Pretty simple to modify but I don't know how to do patch files correctly yet. :)
Comment #6
jcarlson34 commentedOk figured out how to patch finally.
Here's the patch additions from #5 for 7.x-2.0-alpha3 (which must have just been released).
Comment #7
johnvThe patch works fine. It is not complete though, see my comment #4.
I dno't know to set the status to 'Needs work' or to RTBC and open a new issue.
Comment #8
jcarlson34 commented'Needs work' sounds about right.
We get the right field types now but something more must be needed to process it right then.
Comment #9
firestonej commentedSubscribing. This feature would be awesome.
Comment #10
ropaolle commentedSubscribing
Comment #11
retolist commentedSubscribing
Comment #12
froboySubscribing
Comment #13
johnvUpdate on #4 and #7. Numeric values are processed correctly. It turned out to be a user error (field was declared twice in my input file, I changed 1st field, but 2nd field was mapped.)
Comment #14
ccheu commentedsubscribing
Comment #15
kking commentedCommit 72fbb30ab073dec6d5727ebd22b9bd8584e0f6cf
Date: Fri Mar 4 17:34:24 2011 -0500
Issue #967018 by jcarlson34, David Goode, alex_b: Mapping to String lists not supported
Comment #16
ccheu commentedPatch #6 worked for me. Thanks!
Comment #18
rowbotony commentedHello, I am also encountering this issue on my site. I'm new to Drupal, and not a hardcore coder, so I'm hoping to report this issue in a comprehensive way so that someone smarter than me can know what's causing it, and how to patch it.
In short - I have a catalog built with nodes and fields. I'm trying to use Feeds to import the catalog via CSV. I have found that fields with the Type: list_text and Module: list are not displaying in the field mapping, so I can't map those fields from the CSV to the node. See attached for clarification, and please let me know if I may be of further assistance.
Thank you,
//Tony
Comment #19
johnvJust a silly question: you did apply the patch in comment #6?
Comment #20
rowbotony commentedWhen I initially installed Feeds earlier today I just pulled the latest git version which already includes the patch in - commit 72fbb30ab073dec6d5727ebd22b9bd8584e0f6cf. So yes, this is still occurring with the latest previously mentioned patch. Thanks -Tony
Comment #21
jcarlson34 commentedDid you clear your site's cache? List text fields show up for me.
As for node_reference, check out #988856: Feeds mapper for node_reference and user_reference fields
Comment #22
rowbotony commentedYes, I cleared the cache #drush cc all, disable/enabled, downloaded again, enable/flush cache. I've done that several times, still the list fields do not appear in the mapper.
Comment #23
rowbotony commentedI've investigated further and found, with just a clean D7 install with Feeds, ctools, job_scheduler, Feeds Import, Feeds UI, etc. these list_text fields DO show up in the mapping as expected. So this is something particular to my config, I'll dig a little deeper and see what other module I have installed that may be interfering with my other site that's not showing these list mappings. Thanks, I'll post back if I find the culprit.
Comment #24
jcarlson34 commentedUgh that's so frustrating when that happens. Good luck tgroff. I hope you find the culprit quickly.
Comment #25
rowbotony commentedOK, I found the problem. I retraced my steps a bit through bash_history... still can't find where I went wrong, but I must have fat-fingered something at some point. Long story short - the issue was because I had the wrong version installed. Even with the
git clone --branch 7.x-2.x http://git.drupal.org/project/feeds.git, I have no idea how I was still running 7.x-1.x-dev. No matter, I've resolved the issue now with the proper feeds-7.x-2-dev version :).Apologies for the false report. I'm quickly learning how to debug issues in Drupal. This is the second time I've had an issue on my site, that has not existed on a fresh install trying to recreate the issue. So I think it's best practice for me to test on a fresh install before reporting a bug. Thanks for your understanding :)