Last modified: 2014-05-09 19:51:10 UTC
On en beta, visit preferences and then hover over the link _Restore all default settings (in all sections)_ JS console reports an error TypeError: page.revisions is undefined it's coming from line 98 in ext.popups.core.js in curRequest.done timestamp = new Date( page.revisions[ 0 ].timestamp ), the API request I think it's handling is http://en.wikipedia.beta.wmflabs.org/w/api.php?action=query&format=json&prop=extracts|pageimages|revisions|info&redirects=true&exintro=true&exsentences=2&explaintext=true&piprop=thumbnail&pithumbsize=300&rvprop=timestamp&inprop=watched&indexpageids=true&titles=Special%3APreferences%2Freset which returns only {"query":{\ "pageids":["-1"], "pages":{"-1":{"ns":-1,"title":"Special:Preferences/reset","special":""}}} } 1. There's no page.revisions for a Special page, so error. Test before accessing nested keys. 2. It seems the code should give up before this anyway, since page.extract and page.thumbnail are both undefined. That would avoid showing empty popups with a timestamp. 3. This gets through the popup link tests around line 516 because the link is to /wiki/Special:Preferences/reset, so no "#" or "?. There are other special page links that would pass this. Maybe the code should test if the namespace of the page is -1.
There are patches that fix this awaiting review: https://gerrit.wikimedia.org/r/#/c/127889/ https://gerrit.wikimedia.org/r/#/c/129402/