Skip to:
Content
Pages
Categories
Search
Top
Bottom

Kunena converter for bbPress 2.4

Viewing 25 replies - 26 through 50 (of 60 total)
  • @netweb

    Keymaster

    @stagger-lee Thanks for taking another look at this, most appreciated. 🙂

    I have a couple of ideas that I will try tomorrow and that should also include the removal of the hard-coded jos_ prefix.

    Out of curiousity did you use Kunena2.php or Kunena3.php this time round?

    @stagger-lee

    Participant

    Kunena3.php. Tried long time ago with Kunena2 too, but didnt work.
    Updated Kunena forum to the last, just to test. WP is updated to the last.

    Joomla is made locally with Akeeba but dont think it has something to do with problem.

    If i only knew what makes problem. One or few Kunena topics deleted. Not big deal in forums, if you have hundreds and thousands of them. But as it is now all is black hole for me.

    @stagger-lee

    Participant

    MySQL error log doesnt give anything special. All errors i see are the same for other databases, generic types.

    @marshallarts

    Participant

    Hi Stephen,all

    I’m working to recover 10,000 posts from my old forum that was on an old Joomla 1.5.22 site – Kunena V1.5.66 – The site was the victim of an attempted hack in 2010 that achieved nothing apart from screwing up 3000 registrations and killing the site it never recovered, it was a real blow to the community – I have restarted the site again on WP (.org not .com) in a development domain before switching to the main hosting and have selected to use BBpress for the new forum – I had given up the ghost on the old content until I saw this thread, now I’m all excited because the meat of the old site was on the old forum!!

    Apologies for being a real numpty but is there an installation instruction? I can’t figure out where I place the kunena1.php file to start attempting the migration – I have tried in the root of the joomla domain but it 404’s.

    Many thanks for your help and potentially brightening my day!!

    Paul

    @marshallarts

    Participant

    So, progress…

    I worked out that the Kunena1 migrator was within bbpress – duh! My Kunena database had the jos_fb_ preface instead of the jos_kunena_ preface – I manually changed those-

    I have now managed to import the replies however despite running the repair option, the forums and topics were not imported – It seems to have appended an extre Re: in front of each (so they read Re:Re:Topic). It’s possible that the kunena version I have might have used a slightly different table naming convention or somethung

    I’m reading around as much as I can so I’m not posting too many silly questions here but your help is appreciated.

    Thanks

    Paul

    @netweb

    Keymaster

    Cool, glad your taking a look at it.

    “It seems to have appended an extre Re: in front of each (so they read Re:Re:Topic)”

    The Re: should only be added to the title of a reply, this should not be adding them to the topics and this shows that the SQL in the importer isn’t quite matching up with your database.

    The SQL queries below are based on the Kunena1.php importer and use the prefix jos_ as the table prefix for the bbPress importer.

    When the importer fails you should see an error message like the following:
    WordPress database error: [Unknown column 'kunena_categories.locked1' in 'field list']

    In this particular case the importer was looking for jos_kunena_categories.locked1 where jos_kunena_categories is the table name and locked1 is the field name. I used ‘locked1’ as a way to force an error to show the example, so if I knew my version of the database should be looking at the field locked instead of locked1 you can find the 'from_fieldname' => 'locked1' in Kunena1.php and update that with the correct field mapping 'from_fieldname' => 'locked',.

    Another way you can go about this is to jump directly into phpMyAdmin and test each of the following SQL queries, there are primarily four queries are as follows:

    Again I used prefix jos_ for my database and you will need to change this to match your own database table prefix.

    Forums

    
    SELECT 
    kunena_categories.id AS id,
    kunena_categories.parent AS parent,
    kunena_categories.numTopics AS numTopics,
    kunena_categories.numPosts AS numPosts,
    kunena_categories.name AS name,
    kunena_categories.description AS description,
    kunena_categories.ordering AS ordering,
    kunena_categories.locked AS locked 
    FROM jos_kunena_categories AS kunena_categories
    

    Topics

    
    SELECT 
    kunena_messages.thread AS thread,
    kunena_messages.catid AS catid,
    kunena_messages.userid AS userid,
    kunena_messages.ip AS ip,
    kunena_messages_text.message AS message,
    kunena_messages.subject AS subject,
    kunena_messages.time AS time,
    kunena_messages.locked AS locked 
    FROM jos_kunena_messages AS kunena_messages 
    INNER JOIN jos_kunena_messages_text AS kunena_messages_text 
    ON kunena_messages_text.mesid = kunena_messages.id 
    WHERE kunena_messages.parent = 0
    

    Replies

    
    SELECT 
    kunena_messages.id AS id,
    kunena_messages.catid AS catid,
    kunena_messages.thread AS thread,
    kunena_messages.ip AS ip,
    kunena_messages.userid AS userid,
    kunena_messages.subject AS subject,
    kunena_messages_text.message AS message,
    kunena_messages.time AS time 
    FROM jos_kunena_messages AS kunena_messages 
    INNER JOIN jos_kunena_messages_text AS kunena_messages_text 
    ON kunena_messages.id = kunena_messages_text.mesid 
    WHERE kunena_messages.parent != 0
    

    Users

    
    SELECT 
    users.id AS id,
    users.password AS password,
    users.username AS username,
    users.email AS email,
    users.registerDate AS registerDate 
    FROM jos_users AS users
    

    That’s a bit to digest so I’ll leave it at that for now and it is probably as clear as mud unless you are a seasoned SQL junkie.

    If anything I wrote above doesn’t make sense just ask away and remember 🙂
    https://en.wikipedia.org/wiki/No_such_thing_as_a_stupid_question

    @marshallarts

    Participant

    Hi Stephen – many thanks for your lengthy and considered reply. You are right that a lot of the php MySQL is over my head

    I believe that the issue is that between 1.5.9 and 1.6 of kunena, the layout of the database changed in more ways than renaming the tables and therefore my old-style database won’t work. My information is in the jos_fb_ format

    I have tried updating Kunena to a 1.6.x version however I’m hitting other problems with that –

    Uncaught Exception: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘TYPE=MyISAM AUTO_INCREMENT=9 DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci’ at line 9 SQL=CREATE TABLE jos_kunena_version ( id int(11) NOT NULL AUTO_INCREMENT, version varchar(20) NOT NULL, versiondate date NOT NULL, installdate date NOT NULL, build varchar(20) NOT NULL, versionname varchar(40) DEFAULT NULL, PRIMARY KEY (id) ) TYPE=MyISAM AUTO_INCREMENT=9 DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci.

    I believe I need to change TYPE to ENGINE and have found one set of instructions for that, but they do not work so I’m backed into a different corner.

    I put up a post on the kunena forum asking for help, even if I have to pay a few bucks for that – but really I only need the old database content to be transferred into the new database in the correct format, the rest of the site is to be scrapped – is it possible that the database tweaks can be done independently from upgrading the kunena installation? or can I tweak the importer to work with the jos_fb_ version – I don’t have the skills to do that but I suspect it’s a major job and probably unfeasible.

    Your importer clearly works as intended and thank you for making it available, the problem I believe is most likely to be upstream but I won’t know until I can sort that bit out. Unless there is a way to make the database transfer (I can pay a wee bit) I’m not quite sure where to go next.

    Many thanks

    Paul

    @netweb

    Keymaster

    In theory this is all you need to do, but please make sure you have a few backups of your database, after all these years you don’t want to lose everything now 😉

    alter table the_table_name_you_want_to_convert engine=innodb;

    That’s the theory anyway, to enable you to use the ‘alter’ command you need to uncheck the following setting:

    phpMyAdmin -> Settings -> Main Panel -> Table Structure -> Hide table structure actions

    Then open a table, and click ‘Operations’ and in the ‘Table options’ section you will now see ‘Storage Engine’ where you can change this from MyISAM to InnoDB once you click ‘Go’ you will a success or error message.

    @netweb

    Keymaster

    is it possible that the database tweaks can be done independently from upgrading the kunena installation? or can I tweak the importer to work with the jos_fb_ version – I don’t have the skills to do that but I suspect it’s a major job and probably unfeasible.

    You should in theory be able to do the import without modifying your database, and this reply probably should have been before the previous reply. 😉

    So try opening up phpMyAdmin and running the queries I posted before your previous reply.

    If all else fails then you can try upgrading Kunena and converting the database engine.

    @marshallarts

    Participant

    Hi Stephen,

    thank you for this and the time you are taking to help – I’ve read your previous very carefully.

    Maybe I misunderstood something – The queries you suggest are all in the new form – e.g. jos_kunena_categories.id whereas my database is jos_fb_categories.id from Kunena 1.5.x- I checked on a test install of a newer version of Kunena and table names and fields have changed so I think the jos_fb_ tables/fields are all wrong for the migrator.

    I do have backups and am willing to have a go but the queries are jos_kunena format not jos_fb – so much is unfamiliar and ergo scary!

    Thanks Stephen and sorry for being a pain, I really do want to get this out of your way and me out of your hair 🙂

    Paul

    @marshallarts

    Participant

    Hi Stephen – I wanted to come back and update this thread with a SOLVED notice – At the end of the day the solution was simple – don’t upgrade to Kunena 1.6 – upgrade to Kunena 1.7.2 instead!! I spent weeks looking for solutions but the fix took only a few minutes when I made the decision to skip multiple versions. bbpress is working with 7500 old posts seeding the new forum

    Anyway for anyone else following who has the same issues – upgrade to a later version that is still capable of working with Joomla 1.5.

    A huge thank you to Stephen for taking the time to work with me on getting this migration happening

    Cheers

    Paul

    @netweb

    Keymaster

    Paul, Awesome, glad you got to a point that the importer worked for you.

    There are quite a few versions of Joomla and Kunena and I’ve tried to cover as many combinations as possible and without knowing either platform very well it’s not the easiest import scenario to support so your feedback is much appreciated.

    Cheers,

    Stephen

    @jaeha

    Participant

    Hi Stephen,

    I’m trying to import an old Kunena forum (Version 1.5.12) in a new BBPress (BuddyPress) forum.
    I change manually the tablename in Kunena1.php, everything is normally ok, but seems something is not good because when I click on start, the script write there is nothing to import.

    Repair any missing information: Continue
    Conversion Complete
    No reply_to parents to convert
    No replies to convert
    No tags to convert
    No super stickies to stick
    No stickies to stick
    No topics to convert
    No forum parents to convert
    No forums to convert
    No passwords to clear
    No users to convert
    Starting Conversion

    I have no error, only this. May I forgot something ?

    Thanks,

    Jaeha

    @stagger-lee

    Participant

    Now it is the same with SMF converter. I know it is not something for this topic, but do i have so bad luck. I have feelings that those converter scripts are not tested at all.

    Converting replies (8100 – 8199)

    @stagger-lee

    Participant

    Small update. It is working now, Kunena forum is imported and all is working.
    Problem was in Ampps. Installed new Wamp, imported Kunena forum, exported forum, imported again in Ampps and all is OK now.

    Had “small” problem importing users, dont know why. Found at Google that i need to uninstall and delete Buddy Press then install it again after import.

    You see, that one was piece of cake to fix whem you have error in converter. My first problem was pain in the ass when it is black hole, no error, nothing, just spinning and so can it continue for 3 years.

    Plus it is enigma how it can import 80-90% of topics and replies then stop.

    @cybnet

    Participant

    Any plan to add attachments migration from kunena to bbPress? Maybe using GD bbPress Attachments?

    @cybnet

    Participant

    Finally I’ve written a small script to migrate kunena attachments to GD bbPress attachments. It is in a very early stage, any help are really wellcome. You must run the script as standalone and only after the kunena migration has been performend using the importer distributed with bbPress.

    Now I’d like to write a script to convert kunena BBCode into bbPress HTML because there are some bbcodes not converted.

    @netweb

    Keymaster

    Finally I’ve written a small script to migrate kunena attachments to GD bbPress attachments


    @cybnet
    Awesome thanks for this, I added it to the (still sparse) Kunena docs here.

    I’ll take a closer look when I get the chance and see what ideas I can come up with. I was at a WordPress Meetup a couple of months ago that demoed a few different ways to move media from one install to another that once time permits I’d love to take a shot at including it in our importer.

    Now I’d like to write a script to convert kunena BBCode into bbPress HTML because there are some bbcodes not converted.

    This I can most definitely help out with now.

    The SMF and phpBB importers both have some good examples of converting BBCode to ‘native’ bbPress (WordPress) code. I am simply use regular expressions to convert them on the fly as each topic or reply is converted.

    eg. This Replaces [size=$1:XXXXXXXX] with <span style="font-size:$1%;">$3</span>

    $phpbb_uid = preg_replace( '/\[size=(.*?):(.*?)\]/', '<span style="font-size:$1%;">', $phpbb_uid );

    You can see the SMF regex here and the phpBB here. There are probably quite a few that we can repurpose and if not make up a list for me and I’ll work towards getting them added to the Kunena importers in a future release.

    @jbuesking

    Participant

    I have finally found the time to start migrating my site over. The importer worked great.

    Now it’s time to handle the issue with the attachments. Running the very young script returns nothing but “200”.

    Has anyone succesfully migrated the attachments over yet? I would be willing to pay if there is a commercial script available.

    Thanks

    @netweb

    Keymaster

    I just had a quick look at the attachment migration script and you would need to change Line 28 and rename the table name j25_kunena_attachments to the same name as your attachments table name of your original Kunena database.

    @cybnet

    Participant

    I migrated the attachments succesfully. You must edit the script:

    Change these lines (6 and 7) with the correct path:

    require( '/home/user/public_html/wordpress/wp-load.php' );
    require( '/home/user/public_html/wordpress/wp-admin/includes/image.php' );

    Add the data of your site and database (lines 10 to 14):

    $host="localhost";
    $uname="db_username";
    $pass="db_username_password";
    $database = "";
    $site_url = 'http://www.example.com';

    In line 28 change j25_kunena_attachments to the same name as your attachments table name.

    I’m sorry for the trouble but, as I said, the script is in very early stage but made the job for me.

    @stagger-lee

    Participant

    You people if you dont mind paying little over 50 € you can try this converter:

    Kunena add-on

    I would not advertise commercial plugin here if i not tested theirs K2 to WordPress converter. It is simply brilliant. Imported absolte everything, custom fields, attachments, dates, page views, and aranged whole WordPress so that i didnt have any work to do with organizing content.

    @netweb

    Keymaster

    @stagger-lee Thanks for the heads up and I’m glad you eventually got your site converted, hopefully we will get all these issues nailed down in the not to distant future so there will be a free open source importer/converter for Joomla’s Kunena forums to bbPress 🙂

    @stagger-lee

    Participant

    O no Stephen. For Kunena converting i used this script from this topic here. Worked OK. Just saying if someone hits the wall and cannot wait anymore, to test this commercial plugin.

    As it is Joomla to WP converting this plugin is more then usefull for plenty of other things, not just forum.

    @netweb

    Keymaster

    Ah cool… In a future I dream of it would be nice to migrate these importers to standalone WordPress importers so when you import Joomla to WordPress if you also want Kunena to bbPress then check a box… Not going to happen anytime soon, but one day once the core WordPress import and export gets some loving updates this should be a little easier to implement. 🙂

Viewing 25 replies - 26 through 50 (of 60 total)
  • You must be logged in to reply to this topic.
Skip to toolbar