Page MenuHomePhabricator

Support interwiki links for new Newsletter issues
Open, LowPublic

Description

T110645: Interwiki support for Newsletter extension implies several pieces. Probably the first one (and simplest?) to be addressed is the possibility to use interwiki links when announcing new issues.

Currently new issues can only point to wiki pages in the same wiki where the Newsletter extension is enabled. It is easy to imagine newsletters where having the freedom to link to pages in Meta, Commons, phabricator tasks via phab:...

VisualEditor already offers this when linking to a page. The deal is that when defining an interwiki link, no type-ahead or verification of such link is offered. That's fine, and much better compared to the limitation of posting in a single wiki. Maybe we could simply copy that behavior?

It is worth noting that VisualEditor also allows to link to a non-exiting page (Newsletter does not at the moment). The link appears in red, but it can be used. In the case of Newsletter it is probably better to keep the requirement for an existing page in the same wiki, unless an interwiki link is used. However, if the price of interwiki links would be to remove this requirement... so be it?

See also

Details

Related Gerrit Patches:
mediawiki/extensions/Newsletter : masterAllow interwiki links for newsletter issues

Event Timeline

Qgil created this task.Aug 31 2017, 10:03 AM
Qgil raised the priority of this task from Normal to High.Sep 6 2017, 8:49 PM

The two first requests received today expected the ability to announce pages in Meta (m:), Phabricator (phab:) or Hebrew Wikipedia (he:).

I won't be surprised if this request keeps coming. I am increasing the priority at least to agree on a solution and to have an idea about the complexity of the implementation.

QuimGil added a subscriber: QuimGil.EditedOct 6 2017, 12:14 PM

How hard would it be to whitelist phab:?

Or... maybe the question is simply how hard would it be to whitelist *:?

Alright - one way to fix this would be to define a separate text field for Newsletter extension which ignores any titles that has a <> : <> I dont know how exactly feasible this is (like should we validate if the left is a valid interwiki ? How to do that ? @Bawolff @Addshore might know this ?

As suggested in the description, why not emulate how VisualEditor handles links? The "Search" tab for MediaWiki and interwiki pages only, not the external links.

I wonder whether VisualEditor's code for this could be (partially) reusable. I don't think we need to reinvent anything since the purpose is the same: link to a page in the local wiki or the wiki farm.

I wanted to send a message referring to a page on Meta and I've been blocked by that missing feature. I hope that interwiki feature to be done soon! :)

01tonythomas added a comment.EditedJul 19 2018, 1:58 PM

Initial impression: If we are supporting interwiki links, we need the following changes:

  • Store interwiki links somehow in nl_newsletters. Right now we store nl_id. Probably we store the whole title name then ? 🤔 (also, this needs to be done for all newsletters). This might need migration changes as it cannot be empty for existing deployments.
  • Modfily newsletter contenthandler to add the whole title as well.
  • API edits ? Needs changes on DataUpdate
  • Validation changes (fail only if not interwiki link, etc).

argh, btw I just found that the task only talks about new Newsletters issues (and not newsletters by itself). So I think we will have the same as above on nl_issues. No changes to contentHandler etc.

So I just thought about it - and found that we are not really using the issue id for anything else at this point. This would mean that I can safely implement the feature without affecting migrations, even though I would get the desired:

the first issue has an interwiki issue page.

Notifications are maybe the only thing that worries me a little. Right now on local, it redirects me to the page on my local language.

Change 446832 had a related patch set uploaded (by 01tonythomas; owner: 01tonythomas):
[mediawiki/extensions/Newsletter@master] Allow interwiki links for newsletter issues

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

01tonythomas lowered the priority of this task from High to Low.Oct 28 2018, 3:09 PM