When I use intelligent saving on a node with an OG audience, the audience data is cleared.

This might be thrown over to the OG issue queue, but this is the most logical place to start.

Comments

RoboPhred’s picture

Title: Intelligent saving looses OG audience » Saving content looses OG audience
Component: Rules Core » Rules Engine

Occures with "Save content" action as well.

RoboPhred’s picture

This is looking more like a Rules bug now.

I added checks to og.module on its presave and save (save_ancestry) functions to list the groups it is working on. Here is the readout of my comment-enabling php code is ran and the node passed to intelligent saving during "Content is going to be saved"

og_presave 
og_presave groups set 
presave on gid 10
---Rules debug output for Content is going to be saved has been invoked. ---
og_save_ancestry 
og_save_ancestry has groups 
Saving group gid 10 
og_presave 
og_presave groups set 
presave on gid 0 
og_save_ancestry 
og_save_ancestry has groups 
Saving group gid 0 
og_presave 
og_presave groups set 
og_save_ancestry 
og_save_ancestry has groups 
---Rules debug output for After updating existing content has been invoked.  ---

Somehow, the node keeps getting saved until it forgets its group...

RoboPhred’s picture

I tracked it down to passing the node to intelligent saving while in the "Content is going to be saved" trigger. I'm not sure how this is causing two other presave/save cycles, or how og looses data, but that triggers the bug.

Here's the successful save run

og_presave 
og_presave groups set 
presave on gid 10 
--Content is going to be saved has been invoked.
og_save_ancestry 
og_save_ancestry has groups 
Saving group gid 10 
--After updating existing content has been invoked. 

Unfortunately, I have to do this to get this workaround working: #402102: "After updating existing content" occures before content is saved

amitaibu’s picture

Status: Active » Closed (duplicate)
rc2020’s picture

Has there been any rules update with this issue? When setting title via 'After saving new content', I loose OG audience.

See OG post queue here:

http://drupal.org/node/610260#comment-2197186