Migrating from Joomla 1.5 to Joomla 2.5

Introduction
1. Transferring content
2. Transferring extensions:
  2.1. jDownloads and jComments
  2.2. Template, editor, and other extensions
Epilogue


Upd: Русская версия статьи: Миграция с Joomla 1.5 на Joomla 2.5. Ч.2-1. Перенос jDownloads и jComments.


In the first part we have hard, but worthy moved our menus, categories, articles and other content to the new site with preserving the structure. We now consider how to restore the customary set of extensions. Let's start with a separate examination of two very popular components. jDownloads and jComments are considered nearly the best each in its own sphere of application, a great many of Joomla users take advantage of them. In addition, both are free and have been translated into many languages. There is an obvious desire to transfer the entire set of comments and downloads to the new site. Detailed review of reliable and proven methods of migration jDownloads and jComments from Joomla 1.5 to Joomla 2.5 is the goal of this article.

It wouldn't be a bad idea to remind once more about the necessity of backing up your site before starting the steps below! And, again, read the introduction first!

jDownloads

Everything is good here. The developers have taken care to provide their component with the option to backup and restore its data. At the official site in the FAQ section there is a tab How to move jDownloads from Joomla 1.5 to Joomla 2.5? describing the requirements for migration of the extension and the process itself. It comes to the following sequence of actions:

  • At the old site update component to the latest stable version (in description - 1.8.2, but there is already 1.8.3). In the component's control panel create backup file (Backup Creation).
  • At the new site install the latest release of jDownloads for Joomla 2.5 (as of this writing it is 1.9.1 Build 931), turn off auto-monitoring (Configuration > Monitoring > Download directory monitoring?).
  • Replace the files folder (JoomlaROOT/jdownloads) and the pictures folder (JoomlaROOT/images/jdownloads) with the same ones from the old site.
  • Then open a previously created backup file in Notepad++ and replace using Replace All all occurrences of the old prefix by the new one (in our example - jos_ by aaaaa_). Save the changes.
  • Go back to the new site and open Backup Restoration. (It's written there in red and white: You can only restore backup files from jDownloads 1.8.2 or newer! I nevertheless successfylly transferred this way 1.8.1 RC2 Build 832. But still it is probably better to first update to the latest release of the component in Jumla 1.5.) Load our customized back up file, click the button Restore the database right now.
  • After the process is successfully completed, carry custom changes, if they have been made on the old site - .css stylesheet, language files, user groups.
  • It is also recommended to check the date and time format in the component configuration, as in the new version it has been changed from php strftime() to date(). In other words, if format is %d.%m.%Y %H:%M:%S, and dates are displayed in the form of %25.%07.%2012 %14:%July:%th, then, after changing the format to, for example, Y-m-d H:i:s, date and time will be displayed in a suitable form - 2012-07-25 14:09:51. You can adjust it in the Configuration section> Downloads tab > Date-Time format parameter.

And it's all about moving the jDownloads component from Joomla 1.5 to Joomla 2.5. Let's proceed to the next extension.

jComments

Developers of the most popular component of comments did not include the transfer option. Fortunately, enthusiasts did it instead of them. The script for migrating jComments from Joomla 1.5 to Joomla 2.5 has been found in the Internet - over there. Here is the script (click on the title, and it will open).

Script

 
-- -------------------------------------------------------------------------------- 
 -- MIGRATION SCRIPT FOR JCOMMENTS IN JOOMLA v1.5.x TO JOOMLA v2.5.x 
 -- -------------------------------------------------------------------------------- 
 
 -- NOTE: Replace string "mydb_livecopy_j15" to your Joomla 1.5.x database name 
 -- -- -- (example: "anolddatabase") -- 9 occurrences 
 -- NOTE: Replace string "mydb_livecopy_j15.myprefix_" to your Joomla 1.5.x database name & table prefix 
 -- -- -- (example: "anolddatabase.jos_") -- 8 occurrences 
 
 -- NOTE: Replace string "mydb_upgrade_j25" to your Joomla 2.5.x database name 
 -- -- -- (example: "anewdatabase") -- 9 occurrences 
 -- NOTE: Replace string "mydb_upgrade_j25.myprefix_" to your Joomla 2.5.x database name & table prefix 
 -- -- -- (example: "anewdatabase.rndpfx1_") -- 8 occurrences 
 
 -- -------------------------------------------------------------------------------- 
 -- _jcomments 
 -- -------------------------------------------------------------------------------- 
 
 INSERT INTO 
      mydb_upgrade_j25.myprefix_jcomments 
      ( 
           id, parent, thread_id, path, level, object_id, object_group, object_params, lang, 
           userid, name, username, email, homepage, title, comment, ip, DATE, isgood, ispoor, 
           published, subscribe, SOURCE, source_id, checked_out, checked_out_time, editor 
      ) 
 SELECT 
      id, parent, 
      CASE WHEN SUBSTRING(path, LOCATE(',', path)+1, LOCATE(',', path, 2))='' THEN 0 
      ELSE SUBSTRING(path, LOCATE(',', path)+1, LOCATE(',', path, 2)) END AS thread_id, 
      path, level, object_id, object_group, object_params, lang, 
      userid, name, username, email, homepage, title, comment, ip, DATE, isgood, ispoor, 
      published, subscribe, SOURCE, source_id, checked_out, checked_out_time, editor 
 FROM 
      mydb_livecopy_j15.myprefix_jcomments; 
 
 
 -- -------------------------------------------------------------------------------- 
 -- _jcomments_custom_bbcodes 
 -- -------------------------------------------------------------------------------- 
 
 -- NOTE: This is disabled as the new version includes the old bbcodes setup (no change) 
 
 -- INSERT INTO 
 --      mydb_upgrade_j25.myprefix_jcomments_custom_bbcodes 
 --      ( 
 --           id, `name`, simple_pattern, simple_replacement_html, simple_replacement_text, pattern, 
 --           replacement_html, replacement_text, button_acl, button_open_tag, button_close_tag, 
 --           button_title, button_prompt, button_image, button_css, button_enabled, ordering, 
 --           published 
 --      ) 
 -- SELECT 
 --      id, `name`, simple_pattern, simple_replacement_html, simple_replacement_text, pattern, 
 --      replacement_html, replacement_text, button_acl, button_open_tag, button_close_tag, 
 --      button_title, button_prompt, button_image, button_css, button_enabled, ordering, 
 --      published 
 -- FROM 
 --      mydb_livecopy_j15.myprefix_jcomments_custom_bbcodes; 
 
 
 
 -- -------------------------------------------------------------------------------- 
 -- _jcomments_reports 
 -- -------------------------------------------------------------------------------- 
 
 INSERT INTO 
      mydb_upgrade_j25.myprefix_jcomments_reports 
      ( 
           id, commentid, userid, name, ip, DATE, reason, STATUS 
      ) 
 SELECT 
      id, commentid, userid, name, ip, DATE, reason, STATUS 
 FROM 
      mydb_livecopy_j15.myprefix_jcomments_reports; 
 
 
 -- -------------------------------------------------------------------------------- 
 -- _jcomments_settings -- ignored as this will load factory settings 
 -- -------------------------------------------------------------------------------- 
 /* 
 INSERT INTO 
      mydb_upgrade_j25.myprefix_jcomments_settings 
      ( 
           component, lang, name, value 
      ) 
 SELECT 
      component, lang, name, value 
 FROM 
      mydb_livecopy_j15.myprefix_jcomments_settings; 
 */ 
 
 -- -------------------------------------------------------------------------------- 
 -- _jcomments_subscriptions 
 -- -------------------------------------------------------------------------------- 
 
 INSERT INTO 
      mydb_upgrade_j25.myprefix_jcomments_subscriptions 
      ( 
           id, object_id, object_group, lang, userid, name, email, hash, published 
      ) 
 SELECT 
      id, object_id, object_group, lang, userid, name, email, hash, published 
 FROM 
      mydb_livecopy_j15.myprefix_jcomments_subscriptions; 
 
 
 -- source=??? 
 
 -- -------------------------------------------------------------------------------- 
 -- _jcomments_version 
 -- -------------------------------------------------------------------------------- 
 
 INSERT INTO 
      mydb_upgrade_j25.myprefix_jcomments_version 
      ( 
           version, previous, installed, updated 
      ) 
 SELECT 
      version, previous, installed, updated 
 FROM 
      mydb_livecopy_j15.myprefix_jcomments_version; 
 
 
 -- -------------------------------------------------------------------------------- 
 -- _jcomments_votes 
 -- -------------------------------------------------------------------------------- 
 
 INSERT INTO 
      mydb_upgrade_j25.myprefix_jcomments_votes 
      ( 
           id, commentid, userid, ip, DATE, VALUE 
      ) 
 SELECT 
      id, commentid, userid, ip, DATE, VALUE 
 FROM 
      mydb_livecopy_j15.myprefix_jcomments_votes; 
 
 
 
 
 -- -------------------------------------------------------------------------------- 
 -- _jcomments_objects  *** NEW FOR JOOMLA 2.5.X 
 -- -------------------------------------------------------------------------------- 
 

end faq

There are also a competent instructions for its use. I will try to outline them here in a little more detail and with a visualization.

  • Install the latest release of jComments (still 2.3.0) on a new site (in my case - Joomla 2.5.9).
  • Copy the script into a text file. You can save it with the extension .sql.
  • Open the file in Notepad++ and make 4 group replacements (again, using the same Replace all) of both old and new databases names and prefixes to our values. Open the panel with screenshots, all of them are very clear.

Screenshots

ogri.me | Migrating jСomments from Joomla 1.5 to Joomla 2.5 - 1

ogri.me | Migrating jСomments from Joomla 1.5 to Joomla 2.5 - 2

ogri.me | Migrating jСomments from Joomla 1.5 to Joomla 2.5 - 3

ogri.me | Migrating jСomments from Joomla 1.5 to Joomla 2.5 - 4

end faq

  • Now we go to a database manager (it did not yet invented better one than phpMyAdmin). There, not opening any database, go to the Import tab, select our SQL-file, and run the script contained therein.
  • After receiving message of a successful working off the script, get back to the new 2.5 site's admin, open the tab Comments of the component, and make sure that the list now contains comments from the old site.
  • Last steps: open the tab Settings. Since the script does not restore binding comments to the categories, rebuild manually the list Choose categories for JComments to work in as it was on the old site. Check other settings, and edit them if necessary.

This is how two powerful components with all data and files are cloned from the old site to the new one. In the next article we will discuss the transfer of template, editor, and the essential set of other third-party extensions.

Add comment


© 2011-2017 ogri.me
Use and reprint of the site materials are allowed and welcome. Direct indexable link to the used article or, at worst, to the site itself would be a good contribution to the author for his hard work.