Migration

Before starting to migrate, make sure that table #__spupgrade_log is empty. After you have migrated some data, do not remove any entries, as they tell SP Upgrade when to transfer new entries.

Users

  1. Make sure the first user id (Super User) of the new site is identical to the one of the old site. See Prepare for migration.
  2. Select “Users → Users” in SPupgrade and select “Transfer”.
  3. User Groups will not be assigned during or after the transfer automatically, you must take care of this after the transfer.
  4. Within the core, go to Users → Manage, then click on every user's name, select tab “Assigned User Groups”, and check the group.
  5. Within Bethico League, go to Members, and assign the user's group under column “Permissions”. This is much faster, as you can assign permissions for several users in one form.

Articles

  1. Create categories in new site first
  2. Select “Content → Articles” in SPupgrade and select “Transfer”. Do not migrate sections and categories.
  3. Open mysql on the command line, select the old site db
    mysql --user=user --password
    use db
  4. Run the following query and copy the result into the brackets of the IN-statement of the query to be run on the new site db (through phpMyAdmin)
    SELECT GROUP_CONCAT(id) FROM btc_content where catid=1 group by catid
    UPDATE btc_content SET catid=11 WHERE id IN ()
  5. catid's must correspond as per the table below
  6. Repeat for all categories
  7. Run the UPDATE query for all remaining catid's which are equivalent to “uncategorised”
  8. Go to the Category manager, Select all categories and click the rebuild button.
  9. Open all categories and save them, this will insert the appropriate assets tables associations for all categories.

Categories

Category Joomla 1.5 Joomla 3.9
News 1 10
Announcements 2 11
Info 3 12
Meeting 4 13
Hall of fame 6 14
About 7 15
Home - 16
Uncategorized - 2
  1. Choose the Menu Item which contains the Featured Articles. Go to the “Layout” Tab.
  2. In item “Article Order”, select entry “Featured Articles Order”.
  3. In item “Category Order”, select entry “No Order”.

Change the Order of Featured Articles

Forum

We migrate CCB Forum to Kunena Forum. CCB was not very popular, there exist no migration tools, however I found that the people who developed Kunena must have taken CCB as a basis for the development. Too many field names and structure are identical, so the task is doable without developing a complicated migration tool.

Prepare categories

  1. Table #__ccb_forums is equivalent to #__kunena_categories.
  2. Set up Kunena forum in the new site with all desired sections and categories. Take a note on the category ids.

Migrate topics

  1. Copy table #__ccb_topics to #__ccb_topics_migrate
  2. Update all old forum ids with the new category ids for Kunena
    UPDATE #__ccb_topics_migrate SET forum_id=new WHERE forum_id=old
  3. Dump the table
  4. Modify the INSERT INTO statement from the first line to the second line below
    INSERT INTO `#__ccb_topics` (`id`, `forum_id`, `post_subject`, `reply_count`, `hits`, `post_time`, `post_user`, `last_post_time`, `last_post_id`, `last_post_user`, `start_post_id`, `topic_type`, `locked`, `topic_email`, `hold`, `topic_emoticon`, `post_username`, `last_post_username`, `topic_favourite`) VALUES
    INSERT INTO `#__kunena_topics` (`id`, `category_id`, `subject`, `posts`, `hits`, `first_post_time`, `first_post_userid`, `last_post_time`, `last_post_id`, `last_post_userid`, `first_post_id`, `first_post_message`, `locked`, `last_post_message`, `hold`, `icon_id`, `first_post_guest_name`, `last_post_guest_name`, `params`) VALUES
  5. Import the resulting file into #__kunena_topics
  6. Delete the dummy field contents. They were needed to copy fields from CCB which are not used in Kunena.
    UPDATE `#__kunena_topics` SET first_post_message=``
    UPDATE `#__kunena_topics` SET last_post_message=``
    UPDATE `#__kunena_topics` SET params=``

Migrate posts

  1. Copy table #__ccb_posts to #__ccb_posts_messages and #__ccb_posts_messages_text
  2. Update all old forum ids with the new category ids for Kunena
    UPDATE #__ccb_posts_messages SET forum_id=new WHERE forum_id=old
  3. Remove column post_text from #__ccb_posts_messages, then export the table
  4. Remove all columns but id and post_text from #__ccb_posts_messages_text, then export the table
  5. Modify the INSERT INTO statement from the first line to the second line below
    INSERT INTO `ipl_ccb_posts_messages` (`id`, `topic_id`, `forum_id`, `post_subject`, `post_user`, `post_time`, `ip`, `hold`, `modified_by`, `modified_time`, `modified_reason`, `post_username`) VALUES
    INSERT INTO `ipl_kunena_messages` (`id`, `thread`, `catid`, `subject`, `userid`, `time`, `ip`, `hold`, `modified_by`, `modified_time`, `modified_reason`, `name`) VALUES
  6. Import the resulting file into #__kunena_messages
  7. Modify the INSERT INTO statement from the first line to the second line below
    INSERT INTO `ipl_ccb_posts_migrate_text` (`id`, `post_text`) VALUES
    INSERT INTO `ipl_kunena_messages_text` (`mesid`, `message`) VALUES
  8. Replace all \r\n: Replace \\r\\n with \r\n. Finally, select search mode Extended (\r, \n, \t, \x…, \0) and click “Replace All”.
  9. Sanitize all <tr …> with Regex: Replace (?<=<tr).*?(?=>) with “”
  10. Sanitize all <span …> with Regex: Replace (?<=<span).*?(?=>) with “”
  11. Sanitize all <table …> with Regex: Replace (?<=<table).*?(?=>) with “”
  12. Sanitize all <p …> with Regex: Replace (?<=<p).*?(?=>) with “”
  13. Sanitize all <th …> with Regex: Replace (?<=<th).*?(?=>) with “”
  14. Sanitize all <td …> with Regex: Replace (?<=<td).*?(?=>) with “”
  15. Sanitize all <font …> with Regex: Replace (?<=<font).*?(?=>) with “”
  16. Sanitize all <br …> with Regex: Replace (?<=<br).*?(?=>) with “”
  17. Replace all tags, including <tr>, <th>, <td>, <b>, <i>, <u>, <sup>, <sub>, <br>, <strong> (with [b]), and their respective closing tag, with their equivalent in square brackets, eg. [tr] and [/tr]
  18. Remove unused tags, including <p>, <em>, <h1>, <h2>, <h3>, <h4>, <h5>, <h6>
  19. Replace all html entities, including &gt; &nbsp; &amp;
  20. Search for all remaining < and manually replace those
  21. Import the resulting file into #__kunena_messages_text

Update stats

  1. Query table #__kunena_topics and find the number of topics per category
  2. Find the latest post in #__kunena_messages and take a note of id, thread, and time
  3. Update #__kunena_categories and set numTopics=“number of topics per category”, last_topic_id=“thread”, last_post_id=“id” (from #__kunena_messages), last_post_time=“time”

Attachments

Bethico Component

To migrate the betico league tables, export them according to the table below from the old db, then import into the new db. Not all tables need to be transferred, and some tables require column name modification.

table name 1.5 table name 3.9 modifications multi-league
unified ratings
multi-league
separate ratings
ipl_ipl_access deprecated
ipl_ipl_arbitrary btc_bethico_arbitrary
ipl_ipl_bar btc_bethico_bar view view
ipl_ipl_brackets btc_bethico_brackets
new btc_bethico_calc_config
new btc_bethico_calc_points
ipl_ipl_comment btc_bethico_comment
ipl_ipl_config btc_bethico_config dart_league → league
file_suffix → league_code
new btc_bethico_config_time
ipl_ipl_contactus btc_bethico_contactus
ipl_ipl_date btc_bethico_date view view
ipl_ipl_division btc_bethico_division
new btc_bethico_fees
new btc_bethico_function
ipl_ipl_forum deprecated
ipl_ipl_game btc_bethico_game view
ipl_ipl_league btc_bethico_league
ipl_ipl_map btc_bethico_map view view
ipl_ipl_marks btc_bethico_marks
ipl_ipl_match btc_bethico_match view
ipl_ipl_menu deprecated
ipl_ipl_olddb_player btc_bethico_olddb_player
ipl_ipl_olddb_team btc_bethico_olddb_team
ipl_ipl_player btc_bethico_player new: function_id view view
ipl_ipl_player_game btc_bethico_player_game view
ipl_ipl_player_team_season btc_bethico_player_team_season
ipl_ipl_playoff btc_bethico_playoff
ipl_ipl_season btc_bethico_season view view
ipl_ipl_site btc_bethico_site view
ipl_ipl_team btc_bethico_team
ipl_ipl_team_season btc_bethico_team_season new: captain_id
ipl_ipl_tournament btc_bethico_tournament view
ipl_session ipl_session view view
ipl_users ipl_users view view
ipl_stats_agents ipl_usergroups view view
ipl_core_acl_aro ipl_user_notes view view
ipl_core_acl_aro_groups ipl_user_profiles view view
ipl_core_acl_aro_map ipl_user_usergroup_map view view
ipl_core_acl_aro_sections ipl_viewlevels view view
ipl_core_acl_groups_aro_map view view

Trouble Shooting