We previously wrote about converting a Discussions Forum to Kunena and it was now time to revisit the topic as we prepared to perform the task again and this time make the final step to make it live on our site. Since then the Kunena version has moved on to 3.0.3 so we were expecting a few changes.
We must also take the opportunity to state that our Discussions forum did not make use of images/attachments, hence it was not necessary to consider these in the migration. There was also a know opportunity with the Discussions component in that although new user were synchronised between Joomla and the component, when users were removed from teh system for any reason, their details remained within the component. It was thus necessary to run an additional SQL script to clean out these old entries.
The installation of Kunena 2.0.4 and the Importer worked fine, as did the import of the Discussions items (posts and categories). Unfortunately the ‘live update’ to version Kunena 3.0.3 gave us a blank screen, so we resorted to the standard update mechanism which worked fine. (Perhaps the live update implementation needs some work?)
Then we started running our SQL scripts (See previous post for details, which are didn’t require any changes):
- Create the view.
- Updated the topics table. We observed the message ‘1364: Field 'params' doesn't have a default value’.
- Update categories number of topics count. We saw a number of messages ‘1048: Column 'numTopics' cannot be null’.
- Update the last_topic_id, last_post_id and last_post_time fields. Again we saw a number of ‘1048:Column xxxxx cannot be null’ messages. We were not too worried about these messages as they reflect the empty categories in our original Discussions source tables.
- We then updated the category hits.
- We then recalculated the statistics within the Kunena Forum Tools.
- As mentioned above, we run an additional script to remove 'old' users from our Kunena users table.
delete from #__kunena_users
where userid NOT IN (select id from #__users);
Note: There are several fields such as the number of views of a topic etc. which are not populated because this information is not retained by our source forum and we could not begin to guess what might be appropriate, so better to leave them empty. They will populate themselves over time and we are not too interested in how many people had read them.Now we can either start configuring the component on our development site, or we can export our tables ready for loading into our live site and after loading configure the forum there. We decided upon the later option.
Inspecting the database tables if was apparent that a number of the tables were empty (since this was effectively a new forum installation) so only a small number needed to be exported and imported on our live site. The list of tables was as follows:
#__kunena_aliases, #__kunena_categories, #_kunena_configuration, #__kunena_messages, #__kunena_messages_text, #__kunena_topics, #__kunena_user_topics, #__kunena_users, #_kunena_version
On our target (live) site we only need to install the latest Kunena version (3.0.3) and import the data we exported above.
We now disable the use of sh404SEF for the Kunena forum. Basically we have found it more trouble than it is worth, and the Forum entries are fine without the need to use the SEF translations in sh404SEF.
We now enable the Forum menu item, which is the menu link to the Kunena menu item, and after clearing out system cache, we are ready to see how it is looking.
Looking at the front end of the site we can enter our forum and see our posts etc., so all is basically sound.
The next step is to install an anti spam component for the Forum. We have chosen R-Antispam v1.3.0 by Ratmil, which uses a Bayesian algorithm to determine whether the message is spam or not. Being Bayesian it learns over time and becomes more accurate the longer it is used.
Our configuration included adding spam check API keys, changing the default Kunena menu tab, etc. We also had to change our category headers slightly since Kunena didn’t like html in the category description.
Once done we made the new ‘forum’ available to users and disabled the ‘old’ forum. Note the ‘disabled’ since we will monitor it over a few days/weeks before we finally ditch it altogether.
Addendum: Have to also change the SEF entries that refer to the 'old' forum entries to redirect to the new forun equivalent. Also search out 'smart search/finder' entries as well. Note that Kunena does not currently install a 'smart search' plugin even though it is present in the installation file. See Kunena web site forum for the rationale for this.