Jump to content
 







Main menu
   


Navigation  



Main page
Get MediaWiki
Get extensions
Tech blog
Contribute
 




Support  



User help
FAQ
Technical manual
Support desk
Communication
 




Development  



Developer portal
Code statistics
 




mediawiki.org  



Community portal
Recent changes
Translate content
Random page
Village pump
Sandbox
 




In other languages  




Add links
 







Search  









English
 


















Create account

Log in
 









Create account
 Log in
 




Pages for logged out editors learn more  



Contributions
Talk
 

















Project:Support desk










MediaWiki.org
Discussion
 

















View history
 








Tools
   


Actions  



View history
 




General  



What links here
Related changes
Upload file
Special pages
Page information
Get shortened URL
Download QR code
 




Print/export  



Create a book
Download as PDF
Printable version
 


















About this board  




Edit description

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


Other places to ask for help

Before you post


Check the FAQ and Errors and symptoms.

If your question is about a specific feature, check the relevant technical manual, end-user helporextension page and consider asking on its talk page.

For issues about the mediawiki.org website, report to Village Pump instead.

Ask technical questions about Wikimedia websites on meta:Tech instead.

Post a new question


(一)To help us answer your questions, please indicate which version of MediaWiki you are using, as found on your wiki's Special:Version page:

(二)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.

(三)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.

(四)To start a new thread, click the box with the text "Start a new topic".
 












Start a new topic  







Pre-commit hook Errors


5 comments    04:44, 24 July 2024  2 hours ago  
5







History
Permalink
Summarize
 







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.
 






Permalink
 










Malyacko  (talkcontribs)  

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






Permalink
 










AnujAgrawal380  (talkcontribs)  

after output of all tests.
 






Permalink
 








Malyacko  (talkcontribs)  

Where to see test results?
 






Permalink
 












Bawolff  (talkcontribs)  

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






Permalink
 






Reply to "Pre-commit hook Errors"  



No actor for target_author_id row


3 comments    01:39, 24 July 2024  5 hours ago  
3







History
Permalink
Summarize
 







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
 






Permalink
 










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.
 






Permalink
 










Buinghi1990  (talkcontribs)  

ok






Permalink
 






Reply to "No actor for target_author_id row"  



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


2 comments    20:28, 23 July 2024  11 hours ago  
2







History
Permalink
Summarize
 







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)
 






Permalink
 










Bawolff  (talkcontribs)    





Permalink
 






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



Backup/Export all


2 comments    20:14, 23 July 2024  11 hours ago  
2







History
Permalink
Summarize
 







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!
 






Permalink
 










Bawolff  (talkcontribs)  

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






Permalink
 






Reply to "Backup/Export all"  



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


3 comments    18:12, 23 July 2024  13 hours ago  
3







History
Permalink
Summarize
 







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.
 






Permalink
 










Bawolff  (talkcontribs)    





Permalink
 










Newman2  (talkcontribs)  

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






Permalink
 






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



TypeError when attempting to view Special Pages


3 comments    17:18, 23 July 2024  14 hours ago  
3







History
Permalink
Summarize
 







VonCorax  (talkcontribs)  

I just upgraded to MediaWiki 1.42.1 and now I get an InternalError:TypeError when attempting to display the Special Pages page.

The specific message is:

/wiki/index.php?title=Special:SpecialPages TypeError: MediaWiki\Auth\TemporaryPasswordPrimaryAuthenticationProvider::__construct(): Argument #1 ($dbProvider) must be of type Wikimedia\Rdbms\IConnectionProvider, Wikimedia\Rdbms\LoadBalancer given, called in /home/brassgog/public_html/wiki/extensions/ForumSsoProvider/ForumAuthManager.php on line 36

along with a lengthy backtrace which I will not reproduce here.

I'm using ForumSsoProvider to provide integration with Simple Machines Forum 2.1.
 






Permalink
 










Bawolff  (talkcontribs)  

Error means your version of ForumSsoProvider is incompatible with your version of mediawiki. Try and get an updated version of the extension.
 






Permalink
 










VonCorax  (talkcontribs)  

I had forgotten that ForumSsoProvider is a separate plugin; in this case I am using SimpleMachines' smf-mw-auth module. There isn't an official fix for it, but there is a PR with a patch that seems to have fixed the problem.
 






Permalink
 






Reply to "TypeError when attempting to view Special Pages"  



Visual Editor not working


2 comments    09:25, 23 July 2024  22 hours ago  
2







History
Permalink
Summarize
 







JulianMalcolm08  (talkcontribs)  

I recently upgraded my Media Wiki to the latest stable version. I followed all the procedures I do in any other upgrade except this time there were a few issues. The first and most major issue is the fact that the Visual Editor is not working. When you click the "edit" tab the web page URL changes to show you are editing but the actual page does not change. I already tried re-installing the extension, but I still get the same issue. My search bar is also not working as it did before. It no longer gives me page suggestions while I am typing but that might just be a new thing in the update?


Any help would be appreciated.

Thanks,
 






Permalink
 










TheDJ  (talkcontribs)  

That sounds like your Javascript resources are not served up correctly ? A browser inspector should be able to tell you these things.
 






Permalink
 






Reply to "Visual Editor not working"  



Setting up MediaWiki through dreamhost


2 comments    09:24, 23 July 2024  22 hours ago  
2







History
Permalink
Summarize
 







Mnsolar  (talkcontribs)  

We are having trouble with completing the basic setup by running the configuration script. We keep getting 404 error when we go to the URL of our MediaWiki installation in our web browser to complete the rest of the installation. We uploaded the file as mentioned here. We were also following this tutorial. 

We are not sure what else to do. Has anyone set up a Media Wiki specifically through dreamhost? Thank you for your help in advance.
 






Permalink
 










TheDJ  (talkcontribs)  

I have no experience with dreamhost, but In general: "simplify all the things". First try a very simply hello world .html file, see if you can get a response serving it up. Then try an index.php with just phpinfo() in it and see if you can get that to respond. etc.. etc etc.

This will tell you which layer of the several layers that are involved is giving you a problem.
 






Permalink
 






Reply to "Setting up MediaWiki through dreamhost"  



Does Mediawiki 1.39 LTS support MySQL 8?


2 comments    09:17, 23 July 2024  22 hours ago  
2







History
Permalink
Summarize
 







Mans0954  (talkcontribs)  

The Compatibility guide says that Mediawiki 1.39 supports MySQL 5.7.0+.

To be sure before we upgrade our MySQL database, does that include MySQL 8.x or does the `+` just refer to the 5.x family?


Thanks.
 






Permalink
 










TheDJ  (talkcontribs)  

That includes MySQL 8.
 






Permalink
 






Reply to "Does Mediawiki 1.39 LTS support MySQL 8?"  



nginx rewrite rules for multiple wikis


One comment    16:58, 21 July 2024  2 days ago  
1







History
Permalink
Summarize
 







Teer.8  (talkcontribs)  

Can anyone please help me set up nginx rewrite rules for multiple wikis with a common installation? I have a separate wiki for each language. E.g.
   example.org/wiki/en
   example.org/wiki/fr/

Problem: Both wikis load with the correct URLs, but any action re-directs to the English wiki. E.g. creating a new page on the French (i.e. example.org/wiki/fr/) wiki re-directs to the English (i.e. example.org/wiki/en/) wiki. And if I try to create `Main_page` on the French wiki, it re-directs and opens editing the existing Main_page on the English wiki @ example.org/wiki/en/Main_Page.

How do I rectify this? Thanks in advance, I am completely stumped and any help will be GREATLY appreciated.

nginx config:
   server 
   {
       ssl_certificate     /etc/letsencrypt/live/example.org/fullchain.pem;    # managed by Certbot
       ssl_certificate_key /etc/letsencrypt/live/example.org/privkey.pem;      # managed by Certbot
       listen          443 ssl;
       server_name     example.org;
       root            /srv/live/static/example.org/www;   # wiki is not root page
       access_log      /var/log/nginx/example.org/access.log;
       error_log       /var/log/nginx/example.org/error.log;


       location ^~ /wiki/
       {
           alias /srv/live/php/mediawiki-1.42.1/;
           # Redirect /wiki/ to /wiki/en/
           location = /wiki/
           {
               return 301 $scheme://$host/wiki/en/;
           }
           try_files $uri $uri/ @mediawiki;
           # PHP handling for wiki
           location ~ \.php$ 
           {
               fastcgi_pass    unix:/var/run/php/php8.3-fpm.sock;
               fastcgi_index   index.php;
               fastcgi_param   SCRIPT_FILENAME $request_filename;
               fastcgi_param   MW_DB $arg_lang;
               include fastcgi_params;
           }
       }
       location @mediawiki
       {
           set $lang 'en';
           if ($uri ~ "^/wiki/(en|fr)/")
           {
               set $lang $1;
           }
           set $wiki_id 'example_org_en';
           if ($lang = 'fr') 
           {
               set $wiki_id 'example_org_fr';
           }
           rewrite "^/wiki/([a-z]{2})/(.*)$" /wiki/index.php?title=$2&lang=$1 last;
           fastcgi_param MW_DB $wiki_id;
       }
   }

LocalSettings.php
   <?php
   # Protect against web entry
   if ( !defined( 'MEDIAWIKI' ) ) {
       exit;
   }
   
   # Multi-wiki configuration
   $wgConf = new SiteConfiguration();
   $wikiLangMap = [
       'example_org_en' => 'en',
       'example_org_fr' => 'fr',
   ];
   
   $wgConf->wikis = array_keys($wikiLangMap);
   
   $wgConf->settings = [
       'wgServer' => [
           'default' => 'https://example.org',
       ],
       'wgSitename' => [
           'default' => 'example Wiki',
       ],
       'wgLanguageCode' => $wikiLangMap,
       'wgDBprefix' => [
           'example_org_en' => 'example_org_en_',
           'example_org_fr' => 'example_org_fr_',
       ],
   ];
   
   # Determine the current wiki
   $wikis = [
       'example.org/wiki/en' => 'example_org_en',
       'example.org/wiki/fr' => 'example_org_fr',
   ];
   
   if ( defined( 'MW_DB' ) ) 
   {
       $wikiID = MW_DB;
   }
   else
   {
       $uri = $_SERVER['REQUEST_URI'] ?? ;
       $parts = explode('/', trim($uri, '/'));
       $lang = $parts[1] ?? 'en';  // Default to 'en' if not specified
       $wikiID = $wikis["example.org/wiki/$lang"] ?? 'example_org_en';
   }
   
   # Apply the settings
   $wgConf->extractAllGlobals( $wikiID );
   
   # Common settings
   $wgScriptPath       = '/wiki';
   $wgResourceBasePath = $wgScriptPath;
   $wgArticlePath = "/wiki/$wgLanguageCode/$1";
   
   $wgLogos = [
       '1x' => "$wgResourceBasePath/resources/assets/change-your-logo.svg",
       'icon' => "$wgResourceBasePath/resources/assets/change-your-logo.svg",
   ];
   
   $wgEnableEmail = true;
   $wgEnableUserEmail = true;
   $wgEmergencyContact = ;
   $wgPasswordSender = ;
   $wgEnotifUserTalk = true;
   $wgEnotifWatchlist = true;
   $wgEmailAuthentication = true;
   
   ## Database settings
   
   $wgDBtype     = 'mysql';
   $wgDBserver   = 'localhost';
   $wgDBname     = 'mediawiki_docs_db';
   $wgDBuser     = 'wiki_example_org';
   $wgDBpassword = 'password';
   
   # MySQL specific settings
   
   $wgDBssl = false;
   $wgDBTableOptions = "ENGINE=InnoDB, DEFAULT CHARSET=binary";
   
   # the rest are defaults, will post if requested!


.../mediawiki-1.42.1/settings/example.org/LocalSettings.en.php
   <?php
   $wgLanguageCode = 'en';
   $wgSitename     = 'example.org Wiki';

.../mediawiki-1.42.1/settings/example.org/LocalSettings.fr.php
   <?php
   $wgLanguageCode = 'fr';
   $wgSitename     = 'example.org Wiki';
 






Permalink
 






Reply to "nginx rewrite rules for multiple wikis"  




Load more  






Retrieved from "https://www.mediawiki.org/wiki/Project:Support_desk"





Text is available under the Creative Commons Attribution-ShareAlike License; additional terms may apply. See Terms of Use for details.



Privacy policy

About mediawiki.org

Disclaimers

Code of Conduct

Developers

Statistics

Cookie statement

Mobile view



Wikimedia Foundation
Powered by MediaWiki