Closed (fixed)
Project:
Audio
Version:
4.7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
1 Jul 2006 at 20:21 UTC
Updated:
28 Aug 2006 at 20:30 UTC
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
Comment #1
drewish commentedthanks for the bug report i'll look into this.
Comment #2
moshe weitzman commentedwe 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.
Comment #3
drewish commentedi've added a call to node_submit(), feel free to re-open this if it's not fixed.
Comment #4
(not verified) commented