[Pushed] SQL Error when opening the moderator panel
The error below occurs when a moderator (primary group moderator) want to open the moderator-panel.
MyBB Version: 1.8.6
PHP Version: 5.5.9-1ubuntu4.14
SQL Engine: PostgreSQL 9.3.10
active plugins: Email Admin-Created User (1.0) Favicon (1.6.1) MyCode: [spoiler] (1.2)
inactive plugins: First Post Only (1.2)

MyBB SQL Error

MyBB has experienced an internal SQL error and cannot continue.

SQL Error:
    0 - ERROR: operator does not exist: ! smallint LINE 7: WHERE (t.fid <> 0 AND t.fid IN (0,'3')) OR (!l.fid) ^ HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.
    SELECT l.*, u.username, u.usergroup, u.displaygroup, t.subject AS tsubject, f.name AS fname, p.subject AS psubject FROM mybb_moderatorlog l LEFT JOIN mybb_users u ON (u.uid=l.uid) LEFT JOIN mybb_threads t ON (t.tid=l.tid) LEFT JOIN mybb_forums f ON (f.fid=l.fid) LEFT JOIN mybb_posts p ON (p.pid=l.pid) WHERE (t.fid <> 0 AND t.fid IN (0,'3')) OR (!l.fid) ORDER BY l.dateline DESC LIMIT 5
Looks like a bug - PostgreSQL (and most likely also SQLite) doesn't support ! before the column, whatever it's supposed to do. Moving to the bug reports forum.

EDIT: t.fid <> 0 AND t.fid IN(0, also doesn't make much sense since thread's FID can't be a 0 anyways. 1=1 should be used instead.
And the query is trying to select logs that don't have a specified FID, this should be standard SQL in that case: OR (l.fid != 0) - you can try changing that in modcp.php as a temp fix.
Should be pushed to GitHub. Not the last issue with PostreSQL Sad
[MyBB 1.8 Czech translation] [MyBB 1.8 plugins]: Prune old PMs + optimize DB plugin --- Thank you/like system

Thank you for your report. We have pushed this issue to our Github repository for further analysis where you can track our commits and progress with fixing this bug. Discussions regarding this bug may also take place there too.

Follow this link to visit the issue on Github: https://github.com/mybb/mybb/issues/3232

Thanks for contributing to MyBB!

The MyBB Group

Forum Jump:

Users browsing this thread: 1 Guest(s)