John_Shelby
Hello,
I have a problem after logging in to my app and I don’t know how to solve this error: key :conn not found in: %{__changed__: % in my_app_web/templates/layout/app.html.heex Has anyone encountered this before? I’m upgrading from phoenix from 1.6.9 to 1.7.0 and phoenix_live_view from 17.8 to 18.3.
I don’t know what I should have set wrong. I followed the upgrade instructions or also the video from Elixircast
I checked web.ex and everything from tutorials, but it seems ok.
Has anyone had the same problem please?
Any ideas? Thank you.
Need more information to solve a problem?
Trending in Questions
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
Hello,
I know there is an approach for handling lists that allows for optimized traversal, but I can’t recall the specific method (somet...
New
Documentation
While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
New
I’m seeing that a list inside a Kino.DataTable will be interpreted as a charlist, even if the Kino.configure() is set to charlists: :as_l...
New
So my question is quite simple and i have found no conclusive answer on forum, google or AI.
Should we use :erlang.float for Integer to ...
New
I recently noticed that Elixir’s Logger defaults its primary log level to :debug when no :logger, :level application configuration is pre...
New
Hi, I’ve just set up an application with ash_authentication. There is only magic link strategy for now, so there is no confirmation add o...
New
Other Trending Topics
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
Hi there! We created Gust: A task orchestrator inspired by Airflow.
For those who have never heard about Aiflow, it’s a Python-based wor...
New
Hi everyone!
The first release candidate for the Expert language server project is now available!
We’ve published a press release detai...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixirconf-us
- #ai
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #metaprogramming
- #hex
- #security











First Post!- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
LostKobrakai
I think you want to use a root layout with LV to put everything outside of the html body. Usually that’s in
root.html.heex.Most Liked
LostKobrakai
If you’re using LV you should have a
root.html.heexand use that as root template. Leave just the pieces within<body>inapp.html.heex, there rest goes intoroot.html.heex. Everything in the root template is not touched by LV, but everything withinapp.htmlcan be. LV trying to manage head content however won’t go well.root.html.heexwill always receive a@conn, but (if you stick to using it for LV and non-LV)app.html.heexwill either have access to a@connor@socketdepending on the type of page. For all things related to links you can substitute them forMyAppWeb.Endpoint, which works for both types of pages.smathy
Right, yes, that’s a difficult situation. What I think the problem here is is that you have
@conninside yourheextemplate tags ({}), which is then being processed by LV as a tracked template var, and hence it’s looking for the:connkey in its internal__changed__map (which it can’t find). If you look in a new 1.7 project’sroot.html.heexyou’ll see it’s now using the verified routes~psigil:…so that should solve this problem, but I fear that’ll just lead you to the next, and the next, and the next.
smathy
Not answering your specific question here, but generally I find the best approach is to use the generator to create two new empty projects, one in the old version and one in the new version and use a
diffof those two as a guide for what to change in your project.Last Post!
Techie
Hi, I’m facing the same error condition:
[error] ** (KeyError) key :conn not found in: %{Tried downgrading to version 1.6.9, but still the same error persists !.
Any workarounds available?