How to export data from the CCK

Content Construction 
Kit for Joomla

Recently in our component became possible to import data from other sites that contain layouts CCK and today we will tell you how to properly export data for import into the CCK.

    Important: Before making export, make sure to back up the site and save the folders and database. Please first check export on test site!

  1. The first thing you need to do go to this path ({your site}/components /com_os_cck/files) and copy the folders "files" in which there are such folders "audio", "images", "track", "video" and the index.html file that are found in this folder. The copied folder "files" should be put in the folder "cck_import" that we created earlier.

  2. Content Construction 
Kit for Joomla
  3. Then folder "gallery" copied from the folder "images" which is located ({your site}/images). The copied folder "gallery" should be put in the folder "cck_import" that we created earlier.

  4. Content Construction 
Kit for Joomla
  5. After that, the “gallery” folder should be archived and left here along with the rest of the folders. The figure below shows the folders in which gallery.zip should be stored.

  6. Content Construction 
Kit for Joomla
  7. To do this, first search for the name in PhpMyAdmin your database (in our case it is called testcck) and then go to the Export tab and make the appropriate settings as shown in the picture. With the help of PhpMyAdmin export the tables whose name beginnings yourprefix _os_cck_ table name (in our case it is refedf4_os_cck_ content_entity_2 and further in the list all the tables that follow which contain os_cck). Yourprefix - this is a random set of characters, which has been set when installing Joomla in your case the name will be different but will contain "os_cck".
  8. Content Construction 
Kit for Joomla
  9. When you export tables, be sure to enable the "Add DROP TABLE / VIEW / PROCEDURE / FUNCTION / EVENT / TRIGGER statement" and click the Go button at the very bottom of the page in order to start the export.
  10. Content Construction 
Kit for Joomla
  11. After you click button Go and your database will be saved in the Downloads folder. Then copy the file with the extension .sql which appeared after unloading the database and rename "sqlcck.sql". Keeps your database in the "files" folder where you store all the other folders you created earlier.

  12. Content Construction 
Kit for Joomla
  13. Then go into the resulting file is name a sqlcck.sql and replace all "yourprefix_" (but in your case it will be called differently) to "#__" (pay special attention to the fact that in the first case, one lower underscore_, and the second two lower underscores __) and save the changes. Content Construction 
Kit for Joomla
  14. When at the end you make the archive of the folder "cck_import" you have to go into the folder itself to select all the folders and files and only then make the archive. You do not need to fully archive the folder "cck_import", because then when you import data, it can produce an error. As a result, you should get a the archive which will contain:

    • file "index.html"
    • folder "audio"
    • folder "images"
    • folder "track"
    • folder "video"
    • archive "gallery.zip"
    • file "sqlcck.sql"
    • Content Construction 
Kit for Joomla

What are you looking for?
Anti-spam question: How many eyes has a typical person?