Topic on Project:Support desk

Jump to navigation Jump to search

Visual Editor Internal Link Namespace Search Defaults

10
8.36.116.204 (talkcontribs)

The Wiki I'm setting up is using several new namespaces to store different categories of user content. This way I am able to control write and edit access for different users to the different content based namespaces.

The issue I'm having is with linking pages using Visual Editor. When I go to search for a page created under my new namespace, the VisualEditor link box will not display any pages outside of the (Main) namespace.

I had to edit $wgNamespacesToBeSearchedDefault in my LocalSettings.php file to include my new namespaces on the Wiki's main search bar defaults, so I'm wondering if VisualEditor has a separate item that needs edited similarly.

MarkAHershberger (talkcontribs)
8.36.116.204 (talkcontribs)

I thought this variable assigns the namespaces that VisualEditor is enabled in for the user. I'm looking for the variable that defines what namespaces are available for VisualEditor's link search function to look into.

I've gone ahead and added my namespaces into the $wgVisualEditorAvailableNamespaces variable in my LocalSettings.php file, but my issue is still present.

MarkAHershberger (talkcontribs)
8.36.116.204 (talkcontribs)

$wgNamespacesToBeSearchedDefault is for the main WikiMedia search bar (top right of this site). I do not think VisualEditor uses this variable in its link creation search function.

I'm talking about the box that pops up when you click the link/chain icon when typing out a response on here. This box allows you to search for pages on the Wiki that your new link points to.

My issue is that when want to link to a page in a new namespace, the link creation search box will not recognize anything outside of the (Main) namespace.

MarkAHershberger (talkcontribs)

I know, but without diving into the code and finding your answer, I am only going on hunches.

There is no documented configuration for what you want, so I thought it might be using $wgNamespacesToBeSearchedDefault to determine where to look. For instance, MediaWiki.org provides suggestions in the Manual namespace and the Manual namespace is one that is in the namespaces to be searched by default.

If that doesn't work, the next step is to phone a friend or go code spelunking.

8.36.116.204 (talkcontribs)

Thanks for you help.

PHP and web applications are new to me, so that wouldn't be a trivial thing.

82.197.207.202 (talkcontribs)
8.36.116.204 (talkcontribs)

I've updated the wgContentNamespaces variable, and the link search seems to be searching for pages in my user defined namespace. The links are all showing up as red, though, until the page the links are on is saved.

So it seems there is still something a little goofy going on, but the feature is now functional.

Carloposo (talkcontribs)

Hello,

I am having the same need but using $wgContentNamespaces [] = NS_MYCUSTOMNAMESPACE; does not work for me.

Do you have any updates around this topic?

Thank you.

Reply to "Visual Editor Internal Link Namespace Search Defaults"