oppia: [BUG]: Schema validation for 'story_url_fragment' failed: Validation failed
Describe the bug
When adding a new story from the topic editor page, and if the URL fragment input has a space or any non-allowed character it throws an error in the console and a warning pop-up gets created below the story model which can be seen after exiting the story model.
these errors are happening:
Schema validation for 'story_url_fragment' failed: Validation failed: is_regex_matched ({'regex_pattern': '^[a-z]+(-[a-z]+)*$'}) for object hte htetsststt
URL of the page where the issue is observed.
N/A
Steps To Reproduce
- Visit the topic editor.
- Try to create a canonical story using the add story button.
- Enter the Url fragment with 2-3 words with spaces and then click on the title or description input box.
- You will be able to see the error in the console and when you exit the story model you will be also able to see a pop-up.
Expected Behavior
Instead of the developer warning it should give a user-facing warning below the URL fragment input box,
Something like this:
Screenshots/Videos
What device are you using?
Desktop
Operating System
Linux
What browsers are you seeing the problem on?
Chrome
Browser version
No response
Additional context
No response
Tips for developers
Before addressing the bug, please identify which PR caused the issue (you can follow the steps here). If you identify the PR, comment on the issue with a link to it. If not, mention the commit hash of the oldest commit you saw the bug on (and the month and year it was made in).
Then, please leave a comment with details of the approach that you plan to take to fix the issue (see example).
Note: If this is your first Oppia issue, please make sure to follow our guidelines for choosing an issue and setting things up. You will also need to show a demo of the fix working correctly on your local machine. Thanks!
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 17 (17 by maintainers)
@HardikGoyal2003 This issue is solved and PR is merged. Thanks.
Have a look https://github.com/oppia/oppia/pull/20648/commits/1aff44880003f7757d50472d487a5ccf94b494f3 @HardikGoyal2003