Child pages
  • [install] Upgrade from 5.1.x to 5.2.x erases e-mail template bodies
Skip to end of metadata
Go to start of metadata

When upgrading from 5.1.x to 5.2.x I'm seeing quite a few error messages like this:

Warning (#23): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 (1064)
SQL:
    UPDATE `51x_EmailEvents`
    SET `l1_HtmlBody` = 'Welcome to In-portal!<br/><br/>\r\n\r\nYour user registration has been approved. You can login now <a href=\"<inp2:m_BaseUrl/>\"><inp2:m_BaseUrl/></a> using the following information:<br/><br/>\r\n\r\n==================<br/>\r\nUsername: \"<inp2:u_Field name=\"Username\"/>\"<br/>\r\nPassword: \"<inp2:u_Field name=\"Password_plain\"/>\"<br/>\r\n==================<br/><br/>\r\n',`l2_HtmlBody` = NULL,`l3_HtmlBody` = NULL,`l4_HtmlBody` = NULL,`l5_HtmlBody` = NULL
    WHERE TemplateId =  in ...\core\kernel\utility\logger.php on line 886

This happens because at moment of upgrade script execution the column is still named EventId, but in unit config from which ID field name is taken it already has new value. As a result no content of e-mail templates from Body into PlainTextBody/HtmlBody columns is migrated.

Solution

Look at table structure in database to determine actual primary key in the table.

Related Tasks

INP-1497 - Getting issue details... STATUS