Problem: authenticated users can not view imported audio files (using the audio_import module).

Quick FIX:

1) Authenticated users can view these nodes AFTER admin clicks on the node's "edit" and then save (without actually editting) anything. Reason: after the admin does that, an entry to the node_access table is inserted with the node ID and grant view set to 1.

or

2) When I disabled access control in organic group module's setting, this problem disappeared. Reason: the node_access table is disregarded.

One possible solution to this is audio_insert_api inserts an appropriate entry to the node_access table. The culprit may be the audio.module or og.module or both.

Comments

drewish’s picture

Assigned: Unassigned » drewish

thanks for the bug report i'll look into this.

moshe weitzman’s picture

we are just building a $nodeobject and calling node_save(). So no validation or preparation is occurring. In this case, nodeapi('submit') is not firing so og_submit_group() is not getting called and thus eventually the desired grants are not inserted.

submitting nodes programmatically is a bit of a mess in 4.7. to fix this, you could try to call nodeapi(submit) yourself and then node save. or call og_submit_group(&$node) directly before saving.

drewish’s picture

Status: Active » Fixed

i've added a call to node_submit(), feel free to re-open this if it's not fixed.

Anonymous’s picture

Status: Fixed » Closed (fixed)