Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[IPB3] Converting Private Messages #195

Open
OzWookiee opened this issue Apr 25, 2016 · 1 comment
Open

[IPB3] Converting Private Messages #195

OzWookiee opened this issue Apr 25, 2016 · 1 comment
Labels
c:IP.Board Converter: IP.Board t:bug Type: Bug. An issue causing error / flaw / malfunction

Comments

@OzWookiee
Copy link

OzWookiee commented Apr 25, 2016

Got the following error when importing our IPB 3.1.4:


Private 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 'AND map_user_id!=1456 AND map_user_active=1' at line 1
Query:
SELECT * FROM TAG_message_topic_user_map WHERE map_topic_id= AND map_user_id!=1456 AND map_user_active=1


Checking the mybb_privatemessages table a single PM was imported 3 times.

Looking in the merge\boards\ipb3\privatemessages.php it appears to be line 102:
$rec_query = $this->old_db->simple_select('message_topic_user_map', '*', "map_topic_id={$data['mt_id']} AND map_user_id!={$data['msg_author_id']} AND map_user_active=1");

specifically {$data['mt_id']} has not returned any data
SELECT *
FROM TAG_message_topic_user_map
WHERE map_topic_id= AND map_user_id!=1456 AND map_user_active=1

Looking at the original query and what it returns
SELECT *
FROM ".OLD_TABLE_PREFIX."message_posts m
LEFT JOIN ".OLD_TABLE_PREFIX."message_topics mt ON(m.msg_topic_id=mt.mt_id)
LEFT JOIN ".OLD_TABLE_PREFIX."message_topic_user_map mp ON(mp.map_topic_id=mt.mt_id AND mp.map_user_id=mt.mt_starter_id)
LIMIT ".$this->trackers['start_privatemessages'].", ".$import_session['privatemessages_per_screen']

mt_id AND map_topic_id can be NULL according to my data (attached exported JSON from phpMyAdmin).
TAG_message_posts.zip

I guess this would then mean that you need to check if {$data['mt_id']} IS NULL before running that section?

@JN-Jones
Copy link
Contributor

JN-Jones commented May 6, 2016

Odd, didn't know there can be messages without a topic (which doesn't make sense normally). Need to look at the cause and how this should be handled.

@JN-Jones JN-Jones added t:bug Type: Bug. An issue causing error / flaw / malfunction c:IP.Board Converter: IP.Board labels May 6, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c:IP.Board Converter: IP.Board t:bug Type: Bug. An issue causing error / flaw / malfunction
Projects
None yet
Development

No branches or pull requests

2 participants