Topic on Extension talk:Display Title

Suppress Warning: Display title "..." overrides earlier display title "...

7
DesignerThan (talkcontribs)

Hello, we have a translated wiki, where we override the pagetitles. The problem is that due to the translation's the Pagetitle's are already overriden so the wiki show's the following warning: "Warning: Display title ... overrides earlier display title ... ." For the normal DISPLAYTITLE Magicword, there is the argument noerror is there something similar for this extension? Or a way to suppress the warning?

Thank you for every help possible. [that is an example page]

DesignerThan (talkcontribs)

There is no warning anymore on our wiki, because we changed the core code of the wiki, but although that, a real solution would be nice.

Cindy.cicalese (talkcontribs)

To clarify, are you using the Lua functionality of the extension to set the value of the display title? I believe that is the only way you could get that error. Could you please share what change you made to make the error go away? Also, what versions of MediaWiki and DisplayTitle are you using?

DesignerThan (talkcontribs)

MW Version 1.35 and DisplayTitle is 2.2.0

Correct, I am using the Lua functionality and I think the warning can occure also by using the parser function, because there is documentation about it on other wiki's including wikipedia if I remember correctly.

We changed an if statement in the core of mediawiki so it just doesn't throw that error. It is in the file includes/parser/CoreParserFunctions.php somewhere around line number 456.

Devaroo (talkcontribs)

Hey @Cindy.cicalese, I also have this issue. Wrapping {{DISPLAYTITLE:...}} in <translate> tags and translating the display title works as expected inasmuch as the translated page shows the translated display title. However the page also shows the error message that OP mentioned: "Warning: Display title "Translated Title" overrides earlier display title "Original Title".


MediaWiki: 1.39.5

DisplayTitle: 4.0.2

Translate: 2023-07-10

193.170.253.73 (talkcontribs)

I am also facing the same issue. Is there any work arround?

DesignerThan (talkcontribs)

We had the same issue and the only way we found was editing the core file CoreParserFunctions.php There is a line where it checks if the text is old and we changed the if statement so it always skips.

The original line:

if ( $old !== false && $old !== $text && !$arg ) {

The new line:

if ( 0 && $old !== false && $old !== $text && !$arg ) {

That is the only way we have found and I would be careful with it, as it brings many other issues with it.

Reply to "Suppress Warning: Display title "..." overrides earlier display title "..."