Help with mail function after upgrade

Permalink
Hi all,

recently updated a clients site to concrete5.4.2

When I activate a user i get the follwong error

Warning: include(mysite/updates/concrete5.4.2/concrete/config/../mail/user_activation.php) [function.include]: failed to open stream: No such file or directory in mysite/updates/concrete5.4.2/concrete/helpers/mail.php on line 94
Warning: include() [function.include]: Failed opening 'mysite/updates/concrete5.4.2/concrete/config/../mail/user_activation.php' for inclusion (include_path='mysite/libraries/3rdparty:mysite/user/htdocs/updates/concrete5.4.2/concrete/config/../libraries/3rdparty:.:/usr/share/pear:/usr/share/php') in mysite/updates/concrete5.4.2/concrete/helpers/mail.php on line 94


I've looked at the line in question and it's reffering to an email template

include(DIR_FILES_EMAIL_TEMPLATES_CORE . "/{$template}.php");


Any help would be great

r1digital
 
r1digital replied on at Permalink Reply
r1digital
*BUMP*

Any ideas?
PortlandLabs replied on at Permalink Reply
PortlandLabs
What version of concrete5 did you upgrade from? I tried to replicate this by making a user then clicking "deactivate user" then "activate user" but I didn't get the error.

It looks like it is trying to send an email from a template that no longer exists. I did some text searching and it doesn't look like the current version of concrete5 tries to send out any mail with a 'user_activation' template and also the current version doesn't have anything at mail/user_activation.php.
r1digital replied on at Permalink Reply
r1digital
It was an upgrade from 5.4.1 to 5.4.2

:(
mkly replied on at Permalink Reply
mkly
That's ok. There is probably file on your server called user_activation.php somewhere. Can you use your ftp client to do a search for that file? If so post back with the location.
r1digital replied on at Permalink Reply
r1digital
concrete/mail/user_activation.php does that help?
GregJoyce replied on at Permalink Reply
GregJoyce
What's probably happening is that your site is trying to use the 5.4.1 version of concrete but it's looking in the upgrade folder for something that no longer exists. It could be a caching issue, try clearing out your cache from the Dashboard under Sitewide Settings.
mkly replied on at Permalink Reply
mkly
It does. Ok. It looks like there is some code that is trying an include statement with
../mail/user_activation.php

That file is most likely located in the one directory down from the concrete directory. Basically someone is trying to drop down a directory with .. and then climb up to mail.

Do you have ssh or console access to the server and is it Linux? If so the easiest would be to log in and run a
grep -R '\.\./mail/user_activation' *

or
grep -R 'user_activation' *


if not you need to find the offending file with the reference to user_activation.php

Find that and post back and we'll put that file in a safer place and update the offending file.
r1digital replied on at Permalink Reply
r1digital
Don't have SSH :(

The file is apparently concrete/helpers/mail.php
mkly replied on at Permalink Reply
mkly
You could try moving user_activation.php to the root mail instead of concrete/mail. Although clearing the Cache if you haven't isn't a terrible idea at all.
GregJoyce replied on at Permalink Reply
GregJoyce
Do you know if the site has any modifications to the core going on? There is no user_activation mail template in 5.4.1 either... Can you post your environment info? If you have overrides maybe that will tell us something.