Hi all, Just found out that I have a problem - the error was reported by the submitter of a new link - the new link approved email that they received was garbage
When a new link is approved the email log shows the correct email has been sent e.g.
"Your link, Something Precious, has been approved and added to the directory. You can see in the list at ....."
The email received is this:- Subject: Your link submission
<br /> <b>Parse error</b>: syntax error, unexpected $end in <b>/websites/LinuxPackage04/uk/po/tt/ukpotters.co.uk/public_html/wsn/include s/commonfuncs.php(785) : eval()'d code</b> on line <b>8</b><br />
I have just updated to 4.1.55 from 4.1.52 but I can't be sure that it was working before. It was definitely O.K. before I updated to 4.1.52 (from 4.1.44)
Its possible that something has got screwed up. I'm struggling to find the place to start looking - where does this email get sent from?
The link has been added and things seem to be working OK so it is only the sending of the email that is going wrong. Any suggestions.
Did you customize that email? If so, what text did you put in it? Admin -> Emails -> Edit Outgoing Emails -> search for text "has been approved and added". I have
Your link, {LINKTITLE}, has been approved and added to the directory. You can see in the list at {CATURL} . Thanks.
{REASON}
<IF {SWITCH_RATINGS}>If you wish to let your visitors rate your site, you can get the code for the voting form here: {DIRURL}/index.php?action=getvotingcode&id={LINKID}</IF>
Your link, {LINKTITLE}, has been approved and added to the directory. You can see in the list at {DIRURL}/index.php?action=displaycat&catid={LINKCATID} . Thanks.
<IF {SWITCH_HITS)>If you wish to have the visitors you send to this site counted and credited to you, use this URL on your page in linking to this site: {DIRURL}/in.php?id={LINKID}</IF>
<IF 1>If you wish to let your visitors rate your site, you can get the code for the voting form here: {DIRURL}/index.php?action=getvotingcode&id={LINKID}</IF>
{REASON}
(The second IF is also SWITCH_HITS for some reason this editor keeps changing it to 1)
Thanks for you help
I had not modified the language files in any way. The language file in the language directory had the wrong version. The language file in the setup directory had the correct version. I'll just replace the wrong file and hopefully should be OK I'm not sure why the wrong file wasn't replaced during the update.
If I use the (email_notifyuserbody: ) as supplied :-
Your link, {LINKTITLE}, has been approved and added to the directory. You can see in the list at {CATURL} . Thanks.
{REASON}
<IF SWITCH_RATINGS>If you wish to let your visitors rate your site, you can get the code for the voting form here: {DIRURL}/index.php?action=getvotingcode&amp;amp;amp;amp;amp;amp;amp;id={LINKID}</IF>
I have removed the curly brackets from SWITCH_USER so that it will post here - they are there in my language file.
then I get the error.
If I delete the second part - leaving just this:-
Your link, {LINKTITLE}, has been approved and added to the directory. You can see in the list at {CATURL} . Thanks.
{REASON}
then it works.
I am stopping testing now as I have just realised that the few users who have asked to be notified of new links are getting bombarded by emails about my Test Link additions!
For some reason this editor changes "<IF SWITCH_RATINGS>1to "<IF 1>"
Now that you fixed the problem with the submissions I was able to test sending an email with a conditional, but I'm still having problems.
Here's the conditional I'm using -
<IF {LINKEXPIRE} is greater than 1>This item will be deleted on {LINKEXPIREDATE[%m/%d/%Y]}.</IF>
If the link has an expiration date the email works perfectly. The problem is that if there is no expiration date I get the following parse error email -
<br /> <b>Parse error</b>: syntax error, unexpected '>' in <b>/home/content/portal/includes/commonfuncs.php(810) : eval()'d code</b> on line <b>5</b><br />
I haven't been able to reproduce this in 4.1.57. I've registered you a testing account for http://sandbox.wsnforum.com/emailtest if you want to see if you can reproduce it.
Thank you Paul. I've just edited the assign email with the <IF> statement above and have added a link without an expiration and assigned it to you. Let me know what you receive. Thanks.
I actually also tried this again on my site as well and am still getting an email with the parse error. I then went to view the email logs I received the following at the very top of the page:
If you are not the administrator of this site, please report this page to the administrator. If you are the administrator, please pay careful attention: You have a parse error in your template ../templates/admin/viewemail.tpl (or perhaps in your header or footer) which you need to repair before this page can be displayed correctly. The error is picked up on by php at line 171 of the output.Line #166: <td>Your Client Portal has been updated to include the following item: Line #167: Line #168: Link w/o expiration date 4 Line #169: Line #170: <?php if ( > 1) { ?>This item will be deleted on .<?php } ?> Line #171:
[Load this template in your template editor]
Note that the line of the output is not necessarily the same line number in your template... just look for a similar looking area. The source of your error is probably not on line 171 itself, but most likely a line or two before it. Check your code carefully for syntax mistakes. If you cannot recognize one, copy and paste this output into a thread on the support forum. Now outputing the page without any conditional or php sections evaluated:
So I logged back into the sandbox and when I view the logs there I get the same error so I'm guessing you must have gotten the parse error email as well.
I see, you were editing a different email than I was -- I'd been editing the link approval email, because of the title of this thread. It's not an email problem per se, it's a problem with the value of $thislink->expire at that point in the script. Fixed.
Just updated to 4.1.58 tonight and ran another test. Unfortunately, I'm getting the same results. Links with an expiration date send a correct email, but links w/o an expiration date still send out emails with parse errors.
Also now when I try to view the email log I only get - Illegal template name: ../templates/admin/viewemail.tpl
I was going to try it on the sandbox you setup but it was still at 4.1.57.
Comments on Parse error in link approval email
Beginner
Usergroup: Customer
Joined: Jul 26, 2003
Total Topics: 2
Total Comments: 6
Hi all,
Just found out that I have a problem - the error was reported by the submitter of a new link - the new link approved email that they received was garbage
When a new link is approved the email log shows the correct email has been sent e.g.
"Your link, Something Precious, has been approved and added to the directory. You can see in the list at ....."
The email received is this:-
Subject: Your link submission
<br />
<b>Parse error</b>: syntax error, unexpected $end in
<b>/websites/LinuxPackage04/uk/po/tt/ukpotters.co.uk/public_html/wsn/include
s/commonfuncs.php(785) : eval()'d code</b> on line <b>8</b><br />
I have just updated to 4.1.55 from 4.1.52 but I can't be sure that it was working before.
It was definitely O.K. before I updated to 4.1.52 (from 4.1.44)
Its possible that something has got screwed up.
I'm struggling to find the place to start looking - where does this email get sent from?
The link has been added and things seem to be working OK so it is only the sending of the email that is going wrong.
Any suggestions.
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
Did you customize that email? If so, what text did you put in it? Admin -> Emails -> Edit Outgoing Emails -> search for text "has been approved and added". I have
Beginner
Usergroup: Customer
Joined: Jul 26, 2003
Total Topics: 2
Total Comments: 6
I have (email_notifyuserbody: )
(The second IF is also SWITCH_HITS for some reason this editor keeps changing it to 1)
Thanks for you help
I had not modified the language files in any way.
The language file in the language directory had the wrong version.
The language file in the setup directory had the correct version.
I'll just replace the wrong file and hopefully should be OK
I'm not sure why the wrong file wasn't replaced during the update.
Beginner
Usergroup: Customer
Joined: Jul 26, 2003
Total Topics: 2
Total Comments: 6
Still not working!
I have now got the language files sorted out and as I still had the problem did a reupload of all files except templates ans CSS.
I still get the same parse error in the email - The email log shows the correct email but the received email is as in first post.
If I reject the link instead of accepting the email received is the correct one.
I'll keep thinking and trying!!
Beginner
Usergroup: Customer
Joined: Jul 26, 2003
Total Topics: 2
Total Comments: 6
Current State of play
If I use the (email_notifyuserbody: ) as supplied :-
I have removed the curly brackets from SWITCH_USER so that it will post here - they are there in my language file.
then I get the error.
If I delete the second part - leaving just this:-
then it works.
I am stopping testing now as I have just realised that the few users who have asked to be notified of new links are getting bombarded by emails about my Test Link additions!
For some reason this editor changes "<IF SWITCH_RATINGS>1to "<IF 1>"
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
Testing now.
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
Reproduced. Should be fixed by the end of the night.
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
Fixed for the upcoming release (should be released in a few hours).
Forum Regular
Usergroup: Customer
Joined: Apr 03, 2007
Location: NY & PA
Total Topics: 94
Total Comments: 339
Now that you fixed the problem with the submissions I was able to test sending an email with a conditional, but I'm still having problems.
Here's the conditional I'm using -
<IF {LINKEXPIRE} is greater than 1>This item will be deleted on {LINKEXPIREDATE[%m/%d/%Y]}.</IF>
If the link has an expiration date the email works perfectly. The problem is that if there is no expiration date I get the following parse error email -
<br />
<b>Parse error</b>: syntax error, unexpected '>' in <b>/home/content/portal/includes/commonfuncs.php(810) : eval()'d code</b> on line <b>5</b><br />
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
I haven't been able to reproduce this in 4.1.57. I've registered you a testing account for http://sandbox.wsnforum.com/emailtest if you want to see if you can reproduce it.
Forum Regular
Usergroup: Customer
Joined: Apr 03, 2007
Location: NY & PA
Total Topics: 94
Total Comments: 339
Thank you Paul. I've just edited the assign email with the <IF> statement above and have added a link without an expiration and assigned it to you. Let me know what you receive. Thanks.
Forum Regular
Usergroup: Customer
Joined: Apr 03, 2007
Location: NY & PA
Total Topics: 94
Total Comments: 339
Paul,
I actually also tried this again on my site as well and am still getting an email with the parse error. I then went to view the email logs I received the following at the very top of the page:
So I logged back into the sandbox and when I view the logs there I get the same error so I'm guessing you must have gotten the parse error email as well.
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
I see, you were editing a different email than I was -- I'd been editing the link approval email, because of the title of this thread. It's not an email problem per se, it's a problem with the value of $thislink->expire at that point in the script. Fixed.
Forum Regular
Usergroup: Customer
Joined: Apr 03, 2007
Location: NY & PA
Total Topics: 94
Total Comments: 339
Just updated to 4.1.58 tonight and ran another test. Unfortunately, I'm getting the same results. Links with an expiration date send a correct email, but links w/o an expiration date still send out emails with parse errors.
Also now when I try to view the email log I only get - Illegal template name: ../templates/admin/viewemail.tpl
I was going to try it on the sandbox you setup but it was still at 4.1.57.
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
links w/o an expiration date still send out emails with parse errors.
Updated the sandbox and tested, still looks fine to me.
Also now when I try to view the email log I only get - Illegal template name: ../templates/admin/viewemail.tpl
Somehow that never happens on localhost, but I see it on the sandbox.