Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Dennis Öhman 32 posts 177 karma points c-trib
    Jan 04, 2016 @ 08:52
    Dennis Öhman
    0

    "Disable automated logging" renders exception on links

    If "Disable automated logging" is checked, links in email results in

    The INSERT statement conflicted with the FOREIGN KEY constraint "FK_perplexMailStatistics_perplexMailLog". The conflict occurred in database "printler", table "dbo.perplexMailLog", column 'id'. The statement has been terminated.
    

    Stacktrace:

    PerplexMail.Sql.ExecuteSql(SqlConnection c, String SQL, CommandType type, SqlParameter[] sqlParameters) +125 PerplexMail.HttpStatisticsModule.registerEvent(HttpContext c) +600 PerplexMail.HttpStatisticsModule.processMailStatistics(HttpContext c) +228 PerplexMail.HttpStatisticsModule.context_BeginRequest(Object sender, EventArgs e) +112

  • Wouter van der Beek 20 posts 282 karma points
    Jan 19, 2016 @ 16:57
    Wouter van der Beek
    0

    Hello Dennis,

    It appears this issue was caused by the fact that when rendering the e-mail, the package was only checking if the Statistics module was enabled and not if logging was also enabled. The statistics tracking feature only works when logging is also enabled, since the e-mail events ("statistics") are related directly to the specific e-mail (as shown by the relational SQL error in your post).

    I would like to note (in case you want to upgrade an existing installation) that a few changes have been made in the security-related code of the package as well. Because of these changes, the latest version of the PerplexMail package will not be able to read or write logging entries from the previous versions of the package. If you wish to upgrade the package i strongly recommend simply uninstalling and reinstaling the package, however umbraco will also remove any related PerplexMail nodes (make sure you make a backup of all your e-mails in a notepad or something!).

    If you choose to upgrade your installation with the latest version and you do not want to uninstall, please take the following steps:

    1. Download the latest version of the PerplexMail package here https://our.umbraco.org/projects/backoffice-extensions/perplexmail-for-umbraco/
    2. Remove the old library at /bin/PerplexMail.dll and replace it with the new library in the downloaded zip file (note: in the zip the dll is encoded with the name 57b95bf3-7194-45b7-87fa-0f19abdeb17c.dll)
    3. Add a new web.config AppSettings key called "PerplexMailMasterKey". This is the new key used to encrypt your data. It should contain 16 random characters. The old EncryptionKey and VectorBytes keys are no longer used and may be removed.
    4. If encryption was enabled previously, I recommend dropping both tables perplexMailStatistics and perplexMail as the new version of PerplexMail will not be able to read any of the logs using the "old encryption style" (they will be regenerated the next time an e-mail is sent). If dropping the table is not preferred (because you want to save logged entries), then you can also just modify the perplexMail table and remove the "salt" column (which is no longer used in the new perplexMail package). Keep in mind that if you remove the salt column, you can also no longer rollback to the "old version" of perplexMail as the old version still relied on this column to decrypt log entries.

    If you still have any other questions or still encounter an issue with the disabled logging, please let us know!

Please Sign in or register to post replies

Write your reply to:

Draft