Project:Notify
Version:5.x-1.1
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

The link comes out as http:///node/123 instead of http://example.com/drupal/node/123
This is in Version 5.x-1.1 (notify.module,v 2.67.2.3 2007/07/15) where the drupal site is in a subdirectory as indicated.

gil

Comments

#1

Bumping.
This bug makes the notification near worthless.

#2

The issue occurs when you run cron using command line php, like this:

47 * * * * cd /srv/www/htdocs/drupal; php -q cron.php > /dev/null 2>&1

Solution is to set $base_url in settings.php:

$base_url = 'http://your.site.com/drupal';  // NO trailing slash!

Or you could run cron using wget, but I prefer command line.

#3

Thanks tambetm for providing a solution.
Is this something that can be fixed from inside the module,
or do we just need to document this behavior?

#4

tambetm -- Not sure your solution about the base url is correct. I've double-checked and the affected site does not have a trailing slash. I've always known of that issue. Must be something else.

#5

worked brilliantly for me thanks!

#6

@Capnj : you need to provide more information. How do you use cron? (see #2) Do you have the $base_url line commented out?

@drsmooth: you mentioned some difficulties in the duplicate issue. http://drupal.org/node/88648 Here you claim it works. Which is it and how did you solve your problem?

#7

Finally getting back to this issue. Cron job is:
*** /cron.php > /dev/null 2>&1

and base url is
$base_url = 'http://www.{site}'; // NO trailing slash!

and in the notify output I get
[ http:///node/523 ]

I have another site set up identically, that works fine. The only difference is the one that works is on Drupal 5.1 (about to upgrade to 5.3) and Notify 5.x-1.0, and the one that does not work is Drupal 5.2 and Notify 5.x-1.1. I've tried changing the versions of Notify to no avail.

Other ideas?

#8

Status:active» fixed

This is resolved by proper cron config via wget or curl, as recommended in Drupal docs.

#9

Status:fixed» closed (fixed)

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