Skip to content
This repository has been archived by the owner on Feb 24, 2024. It is now read-only.

could not find a template engine for plush error #1757

Closed
hdm opened this issue Aug 9, 2019 · 7 comments
Closed

could not find a template engine for plush error #1757

hdm opened this issue Aug 9, 2019 · 7 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@hdm
Copy link
Contributor

hdm commented Aug 9, 2019

Description

The change to .plush.html extension breaks use of r.Auto() in resource handlers (they still look for .html).

Steps to Reproduce the Problem

Using a standard resource handler (example below), r.Auto() causes an error, as it looks for index.html not index.plush.html.

func (v UsersResource) List(c buffalo.Context) error {
...
return c.Render(200, r.Auto(c, users))
}

Expected Behavior

r.Auto() would search for index.plush.html

Actual Behavior

500 Error due to missing index.html

Info

-> Go: Checking installation
✓ The `go` executable was found on your system at: C:\Go\bin\go.exe

-> Go: Checking minimum version requirements
✓ Your version of Go, 1.12.7, meets the minimum requirements.

-> Go: Checking GOPATH
✓ You are using Go Modules, so no need to worry about the GOPATH.

-> Go: Checking Package Management
✓ You are using Go Modules (`go`) for package management.

-> Go: Checking PATH
✘ Your PATH (PATH NOT FOUND) does not contain C:\Users\User\go/bin.

Without C:\Users\User\go/bin in your `PATH` any Go executables can not be run globally.

For help setting up your Go environment please follow the instructions for you platform at:

https://www.gopherguides.com/courses/preparing-your-environment-for-go-development

-> Node: Checking installation
✓ The `node` executable was found on your system at: C:\Program Files\nodejs\node.exe

-> Node: Checking minimum version requirements
✓ Your version of Node, v10.15.0, meets the minimum requirements.

-> NPM: Checking installation
✓ The `npm` executable was found on your system at: C:\Program Files\nodejs\npm.cmd

-> NPM: Checking minimum version requirements
✓ Your version of NPM, 6.4.1, meets the minimum requirements.

-> Yarn: Checking installation
✓ The `yarnpkg` executable was found on your system at: C:\Program Files (x86)\Yarn\bin\yarnpkg.cmd

-> Yarn: Checking minimum version requirements
✓ Your version of Yarn, 1.16.0, meets the minimum requirements.

-> PostgreSQL: Checking installation
✘ The `postgres` executable could not be found on your system.
For help setting up your Postgres environment please follow the instructions for you platform at:

https://www.postgresql.org/download/

-> MySQL: Checking installation
✘ The `mysql` executable could not be found on your system.
For help setting up your MySQL environment please follow the instructions for you platform at:

https://www.mysql.com/downloads/

-> SQLite3: Checking installation
✓ The `sqlite3` executable was found on your system at: C:\mingw\x64\bin\sqlite3.exe

-> SQLite3: Checking minimum version requirements
✓ Your version of SQLite3, 3.7.17, meets the minimum requirements.

-> Cockroach: Checking installation
✘ The `cockroach` executable could not be found on your system.
For help setting up your Cockroach environment please follow the instructions for you platform at:

https://www.cockroachlabs.com/docs/stable/

-> Buffalo: Checking installation
✓ The `buffalo` executable was found on your system at: c:\Users\User\go\bin\buffalo.exe

-> Buffalo: Checking minimum version requirements
✓ Your version of Buffalo, v0.14.7, meets the minimum requirements.

-> Buffalo: Application Details
Pwd         C:\Users\User\go\app-console
Root        C:\Users\User\go\app-console
GoPath      C:\Users\User\go
PackagePkg  github.com/myuser/app-console
ActionsPkg  github.com/myuser/app-console/actions
ModelsPkg   github.com/myuser/app-console/models
GriftsPkg   github.com/myuser/app-console/grifts
WithModules true
Name        app-console
Bin         bin\app-console.exe
VCS         git
WithPop     true
WithSQLite  false
WithDep     false
WithWebpack true
WithNodeJs  true
WithYarn    true
WithDocker  false
WithGrifts  true
AsWeb       true
AsAPI       false
InApp       true
PackageJSON {map[build:webpack -p --progress dev:webpack --watch]}

-> Buffalo: config/buffalo-app.toml
name = "app-console"
bin = "bin\\app-console.exe"
vcs = "git"
with_pop = true
with_sqlite = false
with_dep = false
with_webpack = true
with_nodejs = true
with_yarn = true
with_docker = false
with_grifts = true
as_web = true
as_api = false

-> Buffalo: config/buffalo-plugins.toml
[[plugin]]
  binary = "buffalo-pop"
  go_get = "github.com/gobuffalo/buffalo-pop"

-> Buffalo: go.mod
module github.com/myuser/app-console

go 1.12

replace github.com/golang/lint => github.com/golang/lint v0.0.0-20190227174305-8f45f776aaf1

replace github.com/sourcegraph/go-diff v0.5.1 => sourcegraph.com/sourcegraph/go-diff v0.5.1

require (
	cloud.google.com/go v0.36.0 // indirect
	github.com/cockroachdb/cockroach-go v0.0.0-20181001143604-e0a95dfd547c // indirect
	github.com/duo-labs/webauthn v0.0.0-20190730175609-0e3c08fa200e
	github.com/gobuffalo/buffalo v0.14.7
	github.com/gobuffalo/buffalo-pop v1.16.0
	github.com/gobuffalo/envy v1.7.0
	github.com/gobuffalo/logger v1.0.1
	github.com/gobuffalo/mw-csrf v0.0.0-20190129204204-25460a055517
	github.com/gobuffalo/mw-forcessl v0.0.0-20190224202501-6d1ef7ffb276
	github.com/gobuffalo/mw-i18n v0.0.0-20190224203426-337de00e4c33
	github.com/gobuffalo/mw-paramlogger v0.0.0-20190224201358-0d45762ab655
	github.com/gobuffalo/nulls v0.1.0
	github.com/gobuffalo/packr v1.25.0 // indirect
	github.com/gobuffalo/packr/v2 v2.5.2
	github.com/gobuffalo/plush v3.8.3+incompatible
	github.com/gobuffalo/pop v4.11.2+incompatible
	github.com/gobuffalo/suite v2.8.1+incompatible
	github.com/gobuffalo/tags v2.1.0+incompatible
	github.com/gobuffalo/uuid v2.0.5+incompatible
	github.com/gobuffalo/validate v2.0.3+incompatible
	github.com/gobuffalo/x v0.1.0
	github.com/gofrs/uuid v3.2.0+incompatible
	github.com/gorilla/sessions v1.2.0
	github.com/myuser/app v0.8.6
	github.com/markbates/grift v1.1.0
	github.com/markbates/inflect v1.0.4
	github.com/pkg/errors v0.8.1
	github.com/sendgrid/rest v2.4.1+incompatible // indirect
	github.com/sendgrid/sendgrid-go v3.5.0+incompatible
	github.com/sirupsen/logrus v1.4.2
	github.com/stanislas-m/mocksmtp v1.1.0
	github.com/unrolled/secure v1.0.1
	golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4
	golang.org/x/lint v0.0.0-20190409202823-959b441ac422 // indirect
)

@hdm
Copy link
Contributor Author

hdm commented Aug 9, 2019

Looks like render/auto.go wasn't updated to match: https://github.com/gobuffalo/buffalo/blob/master/render/auto.go#L115

@hdm
Copy link
Contributor Author

hdm commented Aug 9, 2019

The render now complains of "could not find a template engine for plush" in https://github.com/gobuffalo/buffalo/blob/master/render/template.go#L169

@markbates
Copy link
Member

This is already fix in development and will be in v0.14.8.

@markbates markbates added this to the v0.14.8 milestone Aug 9, 2019
@markbates markbates self-assigned this Aug 9, 2019
@markbates markbates added the bug Something isn't working label Aug 9, 2019
@hdm
Copy link
Contributor Author

hdm commented Aug 9, 2019

Looks like the render error is still present in v0.14.8-alpha.1, any chance a new tag could be added with that fix?

@markbates
Copy link
Member

We're trying to release 8 today. you can use @development if you're using modules.

@hdm
Copy link
Contributor Author

hdm commented Aug 9, 2019

thank you!

@markbates markbates changed the title Change to plush.html not reflected in use of r.Auto() could not find a template engine for plush error Aug 9, 2019
@hdm
Copy link
Contributor Author

hdm commented Aug 9, 2019

looks like development still reports this error too, will keep an eye out for the release today

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants