Keyword

K2 CSV import tool

More
14 years 4 months ago #83338 by Thanos
Replied by Thanos on topic K2 CSV import tool
Hi,

I just installed the component, i tried the import with example.csv and it works.

But if I press export nothing happens, i get a blank screen. I tried with selecting a file (in case this was needed) and then press Export, I get again blank screen. Why is that?

In the component page, I get only a text field to select file and the import/export button. is this normal?

Thanks

Please Log in or Create an account to join the conversation.

More
14 years 4 months ago #83339 by Thanos
Replied by Thanos on topic K2 CSV import tool
About my last post above. I turned error reporting to maximum and here's the error I get

 

Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 5918721 bytes) in /Applications/MAMP/htdocs/xxxxxxx/administrator/components/com_k2import/views/export/tmpl/default.php on line 111

Please Log in or Create an account to join the conversation.

  • Artur Neumann
  • Artur Neumann's Avatar Topic Author
  • Offline
  • Senior Member
More
14 years 4 months ago #83340 by Artur Neumann
Replied by Artur Neumann on topic K2 CSV import tool
The component page you describe is  100% OK.

And at the moment there is no selective sync, all items from K2 are exported.

Your only problem seems to be to less allowed memory for a big export.

 

If you have the possiblity to access your php.ini you can change the line that looks like this:

memory_limit = 32M

try to set it e.g to 64M

 

If you don't have access to the php.ini edit the file administrator/components/com_k2import/k2import.php and insert this line in the function export() about line 555

 

ini_set('memory_limit', '32M');

Please Log in or Create an account to join the conversation.

More
14 years 4 months ago #83341 by shani
Replied by shani on topic K2 CSV import tool
Hello Artur,

I'm wonder if it possible, through your tool, to import data to certain extra field (not item):

I just want to make Countries field with all the Countries in the world, and there is no way I would go country by country manually (and then state by state..)

I want to import form my CSV all the data (in this case Countries..)

 

Thanks.

Please Log in or Create an account to join the conversation.

  • Artur Neumann
  • Artur Neumann's Avatar Topic Author
  • Offline
  • Senior Member
More
14 years 4 months ago #83342 by Artur Neumann
Replied by Artur Neumann on topic K2 CSV import tool
Hi shani,

this is not possible at the moment.

But if this is just a one-time job I could write a small script that generates a SQL statement from the CSV.

Please write a short email and then I could tell you how much it would cost.

Please Log in or Create an account to join the conversation.

  • Artur Neumann
  • Artur Neumann's Avatar Topic Author
  • Offline
  • Senior Member
More
14 years 4 months ago #83343 by Artur Neumann
Replied by Artur Neumann on topic K2 CSV import tool
At the moment I'm working on an export from Wordpress and import to K2. Of course I do the import with my Import tool. Because I needed some more features for this job I implemented them. The actual beta has till now three new features:
support for the trash fieldyou can import items that are set automatically to "trashed" - I'm sure there are just very few people who need that :-)
support for user comments
automatically association of fieldsif the columns in the CSV and the fields has the same name they are associated automatically. e.g. name your columns in the CSV.e.g. "Title","Introtext","Fulltext","Tags","Published","Created","User ID","Meta Description","Meta Keywords","Trash","Comments","Image","Image caption","Image credits","Images for the Gallery","Attachment0","Attachment title0","Attachment1","Attachment title1"

If you buy the actual stable the beta is included: K2 Import / Export Tool

P.S. I included a update-support on my site. For every EUR you pay you can download updates for 10 days. So if you pay e.g. 3EUR you can download every update for one month.

Please Log in or Create an account to join the conversation.

More
14 years 3 months ago #83344 by odeh.quraan
Replied by odeh.quraan on topic K2 CSV import tool
Hi Artus,

I purchased this tool, I installed it, when I import i get everything successful. But when I check in K2 items there is no changes, I tested it heavily for more than 10 hours, on localhost and on live server.

I exported the k2 items, change the csv file and re-uploaded it and nothing changes.

I notice that when I export, the csv file that i get does not have a column for "Image" path!! Also I expoted the k2_items table from PhpMyAdmin as a csv and also there is no "Image" field!! Is this the normal case or I do have problems with my installation??

I use Joomla 1.5.22 with K2 2.4.1.

Please help

Thanks

Please Log in or Create an account to join the conversation.

  • Artur Neumann
  • Artur Neumann's Avatar Topic Author
  • Offline
  • Senior Member
More
14 years 3 months ago #83345 by Artur Neumann
Replied by Artur Neumann on topic K2 CSV import tool
Hi,

what version of the import tool do you use? Please try the actual 0.7_beta2 www.individual-it.net/en/Joomla/#27

You should be able to download it for free with the link you got after payment.

 

And did you check the "overwrite" box when trying to import again? The overwrite function overwrites existing items with the items from CSV which have the same name

 

odeh.quraan said:

Hi Artus,
I purchased this tool, I installed it, when I import i get everything successful. But when I check in K2 items there is no changes, I tested it heavily for more than 10 hours, on localhost and on live server.

I exported the k2 items, change the csv file and re-uploaded it and nothing changes.

I notice that when I export, the csv file that i get does not have a column for "Image" path!! Also I expoted the k2_items table from PhpMyAdmin as a csv and also there is no "Image" field!! Is this the normal case or I do have problems with my installation??

I use Joomla 1.5.22 with K2 2.4.1.

Please help

Thanks

Please Log in or Create an account to join the conversation.

More
14 years 3 months ago #83346 by odeh.quraan
Replied by odeh.quraan on topic K2 CSV import tool
Hi Artur,

 

Thanks for the quick reply.

 

I was using version 0.6a stable.

I installed version 0.7_beta2, after I upload the csv file, i follow the steps, when i get to this step "

importing items, please stand by"
I get "Error" and nothing is added to the items!

 

 

 

Artur Neumann said:

Hi,

what version of the import tool do you use? Please try the actual 0.7_beta2 www.individual-it.net/en/Joomla/#27

You should be able to download it for free with the link you got after payment.

 

And did you check the "overwrite" box when trying to import again? The overwrite function overwrites existing items with the items from CSV which have the same name

 

odeh.quraan said:

Hi Artus, I purchased this tool, I installed it, when I import i get everything successful. But when I check in K2 items there is no changes, I tested it heavily for more than 10 hours, on localhost and on live server.

I exported the k2 items, change the csv file and re-uploaded it and nothing changes.

I notice that when I export, the csv file that i get does not have a column for "Image" path!! Also I expoted the k2_items table from PhpMyAdmin as a csv and also there is no "Image" field!! Is this the normal case or I do have problems with my installation??

I use Joomla 1.5.22 with K2 2.4.1.

Please help

Thanks

Please Log in or Create an account to join the conversation.

  • Artur Neumann
  • Artur Neumann's Avatar Topic Author
  • Offline
  • Senior Member
More
14 years 3 months ago #83347 by Artur Neumann
Replied by Artur Neumann on topic K2 CSV import tool
Could you provide me an admin access to your joomla instance, so I could debug on your server?

Send me an mail via my contact formular

Please backup everything before.

Please Log in or Create an account to join the conversation.

More
14 years 3 months ago #83348 by odeh.quraan
Replied by odeh.quraan on topic K2 CSV import tool
Artus, I sent u an email.


Artur Neumann said:

Could you provide me an admin access to your joomla instance, so I could debug on your server?

Send me an mail via my contact formular

Please backup everything before.

Please Log in or Create an account to join the conversation.

  • Artur Neumann
  • Artur Neumann's Avatar Topic Author
  • Offline
  • Senior Member
More
14 years 3 months ago #83349 by Artur Neumann
Replied by Artur Neumann on topic K2 CSV import tool
I installed you the new version I just finished today (0.7 beta3) and now it seams to work.


Export the items
make changes
import them with the options:


Main Category -> Take from CSV
recognize that the category alreadyexists regardless of the level -> checked
Overwrite existing Items (based on Title) -> checked
the rest you can leave like it is

with this options the import and the overwriting should work for you.

 

Please Log in or Create an account to join the conversation.

More
14 years 3 months ago #83350 by odeh.quraan
Replied by odeh.quraan on topic K2 CSV import tool
Dear Artur,

I followed your steps, everything works fine, I even get this message


importing items, please stand byitems were successful importedRow: undefined / memory peak: 4 MBImport finished


BUT, when I go check my K2 Items, nothing is imported!!!

 

AND another issue, when I export the items, the csv file has no "image" column, where should I put the image path for the item image??

 

Thanks for your support

Artur Neumann said:

I installed you the new version I just finished today (0.7 beta3) and now it seams to work.


Export the items
make changes
import them with the options:


Main Category -> Take from CSV
recognize that the category alreadyexists regardless of the level -> checked
Overwrite existing Items (based on Title) -> checked
the rest you can leave like it is

with this options the import and the overwriting should work for you.

 

Please Log in or Create an account to join the conversation.

  • Artur Neumann
  • Artur Neumann's Avatar Topic Author
  • Offline
  • Senior Member
More
14 years 3 months ago #83351 by Artur Neumann
Replied by Artur Neumann on topic K2 CSV import tool
Hi,

here is a video about how I did it and how it works: dl.dropbox.com/u/657969/export_import_alexandria.ogv

 

The export of the images don't work. Thats because of the way K2 stores the images.

But you can import images. Just make a new column and put there the path of the image for the item. e.g. images/stories/pastarchives.jpg

 

Please Log in or Create an account to join the conversation.

More
14 years 3 months ago #83352 by Next Wave, Inc.
Replied by Next Wave, Inc. on topic K2 CSV import tool
0.7b3 chokes (truncates the data in the field) when the content contains apostrophes.

Can this be fixed?  Replacing then re-replacing after import seems like a pain.

Thanks!

Please Log in or Create an account to join the conversation.

More
14 years 3 months ago #83353 by odeh.quraan
Replied by odeh.quraan on topic K2 CSV import tool
Thanks a lot Artus, You've been very helpful

Artur Neumann said:
Hi,

here is a video about how I did it and how it works: dl.dropbox.com/u/657969/export_import_alexandria.ogv

 

The export of the images don't work. Thats because of the way K2 stores the images.

But you can import images. Just make a new column and put there the path of the image for the item. e.g. images/stories/pastarchives.jpg

 

Please Log in or Create an account to join the conversation.

  • Artur Neumann
  • Artur Neumann's Avatar Topic Author
  • Offline
  • Senior Member
More
14 years 3 months ago #83354 by Artur Neumann
Replied by Artur Neumann on topic K2 CSV import tool
Could you please send me you CSV file.

What exact is the problem with the re-replacing?

Ken Lyle said:

0.7b3 chokes (truncates the data in the field) when the content contains apostrophes.

Can this be fixed?  Replacing then re-replacing after import seems like a pain.

Thanks!

Please Log in or Create an account to join the conversation.

More
14 years 3 months ago #83355 by Next Wave, Inc.
Replied by Next Wave, Inc. on topic K2 CSV import tool
I am emailing the file.

It seems that in a CSV, with " and , as the delimiters, that apostrophe should not be a delimiter.

In this case, I had only 5 records, but on a bigger file, it would be a serious problem.

Two records had this issue, and the simplest solution was to cut and paste the content into them manually.

These were were book titles like "A Parent's Guide", and things like that.

The re-replacing is problematic, because the apostrophe could be in any field, and then you need to do maybe a separate import process or something, then some query, to say, if the field contains an apostrophe, get the data from this other table, and replace?

Sorry for the trouble.  I am just reporting.  I had a few hundred records in 5 or 6 tables so far, and only two with this issue, so it's not critical for me, but maybe for somone, it will make the difference between a usable and non-usable import.

Please Log in or Create an account to join the conversation.

  • Artur Neumann
  • Artur Neumann's Avatar Topic Author
  • Offline
  • Senior Member
More
14 years 3 months ago #83356 by Artur Neumann
Replied by Artur Neumann on topic K2 CSV import tool
Hi,

the problem was because of the encoding. I just send you the file back with UTF8 encoding. You should always use UTF8, everything else is b******t (sorry but as programmer I had so often problems because of the encoding, and lost so many hours of my life with this kind of stuff).

Of course you can try to change the charset with the iconv() function in the first screen. But no guarantee that this will work. Just save the file as UTF8 and use UTF8 in the database and you should be happy :-)

 

I hope this helps you.

P.S. thank you for reporting.

 

 

Please Log in or Create an account to join the conversation.

More
14 years 3 months ago #83357 by Next Wave, Inc.
Replied by Next Wave, Inc. on topic K2 CSV import tool
Thanks very much for that education.  I have to confess that I am writing this file out using a Microsoft tool, so will have to be more careful in the details.  Above and beyond support, sir, and much appreciated.

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum