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

tripper54’s picture

Status: Active » Postponed (maintainer needs more info)

Thanks 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!

smitarai’s picture

The 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.

tripper54’s picture

Status: Postponed (maintainer needs more info) » Fixed

Fair 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.

tripper54’s picture

Version: 7.x-2.4 » 7.x-2.x-dev

  • tripper54 committed 42c32f9 on
    Issue #2462015 by smitarai: Js checking for element #undefined
    

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.