Importing external data into Ez

Author Message

Alex Muñoz

Wednesday 04 May 2011 9:29:48 am

Hi,
Recently, I choosed ezPublish because it has a lot of interesting features with wich I make good projects, but I don't know how to start with a project that I have:
My goal is import mysql data (two tables with a lot of registers) into ezPublish in order to manage them in the ez backend, but I don't know how can I do this.
Could you tell how can I export external data into ezPublish data base and then manage them?
Thanks in advance

Jérôme Vieilledent

Wednesday 04 May 2011 9:47:56 am

Hi Alex and welcome to the eZ Publish community !

The first thing you need to do is to figure out how you will organize your content inside eZ Publish. In short, you need to organize your content tree, maybe by designing custom content classes.

Then, to import your existing data, you can use SQLIImport extension. Check out the extension documentation for more details. You will have to develop a source handler in PHP to handle your data. The easiest way to do so would be to export your MySQL tables in XML files that you can handle in your source handler. Of course, you could also directly connect to your existing database, but it could be trickier (but still possible).

Cheers !

Alex Muñoz

Thursday 05 May 2011 1:21:07 am

Great!!

With this info I can start my project

Thanks a lot!!

Alex Muñoz

Monday 16 May 2011 6:28:00 am

Hi again Jérôme,
I'm trying your extension with an own handler in XML like the example RSSImport but it doesn't work, I'm using the "Request a new immediate import" option but when I choose an import handler (Rss or the new XML) and click in 'Request a new inmediate import" nothing happens and the screen shows:

Import list

 

10 25 50

No imports

I configured my handler in sqlimport.ini.append.php and I created a new class similar than sqlirssimporthandler.php, I think something in the extension doesn't work and I don't know where can I see an error log.

Could you help me?

Thanks a lot

Jérôme Vieilledent

Monday 16 May 2011 6:40:41 am

Hi Alex

Do you have error in the debug output ?

Did you install the extension DB tables ?

Alex Muñoz

Monday 16 May 2011 6:59:16 am

Sorry but I don't know where can I found the output debug
I didnt know about these tables, I find an sql file in sql/mysql/schema.sql folder, I suppose there are the tables, it is correct?

I'm going to try it

Thanks

Jérôme Vieilledent

Monday 16 May 2011 7:11:27 am

Yes these are the tables (as mentioned in INSTALL.txt btw ;-)).

You can activate the debug output from site.ini.append.php, or directly from the right column in the admin interface (in the Quick Settings part)

Alex Muñoz

Monday 16 May 2011 9:12:35 am

I've installed the tables, it seems that works but, the import status is always Pending and 0% of progress.
The debug shows messages like start and end module sqliimport and missing translations 'Debug: ezpI18n::translateText', no errors, e.g.:
"Missing translation for message in context: 'extension/sqliimport/type'. The untranslated message is: 'Immediate'"
I translated your extension in spanish, but I don't know why it doesn't work, because my current language into the CMS is spanish and I didn't found any .ini where I can change the extension current lang.
if you want, I'll send you the translation when I know that it works fine

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.