I just installed the module and wanted to configure it, but all I got was a blank page.
After going through the code a bit, I removed the @ in the funtion call on line 149 in the module file:

$uri = call_user_func_array($info['uri callback'], array($test));

I then saw this error:

Fatal error: Call to undefined method stdClass::uri() in /sites/all/modules/contrib/entity/entity.module on line 866

Comments

Anonymous’s picture

Status: Active » Closed (won't fix)

Seems to be caused by module bean not correctly implementing the uri() method.

Issue can be closed as it's not related to auto_opengraph itself.

MauPalantir’s picture

Status: Closed (won't fix) » Active

Same problem here.

This is caused by Profile2 (in my case) which uses 'entity_class_uri' as uri callback (form Entity API I guess), which would return the entity's own uri method [ $entity->uri() ].
Of course your dummy entity $test does not have one.

Does anyone have a workaround?
I am not much into entity api yet, just threw a quick vardump to see what’s happening…

MauPalantir’s picture

Well I managed to skip enitity uris manually when they user entity_class_uri (I don’t want to OGMeta profiles so I don’t bother).
But now I see a handful of notices:
Notice: Undefined property: stdClass::$cid comment_uri() (…comment.module line 158).

Notice: Undefined index: uri callback _auto_opengraph_map_entities() (…auto_opengraph.module line 148 ).
(this re-appears after every undefined ID notice:))

Notice: Undefined property: stdClass::$nid node_uri() függvényben (…node.module line 249).
Notice: Undefined property: stdClass::$tid taxonomy_term_uri() függvényben (…taxonomy.module line 147).
Notice: Undefined property: stdClass::$uid user_uri() (…\user.module line 190)

It seems entity uri callbacks aren’t happy with fake entities without an ID.

dnotes’s picture

Title: fatal error when trying to open the config page » config page errors and entities missing - entity_class_uri
Priority: Critical » Normal

Thanks for looking into this. As a stopgap measure I'm committing the change that Mau mentioned for skipping entities using entity_class_uri, and downgrading this to normal priority. I've also tried to get rid of the notices. You can't output opengraph tags for those entity types, but at least the module should work. If the config page is still broken or you see notices on every page, please return to critical.

I don't have time to delve into the entity module again at the moment, but if anyone has suggestions on how I can get the path (or get around the need for it in auto_opengraph_preprocess_page) I'd be glad to receive them.