Page MenuHomePhabricator

Can't locally disable live preview
Closed, InvalidPublicBUG REPORT

Description

Steps to replicate the issue:

  • In GlobalPreferences, enable "Show preview without reloading the page" and click Save
  • In Preferences, uncheck "Show preview without reloading the page" after checking "Set a local exception for this global preference" below it, and click Save
  • Start editing a page and click "Show diff" or "Show preview"

What happens?:
The preview or diff appears without reloading the page (i.e. live preview is on).

What should have happened instead?:
Clicking the button navigates to a new page (live preview is off).

Other information:
mw.user.options.get('uselivepreview') is set to the expected 0, but the module mediawiki.action.edit.preview is nonetheless loaded. This suggests $this->userOptionsLookup->getOption( $user, 'uselivepreview' ) here is not working as expected.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
TheresNoTime subscribed.

Hey @Nardog — which wiki did you see this behaviour on?
I've attempted to replicate per the below steps locally, on the beta cluster and on test.wikipedia and it appears to be behaving as expected.
Could you confirm you're still seeing the issue, as in the meantime something may have changed.

Replication attempt steps

  1. I went to my Global Preferences, and enabled "Show preview without reloading the page". I clicked save.
  2. I navigated to my sandbox, clicked edit, and clicked "Preview".
  3. I noted that the preview appears without reloading the page. [expected behaviour]
  4. I went to my (Local) Preferences, clicked "Set a local exception for this global preference" and then disabled "Show preview without reloading the page". I clicked save.
  5. I navigated to my sandbox, clicked edit, and clicked "Preview"
  6. I noted that the page navigated to the preview. [expected behaviour]

My bad, my prototype for T136907 was loading the module. Not reproducible with safemode=1. Apologies for taking your time 😳