Main reason for this patch is to overcome the lack of compatibility of import_export.module CSV export types.

Improvements:

  • Flexible CSV Export using variety of delimiters of your choice.
  • Supports multiple taxonomy terms to be exported properly, with any delimiter. (A proper export to node_import instructions below)
  • More help text added as instructions.
  • Non-standard module name is now standardized to "import_export" rather than "import/export","import" etc. in all text of the module, including links, if it does not mean import/export as its real meaning. (it automatically corrected some other problems below)
  • All text and variables of previous typo in the module (CVS to CSV) is corrected. (Already has a patch, but improved future compatibility with other fixes provided)
  • Module is now under admin/ not in the root menu it also fixes the missing [more info...], with the fixes above.
  • Missing [more info...] link, due to non-standardized module name in the first page of the wizard corrected.

How to export from Import_export.module (Drupal 4.6) to import with Node_import.module (Drupal 4.7):

You can now export nodes from Drupal 4.6 with import_export.module from different types of nodes to Drupal 4.7 using node_import.module, especially tested from Flexinode in Drupal 4.6 to CCK in Drupal 4.7.

To be able to export properly you can choose the default values of delimiters after this patch, in the second page of the CSV export wizard.

Select only the fields which already exists in your updated Drupal 4.7


For: "Output format of the Taxonomy terms": Select: "Term names" (as default)

For: "Multiple-term delimiter": Choose: Pipe delimiter (|) (as default)

For: "Field Delimiter": Choose: Comma (,) (as default)

For: "Text delimiter": Choose: Quote (") (as default)


Leave Max. Field length empty if you really don't need it. (It trims the field size to the number of character)


Do a "Friendly Export" for a file export after you have tested the screen output with the "Export" button.

Description:

Import/Export module imports and exports nodes as XML or CSV files.

Import/Export from a CSV file or a XML formated file is supported. The CSV is suitable for simple nodes (weblinks, images, etc.), the XML for large ones (stories, books, etc.). There is support for common nodes, stories, books, pages, images, flexinodes directly into module.

Note that files must be UTF-8 encoded.

Form groups are divided into four actions in the first page of the wizard you can choose from:

  • CSV export
  • CSV import
  • XML export by vocabulary
  • XML book export

CSV export:

  1. In the first step you need to choose from the listed node/content types to export, and click next.
  2. In the second step in the wizard there are more options you need to carefully choose from:
    • Fields: You can see the field types of your node to be able to export.
    • Output format of the Taxonomy terms:
    • Three types of delimiter (it is the "divider" character, often a comma, between separate fields in database records. It is a special character that indicates a record or field boundary within a text stream, rather than being interpreted as an actual part of the text itself.) you need to be careful to choose from:
      • Field delimiter: This is the main divider character divides node type labels, and each content field. Default delimiter is a comma, which is especially choosen for CSV type output.
        e.g. linux,web search,new york,usa (w/ comma delimiter)
        e.g. linux|web search|new york|usa (w/ pipe delimiter)
        e.g. linux:web search:new york:usa (w/ colon delimiter)
      • Text delimiter: This delimiter is the string delimiter wrapping each field value for better CSV parsing. Default delimiter is quote.
        e.g. "linux","web search","new york","usa" (quote text delimiter w/ comma delimiter)
        e.g. |linux|,|web search|,|new york|,|usa| (pipe text delimiter w/ comma delimiter)
        e.g. :linux:,:web search:,:new york:,:usa: (colon text delimiter w/ comma delimiter)
      • Multiple-term delimiter: This delimiter is the divider for multiple terms in taxonomies, if exists. Default is the pipe delimiter.
        e.g. "linux","web search","new york|toronto","usa|canada" (Pipe multiple-term delimiter w/ quote text delimiter w/ comma delimiter)
    • Max. field length: Defines the maximum field size in characters. Does not effect taxonomy terms. Leave blank for unlimted.
  3. There are two seperate buttons to choose from:
    • Export: Exports the data as a screen output.
    • Friendly Export: Exports the data as a file which you can download and save for further implementations. (recommended)

Requirements:

XML import/export requires XML support in PHP, see PHP documentation. Generally http://www.jclark.com/xml/expat.html support should be installed.

CommentFileSizeAuthor
import_export.module_0.patch24.19 KBtgoajeqfogjtvpqsb
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

tgoajeqfogjtvpqsb’s picture

Additional to the export from Drupal 4.6 to 4.7, from import_export.module to node_import.module you need to export taxonomy vocabularies from taxonomy itself and import to Drupal 4.7 in xml format using taxonomy export.

Then the nodes will match itself while importing.

tgoajeqfogjtvpqsb’s picture

Issue summary: View changes