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

davidwhthomas’s picture

Issue summary: View changes

Formatting

davidwhthomas’s picture

Issue summary: View changes

Add related issue link

rfay’s picture

You 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)

rfay’s picture

Category: bug » support
rszrama’s picture

Status: Active » Closed (duplicate)

And 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. : )

davidwhthomas’s picture

Hey, 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

TarekElTabey’s picture

Hey, 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

TarekElTabey’s picture

Issue summary: View changes

Add code snippet where error occurs

tuhin123’s picture

Can 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

rszrama’s picture

Sounds like your site is missing an address field that your payment module is expecting.

tuhin123’s picture

Hi Ryan, Thanks for your revert, i am using CC avenue module for payment gateway, can you suggest what should i look for in it