I migrated a site successfully from one server/domain to another.
On the previous site SimpleAds behaved perfectly!
Everything else works fine on the new domain/server, except for a curious issue with SimpleAds
All field content, images, etc migrated with no problem, but the ad images are not appearing in their ad blocks.
The ad images can be seen when the node is edited. The ads are active. The ad images exist in the directory.
The blocks appear.
However the ads do not appear in the ad blocks themselves!

The error I get:

http://www.X.com.au/?q=simpleads/load/60/1
Failed to load resource: the server responded with a status of 403

Any ideas on this one? I really have no idea...

Thanks for your time.

Comments

petarb’s picture

I've run some more test. I've created new subdomains and installations on the same server, and created a fresh Drupal install with one module installed - SimpleAds. Curiosly, the same issue occurs, once I create and enable some adverts. Whilst the upload fine, and the image in the directory correctly, they do not show in the block. So this seems to be specific to the server environment. I tried removing htaccess files and checking, but it appears to make no difference. I'm still getting:

Failed to load resource: the server responded with a status of 403 (Forbidden) http://xxxx.com.au/?q=simpleads/load/60/1Failed to load resource: the server responded with a status of 403 (Forbidden)

- when I inspect the page in my browser's error console.

So still at a loss as to why this is occurring but at least I can rule out a bad migration, corrupt database, or compatiblity issues with other modules.

Looking forwards to suggestions!

petarb’s picture

Title: Migrated site: blocks render but ads are not appearing » Blocks render but ads are not appearing [solved]

I have sorted out this issue, although it's still unclear to me exactly why it's happening.

Its to do with the URL generated by SimpleAds. It might be relevant for others, so I'll post my 'hack' here, if others run into the issue.

The module creates a URL request in the form: http://x.com.au/?q=simpleads/load/y/z which pulls the image onto the block area.

The problem for my hosting environment is that it now does not like the "?q=" part of this URL structure. It may be because my new hosting environment is configured differently from my previous one. It also maybe due to a basepath or Clean URLs issue, but I don't have time to investigate this now.

The 'quick' solution was to amend one of the modules files that creates this URL to change it to a URL structure more inline with the Clean URLs.

This file is simpleads.js

line 113:

      $.get(basepath + '?q=simpleads/load/' + tid + '/' + num, function (data) {

Change to:

      $.get(basepath + 'simpleads/load/' + tid + '/' + num, function (data) {

The ad images now display.

Thanks again for this great module.

petarb’s picture

Issue summary: View changes

updated info

minnur’s picture

Issue summary: View changes
Status: Active » Closed (won't fix)