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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

rohr’s picture

I'm also experiencing this issue ...

bochen87’s picture

subscribing

nuez’s picture

subscribing

merlinofchaos’s picture

Status: Active » Needs review
FileSize
1.18 KB

Try this.

benjames’s picture

Fixed my problem. Thanks heaps

nuez’s picture

it works, thanks!

jdleonard’s picture

Status: Needs review » Reviewed & tested by the community

Nice simple change and appears to be working. thanks!

bochen87’s picture

Patch works fine!

Thomas_M’s picture

Thanks,
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.

Thomas_M’s picture

Status: Reviewed & tested by the community » Needs work
merlinofchaos’s picture

I 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.

merlinofchaos’s picture

it 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.

Kimberley_p’s picture

Thanks!

RobKoberg’s picture

subscribing. 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.

RobKoberg’s picture

Please 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.

capellic’s picture

Status: Needs work » Reviewed & tested by the community

Confirming that this works, can we get a commit?

capellic’s picture

Status: Reviewed & tested by the community » Needs work

Oooops.. 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

sashkernel’s picture

Is patch #4 a valid fix for this issue?
I still have same issue after applying it.

sashkernel’s picture

Disregard my previous comment. Patch works for me.

andes371’s picture

I 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?

andes371’s picture

I found it! I was looking for it in the panels/plugins directory while the file was in the ctools/plugins directory

andes371’s picture

I 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.

andes371’s picture

I got the field input box to show up, by selecting from the Form option.

But the error still persists.

chellman’s picture

Status: Needs work » Fixed

I 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).

Status: Fixed » Closed (fixed)

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

TMWagner’s picture

Status: Closed (fixed) » Active
FileSize
45.2 KB

Definitely 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)

chellman’s picture

Version: 7.x-1.0-rc1 » 7.x-1.0

The 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?

TMWagner’s picture

FileSize
23.7 KB

I'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.

LeviThomason’s picture

It 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).

  • merlinofchaos committed 56f360c on 8.x-2.x
    Issue #1235218: Restore "node" keyword to node add/edit forms so they...

  • merlinofchaos committed 56f360c on 8.x-3.x
    Issue #1235218: Restore "node" keyword to node add/edit forms so they...