If the human readable name of a node type contains a dash, for example: 'news-item', the system name of the node type is 'news_item'. The path to add a node of that node type will be: /node/add/news-item. The og-context module assumes that the third item of the path is the node type system name which is incorrect (see line 379 of og_context.module). The subsequent call to og_get_group_audience_fields() will not return the fields for the node-type, thus the context is not set correctly. The system name of a node type can never contain a dash, so replacing any dashes by underscores is a solution.

Files: 
CommentFileSizeAuthor
#3 og-context_not_correctly_set-1783678-3.patch457 bytesMarty2081
PASSED: [[SimpleTest]]: [MySQL] 882 pass(es).
[ View ]
#1 og-context_not_correctly_set-1783678-1.patch367 bytesMarty2081
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch og-context_not_correctly_set-1783678-1.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]

Comments

Status:Active» Needs review
StatusFileSize
new367 bytes
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch og-context_not_correctly_set-1783678-1.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]

And here is a patch. Using str_replace() might not be the optimal solution, so please review.

Status:Needs review» Needs work

The last submitted patch, og-context_not_correctly_set-1783678-1.patch, failed testing.

StatusFileSize
new457 bytes
PASSED: [[SimpleTest]]: [MySQL] 882 pass(es).
[ View ]

Attempt #2 for the patch.

Status:Needs work» Needs review

Status:Needs review» Fixed

Committed, thanks.

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.