Project:Support desk

About this board

Welcome to the MediaWiki Support desk, where you can ask MediaWiki questions!

(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 versions you are using, as found on your wiki's Special:Version page:
    • MediaWiki version
    • PHP version
    • Database type and version
  2. 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.
  3. To start a new thread, click "Start a new topic".

How I can remove Discussion Tab from Main Page

3
Enzoly (talkcontribs)

I am trying to remove the Discussion Tab, View Source and View history from the main page of my Wiki, but I have tried several configurations and it does not work correctly.

Include in my LocalSettings.php file the following value:

body.page-Main_Page li#ca-delete { display: none !important; };


After including the line above it shows me an error:

HTTP ERROR 500


I comment online and it works correctly but it does not remove the Discussion tab.


Thank you.

Enzo

TheDJ (talkcontribs)

Don't add that to your LocalSettings.php, but in your MediaWiki:Common.css wiki page. LocalSettings.php is for configuration settings and the file is written in PHP. You have added a random bit of CSS into the file, which indeed will prevent the entire website from starting up. This CSS line (when placed at the correct spot) will also not do anything more than hiding the 'delete page' item from the More menu.

I do encourage getting a bit more familiar with the relevant programming languages, when you are modifying/running a website.

Enzoly (talkcontribs)

Hello TheDJ.

Thanks for answering.

Indeed, I am not in the programming area, but I always try to learn other areas.

I understand that I should familiarize myself with all programming language and techniques and that I must assume responsibility for dealing with changes to the Wiki.

However, I installed a private wiki and I would like to know where I can modify my main page so that it does not show the Discussion tabs.


Thank you.


Enzo

Reply to "How I can remove Discussion Tab from Main Page"

How to add braces in between the page.

3
Shurpalimedha (talkcontribs)

I have written following code but it displayed at bottom of the page. I want it in between of the page

बडोदे Template:Brace आपला अतिनम्र सेवक
ता. १ जून Template:Brace गोविंदराव बाबाजी जोशी.
सन १८८५ Template:Brace वसईकर.
Template:Brace
Samwilson (talkcontribs)

@Shurpalimedha: It sounds like this might be a question about mrwikisource, rather than MediaWiki; you could try asking on the scriptorium there.

Shurpalimedha (talkcontribs)

thanks

Reply to "How to add braces in between the page."
Gerges (talkcontribs)

I am working on a bot on Arabic Wikipedia to remove non-existent images (in Arabic Wikipedia or Wikimedia Commons) from pages. I need a method to obtain the names of files used on pages and not existing through API or MySQL, without checking all the images on the page individually.

Malyacko (talkcontribs)
Gerges (talkcontribs)

I would like to have images that do not exist but are used on pages

Reply to "broken files"

Correct encoding for database

2
Artever (talkcontribs)

I'm setting up a small private wiki using Mediawiki 1.40.1. ChatGpt (yes, I know) is really convinced that my mysql database should be in utf8mb4. Currently it's in binary, this is the line I think in LocalSettings.php:

# MySQL table options to use during installation or update

$wgDBTableOptions = "ENGINE=InnoDB, DEFAULT CHARSET=binary";


I haven't touched that (deliberately) I thought from here that binary is ok, but I'm new to this and not sure. What is the proper encoding? Thanks!

Bawolff (talkcontribs)

Both work, i personally prefer binary.


(It should be noted that changing $wgDBTablesOptions only affects new tables not existing ones.)

Reply to "Correct encoding for database"
Fomkwiki (talkcontribs)

{| class="mw-collapsible mw-collapsed" style="width: 100%;"

|-

! style="width: 50%;" | Column 1 Title

! style="width: 50%;" | Column 2 Title

|-

| Paragraph 1 goes here.

| Paragraph 1 goes here.

|-

| Paragraph 2 goes here.

| Paragraph 2 goes here.

|-

| Paragraph 3 goes here.

| Paragraph 3 goes here.

|-

| Paragraph 4 goes here.

| Paragraph 4 goes here.

|-

| Paragraph 5 goes here.

| Paragraph 5 goes here.

|}


Anyone know how to make both Column 1 Title and Column 2 Title expand so that paragraph's 1 to 4 are shown? I would always like paragraph 5 to remain visible.

Malyacko (talkcontribs)

Don't put content in the collapsed class if do not want content to be collapsed but visible.

Reply to "Collapsible Table"

how to restore previous bullets separator in language navigation box ?

8
Wladek92 (talkcontribs)

Hi all , this evening I have observed new 'moons' appearing in the language navigation menu of the pages (according to percentage of translations) . They are too proeminent and i prefer the previous dots. What are CSS rules for that ? ... if possible. Thanks. -- Christian 🇫🇷 FR (talk) 22:39, 14 November 2023 (UTC)

TheDJ (talkcontribs)

I have no idea what you are talking about ;)

Jonathan3 (talkcontribs)

I think he means the Languages box at the top of pages like Manual:FAQ.

Nikerabbit (talkcontribs)

Previous indicators were images which we removed from Translate in favor of pure CSS solution. Not sure if those images are on Commons.

Tacsipacsi (talkcontribs)
Nikerabbit (talkcontribs)

Shame on me for not providing attribution.

Tacsipacsi (talkcontribs)

They’re PD/CC0, so attribution wasn’t legally required, you don’t have to shame for not providing it; it just would have helped finding the images on Commons now, fifteen years later.

Wladek92 (talkcontribs)

Nice, so it should be easy to get a user CSS rule to substitue globally the moons by a user char, and eventually nothing, since the link is held already in the language name. Rotation is done generally by the user on only a few languages: his native one and fallback on En or other, so that the percentaged moons are useful to only specific users, for stats or other. --Christian 🇫🇷 FR (talk) 09:13, 17 November 2023 (UTC)

Reply to "how to restore previous bullets separator in language navigation box ?"

Could not load authentication plugin SimpleSAML SSO MW 1.39.4

2
Testergt1302 (talkcontribs)

Hi,

I am trying to configure SAML auth for our Wiki 1.39.4 on RHEL7.9. I am trying with simplesamlphp 2.0.5. While accessing the wiki, it gives error :

"Could not load authentication plugin"

wiki 1.39.4

php 8.0

pluggableauth 7.0

SimpleSAMLphp: 7.0


From LocalSettings.php :

wfLoadExtension( 'PluggableAuth' );

wfLoadExtension( 'SimpleSAMLphp' );

$wgSimpleSAMLphp_InstallDir = '/var/simplesamlphp';

$wgSimpleSAMLphp_AuthSourceId = 'default-sp';

$wgPluggableAuth_EnableAutoLogin = true;

$wgPluggableAuth_EnableLocalLogin = false;

$wgPluggableAuth_EnableLocalProperties = false;

$wgPluggableAuth_ButtonLabelMessage = 'Login';

$wgPluggableAuth_Class = 'SimpleSAMLphp';

$wgMainCacheType = CACHE_DB;

$wgSimpleSAMLphp_MandatoryUserInfoProviders['myusername'] = [

        'factory' => function() {

                return new \MediaWiki\Extension\SimpleSAMLphp\UserInfoProvider\GenericCallback( function( $attributes ) {

                        if ( !isset( $attributes['http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress'] ) ) {

                                throw new Exception( 'missing email address' );

                        }

                        $parts = explode( '@', $attributes['http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress'][0]);

                                                return strtolower( $parts[0] );

                } );

        }

];

$wgPluggableAuth_Config['Log in using my SAML'] = [

        'plugin' => 'SimpleSAMLphp',

        'data' => [

                'authSourceId' => 'default-sp',

                'usernameAttribute' => 'http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress',

                'realNameAttribute' => ['http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname','http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname'],

                'emailAttribute' => 'http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress',

                'userinfoProviders' => [

                        'username' => 'myusername'

                ]

         ]

];


From Logs:

> Authentication.log <

2023-11-20 11:48:34 hostname wiki: Primary login with MediaWiki\Extension\PluggableAuth\PrimaryAuthenticationProvider returned REDIRECT

> PluggableAuth.log <

2023-11-20 11:48:34 hostname wiki: In execute() 2023-11-20 11:48:34 hostname wiki: Getting PluggableAuth instance 2023-11-20 11:48:34 hostname wiki: Plugin name: SimpleSAMLphp

> simplesamlphp.log <

Nov 20 11:48:34 simplesamlphp ERROR [TR72440098] Error loading session: Invalid session ID

> PluggableAuth.log <

2023-11-20 11:48:34 hostname wiki: Invalid authentication plugin class: Invalid session ID

> Authentication.log <

2023-11-20 11:48:35 hostname wiki: Login failed in primary authentication by MediaWiki\Extension\PluggableAuth\PrimaryAuthenticationProvider


Not sure whats gone wrong. can someone suggest?

--

GT

Testergt1302 (talkcontribs)

Hi,

This issue has been solved.

If anyone face similar issue refer below.

modify below variables in the config.php of simplesamlphp. default config is to use 'phpsession'. This need to be changed to use sql/database to store session info.

'store.type'                    => 'sql',

'store.sql.dsn'                 => 'mysql:host=localhost;port=3306;dbname=mywiki',

store.sql.username' => 'sqluser', //SQL DB user name

'store.sql.password' => 'password', //SQL DB user password

на сайте нет администраторов и бюрократов вообще

8
JuliayDubrovina (talkcontribs)

на сайте нет вообще администраторов и бюрократов при использовании описанной инструкции новый бюрократ не появляется. Есть ли еще какие-либо решения проблемы? Версия MediaWiki 1.13.2

MaxSem (talkcontribs)
JuliayDubrovina (talkcontribs)

нет, у нас версия 1.13

JuliayDubrovina (talkcontribs)

Sometimes, the installer fails to create the default user, or the user table is lost for some reason. There are a couple of options for solving this: maintenance/createAndPromote.php If your MediaWiki is older than 1.16, make sure AdminSettings.php is set up (see AdminSettings.sample) Execute maintenance/createAndPromote.php --username <new user name> --password <password for that user> from the shell. Append --bureaucrat to command line if you want that user to become a bureaucrat, in addition to becoming an administrator. This will create a new user and promote them to an administrator. For help, run the script with the parameter --help.

Или: Alter the database Register a new account using the regular method (Special:UserLogin). Check the user ID in Special:Preferences. Execute the following SQL statement against the database: INSERT INTO user_groups ( ug_user, ug_group ) VALUES ( <id>, 'bureaucrat' ), ( <id>, 'sysop' ); <id> above should be replaced with the appropriate user ID which you can see on the user's preference page

MaxSem (talkcontribs)

createAndPromote.php присутствует и в 1.13.х.

JuliayDubrovina (talkcontribs)

напишите пожалуйста полную пошаговую инструкцию по восстановлению прав пользователей с помощью createAndPromote.php я не профи в этом

MaxSem (talkcontribs)

php createAndPromote.php --bureaucrat <имя_пользователя> <его_пароль> из командной строки. Для пошаговой инструкции недостаточно данных о вашем сервере: какая операционка, есть ли к нему физический доступ, или SSH и т.д.

213.80.160.166 (talkcontribs)

есть только доступ через ftp-клиент

Reply to "на сайте нет администраторов и бюрократов вообще"

Content box at top of page...

1
Aharvilla (talkcontribs)

I am sort of new to this but i was not sure if this is possible or not so here it goes. It seems as if the contents key box is dynamically populated by the contents of the Wiki page. Considering this, is it possible instead of having the contents box, have tabs be automatically populated instead?

Reply to "Content box at top of page..."

Azure SSO Integration SAML

3
Ramvenkey6278 (talkcontribs)

I am getting below errors in error log, any help would be appreciated

Product Version
MediaWiki 1.39.0
PHP 7.4.13 (cgi-fcgi)
MySQL 5.7.40-log
ICU 66.1
PluggableAuth 6.1 (3a8142d) 03:20, 7 December 2022
SimpleSAMLphp 5.0.1 (f918b19) 17:43, 8 December 2022

simplesamlphp (1.19.7)


Line 610: [PluggableAuth] In execute()

Line 611: [PluggableAuth] Getting PluggableAuth instance

Line 611: [PluggableAuth] Getting PluggableAuth instance

Line 612: [PluggableAuth] Plugin name: SimpleSAMLphp

Line 613: [PluggableAuth] Invalid authentication plugin class: Invalid session ID

Line 613: [PluggableAuth] Invalid authentication plugin class: Invalid session ID

Line 850: [authentication] Login failed in primary authentication by MediaWiki\Extension\PluggableAuth\PrimaryAuthenticationProvider

Line 850: [authentication] Login failed in primary authentication by MediaWiki\Extension\PluggableAuth\PrimaryAuthenticationProvider

Line 850: [authentication] Login failed in primary authentication by MediaWiki\Extension\PluggableAuth\PrimaryAuthenticationProvider

Line 850: [authentication] Login failed in primary authentication by MediaWiki\Extension\PluggableAuth\PrimaryAuthenticationProvider

Testergt1302 (talkcontribs)

@Ramvenkey6278Hi, were you able to get this worked ? I am also getting same error and not able to login.

--

Thanks.

Testergt1302 (talkcontribs)

Sorry, I can't read this text. :(

Reply to "Azure SSO Integration SAML"