Hi
Almost everything is in the title.

I got an

EntityMetadataWrapperException : Unknown data property picture. in EntityStructureWrapper->getPropertyInfo()

error when clicking on my user account if metatag_twitter_cards is active and User active in admin/config/search/metatags

The prob disappear when User in admin/config/search/metatags is disactivate.

D.

Comments

sgdev’s picture

Version: 7.x-1.5 » 7.x-1.x-dev

We ran into the same problem with the newest version of Metatag (7.x-1.7), but we don't even have Twitter Cards enabled. We're only using Facebook and OpenGraph.

It seems related to a site previously having user pictures enabled in Configuration > People > Account Settings, and Metatag is added at a later date. We found that a version of the site with active development had this problem, but another version of the same site that had user pictures and metatags enabled at the same time did not.

The way to fix the problem is as @dbourrion describes in #1 -- have to deactivate Users from either the settings page (/admin/config/search/metatags/settings) or disable the default for User on the main page (/admin/config/search/metatags).

sgdev’s picture

Component: Twitter Cards » Code

Changing the component to "code" since this is a broader problem than just Twitter Cards.

damienmckenna’s picture

@ron_s: Can you please try using the token "[user:picture:url]" for the user picture, see if that works?

damienmckenna’s picture

Status: Active » Needs review
StatusFileSize
new3.04 KB

i.e. does this patch fix the problem?

sgdev’s picture

@DamienMcKenna, I'll give it a try and let you know. Thanks.

sgdev’s picture

Status: Needs review » Needs work

Tested #4 against 7.x-1.x-dev and does not fix the problem. Same error, thanks.

keopx’s picture

damienmckenna’s picture

Can you please tell me what other modules you have installed? I'd love to get to the bottom of this.

damienmckenna’s picture

The fact that it mentions EntityMetadataWrapper indicates it's something stemming from the Entity API module, or a module that uses it. The problem doesn't happen for me when I have just a bare D7 site with 'entity' and 'entity_token" enabled, so it must be something else.

sgdev’s picture

We have quite a few modules installed on the site, but nothing that directly interacts with the User entity.

There are other entities available in Metatag that are created through the following modules:

A few other entity, image, and content modules we're using that could have some possible interaction include:

  • Entity Reference 7.x-1.1
  • ImageAPI Optimize 7.x-1.2
  • Imagecache Token 7.x-1.0-rc1
  • Imageinfo Cache 7.x-3.5
  • Inline Entity Form 7.x-1.6
  • Pathauto 7.x-1.2
  • Pathauto Entity 7.x-1.0
  • Picture 7.x-2.11
  • Replicate 7.x-1.1
  • System stream wrapper 7.x-1.0-rc1
  • Token 7.x-1.6
  • UUID 7.x-1.0-alpha6
damienmckenna’s picture

I've tried enabling a few of those but didn't run into anything.

Could you please try installing the Devel module and setting (admin/config/development/devel) the error handler to use one of the Krumo backtrace options, then posting some details of the backtrace? That'll help. Thanks.

sgdev’s picture

Given that it's been a couple of months since we saw this error, a lot has changed with our database.

I attempted to reproduce the issue with a copy of our production and development databases, and I'm unable to do so. I also tried a database copy from a few weeks ago, and I'm not seeing an error with it either.

Sorry that I'm not able to provide an example. Maybe someone else who's currently dealing with the issue can reproduce it.

damienmckenna’s picture

Status: Needs work » Postponed (maintainer needs more info)

@ron_s: Thanks for letting me know.

I'm going to leave this one open but marked "postponed (maintainer needs more info)", if anyone else is seeing the problem please let me know and I'll do what I can to help track it down.

keopx’s picture

StatusFileSize
new2.07 KB

Here enabled modules list.

I enabled Devel module with Krumo backtrace options (admin/config/development/devel) but did not show any special thing.

keopx’s picture

damienmckenna’s picture

@keopx: If you're still seeing the error you might need to experiment a little bit on which Krumo option works best. Either which way, if you're able to reproduce it again please post some details. Thanks.

damienmckenna’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

We now have an extensive test suite and have not been able to reproduce this problem. If the problem persists with the latest dev release (or v1.8 due tomorrow) please reopen the issue and we'll see if we can work out what's causing the problem.