Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I'm getting this error:
EntityMetadataWrapperException: Unknown data property commerce_line_items. in EntityStructureWrapper->getPropertyInfo() (line 339 of .../sites/all/modules/contrib/entity/includes/entity.wrapper.inc).
When viewing any page on the site.
I tried upgrading the Entity module to latest beta11 and issue persists.
Marking as major as it causes the site to crash.
Offending code in entity.wrapper.inc where error occurs is:
/**
* Gets the info about the given property.
*
* @param $name
* The name of the property. If not given, info about all properties will
* be returned.
* @throws EntityMetadataWrapperException
* If there is no such property.
* @return
* An array of info about the property.
*/
public function getPropertyInfo($name = NULL) {
$this->spotInfo();
if (!isset($name)) {
return $this->propertyInfo['properties'];
}
if (!isset($this->propertyInfo['properties'][$name])) {
throw new EntityMetadataWrapperException('Unknown data property ' . check_plain($name) . '.');
}
return $this->propertyInfo['properties'][$name] + $this->info['property defaults'] + $this->propertyInfoDefaults;
}
Anyone found this, or a solution?
thanks,
DT
P.S Related issue was posted by someone else over here: http://www.drupalcommerce.org/node/482
Comments
Comment #0.0
davidwhthomas CreditAttribution: davidwhthomas commentedFormatting
Comment #0.1
davidwhthomas CreditAttribution: davidwhthomas commentedAdd related issue link
Comment #1
rfayYou probably have somehow lost the commerce_line_items field off your order entity.
Please try the Commerce Repair module (follow the instructions on the project page carefully)
Comment #2
rfayComment #3
rszrama CreditAttribution: rszrama commentedAnd now if you're using Commerce 7.x-1.x-dev you won't even have to apply a patch to get Commerce Repair to work. : )
Comment #4
davidwhthomas CreditAttribution: davidwhthomas commentedHey, I just wanted to say thanks for the replies
@rfay, good call on the database schema being corrupt.
The issue was actually unrelated to the Commerce module and instead caused by the database getting stuck in an inconsistent state.
It's a long story, but replication between the master and slave dbs got out of sync and some of the cache was corrupted.
That issue has been resolved and fortunately so too this commerce line items error.
So thanks, and thanks again for the awesome module set! great stuff.
DT
Comment #5
TarekElTabey CreditAttribution: TarekElTabey commentedHey, I'm sorry to disturb, I want to know what exactly did you do? and how @rfay solution worked for you..
you are saying it was something with your database getting stuck and something related to "master" and "slave" databases?? unfortunately i'm still new and the only technical thing i know is HTML and CSS, I don't know about PHP or Javascript or JQuery or Databases , so can you please help me to solve the same problem you had before from a nontechincal point of view?
thanks, Tarek
Comment #5.0
TarekElTabey CreditAttribution: TarekElTabey commentedAdd code snippet where error occurs
Comment #6
tuhin123 CreditAttribution: tuhin123 commentedCan any one tell me how to solve this issue, i am getting the following error whenever i try to check out. just at the time when the site is supposed to go to the gateway partner, i face this isue.
ENTITYMETADATAWRAPPEREXCEPTION: UNKNOWN DATA PROPERTY
COMMERCE_CUSTOMER_ADDRESS. IN ENTITYSTRUCTUREWRAPPER->GETPROPERTYINFO()
(LINE 335 OF
/HOME/CAPTBOOK/PUBLIC_HTML/SITES/ALL/MODULES/ENTITY/INCLUDES/ENTITY.WRAPPER.INC).
please help me with the same
if there are codes that i need to put, please tell me where to paste the codes
Comment #7
rszrama CreditAttribution: rszrama commentedSounds like your site is missing an address field that your payment module is expecting.
Comment #8
tuhin123 CreditAttribution: tuhin123 commentedHi Ryan, Thanks for your revert, i am using CC avenue module for payment gateway, can you suggest what should i look for in it