Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

buffalo generate resource creates two types of templates only uses one. #1771

Open
tw-maustin opened this issue Aug 21, 2019 · 0 comments

Comments

@tw-maustin
Copy link

commented Aug 21, 2019

Description

When generating a new resource, template files with both extensions '.html' and '.plush.html' are generated, but only the '.html' files are actually being used.

Steps to Reproduce the Problem

1.buffalo new project
2.cd project
3.buffalo generate resource foo
4.ls templates/foos
(observe results)
_form.html _form.plush.html edit.html edit.plush.html index.html index.plush.html new.html new.plush.html show.html show.plush.html
5. buffalo dev
6. rm templates/foos/edit.html (or any .html file).
7. observe 500 error when attempting to navigate to that resource template foos/edit.html: could not find template foos/edit.html

Expected Behavior

I suspect the intended behavior was to generate only the .plush.html and to use them.

Actual Behavior

Two sets of resources templates are generated but only the .html version is used.

Info

I have tested on both Mac OS X and Windows 10 and observed the same behavior.

-> Go: Checking installation
✓ The `go` executable was found on your system at: /usr/local/go/bin/go

-> Go: Checking minimum version requirements
✓ Your version of Go, 1.12.6, 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 contains /home/maustin/projects/go/bin.

-> Node: Checking installation
✓ The `node` executable was found on your system at: /usr/local/bin/node

-> Node: Checking minimum version requirements
✓ Your version of Node, v11.12.0, meets the minimum requirements.

-> NPM: Checking installation
✓ The `npm` executable was found on your system at: /usr/local/bin/npm

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

-> Yarn: Checking installation
✓ The `yarnpkg` executable was found on your system at: /usr/local/bin/yarnpkg

-> 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 could not be found on your system.
For help setting up your SQLite3 environment please follow the instructions for you platform at:

https://www.sqlite.org/download.html

-> 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: /home/maustin/projects/go/bin/buffalo

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

-> Buffalo: Application Details
Pwd         /c/devel/project
Root        /c/devel/project
GoPath      /home/maustin/projects/go
PackagePkg  project
ActionsPkg  project/actions
ModelsPkg   project/models
GriftsPkg   project/grifts
WithModules true
Name        project
Bin         bin/project
VCS         git
WithPop     true
WithSQLite  false
WithDep     false
WithWebpack true
WithNodeJs  true
WithYarn    true
WithDocker  true
WithGrifts  true
AsWeb       true
AsAPI       false
InApp       true
PackageJSON {map[]}

-> Buffalo: config/buffalo-app.toml
name = "project"
bin = "bin/project"
vcs = "git"
with_pop = true
with_sqlite = false
with_dep = false
with_webpack = true
with_nodejs = true
with_yarn = true
with_docker = true
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 project

go 1.12

require (
	github.com/cockroachdb/apd v1.1.0 // indirect
	github.com/cockroachdb/cockroach-go v0.0.0-20181001143604-e0a95dfd547c // indirect
	github.com/gobuffalo/buffalo v0.14.9
	github.com/gobuffalo/envy v1.7.0
	github.com/gobuffalo/mw-csrf v0.0.0-20190129204204-25460a055517 // indirect
	github.com/gobuffalo/mw-forcessl v0.0.0-20190224202501-6d1ef7ffb276
	github.com/gobuffalo/mw-paramlogger v0.0.0-20190224201358-0d45762ab655
	github.com/gobuffalo/packr v1.30.1
	github.com/gobuffalo/packr/v2 v2.5.2
	github.com/gobuffalo/pop v4.11.3+incompatible
	github.com/gobuffalo/suite v2.8.1+incompatible
	github.com/jackc/fake v0.0.0-20150926172116-812a484cc733 // indirect
	github.com/jackc/pgx v3.5.0+incompatible // indirect
	github.com/markbates/grift v1.1.0
	github.com/satori/go.uuid v1.2.0 // indirect
	github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24 // indirect
	github.com/stretchr/testify v1.4.0 // indirect
	github.com/unrolled/secure v1.0.1
)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.