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

  1. Visit the topic editor.
  2. Try to create a canonical story using the add story button.
  3. Enter the Url fragment with 2-3 words with spaces and then click on the title or description input box.
  4. 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: image

Screenshots/Videos

Screenshot from 2024-06-27 17-36-56 Screenshot from 2024-06-27 17-36-44

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)

Commits related to this issue

Most upvoted comments