问题描述:

I'm trying to grab some data from the database on a page in typo3 using Ajax . So after a long time looking for the appropriate way to do it , I got convinced that The Ajax Dispatcher is the best tool to do the job . So I created the file following the instructions to be found here.

Now when I make an Ajax call on my page , the console displays a 500 (Internal Server Error).

joined is a snapshot of my console tab.

and this is the jquery function that gets run on an onchange event .

function getContent(id)

{

 console.log("Start process ...");

$.ajax({

async: 'true',

url: 'index.php',

type: 'POST',

data: {

eID: "ajaxDispatcher",

request: {

pluginName: 'listapp',

controller: 'Pays',

action: 'getMyCos',

arguments: {

'id': id,

}

}

},

dataType: "json",

success: function(result) {

console.log(result);

},

error: function(error) {

console.log(error);

}

});

}

Could someone please help me , I just started developing with this CMS of shit :p

网友答案:

If you indeed followed the tutorial step by step, and you use TYPO3 V6.2, you would get errors cause of depricated function calls to t3lib_div (as the title of the blog item says, it is for version 4.x) Always keep your error.log open, it's your best friend in times of coding stress

You can also use typenum for ajax calls http://lbrmedia.net/codebase/Eintrag/extbase-60-ajax-bootstrap/

I can imagine that starting with TYPO3 can be frustrating, but calling it a 'CMS of shit' does not seems to be a smart strategic move if you need help from people who think differently about it.

相关阅读:
Top