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

Does Mediawiki 1.39 LTS support MySQL 8?

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

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

Setting up MediaWiki through dreamhost

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

Reply to "Setting up MediaWiki through dreamhost"

Visual Editor not working

1
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,

Reply to "Visual Editor not working"

No actor for target_author_id row

1
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
Reply to "No actor for target_author_id row"

nginx rewrite rules for multiple wikis

1
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';
Reply to "nginx rewrite rules for multiple wikis"

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"

No Bureaucrat Account

10
Summary by Marvin9078

Assigning bureaucrat rights to an account in the user_groups table in the database made it possible to aquire the respective rights to manage the wiki.

Marvin9078 (talkcontribs)

Hi,

apparently a bureaucrat account hasn't been created during the installation. The maintenance script createAndPromote.php can only be used with administration rights. What should I do now?

As far as I can see, there's no such account on the wiki.

Bawolff (talkcontribs)

> createAndPromote.php can only be used with administration rights.


This is not true(?) Can you describe what you mean by this?

Marvin9078 (talkcontribs)

How do u use maintenance scripts? Dont you use em by opening the url in the browser? for example:

wiki.de/maintenance/createAndPromote.php

94rain (talkcontribs)
Marvin9078 (talkcontribs)

What Terminal?

Malyacko (talkcontribs)

Whatever CLI access your server provides.

Marvin9078 (talkcontribs)

There is none provided. Is there an other way?

94rain (talkcontribs)

How did you install MediaWiki? Are you using some kind of PHP web hosting service?

If you have access to the database, it should be possible to change user permissions from there. Check out Manual:User_groups_table

Marvin9078 (talkcontribs)

That worked. Thank you a lot!

This post was hidden by Marvin9078 (history)
ArchATempAcct (talkcontribs)

We havent altered localsettings.php (to my knowledge) and now everyone is getting this error, seemingly out of nowhere, when people try to use their preferences area:

Internal error Jump to navigation Jump to search

[5ae6fcab633b45b38c47906d] /Special:Preferences MWException: Default '2' is invalid for preference imagesize of user 𝗔𝗿𝗰𝗵𝗮𝗻𝗴𝗲𝗹

Backtrace:

from /home/rabidpan/public_html/fascipedia/includes/preferences/DefaultPreferencesFactory.php(351)

  1. 0 /home/rabidpan/public_html/fascipedia/includes/preferences/DefaultPreferencesFactory.php(260): MediaWiki\Preferences\DefaultPreferencesFactory->loadPreferenceValues(User, RequestContext, array)
  2. 1 /home/rabidpan/public_html/fascipedia/includes/preferences/DefaultPreferencesFactory.php(1800): MediaWiki\Preferences\DefaultPreferencesFactory->getFormDescriptor(User, RequestContext)
  3. 2 /home/rabidpan/public_html/fascipedia/includes/specials/SpecialPreferences.php(131): MediaWiki\Preferences\DefaultPreferencesFactory->getForm(User, RequestContext, string)
  4. 3 /home/rabidpan/public_html/fascipedia/includes/specials/SpecialPreferences.php(109): SpecialPreferences->getFormObject(User, RequestContext)
  5. 4 /home/rabidpan/public_html/fascipedia/includes/specialpage/SpecialPage.php(701): SpecialPreferences->execute(NULL)
  6. 5 /home/rabidpan/public_html/fascipedia/includes/specialpage/SpecialPageFactory.php(1428): SpecialPage->run(NULL)
  7. 6 /home/rabidpan/public_html/fascipedia/includes/MediaWiki.php(316): MediaWiki\SpecialPage\SpecialPageFactory->executePath(string, RequestContext)
  8. 7 /home/rabidpan/public_html/fascipedia/includes/MediaWiki.php(904): MediaWiki->performRequest()
  9. 8 /home/rabidpan/public_html/fascipedia/includes/MediaWiki.php(562): MediaWiki->main()
  10. 9 /home/rabidpan/public_html/fascipedia/index.php(50): MediaWiki->run()
  11. 10 /home/rabidpan/public_html/fascipedia/index.php(46): wfIndexMain()
  12. 11 {main}
Reply to "preferences error"

Why I can not regist to https://vi.wikipedia.org/

4
DellosCao (talkcontribs)

I need support to know that is it Create an account on https://vi.wikipedia.org/ system still working ?

After successfully registering with the user name pass and email it redirects to the notification page which notices that I can not edit other pages yet until some date point. it is fine but how about login to the created account? There is no email verification or something else. I tried to log in using the saved Username and password but failed.

Bawolff (talkcontribs)

You logged in here, and we use the same account system as vi.wikipedia.org

DellosCao (talkcontribs)

it same to confuse me. I can not use this site account for login to vi.wikipedia.org

P858snake (talkcontribs)

@DellosCao Can you copy and paste the exact error message you are receiving?

Reply to "Why I can not regist to https://vi.wikipedia.org/"

MediaWiki in WordPress

6
きくらげさん (talkcontribs)

(Translated to English by Google)

I installed MediaWiki under a directory where WordPress is located (e.g. example.jp/wordpress/w/index.php), but the URLs were displayed in the format /w/index.php?title=$1, which was hard to read, so I changed it to /wiki/$1.

But then the pages were loaded on WordPress instead of MediaWiki, and I got a WordPress 404 error. What can I do to get them to display correctly?

I tried removing the permissions from WordPress to /wiki/ and /w/ in .htaccess, but it didn't work.

(I'm a beginner, so my explanation may be poor or my measures may be strange, but please bear with me.)


(Original: Japanese text)

WordPress のあるディレクトリの下 (例: example.jp/wordpress/w/index.php) に MediaWiki を導入してみたのですが、URL が /w/index.php?title=$1 の形式で表示されていて見にくかったので、/wiki/$1 の形式に変更しました。

すると MediaWiki 側ではなく WordPress 側でページが読み込まれ、WordPress の 404 エラーが出てしまいます。 正常に表示させるにはどうすればよいでしょうか?

.htaccess で、WordPress から /wiki/ と /w/ への権限をなくしてみましたが効果はありません。

(初心者のため、伝え方が下手だったり施策がおかしかったりするかもしれませんが、ご容赦願います)

Fokebox (talkcontribs)

Why do you need CMS at the same directory. Have them at separate directories and set up both to use scripts paths to the direcotries. More over you can have bothsites at ceperate domain names like wiki.mysite.jp and wordpress.mysite.jp

きくらげさん (talkcontribs)

Thank you for your reply.

WordPress and MediaWiki are separate directories. What does "set up both to use scripts paths to the directories" mean and how do I what to do that? I don't understand well, sorry.

Bawolff (talkcontribs)

You probably need different rewrite rules in .htaccess to control which application handles the url. There arent guides for when both wordpress and mediawiki are together - so if you are a new user i would reccomend not having them together so you can just follow manual:ShortURL

きくらげさん (talkcontribs)

Thank you for your reply.

Someone answered same this in another faq website so probably this is correct reply.

きくらげさん (talkcontribs)

(Wrong reply)

Reply to "MediaWiki in WordPress"