Help with Welcome Emails

Post

Posted
Rating:
#5886 (In Topic #1225)
Hello everyone,

I'm having some real difficulties figuring out how to get Welcome Emails to work.  I have newletters enabled, so the functionality for tempcode (or parameters) should work.  In particular, I would like to have the Welcome Email personalized so that the name (or firstname) will appear.

For example, I would like —

Dear {name},

to have the {name} parameter be changed to the name of the person receiving the email.  This is not happening.  It appears just as entered.  I would also like to have parameters for {username} and {password} filled in properly as well.  But again, no parameters are getting filled in…so I'm assuming they are not getting passed?

Another problem I'm noticing is that when I preview the body of the email, I am getting two error messages:
A language string is missing: NEWSLETTER_UNSUBSCRIBE_NEWSLETTER
A language string is missing: NEWSLETTER_UNSUBSCRIBE_MEMBER

I looked inside the newsletter.ini and these two language strings do exist, so I have no idea why I'm getting these messages.  But they are messing up the bottom of the emails where the user should be able to opt out of the subscription.  Any ideas why this is happening?

When previewing the Welcome email I am receiving the emails via SMTP but without the parameters variables being replaced.

Thanks in advance for any assistance you can offer.  Much appreciated.

Best,
Christopher
 

Last edit: by cwdean

Post

Posted
Rating:
#5887
Hi Christopher,

This looks like a bug, and possibly a misunderstanding. I'll look into it soon for you.

Post

Posted
Rating:
#5888
Hi Chris,

Thanks for the quick response.  If there is anything I can do to help with testing any changes or fixes, please let me know.  I'm happy to help any way that I can.

I'm currently setting up my Homeowners Association community we site using Composr and was looking forward to using the Welcome Email capability to introduce new members to the site and provide them with a temporary password that they would need to change upon first log in.  That's the intent anyway :)

Thanks for you help and I look forward to hearing what you find out (or come up with as a fix).

Best regards,
Christopher

P.S.  Should I open a ticket for this?  Or do you have that covered?  Thanks again!

Post

Important!
Posted
Rating:
#5896

Automated fix message

Chris Graham said

Should be working now.

Somehow the .htaccess file was blank.

I restored from a backup, and I found I had to comment out

Code

Options +FollowSymLinks
from my backup, based on your current server configuration.

So it seems somehow something wiped that file or the file was intentionally wiped when debugging it causing an internal server error message due to FollowSymLinks no longer being valid for .htaccess override in your Apache configuration.

Best,
Chris
This issue has now been filed on the tracker as issue #4204, with a fix.

Post

Posted
Rating:
Item has a rating of 5 Item has a rating of 5 Item has a rating of 5 Item has a rating of 5 Item has a rating of 5 (Liked by Adam Edington)
#5897
Sorry for these issues. I think people were not really utilising the variable substitution support in welcome e-mails or using the preview.

Whilst I was fixing all this I part-solved your issue needing to have passwords in there.
You can now do {m_pass_hash_salted}.
It will just give you the hash, but I'll discuss further in your other topic (

Help with Account approval email

Open Source CMS with advanced social, interactive and dynamic features. Fully flexible, themeable and extendible: suitable for building powerful websites.

View

).

Post

Posted
Rating:
#5900
This is fabulous.  Thanks Chris!

I've downloaded the hotfix and will check it out later today.

Post

Posted
Rating:
#5906
Chris, I applied the fix as instructed.  However, when testing I am getting the following error:

An error has occurred

A source code file is missing/corrupt/incompatible: cns_welcome_emails... "include() [<a href='http://php.net/manual/en/function.include.php'>function.include.php</a>]: Failed opening 'sources/cns_welcome_emails.php' for inclusion (include_path='.:/usr/local/php73/pear')" (sources/cns_welcome_emails.php or an overridden equivalent to this path) (version: 10.0.30, PHP version: 7.3.16, URL: /data/preview.php?page=admin_cns_welcome_emails&type=_edit)


Looks like code is looking for cns_welcome_emails.php in the sources folder.  I don't see any such file in that folder (not prior to updating or afterward.  The fix wants that file to be located in sources/hooks/systems/preview.

Any I overlooking something or done something incorrectly?  As far as I can tell, I've placed the files in the correct directories and ensured that permissions are still set properly (0644).  

Thoughts?
 

Post

Posted
Rating:
#5907
Ah, sorry, it must have not made it into the hot-fix.
It's here and I'll update the fix.

https://gitlab.com/composr-foundation/composr/-/raw/master/sources/cns_welcome_emails.php

Post

Posted
Rating:
#5909

Ah, sorry, it must have not made it into the hot-fix.
It's here and I'll update the fix.

https://gitlab.com/composr-foundation/composr/-/raw/master/sources/cns_welcome_emails.php


That fixed it :)

Quick question: the fix now looks like this, which is fine:

You are receiving this newsletter because you have a member account set to “Receive newsletters and other site updates”. You can change your settings at: https://torhoa.org/site/index.php?page=members&type=view#tab__edit

I don't see that option on Edit/Settings tab.  And since this is a Welcome email, the term 'newsletter' may be confusing.  I don't think it's that big a deal, but the link to change your settings probably needs to be clear.  Is that link correct?  because I'm not seeing "Receive newsletters and other site updates" there.
 

Post

Important!
Posted
Rating:
#5911

Automated fix message

RoisinR said

We have a online business which makes us keep our website updated with new content to make it look interesting to the audience. We have been checking to make sure every content looks and works fine where ever it is viewed but recently few customers have been complaining that our website is unreabeable on mobile but its fine if they view it on desktop screen. We are unable to figure out what could cause this issue or if is it something due to the type of cms we are using. Does anyone know what could be causing this issue and if it is due to the cms we are using or something else?Thanks. 
This issue has now been filed on the tracker as issue #4210, with a fix.

Post

Posted
Rating:
#5915
Thank-you!

If the only correction made was to add the "sources/cns_welcome_emails.php" file then I was able to download that file from gitlab and apply.  That definitely fixed the Error I was getting.

However, I am now not receiving any Welcome emails   :( .  This may not be related to the apply fix but it is definitely something I am now experiencing.  It worked the first time which is how I was able to report the original language string errors, but after creating a second account (with the latest fixes) I  did not receive the Welcome email.  I did receive the Validation email after validating, however.

Does the Welcome email require the new account to be pre-validated in order to be sent?  Trying to figure out how I got it to work the first time but not the second.  Any thoughts or suggestions?

Thanks for all your  help!

Post

Important!
Posted
Rating:
#5920

Automated fix message

System said

This is a spacer post for a website comment topic. The content this topic relates to: Something strange happening when updating a member's profile page
This issue has now been filed on the tracker as issue #4211, with a fix.

Post

Posted
Rating:
Item has a rating of 5 Item has a rating of 5 Item has a rating of 5 Item has a rating of 5 Item has a rating of 5 (Liked by Adam Edington)
#5921
Your suspicion was correct, it does respect validation.
I've implemented above a special case whereby immediate welcome e-mails will now ignore validation, as obviously staff can't handle validation in a zero time span.
Otherwise, the behaviour is now documented.

That said…

We have been discussing implementing the feature to simply send out an e-mail when you add the member, which hopefully bypasses any need for these kinds of welcome e-mail or validation e-mail workarounds.

Post

Posted
Rating:
#5925

Chris Graham said

Your suspicion was correct, it does respect validation.
I've implemented above a special case whereby immediate welcome e-mails will now ignore validation, as obviously staff can't handle validation in a zero time span.
Otherwise, the behaviour is now documented.

That said…

We have been discussing implementing the feature to simply send out an e-mail when you add the member, which hopefully bypasses any need for these kinds of welcome e-mail or validation e-mail workarounds.


Thanks for confirming my suspicion.  I'm glad you implemented a special case as I did find that behavior unusual, because as you state, 'staff can't handle validation in a zero time span'.  is that 'fix' available for download?

Yes, we are definitely continuing to work out the details for sending an email when you add a member (see my latest response).

Post

Posted
Rating:
#5927

Post

Posted
Rating:
#5933

Chris Graham said


Perfect.  Thanks Chris.  I'll check this out shortly.
0 guests and 0 members have recently viewed this.