Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
0. Clean Drupal 7.7 install + ctools.
1. Enable node add/edit form
2. Add new variant.
3. Missing from selection rules dropdown: node being edited (I'd like to select only nodes of a particular type)
4. The node being edited appears on the contexts screen, but there are no relationships possible.
See attached screenshots. This also occurred prior to d7.7 and ctools 7.x-1.0-rc1. Screenshots show panels installed, but problems also occur with just ctools http response code. Adding a node edit form relationship on a custom page works fine.
Comment | File | Size | Author |
---|---|---|---|
#28 | 2012-08-06_09-37-03.png | 23.7 KB | TMWagner |
#26 | 2012-08-03_15-54-57.png | 45.2 KB | TMWagner |
#14 | Screen Shot 2011-11-05 at 7.03.33 AM.png | 104.92 KB | RobKoberg |
#4 | 1235218-node-edit-context-not-acting-as-node.patch | 1.18 KB | merlinofchaos |
node edit form contexts.png | 62.73 KB | jdleonard |
Comments
Comment #1
rohr CreditAttribution: rohr commentedI'm also experiencing this issue ...
Comment #2
bochen87 CreditAttribution: bochen87 commentedsubscribing
Comment #3
nuezsubscribing
Comment #4
merlinofchaos CreditAttribution: merlinofchaos commentedTry this.
Comment #5
benjames CreditAttribution: benjames commentedFixed my problem. Thanks heaps
Comment #6
nuezit works, thanks!
Comment #7
jdleonardNice simple change and appears to be working. thanks!
Comment #8
bochen87 CreditAttribution: bochen87 commentedPatch works fine!
Comment #9
Thomas_M CreditAttribution: Thomas_M commentedThanks,
using the patch, I can select node content types in selection rules and can also add fields of the node to the form.
However, using content type as a selection criteria does still not work properly. When opening the edit or add form of my content type, I still get the standard edit/add form.
When looking at the descriptive text of my selection rule it says
edited node is bundle ""
The content type is not mentioned.
The form it self works. I can access the new form when using other selection rules like path or php code.
Comment #10
Thomas_M CreditAttribution: Thomas_M commentedComment #11
merlinofchaos CreditAttribution: merlinofchaos commentedI think #9 is something else, so shouldn't stop this patch from going in. And there was a bug report about that, but I think it didn't mention that maybe it was node add related.
Comment #12
merlinofchaos CreditAttribution: merlinofchaos commentedit also seems i inadvertently committed this anyway.
#9: See #1157080: Node: Bundle selector doesn't display properly -- I bet the issue only exists for node/add. Will experiment.
Comment #13
Kimberley_p CreditAttribution: Kimberley_p commentedThanks!
Comment #14
RobKoberg CreditAttribution: RobKoberg commentedsubscribing. Any news on this? I applied the patch and got the select lists back, but not getting any context->data. Attaching output from devel's dpm(). Anything else that would be helpful to debug?
Update: I should add that the node/%node context->data works fine.
Comment #15
RobKoberg CreditAttribution: RobKoberg commentedPlease ignore my post. It concerned organic groups which apparently has a context for node/%node and node/%node/edit but not for node/%node/add.
Comment #16
capellicConfirming that this works, can we get a commit?
Comment #17
capellicOooops.. put the brakes on. I applied the patch in #4. Then when visiting an "edit" form, I get a white screen with only "Array" in the upper-left corner. Some how related to this case I logged? #1410960: All I See is "Array" output on node edit panels
Comment #18
sashkernel CreditAttribution: sashkernel commentedIs patch #4 a valid fix for this issue?
I still have same issue after applying it.
Comment #19
sashkernel CreditAttribution: sashkernel commentedDisregard my previous comment. Patch works for me.
Comment #20
andes371 CreditAttribution: andes371 commentedI want to apply the patch, but when I go to /panels/plugins/ there is no folder called there called contexts in which I can find the node_add_form.inc
Any help please?
Comment #21
andes371 CreditAttribution: andes371 commentedI found it! I was looking for it in the panels/plugins directory while the file was in the ctools/plugins directory
Comment #22
andes371 CreditAttribution: andes371 commentedI get the following error when I add content to my panel for a custom content type input form.
Notice: Undefined property: stdClass::$nid in ctools_node_title_content_type_render() (line 38 of C:\wamp\www\mydrupal\sites\all\modules\ctools\plugins\content_types\node_context\node_title.inc).
Can someone please guide me what to do?
The field input box will not show, only the title shows.
Comment #23
andes371 CreditAttribution: andes371 commentedI got the field input box to show up, by selecting from the Form option.
But the error still persists.
Comment #24
chellman CreditAttribution: chellman commentedI was experiencing this issue with Panels 7.x-3.0 and ctools 7.x-1.0rc1. After updating to Panels 7.x-3.2 and ctools 7.x-1.0, I no longer see it. The patch from #4 is in (with some later modifications), so I'm going to brashly mark this fixed.
If you're still seeing this, odds are you need to update (and clear your cache).
Comment #26
TMWagner CreditAttribution: TMWagner commentedDefinitely not fixed. Error displayed with Panels 7.x-3.2 and ctools 7.x-1.0. And yes, cache was cleared.
Now running Panels 7.x-3.2+8-Dev and ctools 7.x-1.0+34-dev ; problem still present.
(see screenshot)
Comment #27
chellman CreditAttribution: chellman commentedThe issue described in the original post is fixed. The one you're talking about, from #22 above, is a separate issue, although I don't see that one either. I just tried this with a clean install of Drupal 7.15, ctools 7.x-1.0, and panels 7.x-3.2, and it works as expected, without errors.
What version of Drupal are you running? What version of PHP? And what content are you adding to your panels to trigger this?
Comment #28
TMWagner CreditAttribution: TMWagner commentedI'm running PHP 5.36, and Drupal 7.14
The error occurs specifically when adding individual fields to a pane v.s., the entire general node. The base (or entire node) works perfectly. Adding the same content, but doing so one field at a time, even ordering the fields the same as the original, causes the problem
In the example screen shot, I added field form weight, field form rabies tag, etc; and the error was thrown. I took all the fields off and added the base "General form" and the problem went away.
Comment #29
LeviThomason CreditAttribution: LeviThomason commentedIt is clear since #22 this thread is speaking of an issue unrelated to the original post. However, I am also having this issue described in #22 and displayed by screenshot in #26.
I have added fields Node Title, Node Body and an Entity Reference field to a node add/edit variant and this error is triggered.
Notice: Undefined property: stdClass::$nid in ctools_node_title_content_type_render() (line 38 of C:\xampp\htdocs\mysite\sites\all\modules\ctools\plugins\content_types\node_context\node_title.inc).