After a normal update to 6.x-2.3, all ads fail to display. Inside the ad block, there is just a comment that says "no active ads were found in tnnn" where nnn is the block ID.
I am using ad, ad channels, ad file cache, ad weight probability, image ad and ad owners.
So far, I have tried the following steps to debug the problem:
I have disabled and re-enabled the module.
I have disabled and re-enabled existing ads.
I have disabled and re-enabled the blocks.
I have moved ads in and out of the ad groups and blocks.
I have created new ads.
I have tried disabling the ad cache.
I have tried running update.php a second time.
I have cleared all caches in performance settings (and wasn't caching anyway)
I have tried turning on all sub-modules (except actions and charts, which have dependencies)
Nothing works.
Comments
Comment #1
john franklin commentedDid you upgrade from 6.x-2.2 or some older version?
Comment #2
MadOverlord commentedPS: I checked the various log files, no error messages are being thrown.
Comment #3
MadOverlord commentedFrom 6.x-2.2, at the same time as I updated date, ubercart, and views_data_export
Comment #4
MadOverlord commentedAlso, I'm still running Drupal core 6.24
Comment #5
MadOverlord commentedAnd as one further data point, if I just pop the 6.x-2.2 code back into the .../modules/contrib folder, the ads instantly re-appear.
Some more background: I have two groups (top and sidebar) and two channels (top and sidebar), and all the ads in the top group are in the top channel, and likewise for sidebar. The ads show as active. They are image ads with no text, not using premiere checkbox, default scheduling (in other words, none), various probabilities.
Comment #6
MadOverlord commentedI had some time this morning so I did some more investigation. I enabled debug output and the ads are all getting discarded in adserve_cache_get_cache because they don't have channels. Except that all of them do.
I have two containers, each of which contains a single channel. Each ad belongs to one group and one channel.
The previous version of ad generated output like this:
I did some more checking and in ad_channel_cache_filter(), the following code always fails because $channels['ads'][$aid] is always NULL.
if (is_array($channels['ads']) && isset($channels['ads'][$aid]) &&
is_array($channels['ads'][$aid])) {
Comment #7
MadOverlord commentedI believe I may have found the error, in file ad_channel.module, function ad_channel_ad_build_cache() line 562
6.x-2.3 changes this line from this (in the previous version)
to this (in -2.3):
Note the change from $ad->aid to $ad->nid
Reverting this change (to "$ad->aid") restores display of ads.
Comment #8
john franklin commentedLooking at the code, especially the SQL query only a few lines above it, that's clearly the right answer. Thanks for the fix. Look for a 2.3.1 shortly.
Comment #9
john franklin commentedMarking fixed and moving to the root cause module: ad_channel.
Comment #10
john franklin commentedd.o doesn't grok 2.3.1 as a valid release version number, a bug IMHO, so it's called 6.x-2.4.
ps. @MadOverlord, check your profile page. :)
Comment #11
MadOverlord commentedLOL, thanks John. Glad I could be of service.