I want to open create content type in modal, according to modal form and modal api example, I implement it, I test
the problem is here when I test it by contact form
ctools_include('modal');
ctools_include('ajax');
$form_state = array(
// 'title' => t('Contact'),
'ajax' => TRUE,
);
module_load_include('inc', 'contact', 'contact.pages');
$output = ctools_modal_form_wrapper('contact_site_form', $form_state);
every thing work correctly and there is no problem,but when I change it to
ctools_include('modal');
ctools_include('ajax');
$form_state = array(
// 'title' => t('Contact'),
'ajax' => TRUE,
);
module_load_include('inc', 'node', 'node.pages');
$output = ctools_modal_form_wrapper('page_node_form', $form_state);
return me ** An AJAX HTTP error occurred. HTTP Result Code: 500 Debugging information follows. Path: /drupal-7.24/share/ajax/1 StatusText: Service unavailable (with message) ResponseText: EntityMalformedException: Missing bundle property on entity of type node. in entity_extract_ids() (line 7724 of /includes/common.inc).** , where is the problem?
I create a menu, and it open a modal,I want add content in that modal