Page 1 of 1

[SOLVED] Errors in templates for emails

Posted: 09 Jan 2024, 07:44
by Didou12
Hi

When I want to create an email, I have this in the body part :

Code: Select all

Database Error: 1146 - Table 'XXX.app_ext_mail_templates' doesn't exist
Query: select mf.*, ma.name as account_name from app_ext_mail_templates mf left join app_ext_mail_accounts ma on mf.accounts_id=ma.id where mf.accounts_id in (select accounts_id from app_ext_mail_accounts_users where users_id='2') order by mf.id
Page: /index.php?module=ext/mail/create
#0 includes/functions/database.php(99): mysqli_query()
#1 plugins/ext/classes/mail/mail_templates.php(21): db_query()
#2 plugins/ext/modules/mail/views/create.php(78): mail_templates::render_dropdown_helper()
#3 index.php(38): require('/XXX/...')
#4 {main}

And, in the templates page, this, just above the table (and I don't have any template yet) :

Code: Select all

Database Error: 1146 - Table 'XXX.app_ext_mail_templates' doesn't exist
Query: select mf.*, ma.name as account_name from app_ext_mail_templates mf left join app_ext_mail_accounts ma on mf.accounts_id=ma.id where mf.accounts_id in (select accounts_id from app_ext_mail_accounts_users where users_id='2') order by mf.id
Page: /index.php?module=ext/mail/templates
#0 includes/functions/database.php(99): mysqli_query()
#1 plugins/ext/modules/mail/views/templates.php(41): db_query()
#2 template/layout.php(171): require('/XXX/...')
#3 index.php(49): require('/XXX/...')
#4 {main}

In the both case "/XXX/..." is for the main directory on my server (one level up from rukovoditel)

Re: Errors in templates for emails

Posted: 12 Jan 2024, 21:41
by support
Open phpmyadmin and execute this sql query

Code: Select all

CREATE TABLE IF NOT EXISTS `app_ext_mail_templates` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `accounts_id` int(11) NOT NULL,
  `subject` varchar(255) NOT NULL,
  `body` text NOT NULL,
  PRIMARY KEY (`id`),
  KEY `idx_accounts_id` (`accounts_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
Looks like during update this query was not created.

Re: Errors in templates for emails

Posted: 12 Jan 2024, 21:56
by Didou12
Thank you :)