The following error happen when removing an item from the cart. I'm running latest core, entity and other conntributed modules.

PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'db.field_config_entity_type' doesn't exist: SELECT * FROM {field_data_line_items} AS fd LEFT JOIN {field_config_entity_type} AS fc ON fd.etid = fc.etid WHERE line_items_line_item_id = :line_item_id; Array ( [:line_item_id] => 2 ) in commerce_line_item_commerce_line_item_delete() (line 246 of /somepath/commerce/modules/line_item/commerce_line_item.module).

Comments

rszrama’s picture

Ahh, yeah, that one. It's from commerce_line_item_commerce_line_item_delete(), a function that executes a query against a table that no longer exists in RC 2 (it got taken out in a recent API changing patch... really, they always think no one's using these APIs : P). In any event, that code itself can probably be replaced with EntityFieldQuery anyways.

The quick fix would likely be to just remove the JOIN as I think it's no longer necessary.

rszrama’s picture

Status: Active » Fixed

So, apparently this code is deprecated. In testing, I discovered that the supposed functionality the hook implemented was occurring without the hook. In other words, as the line item is deleted from the cart, line item reference fields referencing the line item were getting their values updated automatically to remove the deleted line item. Amazing... I honestly don't know when this started happening.

Commit to remove the hook implementation altogether:

https://github.com/rszrama/drupalcommerce/commit/b340c68415c452e9ad412ef...

recidive’s picture

Good catch! Thanks for fixing!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.