Select2 fails to show 16th option

I am failing to find a problem in my code. Even the simple tests leave me puzzled.

I have an xml file of db with this layout:

                    <table name="x">
			<headline>laters img</headline>
			<content>laters text</content>

Using Xpath and Ajax I am exporting data from XML file to select2. It has to show headlines and it was showing fine when there were 15 headlines but it is not enough.

So if I add another table or another id, headline, content elements in existing table in that XML file, then Select2 fails to show the result. It says the results could not be loaded. Maybe there is a limiter left somewhere when I copied from web, not sure.

Code to initiate Select2:


/dropdownParent: $(’#myModal’),/
ajax: {
url: “search/ajax/ajaxfile.php”,
type: “post”,
dataType: ‘json’,
delay: 150,
data: function (params) {
return {
searchTerm: params.term // search term
processResults: function (response) {
return {
results: response
cache: true



I am still a newbie, so I would appreciate the help!

If you console.log() the response passed to the processResults() callback, what does the logged data look like?

Also, can you post the contents of ajaxfile.php?