Using rules to set node title prevents og group submission
| Project: | Organic groups |
| Version: | 6.x-2.0 |
| Component: | og.module |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Hey,
After a few hours of figuring out why posts wouldn't go into a group after submission, I realized that if you use rules to set the node's content title, it will not submit in a organic group. I have tested this on multiple installations, and setting the title without token (simply a string like, abcd), will still cause this bug.
Steps to reproduce:
(Assuming you have a few groups already on the site).
1. Allow any content type to be posted into a group.
2. Within Rules, create a triggered rule to set the node title of that type to anything when 'saving new content.' (I did abcd).
3. Create a node of that content type, assign it to any one of your groups. Submit.
4. You'll notice that it did not assign into any groups. If you go to edit, the group selection box will be empty.
As setting the node title via rules is a pretty essential way to create uniform nodes for display without creating unique views, I'd say this is pretty important.
I have tested this on two installations, one fresh, with latest version of rules and OG.
I, at first, wasn't sure if this was a rules problem or an OG problem, but considering rules works everywhere else and on node submit and its only OG that doesen't accept it, I think OG is likely the culprit.
I'm happy to provide screenshots or any other info if it will help.
Thanks.

#1
Err...anyone else experience this?
I mean this problem has pretty serious implications for drupal users as setting titles with rules has huge benefits for keeping content consistent on a site.
If a maintainer could speak up that they are aware of this issue and if there is anything I can do to help (I'm not a developer so I can't really code a solution), I'd really appreciate it.
Thanks!
#2
Anyone? Anything?
#3
I'm bumping this up. I can't believe nobody else thinks this is a big deal. Someone out there has got to think that this problem is worth the 2 seconds it takes to respond.
#4
I haven't ever used Rules to do what you're trying to do, but Automatic Nodetitles has always worked for us and I don't recall any problems with setting auto node titles on nodes that get posted into groups. Have you asked for help in the Rules queue?
#5
I will add this to the rules queue, but since the problem only seems to happen with OG, I figure it's an OG issue. Auto Nodetitles doesen't work because token won't accept the [node:term] token on presave, it seems to only implement AFTER the node has been saved, thus not putting the term in the title because it doesen't recognize the term on presave. Rules, however, will.
There are numerous threads directed to this issue, which for some reason I thought I had already posted here.
http://drupal.org/node/428498 - Saving content loses OG audience
http://drupal.org/node/362493 - og_nodeapi presave might filter out groups.
#6
Patch OG with #362493: og_nodeapi presave might filter out groups. and see if it still happens.
#7
Yeah, great! That patch worked just fine!
Thanks again!