Subscription, changing the automated reminder email to update to new forum url

Started by PenelopeQ, September 22, 2011, 09:26:06 AM

Previous topic - Next topic

PenelopeQ

I changed my url a few months ago--July. I had to go into phpMyAdmin and do some automaticfind and replaces to get internal urls changed over. Everything seemed fine and for the most part is fine.

But I just received an email from a subscriber. She received an automated email reminding her to renew. It points to her profile using the old url and I cannot find where in the system to change it.

I know where I have an automated reminder email and have checked it in both my 6 and 12 months subscriptions--it's identical for each.  It's short and contains no links. I can change that in the modify area for each specific subscription type.

But that is a short email and she forwarded what she received to me and it is a bit longer.

Here's what I have set up in each subscription
Your subscription to the Private Boards at The Hero's Spouse Online Community expires in 30 days.

Here is what she forwarded to me
Name,

A subscription you are subscribed to at Midlife Crisis: Support for Left Behind Spouses is about to expire. If when you took out the subscription you selected to auto-renew you need take no action - otherwise you may wish to consider subscribing once more. Details are below:

Subscription Name: Subscriber, 6 Month
Expires: Date
To edit your subscriptions visit the following URL:
< >http://oldurl.com/profile/?area=subscriptions;u=[subscriber ID #]

Regards,
The Midlife Crisis: Support for Left Behind Spouses Team.


So does anyone know where I can find the location that automatic message is stored so that I can edit it?
It should not be soething through PayPal, but should be within the forum because I do not allow auto renew.

Angelina Belle

To see what you've got for that message, you can go to
Administration Center » Paid Subscriptions » View Subscriptions
Use the "modify" link next to the paid subscription in the list.


What are the contents of the box Email to Send upon Completion:?
Never attribute to malice that which is adequately explained by stupidity. -- Hanlon's Razor

PenelopeQ

Quote from: AngelinaBelle on September 28, 2011, 04:31:02 AM
To see what you've got for that message, you can go to
Administration Center » Paid Subscriptions » View Subscriptions
Use the "modify" link next to the paid subscription in the list.

Quote from: PenelopeQ on September 22, 2011, 09:26:06 AMHere's what I have set up in each subscription
Your subscription to the Private Boards at The Hero's Spouse Online Community expires in 30 days.

Quote from: AngelinaBelle on September 28, 2011, 04:31:02 AMWhat are the contents of the box Email to Send upon Completion:?
I don't see that box.

Angelina Belle

What do you see at Administration Center » Paid Subscriptions » View Subscriptions?
What do you see when you use the "modify" link?
Something like the attached file?
Never attribute to malice that which is adequately explained by stupidity. -- Hanlon's Razor

PenelopeQ

Quote from: AngelinaBelle on September 28, 2011, 07:06:38 PM
What do you see at Administration Center » Paid Subscriptions » View Subscriptions?
What do you see when you use the "modify" link?
Something like the attached file?
Quote from: PenelopeQ on September 22, 2011, 09:26:06 AMHere's what I have set up in each subscription
Your subscription to the Private Boards at The Hero's Spouse Online Community expires in 30 days.

Angelina Belle

Never attribute to malice that which is adequately explained by stupidity. -- Hanlon's Razor


Angelina Belle

Never attribute to malice that which is adequately explained by stupidity. -- Hanlon's Razor


Angelina Belle




Sorry for the typo.  How about ?action=admin;area=paidsubscribe;sa=modify;sid=1
Never attribute to malice that which is adequately explained by stupidity. -- Hanlon's Razor

PenelopeQ

Quote from: AngelinaBelle on September 28, 2011, 07:06:38 PM
What do you see at Administration Center » Paid Subscriptions » View Subscriptions?
What do you see when you use the "modify" link?
Something like the attached file?
Quote from: PenelopeQ on September 22, 2011, 09:26:06 AMHere's what I have set up in each subscription
Your subscription to the Private Boards at The Hero's Spouse Online Community expires in 30 days.

Angelina Belle

Just the one line? You don't see a bar labelled "Edit Subscription"?
No place to change settings like "Allow user to auto-renew this subscription"?

No way to change the cost of the subscription, or length of subscription?
Never attribute to malice that which is adequately explained by stupidity. -- Hanlon's Razor

PenelopeQ

Your image circled only the confirmation email.

I can also change

  • the subscription name
  • auto renew--check box is not checked
  • number of days reminder email is sent to renew
  • cost
  • duration

But I do not see an edit subscription bar

Angelina Belle

Thanks for confirming that.  I was confused about what you were seeing to do with managing that subscription.
I understand now that you are seeing the "Edit Subscription" title bar and all the rest of the stuff.

The message SMF sends when subscriptions expire is parameterized -- it sends the forum's URL.
If this URL is incorrect, then $scripturl is wrong for some reason.

The first place to check is Settings.php
What does it say for $boardurl =? It that is wrong -- there's your answer.  If that is correct, then the answer will involve some more complicated checking.


----------------------------------------
Here's how I came to this conclusion.

I did a search on all language files in Themes/default for "subscription you are subscribed".
These notices are sent out as one of the scheduled tasks -- Paid Subscription Check
You can see that the message is parameterized (see paid_subscription_reminder below) So this message itself is NOT the problem.

The relevent parameters there are: {FORUMNAME}, {PROFILE_LINK}.

Next, I went looking through ScheduledTasks.php to find where 'paid_subscription_reminder' is used.  I found it in function  scheduled_paid_subscriptions (see extract below). The profile link is set using the global variable $scripturl

How is it set?  I found this by searching all files for $scripturl =, which I found in QueryString.php ($scripturl=$boardurl . '/index.php').

How is $boardurl set?
1) from Settings.php
2) SMF tries to check and "fix up" $boardurl in function loadTheme, in  Load.php -- based on server settings,  forum_alias_urls, and other criteria.  No matter what URL was used to get there, if SMF decides the URL should be something different, it will fix up $boardurl and $scripturl to what it thinks is correct.

So I have to conclude that, if the profile link is set wrong, it is because $scripturl is set wrong. And if $scripturl is set wrong, it is because $boardurl is set wrong in Settings.php


Code (EmailTemplates.english.php) Select
'paid_subscription_reminder' => array(
/*
@additional_params: scheduled_approval
REALNAME: The real (display) name of the person receiving the email.
PROFILE_LINK: Link to profile of member receiving email where can renew.
SUBSCRIPTION: Name of the subscription.
END_DATE: Date it expires.
@description:
*/
'subject' => 'Subscription about to expire at {FORUMNAME}',
'body' => '{REALNAME},

A subscription you are subscribed to at {FORUMNAME} is about to expire. If when you took out the subscription you selected to auto-renew you need take no action - otherwise you may wish to consider subscribing once more. Details are below:

Subscription Name: {SUBSCRIPTION}
Expires: {END_DATE}

To edit your subscriptions visit the following URL:
{PROFILE_LINK}

{REGARDS}',
)

Never attribute to malice that which is adequately explained by stupidity. -- Hanlon's Razor

oldpilot

Wow I was following along and you are a great detective AngelinaBelle, I hope that helps out Penelope.

Thanks for your great work!


PenelopeQ

settings.php was correct. That sort of surprised me since it was often the problem with reepeating issues in the first weeks after the migration.

Advertisement: