Plugin

Developer
Supported

Infinite Scroll

ExpressionEngine 1.x, ExpressionEngine 2

Back to this add-on's main page
View Other Add-ons From Laisvunas

     

You must be logged in to post.

Failure if the string “html” is part of the code being loaded?

Bug Report

Malacandra95
Malacandra95

I began to see “false” alerts popping up when using Infinite Scroll on a new channel on my website… and when I stepped through the JS code to figure out what had gone wrong, I noticed it failing in resultOfFetchData:

if (response.indexOf('html') != -1{   // parsing EE error message 
      //alert('invalid action!');
      
response infiniteScroll<?=@$tag_count?>.parseResponseForMessage(response);
      
error_encountered true;
      
//infiniteScroll<?=@$tag_count?>.fetchData(pagination_url_segment);
      //return;
   

When looking at the contents of response when this fails, I’m finding the string “html” within a URL in the code being loaded, so it looks like this if failing because I’m including a link to HTML files within my entries?

If I stub out this test, Infinite Scroll displays my content correctly… but I’m worried that it won’t trap the EE error condition you’re looking for. 

And I’m wondering if there were anything more unique that you could search for to trap that condition?
Or whether there’s something more fundamental that’s going wrong on my end…