Freecodecamp: Unable to view "Repeat a string" challenge solution

Created on 23 Jun 2016  ·  10Comments  ·  Source: freeCodeCamp/freeCodeCamp

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

help wanted discussing

Most helpful comment

@raisedadead I'll do it :)

All 10 comments

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

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.

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?

@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"_

@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.

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

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).

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 https://github.com/FreeCodeCamp/FreeCodeCamp/commit/a599f5d1027b3e46c21fcd9ccb01f6dc41b4c2e3

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.

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

@raisedadead I'll do it :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

DaphnisM picture DaphnisM  ·  3Comments

trashtalka3000 picture trashtalka3000  ·  3Comments

QuincyLarson picture QuincyLarson  ·  3Comments

MelissaManning picture MelissaManning  ·  3Comments

Tzahile picture Tzahile  ·  3Comments