Active
Project:
Auto Opengraph
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Anonymous (not verified)
Created:
13 Nov 2011 at 14:27 UTC
Updated:
29 Mar 2020 at 02:18 UTC
Jump to comment: Most recent
Comments
Comment #1
Anonymous (not verified) commentedSeems 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.
Comment #2
MauPalantir commentedSame 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…
Comment #3
MauPalantir commentedWell 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.
Comment #4
dnotes commentedThanks 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.