I installed this 'looks like a great' module, but I can't get the ads to show. Drupal 5.3. Tried both the 5.x-1.4 and 5.x-1.x-dev release. Also spend a few houres to read the issues but can't find the solution.

This is the debug output:

ad_dir: '/var/www/html/DRUPAL_SHARED_CODEBASE/modules/ad'
debug: '2'
cache: 'none'
nids: ''
tids: '0'
hostid: ''
quantity: '1'
aid: '0'
ad_display: 'javascript'
Drupal bootstrap '0'.
Root drupal directory detected as '/var/www/html/DRUPAL_SHARED_CODEBASE'.

/var/www/html/DRUPAL_SHARED_CODEBASE/modules/ad/serve.php: // $Id: serve.php,v 1.1.2.2 2007/10/19 02:46:40 jeremy Exp $
/var/www/html/DRUPAL_SHARED_CODEBASE/modules/ad/ad.module: // $Id: ad.module,v 1.2.2.29.2.62 2008/01/17 20:04:14 jeremy Exp $

No cache enabled.
Drupal bootstrap '7'.
Ads previously served: 0
Searching for ads with no tids.
Query: "SELECT a.aid, a.adtype, a.redirect, a.activated, a.maxviews, a.maxclicks FROM {ads} a LEFT JOIN {term_node} n ON a.aid = n.nid WHERE a.adstatus = 'active' AND n.tid IS NULL ORDER BY RAND() LIMIT 1;"
adserve_increment action(count) cache(none)
Drupal bootstrap '7'.
Ads displayed: 0
document.write('\x3c!-- No active ads were found in the tids \'0\'. --\x3e');

If I execute the query in mysql, I get one result (I have only one ad). I don't use ad-groups, I have one text ad, display block. Also doens't work when using image ad.

There might be one issue: we use a symlink to the modules folder which is at another path. In 'adserv.inc' should I specify the 'DRUPAL_ROOT' to the modules folder or the site root? Tried both...

CommentFileSizeAuthor
#2 adserve.inc_.patch1.46 KBrmpel

Comments

hanskuiters’s picture

Can someone give me a clue?

rmpel’s picture

Title: Can't get ads to show » Can't get ads to show -> Solved
Status: Active » Needs review
StatusFileSize
new1.46 KB

The reason you don't see ads is because you are (probably) working in a symlinked installation.

The solution is attached

This patchfile makes adserve.inc compatible with symlinked installations.

hanskuiters’s picture

Indeed we use a symlinked installation. The patch works very well. Thank you.

jeremy’s picture

Can you send the output from:

   SELECT * FROM vocabulary_node_types;
jeremy’s picture

Ugh, wrong issue, please ignore.

rmpel’s picture

Capono, thanks for testing the patch.

Hope Jeremy finds the time to respond to this issue, mostly to answer the question if this is going to be in a future release or if we need to keep patching this module.

jeremy’s picture

I've not had time to review the patch closely, I will eventually. I need to be confident that your extra lines of code are necessary, and aren't going to break anything for the various possible configurations.

Vidarls’s picture

Will this patch perhaps fix this issue (http://drupal.org/node/227237) aswell?

rmpel’s picture

Only thing I can say to that, Vidar, is to try it :)

The only certainty I can give you is that in our symlinked installations, we can display our image ads without any trouble with this patch.

If you do get a chance to try it, maybe that would give Jeremy some assurance regarding this patch.

jeremy’s picture

Category: support » bug
Status: Needs review » Fixed

I have committed a similar patch, thanks!

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.