I have a node layout variant which displays an OG body, OG content teasers, OG members' list, and an unconnected menu. I've been trying to set a specific context for it, and it's not happening. The "OG: Node is an OG Group" selection rule works, but the Context does not - the layout is applied to all OGs for all users, irrespective of what restrictions I try to set - I've tried restricting by "node", "user" , "OG group". The first two save a record of the context, but fail to save a record of the node/user id (the field remains empty). The last saves both the context and the ID but fails to apply the filter and generates the following error message:

Warning: array_flip(): Can only flip STRING and INTEGER values! in EntityAPIController->load() (line 184 of [drupal home]/sites/all/modules/entity/includes/entity.controller.inc).
Notice: Trying to get property of non-object in og_context_create_og_group() (line 199 of [drupal home]/sites/all/modules/og/og_context/og_context.module).

Comments

merlinofchaos’s picture

I've been trying to set a specific context for it,

Can you be more specific about what this means? I'm not able to see what you're doing. Can you please provide the steps to reproduce?

If the latter happens only with the "OG group" context, that's probably an issue for og_panels (I assume) which provides the content.

pav’s picture

I'm sorry. Here are the details:

I go to Admin Menu >> Structure >> Pages.
I enable node_view (Node template, /node/%node).
I edit this template.
In the Page Manager, under Summary I add a New Variant and go through the wizard as usual.
In the Selection rules tab, I set OG:Node is an OG group and procede to next step. (No problems so far.)
In the Contexts tab, in the Contexts section of the page I attempt to set a context. I've tried three different ones, here's what happens:

If I select OG group, click Add context >> Select an OG group, specify group ID as 1 (which definitely exists in the database), and Finish, when I continue onto the next section of the wizard (Layouts), I get the error message I copied into the opening post.

If instead of OG Group I select either user or node and attempt to similarly set a specific user or node ID, the system allows me to complete the wizard without any error messages, but the filters just don't work (i.e. my layout is still applied to all OG groups for all users).