Synopsis
The Simple CSV Importer module is an import and integration framework for Drupal.
The importer offers the following features:
- Import of csv files for creating nodes
- Update of nodes with csv file import
- Update of entity translation enabled nodes with language specific content (supports regular fields, file fields, image fields and taxonomy fields)
The module is available as a sandbox project Simple CSV Importer. Use the following command to clone the repository:
git clone --branch 7.x-1.x http://git.drupal.org/sandbox/redorbit/2450325.git simple_csv_importer
cd simple_csv_importer
Requirements
This module requires the following module:
- XAutoload (https://www.drupal.org/project/xautoload)
If entity translation is desired the following modules are required:
- Entity Translation (with enabled locale module) (https://www.drupal.org/project/entity_translation)
- Title (https://www.drupal.org/project/title)
The module makes use of PHP namespaces. Therefore PHP 5.4 or higher should be installed.
Recommended modules
Roadmap
Known problems
Pledges
It has not been discussed if this module makes sense for Drupal 8 because of the different language support by the core.
Credits
Current maintainers:
- Siegfried Steinsiek - https://www.drupal.org/user/2238370
- Christian Heyer (redorbit) - https://www.drupal.org/user/1394872
This project has been sponsored by REDORBIT. Visit http://www.redorbit.de for more information.
Gittip/Flattr/Paypal
Help wanted!
Similar projects and how they are different
Of course, there is Feeds (https://www.drupal.org/project/feeds). But in many cases Feeds is overkill, and users get frightened when they read the documentation.
The main reason, however, we implented this module, has been a customer who wanted to use entity translation for nodes containing text, taxonomies, images, and attachments. The module Feeds Entity Translation (https://www.drupal.org/project/feeds_et) did not work as desired.
Comments
Comment #1
PA robot commentedThere are some errors reported by automated review tools, did you already check them? See http://pareview.sh/pareview/httpgitdrupalorgsandboxredorbit2450325git
We are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then we will take a look at your project right away :-)
Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #2
redorbit commentedNo more messages by PAReview.sh
Comment #3
swaps commentedAutomated Review
Review of the 7.x-1.x branch (commit 2abe722):
http://pareview.sh/pareview/httpgitdrupalorgsandboxredorbit2450325git
Manual Review
The starred items (*) are fairly big issues and warrant going back to Needs Work. Items marked with a plus sign (+) are important and should be addressed before a stable project release. The rest of the comments in the code walkthrough are recommendations.
If added, please don't remove the security tag, we keep that for statistics and to show examples of security problems.
This review uses the Project Application Review Template.
Comment #4
redorbit commentedThanks a lot for the review @SwapS.
Concerning the + comment about beeing similar to feeds module: We developed our own import module, because feeds does not support entity translation yet. And even with the submodule Feeds Entity Translation (https://www.drupal.org/project/feeds_et) we had to realize, that not all common field types are supported. That is the main difference and is also mentioned in the module`s main page.
Comment #5
evucan commentedAutomated Review
Passed
Manual Review
The starred items (*) are fairly big issues and warrant going back to Needs Work. Items marked with a plus sign (+) are important and should be addressed before a stable project release. The rest of the comments in the code walkthrough are recommendations.
This review uses the Project Application Review Template.
Comment #6
evucan commentedThe import process requires an "id" as a column to report. It is also forced to be mapped to somewhere - What should it be? Currently I am creating field called field_unique so that I can test it. Please advise.
Comment #7
redorbit commentedHello Evucan
thank you for your interest nd the review. An explanation of the "id" is best done by an example:
English CSV:
German CSV:
Without the "id" you do not know which node to update.
Same is true if you want to update the node for article 2 where the article now should be a blouse.
Therefore we need a data field in the drupal content (an id). The csv "id" field must be mapped to this drupal field. In general you may already have an id field, e.g. a stock number. Otherwise you must define your own id fields.
Feeds works in a similar way, but feeds creates a special table where the csv id is mapped to the node id. We believe that our solution is simpler and more transparent to the user. You can always relate the generated node to the corresponding csv row.
Comment #8
alexfarr commentedHi redorbit,
Small point really, consider splitting the permissions for configuring a import away from using the importer. There maybe situations where these are not the same user/role. Good work
Comment #9
redorbit commentedHi Alex,
that is a good point, and I have implemented it. Users must modify their permissions to configure the importer.
Comment #10
th_tushar commentedHi redorbit,
The module is already available for importing the nodes using CSV file. Please explain the difference of your module from Feeds and Node Import module.
Module duplication and fragmentation is a huge problem on drupal.org and we prefer collaboration over competition. Please open an issue in the Feeds module issue queue to discuss what you need. You should also get in contact with the maintainer(s) to offer your help to move the project forward. If you cannot reach the maintainer(s) please follow the abandoned project process.
If that fails for whatever reason please get back to us and set this back to "needs review".
Comment #11
redorbit commented@ th_tushar, we already explained the difference betweeen feeds module and our importer module. Let me quote that, it should clarify everything:
"Concerning the + comment about beeing similar to feeds module: We developed our own import module, because feeds does not support entity translation yet. And even with the submodule Feeds Entity Translation (https://www.drupal.org/project/feeds_et) we had to realize, that not all common field types are supported. That is the main difference and is also mentioned in the module`s main page"
Hope that helps.
Comment #12
ayaz.mrz commentedHi,
in your requirements you should mention PHP version also because Drupal 7 support PHP 5.2 or higher, but you have used classes with namespaces which support only PHP 5.3 or higher.
Comment #13
siggi_kid commentedComment #14
siggi_kid commentedHi Ayaz,
thank you. You are right, and I must apologize that I did not care for the PHP requirements.
We implemented this module to run on a PHP 5.4 server. As I just checked, this PHP version has an end-of-life date of Sep 3, 2015. End-of-life for 5.2 was Jan 6, 2011. This may be an excuse.
Comment #15
joachim commentedThere's Migrate module too.
Comment #16
khurrami commentedHi,
In your simple_csv_importer.module file please correct the following error
line#138:- Inline comments must end in full-stops, exclamation marks, colons, question marks, or closing parentheses
Thanks
Comment #17
ddarras2012 commentedI was able to map two columns ("Place" and "Number") to content type of article with fields title and body, however I got this error before the nodes were saved:
/drupal-7.43/sites/all/modules/2450325/lib/Drupal/simple_csv_importer/Content.php(49): Id column not found: "Place".Comment #18
siggi_kid commentedThank you very much ddarras2012 for your observation. We have never seen this error message before, and it was hard to find the reason.
Actually, there have been two problems:
Id column "Place": The value must not be empty.'I do hope that this has been your problem, and it should be fixed by now.
Besides, I also fixed some complaints by the Code Sniffer. It looks like the rules have been modified in the meantime.
Comment #19
Aaron23 commentedHi,
https://pareview.sh/node/1294
Please , clear the warnings
Thanks
Comment #20
siggi_kid commentedHi Santhosh Fernando,
thank you for your comment. However:
DrupalPractice has found some issues with your code, but could be false positives.
and this is one of them. The constructor is called in line 149.
Best regards
Siegfried
Comment #21
siggi_kid commentedHi Santhosh Fernando,
thank you for your comment. However, the warning is a false positive. The constructor is called in line 149.
Comment #22
sseligma commentedManual Review
feeds module. The author acknowledges this, but it is not clear what
advantages, if any, this module has over feeds. It is rather limited
in its field type support. It also required users to know the machine
names of the fields attached to the content type even when the
configuration forces users to enter a content type. If the content
type is known the text area for field mapping should be converted to
a list of column names and a pick list of fields from the content
type. There is only room for a single configuration so users would
need to change their settings each time i they wished to import more
than one content type.
Usage, Extended Functionality.
definition
an underscore
underscore
with an underscore
(2) do not align
not align
(3) do not align
not align
a new line
the last content on the line
on a line by itself
found "TRUE"
with an underscore
prefixed with an underscore
with an underscore
Comment #23
sleitner commentedThis application would grant the reporter of this issue the vetted role and he/she would be able to opt in the security coverage review for your projects, but the reporter did not contribute code to this project.
Comment #24
avpaderno