 | |  | | | ReviewPost Bug Reports Let us know about any post installation problems you are having with ReviewPost. |
April 15th, 2005, 10:01 AM
|
#21 (permalink)
| | Member Verified Customer
Join Date: Jun 2002 Location: Northern California
Posts: 383
|
I went through the code in showcat. It is loading rp_product.numreviews
I checked my database and that field is in all cases zero. So it seems the problem lies in whatever is supposed to be loading that field, not in showcat. It's interesting to me that the counts are correct at the product level. Apparently the review count is derived in some other way in showproduct?
It's also a little odd that Admin Count doesn't correct rp_product.numreviews. I would think it would do that. I wouldn't be surprised if it is in some way tied to this issue with all the reviews going into the moderation queue.
Regards,
Matt
Regards,
Matt
|
| |
April 15th, 2005, 10:02 AM
|
#22 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,683
|
I am running 2.91 here http://www.reeftalk.com/reviews/showcat.php/cat/38
I have enabled anonymous reviews so go ahead and post a bogus review. You see reviews show fine on the showcat page and are updated correct.
Thus my question of are you sure you have the correct files uploaded
|
| |
April 15th, 2005, 10:06 AM
|
#23 (permalink)
| | Member Verified Customer
Join Date: Jun 2002 Location: Northern California
Posts: 383
|
Thanks Chuck but i can see your review counts are showing. I checked that right off when I reported the problem last week.
Can you tell me where rp_product.numreviews gets incremented, calculated or re-tallied?
Regards,
Matt
|
| |
April 15th, 2005, 10:12 AM
|
#24 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,683
|
Matt looks to me like you never ran the upgrade script for one as the review count is transfered there.
The update stuff in admin is to update total posts and products etc.
You need to run the upgrade script to transfer the totals on individual products and things will be fine from there on
Last edited by Chuck S; April 15th, 2005 at 10:16 AM.
|
| |
April 15th, 2005, 10:18 AM
|
#25 (permalink)
| | Member Verified Customer
Join Date: Jun 2002 Location: Northern California
Posts: 383
|
What upgrade script should I be running to correct this problem? My download was
Sunday, March 20, 2005, 4:19:16 PM
Powered by: ReviewPost 2.9 vB3 Enhanced
I saw only the suggestion you made in this thread to do this: Quote: |
INSERT INTO settings VALUES (100,'Allow members to rate products?','allowrate','','yes',20,5)
| I did that and the ratings at least started to show. You're right I have not run any upgrade scripts.
Regards,
Matt
|
| |
April 15th, 2005, 10:36 AM
|
#26 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,683
|
The upgrade from 2.8 to 3.0
The upgrade instructions state to run the upgrade script after uploading the new files ReviewPost 2.91 vB3 Enhanced Released! |
| |
April 15th, 2005, 10:40 AM
|
#27 (permalink)
| | Member Verified Customer
Join Date: Jun 2002 Location: Northern California
Posts: 383
|
Hi Chuck, I pulled down 2.91 just now, but the upgrade in there applies to much older verisons of reviewpost. I never had anything before 2.90. I never had 2.8
It says "This install script will upgrade a 1.X version to ReviewPost to the 2.0 release. Only run this upgrade if you have the
1.X version of the database in place (either by previous upgrades or if upgrading in order to the latest)"
I am confused because the difference between 2.91 and 2.9 seems to be a formalization of the bugfixes I reported for addslashes, search and language problems
I don't think this is the problem.
The reason I asked why the admin utilities didn't recount the reviews was because you suggested it might correct the problem above, which seemed reasonable at the time.
Regards,
Matt
|
| |
April 15th, 2005, 10:43 AM
|
#28 (permalink)
| | Member Verified Customer
Join Date: Jun 2002 Location: Northern California
Posts: 383
| Quote: |
Originally Posted by omegatron | 2.8 to 3.0? The current release is 2.91!? I am really confused Chuck, please help me out here. I don't know what you're asking me to do!
That thread you directed me to says
2.9->2.91 "There are no database changes requiring the upgrade.php script."
Regards,
Matt
Last edited by memobug; April 15th, 2005 at 10:48 AM.
|
| |
April 15th, 2005, 10:54 AM
|
#29 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,683
|
Your not looking at the new upgrade script then.
All the updates are consolidated into one upgrade.php script in the main reviewpost directory. Run the upgrade from 2.8 to 3.0
|
| |
April 15th, 2005, 11:27 AM
|
#30 (permalink)
| | Member Verified Customer
Join Date: Jun 2002 Location: Northern California
Posts: 383
|
It didn't work
the upgrade utility runs through and temporarily patches rp_product.numreviews, but when I added another review the rp_product.numreviews didn't change.
Something is wrong somewhere. Where does rp_product.numreviews get incremented??
Regards,
Matt
|
| |
April 15th, 2005, 11:34 AM
|
#31 (permalink)
| | Member Verified Customer
Join Date: Jun 2002 Location: Northern California
Posts: 383
|
Chuck it seems you have the same problem. http://www.reeftalk.com/reviews/showcat.php/cat/38
Premium Aquatics 682 9.00 October 25, 2003 1:12pm 1 reviews
But there are 2 reviews in the category http://www.reeftalk.com/reviews/show.../cat/38/page/1 Quote:
Anonymous
Junior Member
Registered: September 2002
Posts: 2703 Review Date: October 25, 2003 Recommend? yes | Total Spent: Not Indicated
Pros: Fast service
Cons:
Order from them time and time again
Omegatron
Administrator
Registered: March 2001
Posts: 3115 Review Date: March 18, 2005 Recommend? yes | Total Spent: $400.00
Pros: Timely Deliveries
Cons:
Order from them over and over. Never a bad experience | Now I hope you don't think I am an idiot for not wanting to run an upgrade script from a version that I never had (2.8) to a version that doesn't exist (3.0)?
Regards,
Matt
|
| |
April 15th, 2005, 11:37 AM
|
#32 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,683
|
Matt
I showed you my site and stated you can test. It does get incremented correctly and displays correctly
The upgrade script populates the new field then in showcat.php is this
$query = "SELECT id,user,userid,cat,date,title,description,keywords,bigimage,views,approved,rating,manu,numreviews FROM {$Globals['rp_db_prefix']}products ";
It simply grabs the number reviews and is working as expected from what I see. In reviews.php is this when a new review is posted
$query3 = "UPDATE {$Globals['rp_db_prefix']}products SET lastpost=$julian,numreviews=(numreviews+1) WHERE id=$product";
thus the numreviews is increased by 1
Everything looks and displays fine that I see
Thus so far we have established the upgrade script was not ran but I think if you started with 2.9 as you stated your issue is somewhere in the mix maybe a mix between 2.9 and 2.91 files where maybe Michael fixed the issue? You should see in your reviews.php script the line I posted above which updates the line and if it doesnt then thats the issue. Old File meaning make sure all files on your server are from the current download.
|
| |
April 15th, 2005, 11:44 AM
|
#33 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,683
|
I show 3 reviews by the way for that one?
|
| |
April 15th, 2005, 12:41 PM
|
#34 (permalink)
| | Member Verified Customer
Join Date: Jun 2002 Location: Northern California
Posts: 383
|
Hi Chuck thanks for your help. I think I got to the bottom of this, but it turned up two new bugs.
1) As it turns out Michael (or someone else) did debug this problem in review.php in 2.91 However, it was not properly documented. I am glad that so many of the bugs I reported in 2.9 were corrected (ten at last count) Quote: |
Originally Posted by 2.91_changelog reviews.php
. add stripslashes to fields for editing | but unfortunately it said nothing about this change:
It used to read like this at 2.9
$query3 = "UPDATE {$Globals['rp_db_prefix']}products SET lastpost=$julian WHERE id=$product";
$resultc = ppmysql_query($query3,$link);
2.91 now reads like this
$query3 = "UPDATE {$Globals['rp_db_prefix']}products SET lastpost=$julian, numreviews=(numreviews+1) WHERE id=$product";
$resultc = ppmysql_query($query3,$link);
2) HOWEVER, THERE IS AN ADDITIONAL BUG. When a review is DELETED, the rp_product.numreviews is not decremented properly: Quote: |
Originally Posted by review.php v2.91 around line 311 else {
if ( $delete == "yes" ) {
if ( !is_numeric($postid) ) {
diewell( $Globals['pp_lang']['malform'] );
exit;
}
$query = "DELETE FROM {$Globals['rp_db_prefix']}reviews WHERE id=$postid";
$resulta = ppmysql_query($query,$link);
if ($Globals['cpostcount'] == "yes" && $message != "") {
inc_user_posts( "minus" );
}
$query2 = "UPDATE {$Globals['rp_db_prefix']}categories SET posts=posts-1 WHERE id=$thiscat";
$resultb = ppmysql_query($query2, $link);
upgradecategories($thiscat);
} | We need to decrement rp_products.numreviews too!
3) In light of the issues surrounding the prevalence of improper counts, and so everyone can get their totals back on track after these two counting bugs in 2.90 and 2.91: The following snippet from upgrade.php should be added to the admin_db.php so recounting the database will update the review counters too: (around line 100) Quote:
####### Correct Counts Start
$verq = mysql_query( "SELECT product, count(*) FROM {$rp_db_prefix}reviews GROUP BY product", $link);
while ( list( $prodid, $revcount ) = mysql_fetch_row($verq) ) {
if ( $prodid > 0 && $revcount > 0 ) {
$verq2 = mysql_query( "UPDATE {$rp_db_prefix}products SET numreviews=$revcount WHERE id=$prodid", $link);
}
}
######## Correct Counts (end)
|
4) Yes, we did establish that the upgrade script was never run. I am not sure it ever should have been run or how anyone would know to do that in conflict with the instructions provided.The upgrade script upgrades 2.8 to 2.9 or 3.0 I never had 2.8. I had 2.9. Maybe this issue should be clarified for future upgraders? I don't think running the upgrade at 2.9 made any positive impact; however it actually hurt!:
5) The upgrade script also has a bug: Quote: |
Originally Posted by line550ofupgradephp $query[] = "DELETE FROM {$rp_db_prefix}settings WHERE id=100"; | It wound up dropping my rp_setting(100) which has to be recreated Quote: |
INSERT INTO rp_settings VALUES (100,'Allow members to rate products?','allowrate','','yes',20,5)
| again, otherwise you don't have any ratings displayed.
6)All my files were current. 2.91 didn't exist when I and 2 others reported the problem. 2.91 documentation has an inaccuracy that should be corrected as well as the bug in the upgrade script and review deletion bug.
7) With reference to your own reviewpost review counts, I think the suggestion in 3) would help because when I looked your counts were off. If you've done any review deletions since, your totals probably were impacted.
Best regards,
Matt
Last edited by memobug; April 15th, 2005 at 12:52 PM.
|
| |
April 15th, 2005, 12:50 PM
|
#35 (permalink)
| | Member Verified Customer
Join Date: Jun 2002 Location: Northern California
Posts: 383
|
P.S please feel free to delete all my posts in this thread when Michael or you have a chance to resolve the deletion/upgrade issues.
Thanks!
Matt
|
| |
April 15th, 2005, 12:53 PM
|
#36 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,683
|
Matt I cant comment on Michael's documentation skills
I think all bugs reported to date where fixed in 2.9.1
Thanks for reporting this one. I reported to Michael that the field was missing from a new install. However I did not know he intentionally dropped it in the 2.8 upgrade
$query[] = "DELETE FROM {$rp_db_prefix}settings WHERE id=100";
As far as calculating counts I do not think the adm-db script needs to be modified as that correctly updates the post totals and product totals on the index page just fine.
The proper fix would be this in reviews.php Quote:
Lines 325-326
$query2 = "UPDATE {$Globals['rp_db_prefix']}categories SET posts=posts-1 WHERE id=$thiscat";
$resultb = ppmysql_query($query2, $link);
beneath that we should add
$query3 = "UPDATE {$Globals['rp_db_prefix']}products SET
numreviews=(numreviews-1) WHERE id=$product";
$resultc = ppmysql_query($query3,$link); | I think that would do it. Now off to email these to Michael
|
| |
April 15th, 2005, 01:20 PM
|
#37 (permalink)
| | Member Verified Customer
Join Date: Jun 2002 Location: Northern California
Posts: 383
|
Hi Chuck, thanks for your resposne.
Because of these two bugs, somewhere we need a tool to recount reviews. Mine are all off (and I suspect others are too) adm_db seems to be a logical place to put it.
If you can suggest another way to do it that would be fine, too**, but the category totals are not right, and probably not right for anyone who ever used 2.90 for any length of time. Every time I added a review it didn't take. Every time I deleted a review it didn't decrement.
Maybe just updating/correcting the product_reviewcount total in showproduct or something would work. It's being recalculated there every time anyway??
***I ain't running that upgrade thing again tho'
Thanks,
Matt
|
| |
April 15th, 2005, 01:33 PM
|
#38 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,683
|
Matt
There is no need to recount individual product reviews once the above fix is in place is what I am saying for all logical purposes. Any bugs or stuff like that are usually correct in the scripts and any quick fixes as this sort of recount should be handled in the upgrade script.
The adm-db tool correctly updates post and photo totals for the cats which its designed for. It is not designed to update the products table. The Photopost one doesnt do it either.
If you want to correct the counts from the bug run upgrade.php 2.8-3 again. No harm no foul. I dont think we need to place code in the software that does not need to be there as it would serve no purpose.
We went trolling for a original bug and found it more of a matter of bad documentation of a fix that was already done and in the process you found a new bug which is great.
|
| |
April 15th, 2005, 08:56 PM
|
#39 (permalink)
| | Member Verified Customer
Join Date: Jun 2002 Location: Northern California
Posts: 383
|
Hi Chuck
I also discovered that because of the way it's set up, the upgrade script won't zero a count, even if there are no reviews. Quote: |
if ( $prodid > 0 && $revcount > 0 )
| So if you deleted the last review as I did in a number of cases, "upgrade" isn't going to correct the counts unless that gets fixed to > =0 or something.
Also the settings bug in the upgrade script precludes its general use until it gets corrected.
For me: PHPadmin to the rescue. For anyone else, I don't know. Hopefully these will get ironed out in a future release.
Regards,
Matt
|
| |
April 15th, 2005, 09:20 PM
|
#40 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,683
|
The upgrade script will reset numbers but set the correct amount of reviews.
For someone who thinks they are running in the small margin of bugness yes you could run a query
UPDATE products SET numreviews='0'
then run the upgrade script
|
| | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | | | | Thread Tools | | | | Display Modes | Rate This Thread | Linear Mode | |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is Off | | |
Similar Threads | | Thread | Thread Starter | Forum | Replies | Last Post | | Star Rating | suttercane | ReviewPost Installation & Upgrades | 5 | February 2nd, 2006 02:00 PM | | Poor, Average and Excellent | kushti | Photopost Pro How Do I...? | 0 | January 17th, 2005 04:42 PM | | Image rating | Nautiqeman | Bugs From 1.0.0 | 3 | January 10th, 2005 02:55 PM | | Browse by rating threshold | rbl | vBGallery Suggestions | 0 | December 20th, 2004 08:58 PM | All times are GMT -5. The time now is 03:40 PM. | |