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

Recent authors section takes to unexpected page displaying error message. #754

Open
xJonJos opened this issue Oct 12, 2021 · 1 comment
Open
Labels

Comments

@xJonJos
Copy link

xJonJos commented Oct 12, 2021

On this page : https://spectralworkbench.org/

Image (1/2):
swpage

When clicking all recent authors name, it opens a page with error message below.

Image (2/2)
sw

it lands here: https://spectralworkbench.org/profile.zoebeatrix_esmilla

What actually happened?

How to fix it?

@xJonJos xJonJos added the bug label Oct 12, 2021
@wajeehamushtaq
Copy link
Contributor

Hi @Jon-Jos, I have search the code in the repositiory. In app/views/spectrums/index.html.erb file, we have something like:

    <h3>Recent authors</h3>
    <ul class="nav">
    <% User.where(login: @spectrums.collect(&:author).uniq).each do |user| %>
      <li><a href="<%= profile_path(user.login) %>"><i class="fa fa-user"></i> <%= user.login %></a></li>
    <% end %>
    </ul>

I think this error occurs becuase user is not logged in. This is the main page and you are not logged in. Hope it makes sense. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants