Page MenuHomeMiraheze

LocalSettings.php needs to set $wgMinervaEnableSiteNotice=true
Closed, ResolvedPublic

Description

https://github.com/miraheze/mw-config/edit/master/LocalSettings.php needs to
set $wgMinervaEnableSiteNotice=true,
else https://meta.miraheze.org/wiki/FAQ#How_do_I_make_a_notice_appear_at_the_top_of_every_page.3F
will not work for Mobile, (i.e., the majority of users.)

Event Timeline

Jidanni triaged this task as High priority.Jan 4 2020, 01:28
Jidanni created this task.

Done, now you can disable or enable it in ManageWiki. @Jidanni

I looked and looked.
Maybe your change has not propagated yet.
Just where in ManageWiki are you talking about?

I looked and looked.
Maybe your change has not propagated yet.
Just where in ManageWiki are you talking about?

https://meta.miraheze.org/wiki/Special:ManageWiki/settings#mw-section-styling @Jidanni It should work, it may take several minutes.

I think that’s CentralNotice related (note that site notice and central notice are two different things)

The first being core functionality and the later being an extension.

I used this request in Wikimedia Phabricator as an example. But I just saw that apparently it didn't work and they must have used a different attachment and page. I didn't check anymore, you could see it. Or else wait until tomorrow. @Jidanni

@revi seeing as you're the one who opened that assignment, can you contribute to the sitenotice on kowikipedia?

While it is getting fixed, maybe it would be possible for me to use the even fancier method that the the "Miraheze is seeking donations to support a new plan..." message uses, that indeed currently works on both Desktop and Mobile. How would I make one of those? Thanks.

Hispano76 lowered the priority of this task from High to Normal.

Actually, we don't really know the state of all the variables on Wikipedia in their local settings or other Mediawiki namespace files, so there might be some other factors involved. The thing that needs to be done is here on a test account on Miraheze, is a way needs to be figured out to get some user site notice into the mobile version.

Ah ha! Not only
$wgMinervaEnableSiteNotice but also
$wgMFEnableSiteNotice needs to be set to true to make it work!

https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/MobileFrontend/+/123893/1/MobileFrontend.php

wgMFEnableSiteNotice was removed in that patch?

Secondly i see site notices now on mobile (on meta.miraheze.org).

Yes that is the Central Site Notice you are seeing in Meta's Mobile.
Not the site notice a user can set via MediaWiki:Sitenotice .

ohh, well anyways wgMFEnableSiteNotice is not a config (it's no longer used by MF).

Hmmm, the only current matches are:
$ rgrep -l SiteNotice MyHomeWiki
HISTORY
docs/hooks.txt
includes/DefaultSettings.php
includes/skins/Skin.php
includes/skins/SkinApi.php
includes/skins/SkinTemplate.php
skins/MinervaNeue/README.md
skins/MinervaNeue/includes/skins/SkinMinerva.php
skins/MinervaNeue/skin.json

Looking at
https://www.mediawiki.org/wiki/Manual:Interface/Sitenotice
"The CentralNotice extension supersedes all other notices."
So maybe the Central Notice is wiping out the user's MediaWiki:Sitenotice, at least for Mobile.

@Hispano76 Even though this task was closed a few days before, I'm here to clarify and correct this:

I used this request in Wikimedia Phabricator as an example. But I just saw that apparently it didn't work and they must have used a different attachment and page. I didn't check anymore, you could see it. Or else wait until tomorrow. @Jidanni

@revi seeing as you're the one who opened that assignment, can you contribute to the sitenotice on kowikipedia?

미디어위키:Gadget-siteNotice.js page on Korean Wikipedia is not for using as an alternative of $wgMinervaEnableSiteNotice. The purpose of introducing siteNotice gadget is for preventing search engines (especially Google) from crawling the text of notices that results showing the notices' text on search results instead of the page's content.

@Hispano76 Even though this task was closed a few days before, I'm here to clarify and correct this:

I used this request in Wikimedia Phabricator as an example. But I just saw that apparently it didn't work and they must have used a different attachment and page. I didn't check anymore, you could see it. Or else wait until tomorrow. @Jidanni

@revi seeing as you're the one who opened that assignment, can you contribute to the sitenotice on kowikipedia?

미디어위키:Gadget-siteNotice.js page on Korean Wikipedia is not for using as an alternative of $wgMinervaEnableSiteNotice. The purpose of introducing siteNotice gadget is for preventing search engines (especially Google) from crawling the text of notices that results showing the notices' text on search results instead of the page's content.

Thank you very much for the clarification. Not knowing the Korean language makes it difficult for me to understand the gadget. @PlavorSeol