[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[TYPO3-english] Problems with the extension comsolit suggest - javascript error

I have Problems with the extension comsolit suggest. There is a javascript 
error SyntaxError: JSON.parse: unexpected end of data at line 1 column 1 of the 
JSON data. I use bootstrap as well an integrated also the jquery libary 
jquery-1.9.1.min.js the date in the script stays empty

I use typo3 8.7.11 and integrated all includes including indexed_search based 
and fluid and comsolit_suggest. the pages have been indexed. Can anyone help me 
with this issue?

Here is the ajaxcode:

               var suggester = new Bloodhound({
                   queryTokenizer: Bloodhound.tokenizers.whitespace,
                   remote: {
cache: 'false', url: '/?type=999&no_cache=1&tx_comsolitsuggest_suggest[search]=%QUERY&tx_comsolitsuggest_suggest[method]=suggest',
                       wildcard: '%QUERY',
                       transport: function (ajaxOptions, onSuccess, onError) {
                           ajaxOptions.dataType = "html";
function done(data, textStatus, request) { onSuccess(JSON.parse(removeHTML(data))); //hier tritt der Fehler auf
function fail(request, textStatus, errorThrown) {
                   hint: true,
                   highlight: true,
                   minLength: 1,
               }, {
                   limit: 10,
                   displayKey: 'value',
                   source: suggester.ttAdapter()
               .on('typeahead:selected', function(e){
               function removeHTML(input){
                   return input.replace(/<\/?[^>]+>/gi, '');

TYPO3-english mailing list
[email protected]