Last modified: 2014-11-12 14:49:20 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T71146, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 69146 - Validation error for 'echo-subscriptions-email-flow-discussion': not a valid preference
Validation error for 'echo-subscriptions-email-flow-discussion': not a valid ...
Status: PATCH_TO_REVIEW
Product: MediaWiki extensions
Classification: Unclassified
Echo (Other open bugs)
unspecified
All All
: Unprioritized normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-08-05 15:29 UTC by Helder
Modified: 2014-11-12 14:49 UTC (History)
7 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Helder 2014-08-05 15:29:08 UTC
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-category-title-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).
Comment 1 bsitu 2014-08-05 19:04:18 UTC
'echo-category-title-flow-discussion' is not a preference, it's just a i18n key for the 'Flow' label
Comment 2 Helder 2014-08-05 20:12:24 UTC
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" }
Comment 3 Gerrit Notification Bot 2014-08-05 21:32:52 UTC
Change 151972 had a related patch set uploaded by Bsitu:
$checkmatrixOptions has an extra '-' in the key

https://gerrit.wikimedia.org/r/151972
Comment 4 Gerrit Notification Bot 2014-08-14 12:51:31 UTC
Change 151972 merged by jenkins-bot:
Followup I4049b666: "Removing prefix exception for HTMLCheckMatrix"

https://gerrit.wikimedia.org/r/151972
Comment 5 Andre Klapper 2014-11-12 14:49:20 UTC
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?

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links