Similar to http://drupal.org/node/361838, but still occurring after that fix.
When importing a CCK type, I get the
call_user_func_array() [<a href='function.call-user-func-array'>function.call-user-func-array</a>]: First argument is expected to be a valid callback, 'contribution_node_form' was given...
error followed by a slew of 'Illegal choice' errors for things like 'author', 'menu', 'path', etc. in the log.
Turning off Vertical Tabs while importing is a workaround.
Should the condition in vertical_tabs_form_alter() additionally check for type 'create'?
if ($form_id == 'node_type_form' && $form['#node_type']->type && $form['#node_type']->type != '<create>') {
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | vertical_tabs-481118-2.patch | 453 bytes | rstaylor |
Comments
Comment #1
quicksketchThat check makes it so that Vertical Tabs doesn't try to make a node form for a content type that doesn't yet exist, since node/add/[type] isn't going exist until after the content type has been created. But it sounds like what might be happening is that content copy is not setting the $form['#node_type']->type value correctly, so it might be a bug in content copy rather than vertical tabs, though if there's a way to fix it in vertical tabs I'd be happy to change our module too.
Comment #2
rstaylor commentedI was partly wrong. It turns out that $form['#node_type']->type is set to the soon-to-be-created type name (not '') when content_copy executes the form.
So it's executing the form programmatically for a content type that doesn't yet exist, but it does have the type set. I think the type has to be set or it would fail validation and couldn't be created.
Maybe a check for #programmed?
Comment #3
dave reidSounds like this would be fixed with #494020: "Content type import/export" conflicts with "Vertical Tabs".