Extension talk:SubpageNavigation

Add topic
From mediawiki.org
Latest comment: 3 days ago by Thomas-topway-it in topic Loading SubpageNavigation breaks VE

DBprefix[edit]

Currently, the extension checks for pages in a table called "page", even if a $wgDBprefix is configured. I adjusted the code to use the database prefix, which made it work on the wikis I was testing with. I tried to make an account to use Gerrit but couldn't figure it out. So feel free to incorporate the changes from my GitHub.

Project Termina (talk) 16:48, 28 November 2023 (UTC)Reply

yes, you are right, I just noticed this issue a few days ago, I planned to fix it Thomas-topway-it (talk) 21:11, 28 November 2023 (UTC)Reply
Okay, finally figured out how to submit changes to Gerrit. gerrit:982464
Project Termina (talk) 20:27, 12 December 2023 (UTC)Reply
@Project Termina fixed in the latest version, thank you Thomas-topway-it (talk) 14:19, 17 December 2023 (UTC)Reply

Hierarchical list of subpages[edit]

Really nice functionality! Would it be possible to add the ability to show subpages hierarchically (indented) similar to how the extensions SubPageList & SubPageList3 display the lists? Bryandamon (talk) 05:36, 13 December 2023 (UTC)Reply

@Bryandamon I have just updated the extension, now the count of subpages (direct children) is retrieved correctly. Regarding your request, because the extension by design retrieves only direct children, there is not hierarchical indentation. The extension retrieves only direct children by purpose with the aim to navigate pages/subpages as for other Mediawiki's special pages with navigation (with offset and limit). Otherwise you can also retrieve a limited number of subpages for each level. Thomas-topway-it (talk) 14:18, 17 December 2023 (UTC)Reply

Breadcrumbs[edit]

If $wgSubpageNavigationDisableBreadcrumb = false; (the default), the breadcrumbs show up with the extensions formatting in the Main namespace, however all other namespace breadcrumbs normally provided by MW are hidden. Is it possible to allow the extensions version on all other namespaces? Bryandamon (talk) 21:48, 28 December 2023 (UTC)Reply

Do not show subpages which are redirects[edit]

In my use case, there are often pages which start out in one place in the subpage hierarchy and are moved to another place, leaving behind a redirect at the old page name/path so that links to that old location do not break. However, these accumulating redirects are still listed in the subpage navigation, causing visual clutter and harder navigation. I think that for many wikis it would make sense to keep subpage redirects in the navigation, but for some wikis it does not. So I propose that a new global variable set in LocalSettings.php would allow each wiki to opt-in to hiding redirects in the subpage navigation. Additionally, Special:SubpageNavigationbrowse could have a GUI checkbox to show or hide redirects, similar to Special:AllPages.

Project Termina (talk) 18:55, 27 March 2024 (UTC)Reply

@Project Termina the latest version should already implement that (the query contains AND page_is_redirect = 0 ) can you please check the latest version ? thank you Thomas-topway-it (talk) 11:30, 29 March 2024 (UTC)Reply

master does not support MW 1.39.x (RESOLVED)[edit]

Latest changes breaks support for MW current LTS version 1.39 Revansx (talk) 10:16, 15 May 2024 (UTC)Reply

@Revansx I'm sorry for this. It should now be fixed on master https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/extensions/SubpageNavigation/+/542162adfb217ad559f9af936948e08b8c84720e%5E%21/ Thomas-topway-it (talk) 07:52, 16 May 2024 (UTC)Reply
Oh, wow. There's a lot to that commit. Thank you! .. I do see that you restored compatibility with MW 1.35. If it helps, I should think that backwards compatibility should be limited only to the current MW LTS (1.39). But that's your call. I'll test it out later today. Again, thank you! Revansx (talk) 15:05, 16 May 2024 (UTC)Reply

Loading SubpageNavigation breaks VE[edit]

After installing this extensions to my wiki I discovered the VE would no longer load.

It generates the console error,

"VisualEditor failed to load: Error: Unknown module: ext.mws.commonwebapis"

I was able to restore VE functionality by disabling those extension.

/Rich

My site is:

  • RHEL8
  • MediaWiki 1.39.7 (374d95c)20:36, 23 April 2024
  • PHP 8.1.28 (fpm-fcgi)
  • MariaDB 10.3.39-MariaDB-log
  • ICU 73.2
  • Lua 5.1.5
  • Pygments 2.11.2
  • Elasticsearch 7.10.2
  • SMW 4.1.3
  • pandoc 3.1.13

Revansx (talk) 12:55, 17 May 2024 (UTC)Reply

I think a workaround for that is to use $wgResourceLoaderDebug = true; in LocalSettings.php (provided that the cause is the ResourceLoader's minifier). However in turn I'm not sure about the cause of that, I haven't been able to reproduce by now Thomas-topway-it (talk) 20:13, 17 May 2024 (UTC)Reply