Hi, I'm having a bit of problem. The images for the image ad won't show up, all I see in the created ad is a place holder. The link seems to work as does the counter and such. Using Drupal 5.1, MySQL 5.0.32, PHP 5.2.0-8, and apache 2.2.3. No errors in the logs and the image file is right where it thinks it's looking. All the settings are set to 0 and cache is off.

I can see the image if I go to Ads > List > edit, but not if I click on the Content > ad title or if I try to show it in a block on the site.

Thanks.

Comments

vm’s picture

sounds like a path issue. to help diagnose: view the source of the page. find the HTML being added for the advertisment image and see if you can see whats not correct about the path.

vm’s picture

image file is right where it thinks it's looking

unless that is a reference to you knowing the path to the image is indeed correct.

srlinuxx’s picture

Well, I was saying it was looking in the right place cuz the full path (http://www.example.org/files/on-disk-banner.jpg) was given under the file attachment section of the edit page as well as the image showing up. But the source of the ad content page seems to show just the directory (http://www.example.org/files/) and not the image file itself. I uploaded the image thru the "file attachments."

    <span class="taxonomy"></span>
    <div class="content"><div class="image-advertisement" id="ad-15013"><a href="/ad/redirect/15013/" target="_blank"><img src="http://www.tuxmachines.org/files/" width="" height="" /></a></div><br />Links to <em>http://on-disk.com/index.php</em>.<p>On-Disk.com</p>
  <div class="box">
teleted’s picture

Component: ad_image.module » adserve.php
Status: Active » Needs review

I don't know if this is the proper fix, but I found that the adserve.php was the problem. None of the parameters were available after the bootstrap process.

I determined this using the debug option for adserve.php. I added &debug=2 to the normal call for this URL:

http://www.siteaddress.com/sites/all/modules/ad/adserve.php?g=Header&c=none&p=f&f=1&q=1&k=&debug=2

I solved this problem of empty variables by simply moving the following code to the begnning of the file:

$ad_dir = getcwd();

// Move process to top level Drupal directory so we can perform a bootstrap.
for ($i = 1; $i <= 20; $i++) {
  if (file_exists('./includes/bootstrap.inc')) {
    break;
  }
  chdir('..');
}
$root_dir = getcwd();
require_once './includes/bootstrap.inc';

adserve_bootstrap();
srlinuxx’s picture

hmm, it's still behaving the same here.

jeremy’s picture

Assigned: Unassigned » jeremy
Status: Needs review » Fixed

Fixed, as detailed here (#16).

Anonymous’s picture

Status: Fixed » Closed (fixed)