If an ad group is enabled, but there are no ads in it, the JavaScript spits "No active ads were found in the group "highlights4"". This is relatively useless - whereas your intent (to indicate to the admin that there's no ads in the group) is to inform, you've done so in the wrong place. At NHPR, we have, for example, four ad groups called "highlight1", 2, 3, and 4. All four are enabled all the time. Occasionally all four are full because we have four awesome features. Sometimes, however, we only have three or two. Or even just one. With the JS output, we now can't run an ad for a week-long highlight and then have it disappear: we have to very carefully make sure that someone manually disables the Ad group block, otherwise we risk the unsightly error message to our users. This is a pain.
Suggestion: move the warning into a watchdog block (or perhaps, an HTML comment if you're trying to save the bootstrap) and don't show anything if there are no ads enabled. I know, I know: I suspect the warning was prevalent and obvious because of the incredible "ads don't show" support queue. Fine. If you don't want to remove it entirely, at least give me an admin option to disable it (but again, sadly, at the cost of a variable_get bootstrap).
Comments
Comment #1
morbus iffNOTE: we CAN get rid of the multiple ad groups via the "Number of ads" configuration in the blocks - yes, that would be a much more elegant design. But the basic fact remains: if there are no highlights, we can't just let ads expire - we also must manually remove the ad group from display.
Comment #2
jeremy commentedYes, the code to display these errors as an html comment already existed, it was just commented out during the beta period -- then I forget to uncomment it out before releasing v1.0.
The error of not finding any ads is now displayed within an html comment, fixed in both the 4.7.x and 5.x development branches.
However, this may not be good enough for you -- perhaps it's important that nothing at all is output so the block completely goes away? I suspect as things currently stand you'll end up with a blank block.
Comment #3
jeremy commentedI moved the "$error" variable into adserve_variable so that caches can set it. Thus this now works with the file cache too.
Marking as closed, but re-open if the displaying of comments is problematic for you.
Comment #4
(not verified) commented