I am using Node Comment Block and Ajax Comments to put comments in block and ajaxify them, and comment system is working fine, on content page I have a link which opens node edit form using ctools modal, node form on ctools works fine too. Issue comes when a user replies on a comment and then comes back to use the node form on ctools modal through the link, in that case the form opens fine but on submitting user gets

An AJAX HTTP error occurred
HTTP Result Code: 200
Path: /system/ajax

Meanwhile there is a watchdog entry for the same which says Invalid form POST data.

WatchDog trigger point seems to be includes/ajax.inc, inside ajax_get_form()

function ajax_get_form() {
  $form_state = form_state_defaults();

  $form_build_id = $_POST['form_build_id'];
  watchdog('ajax', $form_build_id, array(), WATCHDOG_WARNING);

  // Get the form from the cache.
  $form = form_get_cache($form_build_id, $form_state);
  if (!$form) {
    // If $form cannot be loaded from the cache, the form_build_id in $_POST
    // must be invalid, which means that someone performed a POST request onto
    // system/ajax without actually viewing the concerned form in the browser.
    // This is likely a hacking attempt as it never happens under normal
    // circumstances, so we just do nothing.
    watchdog('ajax', 'Invalid form POST data.', array(), WATCHDOG_WARNING);

I am getting $form_build_id on node form submission, not sure if it is valid one or outdated, also I am not getting clue how ajax comments are creating issue with node form. Any pointers?


function ajax_get_form() only gets invoked from node edit form submission on ctools when there is reply on comment section, if there is no activity in comments, ajax_get_form() does not even invoke.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.