I'm running into an issue with the live_session @owner assignment...
When I start up the server and navigate to the page, I get an error like the following:
[error] #PID<0.521.0> running CalendlexWeb.Endpoint (connection #PID<0.520.0>, stream id 1) terminated
Server: localhost:4000 (http)
Request: GET /
** (exit) an exception was raised:
** (ArgumentError) assign @owner not available in template.
Please make sure all proper assigns have been set. If you are
calling a component, make sure you are passing all required
assigns as arguments.
Available assigns: [:changed, :event_types, :flash, :live_action, :socket]
I've made sure all the code matches. Any ideas why? Just seems like the live_session stuff isn't working, or being ignored.
Actually, I had noticed that your live_view version was higher, so I did update that and it fixed the @owner assignment issue.
I was also running into another issue with the EventType component:
"function EventType.event_type/1 is undefined (module EventType is not available)" and it also couldn't event find the "EventType" module.
It seems that's supposed to be EventType.selector... so changing that, and then adding "alias Calendlex.Components.EventType" to the page_live.ex file helped.
I'm running into an issue with the live_session @owner assignment...
When I start up the server and navigate to the page, I get an error like the following:
[error] #PID<0.521.0> running CalendlexWeb.Endpoint (connection #PID<0.520.0>, stream id 1) terminated
Server: localhost:4000 (http)
Request: GET /
** (exit) an exception was raised:
** (ArgumentError) assign @owner not available in template.
Please make sure all proper assigns have been set. If you are
calling a component, make sure you are passing all required
assigns as arguments.
Available assigns: [:changed, :event_types, :flash, :live_action, :socket]
I've made sure all the code matches. Any ideas why? Just seems like the live_session stuff isn't working, or being ignored.
I think that's because you need to remove this from the router:
But then I think you will ran into the same error I ran into.
That worked for me, thanks.
Fortunately (unfortunately?), I didn't run into your issue.
Hi there! Can you run
mix hex.outdated
and confirm that you have the latest version of LiveView installed?Actually, I had noticed that your live_view version was higher, so I did update that and it fixed the @owner assignment issue.
I was also running into another issue with the EventType component:
"function EventType.event_type/1 is undefined (module EventType is not available)" and it also couldn't event find the "EventType" module.
It seems that's supposed to be EventType.selector... so changing that, and then adding "alias Calendlex.Components.EventType" to the page_live.ex file helped.
I see that Anton was having the same issue as me, so disregard this.
Yeah, my bad. I should have specified that
live_session
should wrap the current scope. I'll rewrite that part, thanks for reporting the issue :)