Project:Support desk

About this board

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

(Read this message in a different language)

See also

Before you post

Post a new question

  1. To help us answer your questions, please indicate which versions you are using, as found on your wiki's Special:Version page:
    • MediaWiki version
    • PHP version
    • Database type and version
  2. Please include the web address (URL) to your wiki if possible. It's often easier for us to identify the source of the problem if we can see the error directly.
  3. To start a new thread, click "Start a new topic".

Help with Scribunto and Raspberry PI

2
Kato196613 (talkcontribs)

Hi,

I installed MediaWiki 39.0 on a Raspberry PI 4 and everything seems ok.

Then I'd want to export some pages from Wikipedia.it and import on my Wiki.

I exported for example th page related to Cina including all templates.

I imported the resulting XML file on my Wiki using Intercity Prefix wikipedia, then I try to see the result for the Cina page.

When the page is displayed I see the following errors on page:

Varie
Codici ISO 3166 [[ISO 3166-2:{{#Property:P297}}|{{#Property:P297}}]], {{#Property:P298}}, {{#Property:P299}}
TLD Modulo:Wikidata:455: attempt to index field 'wikibase' (a nil value)
Prefisso tel. Modulo:Wikidata:455: attempt to index field 'wikibase' (a nil value)
Sigla autom. CHN
Inno nazionale Marcia dei Volontari

File:March of the Volunteers instrumental.ogg

Festa nazionale 1º ottobre
Cina - Mappa
Evoluzione storica
Stato precedente Repubblica di Cina Repubblica di Cina

Il template {{Coord}} ha riscontrato degli errori (istruzioni): Modulo:Wikidata:455: attempt to index field 'wikibase' (a nil value)

Errore Lua in Modulo:Wikidata alla linea 455: attempt to index field 'wikibase' (a nil value).Errore Lua in Modulo:Wikidata alla linea 455: attempt to index field 'wikibase' (a nil value).Errore Lua in Modulo:Wikidata alla linea 455: attempt to index field 'wikibase' (a nil value).Errore Lua in Modulo:Wikidata alla linea 455: attempt to index field 'wikibase' (a nil value).Errore Lua in Modulo:Wikidata alla linea 455: attempt to index field 'wikibase' (a nil value).Errore Lua in Modulo:Wikidata alla linea 455: attempt to index field 'wikibase' (a nil value).


I installed also lua 5.1.5 on my Raspberry and added the lines

$wgScribuntoDefaultEngine = 'luastandalone';

$wgScribuntoEngineConf['luastandalone']['luaPath'] = '/usr/bin/lua5.1';

to LocalSettings.php.

What's my errors?


Thanks,

Paolo

Bawolff (talkcontribs)
Reply to "Help with Scribunto and Raspberry PI"

mediawiki 1.38 upgrade to 1.39

3
5.193.68.230 (talkcontribs)

After upgrading from 1.38 to 1.39

php maintenance/update.php gives error,

Modifying tl_namespace field of table templatelinks...Wikimedia\Rdbms\DBQueryError from line 1618 of /var/www/html/includes/libs/rdbms/database/Database.php: Error 1091: Can't DROP INDEX `PRIMARY`; check that it exists

Function: Wikimedia\Rdbms\Database::sourceFile( /var/www/html/maintenance/archives/patch-templatelinks-tl_title-nullable.sql )

Query: ALTER TABLE  `templatelinks`

DROP  PRIMARY KEY

5.193.68.230 (talkcontribs)

mysql> describe templatelinks;

+-------------------+---------------------+------+-----+---------+-------+

| Field             | Type                | Null | Key | Default | Extra |

+-------------------+---------------------+------+-----+---------+-------+

| tl_from           | int(10) unsigned    | NO   |     | 0       |       |

| tl_namespace      | int(11)             | NO   | MUL | 0       |       |

| tl_title          | varbinary(255)      | NO   |     |         |       |

| tl_from_namespace | int(11)             | NO   | MUL | 0       |       |

| tl_target_id      | bigint(20) unsigned | NO   | MUL | NULL    |       |

+-------------------+---------------------+------+-----+---------+-------+

5.193.68.230 (talkcontribs)

SHOW INDEXES FROM templatelinks;

+---------------+------------+----------------------------------+--------------+-------------------+-----------+-------------+----------+--------+------+------------+---------+---------------+---------+

| Table         | Non_unique | Key_name                         | Seq_in_index | Column_name       | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment | Index_comment | Ignored |

+---------------+------------+----------------------------------+--------------+-------------------+-----------+-------------+----------+--------+------+------------+---------+---------------+---------+

| templatelinks |          1 | tl_namespace                     |            1 | tl_namespace      | A         |        3300 |     NULL | NULL   |      | BTREE      |         |               | NO      |

| templatelinks |          1 | tl_namespace                     |            2 | tl_title          | A         |     2479612 |     NULL | NULL   |      | BTREE      |         |               | NO      |

| templatelinks |          1 | tl_namespace                     |            3 | tl_from           | A         |    47112645 |     NULL | NULL   |      | BTREE      |         |               | NO      |

| templatelinks |          1 | tl_backlinks_namespace           |            1 | tl_from_namespace | A         |        3686 |     NULL | NULL   |      | BTREE      |         |               | NO      |

| templatelinks |          1 | tl_backlinks_namespace           |            2 | tl_namespace      | A         |       14745 |     NULL | NULL   |      | BTREE      |         |               | NO      |

| templatelinks |          1 | tl_backlinks_namespace           |            3 | tl_title          | A         |     1346075 |     NULL | NULL   |      | BTREE      |         |               | NO      |

| templatelinks |          1 | tl_backlinks_namespace           |            4 | tl_from           | A         |    47112645 |     NULL | NULL   |      | BTREE      |         |               | NO      |

| templatelinks |          1 | tl_target_id                     |            1 | tl_target_id      | A         |     1624573 |     NULL | NULL   |      | BTREE      |         |               | NO      |

| templatelinks |          1 | tl_target_id                     |            2 | tl_from           | A         |    47112645 |     NULL | NULL   |      | BTREE      |         |               | NO      |

| templatelinks |          1 | tl_backlinks_namespace_target_id |            1 | tl_from_namespace | A         |        5130 |     NULL | NULL   |      | BTREE      |         |               | NO      |

| templatelinks |          1 | tl_backlinks_namespace_target_id |            2 | tl_target_id      | A         |      298181 |     NULL | NULL   |      | BTREE      |         |               | NO      |

| templatelinks |          1 | tl_backlinks_namespace_target_id |            3 | tl_from           | A         |    47112645 |     NULL | NULL   |      | BTREE      |         |               | NO      |

+---------------+------------+----------------------------------+--------------+-------------------+-----------+-------------+----------+--------+------+------------+---------+---------------+---------+

Reply to "mediawiki 1.38 upgrade to 1.39"
85.219.50.188 (talkcontribs)

Hello,

I am locally creating a wiki for my own projects and I have very limited technical knowledge when it comes to web servers (so please bear with me if I'm clueless about anything). I must mention that I have just installed it and shouldn't have changed anything beyond its base configuration.


The error is that, whenever I access my main page through Firefox, it redirects me to "localhost/wiki/index.php/Main_Page" and shows an image with raw html and no styles whatsoever.


The relevant LocalSettings.php parameters are as follows:

$wgSitename = "Urssos";

$wgScriptPath = "/wiki";

$wgServer = "http://localhost";

$wgResourceBasePath = $wgScriptPath;


PD: I have checked Manual:Common errors and symptoms#The wiki appears without styles applied and images are missing to see if my error is because of anything reported there and had no luck applying the fixes to the best of my ability.

85.219.50.188 (talkcontribs)

I forgot to mention that I am using both the latest version of MediaWiki and XAMPP

Malyacko (talkcontribs)

Hi, please provide your exact versions ("latest" has no meaning). Please open the Developer Tools of your web browser and check the "network" tab for errors.

85.219.50.188 (talkcontribs)

My bad, my MediaWiki version is 1.39 and my PHP version is 7.4.33, both should be compatible if I looked at the requirements right.

85.219.50.188 (talkcontribs)

I've also just checked the network tab and can't seem to find any error codes, everything looks green.

Bawolff (talkcontribs)

Can you find the load.php css requests in the network tab, open them in a new window and see if they look like css? (E.g. do they look like a bunch of text vs say an error message or an html page or blank)

Also be sure you have php error reporting enabled, and check your php error log.

Which skin are you using?

85.219.50.188 (talkcontribs)

When I open the load.php req on a new tab it shows me a pretty long sequence in raw text , without any sort of style either.


Here's a few lines of what shows up:

"mw.loader.implement("jquery@1vnvf",function($,jQuery,require,module){(function(global,factory){"use strict";if(typeof module==="object"&&typeof module.exports==="object"){module.exports=global.document?factory(global,true):function(w){if(!w.document){throw new Error("jQuery requires a window with a document");}return factory(w);};}else{factory(global);}})(typeof window!=="undefined"?window:this,function(window,noGlobal){"use strict";var arr=[];var getProto=Object.getPrototypeOf;var slice=arr.slice;var flat=arr.flat?function(array){return arr.flat.call(array);}:"


Regarding the PHP error log (and if it's the one located under Apache), the following is what appears to be the issue:


[Mon Dec 05 16:33:05.745365 2022] [ssl:warn] [pid 2076:tid 428] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name

[Mon Dec 05 16:33:05.959412 2022] [core:warn] [pid 2076:tid 428] AH00098: pid file D:/AA MediaWiki/xampp/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?

[Mon Dec 05 16:33:05.962414 2022] [ssl:warn] [pid 2076:tid 428] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name

[Mon Dec 05 16:33:07.716811 2022] [mpm_winnt:notice] [pid 2076:tid 428] AH00455: Apache/2.4.54 (Win64) OpenSSL/1.1.1p PHP/7.4.33 configured -- resuming normal operations

[Mon Dec 05 16:33:07.716811 2022] [mpm_winnt:notice] [pid 2076:tid 428] AH00456: Apache Lounge VC15 Server built: Jun 24 2022 10:13:23

[Mon Dec 05 16:33:07.716811 2022] [core:notice] [pid 2076:tid 428] AH00094: Command line: 'd:\\aa mediawiki\\xampp\\apache\\bin\\httpd.exe -d D:/AA MediaWiki/xampp/apache'

[Mon Dec 05 16:33:07.719812 2022] [mpm_winnt:notice] [pid 2076:tid 428] AH00418: Parent: Created child process 3800

[Mon Dec 05 16:33:08.072891 2022] [ssl:warn] [pid 3800:tid 432] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name

[Mon Dec 05 16:33:08.134905 2022] [ssl:warn] [pid 3800:tid 432] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name

[Mon Dec 05 16:33:08.166913 2022] [mpm_winnt:notice] [pid 3800:tid 432] AH00354: Child: Starting 150 worker threads.

[Mon Dec 05 16:38:54.737854 2022] [ssl:warn] [pid 10748:tid 428] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name

[Mon Dec 05 16:38:54.812671 2022] [core:warn] [pid 10748:tid 428] AH00098: pid file D:/AA MediaWiki/xampp/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?

[Mon Dec 05 16:38:54.815672 2022] [ssl:warn] [pid 10748:tid 428] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name

[Mon Dec 05 16:38:54.844679 2022] [mpm_winnt:notice] [pid 10748:tid 428] AH00455: Apache/2.4.54 (Win64) OpenSSL/1.1.1p PHP/7.4.33 configured -- resuming normal operations

[Mon Dec 05 16:38:54.844679 2022] [mpm_winnt:notice] [pid 10748:tid 428] AH00456: Apache Lounge VC15 Server built: Jun 24 2022 10:13:23

[Mon Dec 05 16:38:54.844679 2022] [core:notice] [pid 10748:tid 428] AH00094: Command line: 'd:\\aa mediawiki\\xampp\\apache\\bin\\httpd.exe -d D:/AA MediaWiki/xampp/apache'

[Mon Dec 05 16:38:54.848680 2022] [mpm_winnt:notice] [pid 10748:tid 428] AH00418: Parent: Created child process 7376

[Mon Dec 05 16:38:55.165715 2022] [ssl:warn] [pid 7376:tid 432] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name

[Mon Dec 05 16:38:55.227719 2022] [ssl:warn] [pid 7376:tid 432] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name

[Mon Dec 05 16:38:55.260719 2022] [mpm_winnt:notice] [pid 7376:tid 432] AH00354: Child: Starting 150 worker threads.


As to what style I'm using, it should be set as Vector in the LocalSettings file.

85.219.50.188 (talkcontribs)

After fixing the error by using "localhost" as the server name, that error has disappeared but the wikimedia page still has no style.

Bawolff (talkcontribs)

So that looks like what load.php should look like for a JS. Do all of them look like that or are some blank or have error messages? In particular, can you check the CSS one too (The css load.php should show up in a different section of the developer toolbar. The url will end in &only=styles&skin=vector )

The PHP log you posted is unlikely to be related to the style issue.

You can double check what skin you are currently using by looking in Special:Preferences.

85.219.50.188 (talkcontribs)

Hmm, the issue might be then that there is no load.php for css. I am currently in the CSS Network tab and nothing shows up at all, but there are no errors in any tab either.


And yes, I have just checked that I'm using Vector.

Reply to "Main page has no style/css"

Transclusion at end of a sentence (full stop).

3
193.110.182.11 (talkcontribs)

Hello everybody,


I have checked the help page but didn't find a solution for my problem.


Transclusion - MediaWiki


When I have an optional parameter in dem middle of a sentence it would l write something like this.


The {{{Parameter|rabbits}}} are in the garden.


This construction works when its an optional parameter and when no parameter is given only one space is between the parameter and the rest of the sentence. Like this.


The are in the garden.


however when I try to substitute something at the end of the sentence (in the garden) I would get something like.


"The rabbits are in the garden ." When I'm using the parameter with an space at the beginning, it does not take the space. I tried to do it like


The rabbits are{{{ in the garden}}}. Which results in


The rabbits arein the garden.


Does anybody knows a good solution for this. I would have to create all templates with fullstop at the end when used at the end of a sentence?


Thank you very much.

Bawolff (talkcontribs)

Did you try using   instead of a space?

If that doesn't work, try  

Fhihu (talkcontribs)

Thank you very much Bawolff for your reply,

I tried using the template and before the parameter string I used either &#32 and

&nbsp. But it seems not to work. Is it correct like this

{{Template|Location=&#32in the garden}}.

Thank you very much for your reply.

Reply to "Transclusion at end of a sentence (full stop)."

composer update creates an error message

7
HandrikF (talkcontribs)
root:root$ composer update
The "wikimedia/composer-merge-plugin" plugin was skipped because it requires a Plugin API version ("^1.0") that does not match your Composer installation ("2.1.0"). You may need to run composer update with the "--no-plugins" option.
> ComposerHookHandler::onPreUpdate
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires wikimedia/composer-merge-plugin 1.4.1 -> satisfiable by wikimedia/composer-merge-plugin[v1.4.1].
    - wikimedia/composer-merge-plugin v1.4.1 requires composer-plugin-api ^1.0 -> found composer-plugin-api[2.1.0] but it does not match the constraint.

I want to do a composer update and unfortunately I get the following error message.

Can anyone tell me a solution to this problem?

Malyacko (talkcontribs)

Please see the sidebar - which MW version is this about?

HandrikF (talkcontribs)

Sorry. The Mediawiki version is:MediaWiki 1.35.0

Bawolff (talkcontribs)

have you modified your composer files in any way?

HandrikF (talkcontribs)

no. I have not changed these. The last years I just updated Mediawiki and didn't touch composer. Now I wanted to see what this has to do with the composer. And see there, it generates an error.

HandrikF (talkcontribs)

Have partially solved the problem in which I entered this.

composer require wikimedia/composer-merge-plugin

Thank you very much for the help.

VietDuc19 (talkcontribs)

Thank you so much for your info. It's fixed my problem!

Reply to "composer update creates an error message"
Luciferindcok (talkcontribs)

Hello

Please suggest me a calendar extension for mediawiki.

It should have color for events, events should last more than one day. should be able to include links. I have tried , Mscalendar and Js calendar.

Js calendar is not showing up any options to add events.

Jonathan3 (talkcontribs)

It depends on what you want it for, but you could use Extension:Cargo. It has a calendar output format.

Reply to "Calendar"
BaffledBuffalo (talkcontribs)

I updated our MediaWiki from 1.32 to 1.39. After the login, the following error message appears on all (previously existing) pages: This page does not contain any text at the moment. You can create it, search its title on other pages or view the related logs. Interestingly, Special:AllPages lists all articles. Is this behavior due to a faulty migration of the database? Unfortunately, I don't get any error messages showing me a possible cause of the problem (even after using the debugging toolbar). I would be very happy to receive any suggestions that would help me to solve the problem. Thanks in advance!

Bawolff (talkcontribs)
BaffledBuffalo (talkcontribs)

Thanks! Are there typically any indicators for this? Can I check this manually in the database? Regarding the cleanupUsersWithNoId.php script, I'm not sure how to choose the prefix parameter. What would --prefix '*' do exactly? A look into the script couldn't reveal that (at least for me).

Bawolff (talkcontribs)

The best way you can tell, is through looking at the database, looking at the page table, find the entry for the missing page, look at the page_latest field, find the revision table entry where the rev_id matches the page_latest, and check the rev_actor field. If rev_actor is 0 then this is the problem you have. If it isn't than the problem is something else. If you are using sql, do a query [i havent tested this query] like: SELECT * FROM page WHERE page_title = "Main_Page" and page_namespace=0 left join revision on page_latest = rev_id left join actor on rev_actor=actor_id;


The prefix option just renames users who arent real users to have that prefix.

Some people report best results using cleanupUsersWithNoId is you use it before upgrading, so if you have a backup it might be better to try it before doing the upgrade.

BaffledBuffalo (talkcontribs)

Thanks, that helped! Actually, I could see that all entries of the rev_actor column are 0. Would you still suggest to use the migrateActors.php script as a solution?

The script cleanupUsersWithNoId.php mentioned by you is also mentioned in the manual of migrateActors.php. Unfortunately, it is still not clear to me which value I should choose for the --prefix parameter. Could you please help me again with this?

Regarding migrateActors.php, the manual says that the $wgActorTableSchemaMigrationStage variable has been removed in version 1.39. According to this, I should be able to call the migrateActors.php script without any further action (after the cleanupUsersWithNoId.php has been executed successfully)?

140.180.240.87 (talkcontribs)

Did you guys fix this? Any solution would be much appreciated!!

BaffledBuffalo (talkcontribs)

Not yet, unfortunately.

213.118.97.139 (talkcontribs)

We fixed this by updating the records from table `mw_revision` where `rev_actor` was 0. We've set the `rev_actor` to an existing `actor_id` from the `mw_actor` table

BaffledBuffalo (talkcontribs)

That's great! But how did you know which actor_id to put in the respective rev_actor?

Reply to "Pages seem to be gone"

Media uploads don't work (no thumbnails)

2
Summary by PKFP

Thanks, what did the trick was adding $wgThumbnailScriptPath = "{$wgScriptPath}/thumb.php"; to LocalSettings.php

PKFP (talkcontribs)

As you can see here: https://joinfediverse.wiki/Special:ListFiles

Since October many media uploads don't work as they should. Previews in different sizes, like thumbnails are not generated, so using the file in the wiki almost always leads to a blank preview.

Bawolff (talkcontribs)

So thumb.php works which suggests not a problem with image rendering.


Do you have 404 thumbnailing enabled? It looks kind of like what would happen if 404 thumbnailing was half enabled.

VisualEditir does not work at Flow (Structered discussions) talk pages.

1
Fokebox (talkcontribs)

After upgrading from 1.38.4 to 1.39.0 VisualEditir does not work at Flow (Structered discussions) talk pages having following error:

[Y48AWn@IyD2bEpG6yTCgxAAAAgY] Exception caught: Conversion from 'html' to 'wikitext' was requested, but core's Parser only supports 'wikitext' to 'html' conversion

Previously I had such problem but the patch helped to resolve the problem, but now it doesn't help.

Any ideas how to resolve the problem?

Reply to "VisualEditir does not work at Flow (Structered discussions) talk pages."

Extensions not appearing in special verison

2
Ramvenkey6278 (talkcontribs)

Mediawiki not loading any of the extensions, i am trying to add pluggablesso, pluggableauth and samlphp, i couldnt see any of the extensions in Special:Version


Windows 2019

MWIKi 1.35.8

Php 7.3.25

Bawolff (talkcontribs)

What did you put in LocalSettings.php ?

Reply to "Extensions not appearing in special verison"