-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
ActionView::Template::Error: undefined method `name' for nil:NilClass #5153
Comments
I'd like to work on this. @gauravano @jywarren |
oh that'd be great! Is there enough information to work with?
…On Tue, Mar 19, 2019 at 11:25 AM CJ Odina ***@***.***> wrote:
I'd like to work on this. @gauravano <https://github.com/gauravano>
@jywarren <https://github.com/jywarren>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#5153 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABfJ6H_47oxfJb3CYuU1bwAEs1xL7Q1ks5vYQEvgaJpZM4b596P>
.
|
I've narrowed it down, @jywarren. Working on a fix now. |
@jywarren, @gauravano please correct me if I'm wrong, but I don't think this part
is necessary in the h3. If I understand correctly, the page is meant to display all maps containing any of the tags supplied in the url param, and they can be of different authors, so there can't be a single author name in the header. Instead, there should be a table displaying the maps (or a re-use of the maps index template). |
Hmm, it's possible that this section is used for a version of the page
showing only one author. What we probably need to do is change "user.name"
to "user.username"?
…On Tue, Mar 19, 2019 at 1:54 PM CJ Odina ***@***.***> wrote:
@jywarren <https://github.com/jywarren> correct me if I'm wrong, but I
don't think this part
by <%= ***@***.******@***.***}") %>
is necessary in the h3. If I understand correctly, the page is meant to
display all notes containing any of the tags supplied in the url param, and
they can be of different authors, so there can't be a single author name in
the header.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#5153 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABfJ2ySxTW0vPPVJSpBln6M3MyjFacQks5vYSRPgaJpZM4b596P>
.
|
Hmm.... let me see.... This is the controller method that renders the view: def tag
set_sidebar :tags, [params[:id]], note_count: 20
@tagnames = params[:id].split(',')
nids = Tag.find_nodes_by_type(@tagnames, 'map', 20).collect(&:nid)
@notes = Node.paginate(page: params[:page])
.where('nid in (?)', nids)
.order('nid DESC')
@title = @tagnames.join(', ') if @tagnames
@unpaginated = true
render template: 'tag/show'
end It's returning a list of 'notes' (should be nodes, btw) that isn't filtered by any user. So, to get the author of a 'note' (node), we'd have to do The partial that should display the maps is currently called directly in the view like so: <%= render partial: 'tag/show/contributors' %> without being wrapped in an iterator. This is what makes me think the page should display a list of maps not filtered by any author. And if each map is clicked, it then renders the page for that map. Besides, |
Ah yes, you're totally right! 🎉 I think we need to further refine the conditional on these lines, because you're right, it's getting stuck because it is wrongly assuming this is the 'for this author' view: plots2/app/views/tag/show/_contributors.html.erb Lines 1 to 7 in 4fc2e9f
Could we show the |
Yeah, we could do that, but there's no other place that's calling that partial, so I don't think the |
actually i think it may be connected to an existing issue #5099 -- i
/believe/ that page will require this h3. Is that OK? Thank you!
…On Tue, Mar 19, 2019 at 5:00 PM CJ Odina ***@***.***> wrote:
Yeah, we could do that, but there's no other place that's calling that
partial, so I don't think the by user part is needed.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#5153 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABfJ-Rj7tCWpKSE51Gg8v9uOOXWrjQRks5vYU-2gaJpZM4b596P>
.
|
I'll check it out. 😄 Edit: Yup! Seems it's using the template. My bad. On another note, what's up with that bug #5099? The error occurs on Chrome but not on other browsers like Opera or Safari. |
@jywarren I've fixed this but I'm yet to raise a PR for it. It seems that by fixing this, I also fixed this FTO issue that I created, and which has been assigned to a newcomer to work on. However, it was assigned a week ago but there's been no update from the person on it since. What do you suggest? |
hmm, well, very nice of you to look out for them. Maybe leave a comment
asking if they need any help? I'm happy to delay merging this until that's
done if it helps. Thank you!
…On Tue, Mar 19, 2019 at 7:38 PM CJ Odina ***@***.***> wrote:
@jywarren <https://github.com/jywarren> I've fixed this but I'm yet to
raise a PR for it. It seems that by fixing this, I also fixed this FTO
issue <#5021> that I created,
and which has been assigned to someone to work on. Although, it was
assigned last week but there's been no update from the person. What do you
suggest?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#5153 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABfJzUEisZvbamVckiMuLt5VuqqPbcpks5vYXTtgaJpZM4b596P>
.
|
@jywarren I need your thoughts on this, please: How do I display the returned maps after searching by tags? I have two thoughts:
|
Hmm. I guess I think #2 would be best, but keep in mind that we are slowly seeking to convert all maps into note records, so we're mostly looking to stabilize this part of the code until that larger project has time to be completed. #4072 Thank you! Big codebases like these always have these big slow-moving projects, so your work is extra critical to keep things working as they progress! |
So, in sum, i guess, we will eventually be showing maps alongside notes, using the notes template, so let's do something pragmatic here to solve the issue at hand until that happens. Thanks again! |
Sure thing. I'm really glad to be of help. |
Sentry Issue: PLOTS2-2T
The text was updated successfully, but these errors were encountered: