Jump to content

Project:Support desk

About this board

Welcome to the MediaWiki Support desk. This is a place where you can ask any questions you have about installing, using or administrating the MediaWiki software.

(Read this message in a different language)

See also

Before you post

Post a new question

  1. To help us answer your questions, please indicate which version of MediaWiki you are using, as found on your wiki's Special:Version page:
  2. If possible, add $wgShowExceptionDetails = true;error_reporting( -1 );ini_set( 'display_errors', 1 ); to LocalSettings.php in order to make MediaWiki show more detailed error messages.
  3. Please include the web address (URL) to your wiki if possible. It's often easier for us to identify the source of the problem if we can see the error directly.
  4. To start a new thread, click the box with the text "Start a new topic".

OpenID Connect Extension - Infinite Redirects

1
HadleySo (talkcontribs)

I'm looking for some help debugging an issue with OIDC. Like the title, I'm experiencing a redirect loop after my SSO provider redirects to Special:PluggableAuthLogin. My SSO provider and Special:PluggableAuthLogin redirect back and forth to each other infinitely.

It looks like my SSO provider (Keycloak) is sending the correct query parameters back to PluggableAuthLogin.

I'm running: MW 1.39.10; PluggableAuth 7.1.0 (db07c04); OpenID Connect 8.0.3 (0cd85ca)

Here is a debug log too: Topic:Yg0wtew7lklqijwy

Reply to "OpenID Connect Extension - Infinite Redirects"

Adding an appearance menu like Wikipedia has

4
Hyperwombat (talkcontribs)

Could anybody point me in the right direction on how to add the same appearance menu that Wikipedia has next to articles to a Wiki (including the dark mode)? The furthest I have gotten is enabling Vector-2022 and the Gadgets extension. I couldn't figure out which gadgets to import. There doesn't seem to be any official documentation (that I could find). I'm also not sure if I have to change anything else in LocalSettings.php to get it working.

Hyperwombat (talkcontribs)

I finally figured out that it's enabled by default in MediaWiki 1.43, but not in the current stable version (don't know if it could be enabled somehow in 1.42). The only thing I still have to figure out is how to make it default to the text size "standard" instead of "small" for all users.

Hyperwombat (talkcontribs)

Okay, the font size can be changed in skin.json under "DefaultUserOptions". Problem solved. Leaving all of this here in case someone else tries to figure this out.

Bawolff (talkcontribs)

For the record, we strongly discourage people from editing skin.json. If you want to change this, you should set $wgDefaultUserOptions['vector-font-size'] = 1 in your LocalSettings.php See manual:$wgDefaultUserOptions for more details.

Reply to "Adding an appearance menu like Wikipedia has"

Link different accounts

2
Hopefighter (talkcontribs)

I would like to know if it's possible to link my new account with the google account. (Is also the account that I add for my account on MediaWiki too)

If it is, can you send me a link or if it is already on settings list and I didn't see it, may you give me an " 101 idiot course " please?

Thank you for your time, good luck with your donations request and congratulation for your resilience and a heroic job !

Bawolff (talkcontribs)

Hi, this depends on which website you are referring to. If you mean this website or Wikipedia, then no.

If you want to set this up for your own website, see Extension:OpenID Connect

Reply to "Link different accounts"

mediawiki blank after I tried to set $wgMaxUploadSize

1
Summary by Pontiuspilatus

solved itself

2A02:8109:AB89:6700:6D9E:C49D:3004:3387 (talkcontribs)

I tried to change max upload size to 1GB, but since my mediawiki doesn't load anymore. Also adding

error_reporting( -1 );

ini_set( 'display_errors', 1 );

to localsettings doesn't bring anything up

Mobile menue - adding a custom link

1
Kyebert (talkcontribs)

Hello,

I have added the code

var timer = setInterval(function() { ... } }, 100);

from Topic:Vqy1kx6q4e0bzvyb

in a Mobile.js file to add a custom link in mobile menu. But where do I place / register this JS? Do I need additional code or other settings? (I use V 1.42)

Reply to "Mobile menue - adding a custom link"

Npm package installation

1
Antoine7812 (talkcontribs)

Hello,

I would to know if it possible to install package in Wikibase especially in extension development (for example: Special Page).

In my case, I have an extension where it is developed in Vue and I would like for example to install this kind of library: https://primevue.org/

I try with the ResourceLoader but no successful, it is not possible to install via NPM ?

Do you know how to do and if it is possible ?

Thanks a lot.

Reply to "Npm package installation"

Referencing an uploaded image in CSS

2
AllenKll (talkcontribs)

I see on some other Mediawiki's, like Minecraft, that in their Vector.CSS they use:

--vector-tabs: url('filepath://Vector-tabs.png');

and that seems to autotranslate to the complete path in the downloaded CSS:

--vector-tabs: url(/images/Vector-tabs.png?0ceb5);

but when I use that on my Mediawiki, I just get back the same text

Vector.css:

--base-background: url('filepath://AdventureRoadBackground.png');

returns:

--base-background: url(filepath://AdventureRoadBackground.png);

I checked, and File:AdventureRoadBackground.png does indeed exist.

Is there a hook that needs to be written, a setting to be flipped, or an extension to install to get this translation to work?

MediaWiki 1.40.0

www.cubieversewiki.com

Bawolff (talkcontribs)

That does sound like an extension, however I've never heard of any extension to do that. Maybe its something custom to their site.

Reply to "Referencing an uploaded image in CSS"

Hiding empty brackets on infoboxes

3
Appelmonkey (talkcontribs)

Hey there I am trying to make an infobox for one of the wikis I am a part off, but I can't for the life of me figure out how to hide brackets if they have no text. Is there a trick to it? Thanks in advance.

Jonathan3 (talkcontribs)

Use {{{Fieldname|}}} with that bar/pipe symbol.

TheDJ (talkcontribs)
Reply to "Hiding empty brackets on infoboxes"
Larslaki (talkcontribs)

Hello I'm trying to use the mediawiki api using R.

I have tried to delete a page in my wiki. I got an error message saying that I'm not an administrator. But this is not the case.  A fresh installation also produced the same result. The administrator account seems to be assigned only limited rights.

If I assign the 'delete' option to the sysop group in the localsettings, this is not applied. However, if I assign delete for all user groups (*) it works. But this is too insecure as solution.

Can someone please help me or give me hints on how to solve this.

Bawolff (talkcontribs)

Are you sure that your account is actually an administrator? If you go to Special:preferences (or Special:listusers ) what groups does it say you are a member of?


If you are using the api, are you using either bot passwords or oauth? If so you need to take grants into account.

Larslaki (talkcontribs)

Thank you for your help!

Yes it is administrator. I'm not using bot passwords. I used action=login with password and username for an user which is administrator.

It seems that the login via api is somehow limiting the rights. If I'm checking the user information getting after API login it is also described as admin but with a different set of rights (only 10 including the right to edit but not delete).

How to login and keeping the rights which are visible for admins on the User group rights page?

Bawolff (talkcontribs)

Do you have any auth related extensions installed? When logged in via the api is the set of implicit groups different than a normal login? (E.g. check with api.php?action=query&meta=userinfo&uiprop=rights|groups|implicitgroups ). Do you have any groups setup that revoke rights (check on Special:ListGroupRights ). You could also check if the rights you have correspond exactly to something on Special:listGrants, although based on your description grants shouldnt be in use.

Larslaki (talkcontribs)

it seems like. that is the output:

{

"batchcomplete": "",

"query": {

   "userinfo": {

       "id": 0,

       "name": "84.140.150.49",

       "anon": "",

       "groups": [

           "*"

       ],

       "implicitgroups": [

           "*"

       ],

       "rights": [

           "read",

           "edit",

           "createpage",

           "createtalk",

           "writeapi",

           "viewmywatchlist",

           "editmywatchlist",

           "viewmyprivateinfo",

           "editmyprivateinfo",

           "editmyoptions"

       ]

   }

}

}

This is the same list I get within R after login and asking for user rights for the user.

But I'm not clear were it comes from. I had used some type of extension but not using them anymore and deleted them. Could they have changed the rights beyond their use?

Bawolff (talkcontribs)

That output is saying you are not logged in (See the word "anon" in it), which would explain why you don't have the rights.

TheDJ (talkcontribs)

> I used action=login with password and username.

I'm pretty sure, you need to use a cookiejar to keep track of cookies between requests if you use this flow. Not having one would explain the behaviour described.

Larslaki (talkcontribs)

ah ok now I tried again and I was surely logged in and used your code frome above, The result now is different and it showes me all option for me as administrator. That means that my login via R and API is not working properly or the cookies are not managed well as the second answer suggest.

Than I will try to figure out how to loggin properly. If you have any suggestions for this I would be very grateful!

Thank you so far a lot!!!!!

Reply to "group permission"

Administrator can't edit sitewide css after upgrade

2
99.192.96.81 (talkcontribs)

I just upgraded to the latest stable wiki.

My user is part of the "administrator" (sysop) and "bureaucrat" user group.


top of page says: You do not have permission to edit this page, for the following reason: You do not have permission to edit this CSS page because it may affect all visitors.

Ammarpad (talkcontribs)
Reply to "Administrator can't edit sitewide css after upgrade"