Extension talk:Display Title

About this board

Getting displaytitle to affect only the page it is on and nowehre else.

2
50.214.34.193 (talkcontribs)

I am setting up my own fan wiki and I'm running into a frustrating problem. When I use the displaytitle magic word on Foo to display Foo Fighters, anytime I link to page Foo it dispalys as Foo Fighters. I need to disable this so that when I link to a page it uses the actual page name OR whatever text I put in after the pipe. I only what the display title to be changed on the actual page and nowhere else.

Tenor1411

50.214.34.193 (talkcontribs)

Disregard. I was under the delusion that I needed the Extension to change the page name when it's the extension that specifically changes the links.


Tenor1411

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 "..."

How can I get Display Title to act on lower case links

2
Vicarage (talkcontribs)

I'm converting a system with lower case pages names to wikipedia, and the lowercase is fundamental to the design and backward compatibility. So how I ensure the a link to a fan-bay-deep-shelter page displays the Fan Bay Deep Shelter text I put in the DISPLAYTITLE. I'm happy to edit the extension source code.

Vicarage (talkcontribs)
Reply to "How can I get Display Title to act on lower case links"

PersonalUrls Hook is deprecated

1
Summary by Cindy.cicalese

Done in version 3.3.

Proactive programming (talkcontribs)

PersonalUrls Hook has been deprecated in MW 1.39.x LTS. It needs to be changed to SkinTemplateNavigation::Universal.

Summary by Cindy.cicalese

Not an issue.

Physikerwelt (talkcontribs)

Is it possible to also use the DisplayTitle in search results?

Cindy.cicalese (talkcontribs)

I think that used to just work, IIRC. I take it from your question that it does not work (anymore)? Is this with the built-in search or CirrusSearch or something else?

Physikerwelt (talkcontribs)

Sorry it works with no extension as well as with Cirrus Search. I just did not install DisplayTitle correctly in the first place.

Cindy.cicalese (talkcontribs)

That's good news!

Updating Display Titles in links broken since MW 1.35

7
Planetenxin (talkcontribs)

Initial Situation:

  • A page "DT1" with content {{DISPLAYTITLE:Display Title 1}}
  • A second page "DT2", that links to the first page [[DT1]]

Expected Result:

  • On page "DT2" the link is rendered as "Display Title 1" → this works

Steps to reproduce

  • Change content of page "DT1" to {{DISPLAYTITLE:Display Title 2}}
  • Make sure, jobs are run
  • Refresh (F5) page "DT2"

Expected result:

  • On page "DT2" the link is rendered as "Display Title 2" → this fails - page is not updated still showing "Display Title 1"

The above worked with MW 1.31 and DT 2.2.0. For MW 1.35+ no version is updating the links anymore. Manual purging of "DT2" updates the link as expected. To my opinion this need to happen automatically.

Kghbln (talkcontribs)

The wiki was still serving an outdated version with other issues. I just updated it to 3.3, the last version supporting MW 1.35.

I just tested a bit and can confirm that you need to manually purge the pages to update the display title in links.

Cindy.cicalese (talkcontribs)

I confirmed this behavior on MW 1.39 with DisplayTitle 4.0.1. Please feel free to submit a patch that would trigger an update on pages linking the the current page on page save complete - preferably only if the display title changed, but I'm not sure how hard it would be to get access to that state information in the hook.

Planetenxin (talkcontribs)
Cindy.cicalese (talkcontribs)
Cindy.cicalese (talkcontribs)

@Planetenxin@Kghbln Could one or both of you please test/review the patch linked above to determine whether it adequately addresses the issue? I am waiting for review before merging the fix. Thank you.

Kghbln (talkcontribs)

I currently do not have a 1.39 at hand for testing. I will need to update sandbox.s-mw.o soon. It is on my list. Anyhow, I expect Planentenxin to be faster than me.

Reply to "Updating Display Titles in links broken since MW 1.35"
Kghbln (talkcontribs)

Version 3.1 is broken for 1.35.x on PHP 7.4.x since links like [[#Foo|Foo]] are not shown. Updating to the current master fixes this issue. It will be cool to get the 3.2 already announced on Special:Version. Thanks and cheers

Cindy.cicalese (talkcontribs)

I'm working through my backlog of extensions and hope to get to DisplayTitle soon :-)

Kghbln (talkcontribs)

No problem at all. I understand the situation and appreciate your work.

How to fix page header not changing title?

2
Sistema-Jerimum (talkcontribs)

I've had this issue for a few weeks and I'm still not close to figuring out what's wrong. Pages I've used the displaytitle magic word still have the old title in the header. The names change just fine on links so I know it's active.


I cannot delete and just make a page with a different name because old titles are numbered to make it easier for admins.


I use only extensions provided by miraheze so everything should be up to date, if it's an extension that is causing the problem I can't figure out which it is. I ruled out HideTitle and SkinsPerPage.

Before anyone asks: Restrict Display Title is set to false, Allow Display Title is set to true.

Cindy.cicalese (talkcontribs)

The page title is managed by core MediaWiki functionality, not the DisplayTitle extension. If the links are changing, it sounds like the extension is working as designed. I'm not certain without more diagnostics whey the page title would not be updated. Perhaps there is a caching issue. Is it all page titles that are not updated or just some? Does purging the page or doing a null edit help?

Reply to "How to fix page header not changing title?"

Sorting by new title on the categories page

4
Karaby (talkcontribs)

The categories page displays a new title. That's great! But the sorting key remains from the old header (by default). Is it possible to fix this somehow, without setting the sort key?

Example:

On the "Old name" page, we change the title to "{{DISPLAYTITLE:New name}}". This page belongs to the category "Category1". The category page "Category:Category1" displays:

O

* New name

Cindy.cicalese (talkcontribs)

The way to fix this is to set the sort key.

Karaby (talkcontribs)

I know it. But this is inconvenient.

BeaKarnstein (talkcontribs)

Hi! Did you find any way to do it without setting the sort key?

Reply to "Sorting by new title on the categories page"

Link anchors are invisible

8
Summary last edited by Oetterer 07:29, 11 September 2022 1 year ago

There used to be an issue where links to anchors were not visible. This issue has since been resolved with Cicalese' latest patches for MW 1.35, 1.36, and 1.37.


Current master (1bd514b) hides piped anchor links in LTS (1.35).

MoltonMontro (talkcontribs)

Bug occurs while using the MW 1.37 release branch. This issue was not present on the MW 1.35 release branch.

When a link or linked text includes an anchor, this is cut from the displayed linked text. For example, this bug would apply to links such [[#Help]], [[Page#Help]], and [[Page#Help|#Help]]. The first link would result in no link being shown at all, the second would display the linked text as Page, and the third would again be invisible.

Cindy.cicalese (talkcontribs)
Aaditya8851 (talkcontribs)

how to work on this issue , can anyone guide me?

Cindy.cicalese (talkcontribs)

I have a patch prepared to address this already that I will be uploading soon.

Cindy.cicalese (talkcontribs)
Oetterer (talkcontribs)

Hi Cindy.


I checked out master and for me piped anchor links do not show. DisplayTitle's patch 0d941c3 works, but 65c5ac1 breaks it again. I'm currently on LTS (1.35). Non-piped anchor links do show with master, though.

2A02:A45E:6559:1:3447:92FE:1246:C156 (talkcontribs)

I have a similar issue where links of the form [[#Foo bar Baz|Foo bar Baz]] are not shown. For some reason, this only happens when anchor link and link text are exactly the same except for the fragment symbol.

Similar links that show as empty:

[[#Foo_bar_Baz|Foo bar Baz]]

[[#Foo%20bar%20Baz|Foo bar Baz]]

Links that do not show as empty:

[[#Foo bar baz|Foo bar Baz]] (Capitalisation change)

[[#Foo bar Baz|Fo bar Baz]] (Different spelling)

etc.

I am currently on REL1_35 (53260f9c9dae714efde43d91376d22ab4190df76)

Yaron Koren (talkcontribs)

There's a Phabricator bug (with a potential fix) for this issue here.

Reply to "Link anchors are invisible"
Return to "Display Title" page.