Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Plugin throwing out a bunch of errors

jhayes88jhayes88 New
edited January 2019 in Vanilla 2.0 - 2.8

Hi, I'm having big problems trying to get this plugin to work. This seems like a plugin that could be really useful on my forums. After activating this plugin, I receive the following errors when I open up any discussion https://pastebin.com/nm42gDbr

Another bug possible off topic -- After deactivating the plugin, it didn't properly deactivate it so I had to edit config.php and change $Configuration['EnabledPlugins']['Voting'] = true; to false. I was worried it was a bigger problem than that but luckily that's all it took to repair it.

I deleted cache and got a different error below when trying the plugin again

Unknown column 'coalesce(c.Score' in 'order clause'
The error occurred on or near: /home/foxholeforums/public_html/library/database/class.database.php
403: // If we get here then the pdo statement prepared properly.
404: break;
405:
406: } catch (Gdn_UserException $uex) {
407: trigger_error($uex->getMessage(), E_USER_ERROR);
408: } catch (Exception $ex) {
409: list($state, $code, $message) = $pDO->errorInfo();
410:
411: // If the error code is consistent with a disconnect, attempt to retry
Backtrace:
/home/foxholeforums/public_html/library/database/class.database.phpPHP::gdn_ErrorHandler();
[/home/foxholeforums/public_html/library/database/class.database.php:407] PHP::trigger_error();
[/home/foxholeforums/public_html/library/database/class.sqldriver.php:1707] Gdn_Database->query();
[/home/foxholeforums/public_html/library/database/class.sqldriver.php:664] Gdn_SQLDriver->query();
[/home/foxholeforums/public_html/applications/vanilla/models/class.commentmodel.php:300] Gdn_SQLDriver->get();
[/home/foxholeforums/public_html/applications/vanilla/controllers/class.discussioncontroller.php:162] CommentModel->getByDiscussion();
[/home/foxholeforums/public_html/library/core/class.dispatcher.php:845] DiscussionController->index();
[/home/foxholeforums/public_html/library/core/class.dispatcher.php:274] Gdn_Dispatcher->dispatchController();
[/home/foxholeforums/public_html/index.php:29] Gdn_Dispatcher->dispatch();
Variables in local scope:
[sql] 'select c.*
from GDN_Comment c
join (select CommentID
from GDN_Comment c
where c.DiscussionID = 28
order by coalesce(c.Score asc, 0) desc, c.CommentID asc
limit 20) c2 on c.CommentID = c2.CommentID'
[inputParameters] array (
)
[options] array (
'Type' => 'select',
'Slave' => NULL,
'ReturnType' => 'DataSet',
)
[returnType] 'DataSet'
[tries] 2
[try] 0
[pDO] array (
)
[pDOStatement] false
[state] '42S22'
[code] 1054
[message] 'Unknown column \'coalesce(c.Score\' in \'order clause\''
[uex] array (
)

Additional information for support personnel:
Application: Vanilla
Application Version: 2.6.4
PHP Version: 7.0.33
Operating System: Linux
Server Software: Apache
Referer: categories/forum-announcements
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36
Request Uri: /discussion/28/forum-icons-and-other-tweaks
Controller: PHP
Method: gdn_ErrorHandler

If you have any idea as to what I should do, I'd much appreciate it. I don't know how to get this plugin to work :( Deactivating other plugins and applications didn't help either. Thanks

Comments

  • Update:

    Installed brand new fresh copy of vanilla forums on a subdomain and enabled this plugin. Still gave me issues.

    Fatal Error in PHP.gdn_ErrorHandler();
    Unknown column 'coalesce(c.Score' in 'order clause'
    The error occurred on or near: /home/foxholeforums/dev/library/database/class.database.php
    403: // If we get here then the pdo statement prepared properly.
    404: break;
    405:
    406: } catch (Gdn_UserException $uex) {
    407: trigger_error($uex->getMessage(), E_USER_ERROR);
    408: } catch (Exception $ex) {
    409: list($state, $code, $message) = $pDO->errorInfo();
    410:
    411: // If the error code is consistent with a disconnect, attempt to retry
    Backtrace:
    /home/foxholeforums/dev/library/database/class.database.phpPHP::gdn_ErrorHandler();
    [/home/foxholeforums/dev/library/database/class.database.php:407] PHP::trigger_error();
    [/home/foxholeforums/dev/library/database/class.sqldriver.php:1707] Gdn_Database->query();
    [/home/foxholeforums/dev/library/database/class.sqldriver.php:664] Gdn_SQLDriver->query();
    [/home/foxholeforums/dev/applications/vanilla/models/class.commentmodel.php:300] Gdn_SQLDriver->get();
    [/home/foxholeforums/dev/applications/vanilla/controllers/class.discussioncontroller.php:162] CommentModel->getByDiscussion();
    [/home/foxholeforums/dev/library/core/class.dispatcher.php:845] DiscussionController->index();
    [/home/foxholeforums/dev/library/core/class.dispatcher.php:274] Gdn_Dispatcher->dispatchController();
    [/home/foxholeforums/dev/index.php:29] Gdn_Dispatcher->dispatch();
    Variables in local scope:
    [sql] 'select c.*
    from GDN_Comment c
    join (select CommentID
    from GDN_Comment c
    where c.DiscussionID = 1
    order by coalesce(c.Score asc, 0) desc, c.CommentID asc
    limit 30) c2 on c.CommentID = c2.CommentID'
    [inputParameters] array (
    )
    [options] array (
    'Type' => 'select',
    'Slave' => NULL,
    'ReturnType' => 'DataSet',
    )
    [returnType] 'DataSet'
    [tries] 2
    [try] 0
    [pDO] array (
    )
    [pDOStatement] false
    [state] '42S22'
    [code] 1054
    [message] 'Unknown column \'coalesce(c.Score\' in \'order clause\''
    [uex] array (
    )

  • KasparKaspar ✭✭✭

    I use it on 2.6.4 (and 2 previous versions).
    Recall having some issue at first.
    Pretty sure I found a solution in the comments on the plugin.

    Sorry, can't test or search for it now. At work.

  • jhayes88jhayes88 New
    edited January 2019

    @Kaspar said:
    I use it on 2.6.4 (and 2 previous versions).
    Recall having some issue at first.
    Pretty sure I found a solution in the comments on the plugin.

    Sorry, can't test or search for it now. At work.

    Hmm. I think I found the comment you're talking about. Looking into it now.

    Edit: My PHP knowledge is limited and their explanation is a little advanced. hmm

  • KasparKaspar ✭✭✭

    Ah, sorry man.
    I might recall correct about having issue.
    But I was totally off regarding the actual plugin.
    I use this
    https://open.vanillaforums.com/addon/discussionpolls-plugin

Sign In or Register to comment.