1. Chad Taljaardt

    Chad Taljaardt - Jan 25, 2014 New Member

    Credit
    Point
    Hello, can someone please help me figure out the problem of this error?

    [​IMG]


    Here is the Details of the Error :

    Error Info
    Code:
    Zend_Db_Statement_Mysqli_Exception: Mysqli prepare error: Column 'like_count' in field list is ambiguous - library/Zend/Db/Statement/Mysqli.php:77
    Generated By: Unknown Account, Today at 10:22 AM
    
    Stack Trace :

    Code:
    #0 /home/nullse/public_html/library/Zend/Db/Statement.php(115): Zend_Db_Statement_Mysqli->_prepare('?????SELECT use...')
    #1 /home/nullse/public_html/library/Zend/Db/Adapter/Mysqli.php(381): Zend_Db_Statement->__construct(Object(Zend_Db_Adapter_Mysqli), '?????SELECT use...')
    #2 /home/nullse/public_html/library/Zend/Db/Adapter/Abstract.php(478): Zend_Db_Adapter_Mysqli->prepare('?????SELECT use...')
    #3 /home/nullse/public_html/library/XenForo/Model.php(219): Zend_Db_Adapter_Abstract->query('?????SELECT use...', Array, 2)
    #4 /home/nullse/public_html/library/XenForo/Model/User.php(297): XenForo_Model->fetchAllKeyed('?????SELECT use...', 'user_id')
    #5 /home/nullse/public_html/library/Brivium/ReferralCreditSystem/CronEntry/Referral.php(29): XenForo_Model_User->getUsers(Array, Array)
    #6 [internal function]: Brivium_ReferralCreditSystem_CronEntry_Referral::runPromotions(Array)
    #7 /home/nullse/public_html/library/XenForo/Model/Cron.php(356): call_user_func(Array, Array)
    #8 /home/nullse/public_html/library/XenForo/Deferred/Cron.php(24): XenForo_Model_Cron->runEntry(Array)
    #9 /home/nullse/public_html/library/XenForo/Model/Deferred.php(252): XenForo_Deferred_Cron->execute(Array, Array, 9.99999499321, '')
    #10 /home/nullse/public_html/library/XenForo/Model/Deferred.php(378): XenForo_Model_Deferred->runDeferred(Array, 9.99999499321, '', false)
    #11 /home/nullse/public_html/library/XenForo/Model/Deferred.php(331): XenForo_Model_Deferred->_runInternal(Array, NULL, '', false)
    #12 /home/nullse/public_html/deferred.php(23): XenForo_Model_Deferred->run(false)
    #13 {main}
    
    Request State
    Code:
    array(3) {
    ["url"] => string(35) "http://www.null-sec.ru/deferred.php"
    ["_GET"] => array(0) {
    }
    ["_POST"] => array(4) {
    ["_xfRequestUri"] => string(79) "/index.php?threads/what-sub-sections-would-you-like-in-the-gaming-sections.296/"
    ["_xfNoRedirect"] => string(1) "1"
    ["_xfToken"] => string(8) "********"
    ["_xfResponseType"] => string(4) "json"
    }
    }
    
     
    Loading...
  2. Brivium

    Brivium - Jan 27, 2014 XenForo Services Staff Member

    Credit
    Point
    Hello,

    We will check your issues and fix this soon.

    Regards,
     
    #2
  3. Brivium

    Brivium - Jan 27, 2014 XenForo Services Staff Member

    Credit
    Point
    Hi Chad Taljaardt,

    Can you give us list of your installed add-ons.

    Regards,
     
    #3
  4. Chad Taljaardt

    Chad Taljaardt - Jan 27, 2014 New Member

    Credit
    Point
    [​IMG]
     
    #4
  5. Brivium

    Brivium - Jan 28, 2014 XenForo Services Staff Member

    Credit
    Point
    Hello,

    Please try to disable Post Ratings and let's us know what's happens ?

    Regards,
     
    #5
  6. Chad Taljaardt

    Chad Taljaardt - Jan 30, 2014 New Member

    Credit
    Point
    it goes away when post ratings is disabled :)

    but i need post ratings :/
     
    #6
  7. Brivium

    Brivium - Feb 1, 2014 XenForo Services Staff Member

    Credit
    Point
    Hello,

    We don't have a copy of that add-on so can't confirm, but it would be up to @Luke Foreman to fix if it is that add-on.

    Regards,
     
    #7
  8. Chad Taljaardt

    Chad Taljaardt - Feb 2, 2014 New Member

    Credit
    Point

    Do you want me to send you a copy so you can look into it?
     
    #8
  9. Brivium

    Brivium - Feb 2, 2014 XenForo Services Staff Member

    Credit
    Point
    If Luke Foreman agree for that, you can send us a copy via conversation or email: brivium@gmail.com

    Regards,
     
    #9
  10. Brivium

    Brivium - Feb 21, 2014 XenForo Services Staff Member

    Credit
    Point
    Hello,

    Thanks for your help. We found issue from Post Rating, Luke Forman used like_count without specifying a table name. You can fix that by follow guide below.

    Open file library/Dark/PostRating/Model/User.php and find
    Code:
    if($options->dark_postrating_like_id > 0 && $options->dark_postrating_like_show){             
                    $joinOptions['selectFields'] .= "
                        , ((select sum(count_received) from dark_postrating_count where user_id = user.user_id and rating in (".implode(",", $positive).")) + like_count) as positive_rating_count_incl_likes
    Change to

    Code:
    if($options->dark_postrating_like_id > 0 && $options->dark_postrating_like_show){             
                    $joinOptions['selectFields'] .= "
                        , ((select sum(count_received) from dark_postrating_count where user_id = user.user_id and rating in (".implode(",", $positive).")) + user.like_count) as positive_rating_count_incl_likes
    Regards,
     
    #10