Hi,

I have og 7.x-2.4 installed and og_context module enabled. I am using latest version of this module and when I enabled and configured the module I got a white screen and logs showed

Call to undefined function og_get_context_by_url() in <drupalroot>/sites/all/modules/nodereference_url/nodereference_url.module on line 180

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

sadashiv’s picture

I tried to debug and fixed this issue. I am attaching the patch for this fix.

Hth,
Sadashiv.

tawellman’s picture

Patch worked for me! Thank You!

asb’s picture

Category: Task » Bug report
Priority: Normal » Critical
Status: Needs review » Reviewed & tested by the community

I got hit by the same error after enabling OG. The patch from #1 applies cleanly against nodereference_url 7.x-1.12:

$ patch -p1 < nodereference_url-Call_to_undefined_function_og_get_context_by_url-2185923.patch 
patching file nodereference_url.module

Changing priority according to Priority levels of issues since this issue "renders a system unusable" (WSOD on non-OG related nodes with a Nodereference URL field).

@sadashiv: Thanks for the patch! Could you please re-roll it against the dev release (nodereference_url 7.x-1.x-dev) so the maintainers can commit it?

sadashiv’s picture

Hi @asb,

I checked and found that the patch works with 7.x-1.x branch. The module has a last commit in September 2011 so may be we don't need to re roll the patch and maintainers can commit it.

Thanks,
Sadashiv.

VM’s picture

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

moving to -dev

Anybody’s picture

This bug is very critical but nothing happened so far. It would be very very helpful if this bug could be applied in the near future. The problem completely kills the site.

Thank you so much.

Anybody’s picture

Past note: After using the patch with OG 2.x I have the following notice:

Notice: Trying to get property of non-object in nodereference_url_build_link() (line 206 of nodereference_url/nodereference_url.module

The problem is that in

$link['query']['gids'] = array($group_entity->gid);

$group_entity should be an object but is an array in some cases! Why?