mybb / merge-system

The MyBB Merge System allows for easy merging of an existing forum (be it MyBB or another forum software) into a MyBB 1.8.x forum.
Other
34 stars 34 forks source link

Only one imported non-categorized forums (pid=0) will be categorized due to query being overwritten #261

Closed yuliu closed 3 years ago

yuliu commented 3 years ago

In the base forums module's cleanup(): Query $query = $db->simple_select('forums', '*', "type='f' AND pid=0 AND import_fid > 0"); is overwritten when the merge system is trying to rebuild child forums' parentlist:

yuliu commented 3 years ago

And that makes only the first forum in the SQL's result get categorized. Others will be listed under root without a parent category, which is not allowed in MyBB and "Please select a valid forum" error will occur when trying to grant moderator permissions for them at AdminCP.

Original report: https://community.mybb.com/thread-229919.html