Page MenuHomePhabricator

Make MediaWiki:Postedit-confirmation-saved differentiate between public wikis ("Your edit was published") and private wikis ("Your edit was saved")
Closed, ResolvedPublic

Description

On the public projects, what we called "saving" an edit for years was actually "publishing" it. The old "Save" button has been updated to more clearly communicate this reality, but the toaster message doesn't match now.

Current status: You click the "Publish changes" button, and you're told that your edit was "saved".

Goal: If you click a "Publish changes" button, then you should be told that your edit was "published". If you click a "Save changes" button (i.e., on a private wiki), then you should be told that your edit was "saved".

(Kudos to User:Elizium23 for identifying this mismatch at enwiki's VPT.)

Event Timeline

Any update on this, it was apparently a "big deal" to remove all of the "save" verbiage previously, but this toast notification is on every edit.

MediaWiki:Postedit-confirmation-created seems to have the same issue should be "The page has been published."

This is supposed to be fixed by T183901. It indeed seems it probably never worked, because the JS variable (which controls varying the message) is set only on the editpage, not the published/saved page navigated to afterward.

Ammarpad changed the task status from Open to In Progress.Mar 26 2022, 7:43 AM
Ammarpad changed the task status from In Progress to Open.Mar 26 2022, 8:34 AM

MediaWiki:Postedit-confirmation-created seems to have the same issue should be "The page has been published."

"The page has been published" is what I see on enwiki, are you seeing something different? Even for the edit it seems to work correctly for me now.

@Ammarpad that is only because there is a local override on that project.

It looks like T183901 fixed it properly for the visual editor, but not for the old wikitext editor, for two reasons:

  • (per @Ammarpad above) The added code depends on the 'wgEditSubmitButtonLabelPublish' mw.config variable, which isn't set. Confusingly, it is set if VisualEditor is installed, which might explain why no one noticed while testing.
  • The added code doesn't actually run when a message is provided, and it's always provided by the core post-edit code, which doesn't use the correct label. It only runs if use something like mw.hook( 'postEdit' ).fire() in JS code, it's possible that folks only tested by running that in the browser console.

Change 773941 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[mediawiki/core@master] Fix core post-edit notif to use the correct "published"/"saved" message

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

Change 773941 merged by jenkins-bot:

[mediawiki/core@master] Fix core post-edit notif to use the correct "published"/"saved" message

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

Goal accomplished. Buttons and their corresponding toaster messages clearly communicate reality. See:

Screenshot 2022-04-06 at 18.07.56.png (288×2 px, 49 KB)

Screenshot 2022-04-06 at 18.08.12.png (414×2 px, 108 KB)

Screenshot 2022-04-06 at 18.08.56.png (802×1 px, 210 KB)

Screenshot 2022-04-06 at 18.09.08.png (422×2 px, 78 KB)