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

Plugin Articles error (Vanilla version 3.3)

Installed the plugin articles. For Vanilla version 3.3. Аrticles are created in the database. Headers and previews are displayed. When going to Аrticle, we get an error:


Fatal Error in PHP.gdn_ErrorHandler();

Unknown column 'RAND()' in 'order clause'


Code debug mode:

The error occurred on or near: /home/blogomedia/domains/krovlya-48.ru/public_html/library/database/class.database.php


417:                if (!$message) {

418:                    $message = $ex->getMessage();

419:                }

420:

421:                trigger_error($message, E_USER_ERROR);

422:            }

423:

424:        }

425:

Backtrace:


/home/blogomedia/domains/krovlya-48.ru/public_html/library/database/class.database.phpPHP::gdn_ErrorHandler();


[/home/blogomedia/domains/krovlya-48.ru/public_html/library/database/class.database.php:421] PHP::trigger_error();


[/home/blogomedia/domains/krovlya-48.ru/public_html/library/database/class.sqldriver.php:1707] Gdn_Database->query();


[/home/blogomedia/domains/krovlya-48.ru/public_html/library/database/class.sqldriver.php:664] Gdn_SQLDriver->query();


[/home/blogomedia/domains/krovlya-48.ru/public_html/applications/articles/models/class.articlemodel.php:259] Gdn_SQLDriver->get();


[/home/blogomedia/domains/krovlya-48.ru/public_html/applications/articles/models/class.articlemodel.php:569] ArticleModel->get();


[/home/blogomedia/domains/krovlya-48.ru/public_html/applications/articles/controllers/class.articlecontroller.php:159] ArticleModel->getSimilarArticles();


[/home/blogomedia/domains/krovlya-48.ru/public_html/library/core/class.dispatcher.php:872] ArticleController->index();


[/home/blogomedia/domains/krovlya-48.ru/public_html/library/core/class.dispatcher.php:289] Gdn_Dispatcher->dispatchController();


[/home/blogomedia/domains/krovlya-48.ru/public_html/index.php:29] Gdn_Dispatcher->dispatch();


Variables in local scope:


[sql] 'select a.*

from `GDN_Article` `a`

where `ArticleID` <> :ArticleID

 and `Status` = :Status

 and `a`.`ArticleCategoryID` = :aArticleCategoryID

order by `RAND()` asc

limit 4'


[inputParameters] array (

 ':ArticleID' => 6,

 ':Status' => 'Published',

 ':aArticleCategoryID' => 1,

)


[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 \'RAND()\' in \'order clause\''


[ex] array (

)


Help! I'm a newbie.

Tagged:

Comments

Sign In or Register to comment.