MyBB Community Forums

Full Version: get_post_icons error in inc/functions.php 1818 (postgreSQL system)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
MyBB 1.8.15 running on PHP 5.3.10 and PostgreSQL 9.1.24

I think I am my own worst enemy here, the install didn't seem to go 100% so tested it anyhow and it "seemed to work".

Adding forums / threads / users seems fine, but I do notice that adding a new thread creates the error mentioned.

See screen shot attached.

While it's not annoying me as such, I admit I am wondering what else might be slightly amiss.  Can I backup my current system/settings and try reinstall "yet again" (suspecting I'll get the same issue though).  I do apologies for not capturing the original install hiccup.
Hi, thank you for reporting this. It looks like a badly written code here. To solve it should be sufficient to rebuild the post icon cache (Tools & Maintenance > Cache Manager > posticons > Rebuild cache). As the installation didn't go smooth like you said, it's best to rebuild all the cache (Cache Manager > Rebuild and reload all).

I'll move this to the 1.8 Bugs and issues forum, as a simple array casting is enough to solve this little bug. By the way, these are not errors but warnings, and can be suppressed with the Error Type Medium setting (set it to Hide errors and warnings, and enable logging so these will be written to error.log instead).
Hi,

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/3263

Thanks for contributing to MyBB!

Regards,
The MyBB Group
Many thanks for the prompt and detailed responses.

I'm suspecting perhaps there's also something more to this, as after I did the "rebuild all" I still have no entry for post icons.

Perhaps the table wasn't successfully built post PostgreSQL (I realise it's not as popular as mySQL)?
Yep, sorry. There are quite a lot of missing caches there. If it's not a big deal, try to reinstall the board completely which is the simpler way to solve this. Otherwise, I'll provide a way to create the missing caches.
(2018-06-15, 09:13 AM)Shade Wrote: [ -> ]Yep, sorry. There are quite a lot of missing caches there. If it's not a big deal, try to reinstall the board completely which is the simpler way to solve this. Otherwise, I'll provide a way to create the missing caches.

Okay, thank you. I'll try backup, reinstall, restore.

Finish Setup
Importing user groups...done

Creating Administrator account...done

Building Administrator permissions...done

Building data caches...
MyBB SQL Error
MyBB has experienced an internal SQL error and cannot continue.

SQL Error:
0 - ERROR: non-integer constant in ORDER BY LINE 6: ORDER BY NULL DESC ^
Query:
SELECT u.uid, u.username, COUNT(*) AS poststoday FROM fbv_posts p LEFT JOIN fbv_users u ON (p.uid=u.uid) WHERE p.dateline > 1528967964 AND p.visible=1 GROUP BY u.sourceeditor,u.usernotes,u.loginattempts,u.classicpostbit,u.coppauser,u.suspendsigtime,u.suspendsignature,u.suspensiontime,u.suspendposting,u.moderationtime,u.moderateposts,u.warningpoints,u.unreadpms,u.totalpms,u.showcodebuttons,u.timeonline,u.language,u.lastip,u.regip,u.reputation,u.referrals,u.referrer,u.notepad,u.pmfolders,u.awayreason,u.returndate,u.awaydate,u.away,u.style,u.ignorelist,u.buddylist,u.dstcorrection,u.dst,u.timezone,u.timeformat,u.dateformat,u.daysprune,u.tpp,u.ppp,u.showredirect,u.showquickreply,u.showavatars,u.showsigs,u.showvideos,u.showimages,u.threadmode,u.buddyrequestsauto,u.buddyrequestspm,u.pmnotify,u.pmnotice,u.receivefrombuddy,u.receivepms,u.invisible,u.subscriptionmethod,u.hideemail,u.allownotices,u.signature,u.birthdayprivacy,u.birthday,u.google,u.skype,u.yahoo,u.aim,u.icq,u.website,u.lastpost,u.lastvisit,u.lastactive,u.regdate,u.usertitle,u.displaygroup,u.additionalgroups,u.usergroup,u.avatartype,u.avatardimensions,u.avatar,u.threadnum,u.postnum,u.email,u.loginkey,u.salt,u.password,u.username,u.uid ORDER BY NULL DESC
Ah, there it is. I'll ping others with better pgsql knowledge, but that's why the cache is not populated.
(2018-06-15, 09:29 AM)Shade Wrote: [ -> ]Ah, there it is. I'll ping others with better pgsql knowledge, but that's why the cache is not populated.

Thanks. For now I'll let the system run as is, doesn't seem to be inhibiting the core functionality at this point.

I appreciate the time/effort you're putting in to helping.