neurodynamic

neurodynamic

Random `no "*" html template defined for MyAppWeb.*HTML` errors after upgrading to Phoenix 1.7

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?

Marked As Solved

BradS2S

BradS2S

Capitalize HTML

defmodule MyAppWeb.UserSettingsHTML

Where Next?

Popular in Questions Top

aadeshere1
I have a another noob question about loop. Since elixir is immutable, while loop is not directly possible. total = 10 while total != 0 ...
New
Darmani72
If I have a post route which an argument: post /my_post_route/:my_param1, MyController.my_post_handler How would get the post params ...
New
Tee
can someone please explain to me how Enum.reduce works with maps
New
Harrisonl
We have an ECS cluster with 4 services, where each task joins a single cluster, via discovery ECS discovery service. Currently when I de...
New
ovidiubadita
Hey all, I discovered Elixir and I love it. I always wanted to learn a functional programming and I intended to go for Haskell, but afte...
New
hariharasudhan94
lets say i have a sample like a = 20; b = 10; if (a > b) do {:ok, "a"} end if (a < b) do {:ok, b} end if (a == b) do {:ok, "equa...
New
baxterw3b
Hi guys, i’m new in the Elixir world, and i have to say, that i love it! i’m having some problem to understand anonymous functions with ...
New
aalberti333
As the title describes, I’m trying to run Enum.map() over a list of key/value pairs, where the value is a map. My data looks like this: ...
New
sergio_101
I am VERY much an elixir newbie. I have taken one elixir course and one phoenix course on Udemy. During that course, I saw the instructor...
New
komlanvi
Hi everyone, I was playing with phoenix liveView but I run into an issue. I have a form and want to validate each input text when the te...
New

Other popular topics Top

danschultzer
None of the current solutions worked well for me, so I went ahead and built a user management system from scratch. This project took far...
548 29377 241
New
Harrisonl
We have an ECS cluster with 4 services, where each task joins a single cluster, via discovery ECS discovery service. Currently when I de...
New
AstonJ
Posting this to see if we can make things easier for people to get into Neovim. If you use Neovim and have a favourite distro please let ...
New
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
New
freewebwithme
Using vs code and installed ElixirLS: support and debugger. And I got an error popped up on start up says Failed to run ‘elixir’ comma...
New
Qqwy
Original source of discussion: This topic on the Pragmatic Programmers’ Functional Web Development with Elixir, OTP, and Phoenix forum. ...
New
saif
Hello everyone, Long time lurker first time poster here. I’ve recently begun working on Elixir full-time again! :raised_hands: It’s been...
New
shijith.k
I am trying to start a new phoenix project with elixir 1.9, but mix phx.new does not work. It says that ** (Mix) The task "phx.new" could...
New
Qqwy
Update: How to use the Blogs & Podcasts section You can post links to your blog posts or podcasts either in one of the Official Blog...
3271 126479 1222
New
jononomo
For some reason my phoenix channels are working for me in my local dev environment, but as soon as I deploy via Docker, I get a 403 error...
New

Latest on Elixir Forum

Elixir Forum

We're in Beta

About us Mission Statement