Rock icon indicating copy to clipboard operation
Rock copied to clipboard

Registration confirmations missing images

Open mkinyon opened this issue 5 years ago • 1 comments

Submitted on behalf of https://www.stlukesumc.com

Description

When setting up a registration instance, any images added to the "Additional Confirmation Details" section do not appear in email. For example, here is a image that was added: <a href="https://user-images.githubusercontent.com/2349102/55263712-32290380-522f-11e9-8aca-0146e5c2f398.png">https://user-images.githubusercontent.com/2349102/55263712-32290380-522f-11e9-8aca-0146e5c2f398.png</a> image

Here is the email that was received. <a href="https://user-images.githubusercontent.com/2349102/55263758-597fd080-522f-11e9-8afa-242663956526.png">https://user-images.githubusercontent.com/2349102/55263758-597fd080-522f-11e9-8afa-242663956526.png</a> image

It seems the root problem is that any images that are added through the content editor use relative links which makes sense in the context of Rock/External Site but will not work in an email.

Steps to Reproduce

  1. Setup a registration instance and add a photo in the "Additional Confirmation Details" section.
  2. Register yourself to the registration.
  3. See the missing photo in the confirmation.

Expected behavior: See the image.

Actual behavior: Do not see the image.

Versions

  • Rock Version: 8.7
  • Client Culture Setting: en-US

mkinyon avatar Mar 29 '19 21:03 mkinyon

I have been able to recreate this on a production v9.2 server. As @mkinyon mentioned, the root issue appears to be the content editor (HtmlEditor) attempts to use relative links for images in this context when it should fully define the image link. A possible fix would be defining around this line of code (maybe setting the ImageFolderRoot property) to https://github.com/SparkDevNetwork/Rock/blob/e60deb2526fab0f50960ab2189750dc4dd230511/Rock/Web/UI/Controls/Event/RegistrationInstanceEditor.cs#L830

an absolute path for images.

EthanW96 avatar Oct 24 '19 17:10 EthanW96