Jump to content

Product Reviews Not Showing


dianepep

Recommended Posts

I'm having an issue with my product reviews not showing. I opened a second store and copied my review table from my original stores database to my new stores database but none of the reviews are showing. In case I messed something up copying the Review table, as a test I went into my Admin Panel and manually added a review and it still says no reviews and none show on the site. I went onto my site and wrote a review that way and it does not show on the site and in the Admin Panel it still says no reviews. Anyone have any ideas? I appreciate any help and thanks ahead of time!

Link to comment
Share on other sites

  • Replies 63
  • Created
  • Last Reply

Would you perhaps be searching with a filter on a particular product? The URL has just this: ?_g=products&node=reviews

The CubeCart_reviews database table has a column for the product_id. In admin, after the CubeCart code gets the recordset from the reviews database table, for each record, a query is made on the CubeCart_inventory table for that product_id.

If there is no inventory item with that product_id, a query is sent to CubeCart_reviews to delete that record. Thus, if you didn't also copy over the CubeCart_inventory table, nothing will show and (probably) all records will have been deleted from CubeCart_reviews.

However, a review written on the storefront should be valid as the review was written against a valid product. But it needs to be 'approved' in admin. But it doesn't show.... Hm...

Is the "No reviews" message on a red banner, or simple mention where the table of reviews should be?

Link to comment
Share on other sites

I didn't copy any other tables over but I manually added the product and all other info. The Product_id is 1 for my product in Cubecart_inventory but in Cubecart_reviews( that I copied over from my first store)the product_id is 4 because it is the fourth product I created on the store, so I manually changed all records in Cubecart_inventory product_id from a 4 to a 1 so the reviews will match the inventory, but they still do not show nor do any show when I manually enter a review. 

When I click on Admin Panel under Reviews it just says "no reviews have been made" and also on the website there are no reviews being shown. 

Link to comment
Share on other sites

In admin, Store Settings, Advanced tab, enable debug mode and enter your IP address in the adjacent field (www.showmyip.com). Then go to the Reviews list.

Below the page content is a grey debug area that lists all the database queries made.

At about the 13th query, it should say:
SELECT SQL_CALC_FOUND_ROWS * FROM `CubeCart_reviews` ORDER BY `time` DESC LIMIT 10 OFFSET 0;

 

Link to comment
Share on other sites

26 minutes ago, bsmither said:

In admin, Store Settings, Advanced tab, enable debug mode and enter your IP address in the adjacent field (www.showmyip.com). Then go to the Reviews list.

Below the page content is a grey debug area that lists all the database queries made.

At about the 13th query, it should say:
SELECT SQL_CALC_FOUND_ROWS * FROM `CubeCart_reviews` ORDER BY `time` DESC LIMIT 10 OFFSET 0;

 

I enabled debug and added my ip. I'm not sure what you mean by go to 'Reviews list'? Do you mean to look for reviews on my webpage or somewhere in the Admin Panel?

Link to comment
Share on other sites

9 hours ago, bsmither said:

Yes, in admin, view the Reviews administration page.

I see in the System Error Log it says "File: [dashboard.index.inc.php] Line: [312] "SELECT SQL_CALC_FOUND_ROWS * FROM `ilmbb_CubeCart_reviews` LIMIT 25 OFFSET 0;" - Table 'dbs432076.ilmbb_CubeCart_reviews' doesn't exist".   So it's saying my table does not exist. I guess I did something wrong when I copied it over from my first store's database to my second store's database. When I go in Phpmyadmin it shows the table under database dbs432076 ilmbb_CubeCart_reviews and lists the data in it but the error log says it does not exist. I'm not sure why.

Link to comment
Share on other sites

I also see this error from when I manually entered a review:

"File: [cubecart.class.php] Line: [2733] "INSERT INTO `ilmbb_CubeCart_reviews` (`name`,`email`,`title`,`review`,`customer_id`,`anon`,`rating`,`product_id`,`ip_address`,`time`) VALUES ('test','[email protected]','test review','this is a test','0','0','5','1','73.233.137.133','1593324109');" - Table 'dbs432076.ilmbb_CubeCart_reviews' doesn't exist"

and this:

"File: [products.reviews.inc.php] Line: [212] "SELECT SQL_CALC_FOUND_ROWS * FROM `ilmbb_CubeCart_reviews` LIMIT 10 OFFSET 0;" - Table 'dbs432076.ilmbb_CubeCart_reviews' doesn't exist"

 

So even though I see my table under the database in myphpadmin, my store cannot find it so I messed it up somehow copying it over. Maybe I should copy the first stores Cubecart_inventory table over also instead of manually entering it?

Link to comment
Share on other sites

It is strange. If this second store had CubeCart installed as usual, there would be a table named CubeCart_reviews, but if copied in whole (as opposed to just the INSERT data part) from another database, maybe the table prefix characters are different - something other than ilmbb_.

Link to comment
Share on other sites

3 hours ago, bsmither said:

It is strange. If this second store had CubeCart installed as usual, there would be a table named CubeCart_reviews, but if copied in whole (as opposed to just the INSERT data part) from another database, maybe the table prefix characters are different - something other than ilmbb_.

The first store database was called rojo so the table was rojo_CubeCart_reviews and I copied it over and renamed it to the second store's database name ilmbb_CubeCart_reviews. 

 

Link to comment
Share on other sites

This is all of the recent errors in the System Error Log: Sorry I'm having a difficult time getting them to paste neatly.

[<strong>Notice</strong>] /homepages/1/d236694210/htdocs/clickandbuilds/cubecart/Ilovemybigbootyshop/admin_bdoybl/sources/settings.errorlog.inc.php:69 - Undefined variable: smarty_data
 
Today, 01:53 [<strong>Notice</strong>] /homepages/1/d236694210/htdocs/clickandbuilds/cubecart/Ilovemybigbootyshop/classes/db/database.class.php:960 - `product_id` is not allowed as a key in 'CubeCart_reviews' table!
 
Today, 01:53 File: [products.reviews.inc.php] Line: [212] "SELECT SQL_CALC_FOUND_ROWS * FROM `ilmbb_CubeCart_reviews` LIMIT 10 OFFSET 0;" - Table 'dbs432076.ilmbb_CubeCart_reviews' doesn't exist
 
Today, 01:53 File: [products.reviews.inc.php] Line: [212] "SELECT SQL_CALC_FOUND_ROWS * FROM `ilmbb_CubeCart_reviews` LIMIT 10 OFFSET 0;" - Table 'dbs432076.ilmbb_CubeCart_reviews' doesn't exist
 
Today, 01:53 [<strong>Notice</strong>] /homepages/1/d236694210/htdocs/clickandbuilds/cubecart/Ilovemybigbootyshop/admin_bdoybl/sources/products.reviews.inc.php:121 - Undefined index: field
 
Today, 01:53 [<strong>Notice</strong>] /homepages/1/d236694210/htdocs/clickandbuilds/cubecart/Ilovemybigbootyshop/admin_bdoybl/sources/products.reviews.inc.php:121 - Undefined index: sort
 
Today, 01:53 File: [products.reviews.inc.php] Line: [212] "SELECT SQL_CALC_FOUND_ROWS * FROM `ilmbb_CubeCart_reviews` LIMIT 10 OFFSET 0;" - Table 'dbs432076.ilmbb_CubeCart_reviews' doesn't exist
 
Today, 01:53 File: [catalogue.class.php] Line: [1590] "SELECT `rating` FROM `ilmbb_CubeCart_reviews` WHERE ilmbb_CubeCart_reviews.product_id = '1' AND ilmbb_CubeCart_reviews.approved = '1' ;" - Table 'dbs432076.ilmbb_CubeCart_reviews' doesn't exist
 
Today, 01:53 File: [catalogue.class.php] Line: [398] "SELECT SQL_CALC_FOUND_ROWS * FROM `ilmbb_CubeCart_reviews` WHERE ilmbb_CubeCart_reviews.approved = '1' AND ilmbb_CubeCart_reviews.product_id = '1' ORDER BY time DESC LIMIT 5 OFFSET 0;" - Table 'dbs432076.ilmbb_CubeCart_reviews' doesn't exist
 
Today, 01:53 [<strong>Notice</strong>] /homepages/1/d236694210/htdocs/clickandbuilds/cubecart/Ilovemybigbootyshop/classes/gui.class.php:1301 - Undefined variable: random_product
 
Today, 01:53 File: [cubecart.class.php] Line: [2733] "INSERT INTO `ilmbb_CubeCart_reviews` (`name`,`email`,`title`,`review`,`customer_id`,`anon`,`rating`,`product_id`,`ip_address`,`time`) VALUES ('diane','[email protected]','test','this is a test review.','0','0','5','1','2601:49:0:df40:69d2:2029:5c65:cf30','1593481988');" - Table 'dbs432076.ilmbb_CubeCart_reviews' doesn't exist
Link to comment
Share on other sites

All these error messages are consistent with not being able to access or not being able to find a database table.

Apparently, the database server admin can GRANT access (permissions) to a database on a per table basis.

If so, and if those permissions got messed up in the move/rename, then maybe:

1. In phpMyAdmin, have that utility show you the 'backup/restore' SQL statements for the existing ilmbb_CubeCart_reviews from dbs432076.
2. In CubeCart, admin, Maintenance, Query Database tab, enter those statements into the box and click Go.
Or, that is problematic, enter the following in the box and click Go. (It won't have the existing records.)

CREATE TABLE IF NOT EXISTS `ilmbb_CubeCart_reviews` (
	`id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
	`approved` SMALLINT(1) UNSIGNED NOT NULL DEFAULT '0',
	`product_id` INT UNSIGNED NOT NULL DEFAULT '0',
	`customer_id` INT UNSIGNED NOT NULL DEFAULT '0',
	`rating` DECIMAL(2,1) UNSIGNED NOT NULL DEFAULT '0.0',
	`vote_up` INT NOT NULL DEFAULT '0',
	`vote_down` INT NOT NULL DEFAULT '0',
	`anon` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0',
	`name` VARCHAR(255) NOT NULL,
	`email` VARCHAR(254) NOT NULL,
	`title` VARCHAR(255) NOT NULL,
	`review` TEXT NOT NULL,
	`ip_address` VARCHAR(45) NOT NULL COMMENT 'Supports IPv6 addresses',
	`time` INT UNSIGNED NOT NULL,
	PRIMARY KEY (`id`),
	KEY `product_id` (`product_id`),
	KEY `vote_up` (`vote_up`),
	KEY `vote_down` (`vote_down`),
	KEY `approved` (`approved`),
	FULLTEXT KEY `fulltext` (`name`,`email`,`title`,`review`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; #EOQ

The reason we are doing this is so that we can be sure it is CubeCart's user that is getting the correct permissions on this table.

If all the above fails, then please request assistance from your hosting provider.

Link to comment
Share on other sites

hmm. another interesting thing I just noticed I received an email stating I have received a new product review from when I entered a review manually. There is a link to click to take you to the review to moderate and when I click the link it takes me to the Admin Panel but still says "no reviews have been made". Maybe I will delete the review table I copied over and then see if manually entered reviews show up then and take it from there. 

Link to comment
Share on other sites

I'm thinking somehow I messed things up when I copied the reviews table into my new dataase. I will try setting the database back to its original and then try copying again and see what happens. If I still can't figure it out I will just have to reset the databases and manually copy over all reviews. Thanks for your help. I appreciate you taking your time to offer suggestions and will let you know how it goes. 

Link to comment
Share on other sites

You can have phpMyAdmin give you a SQL file that will re-create a table, including its rows of data.

You didn't mention what the process was that you used to do the copy, so know that the SQL file is human readable/editable in a programmer's text editor.

You will need to edit the name of the table in the CREATE line to use your designated table prefix. (This was discussed earlier.)

 

Link to comment
Share on other sites

1 hour ago, bsmither said:

You can have phpMyAdmin give you a SQL file that will re-create a table, including its rows of data.

You didn't mention what the process was that you used to do the copy, so know that the SQL file is human readable/editable in a programmer's text editor.

You will need to edit the name of the table in the CREATE line to use your designated table prefix. (This was discussed earlier.)

 

I used phpMyAdmin. I just exported the reviews database and downloaded it to my computer and then imported it to the new domain's database and changed the table's name to reflect the new database. I've never used phpMyAdmin before so I'm not sure if I did it correct. Never used SQL either. I've reversed everything back out again and am back to my original info but I have been having another issue and now I wonder if it's related. When I go into Maintenance and try to clear the system error log the screens goes blank and it just freezes. After I converted everything back to before I copied the review database the maintenance section to clear error log still freezes. I'm not sure how to correct this and am thinking about just reinstalling cc and starting over from scratch. 

Link to comment
Share on other sites

21 hours ago, bsmither said:

The error log may have the reason why the freeze happens. (https://forums.cubecart.com/topic/51550-how-to-create-the-error-log/)

Looks like my reply got deleted or I never hit submit. Thanks for the info. I read the link and created the file and then went into Admin Panel and tried to clear my error log again. It still freezes on a blank screen. There was no error_log file in the main folder but this time after I hit the Back button on my browser to get out of the blank screen I checked the error log and it did clear! Yeah! It's not just the Clear Error Log that is doing it. It's also Clear Admin Activity, Clear Email Logs, and Clear Request Logs. Does that mean it's an issue with Cubecart?

 

Also as far as my reviews table, I reverted back to my original database and can now enter reviews so it was something I did when I copied the database over. I've got a few tests I'm going to run and if I can't get it copied over correctly I will just enter them manually.

Thanks again for your help. 

Link to comment
Share on other sites

PHP is fairly reliable about getting its errors logged. There are two instances where I can guess why a log file is not getting created:

1. The hosting provider has somehow managed to really lock down the INI setting for where to log errors.
2. The SMARTY template rendering engine also gets tied into PHP's error reporting sub-system. If there were an issue with rendering a template, that has been known to cause a blank screen with absolutely no errors getting reported. That's not so much an issue anymore with the latest versions of CubeCart.

(I saw your reply in the "How to..." conversation.)

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.




×
×
  • Create New...