Code Monkey home page Code Monkey logo

merge-system's Introduction

MyBB

MyBB is a free and open source forum software written in PHP with support for MySQL/MariaDB/PostgreSQL/SQLite, licensed under GNU LGPL v3.

Learn more at MyBB.com →

Download

Go to mybb.com/download to download the latest stable, production-ready version of the MyBB forum software.

Documentation

Go to docs.mybb.com to view articles on usage, administration, and troubleshooting of MyBB.

Extend

Open Extend MyBB to download plugins, themes, translations and other resources to customize your MyBB board.

Support & Discussion

Visit the MyBB Community Forums and join the MyBB Discord server to get support and discuss MyBB. To learn more about support resources, go to mybb.com/support.

Security

View SECURITY.md for information on secure usage, incident recovery, and vulnerability reporting. To learn more about security research at MyBB, go to mybb.com/security.

Get Involved

View CONTRIBUTING.md for information on running MyBB locally, submitting changes, workflow, and best practices for working with the code repository. To learn more about contributing to the MyBB Project, go to mybb.com/get-involved.

Credits

Some icons by Yusuke Kamiyamane.

Sponsors

merge-system's People

Contributors

a-dalton avatar andrerl avatar andrewjs18 avatar atofighi avatar bram1000 avatar destroy666x avatar dgrp avatar dprotas avatar dvz avatar euantorano avatar fizyk20 avatar jn-jones avatar jordanmussi avatar jovanj avatar pavemen avatar pkill37 avatar starpaul20 avatar stefan-mybb avatar stefan-st avatar tim-b avatar veryard avatar yuliu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

merge-system's Issues

Counters/Links not updated

Upon merging a database, I discovered a bug with the "Last Post" link. Instead of taking you to the last post, it returns with a "The Specified Thread Does Not Exist" message, as it tries to go to a different thread link.

Example:

Click on the "Posts?" link in the first catergory.
It will go to http://dotrb.net/thread-603-lastpost.html
And then it will say:

The specified thread does not exist.

But then going to the normal thread via navigation it will take you to:
http://dotrb.net/thread-595.html

The above issue was fixed, as the links will work correctly now. It was just an example.

As instructed by Dylan Myers, we found that running a Recount and Rebuild fixes the error.

http://dev.mybb.com/issues/1158

Forumpermissions module not working

There's some wrong logic in the forumpermissions module. We don't copy the default usergroups (registered, admin, mod, smod) but we try to copy their forum permissions. We have an array with "old_id => new_id" in the cache but the default groups aren't cached their so it produces some SQL errors when the default groups have their own permissions (tested on a fresh SMF installation and on a phpBB 3 installation, where you first need to set some permission)

SMF 2.0.1 Forum Permissions Fail

When trying to merge forum permissions with SMF 2.0.1 it stands still. I was able to turn on error reporting for this one to get the message:

MyBB has experienced an internal SQL error and cannot continue.

SQL Error:
1064 - 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 ' 1000' at line 5
Query:
SELECT id_group, GROUP_CONCAT(permission) as permissions FROM smf_board_permissions WHERE id_group != '-1' GROUP BY id_group LIMIT , 1000

http://dev.mybb.com/issues/1851

MyBB 1.6 to MyBB 1.6 - Last Post Wrong

I tried importing my current MyBB 1.6 forum to a new installation, and the Last Post section does not update. By that, I mean the links to the thread URL and the username does not update, thus leading to a 404 error.

ie. It should be linking to showthread.php?tid=12345 but is linking to tid=12354 like in the old forum.

Might also be because I purged a few things before merging, so it may be my fault

http://dev.mybb.com/issues/1643

Merge Not Working

It won't import users. It keeps giving an SQL 1062 error saying "duplicate entry". It stays stuck on the user import step until I press pause, but it will never resume. I'm using the latest MyBB and importing Phpbb3 (latest).

PHPBB3 : Additional User groups are wrong

Hello. I tried to convert vbulletin 3.6.8 forums to mybb 1.6.5, but I got many problems... Only few features worked (marked on screenshot).
Blank page = white page without title or anything else (I tried to F5 but still nothing)
SQL error when converting forum permissions:
[URL=http://imageshack.us/photo/my-images/513/sql.png/][IMG]http://img513.imageshack.us/img513/3618/sql.th.png[/IMG][/URL]

And whole list of broken features:
[URL=http://imageshack.us/photo/my-images/515/mybbmergesystemmodulese.png/][IMG]http://img515.imageshack.us/img515/3686/mybbmergesystemmodulese.th.png[/IMG][/URL]

http://dev.mybb.com/issues/1861

class_debug: Debug/Log confusion and multiple creation of debug table

The only thing the debug class does is creating an object of the log class. It'd be better to directly create the log class and work with that.

The log class constructor calls $this->create_debug_table(); while the same function is also called when inserting a new log message - so the one in the constructor can be dropped without problems.

The generate_plain_backtrace function could also be improved to simply return '' when debug_backtrace isn't available instead of wrapping the whole function in an if.

Version checks in index.php

The Merge System checks whether the installed MyBB version is between 1600 and 2000 but as 1.8 gets it's own Merge System we need to modify it. In addition the PHP Version check can be removed as MyBB 1.6 requires PHP 5 anyways.

phpBB3: Duplicate entry for key 'username'

I just installed a vanilla MyBB 1.6.9 and then tried to merge my phpBB 3.0.10 forum with version 1.6.7 of the merge system. The "Database Configuration" step went fine but then it failed in the "Users" step with this error:

Code:
471 users are importing right now. There are 0 users left to import and 0 pages left.

Loading data from database...
MyBB SQL Error
MyBB has experienced an internal SQL error and cannot continue.

SQL Error:
1062 - Duplicate entry 'Löse' for key 'username'
Query:
INSERT INTO mybb_users (usergroup,additionalgroups,displaygroup,import_usergroup,import_additi?onalgroups,import_displaygroup,import_uid,username,password,salt,log?inkey,email,regdate,lastactive,lastvisit,website,showsigs,signatur?e,showavatars,timezone,avatardimensions,avatartype,avatar,lastpost,?icq,aim,yahoo,msn,hideemail,allownotices,regip,lastip,longregip?,longlastip,language,passwordconvert,passwordconverttype,postnum,inv?isible,birthday,birthdayprivacy,subscriptionmethod,receivepms,receivef?rombuddy,pmnotice,pmnotify,showquickreply,ppp,tpp,daysprune,timefo?rmat,dst,buddylist,ignorelist,style,away,awaydate,returndate,ref?errer,referrals,reputation,timeonline,showcodebuttons,totalpms,unrea?dpms,pmfolders,notepad,threadmode,showredirect,dateformat,dstcorrect?ion,warningpoints,moderateposts,moderationtime,suspendposting,suspensi?ontime,suspendsignature,suspendsigtime,coppauser,classicpostbit,logina?ttempts,failedlogin,usernotes) VALUES ('2','','2','931','','931','3397','Löse','', ... snip ...)

I checked the phpBB users database and it only had one entry with that username. MySQL is version 5.1.68.

The phpBB forum had originally been running with a few mods but they got all dumped over the years (maintenance nightmare, which is why I am looking at MyBB now). We run Joomla with a JFusion phpBB bridge however. phpBB is configured as the master for JFusion.

http://dev.mybb.com/issues/2191

asort vs natcasesort

We sort the list of available boards with asort however this will fail when we add for example Xenforo. asort is casesensitive and so all uppercase boards will be above the lowercase ones. We should use natcasesort instead. (resources/output.php, ~line 225)

importing users throws up a warning

File Line Function
/convert/boards/smf.php 115 errorHandler->error
/convert/boards/smf/users.php 87 SMF_Converter->get_group_id
/convert/resources/modules/users.php 123 SMF_Converter_Module_Users->convert_data
/convert/boards/smf/users.php 69 Converter_Module_Users->insert
/convert/index.php 970 SMF_Converter_Module_Users->import
Warning [2] Invalid argument supplied for foreach() - Line: 115 - File: convert/boards/smf.php PHP 5.3.2-1ubuntu4.5 (Linux)

I get this for every user being imported.
Users stage shows "completed" afterwards though and I can continue with the conversion process.
I used the merge system from the main site (no trunk files).

http://dev.mybb.com/issues/1238

Posts not restored for phpBB2 threads with the same title

If there are two threads with the exact same name, for example as a result of a move from forum to forum, where the other thread is a simple shadow/redirection, the thread posts and details such as "dateline" are NOT merged.

In the database mybb_threads table you can find only one row for the threads, which has only the topic title & view count, everything else is 0.
To reproduce:

Install phpBB2
Create a new forum
Move the only thread to the newly created forum, leave a shadow topic about the move
Use Merge System

http://dev.mybb.com/issues/1244

vBulletin 4 (Bug + Fix + Feature?)

I posted this on the main myBB board but nathan told me to drop it here as well.
I own vbulletin 4, XF and IPB licenses, so if testing needs to be done let me know and i can set it up.

Anyways there are 2 issues with the vBulletin converter for 4.X here are the fixes. The bugs are non-updated table names, no biggy...

Open: merge/boards/vbulletin3/forumperms.php

Find (Line 64)
if($data['forumpermissions'] & $val)

Replace With:
if($data['forumpermission'] & $val)

Find (Line 84):
query = $this->old_db->simple_select("forumpermissions", "COUNT as count");

Replace With:
query = $this->old_db->simple_select("forumpermission", "COUNT as count");

//==============================================================================================================================================
==============================================================================================================================================//

Open: merge/boards/vbulletin3/attachments.php

Find (Line 168):
$query = $this->old_db->simple_select("attachments", "COUNT as count");

Replace With:
$query = $this->old_db->simple_select("attachment", "COUNT as count");

Seeing myBB does not officially support vBulletin 4.X conversions, this i guess is more of a feature request. The vBulletin 3 conversion with those updates will work flawlessly with 4.2.X vBulletin.

This was tested on a board with:
20 attachments
22,504 posts
8,204 threads
3,205 members
vbulletin 4.2.1 (latest)

http://dev.mybb.com/issues/2237

Weird Charecters in West Asian Languages (VB 3.x To Mybb)

After convert vb 3.8 to Mybb 1.6 Using Mybb 1.6.1 Merge sysyem all of the Persian (also west Asian Languages) posts are in weird type!
Like this:
Automatically convert messages to UTF8 = OFF

دسته بندی من

Automatically convert messages to UTF8 = ON

Ã?¯Ã?³Ã?ªÃ?â?¡ Ã?¨Ã?â? Ã?¯Ã?Å? Ã?â?¦Ã?â?

VB Posts Table = Latin1
MyBB Posts table = UTF-8

http://dev.mybb.com/issues/1519

global $import_session is a variable variable

./boards/smf2/usergroups.php:30

    function import()
    {
        global $$import_session, $db;
               ^^^^^^^^^^^^^^^^
        // Get only non-staff groups.
        $query = $this->old_db->simple_select("membergroups", "*", "id_group > 3 AND min_posts = -1", array('limit_start' => $this->trackers['start_usergroups'], 'limit' => $import_session['usergroups_per_screen']));
        while($group = $this->old_db->fetch_array($query))
        {

[1.8] Convert IP addresses to binary format

Since MyBB 1.8, we pack IP addresses to bring IPV6 support. The Merge System currently fails because it tries to insert the IP address directly, even without adding quotes (possibly a different bug). IP addresses need to be converted with the my_inet_pton() function.

error_reporting in index.php

We call error_reporting in index.php but the error class we create later extends the default MyBB one which calls error_reporting in it's constructor again.

Weird logic in functions.php

In resources/functions.php, the check_url_exists function:

    $url_parsed = @parse_url($url);

    if(!$url)
    {
        return false;
    }

I think the if should be before we call parse_url.

Signatures not being parsed for BBCode and/or being run through utf8_unhtmlentities()

SMF 1 & 2: Missing BBCode parser & unhtmlentities()
PunBB: Missing BBCode parser & unhtmlentities()
phpBB2: Missing BBCode parser
phpBB3: Missing unhtmlentities()
IPB2: Missing unhtmlentities()
vB3: Missing unthmlentities()

Suggested fix:
change all to the same format as posts & pms encode_to_utf8($this->bbcode_parser->convert(utf8_unhtmlentities()), "", "");

Not all boards may need the utf8_unhtmlentities(), however... better safe than sorry in the event someone has things in their signature that don't belong.

http://dev.mybb.com/issues/1173

class_error: print_header has unused parameter

The last parameter of the print_header isn't used inside the function. I've found only one place till now where it is actual set (I'll update the list when I'll find more):

  • The print_error function in the same class

mime_content_type has been deprecated

Since mime_content_type() has been deprecated and replaced by the PECL extension Fileinfo() we should update the code to test for it, use it if available, if not test for Fileinfo(), use it if available, and if not use our current fallback. Or possibly do Fileinfo, fallback to mime_content_type, then fallback to our current fallback.

http://dev.mybb.com/issues/1250

Forum Permissions changed in IPB 3

So, I'm leary as it is to use beta converters because I was screwed over in the past by incomplete converters... but I decided to give this a go.

I'm using the IPB 3 (beta) converter and I've successfully converted: Usergroups, Users, Forums, & Threads. When I go to 'merge' Forum Permissions however, I get the following error:

MyBB has experienced an internal SQL error and cannot continue.
SQL Error:
1054 - Unknown column 'permission_array' in 'field list'
Query:
SELECT permission_array,id FROM ibf_forums LIMIT 0, 1000

The version of IPB I'm using is 3.2.1 which is not the latest (haven't reactivated my license because I plan on switching to MyBB in the future and just doing a pre-check for the conversion right now.

P.S. I'm pretty sure I'm using the HEAD version, but I could be wrong. The version number on the merge system didn't appear to update when I uploaded the HEAD version.

http://dev.mybb.com/issues/1857

IPB, posthash + attachments

t makes no sense to overwrite the variable some lines later: (boards/ipb2/attachments.php)

        $posthash = $this->get_import->post_attachment_details($data['attach_pid']);
        $insert_data['pid'] = $posthash['pid'];
        if($posthash['posthash'])
        {
            $insert_data['posthash'] = $posthash['posthash'];
        }
        else
        {
            $insert_data['posthash'] = md5($posthash['tid'].$posthash['uid'].random_str());
        }
[...]
        $insert_data['posthash'] = $data['attach_post_key'];

Moreover I think it is better to generate the posthash on importing the posts.

http://dev.mybb.com/issues/1402

SMF 1 - Module forum permissions: wrong count of the items to be imported

Hi,

the Forum Permissions module of the SMF 1 merge system do not count correctly the items to be imported.
In fact, the query count do not respect the same conditions of the select query used for the real import (ignoring the GROUP BY ID_GROUP, ID_BOARD condition), so the merge will loop infinitely when the real count is lesser than the one performed.
See the queries at lines 42 and 117 of the boards/smf/forumperms.php

To resolve the problem this is a possible patch:

=== modified file 'boards/smf/forumperms.php'
--- boards/smf/forumperms.php 2011-06-29 21:56:30 +0000
+++ boards/smf/forumperms.php 2011-06-30 13:30:49 +0000
@@ -114,8 +114,8 @@
// Get number of forum permissions
if(!isset($import_session['total_forumperms']))
{

  •        $query = $this->old_db->simple_select("board_permissions", "COUNT(*) as count", "ID_GROUP != '-1' AND ID_BOARD > 0");
    
  •        $import_session['total_forumperms'] = $this->old_db->fetch_field($query, 'count');
    
  •        $query = $this->old_db->simple_select("board_permissions", "1", "ID_GROUP != '-1' AND ID_BOARD > 0 GROUP BY ID_GROUP, ID_BOARD ");
    
  •        $import_session['total_forumperms'] = $this->old_db->num_rows($query);
         $this->old_db->free_result($query);
     }
    

Another way to achieve the same result is to made a subselect.

http://dev.mybb.com/issues/1618

SMF 2 attachments convert error

1054 - Unknown column 'attachment_type' in 'where clause'

attachment_type column doesen't exists in attachment smf table.

loginconvert plugin extraneous code & missing remember

The loginconvert plugin has a lot of extraneous code. For example, verifying the password just to return to the member login function where the hook was called and validate it again. Also salting a plain md5() password, since once again the standard login functions handle this for us.

Also the remember field introduced in 1.6 is missing from the plugin checks.

http://dev.mybb.com/issues/1292

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.