Page MenuHomePhabricator

Restore all default settings (in all sections)" will not opt-out of SD on User talk page
Closed, DeclinedPublic

Description

The issue is present on wikis that still have 'Structured Discussions on user talk' as a beta feature, including betalabs.

On cawiki click "Restore all default settings (in all sections)" All beta features checkboxes become unchecked.
When you check User talk page - it is still in the SD format.

Note: 'Structured Discussions on user talk' feature works when you click/un-click it.

Event Timeline

There are also intermittent errors on SD User talk page (after 'Structured Discussions on user talk' is clicked):
TypeError: Cannot read property 'TourBuilder' of undefined
TypeError: gt.TourBuilder is not a constructor TypeError: gt.TourBuilder is not a constructor

This was fixed in https://gerrit.wikimedia.org/r/#/c/401739/

SBisson renamed this task from [wmf.11-regression] "Restore all default settings (in all sections)" will not opt-out of SD on User talk page to Restore all default settings (in all sections)" will not opt-out of SD on User talk page .Jan 8 2018, 8:16 PM
SBisson claimed this task.
SBisson removed a project: Regression.

In the "how did this ever work?" category.

Patch coming.

Change 403082 had a related patch set uploaded (by Sbisson; owner: Sbisson):
[mediawiki/extensions/Flow@master] Use UserSaveSettings hook for opt in/out of beta feature

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

Change 403082 merged by jenkins-bot:
[mediawiki/extensions/Flow@master] Use UserSaveSettings hook for opt in/out of beta feature

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

I'm not sure it is a good idea to restore the talk page to the initial state. Restoring is a big change that impacts more users only the one restoring the settings: everyone watching the page will see the change. OTOH, I'm not sure about how many people use that feature...

@Trizek-WMF "Restore all default settings (in all sections)" is not used often, afaik. And restoring to default should do just that - restoring to defaults. Since SD on user talk pages is still in beta features, the default format for User talk page is not SD. On the other hand, if some of the beta features may be defaults....

@SBisson - "Restore all default settings (in all sections)" does not convert SD User talk page to wikitext page. In wmf.16 the error page will be displayed (which is un-related to the patch, of course since the patch has not yet deployed) - T184670: [wmf.16-regression] Fatal exception of type "Flow\Exception\InvalidDataException" for opting out from "Structured Discussions on user talk".

Could it be that the betalabs has different configuration for defaults?

@Trizek-WMF "Restore all default settings (in all sections)" is not used often, afaik. And restoring to default should do just that - restoring to defaults. Since SD on user talk pages is still in beta features, the default format for User talk page is not SD. On the other hand, if some of the beta features may be defaults....

Structured discussions is the only Beta feature not to be enabled automatically if you have selected the "Automatically enable all new beta features" option. I was following the idea of that privileged treatment. :)

@Trizek-WMF Regarding the following comment:

I'm not sure it is a good idea to restore the talk page to the initial state.

Actually, it's a really good point. However, even if we decide do not revert a User talk page to non-SD format after 'Restore all default settings...", then the Beta features page should reflect this - the box should still be checked for the feature. Now, it's really confusing for a user - the check box becomes un-checked, but the User talk page is still in SD format.

Good point, which replies to my initial worries. Let's move on following the plan.

I re-checked in betalabs - "Restore all default settings (in all sections)" does not convert SD User talk page to wikitext page. I am moving the task to Blocked, so we can review the issue later.

@gerritbot missed to add https://gerrit.wikimedia.org/r/#/c/416199/ as open patch for review. Probably because I removed as subscriber above. Not sure how only tag Patch-For-Review got through.

Not sure why @gerritbot keeps failing to update this task, but the patch for this was merged a while ago. I uploaded a revert of it today, because it broke things: https://gerrit.wikimedia.org/r/#/c/416199/

Mentioned in SAL (#wikimedia-operations) [2018-03-05T14:36:40Z] <hashar@tin> Started scap: core + Flow, master/replicate race condition - T182358 T184670

Mentioned in SAL (#wikimedia-operations) [2018-03-05T14:41:05Z] <hashar@tin> Finished scap: core + Flow, master/replicate race condition - T182358 T184670 (duration: 04m 24s)

My initial attempt at this task failed because:

  1. The implementation was relying on a Core bug that is now fixed. A different approach would be needed.
  2. A mcr-related Core bug caused the beta feature to be completely broken roughly at the same time, so we were blocked on this task specifically for a while.

@jmatazzoni, given our change of focus, I suggest we send this back to the backlog.

SBisson moved this task from Inbox to Triaged but Future on the Growth-Team board.

The issue is marked as Declined since the current Flow features are in sunsetting mode now. The comment below is added to https://phabricator.wikimedia.org/T354288

Re-checked on cawiki wmf.12 for user Zilant18 (Flow discussion page option is enabled in Preferences - Beta features).
the issue is present on wikis with enabled Flow beta feature - checked testwiki, cawiki, and frwiki

[8bb20b5e-6060-4225-a05e-7cd00c00d2d9] 2024-01-08 23:16:56: Fatal exception of type "TypeError"

Screen Shot 2024-01-08 at 3.14.43 PM.png (686×2 px, 93 KB)

  • 500 error is displayed in the Console

-logstash shows the following error:
TypeError: Return value of Flow\Hooks::isBetaFeatureEnabledInTalkPage() must be of the type bool, null returned

==== Error ====

* mwversion: 1.42.0-wmf.12
* reqId: 8bb20b5e-6060-4225-a05e-7cd00c00d2d9
* [[ https://logstash.wikimedia.org/app/dashboards#/view/AXFV7JE83bOlOASGccsT?_g=(time:(from:'2024-01-07T23:16:56.253Z',to:'2024-01-08T23:29:07.192Z'))&_a=(query:(query_string:(query:'reqId:%228bb20b5e-6060-4225-a05e-7cd00c00d2d9%22'))) | Find reqId in Logstash ]]

```name=normalized_message,lines=10
[{reqId}] {exception_url}   TypeError: Return value of Flow\Hooks::isBetaFeatureEnabledInTalkPage() must be of the type bool, null returned
exception.trace
from /srv/mediawiki/php-1.42.0-wmf.12/extensions/Flow/includes/Hooks.php(1770)
#0 /srv/mediawiki/php-1.42.0-wmf.12/extensions/Flow/includes/Hooks.php(1780): Flow\Hooks->isBetaFeatureEnabledInTalkPage(MediaWiki\User\User)
#1 /srv/mediawiki/php-1.42.0-wmf.12/includes/HookContainer/HookContainer.php(161): Flow\Hooks->onGetBetaFeaturePreferences(MediaWiki\User\User, array)
#2 /srv/mediawiki/php-1.42.0-wmf.12/extensions/BetaFeatures/includes/Hooks/HookRunner.php(28): MediaWiki\HookContainer\HookContainer->run(string, array)
#3 /srv/mediawiki/php-1.42.0-wmf.12/extensions/BetaFeatures/includes/Hooks.php(144): MediaWiki\Extension\BetaFeatures\Hooks\HookRunner->onGetBetaFeaturePreferences(MediaWiki\User\User, array)
#4 /srv/mediawiki/php-1.42.0-wmf.12/includes/HookContainer/HookContainer.php(161): MediaWiki\Extension\BetaFeatures\Hooks->onSaveUserOptions(MediaWiki\User\User, array, array)
#5 /srv/mediawiki/php-1.42.0-wmf.12/includes/HookContainer/HookRunner.php(4385): MediaWiki\HookContainer\HookContainer->run(string, array)
#6 /srv/mediawiki/php-1.42.0-wmf.12/includes/user/Options/UserOptionsManager.php(426): MediaWiki\HookContainer\HookRunner->onSaveUserOptions(MediaWiki\User\User, array, array)
#7 /srv/mediawiki/php-1.42.0-wmf.12/includes/user/User.php(2553): MediaWiki\User\Options\UserOptionsManager->saveOptionsInternal(MediaWiki\User\User, Wikimedia\Rdbms\DBConnRef)
#8 /srv/mediawiki/php-1.42.0-wmf.12/includes/specials/SpecialPreferences.php(184): MediaWiki\User\User->saveSettings()
#9 /srv/mediawiki/php-1.42.0-wmf.12/includes/htmlform/HTMLForm.php(751): MediaWiki\Specials\SpecialPreferences->submitReset(array, OOUIHTMLForm)
#10 /srv/mediawiki/php-1.42.0-wmf.12/includes/htmlform/HTMLForm.php(631): HTMLForm->trySubmit()
#11 /srv/mediawiki/php-1.42.0-wmf.12/includes/htmlform/HTMLForm.php(647): HTMLForm->tryAuthorizedSubmit()
#12 /srv/mediawiki/php-1.42.0-wmf.12/includes/specials/SpecialPreferences.php(174): HTMLForm->show()
#13 /srv/mediawiki/php-1.42.0-wmf.12/includes/specials/SpecialPreferences.php(76): MediaWiki\Specials\SpecialPreferences->showResetForm()
#14 /srv/mediawiki/php-1.42.0-wmf.12/includes/specialpage/SpecialPage.php(727): MediaWiki\Specials\SpecialPreferences->execute(string)
#15 /srv/mediawiki/php-1.42.0-wmf.12/includes/specialpage/SpecialPageFactory.php(1652): MediaWiki\SpecialPage\SpecialPage->run(string)
#16 /srv/mediawiki/php-1.42.0-wmf.12/includes/MediaWiki.php(359): MediaWiki\SpecialPage\SpecialPageFactory->executePath(string, RequestContext)
#17 /srv/mediawiki/php-1.42.0-wmf.12/includes/MediaWiki.php(954): MediaWiki->performRequest()
#18 /srv/mediawiki/php-1.42.0-wmf.12/includes/MediaWiki.php(607): MediaWiki->main()
#19 /srv/mediawiki/php-1.42.0-wmf.12/index.php(50): MediaWiki->run()
#20 /srv/mediawiki/php-1.42.0-wmf.12/index.php(46): wfIndexMain()
#21 /srv/mediawiki/w/index.php(3): require(string)
#22 {main}

frwiki wmf.12 Internal error:
[8dcd781d-ab00-48bc-87de-21e69080187a] 2024-01-08 23:50:10: Erreur fatale de type « TypeError »