undefined function unlock_path
tenpaiyomi opened this issue · 2 comments
tenpaiyomi commented
Similar to a few other people, I'm getting an error with undefined function unlock_path
. Differing from those others, I have not forgotten to place coherence_routes()
in my router.ex
, but am still getting the issue. Any help would be greatly appreciated.
defmodule HWWeb.Router do
use HWWeb, :router
use Coherence.Router
pipeline :browser do
plug :accepts, ["html"]
plug :fetch_session
plug :fetch_flash
plug :protect_from_forgery
plug :put_secure_browser_headers
plug Coherence.Authentication.Session
end
pipeline :protected do
plug :accepts, ["html"]
plug :fetch_session
plug :fetch_flash
plug :protect_from_forgery
plug :put_secure_browser_headers
plug Coherence.Authentication.Session, protected: true
end
scope "/" do
pipe_through :browser
coherence_routes()
end
scope "/" do
pipe_through :protected
coherence_routes :protected
end
pipeline :api do
plug :accepts, ["json"]
end
scope "/", HWWeb do
pipe_through :browser # Use the default browser stack
# Public Routes
get "/", PageController, :index
end
scope "/", HWWeb do
pipe_through :protected
# Private Routes
end
end
$ mix phx.routes
Compiling 25 files (.ex)
== Compilation error in file lib/hw_web/views/coherence/unlock_view.ex ==
** (CompileError) lib/hw_web/templates/coherence/unlock/new.html.eex:3: undefined function unlock_path/2
(stdlib) lists.erl:1338: :lists.foreach/2
(stdlib) erl_eval.erl:670: :erl_eval.do_apply/6
(elixir) lib/kernel/parallel_compiler.ex:121: anonymous fn/4 in Kernel.ParallelCompiler.spawn_compilers/1
smpallen99 commented
Most likely because you did not install that option when running the coh.install task. A quick fix for the compile is to add the lockable option to ur config.
tenpaiyomi commented
@smpallen99 I could of swore I did, but given that it has been almost 9 months since I created this issue, I'm not entirely sure 😆 I'll try again when I eventually revisit Phoenix. Regardless, thank you for the response.