Closed (fixed)
Project:
Drupal for Facebook
Version:
7.x-3.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
2 Nov 2012 at 02:38 UTC
Updated:
20 Nov 2012 at 19:40 UTC
You need to use $var instead $var_prefix in $form['fb_stream'][$var_prefix].
$var_prefix = 'fb_stream_enabled_';
$var = $var_prefix . '_' . $node_type;
$form['fb_stream'][$var_prefix] = array(
...use this code
$var_prefix = 'fb_stream_enabled_';
$var = $var_prefix . '_' . $node_type;
$form['fb_stream'][$var] = array(
...also in hook_node_presave you should to use this code
function MODULE_node_presave($node) {
$fb_stream_enabled = variable_get('fb_stream_enabled__'. $node->type, 0);
if ($fb_stream_enabled) {
...
| Comment | File | Size | Author |
|---|---|---|---|
| patch.diff | 1.57 KB | dobeerman |
Comments
Comment #1
Dave Cohen commentedThanks for catching that. Not sure how I missed it.
I'm not understanding the last part about hook_node_presave. If additional changes need to be made, please include them in the patch.
Comment #2
Dave Cohen commentedPushed the original patch. I'm hoping that's all that is needed.