Page MenuHomePhabricator

Can't use ContentTranslation while a user is partially blocked
Closed, ResolvedPublicBUG REPORT

Description

  • (You needed to get a partial blocks first)
  • go to Special:ContentTranslation and try to translate a page

What happens?:
It throw "Unable to fetch machine translation token."

image.png (133×1 px, 14 KB)

Console log throw error:

image.png (201×468 px, 16 KB)

What should have happened instead?:
It should only throw when you try to post the edit where you blocked.

Event Timeline

santhosh triaged this task as Medium priority.Jul 13 2021, 6:08 AM

Change 704272 had a related patch set uploaded (by Santhosh; author: Santhosh):

[mediawiki/extensions/ContentTranslation@master] Check site wide block instead of generic user's block

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

Change 704272 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] Check site wide block instead of generic user's block

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

Reedy renamed this task from Can't using ContentTranslation while got a partial blocks to Can't use ContentTranslation while a user is partially blocked.Jul 13 2021, 11:44 AM
Jpita added subscribers: Pginer-WMF, Jpita.

@Pginer-WMF

  • how do I get my user blocked?
  • what should happen when I try to translate a page?

I'm not very familiar with this ticket. I'll share what I know about these questions but @santhosh may be able to share more details.

  • how do I get my user blocked?

Partial blocks
is a new system that allows to block users with more granularity. for example, blocking them to edit on a specific controversial page but letting them continue to do productive contributions they may do elsewhere. I think partial blocks can be created from the Special:Block page on the given wiki, but I don't know which permissions you need to access it.

  • what should happen when I try to translate a page?

i think the issue was that a user partially blocked was not able to get the initial machine translation. A user partially blocked, let's say unable to edit page X, should be able to get the initial machine translation for all kinds of page (X or others). Regarding publishing, no special behaviour compared to creating a page with the default editor: the user should not be able to publish a translation for X, but should be able to do so for other pages.

Partial blocks don't require any special permissions than regular old blocking. You need to be an admin on the project to be able to block someone.

can someone block user https://en.wikipedia.org/wiki/User:T286530blocking or tell me how I can do it?

@KartikMistry may be able to help for users in the test instance.

can someone block user https://en.wikipedia.org/wiki/User:T286530blocking or tell me how I can do it?

@KartikMistry may be able to help for users in the test instance.

production will be fine as well

can someone block user https://en.wikipedia.org/wiki/User:T286530blocking or tell me how I can do it?

@KartikMistry may be able to help for users in the test instance.

@Jpita You can now test this on https://language-cx.wmcloud.org/index.php/T286530 using user T286530blocking. See: https://language-cx.wmcloud.org/index.php/Special:BlockList too. I'll send credential in private message.

can someone block user https://en.wikipedia.org/wiki/User:T286530blocking or tell me how I can do it?

@KartikMistry may be able to help for users in the test instance.

@Jpita You can now test this on https://language-cx.wmcloud.org/index.php/T286530 using user T286530blocking. See: https://language-cx.wmcloud.org/index.php/Special:BlockList too. I'll send credential in private message.

Thanks @KartikMistry!

Presently when attempting to publish a translation, the following error is displayed for all users:

Unknown unrecoverable error has occurred. Error details: Error converting HTML to wikitext: docserver-http: HTTP 404: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>404 Not Found</title> </head><body> <h1>Not Found</h1> <p>The requested URL was not found on this server.</p> <hr> <address>Apache/2.4.48 (Debian) Server at language-cx.wmcloud.org Port 80</address> </body></html>

Screen Shot 2021-11-21 at 9.19.28 PM.png (902×2 px, 236 KB)

Thanks @KartikMistry!

Presently when attempting to publish a translation, the following error is displayed for all users:

Unknown unrecoverable error has occurred. Error details: Error converting HTML to wikitext: docserver-http: HTTP 404: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>404 Not Found</title> </head><body> <h1>Not Found</h1> <p>The requested URL was not found on this server.</p> <hr> <address>Apache/2.4.48 (Debian) Server at language-cx.wmcloud.org Port 80</address> </body></html>

Screen Shot 2021-11-21 at 9.19.28 PM.png (902×2 px, 236 KB)

Fixed. Please test and let me know.

Etonkovidova claimed this task.

Thanks @KartikMistry!

Presently when attempting to publish a translation, the following error is displayed for all users:

Unknown unrecoverable error has occurred. Error details: Error converting HTML to wikitext: docserver-http: HTTP 404: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>404 Not Found</title> </head><body> <h1>Not Found</h1> <p>The requested URL was not found on this server.</p> <hr> <address>Apache/2.4.48 (Debian) Server at language-cx.wmcloud.org Port 80</address> </body></html>

Screen Shot 2021-11-21 at 9.19.28 PM.png (902×2 px, 236 KB)

Fixed. Please test and let me know.

Thanks, @KartikMistry! Checked - a partially blocked user ([[ e.g. https://language-cx.wmcloud.org/index.php/Special:Log?type=block&user=&page=T286530blocking+&wpdate=&tagfilter=&wpfilters%5B%5D=newusers | T286530blocking]]) can successfully publish a translation in Draft namespace.

I'm tentatively marking this task as Resolved (pinging @Sunny00217 - it'd be great if you could check it in production).