HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Error started happening without any site changes made [RESOLVED]

I haven't made any changes to my website or server or database in recent months, but just a few days ago I started getting this error ONLY ON DESKTOP. The error happens when I click on a discussion thread on desktop. The Vanilla forum appears to fine in all other areas on desktop including the forum dashboard, it's only when a discussion thread is clicked. On mobile, everything still works fine. Here is the error message:

I would appreciate any help in debugging this mystery. Thank you!


  • Options

    I was able to fix my own issue in case anybody else ever encounters this. I had to run the following code in mysql:

    SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));

    and viola, the fatal error in php.trigger_error() was fixed! the sql_mode=only_full_group_by was what tipped me off to this SO post: https://stackoverflow.com/a/36033983/3089840

  • Options
    pioc34pioc34 Pézenas ✭✭

    You can also change the getData function in VanillaInThisDiscussion plugin in class.inthisdiscussionmodule.php file like this

        public function getData($discussionID, $limit = 50) {
            $sQL = Gdn::sql();
            $this->_UserData = $sQL
                ->select('u.UserID, u.Name, u.Photo')
                ->select('c.DateInserted', 'max', 'DateLastActive')
                ->from('User u')
                ->join('Comment c', 'u.UserID = c.InsertUserID')
                ->where('c.DiscussionID', $discussionID)
                ->groupBy('u.UserID, u.Name, u.Photo, c.DateInserted')
                ->orderBy('c.DateInserted', 'desc')
Sign In or Register to comment.