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?