Problems with confirmation message

I am experiencing 2 issues in Appointments+ with the confirmation email that is sent out when an appointment is booked:

1) Is there any way to make 'DATETIME' insert the date in a non-US format (i.e. day before month)?

2) I am having an issue with all of the linebreaks having disappeared from the confirmation email. I know was received correctly at the same gmail address on November 17th. Without having saved any new settings, a confirmation sent today had all linebreaks completely removed.

- The line breaks still show up correctly in Appointments -> Settings -> Notifications
- The cancellation confirmation email still has working line breaks.
- I have tried saving the notification settings anew and also doing so after deleting the current line break characters and pressing enter again. No change.
- This behavior was first observed after applying the bugfix provided in this thread: https://premium.wpmudev.org/forums/topic/appointmentsmarketpress-paid-appointments-appear-as-pending#post-1183046. Due to that bug, the older appointments had to be manually confirmed, before confirmations were sent out.

This is the message displayed in settings. Header is bolded:

PrimePeak booking DATE_TIME
Kære CLIENT,

Din PrimePeak-booking er bekræftet til: DATE_TIME. Sessionen varer 50 minutter.

Adressen er:
Thoravej 4, st. 2,
2400 København NV
(dørtelefonen siger Ejnar Håkonsen)

Af hensyn til den forudgående klients privatliv, vil jeg bede om at du ikke banker på før din tid starter - jeg skal nok sørge for at du får plads til at smide overtøjet og nå godt til rette, uden at det går ud over din tid.

Skulle du få behov for at ændre bestillingen, kan den annulleres ved dette link: CANCEL
Afbestilling mindre end 24 timer før sessionen, koster halvdelen af fuld pris og kan ikke refunderes under tilfredshedsgarantien.

Hvis du har nogen spørgsmål, skriver du bare. Glæder mig til at assistere dig i din udvikling.

- Ejnar Håkonsen
PrimePeak

This is the message received:

PrimePeak booking december 9, 2016 10:00
Kære Ejnar Håkonsen, Din PrimePeak-booking er bekræftet til: december 9, 2016 10:00. Sessionen varer 50 minutter. Adressen er: Thoravej 4, st. 2, 2400 København NV (dørtelefonen siger Ejnar Håkonsen) Af hensyn til den forudgående klients privatliv, vil jeg bede om at du ikke banker på før din tid starter - jeg skal nok sørge for at du får plads til at smide overtøjet og nå godt til rette, uden at det går ud over din tid. Skulle du få behov for at ændre bestillingen, kan den annulleres ved dette link: https://primepeak.dk?app_cancel=1&app_id=37&app_nonce=08b5f0c99f2e9ce2b41e25fbae82d2ee Afbestilling mindre end 24 timer før sessionen, koster halvdelen af fuld pris og kan ikke refunderes under tilfredshedsgarantien. Hvis du har nogen spørgsmål, skriver du bare. Glæder mig til at assistere dig i din udvikling. - Ejnar Håkonsen PrimePeak

This is the cancellation email that works correctly (copied from settings):

Din PrimePeak tid er afbestilt
Kære CLIENT,

Din PrimePeak-tid DATE_TIME er blevet afbestilt. Du kan booke en ny tid på primepeak.dk/booking/.

En afbestilling er typisk foretaget af klienten selv, ved at klikke på afbestillingslinket i den email der bekræfter din reservation. Hvis jeg har været nødsaget til at melde afbud, har du sandsynligvis modtaget anden kontakt hvor jeg beklager og uddyber årsagen. Skulle du have nogen spørgsmål, er du velkommen til at skrive til denne email.

- Ejnar Håkonsen
PrimePeak

Hope you can help me with the second problem in particular. =)

  • EjnarH

    Thanks for the DATETIME solution.

    "Allow HTML emails" is currently disabled. I have tried a booking after activating the add on and another after deactivating it again. Both are still missing line breaks.

    While "Allow HTML emails" was enabled, the cancellation message was missing linebreaks in exactly the same manner as the booking confirmation still is. Now that I have toggled it on and off again, I have also tried making a change in the confirmation message, saving the settings and changing it back, then saving again. This did not change anything.

  • Kasia Swiderska

    Hello EjnarH,

    Turns out it continues to work after I disable the addon. The bug seems to be that my confirmation message is stuck in HTML-mode regardless of what the addon is set up.

    Do you have any cache plugins on your site? Do you use cache build-in appointments plugin?
    Would you mind allowing support access so we can have a closer look at this?
    To enable support access you can follow this guide here:
    http://premium.wpmudev.org/manuals/wpmu-dev-dashboard-enabling-staff-login/

    I checking on my site and I'm not able to replicate issue with emails like you have - so I would like to check your settings.

    kind regards,
    Kasia

  • Nithin

    Hi EjnarH,

    Hope you are doing good today. :slight_smile:

    It seems to be an issue with the message format, I re-typed the message, and now the new line works fines.

    I also tried with HTML add-on activated, and the add-on does work fine, I noticed the <p>, and tags which you previously used were working fine in the confirmation email. If you still encounter any issues with the add-on, please do let us know, we would be glad to give a closer look. Have a nice day. :slight_smile:

    Kind Regards,
    Nithin

  • EjnarH

    (Sorry if there's an edit option I've missed)
    Just want to mention that I'm planning to launch my site in about 24 hours. It'd be appreciated if we can somehow identify the bug beforehand, since it'd be a lot harder to test things out and isolate the issue in a live environment.

    The bug is not critical, as I have the possible workaround of changing all emails to HTML. I'd prefer not to do that though, and if I launch that way, I'm not sure I'd ever get the opportunity to test things and change them back.

  • EjnarH

    I just use Gmail in Chrome. I've just replicated the issue on another Gmail account/PC (also Chrome) and on my own account in a fresh Firefox install (just in case any Chrome extension was somehow distorting the text). It also still occurs when I send it to my corporate email, which acts as a redirect before it hits my Gmail.

    As mentioned in my first and third post, it used to work without incident back in November, until it suddenly seems to have started formatting one of the 3 mails as HTML without the toggle being on.

    Last verified date of working correctly was November 17th. I may have turned 'Allow HTML in emails' on and back off in that period, but I don't believe I made any saves for the notifications page (the email text+settings) until the same email was discovered to be bugging up on December 6th.

  • Nithin

    Hi EjnarH,

    This is really odd, the problem is that it's pretty tough to troubleshoot this issue, if we cannot replicate it on the 1st place. The emails what I get from your system works fine without any issue, as shown in my previous screenshot. Even Kasia wasn't able to replicate in your system. I tested extensively in my test server, and neither I'm able to replicate your issue in my system. This seems to be an issue specific to your system. Which operating system are you using? I tested in Chrome, and Firefox in Linux OS.

    I could see cache plugin enabled, could you please check whether you are able to replicate the issue when cache is disabled/cleared? I don't see object cache enabled, but just want to rule out, whether any such conflicts are caused by the plugin side. Are you able to replicate the same issue with a new user? If possible please test in a different email account, other than Gmail.

    I'm pinging the developer regarding this to check whether he's aware of any such related issue. Please do let us know how that goes, have a nice day. :slight_smile:

    Kind Regards,
    Nithin

  • Rupok

    Hi EjnarH,

    We are so sorry for asking you again and again but we can't regenerate this. I just created two appointments, one from your Dashboard and another from front-end, but both the times, the email came with right formatting. Please check the attached screenshot for reference.

    So I'm not sure how to regenerate the issue you are facing. I think we are missing any step. Can you please provide step by step guide of how you are creating an appointment which results in loosing the format?

    I'm looking forward to hearing from you and resolving this issue as soon as possible.

    Have a nice day. Cheers!
    Rupok

  • EjnarH

    I've been generating the bug by placing an order for an appointment:
    https://primepeak.dk/store/products/appointment/

    I've had to switch the mails to HTML now and turn on live payment after your post yesterday though, so the mails you saw today were already written in HTML. Sorry for not notifying you - had warned that I'd have to make the switch soon, and it hadn't occurred to me that you might be making the appointments somewhere else than the booking frontend, where the switch to live pricing and payment would be visible.

    Running it in HTML does work, although a bit inconvenient. I'm not sure if we have a practical way to continue exploring this bug, now that my site is live and the payment+notifications have to work?

  • Nithin

    Hi EjnarH,

    Hope you are doing good today. :slight_smile:

    I've been generating the bug by placing an order for an appointment:
    https://primepeak.dk/store/products/appointment/

    Thank you for making that clear on how you placed the appointment. Are you able to replicate the same issue, if you make the appointment through the default appointment page, ie /make-an-appointment page, or the issue is only specific to your /appointment page?

    I tried to replicate the same with the appointment product page, but the emails still do work fine in my system. It's pretty tough to troubleshoot this issue further when your website, and payment gateway is live. If possible, you could create a staging website where we can test this extensively with your product page, and see what is being missed in your system.

    You might find the following link helpful in setting up a staging website:
    https://premium.wpmudev.org/blog/testing-environment-wordpress

    Please do let us know how that goes, so that we could help get this issue resolved. Have a nice day. :slight_smile:

    Kind Regards,
    Nithin

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.