When adding the "Node add form" context in CTools, it seems CTools has problems reading which content types exist on the site – there are no content types to select. (See attached screenshot.)

Tested with freshly downloaded devs of ctools and related modules. (Heck, even a fresh dev of Drupal core.)
Unqualified guess of what's wrong: It might be an effect of node types now being called content types more or less everywhere.

Sorry for not digging further into this right now.
Your work with CTools is not only awesome. It is important.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Itangalo’s picture

Steps to reproduce:

* Enable Page manager
* Enable the template for node edit pages, add a variant
* Add a new context of the type "node add form"
-> You can't select which node type should be added

jbucks’s picture

I'm having the exact same problem!

It happens when I try to add a Node Add context to the 'Node add/edit form' panel. The modal looks exactly the same as the screenshot attached at the top of this thread. When I click Finish, I get the following error messages:

Warning: Illegal offset type in isset or empty in ctools_context_create_node_add_form() (line 53 of /sites/all/modules/ctools/plugins/contexts/node_add_form.inc).
Warning: Illegal offset type in isset or empty in ctools_context_create_node_add_form() (line 53 of /sites/all/modules/ctools/plugins/contexts/node_add_form.inc).

I'm using Panels 7.x-3.0-alpha3 and Ctools 7.x-1.0-alpha4.

Thanks in advance!

kyeranr’s picture

I have the same issue here, same symptoms, same steps to reproduce.

Chaos tools 7.x-1.0-alpha4 and tested with 7.x-1.x-dev (2011-Apr-07)
Panels 7.x-3.0-alpha3 and 7.x-3.x-dev

Cheers.

ilovemyson’s picture

i have same problem.

Warning: Illegal offset type in isset or empty in ctools_context_create_node_add_form() (line 53 of C:\Documents and Settings\user\Desktop\2trees\sites\all\modules\ctools\plugins\contexts\node_add_form.inc).
Warning: Illegal offset type in isset or empty in ctools_context_create_node_add_form() (line 53 of C:\Documents and Settings\user\Desktop\2trees\sites\all\modules\ctools\plugins\contexts\node_add_form.inc).

merlinofchaos’s picture

Status: Active » Fixed

Wow that was a really dumb typo causing that. Committed, pushed. Clearly not enough people USE this functionality.

Status: Fixed » Closed (fixed)

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

ann_meredith’s picture

Is there a patch for this since the 7.x-1.0-alpha4 version hasn't been updated yet?

merlinofchaos’s picture

Is there a patch for this since the 7.x-1.0-alpha4 version hasn't been updated yet?

What do you mean yet? Released versions are never changed. That's why they have version numbers.

Use the -dev version.

ann_meredith’s picture

Sorry, I didn't mean that I expected a new -alpha4 version. It was just a shorthanded way of saying that a non-development version had not been released since this issue had been addressed. My fault for not being clear about what I was saying (laziness on my part).

I was hoping there would be a way for me to fix this issue without switching over to the -dev version. It seems from your response that switching would be best course of action.

Thanks!

Wappie08’s picture

Status: Closed (fixed) » Active

Hi, I just updated to latest dev (panels and also views) using drush but I still cannot select a node type following #1.

Also I do not quite understand why one has to use the node-edit override, isn't it possible to add a block in a custom panels page (anymore)?


Greets Wappie

merlinofchaos’s picture

Yes, for now you'll have to switch. I want to do a new release soonish but there's a lot to do.

frankcarey’s picture

Yeah, still not seeing this after updating to the 2011-05-11 3.x-dev release either.

Correction, I need to update ctools to 1.x-dev, not panels. Note that I now get a "Form goes here." instead of the actual node form when I use the Generic form content type.

Itangalo’s picture

Also trying to get this to work. After digging around a bit in ctools/plugins/content_types/form I conclude that $context->data is missing. The render functions for the plugins seem to expect that it holds some kind of form elements – not sure how it is intended.

Wish I could take this further, but I (yet) don't know enough.

When used on a regular node edit page it seems to work fine, but for edit nodes being loaded by path arguments or contexts it fails.

swentel’s picture

FileSize
133.35 KB

This works perfectly here (well at least the selection)

Itangalo’s picture

@swentel: Yes – I think the issue has progressed since the title was written. It is now possible to add the node edit context, but you still cannot render any parts of the forms.

merlinofchaos’s picture

I have functioning node edit forms on my dev site, so I'm not sure what's wrong here.

Itangalo’s picture

Status: Active » Fixed

I was recording a screencast demonstrating this bug – when I to my surprise found everything working.
Awesome.

There might be a problem with this feature at an edge case, which made me experience this "bug" yesterday. If that is the case, and I can understand it enough to describe the edge case, I'll open a new issue.

Case closed!

PS: Anyone still experiencing problems with this can check out the screencast at http://vimeo.com/24909591, to see that this feature actually works on a plain install. If you still have problems with this, open a new issue for it – and make sure to describe how your site differs from a plain install.

merlinofchaos’s picture

Thanks! If you find the edge case I would very much appreciate it!

Status: Fixed » Closed (fixed)

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