Page MenuHomePhabricator

Special:OAuth/foo doesn't parse HTML error link
Closed, ResolvedPublic

Description

Steps to reproduce
Go to https://en.wikipedia.org/wiki/Special:OAuth/lorem_ipsum

Actual content:

Display
Sorry, something went wrong, you'll need to contact the application author for help with this.

Unknown URL, <a class="external" href="https://www.mediawiki.org/wiki/Help:OAuth/Errors#E002">E002</a>

Return to Main Page.
HTML
<p>Sorry, something went wrong, you'll need to contact the application author for help with this.
</p><p><span class="plainlinks mw-mwoautherror-details">Unknown URL, &lt;a class="external" href="<a class="external free" href="https://www.mediawiki.org/wiki/Help:OAuth/Errors#E002">https://www.mediawiki.org/wiki/Help:OAuth/Errors#E002</a>"&gt;E002&lt;/a&gt;</span>
</p><p id="mw-returnto">Return to <a href="/wiki/Main_Page" title="Main Page">Main Page</a>.</p>

Event Timeline

Restricted Application added a project: User-DannyS712. · View Herald TranscriptAug 22 2019, 10:02 AM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
DannyS712 moved this task from Unsorted to Others on the User-DannyS712 board.Aug 22 2019, 10:47 AM
Tgr moved this task from Backlog to UI/UX on the MediaWiki-extensions-OAuth board.Aug 27 2019, 6:00 PM
Tgr added a project: good first task.

I would like to work on this.

Nikitrain added a comment.EditedOct 3 2019, 8:15 AM
Sorry, something went wrong, you'll need to contact the application author for help with this.

Unknown URL, Error: E002

Return to Main Page.

is this what is required?
OR

Sorry, something went wrong, you'll need to contact the application author for help with this.

Unknown URL, E002

Return to Main Page.

where should I submit the Gerrit patch or pull request?

Tgr added a subscriber: Tgr.Oct 3 2019, 8:24 AM

The raw HTML should be something like

<p>Sorry, something went wrong, you'll need to contact the application author for help with this.</p>
<p><span class="plainlinks mw-mwoautherror-details">Unknown URL, <a class="external" href="https://www.mediawiki.org/wiki/Help:OAuth/Errors#E002">E002</a></span></p>
<p id="mw-returnto">Return to <a href="/wiki/Main_Page" title="Main Page">Main Page</a>.</p>

You probably need to change how the relevant error message gets parsed, see the messages API.

The repo is mediawiki/extensions/OAuth on gerrit.

Nikitrain added a comment.EditedOct 3 2019, 9:00 AM
Sorry, something went wrong, you'll need to contact the application author for help with this.

Unknown URL, Error: E002

Return to Main Page.

I got the result using this raw HTML

<p>Sorry, something went wrong, you'll need to contact the application author for help with this.</p>
<p><span class="plainlinks mw-mwoautherror-details">Unknown URL, <a class="external free", href="https://www.mediawiki.org/wiki/Help:OAuth/Errors#E002">Error: E002</a></span></p>
<p id="mw-returnto">Return to <a href="/wiki/Main_Page" title="Main Page">Main Page</a>.</p>

do we need to display the description of error as well?

DannyS712 moved this task from Others to Reports on the User-DannyS712 board.Nov 18 2019, 10:46 AM

@Nikitrain Are you still working on this? If so (which would be fine), nevermind, if not, I would like to use this task as a Google-Code-in-2019 task? :)

@Florian I'm not currently working on this. You may use this as a Gooogle-code-in task. :)

Change 561366 had a related patch set uploaded (by BrandonXLF; owner: BrandonXLF):
[mediawiki/extensions/OAuth@master] Parse error E002 error link

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

Change 561366 merged by jenkins-bot:
[mediawiki/extensions/OAuth@master] Parse error E002 error link

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

Ammarpad closed this task as Resolved.Jan 4 2020, 9:19 AM