Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DX issue: Partial card generated didn't load #3186

Open
adrianthedev opened this issue Aug 23, 2024 Discussed in #3185 · 2 comments
Open

DX issue: Partial card generated didn't load #3186

adrianthedev opened this issue Aug 23, 2024 Discussed in #3185 · 2 comments
Assignees
Labels
Bug Something isn't working Good first issue Good for newcomers Help wanted We could use some help with this

Comments

@adrianthedev
Copy link
Collaborator

adrianthedev commented Aug 23, 2024

Discussed in #3185

Originally posted by cmaxw August 23, 2024
I used the rails generator to generate a partial card for one of my resources. When I added it to the resource, it wouldn't load.

I clicked the link that says "This is not an issue with Avo. Use this page to see why this frame failed to load."

It showed a long backtrace that went into the bowels of Avo's Card rendering. Better Errors clearly wasn't helping here.

Then, I looked at my logs. It showed that it had generated a view with @dashboard.id called. Since I put this card into a resource, @dashboard was nil and it caused the error.

So, I recommend you either conditionally call @dashboard.id or @resource.id to avoid the nil issue, or take it out altogether and put the instructions into the generated view as text.

Approach

We should remove the dashboard reference and see if parent works here. If not, let's conditionally add dashboard or resource (but I think parent should work).

@adrianthedev adrianthedev added Bug Something isn't working Help wanted We could use some help with this Good first issue Good for newcomers labels Aug 23, 2024
@w3villa-rohit-kushwaha
Copy link

i wanted to work on it . please assign it to me

@Paul-Bob
Copy link
Contributor

Paul-Bob commented Sep 3, 2024

but I think parent should work

Agree.

Thanks for working on this @w3villa-rohit-kushwaha let me know if you need any help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Good first issue Good for newcomers Help wanted We could use some help with this
Projects
Status: To Do
Development

No branches or pull requests

3 participants