Hello Bart,
I have two GET errors when I launch mix phx.server
[info] GET /hologram/runtime-c50354c9a5cd66be8e0af163accbc9ab.js
[debug] ** (Phoenix.Router.NoRouteError) no route found for GET /hologram/runtime-c50354c9a5cd66be8e0af163accbc9ab.js (HologramTutorialWeb.Router)
(hologram_tutorial 0.1.0) deps/phoenix/lib/phoenix/router.ex:465: HologramTutorialWeb.Router.call/2
(hologram_tutorial 0.1.0) lib/hologram_tutorial_web/endpoint.ex:1: HologramTutorialWeb.Endpoint.plug_builder_call/2
(hologram_tutorial 0.1.0) deps/plug/lib/plug/debugger.ex:155: HologramTutorialWeb.Endpoint."call (overridable 3)"/2
(hologram_tutorial 0.1.0) lib/hologram_tutorial_web/endpoint.ex:1: HologramTutorialWeb.Endpoint.call/2
(phoenix 1.8.1) lib/phoenix/endpoint/sync_code_reload_plug.ex:22: Phoenix.Endpoint.SyncCodeReloadPlug.do_call/4
(bandit 1.8.0) lib/bandit/pipeline.ex:131: Bandit.Pipeline.call_plug!/2
(bandit 1.8.0) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5
(bandit 1.8.0) lib/bandit/http1/handler.ex:13: Bandit.HTTP1.Handler.handle_data/3
(bandit 1.8.0) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3
(bandit 1.8.0) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_info/2
(stdlib 5.2.3.3) gen_server.erl:1095: :gen_server.try_handle_info/3
(stdlib 5.2.3.3) gen_server.erl:1183: :gen_server.handle_msg/6
(stdlib 5.2.3.3) proc_lib.erl:241: :proc_lib.init_p_do_apply/3
[info] GET /hologram/page-f4d5cc35aef68e063cf284312c06e078.js
[debug] ** (Phoenix.Router.NoRouteError) no route found for GET /hologram/page-f4d5cc35aef68e063cf284312c06e078.js (HologramTutorialWeb.Router)
(hologram_tutorial 0.1.0) deps/phoenix/lib/phoenix/router.ex:465: HologramTutorialWeb.Router.call/2
(hologram_tutorial 0.1.0) lib/hologram_tutorial_web/endpoint.ex:1: HologramTutorialWeb.Endpoint.plug_builder_call/2
(hologram_tutorial 0.1.0) deps/plug/lib/plug/debugger.ex:155: HologramTutorialWeb.Endpoint."call (overridable 3)"/2
(hologram_tutorial 0.1.0) lib/hologram_tutorial_web/endpoint.ex:1: HologramTutorialWeb.Endpoint.call/2
(phoenix 1.8.1) lib/phoenix/endpoint/sync_code_reload_plug.ex:22: Phoenix.Endpoint.SyncCodeReloadPlug.do_call/4
(bandit 1.8.0) lib/bandit/pipeline.ex:131: Bandit.Pipeline.call_plug!/2
(bandit 1.8.0) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5
(bandit 1.8.0) lib/bandit/http1/handler.ex:13: Bandit.HTTP1.Handler.handle_data/3
(bandit 1.8.0) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3
(bandit 1.8.0) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2
(stdlib 5.2.3.3) gen_server.erl:1085: :gen_server.try_handle_continue/3
(stdlib 5.2.3.3) gen_server.erl:995: :gen_server.loop/7
(stdlib 5.2.3.3) proc_lib.erl:241: :proc_lib.init_p_do_apply/3
The same errors are visible in the browser console.
The double quotes around the 20 are automatically added by Zed in my home_page.holo. When I remove them (I have to move the template into home_page.ex to do that because Zed doesn’t pick up the HTML inside the HOLO Sigil), I get a new error:
Compiling 1 file (.ex)
== Compilation error in file app/pages/home_page.ex ==
** (Hologram.TemplateSyntaxError)
Reason:
Unknown reason.
Hint:
Please report that you received this message here: https://github.com/bartblast/hologram/issues
and include a markup snippet that will allow us to reproduce the issue.
="calculator" value=20 />
^
status = :attribute_assignment
token = {:string, "20"}
context = %Hologram.Template.Parser.Context{attribute_name: "value", attribute_value: [], attributes: [{"cid", [text: "calculator"]}], block_name: nil, delimiter_stack: [], node_type: :attribute, prev_status: :attribute_name, processed_tags: [text: "\n", end_tag: "h1", text: "Home Page", start_tag: {"h1", []}], processed_tokens: [symbol: "=", string: "value", whitespace: " ", symbol: "\"", string: "calculator", symbol: "\"", symbol: "=", string: "cid", whitespace: " ", string: "Calculator", symbol: "<", whitespace: "\n", symbol: ">", string: "h1", symbol: "</", string: "Page", whitespace: " ", string: "Home", symbol: ">", string: "h1", symbol: "<"], raw?: false, script?: false, tag_name: "Calculator", token_buffer: []}
(hologram 0.6.3) lib/hologram/template/parser.ex:1064: Hologram.Template.Parser.raise_error/5
(hologram 0.6.3) lib/hologram/template.ex:22: Hologram.Template.dom_ast/1
(hologram 0.6.3) lib/hologram/template.ex:40: Hologram.Template.build_holo_sigil_ast/1
(hologram 0.6.3) expanding macro: Hologram.Template.sigil_HOLO/2
(hologram_tutorial 0.1.0) app/pages/home_page.ex:9: HologramTutorial.HomePage.template/0
[watch] build started (change: "../_build/dev/phoenix-colocated/hologram_tutorial/index.js")
[watch] build finished