Page MenuHomePhabricator

Sometimes URL Shortener shows two, duplicated "Shortened URL" boxes
Closed, ResolvedPublic

Description

Hello,

Sometimes Special:UrlShortener duplicate "Shortened URL" box (See the image)

capture-20210112-181636.png (423×816 px, 25 KB)

Reproduce

Event Timeline

I can't reproduce it and thus I have no idea how to fix it :(

Adding @Esanders who might have some ideas as he wrote most of that code.

I can't reproduce it and thus I have no idea how to fix it :(

Hello @Ladsgroup, see this video please, as it show that I can reproduce it with repeated attempts (F5 between each attempt).

Aklapper renamed this task from URL Shortener duplicate "Shortened URL" box to Sometimes URL Shortener shows two, duplicated "Shortened URL" boxes.Jan 24 2021, 9:43 PM

This could happen if you post once before the JS loads, giving you a server side generated results page. Then when that page loads you post with JS, which adds another result widget to the page.

Change 658349 had a related patch set uploaded (by Esanders; owner: Esanders):
[mediawiki/extensions/UrlShortener@master] Avoid duplicate result widget

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

Change 658349 merged by jenkins-bot:
[mediawiki/extensions/UrlShortener@master] Avoid duplicate result widget

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