Project:Support desk

حول هذه الصفحة

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".
Tjbrace (نقاشمساهمات)

I just upgraded an instance from 1.35.2 to 1.38.2 (new install, database dump/restore). Most everything is working fine, except on Special:Preferences, none of the tabs are clickable.

I don't see any console errors, and nothing in the debug. I also tried adding #mw-prefsection-editing to the url, but it does nothing.

MediaWiki 1.38.2

PHP 7.4.30 (fpm-fcgi)

MariaDB 10.6.8-MariaDB

ICU 67.1

Lua 5.1.5

رد على "Special:Preferences Tabs"
Abrape (نقاشمساهمات)

Hello, I created a template infobox in my wiki. If I insert the info box with brackets in the lemma, the template appears correctly. After inserting the data, I save the lemma, but the info box remains empty (no data). How do I have to program the template so that the template is inserted into the lemma (without using subst) and the info box filled with data becomes visible in the lemma after saving? LG Abrape

Jonathan3 (نقاشمساهمات)

I guess lemma is a word for page.

Copy and paste your page (at least the part calling the template) and your template here and we'll see!

Abrape (نقاشمساهمات)
[[Datei:<Name>.png|thumb|center|<Berg>]]
Name =
Höhe in m ü. NHN =
Lage =
Gebirge =
Breitengrad =
Längengrad =
Typ =
Gestein =
Bauwerke =
Jonathan3 (نقاشمساهمات)

Could you also copy and paste your page?

In the template, you need to add the parameters. E.g. it might have Name = {{{Name|}}} if your page has {{Templatename|Name=Joe Bloggs}}.

See Help:Templates#Parameters.

Abrape (نقاشمساهمات)

Done. Thank you for your help!

[[Datei:<Name>.png|thumb|center|<Berg>]]
Name =
Höhe in m ü. NHN =
Lage =
Gebirge =
Breitengrad =
Längengrad =
Typ =
Gestein =
Bauwerke =
Jonathan3 (نقاشمساهمات)

That looks like the Template page rather than the content page. Could you send both?

It's surrounded by noinclude tags. That tells mediawiki not to include the text between the tags when the template is used. You could change them to includeonly and see what difference it makes.

Also I wonder whether template parameters are case sensitive. I can't remember.

Abrape (نقاشمساهمات)

The copy of the side box has no reference here and therefore only Template:Testberg appears here. Sorry!

Jonathan3 (نقاشمساهمات)

I don't know what that means.

If you mean how it appears on this website, don't worry - I can click "edit" to see what you copy/pasted.

It would be good to see two things:

1. The name and content of the page containing the template code, e.g. Template:Testberg is the name and <includeonly>...</includeonly> is the content. 2. The content of the call to the template, e.g. {{Testberg|name=Berlin}}.

Abrape (نقاشمساهمات)

{{Infobox Test |NAME=Testberg |BILD= |BILDBESCHREIBUNG= |HÖHE=708 |HÖHE-BEZUG=DE-NHN |LAGE=[[Bayern]], [[Deutschland]] |GEBIRGE=[[Fichtelgebirge]] |BREITENGRAD=49/56/49/N |LÄNGENGRAD=12/08/10/E |REGION-ISO=DE-BY |TYP= |GESTEIN=Basalt |ALTER= |ERSTBESTEIGUNG= |BESONDERHEITEN= }}

رد على "Infobox"
ملخص أخير حرر بواسطة Jl-mws ١٥:٠٤، ٩ أغسطس ٢٠٢٢ قبل ٥ ساعات

Mostly weird invalid synthax you should guess on your own.

LDAP stack should be more tolerant to syntax, because it will generate a lot of avoidable bugs.

Jl-mws (نقاشمساهمات)

Try and errors

When I try to authenticate as

an LDAP User , I got this error : [ec6935bb5d6a9b7d0d944cdd] 2022-08-05 13:21:20: Erreur fatale de type « MWException »

a Local User : I got this error : Could not authenticate

All the /LDAPProvider/maintenance/ scripts works fine ie : CheckConnection.php CheckLogin.php ConvertLdapAuthenticationConfig.php ShowUserGroups.php ShowUserInfo.php

Versions

MediaWiki 1.35.4
PHP 7.4.30 (apache2handler)
MariaDB 10.5.15-MariaDB-0+deb11u1
ICU 67.1

LDAPAuthentication 2 1.0.3 (6bc5848) 22 juillet 2022 à 10:15
LDAPAuthorization 1.1.0 (a0d1a5b) 4 juillet 2022 à 07:18
LDAPProvider 1.0.5 (80f8cc8) 22 juillet 2022 à 11:29
PluggableAuth 5.7 (a932c78) 23 mai 2022 à 21:17

Configs

  • ldapprovider-aaa.json
{
        "example.com": {
                "connection": {
                        "server": "ad.example.com",
                        "port": "636",
                        "enctype": "ssl",
                        "user": "cn=ldap-connect,cn=Users,dc=example,dc=com",
                        "pass": "********",
                        "options": {
                                "LDAP_OPT_DEREF": 1
                        },
                        "basedn": "cn=Users,dc=example,dc=com",
                        "groupbasedn": "cn=Users,dc=example,dc=com",
                        "userbasedn": "cn=Users,dc=example,dc=com",
                        "searchattribute": "sAMAccountName",
                        "searchstring": "cn=USER-NAME,cn=Users,dc=example,dc=com",
                        "usernameattribute": "sAMAccountName",
                        "realnameattribute": "displayName",
                        "emailattribute": "mail",
                        "grouprequest": "MediaWiki\\Extension\\LDAPProvider\\UserGroupsRequest\\UserMemberOf::factory"
                },
                "authorization": {
                        "rules": {
                                "groups": {
                                       "required": [ "CN=wikiaaa,CN=Users,dc=example,dc=com" ]

                                }
                        }
                }
        }
}
  • LocalSettings.php
<?php
if ( !defined( 'MEDIAWIKI' ) ) {
        exit;
}
$wgSitename      = "Wiki aaa";
$wgScriptPath       = "";
$wgScriptExtension  = ".php";
$wgServer           = "https://wikiaaa.example.com";
$wgStylePath        = "$wgScriptPath/skins";
$wgLogo             = "$wgStylePath/common/images/logo_aaa.png";
$wgGroupPermissions['*']['createaccount']   = false;
$wgGroupPermissions['user']['createaccount']   = true;
$wgGroupPermissions['wikiaaa']['createaccount']   = true;
$wgGroupPermissions['*']['read']            = false;
$wgGroupPermissions['*']['edit']            = false;
$wgGroupPermissions['sysop']['edit']            = true;
$wgGroupPermissions['user']['edit']            = true;
$wgGroupPermissions['aaa']['edit']            = true;
$wgEnableEmail      = false;
$wgEnableUserEmail  = true; # UPO
$wgEmergencyContact = "apache@wikiaaa.example.com";
$wgPasswordSender   = "apache@wikiaaa.example.com";
$wgEnotifUserTalk      = false; # UPO
$wgEnotifWatchlist     = false; # UPO
$wgEmailAuthentication = true;
$wgDBtype           = "mysql";
$wgDBserver         = "localhost";
$wgDBname           = "wikiaaa";
$wgDBuser           = "userwikiaaa";
$wgDBpassword       = "**********";
$wgDBprefix         = "";
$wgDBTableOptions   = "ENGINE=InnoDB, DEFAULT CHARSET=utf8";
$wgDBmysql5 = false;
$wgMainCacheType    = CACHE_NONE;
$wgMemCachedServers = array();
$wgEnableUploads  = true;
$wgUseImageMagick = true;
$wgImageMagickConvertCommand = "/usr/bin/convert";
$wgFileExtensions = array('png', 'gif', 'jpg', 'jpeg', 'pdf', 'dmg', 'ppd', 'zip', 'doc', 'docx');
$wgUseInstantCommons  = false;
$wgShellLocale = "fr_FR.utf8";
$wgLanguageCode = "fr";
$wgSecretKey = "6gyo8sj9a2d20vsdh7t51r080s0kqk5tdlx08zxolbxrtui8e7frd0hkxv7xoki825n756";
$wgUpgradeKey = "jbkvvpd7nr";
$wgDefaultSkin = "vector";
wfLoadSkin( 'Vector' );
$wgRightsPage = ""; # Set to the title of a wiki page that describes your license/copyright
$wgRightsUrl  = "";
$wgRightsText = "";
$wgRightsIcon = "";
$wgDiff3 = "/usr/bin/diff3";
if (is_file("/etc/mediawiki-extensions/extensions.php")) {
        include("/etc/mediawiki-extensions/extensions.php");
}
$wgResourceLoaderMaxQueryLength = -1;
wfLoadExtension( 'SyntaxHighlight_GeSHi' );
wfLoadExtension( 'AccessControl' );
wfLoadExtension( 'Math' );
wfLoadExtension( 'WikiEditor' );
wfLoadExtension( 'LabeledSectionTransclusion' );
wfLoadExtension( 'LDAPAuthorization' );
wfLoadExtension( 'LDAPAuthentication2' );
wfLoadExtension( 'PluggableAuth' );
wfLoadExtension( 'LDAPProvider' );
$LDAPAuthentication2AllowLocalLogin = true;
$LDAPAuthentication2UsernameNormalizer = true;
$LDAPProviderDomainConfigs = "/etc/mediawiki/ldapprovider-aaa.json";
$wgDebugLogGroups['PluggableAuth'] = "/var/log/mediawiki/debug-{$wgDBname}.log";
$wgDebugLogGroups['MediaWiki\\Extension\\LDAPProvider\\Client'] = "/var/log/mediawiki/debug-{$wgDBname}.log";
$wgDebugLogGroups['LDAPAuthentication2'] =  "/var/log/mediawiki/debug-{$wgDBname}.log";
$wgDebugLogGroups['LDAPAuthorization'] = "/var/log/mediawiki/debug-{$wgDBname}.log";
$wgDebugLogGroups['LDAPProvider'] = "/var/log/mediawiki/debug-{$wgDBname}.log";
wfLoadExtension( 'Cite' );
wfLoadExtension( 'Mpdf' );
$wgMpdfTab = true;
$wgMpdfToolboxLink = true;

Logs

#Local user

2022-08-05 13:43:13 wikiaaa.example.com wikiaaa: In execute()
2022-08-05 13:43:13 wikiaaa.example.com wikiaaa: Getting PluggableAuth singleton
2022-08-05 13:43:13 wikiaaa.example.com wikiaaa: Class name: MediaWiki\Extension\LDAPAuthentication2\PluggableAuth
2022-08-05 13:43:13 wikiaaa.example.com wikiaaa: Authentication failure.
2022-08-05 13:43:13 wikiaaa.example.com wikiaaa: ERROR: Could not authenticate

# LDAP user
2022-08-05 13:45:34 wikiaaa.example.com wikiaaa: In execute()
2022-08-05 13:45:34 wikiaaa.example.com wikiaaa: Getting PluggableAuth singleton
2022-08-05 13:45:34 wikiaaa.example.com wikiaaa: Class name: MediaWiki\Extension\LDAPAuthentication2\PluggableAuth
2022-08-05 13:45:35 wikiaaa.example.com wikiaaa: Setting LDAP_OPT_PROTOCOL_VERSION to 3
2022-08-05 13:45:35 wikiaaa.example.com wikiaaa: Setting LDAP_OPT_REFERRALS to 0
2022-08-05 13:45:35 wikiaaa.example.com wikiaaa: Setting LDAP_OPT_DEREF to 1
2022-08-05 13:45:35 wikiaaa.example.com wikiaaa: MediaWiki\Extension\LDAPProvider\Client::getSearchString: User DN is: 'cn=user1,cn=Users,dc=example,dc=com'
2022-08-05 13:45:35 wikiaaa.example.com wikiaaa: Ran LDAP search for '(sAMAccountName=user1)' in 0,0016958713531494 seconds.
Bawolff (نقاشمساهمات)

please set $wgShowExceptionDetails=true;

Jl-mws (نقاشمساهمات)

For an LDAP User, I got

[7dfc41e030b5d57f84ec0e88] /index.php/Sp%C3%A9cial:PluggableAuthLogin MWException from line 89 of /var/lib/mediawiki/extensions/LDAPAuthentication2/src/PluggableAuth.php: The UsernameNormalizer for LDAPAuthentiation2 should be callable

Backtrace:

#0 /var/lib/mediawiki/extensions/LDAPAuthentication2/src/PluggableAuth.php(60): MediaWiki\Extension\LDAPAuthentication2\PluggableAuth->normalizeUsername()
#1 /var/lib/mediawiki/extensions/PluggableAuth/includes/PluggableAuthLogin.php(36): MediaWiki\Extension\LDAPAuthentication2\PluggableAuth->authenticate()
#2 /usr/share/mediawiki/includes/specialpage/SpecialPage.php(600): PluggableAuthLogin->execute()
#3 /usr/share/mediawiki/includes/specialpage/SpecialPageFactory.php(635): SpecialPage->run()
#4 /usr/share/mediawiki/includes/MediaWiki.php(307): MediaWiki\SpecialPage\SpecialPageFactory->executePath()
#5 /usr/share/mediawiki/includes/MediaWiki.php(945): MediaWiki->performRequest()
#6 /usr/share/mediawiki/includes/MediaWiki.php(548): MediaWiki->main()
#7 /usr/share/mediawiki/index.php(53): MediaWiki->run()
#8 /usr/share/mediawiki/index.php(46): wfIndexMain()
#9 {main}

It works, with errors, for a local account

Malyacko (نقاشمساهمات)

@Jl-mws If you still run MediaWiki 1.35.4 then you run an outdated insecure software version. Please update to a supported version for your own safety.

Jl-mws (نقاشمساهمات)
Jl-mws (نقاشمساهمات)

Several points, for your information:

In the ldapprovider.json :

  • the attributes requires lowercase despite their regular name ie 'displayName' for example

so ldapprovider.json (extract) become :

                        "usernameattribute": "samaccountname",
                        "realnameattribute": "displayname",
                        "emailattribute": "mail",
                        "grouprequest": "MediaWiki\\Extension\\LDAPProvider\\UserGroupsRequest\\UserMemberOf::factory",
                        "presearchusernamemodifiers": [ "spacestounderscores", "lowercase" ]

  • the require.group require the "Full DN name" ie "CN=wikiaaa,CN=Users,dc=example,dc=com" even if short name are show and revolved by LDAPProvider/maintenance/ShowUserGroups.php

I was using the short name for configuration clarity, it doesn't work

After upgrade to 1.38 website is showing only blank white page

9
Vikasnd (نقاشمساهمات)

I upgraded from 1.35.7 to 1.38, ran the update script for database.

Then ran the website. on front page it showed 'deprecated...' message for 3-4 extensions and showed blank page. So I disabled the related extensions. Then again browsed the site. This time then I started gettign white blank page with no content at all. I looked at error log, it had nothing.

I changed the directory back to 1.37 for now. Please suggest what I should be looking and fixing.

Thanks Vikas

Jonathan3 (نقاشمساهمات)

Maybe remove or upgrade all extensions.

Jonathan3 (نقاشمساهمات)

Maybe check LocalSettings.php for errors introduced when you got rid of the extensions.

Vikasnd (نقاشمساهمات)

Diff'ed the file and checked it, but nothing is different than comment mark on few extensions.

Bawolff (نقاشمساهمات)

Verify you have errors turned on in php.ini (see How to debug)

Vikasnd (نقاشمساهمات)

I have this turned on already.

Malyacko (نقاشمساهمات)
Vikasnd (نقاشمساهمات)

This did not help. There was still blank page.


So I took off all extensions, still it was blank page.


Then lastly I took off the 'foreground' skin that was being used. Then it started showing the page. I upgraded the skin, it looked better. Still figuring out other things, but this is how it was resolved. But there were no logs created to note whatever issue it was having. Would have helped a lot if there was some log written..


Thanks to all of you.

Jonathan3 (نقاشمساهمات)

Good stuff. I like foreground but seem to have had some sort of problem with it during the last few MW upgrades. I'm pleasantly surprised it works on 1.38 :-)

Upload Files Error: Could not open lock file for "mwstore://local-backend/local-public/..."

2
멍한오리 (نقاشمساهمات)

Hello, I run MediaWiki using Ubuntu 20.04 and XAMPP.

In order to solve this upload problem, I set the owner of the "Images" directory to www-date and set the permission to 755, but the problem has not been solved.

I can't solve this problem anymore because I'm a beginner of web server operation. If there is any information related to this, please let me know.

Thank you.

Bawolff (نقاشمساهمات)

For starters its www-data not www-date.

XAMPP is a bit of an odd choice if using ubuntu. Normally you would use ubuntu's builtin package manager (e.g. apt).

If using xampp, apache may be running as a different user and not www-data, so its possible that that is not the correct owner for the files.

رد على "Upload Files Error: Could not open lock file for "mwstore://local-backend/local-public/...""

Mediawiki 1.37 mit Kerberos und LDAP Anmelde - Button aktivieren

2
Dansnider (نقاشمساهمات)

Mediawiki 1.37.0, PHP 7.4.26: Wir betreiben mehrere Wikis für unsere Kunden. Die laufen alle mit Kerberos und LDAP Authentifizierung. Zudem ist das Extension ‘Auth_remoteuser’ installiert. Ich habe jedoch keine Möglichkeit mich in den Wikis mit dem Admin Account anzumelden, obwohl dieser bei der Installation in den Wikis erstellt wurde. Der Wiki Admin Account ist bei uns nicht in der AD erfasst. Der Button für die Anmeldung in die Wikis ist nicht vorhanden. Wie kann ich diesen trotz Kerberos und LDAP aktivieren. Kann mir da jemand einen Tipp geben?

Malyacko (نقاشمساهمات)
رد على "Mediawiki 1.37 mit Kerberos und LDAP Anmelde - Button aktivieren"
Pouyamoradzad (نقاشمساهمات)

Hello I hope everyone is doing well I get the error below when I click on the option to create a new item

This action has been automatically identified as harmful, and therefore disallowed. If you believe your action was constructive, please inform an administrator of what you were trying to do. A brief description of the abuse rule which your action matched is: Spam I haven't broken any law and I think the system has made a mistake in this case, thank you for opening my access. thank you

Malyacko (نقاشمساهمات)

@Pouyamoradzad Hi, what is a "new item", and where? Please read "Post a new question" in the sidebar. Thanks!

Pouyamoradzad (نقاشمساهمات)

HI...THE CREAT THE NEW ITEM PART IS ON WIKIDATA WEBSITE AND AFTER SEARCHING ON WEB FOR SOLUTION THAT TAKE ME HERE TO HELP ME IN THIS CASE

Malyacko (نقاشمساهمات)

@Pouyamoradzad See the error message that you posted. What is unclear with the error message?

Bawolff (نقاشمساهمات)

As the error said, complain to an admin. If this was at wikidata, complain to a wikidata admin. We arent wikidata admins at this website.

Pouyamoradzad (نقاشمساهمات)

i know ...but the wikidata talk page redirected me to this site for support and give permissions from admins

Bawolff (نقاشمساهمات)

then you probably misunderstood the talk page.

رد على "PROBLEM AND ERROR WHEN I WANT TO Create a new Item"
Marx.FelipeForte (نقاشمساهمات)

For some reason, changing the language of the site changes the font-size as well.

What is responsible for this behavior, and how can this change be removed so that e.g. both English and Russian languages produce a text of the same size?

Bawolff (نقاشمساهمات)

It might depend on your browser config and be different between users. Some web browsers use different fonts for different languages.

You can probably fix by setting a specific font in Mediawiki:common.css

رد على "Font size for certain languages"
79.183.193.18 (نقاشمساهمات)

MediaWiki 1.38.2 website without any non-core extensions or skins installed.

Skin:Vector not responsive by default but I understand from its webpage that there is an experimental way to make responsive.

1) Should I just add wgVectorResponsive = true; to LocalSettings.php?

2) Is this experimental option SEO friendly from your experience? Would you recommend not using it and preferring another approach to get screen-responsivness?

79.183.193.18 (نقاشمساهمات)

Adding $wgVectorResponsive = true; to LocalSettings.php didn't make the website responsive.

Jonathan3 (نقاشمساهمات)

Maybe you need to upgrade Vector? Just a guess.

رد على "How to make skin:Vector responsive?"
Guillaume Taillefer (نقاشمساهمات)

I'm trying to use PdfHandler and I have convert and gs but not pdfinfo (which acccording to the page is why I'm getting a 0 x 0 pixels things). Apparently I have to download xpdf-utils from here: https://www.xpdfreader.com/download.html,

but I'm not sure about two things:

  1. Am I supposed to get XpdfReader or just Xpdf?
  2. If I download one of these how and where do I put it Mediawiki, meaning where do I put it in my file system, or if it is done through ssh what commands do I need to use?

I know that my hosting service is a Linux x86_64 system so if I need to get XpdfReader Linux 64.

Thanks

Jonathan3 (نقاشمساهمات)

If it helps, I used sudo apt install poppler-utils

It's listed as an alternative so presumably I did it because I found it easier.

رد على "How to download xpdf for pdfinfo onto Mediawiki"