Regarding the "Mail Templates" in mail_edit module, the !url in "subscriptions-node-nid" template is displayed in the sent email as "." (instead of the base url).

What is wrong with "!url"?

Comments

salvis’s picture

If you go to admin/settings/subscriptions, do you see a red message at the top of the page?

ogharib’s picture

Yes, I get the following message:

Your installation returns http://localhost/my_project as the base URL of the site. This is probably not what you want, and it can usually be fixed by setting the $base_url variable in your settings.php file

So, do I need to add the $base_url variable in my settings.php file for the !url to work properly?
Actually, I do not set the $base_url variable in my settings.php file for my project, and I am not planning to do so.

salvis’s picture

Status: Active » Closed (works as designed)

You are of course free to do whatever you want, but please don't waste my time. So far, everyone has chosen the path of least resistance and set $base_url.

Subscriptions asks Drupal core for the base URL, and that's what it returns. If you find a fix, post it in the core issues queue, and everyone will benefit.

owahab’s picture

Status: Closed (works as designed) » Active

Most of Drupal modules work without setting a $base_url so what's the difference with subscriptions?
ogharib, could you please specify a file and a line number where this bug occurs?

salvis’s picture

Category: bug » support
Status: Active » Closed (works as designed)

Subscriptions calls the url() core function and uses the value that core returns. Modules that don't call url() obviously don't care about what it returns.

I don't have a box that exhibits this bad behavior, and no one with such a box has cared enough to debug core and find out what the problem is, so this is 'by design'.