Page MenuHomePhabricator

Unhandled exception when StoryBuilder is accessed without a valid subpage
Closed, ResolvedPublicBUG REPORT

Description

List of steps to reproduce (step by step, including full links if applicable):

  • Go to a) /wiki/Special:StoryBuilder or b) /wiki/Special:StoryBuilder/<invalid title>

What happens?:
Error message with a stack trace

What should have happened instead?:
Nicer error message that says a) that a valid article must be provided as a subpage or b) that the provided subpage doesn't exist

Software version (if not a Wikimedia wiki), browser information, screenshots, other information, etc.:

Event Timeline

SBisson triaged this task as Medium priority.
SBisson moved this task from Ready for Dev to Dev on the Inuka-Team (Kanban) board.

Change 806468 had a related patch set uploaded (by Sbisson; author: Sbisson):

[mediawiki/extensions/Wikistories@master] Special:StoryBuilder: validate subpage

https://gerrit.wikimedia.org/r/806468

Change 806468 merged by jenkins-bot:

[mediawiki/extensions/Wikistories@master] Special:StoryBuilder: validate subpage

https://gerrit.wikimedia.org/r/806468

Error message says Please specify a valid subpage in the URL. It can be an article you want to create a story about or the title of a story to edit.

I tried to put the title of a story(Meow) to edit but it resulted into the same error message instead of opening the story builder to allow me to edit the story.

Screen Shot 2022-06-27 at 1.42.40 PM.png (755×1 px, 78 KB)

I tried to put the title of a story(Meow) to edit but it resulted into the same error message instead of opening the story builder to allow me to edit the story.

You need to include the namespace (Story:Meow)

I tried to put the title of a story(Meow) to edit but it resulted into the same error message instead of opening the story builder to allow me to edit the story.

You need to include the namespace (Story:Meow)

Thanks Stephane, it worked. I am wondering, shall we include this part in the error message? I came up with an alternate version of it, let me know if you have any thoughts about it.

In the URL, specify an article to create a story about or the title of a story to edit. You need to include the story namespace too.

I was thinking of providing a sample URL to make it easy to understand but not sure if that's really required.

Change 809609 had a related patch set uploaded (by Sbisson; author: Sbisson):

[mediawiki/extensions/Wikistories@master] Reword invalid subpage message

https://gerrit.wikimedia.org/r/809609

Change 809609 merged by jenkins-bot:

[mediawiki/extensions/Wikistories@master] Reword invalid subpage message

https://gerrit.wikimedia.org/r/809609

Thanks for the improvements. I got another idea after looking at it, maybe worth considering as a further improvement. We can breakdown the help message in following ways.

If you want to edit an existing story
en.m.wikipedia.org/wiki/special:Storybuilder/story:storytitle

If you want to create a new story
en.m.wikipedia.org/wiki/special:storybuilder/articletitle

This suggestion will work best if we can change the above shared URLs based on the Wiki. e.g.

id.m.wikipedia.org/...
hi.m.wikipedia.org/...

Thanks @SGautam_WMF for the other improvements suggestions. They can be in a new task if you want but remember that this is just an error message. We expect users to follow well-written URLs and not write them from scratch so they should never see it.