tdBlock is not defined

Posted in: Newspaper
Post count: 17

Hey there —

I am using autoptomize and w3totalcache and everything appears to be working great — except I am getting tdBlock is not defined.

My URL is https://successfulstudent.org you can take a look.

If there’s any way to optionally add something like the following to gracefully wait for tdBlock to become available that would be great


// code simulating 2 second delay before tdBlock is defined
setTimeout(function(){
tdBlock = function(){};
},2000);

function runFunctionRequiringTdBlock(){

}

var waitForTdBlock = setInterval(function(){
console.log(typeof tdBlock);
if(typeof tdBlock == 'function'){
console.log('ready');
runFunctionRequiringTdBlock();
clearInterval(waitForTdBlock);
} else {

}
}, 500);

Do you guys have anything like that? or a way to do so? like a hook before and after you output code?

Post count: 22421

Hello,

Please provide more details to where you are getting tdBlock is not defined. I cannot see any errors on your site.

Thanks

Post count: 17

@bogdon b. Did you check https://successfulstudent.org — see this screen capture demonstrating the issue: http://recordit.co/h7rY2498zS/gif/notify

Post count: 22421

I see.

We have not tested such a code so there is no solution we can provide officially. Autoptimize or w3tc are not tested with our theme so we did not run any tests or simulations in this regard. Unfortunately third party plugin implementation is not covered by the theme support so you will have to hire a freelancer to help out with the code needed. Thank you for understanding.

Viewing 4 posts - 1 through 4 (of 4 total)
The forum ‘Newspaper’ is closed to new topics and replies.