Build pages by importing CSV?

Hi folks!
I have to create pages for aprox 500 books (coverpic, title, author, publishing house, year, town, infolink) below a special point in our site. In the past, we built the pages by using a template and a design. But we built just three our four a day - since a couple of years.
Now we need to rebuild ALL thoose pages in one step.
I found that tool to create a bulk of pages by a textlist, but I cannot add any attributes into them. Can anybody help me?


View Replies:
AndyJ replied on at Permalink Reply
Hi Mathias,
are these entirely new listings/pages or are you copying from one site to another? Or upgrading from 5.6 to 5.7 etc?

What version of Concrete5 are you using?
MrKDilkington replied on at Permalink Reply
Hi MathiasB,

Community member hissy has created several packages that I believe are related to what you are trying to do. One package converts CSV into the concrete5-cif XML format. The other add-on imports the concrete5-cif XML data into your concrete5 5.7 site.

I believe the packages may require some customization to meet your needs though. Do you have any programming experience? If not, are you looking for a developer referral?

CIF Importer

CSV to XML Converter Add-On for concrete5
Ta2Ta2 replied on at Permalink Reply
Actually I installed the CSV to XML package into my and it broke the whole website. Now, I'm getting the below error and can't access the website.

An unexpected error occurred.
Concrete\Package\CsvXmlConverter\Controller::registerAutoload(): Failed opening required '/home/anbk/public_html/packages/csv_xml_converter/vendor/autoload.php' (include_path='/home/anbk/public_html/concrete/vendor:.:/usr/lib/php:/usr/local/lib/php')

Please help me bringing back my website to live!
Ta2Ta2 replied on at Permalink Reply

I actually managed to solve the above issue by changing the following line in the package controller.php file.

require_once(__DIR__ . '/vendor/autoload.php');

require_once(__DIR__ . '/../../concrete/vendor/autoload.php');

Then it worked well and I managed to upload the csv file. Now, when I clicked on convert, I got the below error:

Class 'parseCSV' not found

Any idea?
MathiasB replied on at Permalink Reply
Dear Ta2Ta2!
I'm afraid, I am not able to help you, because I didn't use the recommended tools until today. Maybe your host-company offers a backup-service, that can recreate the complete website. I will setup a brand new system to try out the packs.

Best wishes
Ta2Ta2 replied on at Permalink Reply
Thanks Mathias, I managed to bring the website back online. phew!

I don't recommend you to rely on the csv to xml converter.. it's buggy.

I will keep you posted, if I managed to figure out.
burbleweb replied on at Permalink Reply
Just to say I am interested in this as potnetially need to index 400+ exployees in a list and adding each as a page and creatig a searchable list seems the neatest C5 solution. Do let me know what you manage
Ta2Ta2 replied on at Permalink Reply
I didn't use this package at the end as it broke my website...
MathiasB replied on at Permalink Reply
Dear Ta2Ta2,
I also decided not to use that package. I will insert a external mysql database. That works fine and it is pretty easy to put the PHP-Code into a C5 theme.

In the beginning C5 was very nice for me, but meanwhile I spotted several insufficiencies, which cannot be removed without a huge assignment of time. The impossibility of the import of several items in one step, will remain to be the major problem of C5.

Or could it be a solution to abuse/modify a C5-shop-system?

Best Mathias
burbleweb replied on at Permalink Reply
I had a go at this and had excatly the same problems as you. I wonder if the paths in the main file are not all wrong of if someone who grasps this stuff in the dev team might have an insight as the actual code is one fairly brief php file. I pasted below for ease on the hope someone might be able to take a look.


PS this is from

namespace  Concrete\Package\CsvXmlConverter\Controller\SinglePage\Dashboard\System\Backup;
use Core;
use File;
use Concrete\Core\File\Importer as FileImporter;
use Concrete\Block\Content\Controller as ContentBlockController;
class CsvXml extends \Concrete\Core\Page\Controller\DashboardPageController {
    const PREFIX_PAGE   = 'page_';
    const PREFIX_ATTR   = 'attr_';
    const PREFIX_FILE   = 'file_';
    const PREFIX_SELECT = 'select_';
    const PREFIX_BLOCK  = 'block_';
    public function convert() {
        if ($this->token->validate("convert")) {
            $valn = Core::make('helper/validation/numbers');