XCP-ng
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Backup status email template

    Scheduled Pinned Locked Moved Backup
    8 Posts 2 Posters 57 Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • W Offline
      wf
      last edited by

      Hi,

      Is there a way to amend the backup status email template so it does not include the nice images?

      I import the backup status emails into our control panel and all import ok unless they are have the failure status siren which fails to import with an error message.

      9ea48175-7449-40f7-b78e-0ce90c11acd6-image.png

      Error - OperationalError: (1366, "Incorrect string value: '\xF0\x9F\x9A\xA8' for column 'subject' at row 1")

      Thanks

      1 Reply Last reply Reply Quote 0
      • olivierlambertO Offline
        olivierlambert Vates 🪐 Co-Founder CEO
        last edited by

        Hi,

        It's not an image but an emoji. Can you be more specific on the exact operation you did? Importing to what? (so we understand better the context)

        W 1 Reply Last reply Reply Quote 0
        • W Offline
          wf @olivierlambert
          last edited by

          @olivierlambert

          I am importing the emails into a control panel build using MySQL and Python/Django.

          Upon importing the emails I get the error unless it is the sucess tick emoji.

          query _mysql.connection.query(self, query)
          django.db.utils.OperationalError: (1366, "Incorrect string value: '\xF0\x9F\x9A\xA8' for column 'subject' at row 1")

          The error seems to only happens with the failure siren.

          1 Reply Last reply Reply Quote 0
          • olivierlambertO Offline
            olivierlambert Vates 🪐 Co-Founder CEO
            last edited by

            Hmm I wonder, is your DB in UTF8 format?

            W 1 Reply Last reply Reply Quote 0
            • W Offline
              wf @olivierlambert
              last edited by

              @olivierlambert

              Yes it is.

              Server charset: UTF-8 Unicode (utf8mb4)

              1 Reply Last reply Reply Quote 0
              • olivierlambertO Offline
                olivierlambert Vates 🪐 Co-Founder CEO
                last edited by olivierlambert

                That's the right format, what about your Django app settings?

                DATABASES = {
                    'default': {
                        'ENGINE':'django.db.backends.mysql',
                        ...
                        'OPTIONS': {'charset': 'utf8mb4'},
                    }
                }
                

                edit: more details at https://dba.stackexchange.com/questions/161460/error-1366-incorrect-string-value-xf0-x9f-x98-x8a-x0ac-for-column-text-bo or https://stackoverflow.com/questions/63141740/django-db-utils-operationalerror-1366-incorrect-string-value-django-mysql for example

                W 1 Reply Last reply Reply Quote 0
                • W Offline
                  wf @olivierlambert
                  last edited by

                  @olivierlambert
                  Well spotted, I missed tht one.

                  All apprears to be importing, although I will find out properly if another backup one fails and the auto import rule runs through OK.

                  Thanks again.

                  1 Reply Last reply Reply Quote 0
                  • olivierlambertO Offline
                    olivierlambert Vates 🪐 Co-Founder CEO
                    last edited by

                    Great!

                    1 Reply Last reply Reply Quote 0
                    • First post
                      Last post