Jump to content

Module: Import Pages from CSV file


ryan

Recommended Posts

9 minutes ago, horst said:

Looks like 


ImportPagesCSVData

is null or empty here, when an array or countable object is expected. 
Have you checked that your data import results in more then 0 valid records?

Hi @horst

Yup. All seems successful. 

591722728_download(2).thumb.png.edce34211145c2d2b040773ff7086bd8.png

Link to comment
Share on other sites

  • 2 weeks later...

Hello,

Im having some problems importing dates field with csv file.

I need to import around 600 events from old drupal 6 site and all the fields are working great eccept date field it won't import it. Not sure what I need to do to make it work here.

I tried to change the output format in PW (details tab) and (input tab), but can't make it work.

What am I missing here or what am I doing wrong.

First two rows of csv looks like this (fields and date field)

Spoiler

Datum,"Slika","Vstopnina","Naslov","Vsebina","Organizator","Kraj"

<span class="date-display-single">22/10/2012 - 20:00</span>

what do I need to do to make it work. 

Thank you
R

 

Link to comment
Share on other sites

5 hours ago, horst said:

so that you only have the 22/10/2012 as values.

Good idea but still won't work though (or rather will be malformed, ending up with beginning of time dates) as date field is a datetime field. It requires dates in the format 2015-04-25 09:15:00

Probably easiest if you edit the CSV, e.g. in Excel. Do a search and replace, then tell Excel that column has date values and tell it to change the format to what datetime expects. 

  • Like 2
Link to comment
Share on other sites

  • 4 weeks later...
  • 1 month later...
  • 3 months later...
  • 5 months later...
On 8/24/2020 at 2:01 AM, Pip said:

Hi everyone!

Was wondering if anyone been getting this error when you import? 
 

Been scratching my head on this. Checked 515 and this is what I got. 

		if($page->id && count($page->get('ImportPagesCSVData'))) {

Any idea what's tripping it? 
 

Confirmed, i have this warning too, using csv upload and text, pw 3.0.184 and module 1.08, import result seem on and off, some not imported

Link to comment
Share on other sites

On 9/2/2021 at 1:19 PM, pwfans said:

Confirmed, i have this warning too, using csv upload and text, pw 3.0.184 and module 1.08, import result seem on and off, some not imported

Update, error line 515 happen only when updating value, using csv upload method or paste in method, the value seem updated tho.

Link to comment
Share on other sites

  • 2 months later...

Hi @ryan,

this module is very big time saver for me. I'm also a fan of ProFields Combo and i use both of these regularly.

My question is that is there any plans to add support for Combo field type? Now i have to do multiple conversions and helper fields for imports if i want to use Combo fields. I have got the impression that it shouldn't be too hard for this field type?

  • Like 1
Link to comment
Share on other sites

  • 8 months later...

Hi,

I've downloaded the ImportPagesCSV module. Creating new pages works fine. But modifying existing pages throws this error

Quote

count(): Argument #1 ($value) must be of type Countable|array, null given

Does anybody know if there is a problem with this module? Or can somebody help me with this?

Thank you in advance!

Link to comment
Share on other sites

  • 5 months later...
On 11/15/2021 at 10:39 AM, Jukka said:

Hi @ryan,

this module is very big time saver for me. I'm also a fan of ProFields Combo and i use both of these regularly.

My question is that is there any plans to add support for Combo field type? Now i have to do multiple conversions and helper fields for imports if i want to use Combo fields. I have got the impression that it shouldn't be too hard for this field type?

I second this. My heart weeps every so slightly that this beautiful module isn't compatible with combo fields (and one presumes other profield types). It would be very delicious if it did!

  • Like 2
Link to comment
Share on other sites

  • 3 weeks later...

I've added new fields to the Users template, one of which is a title that serves as the user's ID number. I also have another template for recording attendance, which includes a User ID field that is a page reference to the Users. When I try to import attendance data using a CSV file, the pages are being created as expected, but the User ID fields are not being populated. since they are al

Is the module ImportPagesCSV getting confused between page id, name and title since they are all a number in this case? Any hints how I can resolve it? Thanks.

Link to comment
Share on other sites

  • 2 months later...

Hello all,

I'm about to make my site fit for php8.1 (it's php8.0 at the moment).

From this ImportPagesCSV  module I get deprecation warnings:

Deprecated: auto_detect_line_endings is deprecated in XXX/site/modules/ImportPagesCSV/ImportPagesCSV.module on line 112

Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in XXX/site/modules/ImportPagesCSV/ImportPagesCSV.module on line 229

What to do?

(PW Version is 3.0.210)

Link to comment
Share on other sites

Maybe I found a solution?

For the auto_detect_line_endings in

line 114:
I commented out this one:
 

ini_set('auto_detect_line_endings', true);

 

and for the strlen()  I did this:
line 230:

$value = $this->sessionGet('csvDelimeter');


changed to
 

$value = (string) $this->sessionGet('csvDelimeter');

 

I'm not sure if I did well, but the warnings are gone and the module works fine.

 

Link to comment
Share on other sites

  • 4 weeks later...

Hi all,

First thing is the module is great, does exactly what it says on the tin!

My only concern is about the speed at which it imports larger datasets. (Not sure if 1700 even counts as large to be honest?)

We had a client report that when importing a csv with 1700 entries it took about an hour to complete.

Granted the client maybe off about the exact time, but from my own imports I did find it struggle to create new entries without throwing a timeout error.

When testing locally my results where something like:

  • Importing, creating new entries (20-30m was not uncommon)
  • Importing and updating if entry exists (3-5 minutes)

Long story short, im just curious of others experience with variously sized datasets and how much a full import took?

As I am trying to figure out if this is expected behaviour before I bring it up with IT team who control the server the client site is running on.

Any thoughts?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...