Open jardakotesovec opened 2 weeks ago
I'm able to reproduce this issue, but one thing I'd like to clarify is if the user should be able to delete these templates in the UI. In our docs, we say:
Default templates are described in emailTemplates.xml. These templates are installed when the application is installed or a new locale is added.
These templates can not be edited or deleted. [...]
Many of the templates I'm testing with are in emailTemplates.xml
. Should the "Remove" button appear for these?
Ready for review @asmecher:
Would be also interested to know the intention whether there should be different behaviour between templates that are coming from emailTemplates.xml
and the ones that are added by the user.
I noticed there also should be option to reset template (manageEmails.tpl) - for some templates:
<pkp-button
v-if="item.key === currentMailable.emailTemplateKey && item.id"
:is-warnable="true"
@click="confirmResetTemplate(item)"
>
{translate key="common.reset"}
</pkp-button>
My first guess would be that the ones coming from emailTemplates.xml should be possible to edit and reset, but not remove. And the ones from user would be possible to edit and remove.
Maybe @NateWr remembers? :-)
@Vitaliy-1 Or maybe you would know?
(Meanwhile, I did merge the PR above. I agree that it's overspecific for the email template keys we use.)
My first guess would be that the ones coming from emailTemplates.xml should be possible to edit and reset, but not remove.
Yes, those are default templates, it's impossible to modify them directly. They are stored in the email_templates_default_data
table. When user changes template through the UI or adds a new, it's recorded into email_templates
Describe the bug Removing template from mailable returns 500
Affect only main branch
To Reproduce Steps to reproduce the behavior:
What application are you using? OJS, OMP or OPS version main
Additional information