Last modified: 2013-02-14 14:17:45 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T46948, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 44948 - Navigation Popup gadget should work with language links
Navigation Popup gadget should work with language links
Status: RESOLVED WONTFIX
Product: MediaWiki extensions
Classification: Unclassified
WikidataRepo (Other open bugs)
unspecified
All All
: Unprioritized normal (vote)
: ---
Assigned To: Wikidata bugs
:
Depends on: 44994
Blocks:
  Show dependency treegraph
 
Reported: 2013-02-13 12:43 UTC by Yuri Astrakhan
Modified: 2013-02-14 14:17 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Yuri Astrakhan 2013-02-13 12:43:43 UTC
Navigation Popups gadget does not show any content when pointing to Q link, and it doesn't show anything at all when pointing to a language link. I think it will be far more useful to have a nav popup rather than preview at the bottom of the list.
Comment 1 jeblad 2013-02-14 12:30:23 UTC
This must be fixed by the gadget developers.

For item-links inside an item view the nav popups uses action=raw. This action is disabled in Wikidata.
http://www.wikidata.org/w/index.php?title=Q25306&action=raw&ctype=text/css&maxage=0&smaxage=0 (examplecall)

An alternative is to use action=parse
http://wikidata.org/w/api.php?action=parse&page=Q25306

The reason why nothing shows up in the sitelinks is that CORS is only enabled from the Wikipedia projects and to Wikidata, not the other way around. The later could be useful as it makes it possible to use nav popups in the recent changes feed.
Comment 2 Daniel Kinzler 2013-02-14 13:45:34 UTC
To elaborate on what jeblad said:

Basically, the way that navigation popup is implemented relies on the wikitext returned by the (old, deprecated)  action=raw call. But data items do not have any wikitext. There is nothing to return. This is why calling action=raw will return an error when you try to use it for non-text content. 

Using the API's action=parse (or the old action=render) as jeblad suggested would return the rendered HTML for the data item. The navigation popup gadget would then need to process this to provide a preview.

Closing wontfix, there is nothing we can do about this on the server side.
Comment 3 jeblad 2013-02-14 14:13:33 UTC
Another way to access wikipedia pages is to use the call action=query&prop=extract and use JSONP, then you don't need CORS.
http://en.wikipedia.org/w/api.php?action=query&prop=extracts&exintro&exchars=2000&titles=Oslo
Comment 4 Yuri Astrakhan 2013-02-14 14:17:45 UTC
jeblad, that's an excellent idea, I will pass it on. I still think CORS is needed, as it will allow other creative gadget uses. Thanks!

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links