You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In our wiki we have some categories specifically to group templates. In certain scenarios however this seems to cause issues with the bot. Ie new bot.Category("Template:Infobox") throws Error: not a category page instead of referencing Category:Template:Infobox. This can also be observed with MwnTitle: new bot.Title('Template:Infobox', Namespace.CATEGORY); results in { namespace: 10, title: 'Infobox', fragment: null }. Using an invalid prefix however works as intended: new bot.Title('Invalid:Infobox', Namespace.CATEGORY); results in { namespace: 14, title: 'Infobox', fragment: null }. Prefixing the title correctly with Category: also works: new bot.Title('Category:Template:Infobox', Namespace.CATEGORY); results in { namespace: 14, title: 'Template:Infobox', fragment: null }.
One use case where this issue becomes apparent is when trying to map included categories:
This is mostly intentional. Title's interface matches that of mw.Title in the on-site JS interface - which works similarly and only uses the second constructor arg if the page name passed doesn't already have a namespace.
You can use makeTitle to create a title without namespace auto-inference, and then create a Category object using the Title object.
In our wiki we have some categories specifically to group templates. In certain scenarios however this seems to cause issues with the bot. Ie
new bot.Category("Template:Infobox")
throwsError: not a category page
instead of referencingCategory:Template:Infobox
. This can also be observed withMwnTitle
:new bot.Title('Template:Infobox', Namespace.CATEGORY);
results in{ namespace: 10, title: 'Infobox', fragment: null }
. Using an invalid prefix however works as intended:new bot.Title('Invalid:Infobox', Namespace.CATEGORY);
results in{ namespace: 14, title: 'Infobox', fragment: null }
. Prefixing the title correctly withCategory:
also works:new bot.Title('Category:Template:Infobox', Namespace.CATEGORY);
results in{ namespace: 14, title: 'Template:Infobox', fragment: null }
.One use case where this issue becomes apparent is when trying to map included categories:
The text was updated successfully, but these errors were encountered: