The ajax path is incorrect when Drupal base is not the same as root.
It will cause an Error 404 ajax callback when insert token by AET insert Field.

function aet_insert_init() {
  drupal_add_js(array('aet_insert'
    => array('ajax_path' => '/' . AET_INSERT_FIELD_AJAX_PATH)), 'setting');
    // 'ajax_path' should be base_path() . AET_INSERT_FIELD_AJAX_PATH
}

Modifying the js file is another solution, as

      $('.aet_insert_field select').change(function() {
        var $this = $(this);
        var $aet_insert_field = $($this.parents('.aet_insert_field'));
        Drupal.aet_insert.disable($aet_insert_field);
        $.ajax({
          url: Drupal.aet_insert.settings.ajax_path,
          // It should be Drupal.settings.basePath + Drupal.aet_insert.settings.ajax_path

Comments

eyal shalev’s picture

Assigned: Unassigned » eyal shalev
Status: Active » Needs work

I'll look into it.

eyal shalev’s picture

Status: Needs work » Closed (fixed)

Replaced:
=> array('ajax_path' => '/' . AET_INSERT_FIELD_AJAX_PATH)), 'setting');
with:
=> array('ajax_path' => base_path() . AET_INSERT_FIELD_AJAX_PATH)), 'setting');