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.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | Channel ads are not displayed-1211894-1.patch | 711 bytes | danSamara |
Comments
Comment #1
danSamara commentedPatch...
Comment #2
lrwebks commentedDrupal 6 is EOL and no longer supported. Closing this as outdated for that reason. Thanks for your contribution!