Jump to content
dianepep

Product Reviews Not Showing

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!

Share this post


Link to post
Share on other sites

Posted (edited)

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?

Edited by bsmither

Share this post


Link to post
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. 

Share this post


Link to post
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;

 

Share this post


Link to post
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?

Share this post


Link to post
Share on other sites

Yes, in admin, view the Reviews administration page.

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites
Posted (edited)

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?

Edited by dianepep
added info

Share this post


Link to post
Share on other sites

I am wondering if, in phpMyAdmin, you might be looking at a different database name - something that is not dbs432076.

Share this post


Link to post
Share on other sites

I will check again to be sure. Usually when I have issues it's the stupid little mistakes I make like that. 

Share this post


Link to post
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_.

Share this post


Link to post
Share on other sites
Posted (edited)
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. 

 

Edited by dianepep
correction

Share this post


Link to post
Share on other sites

I'm not finding any articles that might be complaining of having renamed a table, then that table is no longer accessible.

So, I am out of ideas (that can be discussed on the forums).

Share this post


Link to post
Share on other sites
Posted (edited)

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
Edited by dianepep

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

oh I just realized my two stores are not running the same version, would that cause database issues? The first store I never upgraded so its still at 6.2.5

Share this post


Link to post
Share on other sites

The schema of CubeCart_reviews has not changed between CC625 and CC629.

Share this post


Link to post
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. 

Edited by dianepep
added info

Share this post


Link to post
Share on other sites

I am out of ideas. Anything more would require access to the database server machine at levels deeper than a hosted account is permitted.

Please request assistance from your hosting provider.

Share this post


Link to post
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. 

Share this post


Link to post
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.)

 

Edited by bsmither

Share this post


Link to post
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. 

Edited by dianepep
modifications

Share this post


Link to post
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. 

Share this post


Link to post
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.)

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...