Giter Club home page Giter Club logo

importpagescsv's Introduction

ImportPagesCSV: Import CSV file to pages

This is a ProcessWire module that enables you to import CSV files to create pages or modify existing pages. The module requires ProcessWire 3.0.123 or newer. This is an admin/development tool that is recommended only for use by the superuser or developer.

The following Fieldtypes are supported for importing, as well as most types derived from them:

  • Checkbox
  • Datetime
  • Email
  • File
  • Float
  • Image
  • Integer
  • Options
  • Page
  • PageTitle
  • Text
  • Textarea
  • URL

To install:

  1. Place the file ImportPagesCSV.module in a /site/modules/ImportPagesCSV/ directory.
  2. In ProcessWire admin, click to 'Modules' and 'Check for new modules'.
  3. Click 'install next to the 'Import Pages CSV' module (under heading 'Import').

Once installed, the module can be found on your admin Setup menu under the title "Import Pages CSV".

Importing file/image fields

CSV column should contain full URL (or diskpath and filename) to the file you want to import. For fields that support multiple files, place each filename or URL on its own line, OR separate them by | (pipe) OR tab.

Importing page reference fields

For single-value page fields the CSV imported value can be the page id, path, title, or name. For multi-value page fields, the value can be the same but multiple-values should be separated by either a newline in the column, or a pipe "|" character. Please make sure that your Page reference field has one or more pages selected for the "Parent" setting on the Details tab. If you want the import to be able to create paes, there must also be a single Template selected on the "Template" setting.


Copyright 2011-2021 by Ryan Cramer for ProcessWire

importpagescsv's People

Contributors

ryancramerdesign avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

importpagescsv's Issues

Undefined variable in use

On lines 405 and 412 there's a variable $pageName being used, uninitialized. $page->name works better and without warnings.

language support

This is to ask for a multi-lang support, smth like:

title, title-other-language
hello, привет

Request: hookable method to determine if row should be skipped

It would be handy if there was a hookable method that determined if the row should be skipped. The row of data would be one of the arguments.

That way it would be possible to do logic like "create a new page as long as there isn't an existing page using the same email address" or similar.

Importing users

Is there something I'm not getting? I can't seem to select name and pass fields for the user template..

User import

FR: Import to combo field

I am using Profields: Combo a lot more these days. It would be nice to be able to import to combo field.

Thx!

First line of a CSV file will not import.

Had to import 500.000 pages, so I splitted the file in 50 files.
Look like for every 50 files, the first line is not imported.
(So the files did not include headers on the first line)
Maybe, an option would be nice.

Support connection of page ID column

It would be useful if it was possible to connect a Page ID column in the CSV to the ID property of pages in order to update those pages. This would allow for a more robust solution for when page data needs to be exported, modified externally, and then reimported to the existing pages.

PHP 8.1 deprecated commands

PHP Deprecated: auto_detect_line_endings is deprecated in [.../public_html/site/modules/ImportPagesCSV/ImportPagesCSV.module:114]

PHP Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in .../public_html/site/modules/ImportPagesCSV/ImportPagesCSV.module:231

Cannot load one field into multiple fields

If you have a csv with title and body

And you have a template with title, short title and body (for example)

You should be able to map title->title title->short title and body->body and have it upload the file accordingly. Instead it offers an error...

Not working in PW3+?

Step 1 works. But at step 2 all select fields are blank. Making it not possible to connect data from the CSV with fields.

FieldtypePage: Unable to locate page match for: "number"

Hi,

I use this module to import a collection of clothes. I use the FieldTypePage in my product template for the sizes. If the size page title/name is a number the import script can't find the page and I get te following error.

FieldtypePage: Unable to locate page match for: 128

  • ProcessWire 3.0.158 dev
  • ImportPagesCSV 1.0.8

Problem with options to enter csv manually

The CSV file upload field is "required" and if I don't need it and want to enter CSV manually, I can't continue because the CSV file field is empty. I removed the required option to get it to work. This is is the latest 2.2.9 version.

Drag-and-drop upload not working for CSV file field

The drag-and-drop upload is not working for the CSV file field - dragging a file (txt or CSV) to the field does not highlight the field as per a normal file field and dropping the file has no effect.

Tested in Firefox and Chrome on Windows. Module v1.0.6, PW 3.0.59

Requires Title Field

Doesn't seem to work with templates that have no title field. Should accept name as an alternative.

numImported variable

Not a big issue but the numImported variable that is shown as a summary of the import seems to count the first row. This header row is not actually imported as a page so the variable should reflect this.
ATM it is slightly misleading as the actual number of imported pages = $numImported-1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.