Please update js from
var element = settings.element;
setBlockRefresh('#' + element, '.content', settings['auto'], settings['manual'], settings['init'], settings['timer'], settings['arguments'], settings['block']['block'], settings['block']['delta'], false);
var element = settings.element;
if(typeof element === 'undefined'){
return ;
}
setBlockRefresh('#' + element, '.content', settings['auto'], settings['manual'], settings['init'], settings['timer'], settings['arguments'], settings['block']['block'], settings['block']['delta'], false);
If settings.element is undefined javascript is searching for elements like #undefined or .undefined.
Comments
Comment #1
tripper54 commentedThanks for reporting. This seems like a reasonable sanity check.
However, I'm interested to know the conditions under which settings would exist without settings.element being set. This might point to an underlying bug in the config system.
Are you able to provide steps to reproduce this bug? Also perhaps a var dump of the block_refresh_settings variable (perhaps via drush vget block_refresh_settings)?
Thanks!
Comment #2
smitarai commentedThe element is set, but the blocks don't appear on that page. I checked the settings it is not empty.
The sanity check was present in version 7.1.3.
I cannot provide much data on the issue, but what is happening is there is a google analytics script which strangely has an id="undefined" and it is getting populated with ajax content for a block which is not present on the page.
Hope that helped.
Comment #3
tripper54 commentedFair enough. It would be interesting to know the circumstances under which this check was triggered, but I guess it doesn't matter unless some other weird behaviour manifests.
Committed, thanks for letting me know about this.
Comment #4
tripper54 commented