Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
google_store_locator.js should report AJAX and JSON errors.
Even if this is just logging them to the console:
$.getJSON(url, function(json) {
//defining our success handler, i.e. if the path we're passing to $.getJSON
//is legit and returns a JSON file then this runs.
// These will be either all stores, or those within the viewport.
var parsedStores = that.parseStores_(json);
that.setStoresCache(url, parsedStores);
that.processParsedStores(parsedStores, bounds, features, callback, centerPoint);
// THIS COULD ME MOVED TO 'always()'
$("#cluster-loading").remove();
//
})
.done(function() {
console.log( "second success" );
})
.fail(function() {
console.log( "error" );
})
.always(function() {
console.log( "complete" );
});
Comments
Comment #2
ITWest-jg CreditAttribution: ITWest-jg commentedI should state why this is a problem we have on occasion -- when the wrong URL for the JSON feed is entered instead of JSON, you get the drupal 404 page which does not parse. This throws an error that is not caught.
Comment #3
ITWest-jg CreditAttribution: ITWest-jg commented