MyBB Community Forums
[Error Message] MyBB SQL Error when access ModCP - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: Community Archive (https://community.mybb.com/forum-106.html)
+--- Forum: Archived Forums (https://community.mybb.com/forum-143.html)
+---- Forum: Archived Development and Support (https://community.mybb.com/forum-155.html)
+----- Forum: MyBB 1.6 (https://community.mybb.com/forum-138.html)
+------ Forum: 1.6 General Support (https://community.mybb.com/forum-127.html)
+------ Thread: [Error Message] MyBB SQL Error when access ModCP (/thread-124385.html)

Pages: 1 2 3


RE: MyBB SQL Error when access ModCP - NNT_ - 2012-08-14

(2012-08-14, 11:31 AM)StefanT Wrote: I don't see any mistake in the code and I can't reproduce it under the circumstances you describe.

Do you need a test account on my forum, with access permission access to modcp ?


RE: MyBB SQL Error when access ModCP - NNT_ - 2012-08-16

Any updates?


RE: MyBB SQL Error when access ModCP - NNT_ - 2012-08-18

Here is the screenshot :

[Image: SCRSHOT_MODCP_2.PNG]

If you need a test account which have permission to access ModCP, please tell me.

Thanks in advanced.



RE: MyBB SQL Error when access ModCP - Diminished - 2012-09-06

I get this as well. Pain in the lime.


RE: MyBB SQL Error when access ModCP - Paul H. - 2012-09-06

If you can get me access to an account that the error occurs for and FTP access, I'll try to narrow down the bug.


RE: MyBB SQL Error when access ModCP - NNT_ - 2012-09-06

(2012-09-06, 03:31 PM)Paul H. Wrote: If you can get me access to an account that the error occurs for and FTP access, I'll try to narrow down the bug.

Sent you a PM. Please check the inbox. Hope you can fix this trouble soon Big Grin

Any updates? Paul H.


RE: MyBB SQL Error when access ModCP - NNT_ - 2012-09-08

This problem has been solved by Omar G.

You need to replace some lines of code in file "modcp.php"

Find :
if($unviewableforums && !is_super_admin($mybb->user['uid']))
{
    $flist .= " AND fid NOT IN ({$unviewableforums})";
    $tflist .= " AND t.fid NOT IN ({$unviewableforums})";

    $unviewableforums = str_replace("'", '', $unviewableforums);
    $unviewableforums = explode(',', $unviewableforums);
}

Replace with:
if($unviewableforums && !is_super_admin($mybb->user['uid']))
{
    if(is_array($unviewableforums))
    {
        $unviewableforums = str_replace("'", '', implode(',', $unviewableforums));
    }

    $flist .= " AND fid NOT IN ({$unviewableforums})";
    $tflist .= " AND t.fid NOT IN ({$unviewableforums})";

    $unviewableforums = str_replace("'", '', $unviewableforums);
    $unviewableforums = explode(',', $unviewableforums);
}


Once again, thanks to Omar G. for solving this error Smile


RE: MyBB SQL Error when access ModCP - StefanT - 2012-09-10

This does not happen without any plugins. Nevertheless it will be fixed with 1.6.9.
Fix:
Replace this in inc/functions.php:
	global $forum_cache, $permissioncache, $mybb, $unviewableforums, $unviewable, $templates, $forumpass;
with:
	global $forum_cache, $permissioncache, $mybb, $unviewable, $templates, $forumpass;



RE: MyBB SQL Error when access ModCP - Marks-Mans - 2012-09-10

Actually I Dont Upgrade My Forum Any more Because 1.6.6 Is Great

I Dont Have Any Problems Smile

It Seems New Version Having Problems


RE: MyBB SQL Error when access ModCP - Paul H. - 2012-09-10

(2012-09-10, 02:51 PM)Marks-Mans Wrote: Actually I Dont Upgrade My Forum Any more Because 1.6.6 Is Great

I Dont Have Any Problems Smile

It Seems New Version Having Problems


That's a good way to get hacked or encounter bugs. When we release and update it's for your own good. It only takes five minutes anyways. Any problems in new versions are 99% likely to be in the old version as well.