Hi @Amitaibu,

I tried out this module with your #1342632: Deprecate OG group entity branch of OG, and I'm not seeing it listed as an available formatter when I try to add a "List (text)" field to my OG group type. I'm suspecting it has to do with some changes you've made in the OG branch. I've looked at this module's code but it's not obvious to me what's wrong. My best guess is that the API for hook_og_fields_info() has changed in the branch; perhaps og_node_link_og_fields_info() is no longer returning all the required info?

Any tips would be great.

Comments

jgraham’s picture

Title: Adapt OG Content Links to OG7 1342632 branch » update OG Content Links to support OG 2.x

It seems like moving forward either;
1. this will have a dependency on entityreference_prepopulate.
2. entityreference_prepopulate will supersede this module

Amitai do you have plans for this functionality already? Can you comment how entity reference prepopulate fits in related to the functionality of this module?

jgraham’s picture

Status: Active » Needs review
StatusFileSize
new1.06 KB

Attached patch updates this to work with entityreference_prepopulate.

1. Apply patch to og_node_link
2. For the appropriate content types enable the "Enable Entity reference prepopulate" on the og_group_ref field setting.

amitaibu’s picture

I have committed a plugin to er_prepopulate that is intended to replace OG's "node_create_links" plugin -- http://drupalcode.org/project/entityreference_prepopulate.git/commitdiff...

This module is in fact, most of the time not needed, as we can get the same result with the above plugins, and without needing to store it via field -- unless, of course, you *need* to store it :)

btw, looking for a new maintainer for the module...

Jackinloadup’s picture

Amitaibu - could you explain how to use the code in that commit?

I'm not sure how to get entityreference_prepopulate_node_prepopulate_content_type_render to render on screen

Thanks

liquidcms’s picture

for what its worth; this is what i have so far figured out:

- OG Content Links doesnt work for og 2.x
- entityreference_prepopulate simply allows prepopulating any entity by specifying its field and a value in the url; so for creating group content and preassigning its group:

e.g. node/add/survey?og_group_ref=27

as for the infamous "group details" block from D6 which included the "create content links" still a long ways to go to get that:

- i think you need a view or block code that would first figure out all the node/entity types that are allowed under the group: add article, add news, etc
- then you need to know the gid (in a view i haven't sorted out how to tell BOTH a group node's gid and group content's gid; i can add both nid and a related to group nid and then a php field to figure out which one to use; but seems silly to need that)

pretty messy; but that's what i have at the moment.

Jackinloadup’s picture

The attached patch doesn't work with the patch from #2 in any way.

This patch allows this module to work with OG 2.x in my experience.

This is a temp fix until i figure out how to incorporate Amitaibu's entityreference_prepopulate

playfulwolf’s picture

any news about final version?

johaziel’s picture

#6 not working with og-7.x-2.x-beta3

I got a

Fatal error: Call to undefined function og_get_group_ids() in /srv/d_ekomundi/www/ekomundi.org/htdocs/sites/all/modules/og_node_link/og_node_link.module on line 81

With the latest version of og : 7.x-2.0-beta3

So here a patch to work with og-7.x-2.0-beta3

user654’s picture

.

user654’s picture

.