Fix for subscriptions_content.module - notice: Undefined index: #value in C:\Programs\WAMP\www\TRUNK\sites\all\modules\subscriptions\subscriptions_content.module on line 550.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 289084.JPG | 61.07 KB | nburles |
| subscriptions_content.module.patch | 839 bytes | nburles |
Comments
Comment #1
salvisName one...
Comment #2
nburles commentedFor instance: Upon creation of this page - http://localhost/transit/node/180 (which you cannot of course access, so I have attached a screenshot):-
Comment #3
salvisThe screenshot shows creation of an Organic Group, right? Are groups nodes? subscriptions_content.module is intended for handling nodes (and comments) only. If non-nodes are passed through there, there may be other issues, or it may be an issue with subscriptions_og.
Do you also get this when creating other types of content?
Comment #4
nburles commentedOrganic groups is implemented as a specific type of node.
I do not get the issue when creating other types of node, I'm not sure why I do when creating this type - but the problem is that for some reason on this type of node, although the $form['type'] is set, the $form['type']['#value'] is not. This (as far as I can tell) should never actually happen, and would be part of the main drupal code, but I have found that it does in this instance, and so thought it would be safer to just check if $form['type']['#value'] is set before attempting to compare it to $form_id.
Comment #5
salvisI see — interesting!
if (isset($form['type']) && $form['type']['#value'] .'_node_form' == $form_id)was the way to check for node creation forms in hook_form_alter under D5 (see menu.module, path.module, and taxonomy.module).
This has apparently changed to
if (isset($form['#node']) && $form['#node']->type .'_node_form' == $form_id)(menu.module)if (isset($form['type']) && isset($form['#node']) && $form['type']['#value'] .'_node_form' == $form_id)(path.module and taxonomy.module)Neither of these do a
isset($form['type']['#value'])check, as you suggest with your patch.There's some mention of this on http://drupal.org/node/114774#node-preview, but I'm not sure how to interpret it in our context here...
@chx: can you provide some enlightenment?
Comment #6
salvisHmm, we got stuck here.
Please reopen if we should pursue this further...