Error in backend mail-templates

When I go to /system/mailtemplates, I get this error:

View [Form autoreply message (English)] not found.

This only happens on our PROD page, for which we use the Deploy plugin.

We have a plugin with mailtemplates in it, but I don’t know if this is the source of the error.

How can I fix this?

OC is v3.7.5

I am not 100% sure if my assumptions are correct, but I’ll give it a shot.

If you open system/mailtemplates the system will try to sync the mail templates referenced in the DB with the mail templates from the respective plugins (or your “app” etc.). I think this means that you have a refence to a mail template in your database, for which the actual view file is missing. Guessing from the name of the missing template, you might have used one of the Form plugins locally, but did not install that in your PROD setup.

Or maybe the other way around :smiley:

Hey, check to make sure that your registerMailTemplates method looks like this

public function registerMailTemplates()
{
    return [
        'backend::mail.invite',
        'backend::mail.restore',
        'backend::mail.contact-form',
    ];
}

And not like this

public function registerMailTemplates()
{
    return [
        'backend::mail.invite' => 'Form autoreply message (English)',
        'backend::mail.restore' => 'Form autoreply message (English)',
        'backend::mail.contact-form' => 'Form autoreply message (English)',
    ];
}
1 Like

Ou! Keep your plugins up to date.

I needed to update the contact form plugin ( Small Contact Form plugin - October CMS). Now everything works fine again.

Thanks anyway for your answers!

2 Likes