Page MenuHomePhabricator

Hovercards makes needless API requests with empty titles params
Closed, ResolvedPublic

Description

Visit https://www.mediawiki.org/wiki/Talk:Sandbox, open your browser's development tools > Net panel, then mouse over the links in the informational header.

Notice that popups makes API requests to query extracts|pageimages|revisions|info for these hyperlinks. But the titles parameter is empty, so obviously the API returns nothing.

resources/ext.popups.renderer.article.js should return early if link.data( 'title' ) is empty. And if there's no data('title') then article.init() shouldn't be called in the first place. It seems mw.popups.selectPopupElements() is trying to filter out blank titles.


Version: master
Severity: normal

Details

Reference
bz67728

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 3:30 AM
bzimport added a project: Page-Previews.
bzimport set Reference to bz67728.
bzimport added a subscriber: Unknown Object (MLST).

This would already significantly reduce that: https://gerrit.wikimedia.org/r/#/c/134268/

But popups extension seems to have a lack of contributors, this one is in a state where both I and Prtksxna have contributed and thus don't want to self merge and that sort of leaves it dead in the water.

Change 134268 had a related patch set uploaded by TheDJ:
Handle links with empty or no title attributes

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

Change 134268 merged by jenkins-bot:
Handle links with empty or no title attributes

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