Created
February 20, 2019 22:24
-
-
Save mazz/4a61a0033b445b4928f36b91d3a01fb2 to your computer and use it in GitHub Desktop.
Phoenix.Template.UndefinedError
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Phoenix.Template.UndefinedError at GET / | |
Could not render "app.html" for WordApi.LayoutView, please define a matching clause for render/2 or define a template at "lib/faithful_word_api/templates/layout". No templates were compiled for this module. Assigns: | |
%{__phx_template_not_found__: WordApi.LayoutView, conn: %Plug.Conn{adapter: {Plug.Cowboy.Conn, :...}, assigns: %{layout: {WordApi.LayoutView, "app.html"}}, before_send: [#Function<0.116269836/1 in Plug.CSRFProtection.call/2>, #Function<2.65282597/1 in Phoenix.Controller.fetch_flash/2>, #Function<0.58261320/1 in Plug.Session.before_send/2>, #Function<1.112466771/1 in Plug.Logger.call/2>, #Function<0.66982185/1 in Phoenix.LiveReloader.before_send_inject_reloader/2>], body_params: %{}, cookies: %{"cookieconsent_status" => "dismiss"}, halted: false, host: "localhost", method: "GET", owner: #PID<0.736.0>, params: %{}, path_info: [], path_params: %{}, port: 4000, private: %{WordApi.Router => {[], %{}}, :phoenix_action => :index, :phoenix_controller => WordApi.PageController, :phoenix_endpoint => WordApi.Endpoint, :phoenix_flash => %{}, :phoenix_format => "html", :phoenix_layout => {WordApi.LayoutView, :app}, :phoenix_pipelines => [:browser], :phoenix_router => WordApi.Router, :phoenix_template => "index.html", :phoenix_view => WordApi.PageView, :plug_session => %{}, :plug_session_fetch => :done}, query_params: %{}, query_string: "", remote_ip: {127, 0, 0, 1}, req_cookies: %{"cookieconsent_status" => "dismiss"}, req_headers: [{"accept", "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8"}, {"accept-encoding", "gzip, deflate"}, {"accept-language", "en-US,en;q=0.5"}, {"cache-control", "max-age=0"}, {"connection", "keep-alive"}, {"cookie", "cookieconsent_status=dismiss"}, {"host", "localhost:4000"}, {"upgrade-insecure-requests", "1"}, {"user-agent", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:65.0) Gecko/20100101 Firefox/65.0"}], request_path: "/", resp_body: nil, resp_cookies: %{}, resp_headers: [{"cache-control", "max-age=0, private, must-revalidate"}, {"x-request-id", "2m2j0nl502o92uhe0k000io1"}, {"x-frame-options", "SAMEORIGIN"}, {"x-xss-protection", "1; mode=block"}, {"x-content-type-options", "nosniff"}, {"strict-transport-security", "max-age=31536000; includeSubDomains"}, {"x-download-options", "noopen"}, {"x-permitted-cross-domain-policies", "none"}, {"cross-origin-window-policy", "deny"}], scheme: :http, script_name: [], secret_key_base: :..., state: :unset, status: nil}, view_module: WordApi.PageView, view_template: "index.html"} | |
Assigned keys: [:__phx_template_not_found__, :conn, :view_module, :view_template] | |
Hahaha, thanks for the reply. I have a feeling you're right and I'm not parsing the json correctly (I want to render the output from another API and I have a feeling that's the issue).
Cheers,
Thomas
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I honestly can’t remember exactly. I think it was some broken reference to a .json in book.view.ex
General rule: if you think it’s Phoenix’s fault it’s probably actually your fault.