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".

Citoid empty manual reference despite an existing Template data.

1
Zied dhf (talkcontribs)

Hello everyone!

Im using Citoid on local mediawiki instance, in the manual reference tab there is cite web, book, news and Journal options for referencing, i've imported all the templates and modules required.

when i try to add Site web manual reference i get the template Data such as checkboxes and data inputs, but when i try to add a Journal manual reference for example, i get an empty page, no template data, only this message :

The “  Cite Journal  ” template does not yet have a description, but there may be information in the documentation shown on the template page .

and if you try to open the link above you will see that the template is imported.

Is there some other templates or modules i need to import or am i missing something?

I appreciate any guidance.

Reply to "Citoid empty manual reference despite an existing Template data."

Problems with updating Mediawiki LDAP

10
MSchmitt0815 (talkcontribs)

I am trying updating LDAP. Having difficulty understanding what belongs where and how... following the Description as good as i can.

Please Help.

When i run the maintenance/update.php script it says to me Found invalid JSON in file: /var/www/html/ldap.json

At the end of the Script it prints:

BadMethodCallException from line 506 of /var/www/html/mediawiki/includes/session/SessionProvider.php: MediaWiki\Session\SessionProvider::preventSessionsForUser must be implemented when canChangeUser() is false

#0 /var/www/html/mediawiki/includes/session/SessionManager.php(453): MediaWiki\Session\SessionProvider->preventSessionsForUser()

#1 /var/www/html/mediawiki/includes/user/User.php(886): MediaWiki\Session\SessionManager->preventSessionsForUser()

#2 /var/www/html/mediawiki/extensions/AbuseFilter/includes/FilterUser.php(57): MediaWiki\User\User::newSystemUser()

#3 /var/www/html/mediawiki/extensions/AbuseFilter/includes/FilterUser.php(48): MediaWiki\Extension\AbuseFilter\FilterUser->getUser()

#4 /var/www/html/mediawiki/extensions/AbuseFilter/maintenance/NormalizeThrottleParameters.php(151): MediaWiki\Extension\AbuseFilter\FilterUser->getUserIdentity()

#5 /var/www/html/mediawiki/extensions/AbuseFilter/maintenance/NormalizeThrottleParameters.php(484): MediaWiki\Extension\AbuseFilter\Maintenance\NormalizeThrottleParameters->normalizeParameters()

#6 /var/www/html/mediawiki/maintenance/includes/LoggedUpdateMaintenance.php(49): MediaWiki\Extension\AbuseFilter\Maintenance\NormalizeThrottleParameters->doDBUpdates()

#7 /var/www/html/mediawiki/maintenance/update.php(197): LoggedUpdateMaintenance->execute()

#8 /var/www/html/mediawiki/maintenance/includes/MaintenanceRunner.php(703): UpdateMediaWiki->execute()

#9 /var/www/html/mediawiki/maintenance/doMaintenance.php(100): MediaWiki\Maintenance\MaintenanceRunner->run()

#10 /var/www/html/mediawiki/maintenance/update.php(298): require_once('/var/www/html/m...')

#11 {main}

PHP Notice:  Uncommitted DB writes (transaction from MediaWiki\Extension\AbuseFilter\Maintenance\NormalizeThrottleParameters::doDBUpdates) in /var/www/html/mediawiki/includes/libs/rdbms/database/TransactionManager.php on line 586

PHP Notice:  DB transaction writes or callbacks still pending (MediaWiki\Auth\TemporaryPasswordPrimaryAuthenticationProvider::providerChangeAuthenticationData, MediaWiki\Auth\LocalPasswordPrimaryAuthenticationProvider::providerChangeAuthenticationData, MediaWiki\User\User::saveSettings, MediaWiki\User\User::saveSettings, MediaWiki\User\User::clearSharedCache) in /var/www/html/mediawiki/includes/libs/rdbms/database/Database.php on line 3344


My ldap.json:

1 {

"internet.adress": {

¦ "connection": {

¦ ¦ "server": "First-Domain-Controller",

¦ ¦ "port": "389",

¦ ¦ "user": "CN=firstUser,OU=Device-User,OU=Benutzer,Some=SomeUser,One=OneUser",

¦ ¦ "pass": "SomeChars",

¦ ¦ "enctype": "clear",

¦ ¦ "options": {

¦ ¦ ¦ "LDAP_OPT_DEREF": 1

¦ ¦ },

¦ ¦ "basedn": "Some=SomeUser, One=OneUser",

¦ ¦ "userbasedn": "OU=Benutzer,Some=SomeUser,One=OneUser",

¦ ¦ "groupbasedn": "OU=SafetyGroups,Some=SomeUser,One=OneUser",

¦ ¦ "searchattribute": "samaccountname",

¦ ¦ "usernameattribute": "samaccountname",

¦ ¦ "realnameattribute": "cn",

¦ ¦ "emailattribute": "mail",

¦ ¦ "grouprequest": "MediaWiki\\Extension\\LDAPProvider\\UserGroupsRequest\\UserMemberOf::factory",

¦ ¦ "presearchusernamemodifiers": [ "spacestounderscores", "lowercase" ],

¦ ¦ "SyncMechanismRegistry": {

¦ ¦ ¦ ¦ "mappedgroups": "MediaWiki\\Extension\\LDAPGroups\\SyncMechanism\\MappedGroups::factory",

¦ ¦ ¦ ¦ ¦ "allgroups": "MediaWiki\\Extension\\LDAPGroups\\SyncMechanism\\AllGroups::factory"

¦ ¦ }

¦ },

¦ "userinfo": [],

¦ "authorization": []

}

}

For more Information just ask.

Greetings

Malyacko (talkcontribs)

Which exact MediaWiki version? Which exact version of which exact extension related to LDAP?

MSchmitt0815 (talkcontribs)

MediaWiki Version: 1.41

The Extension would be LDAPAuthentication2 Version: 1.39 and LDAPProvider Version: 1.39

MSchmitt0815 (talkcontribs)

Thanks for the fast reply!!!

Osnard (talkcontribs)

The error message Found invalid JSON in file: /var/www/html/ldap.json indicates a syntax error in the file /var/www/html/ldap.json. Try using a tool like jsonlint or use a code editor with syntax-checker like VSCode to compose the file.

I did this with the snippet you provided above:

{
    "internet.adress": {
        "connection": {
            "server": "First-Domain-Controller",
            "port": "389",
            "user": "CN=firstUser,OU=Device-User,OU=Benutzer,Some=SomeUser,One=OneUser",
            "pass": "SomeChars",
            "enctype": "clear",
            "options": {
                "LDAP_OPT_DEREF": 1
            },
            "basedn": "Some=SomeUser, One=OneUser",
            "userbasedn": "OU=Benutzer,Some=SomeUser,One=OneUser",
            "groupbasedn": "OU=SafetyGroups,Some=SomeUser,One=OneUser",
            "searchattribute": "samaccountname",
            "usernameattribute": "samaccountname",
            "realnameattribute": "cn",
            "emailattribute": "mail",
            "grouprequest": "MediaWiki\\Extension\\LDAPProvider\\UserGroupsRequest\\UserMemberOf::factory",
            "presearchusernamemodifiers": [
                "spacestounderscores",
                "lowercase"
            ],
            "SyncMechanismRegistry": {
                "mappedgroups": "MediaWiki\\Extension\\LDAPGroups\\SyncMechanism\\MappedGroups::factory",
                "allgroups": "MediaWiki\\Extension\\LDAPGroups\\SyncMechanism\\AllGroups::factory"
            }
        },
        "userinfo": [],
        "authorization": []
    }
}

Be aware that SyncMechanismRegistry is not a valid key in this config. It is a global variable configuration $LDAPGroupsSyncMechanismRegistry and I don't think you need to set it at all.

MSchmitt0815 (talkcontribs)

Good Morning,

i copied your snippet and fitted it for my need in extension to that i use jsonlint. And my Json file seems correct. I tried some more config variations and nothing seems to work.


Do you got another hint or direction which i can try/go?


Greetings and big Thanks

MSchmitt0815 (talkcontribs)

Ps: Do you need additional information?

Osnard (talkcontribs)

Does it still tell you Found invalid JSON in file:...? If so, check if the webserver user can read the file.

MSchmitt0815 (talkcontribs)

Good Evening,

after a good day of work i finally got it workin. Many thanks for your help.

The User wasnt allowed to read, so i made him.

I had to use a bit of a modification of your config file to get it running. It is now possible to login localy, but otherwise not.

When i run the CheckLogin.php script it promptly says ‘FAILED’. When I try to login it says to me that the username or password is incorrect and i should try it again.

When i run ShowUserInfo.php with which i want to login:

cn => someuser

distinguishedname => CN=someuser,OU=Some-User,OU=User,DC=pko,DC=ac

displayname => someuser

name => someuser

samaccountname => someuser

userprincipalname => someuser@address

objectcategory => CN=Person,CN=Schema,CN=Configuration,DC=Thin,DC=Other

dn => CN=someuser,OU=Some-User,OU=Benutzer,DC=Thin,DC=Other


And i still get the Error when running maintenance/update.php script

BadMethodCallException from line 506 of /var/www/html/mediawiki/includes/session/SessionProvider.php: MediaWiki\Session\SessionProvider::preventSessionsForUser must be implemented when canChangeUser() is false

If additional information is needed i am happy to supply.


Thanks for all your much needed help!!!

In regards

Osnard (talkcontribs)
Reply to "Problems with updating Mediawiki LDAP"
2601:281:D200:5A50:AC09:D9EB:806C:598E (talkcontribs)

Hi, I am very new to mediawiki and ddeveloping with it.

Goal: to create a leader board page that dynamically populates users and there stats.

Problem: Page LeaderBoard is showing data like this: {{#vardefine: Username|Timmy}} {{#vardefine: Score|100}} {{#vardefine: Badges|5}}

Not sure why or how to display better.


I have created Template:UserScore and inputed

and in my page itself i am calling the template and adding values like this

{{UserScore

| Username = Timmy

| Score = 100

| Badges = 5

}}

Reply to "Template building"

File doesn't update

4
Tang Empire (talkcontribs)

Sometimes when I upload a new version of a file, it doesn't change to the new version on pages. Sometimes it changes on one device but not another. Anyone know how to fix this?

Malyacko (talkcontribs)

By emptying your web browser cache.

Tang Empire (talkcontribs)

Is there any way to do it without emptying it every time? For example if my friend views my website, will they have to clear cache to view the latest file version as well?

Malyacko (talkcontribs)

You could use a web browser with less aggressive caching behavior. This is nothing that MediaWiki can influence. This is behavior of your local web browser that you installed.

Reply to "File doesn't update"

Only allow Login for Users in a specific Active Directory Group

1
217.253.41.142 (talkcontribs)

Hi,

I have a mediawiki installation configured with SimpleSamlPhp and Pluggable Auth, allowing users with ad accounts to log in.

In the pluggable Auth there's also a group mapping, making users in a specific group admins in the mediawiki.

The wiki itself is open to read, but not to edit. Now I'm wondering if there's a way to deny login for users that are not in the AD groups for admin/edit access, to not have unnecessary logins from users, that doesn't change anything from just viewing without login.


Is this possible? Basically have "require X group from AD" to createaccount? Or does this only work with workarrounds where you strip any rights from normal users except for read and you have to live with them being able to log in? Or would this have to be done on ADFS side?

Kind regards

Reply to "Only allow Login for Users in a specific Active Directory Group"

Requesting speedy deletion of own comment

2
Ahri.boy (talkcontribs)

Is it possible for an author to request speedy deletion of own comment?

Clump (talkcontribs)

Yes

Doesn't recognize my original or new name, new e-mail address, and passwords

2
KramdenII (talkcontribs)

I keep trying to sign into Closing Logos. When I enter my e-mail address (which has changed from the previous one) and request a new password, I receive no e-mail. Then I try to establish a new account name and use the temporary password to create a new password, but it keeps coming in as "not identified."

What's the problem? Has Closing Logos kept me from signing back in again? I don't recall making any bad comments; if I disagree with something I just overlook it.

Please tell me what I can do about this. Thanks.

Malyacko (talkcontribs)

Only "Closing Logos" knows (whatever and whoever that is), and we are neither "Closing Logos" nor do we have anything to do with them, so we cannot help.

Reply to "Doesn't recognize my original or new name, new e-mail address, and passwords"

CheckUser extension - where is IP address taken from

1
Pspviwki (talkcontribs)

I recently had to install TorBlock, LoginNotify and CheckUser extensions. Tables were created successfully for Checkuser extension but during testing only localhost adress 127.0.0.1 showed in Special:CheckUser for a user access. I guess IP gets replaced during the process somewhere incorrectly but I need to find out where to fix it. It might be due to caching but in webserver logs and cache logs IPs are correct. I wonder if TorBlock and LoginNotify extensions may be influenced by this issue.

Reply to "CheckUser extension - where is IP address taken from"

Creating a second Admin

2
Bananatree88 (talkcontribs)

I am new to wikis and I need some guidance. How can I either change an account status to administrator or create an admin account for someone that will be helping me create my wiki Thanks

Bawolff (talkcontribs)

Use the page named Special:UserRights on your wikk

Reply to "Creating a second Admin"

Lua error: Internal error: The interpreter has terminated with signal "11".

2
Scribbleryn (talkcontribs)

I've been trying to install WikiMedia on a webhosting plan. I'm not great at Linux and such, but done my best with what I've got.

When installing Scribunto, the server host has a Lua version 5.3.4, which isn't compatable with the extention when using usr/bin/lua. If I stick with luastandalone, I get the error: Lua error: Internal error: The interpreter has terminated with signal "11".

I am asusming that there is something I'm missing if it keeps crashing. I've tried to set up error logging with $wgScribuntoEngineConf['luastandalone']['errorFile'] = '/var/log/luastandalone-error.log';

but I get another error of Lua error: Cannot create process: proc_open(/var/log/luastandalone-error.log): Failed to open stream: Permission denied, even though the proc_open setting is set in the ini file for the domain (the wiki is installed in the folder /wiki/, but not as a subomain).

MediaWiki 1.41.1 with PHP 8.2.18. Linux64 web hosting.

Thanks for reading and any advice!

TheDJ (talkcontribs)

It seems this provider doesn't allow you to execute your own binaries (lua standalone). You can try asking if they are willing to install LuaSandbox, or ask them to allow list your usage of the direct lua binary.

Reply to "Lua error: Internal error: The interpreter has terminated with signal "11"."