Wysiwyg not showing, Node Form in a Ctools Modal

Created on 11 January 2012, over 12 years ago
Updated 20 September 2023, 9 months ago

Hi, I made a page callback to embed a node form into a ctools modal box. The problem is, the Wysiwyg is not showing on the body field.

Here's the code :

/**
 * A modal node/add callback.
 */
function my_module_ajax_node() {
  
  global $user;
  
  ctools_include('modal');
  ctools_include('ajax');
  
  $node = (object) array(
      'uid' => $user->uid, 
      'name' => (isset($user->name) ? $user->name : ''), 
      'type' => 'my_node_type', 
      'language' => LANGUAGE_NONE
      );
  
  $form_state = array(
      'title' => 'Create a node',
      'ajax' => TRUE,
      'build_info' => array(
          'args' => array($node),
          ),
      );
  
  form_load_include($form_state, 'inc', 'node', 'node.pages');
  $output = ctools_modal_form_wrapper('my_node_type_node_form', $form_state);

  print ajax_render($output);
  exit;
}

Have you some suggestions about this bug?

Thank you a lot.

πŸ› Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

πŸ‡«πŸ‡·France Buraito Pengin

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024