Page MenuHomePhabricator

Validation error for 'echo-subscriptions-email-flow-discussion': not a valid preference
Closed, ResolvedPublic

Description

For some reason Echo (Flow?) doesn't let me enable/disable email notifications using API. Here is a small JS code which works fine for other preferences (tested in the console of Google Chrome 36, on MetaWiki):

( new mw.Api() ).get( {
	action: 'tokens',
	type: 'options'
} )
.done( function ( data ) {
	( new mw.Api() ).post( {
		action: 'options',
		change: 'echo-subscriptions-email-flow-discussion=false',
		token: data.tokens.optionstoken
	} ) 
	.done( function ( data ) {
		console.log( data.warnings && data.warnings.options );
	} );
} );

I tried using "1", "true" and the empty string instead of "false". The result is always the same:

Object {*: "Validation error for 'echo-category-title-flow-discussion': not a valid preference"}

On the other hand, mw.user.options.get( 'echo-subscriptions-email-flow-discussion' ) returns the string "1" or the boolean false depending on the state of the check box in my preferences. The problem is just not being able to change that value using the API. The same code works fine if I try to set e.g. "language=fr" (from core) or "betafeatures-vector-compact-personal-bar=0" (from another extension).


Version: unspecified
Severity: normal
See Also:

Details

Reference
bz69146

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 3:37 AM
bzimport added a project: Notifications.
bzimport set Reference to bz69146.
bzimport added a subscriber: Unknown Object (MLST).
He7d3r created this task.Aug 5 2014, 3:29 PM

bsitu wrote:

'echo-category-title-flow-discussion' is not a preference, it's just a i18n key for the 'Flow' label

He7d3r added a comment.Aug 5 2014, 8:12 PM

Sorry, I copied the wrong string. The problem is still the same if I use the correct keys which appear in http://meta.wikimedia.org/w/api.php?action=query&meta=userinfo&format=jsonfm&uiprop=options
{ *: "Validation error for 'echo-subscriptions-email-flow-discussion': not a valid preference" }

Change 151972 had a related patch set uploaded by Bsitu:
$checkmatrixOptions has an extra '-' in the key

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

Change 151972 merged by jenkins-bot:
Followup I4049b666: "Removing prefix exception for HTMLCheckMatrix"

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

All patches mentioned in this report were merged or abandoned - is there more work left to do here (if yes: please reset the bug report status to NEW or ASSIGNED), or can you close this ticket as RESOLVED FIXED?

matthiasmullie closed this task as Resolved.Dec 10 2014, 4:30 PM
matthiasmullie set Security to None.
He7d3r updated the task description. (Show Details)Apr 20 2015, 2:48 PM
Restricted Application added a project: Collaboration-Team-Triage. · View Herald TranscriptApr 20 2015, 2:48 PM
He7d3r updated the task description. (Show Details)Apr 20 2015, 2:51 PM