Extension talk:MsCatSelect

About this board

SMW semantic search #ask conflict

3
Michele.Fella (talkcontribs)

NOTE: This extension at the time of writing will cause used within SMW semantic search to be removed from your query as it will be considered a declaration of the page category rather than a condition. I am sure this will be fixed.

Johnywhy (talkcontribs)

fixed?

Emmanuel Touvier (talkcontribs)

Still not fixed, but you can patch the extension to make it work with #ask:

In the file MsCatSelect.php modify the pattern declaration (line 74)

replace

$pattern = "\[\[({$categoryNamespace}):([^\|\]]*)(\|[^\|\]]*)?\]\]";

with

$pattern = "(?<!#ask:)\[\[({$categoryNamespace}):([^\|\]]*)(\|[^\|\]]*)?\]\]";


This way the extension skips all category patterns directly preceded with #ask:

Reply to "SMW semantic search #ask conflict"

Disable New Subcatory Function

1
Gstratt (talkcontribs)

Could you describe how best to disable the "New subcategory" function? I might be able to hide it via CSS or modifying the mscsCreateArea function in MsCatSelect.js, but what is the best / least destructive way to make that happen. Appreciate your hard work on this extension!

Reply to "Disable New Subcatory Function"

Remove category fails when WYSIWYG-CKeditor is installed

3
Gstratt (talkcontribs)

First off, love the MsCatSelect extension. I'm seeing a conflict with another popular extension, WYSIWYG-CKEditor (running MediaWiki 1.22.3).

When WYSIWYG-CKEditor is installed, MsCatSelect loses the ability to remove categories. To see this in action: edit an existing page with at least two categories, uncheck/remove one of the Assigned categories, click Save Page. The category you attempted to remove will still exist on the page.

All other MsCatSelect actions (assigning, creating new) work normally, only the ability to remove an existing category fails. Any help or suggestions (beyond uninstalling the other extension) would be much appreciated.

Gstratt (talkcontribs)

FYI, this conflict no longer exists with the REL1_35 branches of MsCatSelect and TinyMCE

Reply to "Remove category fails when WYSIWYG-CKeditor is installed"

Limit of 10 categories per page???

3
Summary by Sophivorus

Fixed in MsCatSelect 7.2+

S pokras (talkcontribs)

It appears that MsCatSelect does a good job up to 10 categories on a page. When I edit pages that have more than 10 categories, all except 10 are eliminated. I have pages with up to 60 categories. Yes, I know that may seem silly, but there is a reason for it.

So, it's not tolerable to have an extension that deletes existing categories.

Is this a feature? Or a Bug? Is there a fix? I need to allow pages to have up to 100 categories for my system to be useful. See http://wikidelphia.org/Wikidelphia:About to see what we're doing.

Johnywhy (talkcontribs)

still just 10?

Sophivorus (talkcontribs)

Fixed in MsCatSelect 7.2, please download the latest and confirm!

More elements in a MainCategories array

4
S pokras (talkcontribs)

We have Wikidelphia in Philadelphia, PA

$wgMSCS_MainCategories = array( 'Category1', 'Category2' );

When I put more than 9 elements in the array, I get an error message when starting my Wiki.

*Is there some way to be able to add more?

*In my case I'd like about 12 "Top Level Tags" (perhaps a few more in the future)

If someone has a fix for this, please write me: stan(at)communitymagic(dot)org

Thank you!

S pokras (talkcontribs)

I believe that my problem was caused by incorrect coding of the apostrophe. I have added additional items to the array by copying the items that are working, pasting that and editing it to contain the appropriate category name. My setup tries to edit both copies of a pasted item, so I have had to start editing the copied category by just adding to it and then deleting the unnecessary text.

I have a much more important issue with McCatSelect deleting any more than ten categories if they exist. I'll post that in a new topic.

Johnywhy (talkcontribs)

still broke?

Sophivorus (talkcontribs)

Appears fixed (or rather, never broken).

Number of subcategories limited to 10?

8
Summary by Sophivorus

Fixed in MsCatSelect 7.2+

Vikkvashapro (talkcontribs)

Hi, thanks for great extension. In my case i have hierarchical trees of categories, some categories contains more than 10 subcategories, but when editing page i can't see more than 10. What can i do with that issue? Thanks in advance!

91.233.68.5 (talkcontribs)

Hello, i guess i found the solution.

Edit the js/mscatselect.js and add this at the line 237 just after ( cmtitle: 'Category:' + maincat,)

cmlimit: '200',

200 is what i use, but the maximum is 500

Here please find the docu of API http://metin2wiki.eu/api.php

Vikkvashapro (talkcontribs)

Thanks!

SmartK (talkcontribs)

This was hard-coded to 500 a while ago but strangely it still does not show 500 but about 300 categories. Anyways I just entered '100000' and now all our 3000 categories are shown. Perfect!!!

Maybe a suggestion for the next version: Default to 500 but there should be a variable in LocalSettings.pgp so we can override this easily without editing the mscatselect.js file.

SmartK (talkcontribs)

Great, thank you for implementing this.

SmartK (talkcontribs)

LocalSettings.php: $wgGroupPermissions['*']['apihighlimits'] = true;

Johnywhy (talkcontribs)

hi, what's the purpose of wgGroupPermissions in this context ?

thx

Sophivorus (talkcontribs)

When MsCatSelect gets the list of categories, it's actually the user who is requesting the list via a background AJAX call to the API. So the max number of categories returned will depend on the limits set to the API for user requests. Thus, the purpose of setting $wgGroupPermissions['*']['apihighlimits'] = true; is to allow users to request as many categories as possible through the API.

Does Special:ExtensionDistributor Have Latest?

3
Summary by Johnywhy

issues fixed with git master. Can't use MW downloader.

Johnywhy (talkcontribs)

Some issues here were just marked 'resolved', but Special:ExtensionDistributor gives me same version as the version it gave before issues were marked resolved.

Sophivorus (talkcontribs)

To download the latest, you should select the "master" version. I just tried it and I got the latest version (7.1) with no problems. Can you try again? Once you get and install the latest version, make sure to do a hard refresh (shift + ctrl + R) to load the latest JavaScript. Cheers!

Johnywhy (talkcontribs)

thx, i'll try it. So i should not use MW's ExtensionDistributor, correct?

Summary last edited by Sophivorus 19:22, 10 April 2021 3 years ago

Fixed on newer versions.

Johnywhy (talkcontribs)

I added a category to a Template. It doesn't get saved.

NS_MEDIAWIKI not working with $wgMSCS_WarnNoCategoriesException

3
CptTwinkie (talkcontribs)

I get the warning every time. The exact setting in my LocalSettings.php is

$wgMSCS_WarnNoCategoriesException = array( NS_TALK, NS_FILE_TALK, NS_MEDIAWIKI, 'Main Page' );

Is this correct behavior?

Johnywhy (talkcontribs)

fixed?

Sophivorus (talkcontribs)

Fixed! Please download the latest version.

Namespace constants not working with MW 1.34.2

3
178.115.130.63 (talkcontribs)

The NS_FILE, etc. constants are not working when used with $wgMSCS_WarnNoCategoriesException[]

I was able to use the canonical namespace names by extending the function mscsCheckCategories() in file MsCatSelect.js as shown below:

function mscsCheckCategories() {

   if ( mscsVars.WarnNoCategories === true &&

        jQuery( '#mscs-added input[type="checkbox"]:checked' ).length === 0 &&

        jQuery.inArray( mw.config.get( 'wgNamespaceNumber' ), mscsVars.WarnNoCategoriesException ) === -1 &&

        jQuery.inArray( mw.config.get( 'wgCanonicalNamespace' ), mscsVars.WarnNoCategoriesException ) === -1 &&

        jQuery.inArray( mw.config.get( 'wgRelevantPageName' ), mscsVars.WarnNoCategoriesException ) === -1

   ) {

       return confirm( mediaWiki.msg( 'mscs-warnnocat' ) );

   }

   return true;

}

This allows using:

$wgMSCS_WarnNoCategoriesException[] = 'Talk';

$wgMSCS_WarnNoCategoriesException[] = 'User';

$wgMSCS_WarnNoCategoriesException[] = 'User_talk';

$wgMSCS_WarnNoCategoriesException[] = 'Project';

$wgMSCS_WarnNoCategoriesException[] = 'Project_talk';

$wgMSCS_WarnNoCategoriesException[] = 'File';

$wgMSCS_WarnNoCategoriesException[] = 'File_talk';

$wgMSCS_WarnNoCategoriesException[] = 'MediaWiki';

$wgMSCS_WarnNoCategoriesException[] = 'MediaWiki_talk';

$wgMSCS_WarnNoCategoriesException[] = 'Template';

$wgMSCS_WarnNoCategoriesException[] = 'Template_talk';

$wgMSCS_WarnNoCategoriesException[] = 'Help';

$wgMSCS_WarnNoCategoriesException[] = 'Help_talk';

$wgMSCS_WarnNoCategoriesException[] = 'Category_talk';

instead of namespace constants.

May be one could use the work-around too.

Johnywhy (talkcontribs)

no reply from dev?

Sophivorus (talkcontribs)

Fixed! Please download the latest version.

Return to "MsCatSelect" page.