Related to support request #317367: nodes added to Panel Pages don't display
I'm trying to add a node context to a panel-page. There's only one node in this test site so far, and when I try to put the title or nid in the last text field of the popup dialog, I always get the error "You must select a node".
I think it might be due to line 124 in contexts/node.inc, where the following are being checked:
$form_state['values']['external']
$form_state['values']['nid']
$form_state['values']['node']
When I checked the contents of $form_state, it looks like it's actually in this form:
$form_state['external']
$form_state['nid']
$form_state['node']
I'm not well-versed enough in the Drupal 6 formapi to know what the right course of action is here, but the way it looks to me, this won't ever work without some kind of change. This would be my guess, but I'm not confident enough to roll a patch.
if (empty($form_state['values']['external']) && empty($form_state['values']['nid']) && empty($form_state['values']['node'])) {
Comments
Comment #1
catchI can reproduce this, looks like incomplete fapi conversion - still some $form_values in there.
Comment #2
cpelham commentedDeleting all of the instances of ['values'] in node.inc from lines 121-164 enabled me to successfully add node contexts finally. I am not attaching a patch at this time as I don't really understand the reason for ['values'] being there or why removing it works or whether it might screw something else up. But if someone else who understands the code better can vouch for this, I can attach this simple patch.
Comment #3
kirkhoward commentedHey guys has this solution been proven or disproven? I am also experiencing the same problem... would love to see an experienced member to comment on this fix...?
Comment #4
merlinofchaos commentedI have this fixed in -dev already; not with this patch, though.
Comment #5
chellman commentedThanks very much, Earl!
Comment #6
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #7
BettyJJ commentedSo what's the final solution? I downloaded this module just now and it still has this problem.
Comment #8
catchThe fix is in -dev - so not the current alpha release.
Comment #9
BettyJJ commentedThen how to fix the issue in the current alpha release? -.-
Thanks.
Comment #10
catchYou could try applying the patch attached to this issue, run -dev or wait for the next alpha release.
Comment #12
Daniel Norton commentedI've moved this to Version 6.x-2.0-alpha2, where it's still a bug and marked this as a dup of the earlier #312229: "You must select a node" error.
Also, the aforementioned patch is not attached to this issue as claimed above.
Comment #13
Daniel Norton commentedSorry, I suspect I shouldn't have changed the version, so I put it back.