Fix for errors shown when using ads and working on localhost

ctweed 01 Mar, 2020
Answer
For development I find it useful to clone the live system to localhost and do the trial validation when needed. I noticed a bunch of error messages reporting "counter" as an undefined variable when using ads, and thought I'd send a fix for it:

in components\com_chronoforums2\chronoforums\themes\default\views\topics\advertisement.php

Change
if(!empty($this->get('settings.adverts_code', ''))){ 
to
 if(isset($counter) && !empty($this->get('settings.adverts_code', ''))){
This topic is locked and no more replies can be posted.