I have a page in the cache containing multiple blocks that get Ajax-ed. I remove one of those blocks from the cache. Javascript fails.
JSON returned is
{ "views-name-block_1": null }
JS error is data[key] is null in
function ajaxify_regions_success_block(data)
{
for(key in data) {
var block = $('#block-'+key+'-ajax-content').replaceWith(data[key]['content']);
Drupal.attachBehaviors(block);
}
};
Rest of the blocks fail to load due to this JS error. Suggest testing for a return value of NULL and having the option of:
* doing nothing
* use no-js fallback
* hiding this block
If I had to pick a default I would go for hiding of the block.
Comments
Comment #1
mikeytown2 commentedTypo Fix:
"I remove one of those blocks from the
cachesystem."Comment #2
csevb10 commentedFixed in commit http://drupal.org/cvs?commit=419696 in the desired way.