Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment #1
vaartio CreditAttribution: vaartio commentedFixed in 7.x-1.x-dev branch. Thanks for pointing this out.