Jump to content

fixing the email preview Syntax Error


durangod

Recommended Posts

Hi,

 

When i go to preview an email i get this message..

 

Syntax Error - Please check your email message for invalid template syntax or missing closing tags

 

i did find on another blog that the solution to this is to change the language field in the tblemailtemplates table from null to none, (uncheck the null box)

 

1. is this correct?

2. can you please explain what is happening all of a sudden, i never had these kinds of issues before on a shared server, and now it seems every time i turn around, this field needs to be changed, and that field needs to be changed. I ask my host if he ever had to deal with this and he said no never. What, may i ask is happening, did WHMCS change a bunch of field values in the last update that were not quite correct or what?

 

Look, everyone makes mistakes, if someone at WHMCS got some field config wrong then let us know and give us a fix for it and im ok with that, no problem. Noone is perfect and it happens. But it seems im having to piece meal this as things break and that i cannot have and i wont stand for it folks. I you goofed then tell us and lets work together to get a fix in place and everyone is happy and im ok with that. But please dont let us suffer and have to find out weeks down the road that something did not or does not work because someone wanted to save face.

 

Im not upset im just saying it takes a huge amount of my time to track each one of these things down to find a solution. So if something happened, be upfront and let us all fix it together as a team. Im just getting tired of having plans for the day and then they get messed up by having to troubleshoot something that i never had problems with before.

 

I hope that is a fair request to everyone on both sides :)

 

thanks

Edited by durangod
Link to comment
Share on other sites

UPDATE: first let me say that the fix does in fact appear to work. I was getting the error, change the value and now i can preview the email. But i would like confirmation from WHMCS on this.

 

Also i have attached a copy of the table. For security purposes (no reason to give the public the table names and layout) i have cut this up in order to show you what i have and if this is correct. You should be able to match the names up from what i left showing to compare.

 

Please advise is this is fine or if i need to change some values.

 

Thanks..

 

table.jpg

Link to comment
Share on other sites

Dave,

 

if it helps, i've got "No" and "None" for all rows in those two columns - I don't think that i've ever modified those database entries manually and everything seems to be functioning correctly.

 

that said, i'd probably suggest waiting for a response from a whmcs support guy before tweaking the entries further.

Link to comment
Share on other sites

  • WHMCS Support Manager

Hi,

Having "NULL" values in the table could cause this problem, so changing to to "None" (ie. unticking the checkbox) will resolve the issue and is fine to do.

 

I don't believe we've set this value to "NULL" intentionally in the installation script.

Link to comment
Share on other sites

Hi John, thanks i will change the rest of the values in the table then. John can i make a special request from you. Since i have no idea how these got changed or maybe how many others might have as well. Can i ask for a source where we can get just the table structure import values to download. I could make a special import structure file myself from a full version download but if you all might have the structure readily available where i can down load it and then import that, it would save me so much time. Thanks :)

Link to comment
Share on other sites

have you taken a look at the install.sql file inside the "install" folder of the latest release? that should outline the table creation structure...

 

though i'd be tempted to make a fresh temporary install somewhere and then compare the two databases to see any differences - there will be some though, e.g. there won't be an opensrs table in a clean install.

Link to comment
Share on other sites

yeah true... yes that was my plan if John did not have one. I figure if i ask them for it i will just feel better getting something from today ya know.... but yeah if he dont have one to give me the plan is to export a structure and compare it. Theres not that many tables that i cant sit and run down it in prob less than an hour.

 

even faster with winmerge

Link to comment
Share on other sites

If you're looking for the email templates schema, as of the v5.3.9 full release, the following files alter the tblemailtemplates schema:

 

  • install/sql/emailtemplates.sql
  • install/sql/install.sql
  • install/sql/upgrade330.sql
  • install/sql/upgrade362.sql
  • install/sql/upgrade450.sql

 

Below, is a dump of my current tblemailtemplates table:

-- 
-- Table structure for table `tblemailtemplates`
-- 

CREATE TABLE IF NOT EXISTS `tblemailtemplates` (
   `id` int(10) NOT NULL AUTO_INCREMENT,
   `type` text NOT NULL,
   `name` text NOT NULL,
   `subject` text NOT NULL,
   `message` text NOT NULL,
   `attachments` text NOT NULL,
   `fromname` text NOT NULL,
   `fromemail` text NOT NULL,
   `disabled` text NOT NULL,
   `custom` text NOT NULL,
   `language` text NOT NULL,
   `copyto` text NOT NULL,
   `plaintext` int(1) NOT NULL,
   PRIMARY KEY (`id`),
   KEY `type` (`type`(32)),
   KEY `name` (`name`(64))
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

Link to comment
Share on other sites

Thanks John, do you have the whole sql for the entire script, all the tables. I got my dev license yesterday and installed it thinking that i could just export the whole table structure for ALL the tables from there. But it seems that either dev license restricts some tables from being installed or it was just a flook, because about 10 tables were on the install report that they did not install. I still need to figure that one out...

 

Its ok, i was trying to be clear that i needed every table that comes with the script so i can run down and compare to all my current tables. But its ok, ill just make one from the download install sql file...

 

Thanks :)

Link to comment
Share on other sites

by the way john just fyi, i just tried to download that table and it wont let me, keeps saying im not logged in but i have. I tried 5x and same thing "not logged in" lmao... seems you guys added a 3 new rows to the emailtemplate table and the first file in the install wont install cause the table does not match the values. NP i can do it but would be nice to dl that zip you provided lol.

 

 

UPDATE: nevermind, i guess making a post woke the forum up to the fact that i was in fact logged in. After i did this post i tried it and it let me dl it :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated