https://bugzilla.wikimedia.org/show_bug.cgi?id=69146

            Bug ID: 69146
           Summary: Validation error for
                    'echo-category-title-flow-discussion': not a valid
                    preference
           Product: MediaWiki extensions
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: Unprioritized
         Component: Echo
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected], [email protected],
                    [email protected], [email protected]
       Web browser: ---
   Mobile Platform: ---

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).

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to