Search

A new extension, “Import/export CSV” is now available for download. Comments and feedback can be left here but if you discover any issues, please post it on the issue tracker.

I tried the export functionality today and noticed that Selectbox Link fields always have an empty value for all the entries. Is this a limitation of the implementation or something that could be added easily?

This is because the export looks for a field called value in the database. I believe the Selectbox Link field stores the related ID. Therefore it stores nothing.

Exporting the ID has no sense, because if you import it into a blank section, new ID’s will be generated. To export the value of the Selectbox Link field, you might have to edit the code some.

Thanks, kanduvisla. Good to know.

I’ve got this error:

Field ‘author_id’ doesn’t have a default value An error occurred while attempting to execute the following query

* INSERT INTO `sym_entries` (`section_id`, `creation_date`, `creation_date_gmt`) VALUES ('43', '2010-11-08T15:22:42-02:00', '2010-11-08T17:22:42+00:00')

Does anyone knows how to solve it?

Thanks!

@joaobarbosa That is a Symphony related issue. You can solve it by setting the default value of author_id to 0 on database.

Thanks @rainerborene, your tip solved the problem in the author field…

But now, I’m having another trouble, with the date format:

Incorrect datetime value: ‘2010-11-10T15:16:48-02:00’ for column ‘creation_date’ at row 1

INSERT INTO `sym_entries` (`section_id`, `creation_date`, `creation_date_gmt`) VALUES ('43', '2010-11-10T15:16:48-02:00', '2010-11-10T17:16:48+00:00')

Can anyone explain me why is it happening and how to solve it?

Thanks a lot!

I’m not sure. It looks like something goes wrong with storing the entry. This is not handled by the extension, since it uses the default commit()-function of an entry object.

Import/export CSV updated to version 0.1.1 on 16th of December 2010

  • Added basic support for file upload fields

I wanted to use this extension to get the usernames ( emails ) of my members from the members extension. ( I‘ve used Nick Dunns commit to make username = email address ).

And did the following if it helps anyone ( still returns blank for timezone and role but could be amended I guess ):

Line 334 - content/content.index.php

                    } elseif(isset($data['username'])) {
                    $line[] = '"'.str_replace('"', '""', $data['username']).'"';

For Export “Select Box” field values you must change:

content.index.php:
...
338 if(isset($data['value'])) {
if(is_array($data['value'])) {
$value = implode(', ', $data['value']);
} else {
$value = $data['value'];
};
// Delete line-endings:
...

And Import “Select Box”:

content.index.php:
224 } elseif($field->get('type') == 'select') {
  $data = $field->processRawFieldData(explode(', ', $value), $field->__OK__);
  $entry->setData($associatedFieldID, $data);
}
$value = implode(', ', $data['value']);

In implode “glue” parameter must be with space after “,”

Import/export CSV updated to version 0.1.2 on 4th of January 2011

  • Implementend other CSV parser, because the built-in PHP CSV Parser caused errors with line breaks

@kanduvisla - Great extension. Just used it for the first time this morning. Wonderful work. Thank you so much for posting this extension.

This extension is amazing! Can be useful in any project.

I also use it all the time. I send my client an Excel-sheet, tell em to fill it, and when it gets back, save it as CSV and kaboom baby!

A couple of days ago I used this wonderful extension to migrate some content, but all the line-shifts were lost. Anyone else encountered this problem?

Import/export CSV updated to version 0.1.3 on 8th of February 2011

  • Implemented update-functionality

@kanduvisla - Will this extension work with Symphony 2.2?

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details