PDA

View Full Version : [fixed] 2.3.0 Final bug? Email notification subject missing


Erwin
Tue 1st Apr '03, 11:15pm
I upgraded from RC3 to Final of 2.3.0 last night. Almost immediately after, I got members and staff telling me that the emails they get for subscribed threads were missing subjects - the body of the message was there (contents of template "email_notify") but the whole subject was gone giving a "no subject" message (contents of "emailsubject_notify" missing).

While upgrading manually with Araxis Merge, I remember an update in functions.php, in particular this section here:


// check templatesetid is loaded into cache, else use -1
if (!isset($mailcache["$touser[templatesetid]"]['email_notify']))
{
$emailmsg = $mailcache["-1"]['email_notify'];
}
else
{
$emailmsg = $mailcache["$touser[templatesetid]"]['email_notify'];
}
if (!isset($mailcache["$touser[templatesetid]"]['email_notify']))
{
$emailsubject = $mailcache["-1"]['emailsubject_notify'];
}
else
{
$emailsubject = $mailcache["$touser[templatesetid]"]['emailsubject_notify'];
}


I checked this bit of code, and had a look at my templates. I realized this:

emailsubject_notify - default template
email_notify - custom template

So they were in different templatesetids.

All I did was to edit the "emailsubject_notify" template, saved it so it became a custom template, and the problem went away - members and staff got the subject back again.

Is this a bug? Do those 2 templates have to be in the same templatesetid?

Paul
Thu 3rd Apr '03, 1:20pm
I upgraded from RC3 to Final of 2.3.0 last night. Almost immediately after, I got members and staff telling me that the emails they get for subscribed threads were missing subjects - the body of the message was there (contents of template "email_notify" ) but the whole subject was gone giving a "no subject" message (contents of "emailsubject_notify" missing).

Didn't see this before posting. I'm experiencing the same issue.

Paul
Thu 3rd Apr '03, 1:33pm
Found it. Stared at the damn code for three hours today and they neglected to change the third instance of email_notify to emailsubject_notify.

Here's how the code should look:

// check templatesetid is loaded into cache, else use -1
if (!isset($mailcache["$touser[templatesetid]"]['email_notify']))
{
$emailmsg = $mailcache["-1"]['email_notify'];
}
else
{
$emailmsg = $mailcache["$touser[templatesetid]"]['email_notify'];
}
if (!isset($mailcache["$touser[templatesetid]"]['emailsubject_notify']))
{
$emailsubject = $mailcache["-1"]['emailsubject_notify'];
}
else
{
$emailsubject = $mailcache["$touser[templatesetid]"]['emailsubject_notify'];
}


Edit: FYI, this is from admin/functions.php.

Steve Machol
Thu 3rd Apr '03, 3:52pm
Moved to Bugs for a Dev to confirm.

Scott MacVicar
Thu 3rd Apr '03, 6:42pm
Confirmed unfortunately and now fixed in cvs.

fury
Sat 5th Apr '03, 12:15pm
I knew it. I knew it! :D

Thank god I didn't try upgrading again.

Erwin
Sun 6th Apr '03, 12:51am
Confirmed unfortunately and now fixed in cvs.

Very easy mistake to make unfortunately. Small issue though, not critical.

Reverend
Sun 6th Apr '03, 4:53am
So do we need to apply the fix in Loveshacks post?

Paul
Sun 6th Apr '03, 11:38am
So do we need to apply the fix in Loveshacks post?

If you're experiencing the problem described, you could either use the workaround Erwin described in his original post or apply the changes above to admin/functions.php.

I'd recommend if you're using multiple template sets and styles that you apply the fix above so it doesn't crop up later on.

This only happens under very specific conditions: if the email_notify template is modified yet emailsubject_notify is not modified. If you modify both templates or don't change email_notify you won't notice the issue.

Best wishes,
Paul

nuno
Sun 6th Apr '03, 11:46am
If you're experiencing the problem described, you could either use the workaround Erwin described in his original post or apply the changes above to admin/functions.php.

I'd recommend if you're using multiple template sets and styles that you apply the fix above so it doesn't crop up later on.

This only happens under very specific conditions: if the email_notify template is modified yet emailsubject_notify is not modified. If you modify both templates or don't change email_notify you won't notice the issue.

Best wishes,
Paul
Shouldn't we wait for the Dev Team to fix this? :confused:

Mystics
Sun 6th Apr '03, 11:50am
Shouldn't we wait for the Dev Team to fix this? :confused:The posting of LoveShack contains the developer fix :)

Reverend
Sun 6th Apr '03, 4:13pm
If you're experiencing the problem described, you could either use the workaround Erwin described in his original post or apply the changes above to admin/functions.php.

I'd recommend if you're using multiple template sets and styles that you apply the fix above so it doesn't crop up later on.

OK Thanks.

Black Tiger
Fri 2nd May '03, 10:54pm
Is this really a 2.3.0 problem?
I have 2.3.0 running and opened my /admin/functions.php but the only line containing the word "email_notify" is the following line:
eval("\$emailmsg = \"".gettemplate("email_notify",1,0)."\";");
eval("\$emailsubject = \"".gettemplate("emailsubject_notify",1,0)."\";");

So maybe it is not in /admin/functions.php but in another file?
Or... i just use the windows search function to search all files containing the string: $emailmsg = $mailcache but it was not found in a single file.
Can anybody give me some clearance about this?

Paul
Fri 2nd May '03, 11:10pm
Is this really a 2.3.0 problem?

Yes it is. Search for the text within the php tags in my previous post.

Mystics
Sat 3rd May '03, 5:49am
@Black Tiger

You have never updated from the release candidates to the final version, haven't you? :rolleyes:

Black Tiger
Sat 3rd May '03, 11:29am
@Black Tiger

You have never updated from the release candidates to the final version, haven't you? :rolleyes:
Correct, I updated from 2.2.7 to 2.3.0. Is there any difference then?
When updating, you replace all php files in the board and the /admin directory does one not?

So when thinking that way, there should not be any difference from upgrading from an RC or from a previous version, you just overwrite the functions.php and other files, or do i make a thinking failure now?

@Loveshack, i searched with several things, the easiest word in your php tags is the word "mailcache" and its completely not present in my /admin/functions.php.

So could it be maybe you did not replace the functions.php file with the functions.php file from the 2.3.0 version?
It seems so, because i have a 2.2.6 or 2.2.7 version in an older directory on my harddisk and in the /admin/functions.php of that version, also the word "mailcache" is not to be found.

Mystics
Sat 3rd May '03, 11:32am
Black Tiger, download a fresh copy of 2.3.0 from the Members Area and compare the files with your copy!

I don't think you got the latest version of 2.3.0!

Black Tiger
Sat 3rd May '03, 12:11pm
Thank you Mystics!
That is indeed the answer to my questions. In the newest 2.3.0 release, the tags named by Loveshack are present.

Strangely enough I had no notice that there was a newer 2.3.0 release and even my control panel stated I had the newest version.

@Note to developers:
Maybe it could be made possible that customers get a notice by email or control panel when there are important differences made in files from the same release version? Would be nice!

Thanks again for your tip Mystics!

Mystics
Sat 3rd May '03, 12:32pm
You're welcome :)

While updating from 2.2.7, you maybe haven't noticed that the available version was only RC3, and not the final version (?). Because this function we are talking about is a major difference between 2.3.0 RC3 and 2.3.0 Final...and 2.3.0 Final was (http://www.vbulletin.com/forum/showthread.php?threadid=68653) announced ;)

Black Tiger
Sat 3rd May '03, 12:40pm
Yes it could be i've overseen that, I indeed saw the announcement of the final 2.3.0 version, but since I did not see any change in my control panel i thought I already had that one.

Next time I will pay more attention to this.
Thank you again for you fast reply and good support!

Tungsten
Wed 7th May '03, 4:36pm
Yes it could be i've overseen that, I indeed saw the announcement of the final 2.3.0 version, but since I did not see any change in my control panel i thought I already had that one.

Next time I will pay more attention to this.
Thank you again for you fast reply and good support!

Whew... glad there was a fix for this. A few of my users were already starting to complain about it after I upgraded to 2.3.0 this morning.

Anthrax1
Wed 25th Jun '03, 12:10am
I've had the problem described at:

http://www.vbulletin.com/forum/showthread.php?threadid=75491
http://www.vbulletin.com/forum/showthread.php?threadid=71790
http://www.vbulletin.com/forum/showthread.php?threadid=33103
http://www.vbulletin.com/forum/showthread.php?threadid=64590

Well I'm sure you get the idea ;) The problem was that the server would timeout on replies when email notification is on. Quickly, it was noticed that this seemed to appear on specific servers configuration (qmail, etc)..

Anyway, it seems that some servers are more picky than others, because fixing this subject bug FIXED the reply bug. The mail server was probably dying on the empty subject for some reason

Thrax