verbb / knock-knock

Password protect your entire Craft website front-end with a single password
MIT License
18 stars 7 forks source link

Unable to find the template #45

Closed iamkeir closed 3 years ago

iamkeir commented 3 years ago

Description

Recently (perhaps after one of the recent Knock Knock updates), our lock page is showing an internal server error. In dev mode, the error is:

Twig Template Loading Error – craft\web\twig\TemplateLoaderException Unable to find the template “maintenance”.

However, this template is present in craft/templates/maintenance.twig (it also used to work fine).

Any ideas what could be the cause of this?

We tried using maintenance.twig instead of just maintenance in the custom template field but this errors too. File permissions are also the same as other templates.

Additional info

alexsexton commented 3 years ago

This is happening on a site I manage too. A temporary fix is to remove the custom template path which lets the plugin load the default template - not ideal but for now it's ok.

Knock Knock 1.2.15 Craft 3.6.17

engram-design commented 3 years ago

Hmm, the only real change recently was https://github.com/verbb/knock-knock/commit/0c1d7d046b8437403ab7b2e91b498ab2816f5fd9 so I'll test this out further.

engram-design commented 3 years ago

Should be fixed for the next release. To get the fix early, change your verbb/knock-knock requirement in composer.json to:

"require": {
  "verbb/knock-knock": "dev-craft-3 as 1.2.15",
  "...": "..."
}

Then run composer update.

iamkeir commented 3 years ago

@engram-design thanks, that was quick!!