Jump to content

Project:Support desk

About this board

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

(Read this message in a different language)

See also

Before you post

Post a new question

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

I am running mediawiki 1.36.2 and when following Extension:TemplateStyles#Configuration

My site breaks after adding loadextenion

The error log is just getting http 500, but when I comment out load extension (template styles), the page loads fine

anyone have luck with getting templatestyles to work?

Malyacko (talkcontribs)

Please first upgrade your ancient, insecure MediaWiki installation - thanks.

Bawolff (talkcontribs)

Are you using the correct version for your version of mediawiki.

Do you have php set to show error messages (see How to debug)

Reply to "TemplateStyles"

MW can't connect to DB though the install script can

2
2A01:CB19:8142:6C00:1CCF:B57E:64A0:D6E5 (talkcontribs)

This is what I did:

1. Create a new MySQL database 'blah_mw' and a user 'blah_user' with all possible privileges on the former.

2. Install MediaWiki, providing the following information to the installation script:

$wgDBtype = 'mysql';
$wgDBserver = 'localhost';
$wgDBname = 'blah_mw';
$wgDBuser = 'blah_user';
$wgDBpassword = 'mynicepassword';

as summed up in LocalSettings.php.

3. Go to http://mywiki.org/, where I obtain the error:

MediaWiki internal error.
 
 Original exception: [ZqEs3UQYlJ7QKxMlbf02vgAAAIA] /   Wikimedia\Rdbms\DBConnectionError: Cannot access the database: Access denied for user 'blah_user'@'localhost' (using password: YES) (localhost)
 Backtrace:
 from /home/blah/public_html/includes/libs/rdbms/loadbalancer/LoadBalancer.php(1138)
 #0 /home/v/public_html/includes/libs/rdbms/loadbalancer/LoadBalancer.php(794): Wikimedia\Rdbms\LoadBalancer->reportConnectionError()
 #1 /home/blah/public_html/includes/libs/rdbms/loadbalancer/LoadBalancer.php(782): Wikimedia\Rdbms\LoadBalancer->getServerConnection()
 #2 /home/blah/public_html/includes/libs/rdbms/database/DBConnRef.php(99): Wikimedia\Rdbms\LoadBalancer->getConnectionInternal()
 #3 /home/blah/public_html/includes/libs/rdbms/database/DBConnRef.php(117): Wikimedia\Rdbms\DBConnRef->ensureConnection()
 #4 /home/blah/public_html/includes/libs/rdbms/database/DBConnRef.php(338): Wikimedia\Rdbms\DBConnRef->__call()
 #5 /home/blah/public_html/includes/libs/rdbms/querybuilder/SelectQueryBuilder.php(747): Wikimedia\Rdbms\DBConnRef->selectField()

It seems that MediaWiki cannot connect to the database. However, when I open it with PHPmyadmin, I can see that the installation script has been able to edit it, so the problem is not related to the credentials I gave.

Does anybody have any clue what the problem can be related to?

Bawolff (talkcontribs)

When you say install script do you mean install.php commandline script or do you mean web installer?

Reply to "MW can't connect to DB though the install script can"

Erro de autenticação

1
Jluislima (talkcontribs)

Ao acessar o VClipping do Media Wiki, aparece a seguinte Mensagem: Erro de autenticação.Foram detetados problemas com a sua sessão; Esta ação foi cancelada como medida de proteção contra a intercepção de sessões. Experimente usar o botão "Voltar" e atualizar a página de onde veio e tente novamente.

O que devo fazer?

Reply to "Erro de autenticação"

[WW][Resolved] How can I edit / remove the Powered by MediaWiki image in the footer

20
90.215.80.134 (talkcontribs)

Hello, I cant find the line " <?php

               if($this->data['poweredbyico']) { ?>
<?php $this->html('poweredbyico') ?>
"

" In the Footer /skins/MonoBook.php can someone please help or tell me how to remove this "Powered by Media Wiki" ( I cant find this in the code )

Reach Out to the Truth (talkcontribs)

What version of MediaWiki are you using?

90.215.80.134 (talkcontribs)

MediaWiki 1.17 Does this help ?

Wargo (talkcontribs)
90.215.80.134 (talkcontribs)

Ok Thank you very much, and if i wanted to add a link on the NAV bar or Add groups is there a link you could find for me , that would be great ??

Reach Out to the Truth (talkcontribs)

Specifically, you'd want to do this:

unset ($wgFooterIcons['poweredby']['mediawiki']);

You can't just set it to false because that will cause the image to be set later in Setup.php

Can you clarify which "nav bar" you're referring to? Is it the sidebar on the left, or somewhere else?

90.215.80.134 (talkcontribs)

The sidebar on the left, and cant I just delete the Code for the "PoweredBy" and is this kept here /skins/MonoBook.php ???

Reach Out to the Truth (talkcontribs)

You should not delete or modify any core code. It will be overwritten when you upgrade, it makes it more difficult to get support, and in both of these cases it's entirely unnecessary. See Manual:Interface/Sidebar.

90.215.80.134 (talkcontribs)

Ok so for the "PoweredBy" where to do I go ( What file ) to edit this?

Reach Out to the Truth (talkcontribs)

LocalSettings.php. All your site-specific configuration changes should be made there, and not in core or extension files.

90.215.80.134 (talkcontribs)

Ok I have done it Thank you very much for your time and help ?

82.22.79.168 (talkcontribs)

I am trying hard but still not getting as in how do I remove the icon by using localsettings.php please..

217.6.123.242 (talkcontribs)

I've copied "Reach Out to the Truth"-'s line and the "powered by BlueSpice"-Button is still there.

What am I missing?

87.123.34.37 (talkcontribs)

The BlueSpice button is different from the MediaWiki button.

You can remove the BlueSpice button with this line in LocalSettings.php:

unset ($wgFooterIcons['poweredby']['bluespice']);
Pojpla (talkcontribs)

The unset method doesn't work anymore, bluespice is very hard ;-)

Has anybody a solution?

AhmadF.Cheema (talkcontribs)
Pojpla (talkcontribs)

Thanks for reaction, it works not for the bluespice icon.

141.58.7.192 (talkcontribs)

If it is unset in LocalSettings.php, it is re-set in ./extensions/BlueSpiceFoundation/includes/DefaultSettings.php again.

In LocalSettings.php, set it to a bogus value like

$GLOBALS['wgFooterIcons']['poweredby']['bluespice']=' ';


Worked for me.

Reply to "[WW][Resolved] How can I edit / remove the Powered by MediaWiki image in the footer"

No actor for target_author_id row

2
Kghbln (talkcontribs)

I get these errors when upgrading from 1.35.x to 1.39.x. I'd say something went wrong with a previous update to 1.35.x.

 Beginning migration of log_search
 No actor for target_author_id row with ls_value=101 ls_log_id=14499
 No actor for target_author_id row with ls_value=107 ls_log_id=14499
 No actor for target_author_id row with ls_value=14 ls_log_id=422
 No actor for target_author_id row with ls_value=14 ls_log_id=423
 No actor for target_author_id row with ls_value=14 ls_log_id=444
 No actor for target_author_id row with ls_value=14 ls_log_id=445
 No actor for target_author_id row with ls_value=17 ls_log_id=621
 No actor for target_author_id row with ls_value=24 ls_log_id=835
 No actor for target_author_id row with ls_value=28 ls_log_id=2545
 No actor for target_author_id row with ls_value=33 ls_log_id=2390
 No actor for target_author_id row with ls_value=33 ls_log_id=2400
 No actor for target_author_id row with ls_value=34 ls_log_id=2394
 No actor for target_author_id row with ls_value=36 ls_log_id=2734
 No actor for target_author_id row with ls_value=39 ls_log_id=3466
 No actor for target_author_id row with ls_value=44 ls_log_id=6887
 No actor for target_author_id row with ls_value=44 ls_log_id=7426
 No actor for target_author_id row with ls_value=46 ls_log_id=8373
 No actor for target_author_id row with ls_value=46 ls_log_id=8458
 No actor for target_author_id row with ls_value=46 ls_log_id=8461
 No actor for target_author_id row with ls_value=46 ls_log_id=8462
 ... target_author_id, ls_value=47 ls_log_id=8458
 No actor for target_author_id row with ls_value=9 ls_log_id=2838
 No actor for target_author_id row with ls_value=9 ls_log_id=2839
 ... target_author_id, ls_value=93 ls_log_id=14499
 ... target_author_ip, ls_value=94.217.178.6 ls_log_id=2475
 Completed migration, inserted 0 row(s) with 0 new actor(s), 22 error(s)
 errors were encountered.

What effect will this have? So far the wiki looks fine. Anyhow, do I need to worry? If yes, is there a suggestion on what to do about it? Thanks and cheers

TheDJ (talkcontribs)

This sounds like possibly a user was removed from the database (this was something that people sometimes did after spam attacks), causing it to not be possible to find the user/actor that goes with a name in the log tables. You can look in your log_search table and find the records in question to see if you can find some sort of commonality for this user. I'm assuming this was possibly the second time this migration was run ? Cause if would expect at least some successful insertions for that many rows.

Reply to "No actor for target_author_id row"
2A03:1B20:B:F011:0:0:0:A06D (talkcontribs)

Hi,

I am trying to find a way to export or back up my wikibase stored on wikibase.cloud. I have already found a number of extensions to export/back up self-hosted wikibases, as well as way to export specific pages (either one by one or a batch of pages). However, I have not yet found a way (if it exists) to instantly export/back up the entirety of a wikibase instance hosted by wikibase.cloud. Am I missing something or is this not an option at this stage? As I put more and more data in my wikibase, this is starting to feel like an important thing to do.

Thanks a lot in advance!

Bawolff (talkcontribs)

This is probably something better asked to the wikibase.cloud people

2A03:1B20:B:F011:0:0:0:A06D (talkcontribs)

Well noted, will try. Thanks!

Reply to "Backup/Export all"

Pre-commit hook Errors

5
AnujAgrawal380 (talkcontribs)

I'm trying to commit the changes i made for while now. Whenever i tried to git commit it give error: I will now check that you built them using the correct Node.js version v18.20.2.

Note: You are using v18.20.2.

Building assets...

2024-07-19 18:13:14: webpack compiled

M       resources/dist/mobile.special.watchlist.scripts.js

M       resources/dist/mobile.special.watchlist.scripts.js.map.json

M       resources/dist/mobile.startup.js.map.json

After I built the assets, I noticed differences in the contents to what you committed.

Try running `npm run build` again or removing the node_modules folder and running npm install with the correct node version.

pre-commit:

pre-commit: We've failed to pass the specified git pre-commit hooks as the `precommit`

pre-commit: hook returned an exit code (1). If you're feeling adventurous you can

pre-commit: skip the git pre-commit hooks by adding the following flags to your commit:

pre-commit:

pre-commit:   git commit -n (or --no-verify)

pre-commit:

pre-commit: This is ill-advised since the commit is broken.

pre-commit:

Also, i installed all the necessary packages. I think the issue lies in the not adding package.json and package-lock.json to the staging area. Also, i didnt build the directory using npm run build. It would be really helpful if someone could assist me.

Note: This is the MobileFrontend extension directory.

Malyacko (talkcontribs)

Where exactly can this output be seen after you ran "git commit"? In your command line?

AnujAgrawal380 (talkcontribs)

after output of all tests.

Bawolff (talkcontribs)

Did you run the npm build step like the error message said to?

Reply to "Pre-commit hook Errors"

It is said to not use thoses functions, but how do I replace the explode function ?

2
Aphfug (talkcontribs)

Hello,
we work on the website archi-wiki.org that makes a lot of semantic query {{#ask}} and display them with templates. So we use #explode a lot because a smw {{#ask}} returns a string with delimiters. But it said to not use {{#explode}} and the others ParserFucntions/String functions. There is the wikipedia Module:String that replace a lot of them, but I haven't found replacement for the {{#explode}} so I tried making my own (Module:Explode):

local p = {}

function p.findSep(frame)
local text = frame.args[1] or ""
local sepPattern = frame.args[2] or ";"
local indice = frame.args[3] or 0
indice=indice+1
local i1=1
local i2=1
local i3=1
for i=0,indice-1 do
if (i+1==indice) and (string.find(text,sepPattern,i3)==nil) then
i1=i3
i2=0
break
end
i1=i3
i2,i3=string.find(text,sepPattern,i3)
if (i2 == nil) or (i3==nil) then
return ""
end
i3=i3+1
end


return string.sub(text,i1,i2-1)
end

return p

It has the exact same outputs but I don't know how well it is optimised.
Is there a better solution that I don't know of ?
Right now, when we make a query that outputs 10k+ results, it takes a lot of time.

Here's some test examples :

{{#vardefine:test|test1;sep;test2;sep;test3;sep;test4;sep;}}
T1: {{#invoke:Explode|findSep|{{#var:test}}|;sep;|0}} | {{#explode:{{#var:test}}|;sep;|0}}
T2: {{#invoke:Explode|findSep|{{#var:test}}|;sep;|1}} | {{#explode:{{#var:test}}|;sep;|1}}
T3: {{#invoke:Explode|findSep|{{#var:test}}|;sep;|7}} | {{#explode:{{#var:test}}|;sep;|7}}


res :
T1: test1 | test1
T2: test2 | test2
T3: |


(we use luastandalone for now, we're still on mw 1.39 and php 7.4 and we didn't manage to install luasandbox. We're waiting for mw 1.43 lts)

Product Version
MediaWiki 1.39.7
PHP 7.4.33 (fpm-fcgi)
MariaDB 10.11.6-MariaDB-0+deb12u1-log
ICU 72.1
elasticsearch 6.8.23
Semantic Mediawiki 4.1.2
Semantic Result Format 4.0.2
ParserFunctions 1.6.0
Scribunto – (84400d8)
Bawolff (talkcontribs)
Reply to "It is said to not use thoses functions, but how do I replace the explode function ?"

Would a parser function be best for a currency/point-based extension?

3
Newman2 (talkcontribs)

Hello. For one of my wikis, I have been planning on creating a point-based extension for a feature that can be used to access certain parts of a wiki (i.e. full versions of games that have demos). However, I am not sure whether I should use a parser function or some other type of extension. Any advice? Thank you for reading.

Bawolff (talkcontribs)
Newman2 (talkcontribs)

Nice, but how can I implement that hook into a currency-like feature?

Reply to "Would a parser function be best for a currency/point-based extension?"