Database error help

I've recently made two changes today which resulted in a database error. I turned off all ratings in the database by changing the values from 1 to 0.  The 2nd thing I did was convert a couples profile to a single profile.  I did this by changing the numerical value to the same as all the other single members. Then I removed the (2) profile entry tied to the database entry that was the 2nd person tied to the couple account.  Everything appeared to go really smooth. The account now has a single profile image and description and functions for the user as expected so far.  Hours later here is the email the cron job sends me every couple hours or so.

 

Database error in My Website

 

Query:SELECT COUNT(`Profiles`.`ID`) FROM `Profiles` WHERE `Profiles`.`Status` = 'Active' and (`Profiles`.`Couple` = 0 or `Profiles`.`Couple` > `Profiles`.`ID`) AND `pr_rating_count` > 1Mysql error: Unknown column 'pr_rating_count' in 'where clause'

 

Found error in the file '/home/www/mywebsite.com/templates/base/scripts/BxBaseIndexPageView.php' at line203.

Called 'db_value' function with erroneous argument #0.

Quote · 19 Nov 2015

This is the particular table:

 

CREATE TABLE `sys_profile_rating` (
  `pr_id` int(10) unsigned NOT NULL default '0',
  `pr_rating_count` int(11) NOT NULL default '0',
  `pr_rating_sum` int(11) NOT NULL default '0',
  UNIQUE KEY `med_id` (`pr_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

Geeks, making the world a better place
Quote · 19 Nov 2015

This is a bug in Dolphin. The error is coming from the Members block on the homepage. The "Top members" tab is based on rating. When rating is enabled, the query to retrieve the Top members joins the `Profiles` table to the `sys_profile_rating` table.  When rating is disabled, the join to the `sys_profile_rating` table does not occur which results in an invalid query.


The following solution should work (i have not tested). However, there may be other places where similar problem occurs when rating is turned off.

In templates\base\scripts\BxBaseIndexPageView.php
Find :

       $aModes = array('last', 'top', 'online');

Replace with :
 
       $oVotingView = new BxTemplVotingView ('profile', 0, 0);
       if ($oVotingView->isEnabled())         
            $aModes = array('last', 'top', 'online');
        else
            $aModes = array('last', 'online');

 

Boonex needs to think through this and implement a better solution though. Maybe when rating is turned off, Top Members should be based on Views instead of Rating or something to that effect.

Paypal email is jeromemingo@gmail.com - http://www.boonex.com/market/posts/modzzz
Quote · 19 Nov 2015

This is a bug in Dolphin. The error is coming from the Members block on the homepage. The "Top members" tab is based on rating. When rating is enabled, the query to retrieve the Top members joins the `Profiles` table to the `sys_profile_rating` table.  When rating is disabled, the join to the `sys_profile_rating` table does not occur which results in an invalid query.


The following solution should work (i have not tested). However, there may be other places where similar problem occurs when rating is turned off.

In templates\base\scripts\BxBaseIndexPageView.php
Find :

       $aModes = array('last', 'top', 'online');

Replace with :
 
       $oVotingView = new BxTemplVotingView ('profile', 0, 0);
       if ($oVotingView->isEnabled())         
            $aModes = array('last', 'top', 'online');
        else
            $aModes = array('last', 'online');

 

Boonex needs to think through this and implement a better solution though. Maybe when rating is turned off, Top Members should be based on Views instead of Rating or something to that effect.

 

So far so good. You're 2 for 2 for the past couple days getting my site lined out.  Thank you.

Quote · 19 Nov 2015

the vendor does not accept payments ( BITPAY) 

 

ANYONE CAN HELP ? I GET ERROR : 

the vendor does not accept payments ( BITPAY) 

thanks :) 

Quote · 19 Nov 2015
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.