Latest News: (loading..)
Sign in to follow this  
Followers 0

ACCESS VIOLATION between 'option level reviews' in 'Service' and CONTRAINT FK

3 posts in this topic

Hi Harald,

hello solingen ? we have a problem


ALTER TABLE osc_reviews add CONSTRAINT idx_reviews_customers_id FOREIGN KEY (customers_id) REFERENCES osc_customers (customers_id) ON DELETE CASCADE ON UPDATE CASCADE;


but with enableReviews() method in \osCommerce\OM\Core\Site\Shop\Reviews class, if the constant SERVICE_REVIEW_ENABLE_REVIEWS = 0


we have :


PHP Warning: PDOStatement::execute(): SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`oscom3`.`osc_reviews`, CONSTRAINT `idx_reviews_customers_id` FOREIGN KEY (`customers_id`) REFERENCES `osc_customers` (`customers_id`) ON DELETE CASCADE ON UPDATE CASCADE) in C:\UwAmp\www\oscom3\oscommerce\osCommerce\OM\Core\PDOStatement.php on line 65


and for Application code :


PHP Notice: insert into osc_reviews (products_id, customers_id, customers_name, reviews_rating, languages_id, reviews_text, reviews_status, date_added) values (:products_id, :customers_id, :customers_name, :reviews_rating, :languages_id, :reviews_text, :reviews_status, now()) in C:\UwAmp\www\oscom3\oscommerce\osCommerce\OM\Core\PDOStatement.php on line 68


because this parameter is null in this query ( static method : saveEntry() ):


$Qreview->bindInt(':customers_id', $data['customer_id']);


maybe I found a solution ...



Share this post

Link to post
Share on other sites

a mistake :

the real test :


recursive condition : true / true

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
Followers 0