Closed (duplicate)
Project:
Commerce Core
Version:
7.x-1.3
Component:
Line item
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
5 Oct 2012 at 07:38 UTC
Updated:
8 Oct 2012 at 15:00 UTC
I have create new product type with more options to customize. In Manage Fields there are plenty of Field Collections, Term Reference and one Option Set Reference. When I try to delete Product (entity in Commerce) in Admin Store I have to confirm this choice ant then I get this error:
Fatal error: Call to undefined method EntityDrupalWrapper::count() in commerce\modules\line_item\commerce_line_item.module on line 363
Comments
Comment #1
rszrama commentedIt sounds like you have a lot going on in this site, but honestly I'm not sure where to even begin debugging such a problem. The method in question is from the core EntityFieldQuery object, and it should definitely be there. Nothing in the line is specific to Commerce, so I can only figure you have some inconsistent state in your site making the count() method is inaccessible:
It could be that fieldCondition() is throwing an error, perhaps because of an invalid $key. That's the only thing I can think of, so can you add the following code between those two lines:
And paste the message back in here?
Comment #2
fgorczynski commentedAfter few hours of scratching my head I think I found the solution (source of that problem). Product type - "Product" I had some reference trash - my bad. After deletion it works perfectly.
Comment #3
rszrama commentedOk, I'll go ahead and close this one and pursue it further through #1804982: Unable to delete node with line item reference field using the line item reference widget.