Module is missing the image from the package distribution (images/loading.gif). Its not in the tar file.

Second the basepath that is generated using "drupal_get_path" function is also incorrect as its always prefixed with the "web" path, not the physical directory path where the module resides. As a temporary fix I have replaced the function lookup, with a hardcoded path of 'sites/all/modules/ajax_register' in file ajax_register.module line 18.

Here are few (out of thousands) log entries that show that the module is looking for the image using absolute web-based paths, not physical filesystem paths.

page not found 06/24/2009 - 07:42 admin/reports/access/sites/all/modules/ajax_register ... Mark B.
page not found 06/24/2009 - 07:39 node/sites/all/modules/ajax_register/images/loading.gif Anonymous
page not found 06/24/2009 - 07:37 node/sites/all/modules/ajax_register/images/loading.gif Mark B.
page not found 06/24/2009 - 07:37 release/sites/all/modules/ajax_register/images/loadi ... Mark B.
page not found 06/24/2009 - 07:33 user/sites/all/modules/ajax_register/images/sites/al ... Mark B.
page not found 06/24/2009 - 07:33 user/sites/all/modules/ajax_register/images/loading.gif Mark B.
page not found 06/24/2009 - 07:29 node/sites/all/modules/ajax_register/images/loading.gif timguy
page not found 06/24/2009 - 07:27 user/sites/all/modules/ajax_register/images/sites/al ... Mark B.

Comments

compujohnny’s picture

Status: Active » Fixed

Added loading.gif
Fixed

compujohnny’s picture

Status: Fixed » Closed (fixed)

issue closed

comparellc’s picture

Status: Closed (fixed) » Needs review

Latest .module file still doesn't have changes. What is the actual path that needs to be put on line 18? I added what the original poster did, but this did not fix the problem of 404 Not Found.

$path = 'var tb_pathToImage ="'.'sites/all/modules/ajax_register/images/loading.gif";'; <--- This is what I have, not quite working.
$path = 'var tb_pathToImage ="'. drupal_get_path('module', 'ajax_register') .'/images/loading.gif";'; <--- Original Line, from the stable file download (redownloaded today to make sure.
It is still the same.

comparellc’s picture

Status: Needs review » Closed (fixed)

Hah, had wrong path..fixed.

screenage’s picture

The problem also seems to occur on multilangual sites, which have a prefix by default.

For example, the URL it searches for is
http://MYSITE.com/fr/sites/all/modules/contrib/ajax_register/images/load...

but actually it must be without prefix:
http://MYSITE.com/sites/all/modules/contrib/ajax_register/images/loading...

So I think the line with tb_pathToImage must become:
$path = 'var tb_pathToImage ="/'. drupal_get_path('module', 'ajax_register') .'/images/loading.gif";';

(haven't tested it out to be honest)

Reevescorp’s picture

This line

$path = 'var tb_pathToImage ="/'. drupal_get_path('module', 'ajax_register') .'/images/loading.gif";';

Is correct... fixed problem.

Also note... this bug in ajax_register was breaking encryption on my checkout page since it could not find the loading.gif image. "Parts of the page you are viewing were not encrypted..."

kardave’s picture

Version: 6.x-1.x-dev » 6.x-1.5
Status: Closed (fixed) » Active

This is still a bug , also in v1.5!

Please make a new version.

Thanks,
David

Vasiliy Grotov’s picture

Сonfirm.
Bug is not fixed (I'm using 1.5).

Looks like a problem with a path.
/user/sites/all/modules/ajax_register/images/loading.gif

LittleG’s picture

Version: 6.x-1.5 » 6.x-2.1

6.x-2.1 still has this bug!

craigmc’s picture

Still an issue. I'm in the weeds on a project, but you basically just need to add a base_path() before the rest of it...
so

$path = 'var tb_pathToImage ="'. base_path() . drupal_get_path('module', 'ajax_register') .'/images/loading.gif";';

Will try to circle back and cut a patch when I'm not on deadline.

Thx