Page MenuHomePhabricator

CX2: Communicate that publishing is only allowed to experienced editors
Closed, ResolvedPublic

Description

On some wikis, such as English Wikipedia, edit filters have been defined to allow only advanced users to create translations with Content Translation. In the case of English Wikipedia, the filter allows only to publish to extended-autoconfirmed users (those with more than 500 edits and 30 days since they created their account).

Since new editors get confused by this limitation, we want to communicate better the issue, following the general approach for communicating errors and warnings (T189488). In this case, this will be presented as an error, since it prevents publishing, as illustrated below:

CX-error-blocked.png (720×1 px, 226 KB)
CX-error-blocked-details.png (720×1 px, 271 KB)

Trigger
Ideally we'd like to surface this as early as possible (when the user starts the translation). However, we may not be aware of the issue with the edit filter until the user tries to publish.

Information
For the issue summary:

Your translation cannot be published because publishing is only allowed to more experienced editors on English Wikipedia.

For the issue card:

Publishing only allowed to experienced users
This community decided to limit the publication of translations only to experienced editors.
You cannot publish this translation until you get more experience editing in this wiki, but you can:

  • Publish your translation as a draft, and use the regular edit tools later for article creation.
  • Translate this article into a different language without this limitation.
  • A "Learn more" link will point to a relevant page with relevant information. this could be the Wikipedia equivalent of CX page, or a documentation page in Mediawiki.
  • An option to "Set to publish as a draft" will change the publishing options to select the draft namespace as the target for the publication. Once the change is made, a tooltip will inform the user about the change, pointing to the publish settings icon in order to let the user know where such changes can be made. this is illustrated below:

CX-error-blocked-details-confirmation.png (720×1 px, 240 KB)


A pre-requisite is for the issue system to support issues that are not connected with a specific section of the document (T197227).
Backwards support for version 1 described in T194147

Related Objects

Event Timeline

Pginer-WMF created this task.

Currently certain wikis define abuse filters to detect publishing using Content Translation and prevent the action for certain groups of users (without experience).

To communicate the rule, enwiki changed the message displayed on top of Content Translation page. The solution we should strive for should absolutely not wait for user to fail publishing before determining that publishing to main namespace is not permitted.
Currently, when publishing fails, we get error message saying that some abuse filter is hit, and display the filter's name as additional info. That makes most of the users clueless about what went wrong and we got various reports from confused users.

Therefore, it's priority to show this as soon as translation view loads, and quite probably ship this info from the server when request for page comes. To know early if user can publish to main namespace, we can accept the current misuse of abuse filters and try figuring out that publishing will be prevented. Using API to query abuse filters isn't very versatile and we could get list of existing filters (which can be huge) and search some patterns. That isn't very helpful. Even if we could know and get specific filter that blocks publishing in main namespace, there is configurable permission (restriction) to query filters using API or to view them on Special:AbuseFilter.

Since, querying of filters is out of the window, we have two possibilities that come to mind:

  1. Keep some list of wikis that have such abuse filters defined, with possible ways to determine if the restriction is still there.
  2. Introduce per-wiki configuration to define the requirements needed to publish to main namespace.

First option has potential maintenance costs, isn't very semantic and not aligned to our ways of doing things, as it's sneaky and not really transparent. It has only one advantage, because it doesn't have the flaw that option 2) has - that introducing such config will make other communities want to restrict users from publishing to main namespace. That disadvantage can be mitigated if we have positive info to display about how Content Translation improves the quality of pages and that pages created by certain groups of users aren't getting deleted.

Having option (2) as sole survivor of this analysis, here are some details about the implementation plan:
New config structure similar to this will be created:

CXPublishRequirement: {
    'group': 'extendedconfirmed'
}

This structure will allow other requirement to be added in the future. extendedconfirmed will not be the default requirement, this is only illustrating structure.
User's rights to publish will be checked and sent to the client where the issue card can be displayed immediately. If user does not have the rights, publishing to main space will not be possible, because "Publish" button will be disabled and only enabled when namespace is changed.

Ideally, after wikis define these rules, message overrides and abuse filters will be removed, although it doesn't really matter since publishing won't be possible through the UI.

Change 453482 had a related patch set uploaded (by Petar.petkovic; owner: Petar.petkovic):
[mediawiki/extensions/ContentTranslation@master] Introduce publish requirements config

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

@Petar.petkovic, based on a recent design review there was a proposal for updating the message of the issue card. Since the new messaging includes bullet points (which may add some complexity), and the ticket is already in progress, I wanted to check with you if it is ok to update the description with the updated message or it is preferred to create a separate ticket.
The proposed message is shown below:

Publishing only allowed to experienced users
This community decided to limit the publication of translations only to experienced editors.
You cannot publish this translation until you get more experience editing in this wiki, but you can:

  • Publish your translation as a draft, and use the regular edit tools later for article creation.
  • Translate this article into a different language without this limitation.

CX-error-blocked-details.png (720×1 px, 271 KB)

@Petar.petkovic, based on a recent design review, there was a proposal for updating the message of the issue card. Since the new messaging includes bullet points (which may add some complexity), and the ticket is already in progress, I wanted to check with you if it is ok to update the description with the updated message or it is preferred to create a separate ticket.

It is OK to update the description of this ticket, there is no need to create a new one.

@Petar.petkovic, based on a recent design review, there was a proposal for updating the message of the issue card. Since the new messaging includes bullet points (which may add some complexity), and the ticket is already in progress, I wanted to check with you if it is ok to update the description with the updated message or it is preferred to create a separate ticket.

It is OK to update the description of this ticket, there is no need to create a new one.

Great, thanks. Ticket updated!

Change 485188 had a related patch set uploaded (by Petar.petkovic; owner: Petar.petkovic):
[mediawiki/extensions/ContentTranslation@master] Implement way to resolve 'cannot-publish' issue

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

Change 488255 had a related patch set uploaded (by Petar.petkovic; owner: Petar.petkovic):
[mediawiki/extensions/ContentTranslation@master] Replace 'clear' icon with 'close' icon for message widget

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

Change 488255 merged by Nikerabbit:
[mediawiki/extensions/ContentTranslation@master] Replace 'clear' icon with 'close' icon for message widget

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

Change 453482 merged by jenkins-bot:
[mediawiki/extensions/ContentTranslation@master] Introduce publish requirements config

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

Change 485188 merged by jenkins-bot:
[mediawiki/extensions/ContentTranslation@master] Implement way to resolve 'cannot-publish' issue

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

Making a test translation on CX2-Testing from English to Spanish, the error message is shown (although publishing is possible):

Screenshot 2019-02-28 at 15.36.46.png (408×1 px, 95 KB)

I don't know what this implies for production, but the ideal state would be to show the message only when publishing to the affected wikis. For the test server, showing the message when English is the target language could be acceptable (even if the publication does not really happen in the real English Wikipedia), but it is unexpected to see it in Spanish since Spanish Wikipedia does not have such restrictions.

We may also want to make sure that Simple English and English are properly distinguished (i.e., not showing the message in Simple English Wikipedia for a limitation applied to English Wikipedia)

Change 493428 had a related patch set uploaded (by Petar.petkovic; owner: Petar.petkovic):
[mediawiki/extensions/ContentTranslation@master] Fix index condition for array traversal

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

Making a test translation on CX2-Testing from English to Spanish, the error message is shown (although publishing is possible):

Screenshot 2019-02-28 at 15.36.46.png (408×1 px, 95 KB)

I don't know what this implies for production, but the ideal state would be to show the message only when publishing to the affected wikis. For the test server, showing the message when English is the target language could be acceptable (even if the publication does not really happen in the real English Wikipedia), but it is unexpected to see it in Spanish since Spanish Wikipedia does not have such restrictions.

We may also want to make sure that Simple English and English are properly distinguished (i.e., not showing the message in Simple English Wikipedia for a limitation applied to English Wikipedia)

Publishing restrictions are configurable per wiki. Currently, there exists only an option to introduce such restrictions in wiki configuration and no wiki is configured to restrict any users from publishing. The reason you're seeing the error is mistake in code that I made. Provided a patch to fix the issue. Thanks for noticing and reporting.

Change 493428 merged by Nikerabbit:
[mediawiki/extensions/ContentTranslation@master] Fix index condition for array traversal

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

@Petar.petkovic
(1)

Publishing restrictions are configurable per wiki. Currently, there exists only an option to introduce such restrictions in wiki configuration and no wiki is configured to restrict any users from publishing.

In cx2-testing a new user with 0 edits can publish to English and no warning is displayed. How I can see the warning?
(2) The present info message ( for translations to English) - any plans to make it more comprehensible to users?

Screen Shot 2019-03-15 at 3.02.45 PM.png (474×1 px, 74 KB)

@Petar.petkovic
(1)

Publishing restrictions are configurable per wiki. Currently, there exists only an option to introduce such restrictions in wiki configuration and no wiki is configured to restrict any users from publishing.

In cx2-testing a new user with 0 edits can publish to English and no warning is displayed. How I can see the warning?

Currently, no wiki has configuration to add any publishing restrictions for the users. There is a list on T217237 for wikis which are known to have some kind of Abuse Filter restrictions to prevent certain groups of users from publishing to main namespace using Content Translation. Since enwiki is the most prominent one, there is a patch to add configuration to enwiki, which will restrict users who are not in extendedconfirmed user group from publishing to main namespace.
That config cannot be deployed until tested and @KartikMistry will take care of that - T218007.

Meanwhile, only way to test this is in localhost, by adding something like this to your LocalSettings.php:

$wgContentTranslationPublishRequirements = [
    "userGroups" => [ "extendedconfirmed" ]
];

(2) The present info message (for translations to English) - any plans to make it more comprehensible to users?

Screen Shot 2019-03-15 at 3.02.45 PM.png (474×1 px, 74 KB)

With this ticket, we wanted to implement a robust solution for restricting some user groups from publishing to main namespace, which is already practiced by some wikis using Abuse Filters. Since there was no way to configure these restrictions in the past, communities came up with Abuse Filters and accompanied that with custom UI message to communicate that. When we configure enwiki to restrict users who are not in extendedconfirmed user group from publishing to main namespace, the community will maybe remove Abuse Filter and this UI message override which you pointed out in your screenshot.

Thx, @Petar.petkovic - I'll try to test on my local machine

The limitation on publishing in enwiki is applied only to article namespace. Since it's been tested locally, lets mark it's as Resolved unless users feedback would indicate that some improvements are needed.

Re-check for users in Autoconfirmed users, Users group. The users will have the following warnings:

Screen Shot 2019-05-13 at 6.53.18 AM.png (510×1 px, 80 KB)

Clicking on 'View issues':

Screen Shot 2019-05-13 at 6.56.47 AM.png (549×1 px, 166 KB)

Clicking on 'Set to publish as draft':

Screen Shot 2019-05-13 at 6.57.07 AM.png (281×892 px, 57 KB)