Page MenuHomePhabricator

reset $wgRestrictDisplayTitle to false and $wgAllowDisplayTitle to true for all wikivoyages
Open, MediumPublicFeature

Description

It looks like some time in the past 36 hours the values for $wgRestrictDisplayTitle and $wgAllowDisplayTitle were changed on English Wikivoyage (see http://en.wikivoyage.org/wiki/Wikivoyage_talk:Banner_Expedition#Not_inhibiting_title). Could these values be reset to:

$wgRestrictDisplayTitle should be false

$wgAllowDisplayTitle should be true

Thanks!


Version: wmf-deployment
Severity: enhancement

Details

Reference
bz49015

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 1:45 AM
bzimport set Reference to bz49015.
bzimport added a subscriber: Unknown Object (MLST).

texuguinho wrote:

It's not only en: either. This change also occurred for Portuguese Wikivoyage, which needs the same fix. I imagine that all language versions were affected.

texuguinho wrote:

I would consider this to be relatively high priority, as it is causing a large number of pages to display titles in duplicate.

Caused by the fix for bug 26547.

Why do you think $wgAllowDisplayTitle has been changed? As far as I can tell that's still true.

On English Wikivoyage (and some other language versions) a template was introduced to suppress the main title display and display the title elsewhere in a page banner. To do so the template uses:

{{DISPLAYTITLE:<span style="display:none">{{FULLPAGENAME}}</span>}}

...which is valid according to method #2 of http://www.mediawiki.org/wiki/Manual:FAQ#How_do_I_hide_the_main_page_title.3F

However, this approach has recently stopped working, and the title is now display at the top of the page and in the banner. Since we can't see config variables, it was assumed that either $wgRestrictDisplayTitle or $wgAllowDisplayTitle had changed. If both of those values are set correctly, is there a reason why hiding the page title no longer works?

(In reply to comment #3)

Caused by the fix for bug 26547.

If I'm understanding that bug correctly, using the approach outlined in http://www.mediawiki.org/wiki/Manual:FAQ#How_do_I_hide_the_main_page_title.3F is no longer a valid way to suppress a page title. Is there an alternative? If not, the fix committed for 26547 seems problematic as it breaks functionality that has been documented as a valid way to suppress a page title.

Note: we could obviously suppress the main page title display via CSS, but that cannot be done on a page-by-page basis without a new page-specific CSS rule for each of the hundreds or thousands of pages updated, unless I'm overlooking something.

This could be worked around using some different CSS-based hacks – e.g. using "position: absolute; top: -9999px" instead of "display: none" – but there's no guarantee this won't stop working either.

It seems like you guys really should have $wgRestrictDisplayTitle set to false and simply use {{DISPLAYTITLE:}} from then on, as the Wikivoyage banners seem to be a valid use case.

(In reply to comment #7)

It seems like you guys really should have $wgRestrictDisplayTitle set to
false
and simply use {{DISPLAYTITLE:}} from then on, as the Wikivoyage banners seem
to be a valid use case.

I might be misunderstanding, but I edited http://en.wikivoyage.org/wiki/Template:Pagebanner and changed:

{{DISPLAYTITLE:<span style="display:none">{{FULLPAGENAME}}</span>}}

...to:

{{DISPLAYTITLE:}}

...but I still saw the top page title on pages with the banner template. Did I do something wrong? Alternately, is there some way to tell whether Wikivoyage currently has $wgRestrictDisplayTitle set to true, which would thus explain why the attempted hack above didn't work?

texuguinho wrote:

DISPLAYTITLE doesn´t currently seem to do anything on pt: either.

That's because $wgRestrictDisplayTitle is and has always been true. It's just that the hack you were using wasn't disallowed when it clearly should be (and now is).

All of the settings can be seen at https://noc.wikimedia.org/conf/ or in the git repositories.

texuguinho wrote:

Maybe Ryan knows, but I don't, so let me ask you, so how do we fix this then? We need the page title to be suppressable by a template, so that the title can be displayed inside the banner only.

singaporemaps wrote:

I've made a separate request to set $wgRestrictDisplayTitle as false for all Wikivoyages at bug 49287.

Given how popular this hack is, perhaps we should introduce a NOTITLE magic word.

To be honest, maybe we should just revert stopping display:none. There are still many ways around it (postition:absolute;top:-500 or display:block;width:0;height:0 or even just color: white. Someone inventive could probably come up with more). However, these alternative approaches become more and more evil, which I don't think we should force people to use. The main point is to avoid tricking people. Since people can only remove letters, the old restrictions more or less accomplishes that.

singaporemaps wrote:

I'm fine with changing $wgRestrictDisplayTitle to false because we did end up discussing a move away from the actual page name (http://en.wikivoyage.org/wiki/Wikivoyage_talk:Banner_Expedition#Hierarchical_Page_Names and http://en.wikivoyage.org/wiki/Southwest_%28United_States_of_America%29 for example). But a default NOTITLE magic word would definitely be so much easier. Perhaps not feasible given the openness of such an approach.

(In reply to comment #13)

Given how popular this hack is, perhaps we should introduce a NOTITLE
magic
word.

To be honest, maybe we should just revert stopping display:none. There are
still many ways around it (postition:absolute;top:-500 or
display:block;width:0;height:0 or even just color: white. Someone inventive
could probably come up with more). However, these alternative approaches
become
more and more evil, which I don't think we should force people to use. The
main
point is to avoid tricking people. Since people can only remove letters, the
old restrictions more or less accomplishes that.

Perhaps not feasible given the openness of such an approach.

What do you mean?

(In reply to comment #13)

Given how popular this hack is, perhaps we should introduce a NOTITLE
magic
word.

To be honest, maybe we should just revert stopping display:none. There are
still many ways around it (postition:absolute;top:-500 or
display:block;width:0;height:0 or even just color: white. Someone inventive
could probably come up with more). However, these alternative approaches
become
more and more evil, which I don't think we should force people to use. The
main
point is to avoid tricking people. Since people can only remove letters, the
old restrictions more or less accomplishes that.

Actually there's a big difference between display: none; and those other ways of hiding characters.

display: none; practically erases it to the point that it doesn't exist nowhere (well except text browsers that no-one notable uses). You can't select it, if you C&P it won't be copied, and screen readers whom won't render the styles you replace the text with won't see the text and will misread the title.

Those other methods don't. They only visually hide it for people only looking at the formatted text. You can select it, if you copy the plaintext the full title text is present, and they will leave screen readers alone (though one specific mac one won't like overflow+height:0; position+clip:rect is the best way to do it) so blind and deaf readers will still hear the correct titles instead of it being mangled.

Broadening the summary and moving to site configuration component.

  • Bug 49287 has been marked as a duplicate of this bug. ***

(This comment was moved from bug 49287 after a mid-air collision.)

There are 14 Wikivoyage projects out there, and you only gained consensus from 5 communities; I think it is a bit… rude to change settings for the remaining 9 projects without asking their opinion.

(In reply to comment #19)

I think it is a bit… rude to change settings for the
remaining 9 projects without asking their opinion.

They probably won't mind, as this doesn't disable or change any features, and doesn't require any action on their part whether they wish to make use of the config change in any way or not.

(Also, Reedy's patch was reverted?)

texuguinho wrote:

Yeah, all versions had the ability to manipulate the title until bug 26547 was "fixed" the other day, whether they knew it or not. I don't think anyone is going to complain about being given back their newly-lost flexibility.

What's the state of this? I see that Reedy reverted himself, but I can't find any justification for him doing so; has the patch broken something, or can we go ahead following comment 22?

Note that for Wikivoyage language versions that needed this functionality we've ended up using Javascript to suppress the page title, but if it ends up that there is a less hacky way to suppress the title it would be appreciated.

tomasz set Security to None.

Is this still an issue, or has it been resolved?

Is this still an issue, or has it been resolved?

I have no idea if the config values were ever changed as I don't think I have access to view that information, but we long ago implemented workarounds to get rid of the duplicate titles on the pages.

Is this still an issue, or has it been resolved?

I have no idea if the config values were ever changed as I don't think I have access to view that information, but we long ago implemented workarounds to get rid of the duplicate titles on the pages.

Config values are at https://phabricator.wikimedia.org/diffusion/OMWC/browse/master/wmf-config/InitialiseSettings.php;52ff96e9ffd5b38e00146e046cb51100e07b11d3$10415 Apparently they are not fixed.

Aklapper changed the subtype of this task from "Task" to "Feature Request".Feb 4 2022, 12:24 PM
Aklapper removed a subscriber: wikibugs-l-list.