Movatterモバイル変換


[0]ホーム

URL:


Jump to content
MediaWiki
Search

Project:Support desk

Add topic
From mediawiki.org
Latest comment:24 minutes ago by Techietubby in topicHow can I configure OpenLDAP users on Mediawiki 1.43.5
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'sSpecial: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 theweb 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 "Add topic".

Lua Error

[edit]

Myprevious attempt to solve an issue with my wiki made some progress and fixed a few errors, but turned up a new one: "Lua error: bad argument #1 to "get" (not a valid title)." The suggestions in the related threads I found (1,2) mention "JsonConfig", but I've enabled both "JsonConfig" and "JsonConfigLuaSupport" in LocalSettings and have installed the "REL1_43" (1.2.0) version of the former and the error remains. The following is the backtrace:

  1. (tail call): ?
  2. [C]: in function "error"
  3. MWServer.lua:81: ?
  4. (tail call): ?
  5. (tail call): ?
  6. Module:TNT:162: in function "loadData"
  7. Module:TNT:181: ?
  8. (tail call): ?
  9. (tail call): ?
  10. Module:Uses_TemplateStyles:21: in function "renderBox"
  11. Module:Uses_TemplateStyles:111: ?
  12. (tail call): ?
  13. mw.lua:527: ?
  14. (tail call): ?
  15. [C]: in function "xpcall"
  16. MWServer.lua:99: in function "handleCall"
  17. MWServer.lua:313: in function "dispatch"
  18. MWServer.lua:52: in function "execute"
  19. mw_main.lua:7: in main chunk
  20. [C]: ?

Any idea what to do to solve this? –Noha307 (talk)23:44, 6 October 2025 (UTC)Reply

I tried creating a file named "CommonSettings.php" in the "public_html/w" folder and copy-pasting the code from apage on phabricator into it and adding either "require_once("public_html/w/CommonSettings.php");" or "require_once("CommonSettings.php");" to "LocalSettings.php" based on the instructions onManual:CommonSettings.php, but it didn't work. –Noha307 (talk)04:11, 20 October 2025 (UTC)Reply
@Noha307: If you aren't aware of it yet, you might have a look at your site'sCategory:Pages with script errors page since it collects where Lua errors appear.
For example, it liststhis page which points to a missing extension,TitleBlacklist, that may help you resolve part of the problem. --MarkAHershberger(talk)14:09, 21 October 2025 (UTC)Reply
I'm suffering from the exact same lue error/backtrace message. I also required TitleBlacklist - which I enabled and fixed it's associated error message - but this hasn't fixed the inital Lua error: bad argument #1 to "get" (not a valid title) error. @Noha307, have you been able to fix the issue?~2025-30174-48 (talk)22:17, 26 October 2025 (UTC)Reply
@~2025-30174-48 I did the same – download and enable TitleBlacklist – and it didn't fix the Lua error either. I haven't had a chance to browse the pages with script errors category in detail yet though. Would it be possible for you to link to your wiki so I could compare? –Noha307 (talk)23:56, 26 October 2025 (UTC)Reply
My wiki looked the exact same as yours with the same errors and backtraces - I've solved the issue by fixing the Json extension config in my LocalSettings.
I changed it to the code below from another support thread on here and the error is resolved:
// Safety: before extension.json, these values were initialized by JsonConfig.php if ( !isset( $wgJsonConfigModels ) ) { $wgJsonConfigModels = []; } if ( !isset( $wgJsonConfigs ) ) { $wgJsonConfigs = []; } $wgJsonConfigEnableLuaSupport = true; // https://www.mediawiki.org/wiki/Extension:JsonConfig#Configuration $wgJsonConfigModels['Tabular.JsonConfig'] = 'JsonConfig\JCTabularContent'; $wgJsonConfigs['Tabular.JsonConfig'] = [ 'namespace' => 486, 'nsName' => 'Data', // page name must end in ".tab", and contain at least one symbol 'pattern' => '/.\.tab$/', 'license' => 'CC0-1.0', 'isLocal' => false, ]; // Enable Tabular data namespace on Commons - T148745 $wgJsonConfigInterwikiPrefix = 'commons'; $wgJsonConfigs['Tabular.JsonConfig']['remote'] = [ 'url' => 'https://commons.wikimedia.org/w/api.php' ];~2025-30174-48 (talk)20:56, 27 October 2025 (UTC)Reply
@~2025-30174-48: Thank you so much! Adding that code seems to have fixed it – or at least the most immediate error anyway. I particularly appreciate you specifying which file it goes in as well.
I'm still getting a "the time allocated for running scripts has expired" error after the reflist template loads 66 references, but at least its getting to that point now. –Noha307 (talk)03:56, 2 November 2025 (UTC)Reply

┌───────────────────────┘
So, according toone thread, I need to change max execution time, which can be found in php.ini. (Although I am suspicious because it seems like it shouldn't take that long to load 66 references. Could there be another cause, such as a missing template or extension that could prolong it?) However, adifferent page seems to suggest that the change can be made to LocalSettings.php. While I do know where the latter file is, I don't how I should change it. What code do I need to add? –Noha307 (talk)01:24, 3 November 2025 (UTC)Reply

@Noha307: Sorry for the late reply, but you should be able to useset_time_limit() in yourLocalSettings.php. If you really want to setmax_execution_time in yourLocalSettings.php, you can do that like so:
ini_set("max_execution_time",120);
--MarkAHershberger(talk)01:36, 12 November 2025 (UTC)Reply
Strangely, bothset_time_limit() andmax_execution_time don't seem to change much, if anything. (What's the difference between them? According to athread, it's that one returns an error warning and the other doesn't?) The number of references it loads every time the page is refreshed fluctuates in a roughly single digit range no matter what is entered – and I'm not even sure that's connected. I even tried some ludicrously high values (e.g. 48000) and it didn't help. The only thing that is consistent is that setting the value to "1" gives me a 500 error when I try to load a page.
So, I importedTemplate:Harvard citation Wikipedia, as it was missing from my wiki and at some point thereafterone of the pages stopped having reference errors. (Note: I have never used that template anywhere on my wiki.) However, two others were stuck failing after loading the same number of references as before. After a few more imports, addingTemplate:Kbd finally did the trick. Woohoo! I guess I should have listened to your suggestion to look through the pages with script errors category. My apologies for wasting your time and thank you again for all of your assistance!
One final note: From the beginning I was intent on describing every step in this process in the event it might prove informative to someone with the same problem in the future. I didn't want to be likeDenverCoder9. –Noha307 (talk)07:06, 17 November 2025 (UTC)Reply

How to display images in search results

[edit]

Hi! I've recently installedhttps://wiki.lilypond.community, a wiki for theLilyPond music typesetter (which is used on Wikipedia throughExtension:Score). Pages consist of small snippets of LilyPond code, with explanatory comments and an image of the result. Is there any way to make the lists of search results (e.g.,this) display these images? This would be very helpful for users to quickly finding snippets when they don't know the proper keywords.Jean Abou Samra (talk)16:35, 31 October 2025 (UTC)Reply

@Jean Abou Samra: TheSearchThumbs extension should do what you need. --MarkAHershberger(talk)01:46, 12 November 2025 (UTC)Reply
Thanks a lot, this looks like exactly what I need. Unfortunately, it didn't work on my wiki after installingPageImages andSearchThumbs and running the maintenance scriptinitImageData.php fromPageImages as specified in the docs. I strongly suspect it's because the images on this wiki are not inserted with the normal wikitext markup but as inline SVG using<img src="data:image/svg+xml;base64,...">. This is because they're generated by anextension I wrote myself (relevant part of the code here), not MediaWiki'sExtension:Score, because this wiki has somewhat peculiar needs. While writing the extension I found it much simpler to just inline the SVG than figure out how to store the images as files and delete the old images when music inputs change. What do you think is the easiest way out of this?Jean Abou Samra (talk)16:10, 14 November 2025 (UTC)Reply
@Jean Abou Samra: If you are generating the SVGs inline, then it is going to be difficult to show them as part of the search results. So, I'd say that you need to update your work to use separate files or, alternatively, write up what your special needs are that the Score extension doesn't meet.
Of course, you'd have to make sure the files generated by Score would work as a search result thumbnail, but I think that is a more solvable problem. --MarkAHershberger(talk)16:36, 19 November 2025 (UTC)Reply

Red line around logo

[edit]

I have just migrated my wiki from an old version to version 1.44. It has all gone well except that I still have a bold red line around my logo and the link for the Main Page. I assume these were there to remind you to change the logo, which I have done, so how do I get rid of the lines? Here is a link to my wiki:JP1 Remotes Wiki Thanks.Robman94 (talk)22:04, 3 November 2025 (UTC)Reply

@Robman94 Not sure what you are trying to say - please clarify.Leaderboard (talk)05:30, 5 November 2025 (UTC)Reply
Are you able to click on the link to my wiki? If so, it should be obvious what I am describing.Robman94 (talk)19:03, 5 November 2025 (UTC)Reply
@Robman94 No, it is not obvious as I cannot see some red line around some logo after clicking on your link. Please be more specific where you see what, provide a screenshot, inspect the problem via your web browser's development tools, etc. Thanks!Malyacko (talk)20:58, 5 November 2025 (UTC)Reply
Here is a screenshot:wzVcrVL.png (1920×1042)Robman94 (talk)22:01, 5 November 2025 (UTC)Reply
Are you familiar with what a fresh install of Mediawiki looks like? The default logo and the link to the main page both have think red lines around them, presumably to remind you to change them. The question is, what is supposed to make them go away once you do change them? The fact that you can't see them when you go to my wiki tends to imply that the code that generates the red lines must be stored locally in the cache or something, but I've done ?action=purge already and that didn't clear it. Does anyone here know how that line is generated and how to clear it?Robman94 (talk)13:55, 6 November 2025 (UTC)Reply
I have never seen those red lines before on any new install, and I'm not seeing them in YOUR wiki neither. However, you can try to inspect them with the browser's developer tools (hit the F12 key in your keyboard) and try to locate from which CSS it comes from.Ciencia Al Poder (talk)22:31, 6 November 2025 (UTC)Reply
Yeah, I brought up the wiki on a different browser (Firefox) and I don't see them there either, but I do see them using Chrome and Edge. You can see them on the screenshot thought, right? (talk)02:01, 7 November 2025 (UTC)Reply
@Robman94: Maybe you have an extension installed in Chrome that causes the border? I see it in the screenshot, but when I visit in Chrome, I don't see it.--MarkAHershberger(talk)02:03, 12 November 2025 (UTC)Reply
Just a quick update to say that I am still struggling with this. I have spent many days with Copilot trying absolutely every suggestion that it can think of, but still the red lines persist. I only see them in Edge and Chrome, not Firefox, but that's because I tested the site in the first 2 browsers before I uploaded my logo. So, my advice for anyone installing a new wiki is, be sure to load your logo before you test the site, or you'll never get rid of these red lines. I've even tried completely uninstalling and re-installing the browser, but that didn't work either. I am currently downloading all of my wiki files so that I can scan them using Notepad++ to try and find where there the "border: 6px solid red !important" text is coming from, so I can delete it.Robman94 (talk)19:00, 18 November 2025 (UTC)Reply
@Robman94:: Try adding?debug=true to the url and see if the border shows up. If it does, then you'll be able to use the browser's DOM inspector to find the source. --MarkAHershberger(talk)16:42, 19 November 2025 (UTC)Reply
Thanks for the tip, but it turns out that something that we did yesterday must have fixed it, because I don't have any red lines today. I must have spent over 8 hours with Copilot trying every trick it could think of, but sometimes you just have to wait for cache to expire, no matter how much we purged it.Robman94 (talk)19:59, 19 November 2025 (UTC)Reply

Module:Message box/doc - transclusion not working

[edit]

I'm trying to add a new category in Module:Message box/doc exactly like this:

[[Category:Testing Modules]]

<includeonly>{{Sandbox other||<!-- Categories below this line; interwikis at Wikidata -->[[Category:Modules{{#translation:}}]][[Category:Testing Modules]]}}</includeonly><noinclude>[[Category:Module documentation pages{{#translation:}}]]</noinclude>| #default={{#invoke:Template translation|renderTranslatedTemplate|template=Module:Message box/doc|noshift=1|uselang={{int:lang}}}}}}

But this new category isn't visible in the category list in the Module:Message box.

Am I doing something wrong or is this a bug in the module?

I repeated "translate:" and "purge" but that didn't help solve the problem.Kszwaba (talk)14:02, 12 November 2025 (UTC)Reply

Project:Support desk/* Module:Message box/doc - transclusion not working */ Reply~2025-32806-54 (talk)02:14, 13 November 2025 (UTC)Reply
Did you actually install theTranslate extension? If not, you should remove all the #translation bits and anything related to it. The version of the doc from the English Wikipedia is much easier to adapt to third party wikis.Tactica (talk)03:30, 13 November 2025 (UTC)Reply

My version Mediawiki is 1.43.1 and Module:Message box:16:31, 2 September 2023 Module:Message box>Pppery 18,558 bytes +18,558

PHP Warning at the end of update

[edit]

I updated from 1.43.1 to 1.44.2 and noticed this message at the end:

PHP Warning: Undefined array key "directory" in /var/www/html/w/includes/filebackend/FileBackendGroup.php on line 133

The wiki seems to be working ok, if maybe a little slower than before. I then went and upgraded PHP from 8.1 to 8.3. The message is still the same. What does this mean?Buster2223 (talk)23:08, 13 November 2025 (UTC)Reply

OK I am fairly sure that this is slowing down the wiki. Images that used to load instantly now take a second, and large pages are delayed by several seconds. My guess is that the primary path to the images doesn't work, then it looks for a fallback and finds it.

The documentation is fairly non-existent onManual:FileBackendGroup.php.

Could someone please help on this?Buster2223 (talk)17:39, 16 November 2025 (UTC)Reply

@Buster2223: This isa known issue. You can subscribe to the bug in Phabricator if you want to follow along. --MarkAHershberger(talk)17:27, 19 November 2025 (UTC)Reply
Thank you for the information. I found the same errors in my log that the others found. I also have the same problem with thumbnails.
In my opinion this should not be "low priority". It dramatically slows down MediaWiki when pages with more than a few images are loaded. I would discourage anyone from updating from 1.43 to 1.44 until this is fixed.Buster2223 (talk)20:37, 19 November 2025 (UTC)Reply
SeeBug management/Development prioritization#Priority.Tactica (talk)02:00, 20 November 2025 (UTC)Reply
Very reassuring! But ok, I would hope that this will get sorted out by the time 1.45 is released, which is scheduled for December 2025, and so it should be on everyone's to do list for the next few weeks.Buster2223 (talk)13:11, 20 November 2025 (UTC)Reply

I think I found the problem. It has to do with the recently implemented Wikimedia Foundation User Agent Policy. As far as I can tell, Commons works but the thumbnail directory is being blocked because the User agent needs to be identified. The fix is described here:InstantCommons#Set_custom_user_agent. I changed LocalSettings, ran an update, and the error message is gone. The warnings have also disappeared from the error log.Buster2223 (talk)14:34, 20 November 2025 (UTC)Reply

$wgUseInstantCommons=false;$wgForeignFileRepos[]=['class'=>ForeignAPIRepoWithFixedUA::class,'name'=>'wikimediacommons','apibase'=>'https://commons.wikimedia.org/w/api.php','url'=>'https://upload.wikimedia.org/wikipedia/commons','thumbUrl'=>'https://upload.wikimedia.org/wikipedia/commons/thumb','directory'=>$wgUploadDirectory,'hashLevels'=>2,'transformVia404'=>true,'fetchDescription'=>true,'descriptionCacheExpiry'=>43200,'apiThumbCacheExpiry'=>0,];classForeignAPIRepoWithFixedUAextends\ForeignAPIRepo{publicstaticfunctiongetUserAgent(){global$wgCanonicalServer;$mediaWikiVersion='MediaWiki/'.MW_VERSION;return"$mediaWikiVersion ($wgCanonicalServer) ForeignAPIRepo/T400881";}}

Buster2223 (talk)14:34, 20 November 2025 (UTC)Reply

SpecialPages returns error

[edit]

I updated this wiki instance a while back, currently running REL1_43 and the specialpages throw this error;


```

[aRevfSkKRKsH1Ux47UpwvQAAAG4] /go/Special:SpecialPages ArgumentCountError: Too few arguments to function MediaWiki\Specials\SpecialRenameUser::__construct(), 0 passed in /srv/www-sugarlabs/wiki/vendor/wikimedia/object-factory/src/ObjectFactory.php on line 240 and exactly 7 expected

Backtrace:

from /srv/www-sugarlabs/wiki/includes/specials/SpecialRenameUser.php(48)

#0 /srv/www-sugarlabs/wiki/vendor/wikimedia/object-factory/src/ObjectFactory.php(240): MediaWiki\Specials\SpecialRenameUser->__construct()

#1 /srv/www-sugarlabs/wiki/vendor/wikimedia/object-factory/src/ObjectFactory.php(149): Wikimedia\ObjectFactory\ObjectFactory::getObjectFromSpec()

#2 /srv/www-sugarlabs/wiki/includes/specialpage/SpecialPageFactory.php(1559): Wikimedia\ObjectFactory\ObjectFactory->createObject()

#3 /srv/www-sugarlabs/wiki/includes/specialpage/SpecialPageFactory.php(1594): MediaWiki\SpecialPage\SpecialPageFactory->getPage()

#4 /srv/www-sugarlabs/wiki/includes/specials/SpecialSpecialPages.php(61): MediaWiki\SpecialPage\SpecialPageFactory->getUsablePages()

#5 /srv/www-sugarlabs/wiki/includes/specials/SpecialSpecialPages.php(50): MediaWiki\Specials\SpecialSpecialPages->getPageGroups()

#6 /srv/www-sugarlabs/wiki/includes/specialpage/SpecialPage.php(728): MediaWiki\Specials\SpecialSpecialPages->execute()

#7 /srv/www-sugarlabs/wiki/includes/specialpage/SpecialPageFactory.php(1724): MediaWiki\SpecialPage\SpecialPage->run()

#8 /srv/www-sugarlabs/wiki/includes/actions/ActionEntryPoint.php(504): MediaWiki\SpecialPage\SpecialPageFactory->executePath()

#9 /srv/www-sugarlabs/wiki/includes/actions/ActionEntryPoint.php(146): MediaWiki\Actions\ActionEntryPoint->performRequest()

#10 /srv/www-sugarlabs/wiki/includes/MediaWikiEntryPoint.php(200): MediaWiki\Actions\ActionEntryPoint->execute()

#11 /srv/www-sugarlabs/wiki/index.php(58): MediaWiki\MediaWikiEntryPoint->run()

#12 {main}

```

This upgrade was done some months back, any help would be appreciated.~2025-33486-35 (talk)23:11, 14 November 2025 (UTC)Reply

Is there a RenameUser extension in your extensions directory ? Try disabling and removing that, it got merged into core at some point. —TheDJ (Not WMF) (talkcontribs)09:19, 15 November 2025 (UTC)Reply
This worked! Thank you! Seems we also didn't have wgSecretKey set, and I had to set that too, I'm guessing this was enforced in some version.
~2025-34362-12 (talk)13:09, 17 November 2025 (UTC)Reply

How do I upload the files to the web server on Android mobile

[edit]

Hi, since I am not familiar with tech-savy stuff and being new to coding in general, I don't know how to run a seperate wiki website. I already downloaded and extracted the file in mobile. I tried to throughly read the process multiple times but it seemed too complicated for me. The thing I need help with is the uploading the files to the web server. Does anyone help me with the basics of installing MediaWiki on Android mobile?VoitieVelocity (talk)01:59, 15 November 2025 (UTC)Reply

@VoitieVelocity: Which web server? You're going to need MySQL or another database server as wellJasper Deng (talk)06:27, 15 November 2025 (UTC)Reply
I don't know what web server to use and I don't know how to use a database server, it is so complicated.VoitieVelocity (talk)07:05, 15 November 2025 (UTC)Reply
Yes, running/hosting a webserver from scratch is indeed complex. I would say that it is very hard to do from a mobile device, i would suggest to use a desktop machine for any serious work where you need lots of information to look at and to enter.
Alternatively you might consider using a 3rd party wikihosting service likemiraheze or anotherwiki farm. —TheDJ (Not WMF) (talkcontribs)09:15, 15 November 2025 (UTC)Reply
Welp, I tried making articles for a certain specific topic in English Wikipedia, but it takes time for the draft to get accepted into being a full article and some things may not be considered notable. So I might consider making a seperate wiki website, so that the things related to the topic that are not considered notable would get moved to the seperate wiki website instead. I have experience in using Fandom and I would like to say that it is hard to reach a lot of people since many people might not know the existence of other hosting services that hosts wikis besides Wikipedia.VoitieVelocity (talk)09:51, 15 November 2025 (UTC)Reply
I might try finishing the draft again and see if that draft gets accepeted into being a full article in English Wikipedia. If that got declined as well, I think I won't likely to create a seperate wiki website using MediaWiki, I still go on Fandom to continue contributing to that unfinished wiki which needs a lot of improvements. Yeah, I am busy on Fandom because I edit a lot of wikis.VoitieVelocity (talk)14:48, 15 November 2025 (UTC)Reply
Running a MediaWiki website on your own is inherently complex. There are some sites that offer fully-managed solutions for it, but it's rare, and you'll have to pay either way.Jasper Deng (talk)22:21, 15 November 2025 (UTC)Reply

Unload Wikibase

[edit]

Hello MediaWiki, I recently installed the Wikibase extension version 1.44 for my Wiki, which is version 1.44.2, but the update script doesn't want to update and gives an error due to a database issue. Моя вики ru.encyclowiki.ru@Therudekiweweffffffff (talk)14:35, 18 November 2025 (UTC)Reply

You should just be able to remove thewfLoadExtension line for your Wikibase installation and it should work. --MarkAHershberger(talk)16:52, 19 November 2025 (UTC)Reply

How can I configure OpenLDAP users on Mediawiki 1.43.5

[edit]

I have a Rocky Linux-9 server running OpenLDAP over sssd. I can login, sudo, etc., so I know that LDAP is working. I have also created an ldapprovider.json file using the same values:

{ "my.ldap":{   "connection":{     "server":"ldap.my.com",     "port":636,     "enctype":"ssl",     "user":"cn=manager,dc=my,dc=com",     "pass":"Secret",     "options":{       "LDAP_OPT_DEREF":1     },     "basedn":"dc=my,dc=com",     "groupbasedn":"ou=groups,dc=my,dc=com",     "userbasedn":"ou=people,dc=my,dc=com",     "searchattribute":"uid",     "usernameattribute"=>"uid",     "realnameattribute":"cn",     "emailattribute":"mail",     "searchstring":"uid=USER-NAME,ou=people,dc=my,dc=com"   } }}

==========================================================

My LocalSettings.php looks as follows:

# Load extensionswfLoadExtensions([       'PluggableAuth',       'Auth_remoteuser',       'LDAPProvider',       'LDAPAuthentication2',       'LDAPAuthorization',       'LDAPUserInfo']);# LDAP configuration$wgLDAPUseLDAP=true;$wgLDAPServers=['ldaps://ldap.my.com'];$wgLDAPBaseDNs=['dc=my,dc=com'];$wgLDAPRDN='$username';$wgLDAPUserFilter='(&(uid=$username)(objectClass=posixAccount))';$wgLDAPUserBaseDNs=['ou=people,dc=my,dc=com'];$wgLDAPAttributes=[   'realname'=>'cn',   'email'=>'mail',];$wgLDAPHygiene=true;# Path to the configuration file$wgLDAPProviderConf="$IP/../ldapprovider.json";#$wgLDAPProviderConf = '/var/www/html/mediawiki/ldapprovider.json';#$wgLDAPProviderConf = 'ldapprovider.json';$wgDebugLogGroups['ldap']='/var/log/mediawiki/ldap_debug.log';$wgShowExceptionDetails=true;// In any case we need to specify LDAP domain configs#$LDAPProviderDomainConfigs = "/var/www/html/mediawiki/ldapprovider.json";$LDAPProviderDomainConfigs="$IP/../ldapprovider.json";// If local login is supported as well, then these globals are still needed$wgPluggableAuth_EnableLocalLogin=true;#---------------Extension LDAPAuthentication2---------------$LDAPAuthentication2AllowLocalLogin=true;$LDAPAuthentication2UsernameNormalizer='strtolower';#---------------Extension LDAPProvider---------------$ldapJsonFile="$IP/../ldapprovider.json";$LDAPProviderDomainConfigs=$ldapJsonFile;$wgPluggableAuth_Config['Log In (LDAP)']=[   'plugin'=>'LDAPAuthentication2',   'data'=>[       'domain'=>'my.ldap'   ]];

==========================================================

If I try to create a user and it exists in my LDAP Mediawiki tells me it exists, however when I try to use LDAP login I see:

Internal error:

[aR2eEUL4sJI38jU5Dfmy5gAAAAc] /index.php?title=Special:PluggableAuthLogin TypeError: count(): Argument #1 ($value) must be of type Countable|array, null givenBacktrace:from /var/www/html/mediawiki/extensions/LDAPProvider/src/DomainConfigProvider/LocalJSONFile.php(50)#0 /var/www/html/mediawiki/extensions/LDAPProvider/src/DomainConfigProvider/LocalJSONFile.php(50): count()#1 /var/www/html/mediawiki/extensions/LDAPProvider/src/DomainConfigProvider/LocalJSONFile.php(70): MediaWiki\Extension\LDAPProvider\DomainConfigProvider\LocalJSONFile->__construct()#2 [internal function]: MediaWiki\Extension\LDAPProvider\DomainConfigProvider\LocalJSONFile::newInstance()#3 /var/www/html/mediawiki/extensions/LDAPProvider/src/DomainConfigFactory.php(102): call_user_func_array()#4 /var/www/html/mediawiki/extensions/LDAPProvider/src/ClientFactory.php(62): MediaWiki\Extension\LDAPProvider\DomainConfigFactory::getInstance()#5 /var/www/html/mediawiki/extensions/LDAPAuthentication2/src/PluggableAuth.php(254): MediaWiki\Extension\LDAPProvider\ClientFactory->getForDomain()#6 /var/www/html/mediawiki/extensions/LDAPAuthentication2/src/PluggableAuth.php(123): MediaWiki\Extension\LDAPAuthentication2\PluggableAuth->checkLDAPLogin()#7 /var/www/html/mediawiki/extensions/PluggableAuth/includes/PluggableAuthLogin.php(103): MediaWiki\Extension\LDAPAuthentication2\PluggableAuth->authenticate()#8 /var/www/html/mediawiki/includes/specialpage/SpecialPage.php(728): MediaWiki\Extension\PluggableAuth\PluggableAuthLogin->execute()#9 /var/www/html/mediawiki/includes/specialpage/SpecialPageFactory.php(1717): MediaWiki\SpecialPage\SpecialPage->run()#10 /var/www/html/mediawiki/includes/actions/ActionEntryPoint.php(504): MediaWiki\SpecialPage\SpecialPageFactory->executePath()#11 /var/www/html/mediawiki/includes/actions/ActionEntryPoint.php(146): MediaWiki\Actions\ActionEntryPoint->performRequest()#12 /var/www/html/mediawiki/includes/MediaWikiEntryPoint.php(200): MediaWiki\Actions\ActionEntryPoint->execute()#13 /var/www/html/mediawiki/index.php(58): MediaWiki\MediaWikiEntryPoint->run()#14 {main}

This is an internal wiki so I simply need LDAP user login without frills. A user should be able to see the content until logged-in.Techietubby (talk)11:09, 19 November 2025 (UTC)Reply

That line refers tocount( $this->configArray ), where configarray is$this->configArray = FormatJson::decode( file_get_contents( $jsonFilePath ), true ); which in turn implies an invalid json file. The extensions should probably improve it's error handling in situations like that, and I suggest you file tickets with the extension maintainer, or of course submit a gerrit change. —TheDJ (Not WMF) (talkcontribs)12:42, 19 November 2025 (UTC)Reply
specifically:"usernameattribute" => "uid" => is not valid json syntax. —TheDJ (Not WMF) (talkcontribs)12:50, 19 November 2025 (UTC)Reply
Tanks, well spotted! I have corrected that error and now see:
[aR2_X1Ib6tHgKpmHMXzE4wAAAJg] /index.php?title=Special:PluggableAuthLogin MWException: Could not bind to LDAP: (-1) Can't contact LDAP server
Backtrace:
from /var/www/html/mediawiki/extensions/LDAPProvider/src/Client.php(197)
#0 /var/www/html/mediawiki/extensions/LDAPProvider/src/Client.php(119): MediaWiki\Extension\LDAPProvider\Client->establishBinding()
#1 /var/www/html/mediawiki/extensions/LDAPProvider/src/Client.php(367): MediaWiki\Extension\LDAPProvider\Client->init()
#2 /var/www/html/mediawiki/extensions/LDAPAuthentication2/src/PluggableAuth.php(262): MediaWiki\Extension\LDAPProvider\Client->canBindAs()
#3 /var/www/html/mediawiki/extensions/LDAPAuthentication2/src/PluggableAuth.php(123): MediaWiki\Extension\LDAPAuthentication2\PluggableAuth->checkLDAPLogin()
#4 /var/www/html/mediawiki/extensions/PluggableAuth/includes/PluggableAuthLogin.php(103): MediaWiki\Extension\LDAPAuthentication2\PluggableAuth->authenticate()
#5 /var/www/html/mediawiki/includes/specialpage/SpecialPage.php(728): MediaWiki\Extension\PluggableAuth\PluggableAuthLogin->execute()
#6 /var/www/html/mediawiki/includes/specialpage/SpecialPageFactory.php(1717): MediaWiki\SpecialPage\SpecialPage->run()
#7 /var/www/html/mediawiki/includes/actions/ActionEntryPoint.php(504): MediaWiki\SpecialPage\SpecialPageFactory->executePath()
#8 /var/www/html/mediawiki/includes/actions/ActionEntryPoint.php(146): MediaWiki\Actions\ActionEntryPoint->performRequest()
#9 /var/www/html/mediawiki/includes/MediaWikiEntryPoint.php(200): MediaWiki\Actions\ActionEntryPoint->execute()
#10 /var/www/html/mediawiki/index.php(58): MediaWiki\MediaWikiEntryPoint->run()
#11 {main}
I shall also try to contact the plugin developer.Techietubby (talk)13:03, 19 November 2025 (UTC)Reply
I have now tested the connection using LDAPSEARCH and found that I could bind in clear. I also used JSONVALIDATE to check my ldap file and that is also ok. I now get a new error:
aR3OL_Q_6TYooanu46D4IwAAAFM] /index.php?title=Special:PluggableAuthLogin TypeError: MediaWiki\Config\HashConfig::__construct(): Argument #1 ($settings) must be of type array, null given, called in /var/www/html/mediawiki/extensions/LDAPProvider/src/DomainConfigFactory.php on line 77
Backtrace:
from /var/www/html/mediawiki/includes/config/HashConfig.php(52)
#0 /var/www/html/mediawiki/extensions/LDAPProvider/src/DomainConfigFactory.php(77): MediaWiki\Config\HashConfig->__construct()
#1 /var/www/html/mediawiki/extensions/LDAPAuthorization/src/Hook/PluggableAuthUserAuthorization.php(60): MediaWiki\Extension\LDAPProvider\DomainConfigFactory->factory()
#2 /var/www/html/mediawiki/extensions/LDAPAuthorization/src/Hook/PluggableAuthUserAuthorization.php(75): MediaWiki\Extension\LDAPAuthorization\Hook\PluggableAuthUserAuthorization->__construct()
#3 /var/www/html/mediawiki/includes/HookContainer/HookContainer.php(159): MediaWiki\Extension\LDAPAuthorization\Hook\PluggableAuthUserAuthorization::callback()
#4 /var/www/html/mediawiki/extensions/PluggableAuth/includes/HookRunner.php(49): MediaWiki\HookContainer\HookContainer->run()
#5 /var/www/html/mediawiki/extensions/PluggableAuth/includes/PluggableAuthLogin.php(145): MediaWiki\Extension\PluggableAuth\HookRunner->onPluggableAuthUserAuthorization()
#6 /var/www/html/mediawiki/includes/specialpage/SpecialPage.php(728): MediaWiki\Extension\PluggableAuth\PluggableAuthLogin->execute()
#7 /var/www/html/mediawiki/includes/specialpage/SpecialPageFactory.php(1717): MediaWiki\SpecialPage\SpecialPage->run()
#8 /var/www/html/mediawiki/includes/actions/ActionEntryPoint.php(504): MediaWiki\SpecialPage\SpecialPageFactory->executePath()
#9 /var/www/html/mediawiki/includes/actions/ActionEntryPoint.php(146): MediaWiki\Actions\ActionEntryPoint->performRequest()
#10 /var/www/html/mediawiki/includes/MediaWikiEntryPoint.php(200): MediaWiki\Actions\ActionEntryPoint->execute()
#11 /var/www/html/mediawiki/index.php(58): MediaWiki\MediaWikiEntryPoint->run()
#12 {main}Techietubby (talk)14:05, 19 November 2025 (UTC)Reply
I have done more testing and the latest version of OpenLDAP only supports SSL/TLS. If you connect in clear it will not decrypt passwords so you can only check usernames.
I tried both:
"port": 636,
"enctype": "ssl",
Returns: PluggableAuthLogin MWException: Could not bind to LDAP: (-1) Can't contact LDAP server
and
"port": 389,
"enctype": "tls",
Returns: /index.php?title=Special:PluggableAuthLogin MWException: Could not start TLS!
I think that more SSL/TLS configuration is required. My LDAP certs are self-signed and not the same as those of the LDAP servers themselves which are using fully-signed wildcard certs (*.acme.com) . My LDAP works perfectly on this server and is using sssd.
How can I contact the plugin developers?
# php ./extensions/LDAPProvider/maintenance/ShowUserInfo.php --username myuser--domain "my.ldap"
*******************************************************************************
NOTE: Do not run maintenance scripts directly, use maintenance/run.php instead!
      Running scripts directly has been deprecated in MediaWiki 1.40.
      It may not work for some (or any) scripts in the future.
*******************************************************************************
PHP Warning:  ldap_start_tls(): Unable to start TLS: Connect error in /var/www/html/mediawiki/extensions/LDAPProvider/src/PlatformFunctionWrapper.php on line 141
MWException from line 168 of /var/www/html/mediawiki/extensions/LDAPProvider/src/Client.php: Could not start TLS!
#0 /var/www/html/mediawiki/extensions/LDAPProvider/src/Client.php(118): MediaWiki\Extension\LDAPProvider\Client->maybeStartTLS()
#1 /var/www/html/mediawiki/extensions/LDAPProvider/src/Client.php(258): MediaWiki\Extension\LDAPProvider\Client->init()
#2 /var/www/html/mediawiki/extensions/LDAPProvider/maintenance/ShowUserInfo.php(49): MediaWiki\Extension\LDAPProvider\Client->getUserInfo()
#3 /var/www/html/mediawiki/maintenance/includes/MaintenanceRunner.php(703): MediaWiki\Extension\LDAPProvider\Maintenance\ShowUserInfo->execute()
#4 /var/www/html/mediawiki/maintenance/doMaintenance.php(100): MediaWiki\Maintenance\MaintenanceRunner->run()
#5 /var/www/html/mediawiki/extensions/LDAPProvider/maintenance/ShowUserInfo.php(76): require_once('...')
#6 {main}Techietubby (talk)08:39, 20 November 2025 (UTC)Reply
I have been testing my certificates and my LDAP server's CA cert is self-signed so: openssl s_client -CAfile /etc/openldap/certs/ca.pem -connect ldap1.com:636 returns: Verify return code: 21 (unable to verify the first certificate).
Is there a way to allow a self-signed certificate?Techietubby (talk)10:04, 20 November 2025 (UTC)Reply
I have done some more investigation and my LDAP server is using TLS-1.3 and if I run a check command I get the error message:
  1. echo "" | openssl s_client -connect ldap1.redacted.com:389 -starttls ldap -prexit -showcerts
New, TLSv1.3, Cipher is TLS_AES_256_GCM_SHA384
Server public key is 4096 bit
This TLS version forbids renegotiation.
Compression: NONE
Expansion: NONE
No ALPN negotiated
Early data was not sent
Verify return code: 21 (unable to verify the first certificate)
If I add: -no_tls1_3 to the command I just see the code: 21, therefore I suspect that the Wiki plugin needs to be able to either fall-back to TLS1.2 or to allow for a self-signed CA cert.
It would also be really nice if there were some working examples showing the contents of LocalSettings.php and ../ldapprovider.json enabling a connection to AD and OpenLDAP.Techietubby (talk)12:42, 20 November 2025 (UTC)Reply

@Techietubby:: We really need to improve error reporting. It looks like you're missing anauthorization section (example) in your.json file. --MarkAHershberger(talk)17:26, 19 November 2025 (UTC)Reply

Hi Mark,
I want all users and groups to have access. Do you have a JSON example of how I do this?Techietubby (talk)08:44, 20 November 2025 (UTC)Reply
@Techietubby:: After a bit of searching, I would tryobjectClass=user orobjectClass=person. (I also removed your other LDAP question from here since you also asked it below.) --MarkAHershberger(talk)23:30, 24 November 2025 (UTC)Reply
I spent a lot of time talking with Robert Vogel one of the LDAP plugin and we discovered the reason that the host wasn't connecting. He wrote this script and it showed that the OS needed the LDAP CA cert needed to be trusted by the OS.
<?php
error_reporting( -1 );
ini_set( 'display_errors', 1 );
$ldapconn = ldap_connect("ldaps://ldap.test.com:636") or die("Could not connect to LDAP server.");
ldap_set_option($ldapconn, LDAP_OPT_PROTOCOL_VERSION, 3) ;
ldap_set_option($ldapconn, LDAP_OPT_REFERRALS, 0) ;
if ($ldapconn) {
    $ldapbind = ldap_bind($ldapconn,  'cn=manager,dc=test,dc=com', 'passwd');
    if ($ldapbind) {
        echo "LDAP bind successful...";
    } else {
        echo "LDAP bind failed...";
    }
}
I fixed the trust by running:
echo "" | openssl s_client -connect ldap1.test.com:389 -starttls ldap -prexit -showcerts
You then manually extract the certificate (BEGIN/END) and create a .crt file. Copy this and update the certs store:
cp /etc/openldap/certs/ca.crt/etc/pki/ca-trust/source/anchors
update-ca-trust
systemctl restart httpd
I had to reboot the machine before the PHP script worked.Techietubby (talk)08:40, 26 November 2025 (UTC)Reply
I also ran the test scripts:
  1. php ./extensions/LDAPProvider/maintenance/CheckLogin.php --domain test.ldap --username user
*******************************************************************************
NOTE: Do not run maintenance scripts directly, use maintenance/run.php instead!
      Running scripts directly has been deprecated in MediaWiki 1.40.
      It may not work for some (or any) scripts in the future.
*******************************************************************************
Password:xxxxx
FAILED
  1. php ./extensions/LDAPProvider/maintenance/ShowUserGroups.php --domain test.ldap --username user
*******************************************************************************
NOTE: Do not run maintenance scripts directly, use maintenance/run.php instead!
      Running scripts directly has been deprecated in MediaWiki 1.40.
      It may not work for some (or any) scripts in the future.
*******************************************************************************
[e95937f41f0f556b795b5bd1] [no req]   TypeError: ldap_count_entries(): Argument #2 ($result) must be of type LDAP\Result, bool given
Backtrace:
from /var/www/html/mediawiki/extensions/LDAPProvider/src/PlatformFunctionWrapper.php(312)
#0 /var/www/html/mediawiki/extensions/LDAPProvider/src/PlatformFunctionWrapper.php(312): ldap_count_entries()
#1 /var/www/html/mediawiki/extensions/LDAPProvider/src/Client.php(329): MediaWiki\Extension\LDAPProvider\PlatformFunctionWrapper->count()
#2 /var/www/html/mediawiki/extensions/LDAPProvider/src/UserGroupsRequest/GroupUniqueMember.php(17): MediaWiki\Extension\LDAPProvider\Client->getUserDN()
#3 /var/www/html/mediawiki/extensions/LDAPProvider/src/Client.php(403): MediaWiki\Extension\LDAPProvider\UserGroupsRequest\GroupUniqueMember->getUserGroups()
#4 /var/www/html/mediawiki/includes/libs/objectcache/BagOStuff.php(217): MediaWiki\Extension\LDAPProvider\Client->MediaWiki\Extension\LDAPProvider\{closure}()
#5 /var/www/html/mediawiki/extensions/LDAPProvider/src/Client.php(404): Wikimedia\ObjectCache\BagOStuff->getWithSetCallback()
#6 /var/www/html/mediawiki/extensions/LDAPProvider/maintenance/ShowUserGroups.php(49): MediaWiki\Extension\LDAPProvider\Client->getUserGroups()
#7 /var/www/html/mediawiki/maintenance/includes/MaintenanceRunner.php(703): MediaWiki\Extension\LDAPProvider\Maintenance\ShowUserGroups->execute()
#8 /var/www/html/mediawiki/maintenance/doMaintenance.php(100): MediaWiki\Maintenance\MaintenanceRunner->run()
#9 /var/www/html/mediawiki/extensions/LDAPProvider/maintenance/ShowUserGroups.php(72): require_once(string)
#10 {main}
  1. php ./extensions/LDAPProvider/maintenance/ShowUserInfo.php --domain test.ldap --username user
*******************************************************************************
NOTE: Do not run maintenance scripts directly, use maintenance/run.php instead!
      Running scripts directly has been deprecated in MediaWiki 1.40.
      It may not work for some (or any) scripts in the future.
*******************************************************************************
MWException from line 237 of /var/www/html/mediawiki/extensions/LDAPProvider/src/Client.php: Error in LDAP search: Bad search filter
#0 /var/www/html/mediawiki/extensions/LDAPProvider/src/UserInfoRequest.php(70): MediaWiki\Extension\LDAPProvider\Client->search()
#1 /var/www/html/mediawiki/extensions/LDAPProvider/src/Client.php(272): MediaWiki\Extension\LDAPProvider\UserInfoRequest->getUserInfo()
#2 /var/www/html/mediawiki/includes/libs/objectcache/BagOStuff.php(217): MediaWiki\Extension\LDAPProvider\Client->MediaWiki\Extension\LDAPProvider\{closure}()
#3 /var/www/html/mediawiki/extensions/LDAPProvider/src/Client.php(273): Wikimedia\ObjectCache\BagOStuff->getWithSetCallback()
#4 /var/www/html/mediawiki/extensions/LDAPProvider/maintenance/ShowUserInfo.php(49): MediaWiki\Extension\LDAPProvider\Client->getUserInfo()
#5 /var/www/html/mediawiki/maintenance/includes/MaintenanceRunner.php(703): MediaWiki\Extension\LDAPProvider\Maintenance\ShowUserInfo->execute()
#6 /var/www/html/mediawiki/maintenance/doMaintenance.php(100): MediaWiki\Maintenance\MaintenanceRunner->run()
#7 /var/www/html/mediawiki/extensions/LDAPProvider/maintenance/ShowUserInfo.php(76): require_once('...')
#8 {main}Techietubby (talk)09:06, 26 November 2025 (UTC)Reply
I looked for objectClass but it is not configured anywhere. I have:
  1. cat LocalSettings.php
...
# Load extensions
#       'Auth_remoteuser',
wfLoadExtensions( [
        'PluggableAuth',
        'LDAPProvider',
        'LDAPAuthentication2',
        'LDAPAuthorization',
        'LDAPUserInfo'
] );
# LDAP configuration
$wgLDAPUseLDAP = true;
#
// If local login is supported as well, then these globals are still needed
$wgPluggableAuth_EnableLocalLogin = true;
#---------------Extension LDAPAuthentication2---------------
$LDAPAuthentication2AllowLocalLogin = true;
$LDAPAuthentication2UsernameNormalizer = 'strtolower';
#---------------Extension LDAPProvider---------------
##$ldapJsonFile = "$IP/../ldapprovider.json";
##$LDAPProviderDomainConfigs = $ldapJsonFile;
$wgPluggableAuth_Config['Log In (LDAP)'] = [
    'plugin' => 'LDAPAuthentication2',
    'data' => [
        'domain' => 'test.ldap'
    ]
];
$wgExternalDataSources['test.ldap'] = [
        'server'        => 'ldap1.test.com',
        'base dn'       => 'dc=test,dc=com',
        'user'          => 'cn=manager,dc=test,dc=com',
        'password'      => 'secret'
];
### ALSO turn on LDAP debug
$wgDebugLogFile = "/var/log/mediawiki/debug-{$wgDBname}.log";
$wgLDAPDebug = 99;
$wgDebugLogGroups['ldap'] = '/var/log/mediawiki/debug-ldap.log';
$wgShowExceptionDetails = true;
$wgDebugLogGroups['PluggableAuth'] =
$wgDebugLogGroups['LDAP'] =
$wgDebugLogGroups['MediaWiki\\Extension\\LDAPProvider\\Client'] =
$wgDebugLogGroups['LDAPProvider'] =
$wgDebugLogGroups['LDAPGroups'] =
$wgDebugLogGroups['LDAPUserInfo'] =
$wgDebugLogGroups['LDAPAuthentication2'] =
$wgDebugLogGroups['LDAPAuthorization'] = '/tmp/LDAP.log';
$wgLdapAuthBaseDN = 'OU=manager,DC=test,DC=com';
  1.   cat ../ldapprovider.json
{
  "test.ldap": {
    "connection": {
      "server": "ldap1.test.com",
      "port": 636,
      "enctype": "ssl",
      "user": "cn=manager,dc=test,dc=com",
      "pass": "secret",
      "options": {
        "LDAP_OPT_DEREF": 1
        "LDAP_OPT_X_TLS_CACERTFILE": "/etc/openldap/certs/ca.pem"
      },
      "basedn": "dc=test,dc=com",
      "Groupbasedn": "ou=Group,dc=test,dc=com",
      "userbasedn": "ou=People,dc=test,dc=com",
      "searchattribute": "uid",
      "usernameattribute": "uid",
      "realnameattribute": "cn",
      "emailattribute": "mail",
      "searchstring": "uid=USER-NAME,ou=People,dc=test,dc=com"
      }
  }
}
Can you see where I need to add the filter?Techietubby (talk)09:14, 26 November 2025 (UTC)Reply
I should also point-out that all my users should have access so I don't need any group filter etc.Techietubby (talk)09:58, 26 November 2025 (UTC)Reply

Did something change with "Category:Pages using the JsonConfig extension"?

[edit]

In late 2024, a new category appeared on all wikis called "Category:Pages using the JsonConfig extension" which included all pages with a citation, unless theMediaWiki:Jsonconfig-use-category was created with "-". Now it appears that across all wikis, this category (Wikidata link:d:Q130635582) has become empty and many have been deleted. Was the software configuration changed to no longer populate this? Can it just be deleted everywhere?~2025-34912-63 (talk)17:14, 19 November 2025 (UTC)Reply

@~2025-34912-63: It was removed as a result of the discussion in T378352. --MarkAHershberger(talk)17:41, 19 November 2025 (UTC)Reply
@MarkAHershberger Thanks. I will request deletion of the category on all wikis.~2025-34912-63 (talk)19:00, 21 November 2025 (UTC)Reply

Tabber and tables not working together

[edit]

So I'm wanting to make a table inside of myTabberNeue, because I don't feel like making a template since there isn't enough information for it to have it's own. It works if I put it into a simple tabber, but if I put it into a nested tabber, it doesn't work.


|-| For This Device =Several devices have their own blocks that can run functions or obtain data that other devices can't.{{#tag:tabber|Damager=There is 1 block specific to the[[Damager]].{|class="wikitable"!Image!Tooltip!Input types!Is an input?!Dropdown 1!Dropdown 2!Configurable settings|-|[[File:Damage block.png|frameless|231x231px]]|None|Number.|No|DNE|DNE|None|}{{!}}-{{!}} Inventory Item Manager={|class="wikitable"!Image!Tooltip!Input types!Is an input?!Dropdown 1!Dropdown 2!Configurable settings|-|[[File:IIM block.png|frameless|176x176px]]|None|None|Yes|DNE|DNE|None|}}}</tabber>

Whenever I try this, all I see is the text at the beginning, one nested tab, and a bracket. Am I doing something wrong? Do I have to use templates?Fulcrum-19 (talk)00:41, 21 November 2025 (UTC)Reply

@Fulcrum-19:: one problem is that you have a extra closing tag </tabber> and that may be causing problems.The {{#tag parser function represents the wholetabber element. No closing tag is needed. --MarkAHershberger(talk)14:50, 22 November 2025 (UTC)Reply
I actually have a starting tabber before that, so that isn't the issue. There's a lot more to the tabber, I just copy-pasted the part that wasn't working.Fulcrum-19 (talk)01:28, 23 November 2025 (UTC)Reply
@Fulcrum-19:: What happens if you use this by itself instead of wrapped inside another tabber element? --MarkAHershberger(talk)23:13, 24 November 2025 (UTC)Reply

Creating your own PKI certificates

[edit]
Does anyone have a script showing how they build the certificates for use with OpenLDAP? I created a CA and then a cert and key signed with the CA. They work fine with OpenLDAP and Linux sssd but not with older nslcd libraries, and it appears not with Mediawiki. No matter what I try I get either "Can't Connect" or "Can't start TLS".
The only clue I can find is that the CA certificate shows as being self-signed.

Techietubby (talk)10:16, 21 November 2025 (UTC)Reply

@Techietubby:: I don't have an LDAP server available at the moment to test, but you need to configure PHP and/or your local OpenSSL stack to recognize the CA as authoritative. You should be able to by using, for example, update-ca-certificates onDebian orUbuntu orupdate-ca-trust on redhat-derived linuxes. --MarkAHershberger(talk)14:40, 22 November 2025 (UTC)Reply

Need help with error 429 on phabricator repos

[edit]

Hello,

I am a developer and maintainer for the projecthttps://wikiromandie.org, a wiki for Swiss French part of Switzerland.

I am trying to build our Mediawiki images on Github actions, but my builds fail with the remaining error :

Error: error: RPC failed; HTTP 429 curl 22 The requested URL returned error: 429

Error: fatal: the remote end hung up unexpectedly

Unable to fetch in submodule path 'extensions/Wikibase/view/lib/wikibase-data-model'; trying to directly fetch 6b304daeb804591ddc4520925337429ac086515c:

Error: fatal: unable to access 'https://phabricator.wikimedia.org/source/wikibase-data-model.git/': The requested URL returned error: 429

Error: fatal: Fetched in submodule path 'extensions/Wikibase/view/lib/wikibase-data-model', but it did not contain 6b304daeb804591ddc4520925337429ac086515c. Direct fetching of that commit failed.

Error: fatal: Failed to recurse into submodule path 'extensions/Wikibase'

Error: The process '/usr/bin/git' failed with exit code 128

While installing the Wikibase extension. And our build won't go further.

Our repo is publicly available onsteffpro/Wikiromandie.org: Wikiromandie.org Mediawiki🌻

When building from a local machine it works, but from Github Action Runners it fails.

What do I need to do to avoid this issue ?

Thank you for helping me.

Greetings,

StefanSteffpro (talk)21:35, 23 November 2025 (UTC)Reply

@Steffpro This is essentiallyphab:T409519. The submodules are linked to Phabricator for WMF production reasons, but Phabricator is heavily rate limited for external clouds (also for bot scraping reasons). A shortterm workaround might be, to modify the git config of the runner to use InsteadOf, to replace the Phabricator urls to urls of thesame codebase on GitHub, whenever it tries to use them. Something like:git config --global url.https://github.com/wmde/WikibaseDataModelJavascript.git.insteadofhttps://phabricator.wikimedia.org/source/wikibase-data-model.git. You have to do that for a few repos' most likely, but I don't know them by head. —TheDJ (Not WMF) (talkcontribs)12:24, 24 November 2025 (UTC)Reply


Reportlab

[edit]

from reportlab.pdfgen import canvas

from reportlab.lib.pagesizes import A4

from reportlab.lib.utils import ImageReader

# PDF file path

pdf_path = "/mnt/data/Kobi_o_KD_Pathok_Prothom_Adhyay.pdf"

cover_image_path = "/mnt/data/Allamanda_Book_Cover.png"  # placeholder for generated cover image

# Create PDF with ReportLab

c = canvas.Canvas(pdf_path, pagesize=A4)

width, height = A4

# Add cover image

try:

    cover_image = ImageReader(cover_image_path)

    c.drawImage(cover_image, 0, 0, width=width, height=height)

except:

    # If cover image not available, add a placeholder title

    c.setFont("Helvetica-Bold", 24)

    c.drawCentredString(width/2, height/2, "কবি ও কেডি পাঠক: একটি বিশ্বাসের যাত্রা")

    c.setFont("Helvetica", 18)

    c.drawCentredString(width/2, height/2 - 40, "লেখক: বাহাউদ্দিন সরকার কবির")

# Add Chapter 1 title and text

c.showPage()

c.setFont("Helvetica-Bold", 20)

c.drawString(50, height-100, "অধ্যায় ১: সাহসীদের পদচিহ্ন")

c.setFont("Helvetica", 14)

intro_text = (

    "যেখানে সবাই নীরব, আমি সেখানে কলম তোলে বলি —\n"

    "সত্যের প্রতিটি শব্দই একেকটি বিপ্লব।\n\n"

    "এই অধ্যায় উৎসর্গ করা হলো সেইসব মানুষের জন্য, যারা ভয়কে উপেক্ষা করে সত্য উচ্চারণ করেন, "

    "যারা একা হলেও ন্যায়ের পথে হাঁটেন, আর যাদের কলম কখনো বিক্রি হয় না।"

)

text_obj = c.beginText(50, height-150)

for line in intro_text.split('\n'):

    text_obj.textLine(line)

c.drawText(text_obj)

# Placeholder for report text

c.setFont("Helvetica-Bold", 16)

c.drawString(50, height-300, "প্রতিবেদন: F-7 যুদ্ধবিমান বারবার দুর্ঘটনায় প্রশ্নবিদ্ধ — একটি নাগরিক দৃষ্টিভঙ্গি")

c.setFont("Helvetica", 14)

report_text = (

    "এখানে ব্যবহারকারীর প্রতিবেদন সম্পূর্ণরূপে থাকবে। "

    "সরাসরি প্রিন্টের জন্য এটি সংরক্ষিত।\n\n"

    "(প্রয়োজনীয় নোট এবং বিশ্লেষণও থাকবে)"

)

text_obj = c.beginText(50, height-330)

for line in report_text.split('\n'):

    text_obj.textLine(line)

c.drawText(text_obj)

# Save PDF

c.save()

pdf_pathSarkar Bahauddin kobir (talk)01:41, 25 November 2025 (UTC)Reply

@Sarkar Bahauddin kobir is there something we can help you with ? This doesn't provide a lot of context for us. —TheDJ (Not WMF) (talkcontribs)09:23, 25 November 2025 (UTC)Reply
Retrieved from "https://www.mediawiki.org/w/index.php?title=Project:Support_desk&oldid=8042076"

[8]ページ先頭

©2009-2025 Movatter.jp