Email template modifications not working

I am working with Owncloud version 10.8.0.4

I have modified the email templates uder:
owncloud/core/templates/

I have modified all of them and the emails that are sent do not change. I have restarted Apache, same thing. What has to be done to get the email changes taken in consideration?

I think there is an app in the marketplace to edit the email templates.

Yes, I found it. But it is asking to setup a template. Lol. Owncloud seems to be a little messy. I just want a simple way to edit the templates via command line. Any ideas? Documentation specifies that the templates can be edited (done already) but the changes are not active, I still receive the old email message when testing. What is that I am missing?

I have the same issue that was reported here:

I hope that someone in the forum can help, the documentation is really bad. This should be a really straightforward thing.

You are wrong. The templateeditor app told “You need to activate own theme to edit mail templates.”

  1. Create a theme, e.g. using GitHub - owncloud/theme-example
  2. Use the template editor app
2 Likes

So I did enable a theme. Same thing. I edit the templates and there is no change registered.

I am starting to think that this is related to “Memory Caching”

Or maybe this is related to translations?

Why do you think about translations?

Let’s say that what I want is to get rid of the “Hey there!” and “Cheers” message. I have modified that in my templates and still receive the same text via email. I found that the “Hey there!” and “Cheers” are also in the translations.

Ah, now I know what you mean. If you write something apart from “Hey there…”, the translation will not be found. I assume, a fallback is used in that case.

Well, issue remains…

What I need:

To remove the following in the templates:
" Hey there,
just letting you know that xxxxxxx (xxxxxxx) shared xxxx with you.
Activate your guest account at xxx by [setting a password]
Then [view it!]
You can login using the email address “xxxxxxx” .
Cheers!"

Replace it for:
" Hello,
We want to inform you that xxxxxxx (xxxxxxx) shared xxxx with you.
Activate your guest account at xxx by [setting a password]
Then [view it!]
You can login using the email address “xxxxxxx” .
Best regards,"

What I have done:

  • I modified the templates (all of them), under owncloud/core/templates/ , restarted apache and aso restarted php-fpm. I still kept receiving the old “Cheers!” message
  • Then I installed the “Mail Template Editor” app which required a theme that I installed also. With the theme installed I got the “Mail Template Editor” app working and I edited the templates with it. Restarted apache and php-fpm. I still keep receiving the old message with the “Hey there” and “Cheers!” message.

Any new ideas?

AFICS you have two options here.

  • Create translations for your texts
  • Omit the translation (Not recommended)

How can I disable translations? Just to test if that works.

Create your template within your custom theme, but remove those $l->t( ) wrappers from your texts. This should work.

Hi

I removed the wrappers and still I got the same old text. What seems odd to me is that initially I made a mistake while removing the wrappers and I got an “error while sending message” text when testing. That means that I am editing the right template.

I think this is more related to cache in the server. I didn’t do the initial setup for the server but it seems that it has redis and APCu active (from config/config.php):

‘memcache.local’ => ‘\OC\Memcache\APCu’,
‘memcache.locking’ => ‘\OC\Memcache\Redis’,

Have you edited both, the HTML- and also the plain text fallback-template?

Yep, did both. Nothing changes in the text.

I’m sorry to say that it works here, as expected.
I just tried with the new user email (HTML), without touching the wrappers, as mentioned above.

image

2 Likes

I see.

I see that it totally has to do with cache…

1 Like

But this would be really weird. In my understanding, after editing a file, any cached copy should be invalidated.

2 Likes