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

Unable to view "Repeat a string" challenge solution #9321

Closed
GaryLeutheuser opened this issue Jun 23, 2016 · 9 comments
Closed

Unable to view "Repeat a string" challenge solution #9321

GaryLeutheuser opened this issue Jun 23, 2016 · 9 comments
Labels
help wanted Open for all. You do not need permission to work on these. status: discussing Under discussion threads. Closed as stale after 60 days of inactivity.

Comments

@GaryLeutheuser
Copy link

Challenge Name

https://www.freecodecamp.com/challenges/repeat-a-string

Issue Description

This challenge has a naming issue in the archive of challenge solutions kept in the user's profile. The name can be seen as "Repeat a string repeat a string", and clicking "View solution" results in a challenge not found page (as it is apparently searching for the bogus title, which should be simply "Repeat a string").

Steps to reproduce:

  1. View a camper's profile who has completed the repeat a string challenge. (for example, mine). I have confirmed this happens on other camper's profiles as well (example 1, example 2).
  2. Locate the challenge entry under "Algorithms" for "Repeat a string repeat a string".
  3. Click "View solution".

Browser Information

  • Browser Name, Version: Chromium Version 50.0.2661.102
  • Operating System: Ubuntu 14.04 (64-bit)
  • Mobile, Desktop, or Tablet: Desktop

Screenshot

The bad title:
bad_challenge_title

The page that results from attempting to view solution:
cant_find_challenge

@ghost ghost added help wanted Open for all. You do not need permission to work on these. confirmed status: discussing Under discussion threads. Closed as stale after 60 days of inactivity. labels Jun 23, 2016
@ghost
Copy link

ghost commented Jun 23, 2016

cc/ @FreeCodeCamp/issue-moderators, how should we combat this?

@onelharrison
Copy link
Contributor

I had the same problem with another challenge. See #8582 for more details.

To resolve the issue, solve and submit the challenge. This will update the camper's profile with the correct name and link to the problem.

@tonybordeaux
Copy link

I noticed a typo in line 82 of the ./seed/challenges/front-end-development-certification.json

{ "id": "afcc8d540bea9ea2669306b6", "title": "Repeat a string repeat a string" }

Would changing this to the same title of the challenge "Repeat a string" fix this problem?

@raisedadead
Copy link
Member

@tonybordeaux I am afraid, its not a typo, just a cool way of literally saying to repeat a string.

"Repeat a string repeat a string"

@tonybordeaux
Copy link

@rasedadead I thought so at first too! But if you look at the actual challenge it's simply "Repeat a string".

in line 368 of ./seed/challenges/basic-bonfire.json, here's the title property of the challenge:

"id": "afcc8d540bea9ea2669306b6", "title": "Repeat a string",

I believe what is happening here is that since the title property in the for-mentioned reply doesn't match the title property of the basic-bonfire.json, this is messing with the URL and leading to an error.

To further reiterate my theory, the url you get when you click the repeat the string in the archive is this:

'https://www.freecodecamp.com/challenges/Repeat%20a%20string%20repeat%20a%20string'

This doesn't work. Changing it to this though:

'https://www.freecodecamp.com/challenges/Repeat%20a%20string'

Does work!

So, that's why I believe that simply changing that property might fix this problem.

@raisedadead
Copy link
Member

raisedadead commented Jun 26, 2016

@tonybordeaux oh right, my bad, thanks for pointing that out. Tagging as help wanted.

@GaryLeutheuser
Copy link
Author

Hi, I've just seen this issue happen again with another challenge: Where art thou (camper profile/archive) / Wherefore art thou (actual challenge name). Should I create a new issue for it, or is it possible to lump it into this one?

After finding that one, I went ahead and reviewed all the way through the advanced algorithms challenges to create a batch of titles if needed, but it looks like that's the only other instance of the issue. (At least within the topics of Basic, Intermediate, and Advanced Algorithm Scripting).

@arku
Copy link
Contributor

arku commented Jun 27, 2016

The title is "Wherefore art thou" in seed/challenges/01-front-end-development-certification/intermediate-bonfires.json but "Where art thou" in seed/challenges/01-front-end-development-certification/front-end-development-certificate.json

The bug was possibly introduced in a599f5d

https://github.com/FreeCodeCamp/FreeCodeCamp/blob/staging/seed/challenges/01-front-end-development-certification/intermediate-bonfires.json#L172
https://github.com/FreeCodeCamp/FreeCodeCamp/blob/staging/seed/challenges/01-front-end-development-certification/front-end-development-certificate.json#L126

I think we need to make sure that whenever a challenge is renamed, it should be renamed both in the challenge json and also in the json file which holds the challenges' ids and titles.

@raisedadead
Copy link
Member

@arun1595 nice catch. Would you mind updating these in your current PR? We wont need a separate issue that way.

@arku
Copy link
Contributor

arku commented Jun 27, 2016

@raisedadead I'll do it :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Open for all. You do not need permission to work on these. status: discussing Under discussion threads. Closed as stale after 60 days of inactivity.
Projects
None yet
Development

No branches or pull requests

5 participants