neurodynamic
I’ve been working on upgrading to Phoenix 1.7, and I’m finding that post-upgrade, many (but not all) of the pages on my app are throwing no html template defined errors that I can’t figure out why they’re happening. Some templates are found just fine, and I can’t see a difference between those that work and those that don’t.
I used phx.gen.auth for the user accounts in this app (albeit a while ago, so some things may have changed in the generated code between then and now), but comparing, for example, the user settings page code from phx.gen.auth in a new app, freshly generated, to the code in my own app and I can’t find any differences that would result in the template being missed.
I wish I could provide more context, but I’m at a loss for what’s important. Has anyone has this happen? Here’s some UserSettings code that might be relevant since that’s one of the ones throwing the error:
defmodule MyAppWeb.UserSettingsHtml do
use MyAppWeb, :html
embed_templates "user_settings_html/*"
end
defmodule MyAppWeb.UserSettingsController do
use MyAppWeb, :controller
alias MyApp.Accounts
alias MyApp.Accounts.User
alias MyAppWeb.UserAuth
alias Plug.Conn
alias MyAppWeb.Helpers.CurrentUser
plug(:assign_email_and_password_changesets)
@spec edit(Conn.t(), map) :: Conn.t()
def edit(conn, _params) do
render(conn, :edit,
user: CurrentUser.get(conn),
stripe_publishable_key: Environment.Stripe.publishable_key()
)
end
and the folder structure to show the files are in the right place:
Any ideas?
Trending in Questions
Other Trending Topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #ai
- #elixirconf-us
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming











Showing Posts 1 to 4- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
BradS2S
Capitalize HTML
defmodule MyAppWeb.UserSettingsHTML
neurodynamic
Oh my god I can’t believe that was it.
neurodynamic
Thank you I would never have fucking caught that!
BradS2S
Haha np. It can be a little bit if a leaning curve but ultimately I think the convention is very well done.