getgrav / grav-plugin-email

Grav Email Plugin
http://getgrav.org
MIT License
37 stars 29 forks source link

Reset plugin without reinstall? #97

Closed kees-closed closed 5 years ago

kees-closed commented 5 years ago

The contents of the file user/plugins/email/email.yml are different than the settings displayed in the web dashboard. I tried clearing the case, changing settings in both the file and dashboard, hoping it would trigger a resync. But it didn't. Is there a way to reset a plugin to its default state without reinstalling it? The email plugin depends on may other plugins, which would be reinstalled then as well, which would come down to re-configuring a part of Grav (not looking forward to that).

rhukster commented 5 years ago

Do you have an environment folder such as user/localhost/config? This would override the user/config Is so just delete the email plug-in config in there: /user/localhost/config/plugins/email.yaml

kees-closed commented 5 years ago

I never heard of such an environment folder, I also checked if it was created by some other process, but non found with find . -iname "*localhost*" -type d inside the Grav root folder.

If nothing exists to reset a plugin then I'll just have to reinstall Grav and see if that works. Because at the moment the email plugin is unstable. When I save the settings inside the email plugin web interface, then it works for ~1 hour. After that something cancels out the working configuration and the email functionality fails.

kees-closed commented 5 years ago

I just reinstalled everything, only the pages were copied back into user/pages. The problem persists, so I guess it's a problem with my own code.

What I would like to know, how can I troubleshoot this better? This is what I've tried.

rhukster commented 5 years ago

What is your email plugin config?

kees-closed commented 5 years ago
enabled: true
from: info@example.com
from_name: 'Admin'
to: info@example.com
to_name: 'Admin'
mailer:
  engine: sendmail
  smtp:
    server: example.home.lan
    port: 25
    encryption: none
  sendmail:
    bin: '/usr/sbin/sendmail -bs'
content_type: text/html
debug: true
kees-closed commented 5 years ago

It's probably cache related, disabled cache for an hour now and it still works fine. If this is the case then I still can't pinpoint the cause, but at least I've found a working solution for the time being. It could be something that was introduced with the latest upgrade of Grav (1.5.3).

rhukster commented 5 years ago

Sounds like its now sorted.