I should submit a patch but I'm being lazy. I'll get to if someone else doesn't. $ajax_action_submit needs the URL to be passed into the URL() function to insure proper base path like I did in this code. There might be other places where this needs to be fixed.

function bookmarkorganizer_add_folder_view($user) {
  // Get form
  $form = drupal_get_form('bookmarkorganizer_add_folder_form', $user);

  if (!empty($_POST['js'])) {
    // Render form
    $output = drupal_render($form);

    $ajax_action_submit = url("bookmarkorganizer/add/folder/ajax/" . $user->uid);

    // Send to javascript
    $json = array('html' => $output, 'data' => $form, 'path' => $ajax_action_submit);
    drupal_json_output($json);
    exit();
  }
  else {
    // Send data for page load
    return $form;
  }

}

Comments

vaartio’s picture

Status: Active » Fixed

Fixed in 7.x-1.x-dev branch. Thanks for pointing this out.

Status: Fixed » Closed (fixed)

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