Page MenuHomePhabricator

Display Title on Redirected Pages
Closed, DeclinedPublicBUG REPORT

Description

Hi, I've just downloaded the latest version of DisplayTitle, used on MediaWiki installation 1.36.1 via XAMPP on a Windows 10 64-bit machine. The extension works perfectly, with one odd exception. Any links created prior to installation of the app, leading to a redirect page that redirects to a category page, appear as a link including the Category: namespace in the text.

For example, assume the following sentence is in my main page, with the word "dolor" being a link to a redirect page called "dolor" (without DisplayTitle on the page) which redirects to "Category:dolor".

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

After installing DisplayTItle, I modify "Category:dolor" using a DisplayTitle magic word (e.g. DISPLAYTITLE:dolor), and the title of the Category page does appear to be only "dolor". However, what I see on the main page is still:

Lorem ipsum Category:dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua

If I open the page as if to edit it, and save it immediately (without necessarily having to actually edit it), the link no longer appears as Category:dolor* and goes back to the correct dolor**.

However, for obvious reasons, it will be cumbersome to manually update every page with a redirect to a category (I have several such pages). I have tried to restart the server, and purge the cache of my browser, but it hasn't changed anything. I'm a bit concerned about using refreshLinks, because I don't know if it will fix the issue and, since this is on a XAMPP installation, I have a small concern that it may somehow cause issues with running MediaWiki afterwards. Is there anything else I can do?

Event Timeline

Hi @XarHD, thanks for taking the time to report this and welcome to Wikimedia Phabricator! For future reference, please use either the bug report form or feature request form (linked from the top of the task creation page) and the template. Is this a feature request or is ths a bug report?

Hi @Aklapper , thank you for the quick reply! Based on the intended behavior of the extension towards pages with a redirect, this should be a bug report.

@XarHD: Thanks. In that case, could you please provide 1) clear steps to reproduce as a list of steps, 2) expected outcome, 3) actual outcome, 4) software versions of MediaWiki and the extensions, in separate sections? Thanks.

No problem!

  1. Fresh install of MediaWiki via XAMPP as a personal server. Installed DisplayTitle extension following the instructions on this page: https://www.mediawiki.org/wiki/Extension:Display_Title. For configuration:, I set the following parameters in the LocalSettings file of MediaWiki:

$wgAllowDisplayTitle = true; defaults to true
$wgRestrictDisplayTitle = false;
defaults to true

I did NOT edit the system messages listed under the heading, "Display title on edit pages and edit links" on the link above.

  1. The expected outcome as per the MediaWiki link to the extension, above, would be that because the page the Redirect points to has had its name changed with DISPLAYTITLE, the link from source to redirect should have the DISPLAYTITLE name of the destination page, not its original name (in other words, the link should appear as dolor in the source page, not Category:dolor).
  1. The actual outcome is that, every time I open any page where there is a link to a redirect page which redirects to a Category page, even if I have used the DISPLAYTITLE magic word to change that category page's name (by removing the namespace), the link to the redirect page will appear with the Category: namespace.

For example, assume the following sentence is in my main page, with the word "dolor" being a link to a redirect page called "dolor" (without DisplayTitle on the page) which redirects to "Category:dolor".

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

After installing DisplayTItle, I modify "Category:dolor" using a DisplayTitle magic word (e.g. DISPLAYTITLE:dolor), and the title of the Category page does appear to be only "dolor". However, what I see on the main page is still:

Lorem ipsum Category:dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua

If I open the page as if to edit it, and save it immediately (without necessarily having to actually edit it), the link no longer appears as Category:dolor and goes back to the correct dolor.

  1. MediaWiki 1.36.1,

XAMPP Control Panel 3.3.0,
DisplayTitle extension REL1_36.

Aklapper changed the subtype of this task from "Task" to "Bug Report".Nov 18 2021, 9:54 AM
cicalese added a subscriber: cicalese.

Thank you for reporting this. Unfortunately, there is no way to do the purging automatically in this case. You would need to either purge the page (action=purge) or do a null edit (which you were doing) to clear the cache for the page and cause the content to be regenerated. I would also have expected that refreshLinks would have worked, but it does not.