×
Kunena 5.1.18 Released (30 Jun 2020)

The Kunena team has announce the arrival of Kunena 5.1.18 [K 5.1.18] which is now available for download as a native Joomla extension for J! 3.9.x. This version addresses most of the issues that were discovered in K 5.1 and issues discovered during the development stages of K 5.1.

× This is for users to help other users, to discuss topics that relate to migrating from other web-based forums and converting the data into a form that will operate with Kunena.

It is important to note that the Kunena team does not have a standard, recommended or supported protocol for these ideas and that posting questions in this category may not receive advice from team members.

Idea phpBB 3 to Kunena 3 Migration Script

More
5 years 4 months ago #41 by Marvin McDuck
I've been struggling the last weeks with a forum migration to Kunena as done by your/Binod's script:

The issue is that the Search function on the forums doesn't work! In a very peculiar way: The only words that give results, are those used in new messages (so inserted through the Kunena frontend, not via script/mysql) --- zero results are found if searching for other words.

And when searching for those freshly-used words, the new messages using them consistently come up, while there are always a few (but not all) of the old/inserted messages found that match... For example, I find 9 results for the word 'not' out of thousands of messages; more targeted/meaningful words give me at most 10-12matches.

Any idea why? Reading through the script, I don't see where there is some sort of Search-index updated; and if I take a database dump before+after adding a message through Kunena (not through mysql) and check the differences, nothing significant shows up. I'm thoroughly flummoxed by now!

Please Log in or Create an account to join the conversation.

More
5 years 4 months ago - 5 years 4 months ago #42 by binod
I have no idea why that is happening to you. Currently I am very occupied with my project MixERP, or I would have digged into it myself.

Moreover, if I were you, I would:

1. find how Kunena search feature works, how search queries are generated. Try to compare that against direct database query.
2. investigate if there is something wrong with existing MySQL installation.
3. give up everything and restore the database on a fresh new machine, just to make sure that there is nothing wrong with the current configuration.

Yes, the script doesn't do anything more than copying data from one database table to the other. Do let me know, if I can help you. Happy testing! ;)

Please follow my open source projects MixERP Project and phpBB to Kunena Migration Script on Github.
Last edit: 5 years 4 months ago by binod.

Please Log in or Create an account to join the conversation.

More
5 years 4 months ago #43 by Marvin McDuck
Thanks! Hm...

1. OK... You mean turn on debugging mode and see what happens, and look at the code of Kunena directly? Or something else/ some other tool?
2. I've been working on my desktop with MAMP; I can try it directly on my webserver (hidden); but it didn't work there when I exported a non-working version to it, so I have little hope. Also, the forum must be slotted into a fully-functioning website -- take snapshot of old forum, convert and slot in fast-fast minimizing downtime, then all up&running. So if I need to make a naked forum and then piecemeal fit in other content that would be very very bad.

3. I've started on a freshly-downloaded Joomla 3.3.x, with only a language pack, akeeba backup and kunena in there. OK, I can eliminate the language to see if it matters.

The only think I could come up with now is creation dates: The posts (and users) are all from years before the joomla 3.x creation date... would that matter? And what should I postdate if it does --- SuperUser creation time? But the matching results that I get seem to be of the last year, over a full year (so well before my Joomla creation time) but not more. Eh?

Please Log in or Create an account to join the conversation.

More
5 years 4 months ago - 5 years 4 months ago #44 by binod

1. OK... You mean turn on debugging mode and see what happens, and look at the code of Kunena directly? Or something else/ some other tool?


Right. Along with that, please find what is happening on this file:
/components/com_kunena/site/models/search.php

Here is the link to Kunena forum on GitHub

github.com/Kunena/Kunena-Forum/blob/deve...te/models/search.php

I am naturally interested in the function "buildWhere()":
protected function buildWhere() {
    $db = JFactory::getDBO ();
    $querystrings = array();
 
    foreach ( $this->getSearchWords() as $searchword ) {
        $searchword = $db->escape ( JString::trim ( $searchword ) );
        if (empty ( $searchword ))
            continue;
        $not = '';
        $operator = ' OR ';
 
        if ( substr($searchword, 0, 1) == '-' && strlen($searchword) > 1 ) {
            $not = 'NOT';
            $operator = 'AND';
            $searchword = JString::substr ( $searchword, 1 );
        }
 
        if (!$this->getState('query.titleonly')) {
            $querystrings [] = "(t.message {$not} LIKE '%{$searchword}%' {$operator} m.subject {$not} LIKE '%{$searchword}%')";
        } else {
            $querystrings [] = "(m.subject {$not} LIKE '%{$searchword}%')";
        }
    }
 
    //User searching
    $username = $this->getState('query.searchuser');
    if ($username) {
        if ($this->getState('query.exactname') == '1') {
            $querystrings [] = "m.name LIKE '" . $db->escape ( $username ) . "'";
        } else {
            $querystrings [] = "m.name LIKE '%" . $db->escape ( $username ) . "%'";
        }
    }
 
    $time = 0;
    switch ($this->getState('query.searchdate')) {
        case 'lastvisit' :
            $time = KunenaFactory::GetSession()->lasttime;
            break;
        case 'all' :
            break;
        case '1' :
        case '7' :
        case '14' :
        case '30' :
        case '90' :
        case '180' :
        case '365' :
            $time = time () - 86400 * intval ( $this->getState('query.searchdate') ); //24*3600
            break;
        default :
            $time = time () - 86400 * 365;
    }
 
    if ($time) {
        if ($this->getState('query.beforeafter') == 'after') {
            $querystrings [] = "m.time > '{$time}'";
        } else {
            $querystrings [] = "m.time <= '{$time}'";
        }
    }
 
    $topic_id = $this->getState('query.topic_id');
    if ( $topic_id ) {
        $querystrings [] = "m.id = '{$topic_id}'";
    }
 
    return implode ( ' AND ', $querystrings );
}

This makes me even more interested to see what $querystrings returns. I think that you are in the right direction.

Please follow my open source projects MixERP Project and phpBB to Kunena Migration Script on Github.
Last edit: 5 years 4 months ago by binod.

Please Log in or Create an account to join the conversation.

More
5 years 4 months ago #45 by Marvin McDuck
I will see if I can figure anything out. I've re-tried without even language packs or backup, and search fails.

I'm now giving it another shot now via mysql:

I had been using spreadsheets (ODS) to do everything, because I'm working from a forum that's not working with `topics', but has a `comments' table with 63 columns; and it contains many glitches [responses with datetime before their parent; responses with another forum than their parent; responses (as seen from RE:Title that occurs elsewhere) that claim to have no parent; responses with ID before their parent, a few hundred users numbered from 2 to 50K...]. Did I mention it's been re-encoded between UTF8 and Latin1 at least twice, and many different accented letters have been added on top of each other? And the message-markup is very different from bbCode...

So to check the sanity of it all, it's been easiest in a spreadsheet (e.g., on what columns to sort to have least number of inconsistencies to manually sort). It's 4spreadsheets where the largest is only 4000x10 (or less) fields and less than a MB, yet taking 2min to open and 6--8min to save and occasionally crashing (and always crashing Excel when converted to .xlsx). When making the 'topics' (by sorting the 'messages' table) it's necessary not to have the message-contents or the whole thing crashes etc...

So now I'm cobbling together mysql statements that do what your script could do straightforwardly (as phpbb and kunena have more or less same structure to store topics and posts).

Please Log in or Create an account to join the conversation.

More
5 years 4 months ago #46 by bulldogbear
Thank you very much for your script.

Even though I wasn't able to import the tables to my live web server, I was able to simply do table by table insert statements and was able to get all my phpbb3 info into kunena.

Thank you again for your help and the script!

Please Log in or Create an account to join the conversation.

More
5 years 4 months ago #47 by binod
I am glad that you have finally been able to solve your problem.

Please follow my open source projects MixERP Project and phpBB to Kunena Migration Script on Github.

Please Log in or Create an account to join the conversation.

More
5 years 4 months ago #48 by Marvin McDuck
Wait... Let me verify that I'm not being obtuse:

I. I'm populating 4 tables via phpmyadmin,
[1] jos_users (avoiding the SuperUser's ID),
[2] jos_kunena_messages,
[3] jos_kunena_messages_text, and
[4] jos_kunena_topics;
while [5] jos_kunena_categories I had already prepared from the Kunena backend.
II. Then just the Kunena Forumtools (a) synchronize jos_users to jos_kunena_users and (b) recount statistics populates the rest like jos_kunena_user_topics.

Don't tell me I'm overlooking something that the `recount statistics' doesn't do for me?

Please Log in or Create an account to join the conversation.

More
5 years 4 months ago - 5 years 4 months ago #49 by csporleder
Hello,

I used the script. had some issues and figured out so far everything.

BUT have problems with the attachments.
I have converted them all, I added the correct extensions like jpg or pdf

I copied them all into the required folder as written so in

/test/joomla_3_IG/media/kunena/attachments/migrated

I can see the files in the Backend in the file management.

But I cannot access them. I have set permissions to 777 so this is not the reason.

Error from Backend is
"You don't have permission to access /media/kunena/attachments/migrated/68_df5ebccae730d85437c45ac74da54226.jpg on this server."

any thoughts why this is?
Last edit: 5 years 4 months ago by csporleder.

Please Log in or Create an account to join the conversation.

More
5 years 4 months ago #50 by csporleder
B)

I found the issue:

When you modify the attachments take care to the following
1. When you download the files with an FTP like FileZilla put the transfer method to BINARY
2. after modification of the files only copy the attachment files back to the media Kunena/migrated folder!!!! Not the Index.php or the .htaccess file!!!

One hint for everyone:
If you like to get the details from your attachments go to the Database of phpBB and Expotrt the attachment table. There you can easily identify the file extensions needed.

Thanks to this script.

Chris

Please Log in or Create an account to join the conversation.

  • Not Allowed: to create new topic.
  • Not Allowed: to reply.
  • Not Allowed: to edit your message.
Time to create page: 0.160 seconds