smpallen99 / coherence

Coherence is a full featured, configurable authentication system for Phoenix
MIT License
1.27k stars 225 forks source link

Not able to set custom layout #175

Open messutied opened 7 years ago

messutied commented 7 years ago

I'm having the same issue described at https://github.com/smpallen99/coherence/issues/128.

I can see the layout is been set to Coherence.LayoutView even though Im changing it as described in the README file.

Coherence version: 0.3.

smpallen99 commented 7 years ago

Yes, i've seen a similar issue. I have not had time to troubleshoot it yet.

Qqwy commented 7 years ago

I have this problem as well.

Yamilquery commented 7 years ago

Same here...

[error] #PID<0.599.0> running Remepe.Web.Endpoint terminated
Server: localhost:4000 (http)
Request: GET /admin/sessions/new
** (exit) an exception was raised:
    ** (Phoenix.Template.UndefinedError) Could not render "new.html" for Remepe.Web.Coherence.SessionView, please define a matching clause for render/2 or define a template at "lib/remepe/templates/web/coherence/session". No templates were compiled for this module.
Assigns:

%{conn: %Plug.Conn{adapter: {Plug.Adapters.Cowboy.Conn, :...}, assigns: %{current_user: nil, email: "", layout: {Remepe.Web.LayoutView, "app.html"}, remember: false}, before_send: [#Function<0.61800377/1 in Plug.CSRFProtection.call/2>, #Function<4.65050325/1 in Phoenix.Controller.fetch_flash/2>, #Function<0.131660147/1 in Plug.Session.before_send/2>, #Function<1.133563855/1 in Plug.Logger.call/2>, #Function<0.117841387/1 in Phoenix.LiveReloader.before_send_inject_reloader/2>], body_params: %{}, cookies: %{"_remepe_key" => "SFMyNTY.g3QAAAACbQAAAAtfY3NyZl90b2tlbm0AAAAYdEVrRGdqKzJ1amF6ZmNObk5YN2Q5UT09bQAAAA51c2VyX3JldHVybl90b20AAAAGL2FkbWlu.Llei6pRXc_YjLJL_BoBaVsp7FvG921go0B_hdBFCNsY"}, halted: false, host: "localhost", method: "GET", owner: #PID<0.599.0>, params: %{}, path_info: ["admin", "sessions", "new"], path_params: %{}, peer: {{127, 0, 0, 1}, 52784}, port: 4000, private: %{Remepe.Web.Router => {[], %{Absinthe.Plug => [], Absinthe.Plug.GraphiQL => ["graphiql"], Bamboo.EmailPreviewPlug => ["sent_emails"]}}, :phoenix_action => :new, :phoenix_controller => Coherence.SessionController, :phoenix_endpoint => Remepe.Web.Endpoint, :phoenix_flash => %{}, :phoenix_format => "html", :phoenix_layout => {Remepe.Web.LayoutView, :app}, :phoenix_pipelines => [:browser], :phoenix_router => Remepe.Web.Router, :phoenix_template => "new.html", :phoenix_view => Remepe.Web.Coherence.SessionView, :plug_session => %{"_csrf_token" => "tEkDgj+2ujazfcNnNX7d9Q==", "user_return_to" => "/admin"}, :plug_session_fetch => :done}, query_params: %{}, query_string: "", remote_ip: {127, 0, 0, 1}, req_cookies: %{"_remepe_key" => "SFMyNTY.g3QAAAACbQAAAAtfY3NyZl90b2tlbm0AAAAYdEVrRGdqKzJ1amF6ZmNObk5YN2Q5UT09bQAAAA51c2VyX3JldHVybl90b20AAAAGL2FkbWlu.Llei6pRXc_YjLJL_BoBaVsp7FvG921go0B_hdBFCNsY"}, req_headers: [{"host", "localhost:4000"}, {"accept", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"}, {"upgrade-insecure-requests", "1"}, {"cookie", "_remepe_key=SFMyNTY.g3QAAAACbQAAAAtfY3NyZl90b2tlbm0AAAAYdEVrRGdqKzJ1amF6ZmNObk5YN2Q5UT09bQAAAA51c2VyX3JldHVybl90b20AAAAGL2FkbWlu.Llei6pRXc_YjLJL_BoBaVsp7FvG921go0B_hdBFCNsY"}, {"user-agent", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/604.3.5 (KHTML, like Gecko) Version/11.0.1 Safari/604.3.5"}, {"accept-language", "es-xl"}, {"accept-encoding", "gzip, deflate"}, {"connection", "keep-alive"}], request_path: "/admin/sessions/new", resp_body: nil, resp_cookies: %{}, resp_headers: [{"cache-control", "max-age=0, private, must-revalidate"}, {"x-request-id", "71rhv27n0lpq74qjmo22s7gcj6l73oom"}, {"vary", "Origin"}, {"access-control-allow-origin", "null"}, {"access-control-expose-headers", ""}, {"access-control-allow-credentials", "true"}, {"x-frame-options", "SAMEORIGIN"}, {"x-xss-protection", "1; mode=block"}, {"x-content-type-options", "nosniff"}], scheme: :http, script_name: [], secret_key_base: "6R79fZnMI241rDI3iAq1pMrZX0csufzeZnUCvlNzTFcsuwq/DKSCQHgoL9DHrGGI", state: :unset, status: nil}, current_user: nil, email: "", remember: false, template_not_found: Remepe.Web.Coherence.SessionView, view_module: Remepe.Web.Coherence.SessionView, view_template: "new.html"}

Assigned keys: [:conn, :current_user, :email, :remember, :template_not_found, :view_module, :view_template]

        (phoenix) lib/phoenix/template.ex:364: Phoenix.Template.raise_template_not_found/3
        (remepe) lib/remepe/web/templates/layout/app.html.eex:29: Remepe.Web.LayoutView."app.html"/1
        (phoenix) lib/phoenix/view.ex:332: Phoenix.View.render_to_iodata/3
        (phoenix) lib/phoenix/controller.ex:740: Phoenix.Controller.do_render/4
        (coherence) lib/coherence/controllers/session_controller.ex:1: Coherence.SessionController.action/2
        (coherence) lib/coherence/controllers/session_controller.ex:1: Coherence.SessionController.phoenix_controller_pipeline/2
        (remepe) lib/remepe/web/endpoint.ex:1: Remepe.Web.Endpoint.instrument/4
        (phoenix) lib/phoenix/router.ex:278: Phoenix.Router.__call__/1
        (remepe) lib/plug/error_handler.ex:64: Remepe.Web.Router.call/2
        (remepe) lib/remepe/web/endpoint.ex:1: Remepe.Web.Endpoint.plug_builder_call/2
        (remepe) lib/plug/debugger.ex:99: Remepe.Web.Endpoint."call (overridable 3)"/2
        (remepe) lib/remepe/web/endpoint.ex:1: Remepe.Web.Endpoint.call/2
        (plug) lib/plug/adapters/cowboy/handler.ex:15: Plug.Adapters.Cowboy.Handler.upgrade/4
        (cowboy) /Users/yamildiazaguirre/Documents/grvty/REMEPE/remepe/deps/cowboy/src/cowboy_protocol.erl:442: :cowboy_protocol.execute/4
coderberry commented 6 years ago

+1