Ads, assigned to channel, are not displayed, because function ad_channel_ad_build_cache() build incorrect data.
But if replacing in code

/**
 * Implementation of hook_ad_build_cache().
 */
function ad_channel_ad_build_cache() {
  $cache = array();
  $ads = array();
  $active = db_query("SELECT aid FROM {ads} WHERE adstatus = 'active'");
  while ($ad = db_fetch_object($active)) {
    // cache channel<->node relation
    $result = db_query('SELECT chid FROM {ad_channel_node} WHERE nid = %d', $ad->nid);
    while ($channel = db_fetch_object($result)) {
      $ads[$ad->aid][$channel->chid] = $channel->chid;
      //$ads[$channel->chid][$ad->aid] = $ad->aid;
    }
  }

with

    $result = db_query('SELECT chid FROM {ad_channel_node} WHERE nid = %d', $ad->aid); // $ad->nid  -- $ad->aid

all working correctly.

In the scheme 'ads' there is no column 'nid'.

Versions affected: 6.x-2.x-dev, 6.x-3.x-dev.

Comments

danSamara’s picture

StatusFileSize
new711 bytes

Patch...

lrwebks’s picture

Issue summary: View changes
Status: Active » Closed (outdated)

Drupal 6 is EOL and no longer supported. Closing this as outdated for that reason. Thanks for your contribution!