title: Typo3 6.2 eid AjaxDispatcher ignores Controll and action
body: <p>I’m trying to get my Ajax-Function to call a certain controller inside my Typo3 extension.
  After several attempts, I decided to go with the same Ajax-Dispatcher that powermail uses.  It does show an output, but it completely ignores the supposed controller and action.
  There are two Controllers in my Extension and so far three actions:
  Category=>list
  Family=>list,compare</p>
  
  <p>PHP:</p>
  
  <pre><code>&lt;?php
  namespace Vendor\Myextension\Utility;
  use \TYPO3\CMS\Core\Utility\GeneralUtility;
  class AjaxDispatcher {
  
  /**
   * configuration
   *
   * @var \array
   */
  protected $configuration;
  
  /**
   * bootstrap
   *
   * @var \array
   */
  protected $bootstrap;
  
  /**
   * Generates the output
   *
   * @return \string  rendered action
   */
  public function run() {
      return $this-&gt;bootstrap-&gt;run('', $this-&gt;configuration);
  }
  
  /**
   * Initialize Extbase
   *
   * @param \array $TYPO3_CONF_VARS The global array. Will be set internally
   */
  public function __construct($TYPO3_CONF_VARS) {
      $this-&gt;configuration = array(
          'pluginName' =&gt; 'my_plugin',
          'vendorName' =&gt; 'Vendor',
          'extensionName' =&gt; 'myextension',
          'controller' =&gt; 'Family',
          'action' =&gt; 'compare',
          'mvc' =&gt; array(
              'requestHandlers' =&gt; array(
                  'TYPO3\CMS\Extbase\Mvc\Web\FrontendRequestHandler' =&gt; 'TYPO3\CMS\Extbase\Mvc\Web\FrontendRequestHandler'
              )
          ),
          'settings' =&gt; array()
      );
      $_POST['request']['action'] = 'compare';
      $_POST['request']['controller'] = 'Family';
  
      $this-&gt;bootstrap = new \TYPO3\CMS\Extbase\Core\Bootstrap();
  
      $userObj = \TYPO3\CMS\Frontend\Utility\EidUtility::initFeUser();
      $pid = (GeneralUtility::_GET('id') ? GeneralUtility::_GET('id') : 1);
      $GLOBALS['TSFE'] = GeneralUtility::makeInstance(
          'TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController',
          $TYPO3_CONF_VARS,
          $pid,
          0,
          TRUE
      );
      $GLOBALS['TSFE']-&gt;connectToDB();
      $GLOBALS['TSFE']-&gt;fe_user = $userObj;
      $GLOBALS['TSFE']-&gt;id = $pid;
      $GLOBALS['TSFE']-&gt;determineId();
      $GLOBALS['TSFE']-&gt;getCompressedTCarray();
      $GLOBALS['TSFE']-&gt;initTemplate();
      $GLOBALS['TSFE']-&gt;getConfigArray();
      $GLOBALS['TSFE']-&gt;includeTCA();
  }
  }
  $eid = GeneralUtility::makeInstance('Vendor\Myextension\Utility\AjaxDispatcher', $GLOBALS['TYPO3_CONF_VARS']);
  echo $eid-&gt;run();
  </code></pre>
  
  <p>Ajax:</p>
  
  <pre><code>var read = 'string';
  var requestData = {'value': read};
  var currentUrl = window.location;
  $.ajax({
  url: currentUrl,
  type: 'POST',
  data: {
      eID: "ajaxDispatcherMyextension",
      request: {
          controller: 'Family',
          action: 'compare',
          arguments: {
              'test': requestData
          }
      }
  },
  dataType: 'html',
  success: function(success) {
      console.log('success ' + success);
      $('#test').html(success);
  }
  });
  </code></pre>
  
  <p>Instead of showing family->compare the Ajax puts out category->compare. I don’t understand why.</p>
  
  <p>Can someone please help? I'm working on this problem for over 2 days now...</p>