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

Fix hyperlinks not working on profile page #5021

Closed
5 tasks
madeofhuman opened this issue Mar 11, 2019 · 17 comments
Closed
5 tasks

Fix hyperlinks not working on profile page #5021

madeofhuman opened this issue Mar 11, 2019 · 17 comments
Labels
assigned first-timers-only They need to be well-formatted using the First-timers_Issue_Template.

Comments

@madeofhuman
Copy link
Contributor

madeofhuman commented Mar 11, 2019

Hi, this is a first-timers-only issue. This means we've worked to make it more legible to folks who either haven't contributed to our codebase before, or even folks who haven't contributed to open source before.

If that's you, we're interested in helping you take the first step and can answer questions and help you out as you do. Note that we're especially interested in contributions from people from groups underrepresented in free and open source software!

We know that the process of creating a pull request is the biggest barrier for new contributors. This issue is for you 💝

If you have contributed before, consider leaving this one for someone new, and looking through our general help wanted issues. Thanks!

🤔 What you will need to know.

Nothing. This issue is meant to welcome you to Open Source :) We are happy to walk you through the process.

📋 Step by Step

<% if !@related_tags.nil? %>
    <p> <%= render partial: 'tag/subscribe_button', locals:{tags: @related_tags } %></p>
  <% end %>

to ensure that an iteration does not occur on a nil value (that is, tags.each should only run when tags has a non-nil value).
Current Behavior
Clicking on the hyperlinks to a user's questions and activities on their profile page breaks the app and opens an error page.
Screenshot 2019-03-11 at 10 38 15 PM
Screenshot 2019-03-11 at 9 58 50 PM

Expected Behavior
Clicking on the hyperlinks on a user's profile page ("questions", for example) should take you to a page that shows the questions or activities the user has made.
Screenshot 2019-03-11 at 10 38 15 PM
Screenshot 2019-03-11 at 10 38 33 PM

  • 💾 Commit your changes
  • 🔀 Start a Pull Request. There are two ways how you can start a pull request:
  1. If you are familiar with the terminal or would like to learn it, here is a great tutorial on how to send a pull request using the terminal.
  2. You can also edit files directly in your browser and open a pull request from there.
  • 🏁 Done Ask in comments for a review :)

🤔❓ Questions?

Leave a comment below!

@madeofhuman
Copy link
Contributor Author

@gauravano here's the issue.

@helenatxu
Copy link

Hi I am an Outreachy applicant, could I be assigned to this issue to work on? Or maybe you have another issue you could assign me to start working :) Thanks @gauravano

@cesswairimu
Copy link
Collaborator

@madeofhuman good catch, but to make it a first-timer-only you have to give the the actual code to be written and links to where specifically it should be. Please do that on the description or I can help with that, juts let me know. @helenatxu awesome you can take up this issue once its ready

@cesswairimu
Copy link
Collaborator

Actually this could be split into three ftos now that we are in need for more..one for each hyperlink thanks again @madeofhuman

@madeofhuman
Copy link
Contributor Author

madeofhuman commented Mar 12, 2019

@cesswairimu It's actually only one line of code that needs to be modified to fix everything. If you look at the screenshot of the error page that I added to the description, it's line 4 of _tags_popover.html.erb

@cesswairimu
Copy link
Collaborator

Aha gotcha, thanks @madeofhuman. @helenatxu this is ready you can get started on it...comment below if you get stuck.

@helenatxu
Copy link

Thank you @cesswairimu!

@grvsachdeva grvsachdeva added first-timers-only They need to be well-formatted using the First-timers_Issue_Template. assigned labels Mar 12, 2019
@madeofhuman
Copy link
Contributor Author

madeofhuman commented Mar 13, 2019

@helenatxu how are you doing with this? If you're running into any problem, please don't hesitate to reach out. 😄

@madeofhuman
Copy link
Contributor Author

madeofhuman commented Mar 20, 2019

Hi, @helenatxu. Hope you're all right? How are you getting on with this issue? Don't forget to reach out if you have any problem.

@helenatxu
Copy link

Hello @madeofhuman! Sorry I didn't answer as I didn't see any notification. I think I will /unclaim this issue because I didn't have time yet to start it after a few days. I will come back if I have enough time again. Thank you!

@jywarren
Copy link
Member

That's ok @helenatxu, maybe @shubhi2000 would like to take this one over for now and we can make one for you when you're ready? You can always ask and we will make one.

#4963

@shubhi2000
Copy link
Contributor

@jywarren sure, I will take this issue and work on it.

@jywarren
Copy link
Member

jywarren commented Mar 20, 2019 via email

@shubhi2000
Copy link
Contributor

I added a conditional statement to run tags.each only when tags has a non-null value, and then I created a PR. Out of 3 checks on my PR, 2 checks were successful and 1 check failed. Since, it is my first PR, I didn't know that I need to tick the checkboxes before proposing the PR. So, the check failure is because of not checking the boxes or something else needs to be done with the code? Please help me regarding this.

@IshaGupta18
Copy link
Collaborator

Okay so I am not sure why this file is being used here in the profile page. This file was just written for multiple tag subscription, and I don't know why it is linked to links in the profile page. Besides, if tags are empty, that is already being checked here:

<% if @node && !@node.node_tags.empty? && ((current_user && @node.liked_by(current_user.uid)) || !current_user) %>

Let's try and find out what's happening here

@IshaGupta18
Copy link
Collaborator

IshaGupta18 commented Mar 20, 2019

Finally found the bug! The file that needs to be changes here is not _tags_popover.html.erb, its tag/show.html.erb. The subscribe_button partial is being called there and the nil condition is not being checked there. I am EDITING this issue here only since @madeofhuman reported this issue in the first place! @shubhi2000 you can close your previous PR and create a new PR according to the new changes. Thanks a ton everyone!

@shubhi2000
Copy link
Contributor

@IshaGupta18 okay, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
assigned first-timers-only They need to be well-formatted using the First-timers_Issue_Template.
Projects
None yet
Development

No branches or pull requests

7 participants