Page MenuHomePhabricator

ptwiki: Re-deploy add an image
Closed, ResolvedPublic

Description

On 2022-03-17, add an image was removed from ptwiki (see T302828#7786009 et seq.), because discovered an abusefilter disallows all add an image edits made by the newcomers (see an example). To avoid newcomers being frustrated by their edits not getting published, it was decided to disable add an image, until this issue can be fixed (see the Slack thread for details). We should check with the pt.wiki community about the filter and decide how to fix the issue.

Why are Add an image edits affected by filter 161?

The filter disallows edits having edit summaries that include no-space sequences longer than 20 characters. Because of localized summaries, the filter sees the edit summary as /* growthexperiments-addimage-summary-summary: 1 */, while the history shows Funcionalidade de sugestões de imagens: $1 imagem adicionada. (see relevant system message).

Thanks to the localized edit summaries, Add an image edits match the filter's requirements and are disallowed.

How to fix the filter?

The best option is to ignore edits with localized edit summaries. This can be done by changing the filter's content to:

New proposed filter
!'confirmed' in user_groups & !( summary rlike '(HTTPS?://|\[\[.+\]\]|\.[a-z]{2,3}|^/\* )' | page_prefixedtitle irlike '(?:20 anos/Parabéns)' ) & ( (
	/*
		1 - 30 caracteres ou mais e sem espaço algum
		2 - 20 caracteres seguidos sem espaço, ainda que o sumário tenha espaço no seu decorrer
	*/
	!( summary irlike '\w+:\w+' ) & (
		summary rlike '[^\s\/]{30}'
			| summary rlike '^/\*.+\*/ ?[^\s\/]{20,}$'
			| ( !( summary rlike '[\s\/]' ) & length( summary ) > 20 )
	);
) | (
	/* 	3 - Sem vogal e com oito ou mais letras
		4 - Mesmo caractere repetido quatro ou mais vezes no início ou no fim
	 */
	summary != '' & (
		( summary irlike '^[^aeiou]{8,}$' & !( summary irlike '^/\*.+\*/' ) ) | summary irlike '^/\*.+\*/ ?[^aeiou]{8,}$'
			| ( summary irlike '^([^\s])\1{3,}' | summary irlike '([^\s])\1{3,}$' & !( summary rlike '~~~~' | summary rlike '\.{1,4}' ) )
	);
) );

Event Timeline

I think this change should solve the problem.

Indeed, thank you for changing the filter.

Would it be possible for you to exempt Add a link edits from the filter as well (by adding growthexperiments-addlink-summary-summary)? Add a link is not deployed at pt.wikipedia as of today, but we'd like to have it allowed by the filter regardless, as if/once deployed, they'd face the same problem. Doing it now will help us avoid the same issue re-occuring in the future.

Change 771923 had a related patch set uploaded (by Urbanecm; author: Urbanecm):

[operations/mediawiki-config@master] Revert "ptwiki: Disable Growth's image recommendation"

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

I think this change should solve the problem.

Indeed, thank you for changing the filter.

Would it be possible for you to exempt Add a link edits from the filter as well (by adding growthexperiments-addlink-summary-summary)? Add a link is not deployed at pt.wikipedia as of today, but we'd like to have it allowed by the filter regardless, as if/once deployed, they'd face the same problem. Doing it now will help us avoid the same issue re-occuring in the future.

Done. This should be enough to prevent the filter disallow any edit related to "Growthexperiments" project.

Change 771923 merged by jenkins-bot:

[operations/mediawiki-config@master] Revert "ptwiki: Disable Growth's image recommendation"

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

Mentioned in SAL (#wikimedia-operations) [2022-03-21T13:33:36Z] <lucaswerkmeister-wmde@deploy1002> Synchronized wmf-config/InitialiseSettings.php: Config: [[gerrit:771923|Revert "ptwiki: Disable Growth's image recommendation" (T304095)]] (duration: 00m 49s)

@Etonkovidova @MMiller_WMF The redeployment just happened. Moving to QA, so this can be tested.

I think this change should solve the problem.

Thank you very much for helping there, @Silent!

Etonkovidova claimed this task.

Checked on ptwiki wmf.2 - the tag Sugerida: adicionar imagens has been applied to edits (see Especial:Etiquetas). Also checked the overall Add image workflow.