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

Resetting code in some new JS certification projects is not working #55100

Closed
gikf opened this issue Jun 5, 2024 · 2 comments · Fixed by #55103
Closed

Resetting code in some new JS certification projects is not working #55100

gikf opened this issue Jun 5, 2024 · 2 comments · Fixed by #55103
Assignees
Labels
new javascript course These are for issues dealing with the new JS curriculum platform: learn UI side of the client application that needs familiarity with React, Gatsby etc. status: PR in works Work in Progress (WIP) Issues. type: bug Issues that need priority attention. Platform, Curriculum tests (if broken completely), etc.

Comments

@gikf
Copy link
Member

gikf commented Jun 5, 2024

Describe the bug

For some of the new JS certification projects resetting code/lesson is not working.

When trying to reset code/lesson in couple projects, nothing happens other than error is displayed in browser's console:

Uncaught TypeError: e.seedEditableRegionBoundaries is undefined
Uncaught TypeError: Cannot read properties of undefined (reading 'slice')

What's strange it happens for me only on two projects:
https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures-v8/build-a-cash-register-project/build-a-cash-register
https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures-v8/build-a-palindrome-checker-project/build-a-palindrome-checker

To Reproduce

  1. Log in (or be logged in).
  2. Go to affected certification project.
  3. Save code.
  4. Reload page.
  5. Press Reset this lesson.
  6. Press Reset this lesson in the displayed modal.
  7. Nothing happens, modal is still visible, in console appears error.

Expected behavior

Being able to reset code/lesson.

Additional context

Resetting appear to work fine in at least:

  • Other new JS certification projects
  • New JS practice projects
  • Projects in Python certification
  • Projects in Old JS curriculum
@gikf gikf added type: bug Issues that need priority attention. Platform, Curriculum tests (if broken completely), etc. platform: learn UI side of the client application that needs familiarity with React, Gatsby etc. status: waiting triage This issue needs help from moderators and users to reproduce and confirm its validity and fix. new javascript course These are for issues dealing with the new JS curriculum labels Jun 5, 2024
@ojeytonwilliams ojeytonwilliams self-assigned this Jun 5, 2024
@ojeytonwilliams
Copy link
Contributor

Thanks for the detailed report, @gikf. I was able to reproduce this by saving a JS project and then attempting to reset. When you do that, seedEditableRegionBoundaries gets wiped and subsequent resets fail. I guess the reason you saw that on only two projects was that those were the only two you'd saved.

I'll have a fix shortly - I'm just working on the tests.

@gikf
Copy link
Member Author

gikf commented Jun 6, 2024

I can confirm saving code make it starts happening for another project. 👍

Can't say I remember saving it before, but I'm copying code back and forth when debugging campers' solutions on forums, so I must have clicked save or pressed the key shortcut once or twice.

@naomi-lgbt naomi-lgbt added status: PR in works Work in Progress (WIP) Issues. and removed status: waiting triage This issue needs help from moderators and users to reproduce and confirm its validity and fix. labels Jun 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new javascript course These are for issues dealing with the new JS curriculum platform: learn UI side of the client application that needs familiarity with React, Gatsby etc. status: PR in works Work in Progress (WIP) Issues. type: bug Issues that need priority attention. Platform, Curriculum tests (if broken completely), etc.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants