Situation:
Phoenix 1.7.2 project (started life as 1.6) using LiveView 0.18.18, all working OK
Ran mix phx.gen.auth Accounts User users
to experiment with authentication.
Now compilation fails with 20+ errors like this:
error: undefined function button/1 (expected MyappWeb.UserConfirmationInstructionsLive to define such a function or for it to be imported, but none are available)
lib/myapp_web/live/user_confirmation_instructions_live.ex:8: MyappWeb.UserConfirmationInstructionsLive.render/1
error: undefined function header/1 (expected MyappWeb.UserConfirmationInstructionsLive to define such a function or for it to be imported, but none are available)
lib/myapp_web/live/user_confirmation_instructions_live.ex:8: MyappWeb.UserConfirmationInstructionsLive.render/1
.
.
This sounds like an issue others have had, due to the change from Phoenix.View
to Phoenix.Template
in 1.7. But is there an easy-to-understand guide how to alter the generated code to make it work? I’ve looked at the other posts and answers around this issue in this forum but wasn’t able to work out exactly what to change and in what files to make things work.
Any help would be greatly appreciated.