Jump to content

Mass Email Template Missing error


farrider

Recommended Posts

Thought I would share this fix with you, in the install process the table `tblemailtemplates` is missing a column in version 5.2.7 if you are installing a fresh copy, this might affect you.

 

The install sql command for the table is

 

CREATE TABLE IF NOT EXISTS `tblemailtemplates` (

`id` int(1) unsigned zerofill NOT NULL auto_increment,

`type` text COLLATE utf8_general_ci NOT NULL,

`name` text COLLATE utf8_general_ci NOT NULL,

`subject` text COLLATE utf8_general_ci NOT NULL,

`message` text COLLATE utf8_general_ci NOT NULL,

`fromname` text COLLATE utf8_general_ci NOT NULL,

`fromemail` text COLLATE utf8_general_ci NOT NULL,

`disabled` text COLLATE utf8_general_ci NOT NULL,

`custom` text COLLATE utf8_general_ci NOT NULL,

`language` text COLLATE utf8_general_ci NOT NULL,

PRIMARY KEY (`id`)

) DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

 

 

However if you try and send mail via the client summery page you will get an error that the Mass Email Template is missing.

 

The log shows an sql error...

 

SQL Error: Unknown column 'copyto' in 'field list' - Full Query: INSERT INTO tblemailtemplates (`type`,`name`,`subject`,`message`,`fromname`,`fromemail`,`copyto`)

 

 

`tblemailtemplates` is missing the column 'copyto' in the table created by the installer.

 

You can fix it by dropping the table and recreating it with

 

 

CREATE TABLE IF NOT EXISTS `tblemailtemplates` (

`id` int(1) unsigned zerofill NOT NULL auto_increment,

`type` text COLLATE utf8_general_ci NOT NULL,

`name` text COLLATE utf8_general_ci NOT NULL,

`subject` text COLLATE utf8_general_ci NOT NULL,

`message` text COLLATE utf8_general_ci NOT NULL,

`fromname` text COLLATE utf8_general_ci NOT NULL,

`fromemail` text COLLATE utf8_general_ci NOT NULL,

`copyto` text COLLATE utf8_general_ci NOT NULL,

`disabled` text COLLATE utf8_general_ci NOT NULL,

`custom` text COLLATE utf8_general_ci NOT NULL,

`language` text COLLATE utf8_general_ci NOT NULL,

PRIMARY KEY (`id`)

) DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

 

 

 

I imagine 'copyto' could have been in a previous version so it probably is not effecting everyone.

 

Just an FYI if this is happening to you.

 

Thanks to tech support for showing me how to capture the SQL error.

Edited by farrider
Link to comment
Share on other sites

  • WHMCS Support Manager

Hi,

This field should be created when upgrading to 5.2.0, it's in the /install/upgrade520.sql file:

 

INSERT INTO `tblemailtemplates` (`id`, `type`, `name`, `subject`, `message`, `fromname`, `fromemail`, `disabled`, `custom`, `language`, `copyto`, `plaintext`) VALUES (NULL, 'general', 'Password Reset Confirmation', 'Your password has been reset for {$company_name}', '<p>Dear {$client_name},</p><p>As you requested, your password for our client area has now been reset. </p><p>If it was not at your request, then please contact support immediately.</p><p>{$signature}</p>', '', '', '', '', '', '', '0');

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