index product_id not found

Created on 19 May 2023, almost 2 years ago
Updated 20 May 2023, almost 2 years ago

Describe your bug or feature request.

I am getting the following error after upgrading the Commerce core from 1.15 to 1.17

Notice: Undefined index: product_id in commerce_product_reference_get_first_product_id() (line 487 of D:\VPSite\sites\all\modules\commerce\modules\product_reference\commerce_product_reference.module).

and

PDOException: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND cpr.field_subject_area_product_id = cp.product_id) WHERE (cp.product_id IN ' at line 1: SELECT cp.product_id AS product_id FROM {commerce_product} cp INNER JOIN {field_data_field_subject_area} cpr ON (cpr.entity_type = 'taxonomy_term' AND cpr.entity_id = 1 AND cpr.revision_id = AND cpr.field_subject_area_product_id = cp.product_id) WHERE (cp.product_id IN (:db_condition_placeholder_0)) AND (cp.status = :db_condition_placeholder_1) ORDER BY cpr.delta ASC; Array ( [:db_condition_placeholder_0] => [:db_condition_placeholder_1] => 1 ) in commerce_product_reference_get_first_product_id() (line 510 of D:\VPSite\sites\all\modules\commerce\modules\product_reference\commerce_product_reference.module).

If a bug, provide steps to reproduce it from a clean install.

it is not a feature request but yes it seems to be a bug.
I website is a live website, when i update commerce core it is giving this error message. Kidnly help.

💬 Support request
Status

Closed: works as designed

Version

1.17

Component

Product reference

Created by

🇮🇳India Neeraj420

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024