Jump to content

Project:Support desk/Flow/2020/02

Add topic
From mediawiki.org
This page is an archive.
Please ask questions on the current support desk.

Problem during upgrade 1.33.0 -> 1.34.0

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


http://horawiki.org/ MediaWiki 1.34.0, PHP 7.2.19(litespeed), MySQL 5.6.44-cll-lve, ICU 57.1, Lua 5.1.5

I just carried out the indicated upgrade (on Godaddy, via Installatron) and there was one glitch: On pages using the Navbox template I got an error and huge backtrace in place of the page body. The top line of the backtrace complained that file extensions/Scribunto/includes/engines/LuaStandalone/binaries/lua5_1_5_linux_64_generic/lua was not executable. So I manually set the execute bit on that one file and everything (so far) is working fine.

I don't myself need help (unless my solution was wrong) but maybe this can be fixed so others don't have the same problem. Should I file a bug report? Larrydberg (talk) 00:45, 1 February 2020 (UTC)

If you used Godaddy's app distributor, and its the thing that's failing to set the execute bit, we don't have control over it to fix it. I guess one would have to send a bug report to godaddy.
I can confirm that lua is already set to execute in the version of mediawiki you get if you download it from our official website ( https://releases.wikimedia.org/mediawiki/1.34/mediawiki-1.34.0.tar.gz ) Bawolff (talk) 03:01, 1 February 2020 (UTC)
Thanks. I reported the problem to Godaddy, who passed me off further to cPanel. I reported it there too. Whether they'll do anything about it, God knoweth. Larrydberg (talk) 00:17, 2 February 2020 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

How to cancel MediaWiki's password reset’s email count?

If you use Special:PasswordReset more than once for the same username/e-mail address, then https://www.mediawiki.org/wiki/Manual:$wgPasswordReminderResendTime dictates you’ll get "A password reset email has already been sent, within the last 24 hours. To prevent abuse, only one password reset email will be sent per 24 hours."

But that user lost their message and I need to let them regenerate it.

How can I reset the count, probably through the database? 176.230.80.21 (talk) 09:01, 1 February 2020 (UTC)

Technically its the user_newpass_time field of the user table in the database. We don't really reccomend mucking about in the database. Have you considered just temporarily changing $wgPasswordReminderResendTime, send the reset, then change it back? Bawolff (talk) 03:26, 2 February 2020 (UTC)

Why does MediaWiki insist it sent mail when it didn’t?

If someone, for example, used the password reminder, then MediaWiki states mail was being sent even if it didn’t.

In my example, my server uses Google G Suite MX settings, so I guess MediaWiki's default usage of PHP’s mail() fails. But still it insists mail was sent… 176.230.80.21 (talk) 09:02, 1 February 2020 (UTC)

If MediaWiki passes the mail off to the system mailer, and the system mailer says it is sent succesfully, then MediaWiki takes that at face value. If the mail fails to be delivered at a later point in time, its too late for MediaWiki to know about it. Bawolff (talk) 03:21, 2 February 2020 (UTC)

login problem

mediawiki login not work multi word username. Adds "+" instead of spaces. if the username is one word, everything is normal. I'm sorry for my bad English. 88.241.82.250 (talk) 10:34, 1 February 2020 (UTC)

It was understood that the problem was caused by php. Php 7.4 reverted to 7.3 88.241.82.250 (talk) 16:54, 1 February 2020 (UTC)
You can also upgrade to PHP 7.4.3 as the problem has been fixed there. – Ammarpad (talk) 20:32, 1 February 2020 (UTC)

Create a exclusionary version of WantedPages

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


Hello,

I'm wanting to create a list of pages from Special:WantedPages, however, I don't want it to include pages in User namespace. Is this possible, ideally without the use of an extension?

Thanks

Product Version
MediaWiki 1.31.6
Release 20200131-101729
LuaSandbox 3.0.1
Lua 5.1.5
Jamesuww (talk) 18:15, 1 February 2020 (UTC)
Don't think it is possible in MediaWiki core (T6204). See this and Extension:WantedPagesFromNS. AhmadF.Cheema (talk) 21:53, 1 February 2020 (UTC)
Isn't this already the case? Special:Wantedpages does not include the User and User_talk namespaces, due to user signatures causing misleading numbers Bawolff (talk) 03:19, 2 February 2020 (UTC)
For the Wiki I use, WantedPages lists everything.. We have a 1.7k list and instead of consistently going through User spaces, I want to filter them somehow. Jamesuww (talk) 05:32, 2 February 2020 (UTC)
can you link to your wiki, if public Bawolff (talk) 21:57, 2 February 2020 (UTC)
See also https://phabricator.wikimedia.org/T177169 Ciencia Al Poder (talk) 11:02, 3 February 2020 (UTC)
I have MW 1.31.1 (not far off yours) and Special:Wantedpages does not list User namespace pages. Jonathan3 (talk) 11:24, 3 February 2020 (UTC)
I don't have any administrative rights; just trying to work this out if possible. Jamesuww (talk) 02:32, 4 February 2020 (UTC)
i dont see anything in user namespace on that list. Do you mean instead that you dont want it to take links on user pages into account? (As opposed to not listing wanted user pages) Bawolff (talk) 05:09, 4 February 2020 (UTC)
That's probably the intention, and what the example hook I linked before does. Ciencia Al Poder (talk) 10:19, 4 February 2020 (UTC)
Whoops, yeah.
Thanks! Jamesuww (talk) 23:11, 4 February 2020 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

$wgServer set LocalSettings.php but not recognized

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


Hello, Please help, I'm trying to set up new MW install on an Ubuntu VM, and after completing and configuring installation I try to enter Wiki for first time and receive a page with only the following:

$wgServer must be set in LocalSettings.php. See https://www.mediawiki.org/wiki/Manual:$wgServer.

My installation is only on my private network for setup an testing.

By default the LocalSettings.php $wgServer is automatically set to the following:

$wgServer = "http://192.168.1.76";

I have also assigned a local dns record for the server and adjusted the $wgServer to the fully qualified domain as follows:

$wgServer = "http://wiki.jpnet.lan";

After hours of researching trying all I could and searching online for similar errors, I finally scrapped the server , created a new VM and started over from scratch, after completing configuration again i receive the same result. I don't understand, the error tells me the value must be set when it is already set, I am at a loss how to get past this error. Any help would be appreciated. Thank you.


Installation details

New Install

Mediawiki 1.34.0

PHP 7.2.24

MariaDB 10.1.43

Ubuntu Server 18.04.1

VE Hypervisor ProxMox 6.1-3 Johnp256 (talk) 19:29, 1 February 2020 (UTC)

can you post your full localsettings.php (redacting any passwords or keys)? Bawolff (talk) 03:05, 2 February 2020 (UTC)
# This file was automatically generated by the MediaWiki 1.34.0
# installer. If you make manual changes, please keep track in case you
# need to recreate them later.
#
# See includes/DefaultSettings.php for all configurable settings
# and their default values, but don't forget to make changes in _this_
# file, not there.
#
# Further documentation for configuration settings may be found at:
# https://www.mediawiki.org/wiki/Manual:Configuration_settings
# Protect against web entry
if ( !defined( 'MEDIAWIKI' ) ) {
exit;
}
## Uncomment this to disable output compression
# $wgDisableOutputCompression = true;
$wgSitename = "JP Wiki";
$wgMetaNamespace = "JP_Wiki";
## The URL base path to the directory containing the wiki;
## defaults for all runtime URL paths are based off of this.
## For more information on customizing the URLs
## (like /w/index.php/Page_title to /wiki/Page_title) please see:
## https://www.mediawiki.org/wiki/Manual:Short_URL
$wgScriptPath = "";
## The protocol and server name to use in fully-qualified URLs
$wgServer = "http://wiki.jpnet.lan";
## The URL path to static resources (images, scripts, etc.)
$wgResourceBasePath = $wgScriptPath;
## The URL path to the logo.  Make sure you change this from the default,
## or else you'll overwrite your logo when you upgrade!
$wgLogo = "$wgResourceBasePath/resources/assets/wiki.png";
## UPO means: this is also a user preference option
$wgEnableEmail = false;
$wgEnableUserEmail = true; # UPO
$wgEmergencyContact = "apache@🌻.invalid";
$wgPasswordSender = "apache@🌻.invalid";
$wgEnotifUserTalk = false; # UPO
$wgEnotifWatchlist = false; # UPO
$wgEmailAuthentication = true;
## Database settings
$wgDBtype = "mysql";
$wgDBserver = "localhost";
$wgDBname = "mediawiki_db";
$wgDBuser = "mediawiki";
$wgDBpassword = "xxxxxxxxxxxxxx";
# MySQL specific settings
$wgDBprefix = "";
# MySQL table options to use during installation or update
$wgDBTableOptions = "ENGINE=InnoDB, DEFAULT CHARSET=binary";
## Shared memory settings
$wgMainCacheType = CACHE_ACCEL;
$wgMemCachedServers = [];
## To enable image uploads, make sure the 'images' directory
## is writable, then set this to true:
$wgEnableUploads = true;
$wgUseImageMagick = true;
$wgImageMagickConvertCommand = "/usr/bin/convert";
# InstantCommons allows wiki to use images from https://commons.wikimedia.org
$wgUseInstantCommons = false;
# Periodically send a pingback to https://www.mediawiki.org/ with basic data
# about this MediaWiki instance. The Wikimedia Foundation shares this data
# with MediaWiki developers to help guide future development efforts.
$wgPingback = true;
## If you use ImageMagick (or any other shell command) on a
## Linux server, this will need to be set to the name of an
## available UTF-8 locale
$wgShellLocale = "C.UTF-8";
## Set $wgCacheDirectory to a writable directory on the web server
## to make your wiki go slightly faster. The directory should not
## be publicly accessible from the web.
#$wgCacheDirectory = "$IP/cache";
# Site language code, should be one of the list in ./languages/data/Names.php
$wgLanguageCode = "en";
$wgSecretKey = "a42bf869b17c21f4db6a80fbfdef8a60ca5771340a9e00102f8d2e9723e5fd1e";
# Changing this will log out all existing sessions.
$wgAuthenticationTokenVersion = "1";
# Site upgrade key. Must be set to a string (default provided) to turn on the
# web installer while LocalSettings.php is in place
$wgUpgradeKey = "28bb8e45f03d8c93";
## For attaching licensing metadata to pages, and displaying an
## appropriate copyright notice / icon. GNU Free Documentation
## License and Creative Commons licenses are supported so far.
$wgRightsPage = ""; # Set to the title of a wiki page that describes your license/copyright
$wgRightsUrl = "";
$wgRightsText = "";
$wgRightsIcon = "";
# Path to the GNU diff3 utility. Used for conflict resolution.
$wgDiff3 = "/usr/bin/diff3";
# The following permissions were set based on your choice in the installer
$wgGroupPermissions['*']['createaccount'] = false;
$wgGroupPermissions['*']['edit'] = false;
$wgGroupPermissions['*']['read'] = false;
## Default skin: you can change the default skin. Use the internal symbolic
## names, ie 'vector', 'monobook':
$wgDefaultSkin = "vector";
# Enabled skins.
# The following skins were automatically enabled:
wfLoadSkin( 'MonoBook' );
wfLoadSkin( 'Timeless' );
wfLoadSkin( 'Vector' );
# Enabled extensions. Most of the extensions are enabled by adding
# wfLoadExtensions('ExtensionName');
# to LocalSettings.php. Check specific extension documentation for more details.
# The following extensions were automatically enabled:
wfLoadExtension( 'MultimediaViewer' );
wfLoadExtension( 'PdfHandler' );
wfLoadExtension( 'WikiEditor' );
# End of automatically generated settings.
# Add more configuration options below. Johnp256 (talk) 04:21, 2 February 2020 (UTC)
Thank you for looking, the file is as generated the only manual edit I made is the $wgServer value.
I also had to remove the <?php first line in order to post it here.
Thanks Johnp256 (talk) 04:25, 2 February 2020 (UTC)
That's very weird. Are you sure you don't have like 2 mediawiki installs and are looking at the wrong LocalSettings.php or something like that? The only way you should get that error message is if the $wgServer variable is set to false (Which is its default starting out value). Bawolff (talk) 02:37, 3 February 2020 (UTC)
I'm in. !!!!
Problem was somehow the settings file content was lost every time I was moving it in to place.
I copied and pasted the correct contents into the empty file already in place and now I'm in.
Thank you for looking.

Johnp256 (talk) 05:07, 3 February 2020 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

nerozumiem tejto reči ..potrebujem vyber jazyka slovenského....

Nerozumiem tejto reči ..potrebujem vyber jazyka slovenského ABY BOL V HLAVNOM MENU........ 62.197.243.15 (talk) 09:19, 2 February 2020 (UTC)

Error when trying to login into my wiki after i renamed myself

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


So when i wanted to change my name, i did change my name and it gave me an error, i ignored it until i wanted to login again, i tried but then it said that account doesnt exist, i tried to login to the name i was trying to be until this popped up:
Auto-creation of a local account failed: You have not specified a valid username. 
I tried stuff like regenerating LocalSettings.php and using the rebuildall.php script but nothing worked, any help? ErtasVideos (talk) 14:03, 2 February 2020 (UTC)
I still can't get it to work ErtasVideos (talk) 09:11, 3 February 2020 (UTC)
How did you change the name? And where? (If it's a public wiki) – Ammarpad (talk) 12:28, 3 February 2020 (UTC)
  1. I used special:renameuser to rename myself (It was the same account i used for install)
  2. It was on funshitposting.ga (My website) ErtasVideos (talk) 18:57, 3 February 2020 (UTC)
I still need my account back ErtasVideos (talk) 20:37, 5 February 2020 (UTC)
Well something bad clearly happened. At worst, maybe the database is somehow in an inconsistent state in regards to your username. I'm not really sure. Some things to look at:
  • What was the target username? Is it something that would be considered an invalid username by MediaWiki. Is it something that would be stopped by an extension like AbuseFilter or SpamBlacklist if you have those configured?
    • Is the name you renamed yourself to an IP address, contains any of the symbols: '<', '>', '@', ':' or weird unicode space characters?
  • Are there entries for your new username or you old username in the following database tables/fields: user.user_name, actor.actor_name, revision.rev_user_text ?
  • Were you using the right version of the RenameExtension for your version of MW. Bawolff (talk) 01:57, 6 February 2020 (UTC)
Also, if you enable the MediaWiki debug log ( manual:How to debug ) it might have useful info. Bawolff (talk) 01:59, 6 February 2020 (UTC)
Wait, i fixed it using an alternative account to rename myself to fix it. ErtasVideos (talk) 09:15, 7 February 2020 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

cant change password

it will not let me change my password it will not send an email to let me change my password 47.22.133.99 (talk) 01:49, 3 February 2020 (UTC)

Please give more information. For instance, the error message and the url of the wiki where is this is happening. – Ammarpad (talk) 15:14, 3 February 2020 (UTC)

edit crashes

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


I edit the Nets page in amateur-radio,

Can still login. Ive been trying to contact the admin etc. this week this type of warning appears when I attempt any edit.


Internal error

[bf3433e5] 2020-02-02 18:56:18: Fatal exception of type "MWException"


user vk3pgs Gerixau (talk) 02:35, 3 February 2020 (UTC)

Unfortunately, only an admin with access to the server can enable debugging to see the details of the error. You'll need to contact one of the maintainers of that wiki Ciencia Al Poder (talk) 11:00, 3 February 2020 (UTC)
Thank you for yr reply. For that wiki,
http://www.amateur-radio-wiki.net/index.php?title=Nets
I reckon I'll need Sherlock Holmes to find an admin contact! I will persist. Gerixau (talk) 19:24, 3 February 2020 (UTC)
Look at the bottom of this page: http://www.amateur-radio-wiki.net/index.php?title=Amateur-radio-wiki:Contributing#Admin_help Ciencia Al Poder (talk) 22:56, 3 February 2020 (UTC)
Thanks, I did that weeks before. He cannot help. Plus there's no reply to the admin email. Possibly this wiki has been abandoned. Gerixau (talk) 02:43, 4 February 2020 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

List all pages starting from a particular letter in a category

I can use [[Special:Allpages/:Z]] to list all pages starting from the letter "Z". How can I list all pages starting from the letter "Z" in a category. Thank you. 39.53.131.186 (talk) 13:15, 3 February 2020 (UTC)

add &pagefrom=z (sometimes ? Instead of &). Example: https://en.wikipedia.org/w/index.php?title=Category:Articles_with_%27species%27_microformats&pagefrom=Z#mw-pages Bawolff (talk) 05:05, 4 February 2020 (UTC)

Template-included categorization results in whitespace on top of pages.

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


I recently discovered the ability to include categorization from values within the used template. But somehow, all the pages using it are now displaying a whitespace on top of the actual content: Example

I now read on here that putting <includeonly></includeonly> around it would be usually the way to include categories into a template, so I just did. But I don't see a change. Is it due to the mentioned job queue still processing all the pages and mine hasn't been done yet or is it truly an issue? Rasputin 93 (talk) 15:04, 3 February 2020 (UTC)

The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

VisualEditor then edit page, many errors. Version mediawiki and Visual Editor version 1.34 - Parsoid version 0.10

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


Instal mediawiki 1.34 and add VisualEditor 1.34 with Parsoid 0.10

https://racinglife.org/index.php?title=Racing_Life&veaction=edit - Link how its look like.


Need help , how fix this. 78.58.184.16 (talk) 17:26, 3 February 2020 (UTC)

When a page is saved, a text error occurs. 78.58.184.16 (talk) 17:32, 3 February 2020 (UTC)
If there is some error somewhere, then please provide the exact error message and clear steps to reproduce a problem, plus what happens, plus what should happen instead. Malyacko (talk) 15:44, 4 February 2020 (UTC)
I create a blank page, and I start editing it.When a page is saved. the page does not appear as it should, the page displays the html code. Visualeditor loads well. 78.58.184.16 (talk) 20:46, 4 February 2020 (UTC)
This HTML code is provided by your hosting. Maybe you have parsoid misconfigured, pointing to a URL that returns a 404 error from your hosting, and that's the HTML page you see. Ciencia Al Poder (talk) 10:46, 5 February 2020 (UTC)
This is shown by the html code and my hosting banner. Where could a mistake be made? Parsoid config.yaml file ? Racinglife (talk) 11:49, 5 February 2020 (UTC)
The most probable configuration is an URL pointing to RESTBase or Parsoid, maybe in LocalSettings.php. Check your configuration about parsoid. Ciencia Al Poder (talk) 20:37, 5 February 2020 (UTC)
I tried everything. And I can't find what it is.
Server
OS CentOS 6.10
What would you recommend to see more precisely what settings.
Can you point you in the exact direction?
Very helpful Racinglife (talk) 22:57, 5 February 2020 (UTC)
When I'm lost, I try to use tcpdump -A filtering by a tcp port (80 for http, or the port used by parsoid) and inspect the traffic directly to see what's going on the network Ciencia Al Poder (talk) 10:45, 6 February 2020 (UTC)
thank you for help. I finally got it fixed. I found the problem. Parsoid not working on shared host, then i use heroku and then put parsoid into to heroku app. Finally works well. :) Thank for help. Racinglife (talk) 23:44, 6 February 2020 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Hidden Category Showing - NOT set to see it

Hi. I'm seeing this at the bottom of my pages. They're nested Categories: Domains/Suspension Status/Not Suspended. On the bottom of the Not Suspended page this is displayed:


Category: Hidden Categories

Hidden Category: Suspension Status


How do I get rid of the "Hidden Category: Suspension Status" line? I do NOT have see hidden categories enabled in my preferences. Even users who are logged out see this. Thanks in advance! 68.69.237.18 (talk) 19:40, 3 February 2020 (UTC)

Which skin ? —TheDJ (Not WMF) (talkcontribs) 22:48, 3 February 2020 (UTC)
is this on a normal page or on a category?
Hidden categories are always shown on categories. I suppose it would be possible to remove with css. Bawolff (talk) 05:03, 4 February 2020 (UTC)
Vector Skin.
It's on a subcategory.
It appears that if the subcategory is in a hidden category then it displays that Hidden Category: Category Name.
Interesting. 68.69.237.18 (talk) 14:12, 4 February 2020 (UTC)
Add the following to the page MediaWiki:Common.css
.mw-hidden-cats-ns-shown {display: none}
Which will cause hidden categories on categories to be hidden (unless user adjusts their user preferences) Bawolff (talk) 12:05, 5 February 2020 (UTC)

How to customize Special:UserLogin

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


Hi

On my wiki (1.28.0 because I'm currently unable to upgrade), I need some change to the login page.

This is because the password is not specific to the wiki, and instead obtained from another site.

So, the links "Help with logging in" and "Forgot your password" should point to different pages.

How can I make this ?

Thanks Tintinux (talk) 14:18, 4 February 2020 (UTC)

@Tintinux Apart from the huge problem that you run an ancient insecure unsupported version which welcomes bad people to break into your wiki, you could edit https://gestinux.net/mediawiki/index.php/MediaWiki:Helplogin-url for the first link. Not sure you can change the target of the second link easily. Malyacko (talk) 15:43, 4 February 2020 (UTC)
Thanks for the hint to change HelpLogin
However I'm still interested in modifying Special:PasswordReset or to remove the link to it on Special:UserLogin
For your remark about running an old version, yes I agree, but there was so many changes that I have not found how to make my wiki working with newer versions. I'm working on that... Tintinux (talk) 09:29, 5 February 2020 (UTC)
I think you could disable the link with $wgPasswordResetRoutes =["username" => false, "email" => false]; Bawolff (talk) 10:42, 5 February 2020 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Special:EmailUser - AD some parameters like subject or content

With Special:EmailUser/USERNAME you can add a link that invokes an email form for the User:USERNAME. Is it possible to add some more parameters to this like subject or content of the mail? With a common mailto: link this works and even for the api there is some doc about this. I tried with

https://.../index.php?title=Special:EmailUser&target=USERNAME&subject=TestTestTest&text=Content

but sadly only "target" works. The rest is ignored. Carchaias (talk) 15:55, 4 February 2020 (UTC)

I am trying to invoke a Wikipedia reference template from Appropedia, by declaring a reference of the type <ref name="ref">{{Wikipedia:cite web| title= ... }}</ref>. However, in contrast to an interwiki link such as [[Wikipedia:flower]], this does not work. At Wikiversity (instead of Appropedia), same problem. Is there a way to use a reference template from another wiki? Thank you in advance. Sylvain Ribault (talk) 21:01, 4 February 2020 (UTC)

there is a feature called Scary interwiki transcludes. It is a bit experimental. Manual:$wgEnableScaryTranscluding Bawolff (talk) 22:56, 4 February 2020 (UTC)

How to replace CustomTitle

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


Hi

On my 1.28 wiki, I'm using CustomTitle and it works fine.

In 1.33 this extension was archived and I see :

This parser function is now provided by MediaWiki core. Use {{DISPLAYTITLE}} and enable $wgAllowDisplayTitle to allow arbitrary titles.


The DISPLAYTITLE help page is redirected to MagicWords with very generic explanations and I'm not sure of what I have exactly to do.


Will I have to edit every pages on my wiki to use a new syntax to do the same thing ?

This is horrible, is there not another way ?


Thanks


Tintinux (talk) 09:49, 5 February 2020 (UTC)

it looks like CustomTitle may have had an XSS security vulnerability in it.
Basically you use them the same but with DISPLAYTITLE instead of #customtitle. You can use extension:ReplaceText to find and replace all usages. Bawolff (talk) 10:39, 5 February 2020 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

list of email adresses

Hello, is there any special page where I can get a list of the users e-mail-adresses? Or do I need an extension? I have all the rights I might need. Thanks for helping me with that ...

Mediawiki version 1.22.5 (I know ... )

Mike Coffeesatz (talk) 10:05, 5 February 2020 (UTC)

there is no builtin special page. I'm not aware of any extensions for that but its possible one exists.
You can use the following sql query: SELECT user_name, user_email FROM user; Bawolff (talk) 10:33, 5 February 2020 (UTC)

Cannot access MediaWiki installed on Synology from outside network

I have MediaWiki (v1.30.0-0131) installed on a Synology NAS drive. I can access MediaWiki with no trouble as long as I am logged in through our local network. However, if I try to log into MediaWiki from outside the network (like when I am working from home), I can access the Synology drive desktop with no trouble, but when I try and run MediaWiki, I get an "Unable to Connect" error almost immediately. I can run all other apps installed on the Synology with no trouble remotely, I'm only having issues with MediaWiki. I also have MariaDB (v10.3.21-0063) installed as my database and PHP 7.0 (v7.0.33-0028) installed as well. Any help would be greatly appreciated. Maseaver (talk) 13:05, 5 February 2020 (UTC)

If locally you connect via a local IP, and remotely you connect via a remote IP, you might be having issues with the $wgServer setting in LocalSettings.php
You could add the following line to the bottom of LocalSettings.php
$wgServer = WebRequest::detectServer();
This does make you more vulnerable to certain types of host-header cache poisoning attacks. They are probably fairly low-risk in the setup you describe, but it is something to be aware of. Bawolff (talk) 01:45, 6 February 2020 (UTC)
This may cause cache issues where a page is cached with links pointing to the local address, and then you get those invalid links when connecting from outside of the LAN. Ideally you should use a consistent public address Ciencia Al Poder (talk) 11:04, 6 February 2020 (UTC)

How to replace AuthPlugin

I read that AuthPlugin was replaced by AuthManager in version 1.27


The Manual:SessionManager_and_AuthManager documentation of AuthManager looks made for people having a good knowledge of MW internals. I don't understand anything and can't find where to start...


There is a link to an "update guide" but it lead to an error :

[XjrJFwpAICMAAEWtvGkAAAAY] 2020-02-05 13:54:31: Fatal exception of type "TypeError"


Where could I find more user oriented informations to use AuthManager, to be able to authenticate from a phpBB site, and migrate to the last stable version. Tintinux (talk) 14:02, 5 February 2020 (UTC)

Modifying the update guide link, I have found a page Manual:SessionManager and AuthManager/Updating tips
where I read that
AuthPlugin::authenticate() has to be replaced by PrimaryAuthenticationProvider::beginPrimaryAuthentication()
and
use a PasswordAuthenticationRequest to get the username and password
But what does it mean "use" ? Is PasswordAuthenticationRequest an object ? To create or to get from somewhere ? How ?

Tintinux (talk) 17:08, 5 February 2020 (UTC)
set $wgShowExceptionDetails = true; to get verbose error messages.
I would suggest maybe looking at an extension that does something similar to what you want to do. e.g. https://github.com/wikimedia/mediawiki-extensions-MediaWikiAuth/blob/master/ExternalWikiPrimaryAuthenticationProvider.php Bawolff (talk) 01:41, 6 February 2020 (UTC)
1) why do you write : set $wgShowExceptionDetails = true; to get verbose error messages ?
The error was on mediawiki.org.
However, today it was fixed.
2) I have spent a lot a time to download and install extensions but didn't found any that could help me. The one you advice might be better. Thanks for the hint !

Tintinux (talk) 17:04, 6 February 2020 (UTC)
sorry, i misunderstood - i thought that was an error on your site, not here. Bawolff (talk) 21:48, 6 February 2020 (UTC)
Hi
I had to give up, it requires a too deep knowledge of MW, php and maybe symfony to extend AuthManager to login on a phpBB site.
It was not too difficult for me with AuthLogin and MW 1.28, but it looks like that in MW >1.28 there are conflicts with symfony and it is beyond my skills and my available time to identify and solve them.
There was Extension:PHPBB_Auth to do that with AuthLogin, deprecated since AuthLogin was. I didn't used it because I had simpler needs and it was probably before it was created. If any one is able to upgrade it, please notify !
Please, developers, when introducing new techniques, think about compatibility !!!

Tintinux (talk) 17:21, 12 February 2020 (UTC)
Has any progress been made, we are in the same situation. After upgrading to phpBB 3.3 we can no longer authenticate. Unibond (talk) 16:43, 6 March 2020 (UTC)

They all say internal errors. I've never been here before so I can't reach the FAQ or anything if this is typical or already explained. Half worried if this topic will even post. Deoxp (talk) 16:03, 5 February 2020 (UTC)

to clarify, are you talking about this website or your own website? Bawolff (talk) 23:07, 5 February 2020 (UTC)

Database errors after Wikimedia command line update

Dear all,

I just made a Wikimedia minor update (1.31.1 to 1.31.6) through the command line of a shared hosting cPanel's Terminal, it didn't give any errors.

I replaced old folders and files by the new ones, keeping the images folder and copied some old developers' stuff from the Localsettings.php file to the new one, I updated the extensions too.

I didn't keep the hidden folders: .git, .well-known


Now some site pages work fine including the home page and some like this page

Version pge:

http://wikiageing.org/index.php/%D8%AE%D8%A7%D8%B5:%D9%86%D8%B3%D8%AE%D8%A9

But some pages give database errors:

Special pages page:

http://wikiageing.org/index.php/%D8%AE%D8%A7%D8%B5:%D8%B5%D9%81%D8%AD%D8%A7%D8%AA_%D8%AE%D8%A7%D8%B5%D8%A9

User login page: also when tried to log into the admin account with admin credentials, it gave me this long error message:

http://wikiageing.org/index.php/%D8%AE%D8%A7%D8%B5:%D8%AF%D8%AE%D9%88%D9%84_%D8%A7%D9%84%D9%85%D8%B3%D8%AA%D8%AE%D8%AF%D9%85

Error screenshot:

https://drive.google.com/file/d/1ZI0kFwy7DRDSACFO4CnCizNGh_Lwvk5b/view?usp=sharing

Error Text:

___________________________________________

[004782ca02b5d75db16cef29] /index.php/%D8%AE%D8%A7%D8%B5:%D8%AF%D8%AE%D9%88%D9%84_%D8%A7%D9%84%D9%85%D8%B3%D8%AA%D8%AE%D8%AF%D9%85 Wikimedia\Rdbms\DBQueryError from line 1457 of /home/wikiageing1908/public_html/includes/libs/rdbms/database/Database.php: A database query error has occurred. Did you forget to run your application's database schema updater after upgrading?

Query: SELECT * FROM `ageingoathauth_users` WHERE id = '2' LIMIT 1

Function: OATHUserRepository::findByUser

Error: 1146 Table 'wikiagei_mediawiki.ageingoathauth_users' doesn't exist (localhost)

Backtrace:

#0 /home/wikiageing1908/public_html/includes/libs/rdbms/database/Database.php(1427): Wikimedia\Rdbms\Database->makeQueryException(string, integer, string, string)

#1 /home/wikiageing1908/public_html/includes/libs/rdbms/database/Database.php(1200): Wikimedia\Rdbms\Database->reportQueryError(string, integer, string, string, boolean)

#2 /home/wikiageing1908/public_html/includes/libs/rdbms/database/Database.php(1653): Wikimedia\Rdbms\Database->query(string, string)

#3 /home/wikiageing1908/public_html/includes/libs/rdbms/database/Database.php(1730): Wikimedia\Rdbms\Database->select(string, string, array, string, array, array)

#4 [internal function]: Wikimedia\Rdbms\Database->selectRow(string, string, array, string)

#5 /home/wikiageing1908/public_html/includes/libs/rdbms/database/DBConnRef.php(49): call_user_func_array(array, array)

#6 /home/wikiageing1908/public_html/includes/libs/rdbms/database/DBConnRef.php(268): Wikimedia\Rdbms\DBConnRef->__call(string, array)

#7 /home/wikiageing1908/public_html/extensions/OATHAuth/includes/OATHUserRepository.php(53): Wikimedia\Rdbms\DBConnRef->selectRow(string, string, array, string)

#8 /home/wikiageing1908/public_html/extensions/OATHAuth/includes/auth/TOTPSecondaryAuthenticationProvider.php(60): OATHUserRepository->findByUser(User)

#9 /home/wikiageing1908/public_html/includes/auth/AuthManager.php(643): TOTPSecondaryAuthenticationProvider->beginSecondaryAuthentication(User, array)

#10 /home/wikiageing1908/public_html/includes/auth/AuthManager.php(383): MediaWiki\Auth\AuthManager->continueAuthentication(array)

#11 /home/wikiageing1908/public_html/includes/specialpage/AuthManagerSpecialPage.php(353): MediaWiki\Auth\AuthManager->beginAuthentication(array, string)

#12 /home/wikiageing1908/public_html/includes/specialpage/AuthManagerSpecialPage.php(482): AuthManagerSpecialPage->performAuthenticationStep(string, array)

#13 /home/wikiageing1908/public_html/includes/htmlform/HTMLForm.php(660): AuthManagerSpecialPage->handleFormSubmit(array, VFormHTMLForm)

#14 /home/wikiageing1908/public_html/includes/specialpage/AuthManagerSpecialPage.php(416): HTMLForm->trySubmit()

#15 /home/wikiageing1908/public_html/includes/specialpage/LoginSignupSpecialPage.php(316): AuthManagerSpecialPage->trySubmit()

#16 /home/wikiageing1908/public_html/includes/specialpage/SpecialPage.php(565): LoginSignupSpecialPage->execute(NULL)

#17 /home/wikiageing1908/public_html/includes/specialpage/SpecialPageFactory.php(568): SpecialPage->run(NULL)

#18 /home/wikiageing1908/public_html/includes/MediaWiki.php(288): SpecialPageFactory::executePath(Title, RequestContext)

#19 /home/wikiageing1908/public_html/includes/MediaWiki.php(861): MediaWiki->performRequest()

#20 /home/wikiageing1908/public_html/includes/MediaWiki.php(524): MediaWiki->main()

#21 /home/wikiageing1908/public_html/index.php(42): MediaWiki->run()

#22 {main}

___________________________________________ Please help.. Thanks in Advance! Wikiwebdev (talk) 20:02, 5 February 2020 (UTC)

Did you run update.php or otherwise update the database tables?
It looks like specificly the tables for 2fa are missing. Its possible to make the 2fa extension use a central db-if you did that it may have to be updated separately Bawolff (talk) 22:47, 5 February 2020 (UTC)
@Bawolff Thanks for the insight.
I did run the update.php from the terminal.
So, what should I do now to fix this? Wikiwebdev (talk) 22:53, 5 February 2020 (UTC)
Also as an aside, it probably doesn't matter, but .well-known is not part of MediaWiki. Directories with that name are often used for authorizing things with web servers (See https://en.wikipedia.org/wiki/List_of_/.well-known/_services_offered_by_webservers ). You might not want to remove it unless you're sure you know what it is.
  • Did the output of update.php say anything about "oathauth_users"? [If you didn't keep the output, you can safely just re-run the script to check]
  • Have you set $wgOATHAuthDatabase in your LocalSettings.php (You probably would not want to set this unless you had special circumstances, I just need to know if you have set it because that would change things) Bawolff (talk) 01:36, 6 February 2020 (UTC)
Thank you so much @Bawolff for your kind follow up.
There is no $wgOATHAuthDatabase set in the LocalSettings.php file.
for the update.php outcome, I will post it here: Wikiwebdev (talk) 14:14, 6 February 2020 (UTC)
[wikiageing1908@lv-shared02 ~]$ cd public_html
[wikiageing1908@lv-shared02 public_html]$ cd maintenance
[wikiageing1908@lv-shared02 maintenance]$ php update.php
MediaWiki 1.31.1 Updater
Your composer.lock file is up to date with current dependencies!
Going to run database updates for wikiagei_mediawiki-ageing
Depending on the size of your database this may take a while!
Abort with control-c in the next five seconds (skip this countdown with --quick) ... 0
Turning off Content Handler DB fields for this part of upgrade.
...have ipb_id field in ipblocks table.
...have ipb_expiry field in ipblocks table.
...already have interwiki table
...indexes seem up to 20031107 standards.
...have rc_type field in recentchanges table.
...index new_name_timestamp already set on recentchanges table.
...have user_real_name field in user table.
...querycache table already exists.
...objectcache table already exists.
...categorylinks table already exists.
...have pagelinks; skipping old links table updates
...il_from OK
...have rc_ip field in recentchanges table.
...index PRIMARY already set on image table.
...have rc_id field in recentchanges table.
...have rc_patrolled field in recentchanges table.
...logging table already exists.
...have user_token field in user table.
...have wl_notificationtimestamp field in watchlist table.
...watchlist talk page rows already present.
...user table does not contain user_emailauthenticationtimestamp field.
...page table already exists.
...have log_params field in logging table.
...logging table has correct log_title encoding.
...have ar_rev_id field in archive table.
...have page_len field in page table.
...revision table does not contain inverse_timestamp field.
...have rev_text_id field in revision table.
...have rev_deleted field in revision table.
...have img_width field in image table.
...have img_metadata field in image table.
...have user_email_token field in user table.
...have ar_text_id field in archive table.
...page_namespace is already a full int (int(11)).
...ar_namespace is already a full int (int(11)).
...rc_namespace is already a full int (int(11)).
...wl_namespace is already a full int (int(11)).
...qc_namespace is already a full int (int(11)).
...log_namespace is already a full int (int(11)).
...have img_media_type field in image table.
...already have pagelinks table.
...image table does not contain img_type field.
...already have unique user_name index.
...user_groups table exists and is in current format.
...have ss_total_pages field in site_stats table.
...user_newtalk table already exists.
...transcache table already exists.
...have iw_trans field in interwiki table.
...wl_notificationtimestamp is already nullable.
...index times already set on logging table.
...have ipb_range_start field in ipblocks table.
Set $wgShowDBErrorBacktrace = true; at the bottom of LocalSettings.php to show detailed debugging information.
[wikiageing1908@lv-shared02 maintenance]$ Wikiwebdev (talk) 14:15, 6 February 2020 (UTC)
@Bawolff, would you please guide me, if you recommend going back to last backup, and make a different rout for updating: The sequential patch updates, or the web update, instead of the command line one?
Do you think it might be different, and go smooth? instead of fixing the current after-update issues? Wikiwebdev (talk) 14:41, 6 February 2020 (UTC)
can you set $wgShowExceptionDetails=true; $wgShowDBErrorBacktrace=true;
At the bottom of LocalSettings.php and rerun update.php to see if output changes Bawolff (talk) 21:45, 6 February 2020 (UTC)

Mail problem

Hi,


I have a mediawiki installation that has stopped sending mails.


It is running on windows, and if i use powershell like this:


Send-MailMessage –From aaa@bbb.com –To ccc@ddd.com –Subject “Test Email” –Body “Test E-mail (body)” -SmtpServer smtp.sendgrid.net -Credential $cred -Port 587

It pops up a dialog where I enter my credentials and it sends the mail which I receive.


In mediawiki log I get this:


UserMailer::send: sending mail to ccc@ddd.com

Sending mail via PEAR::Mail

MediaWiki::preOutputCommit: primary transaction round committed

MediaWiki::preOutputCommit: pre-send deferred updates completed


PHP is 7.0.18

I think the mediawiki version is 1.28.1 that is what it says in the release notes anyway.


The configuration file looks like this:


$wgEnableEmail = true;

$wgEnableUserEmail = true; # UPO

$wgEnotifUserTalk = true; # UPO

$wgEnotifWatchlist = true; # UPO

$wgEmailAuthentication = true;


and:


$wgEmergencyContact = "aaa@bbb.com";

$wgPasswordSender = "ccc@ddd.com";

$wgSMTP = array(

'host'     => "eee.fff.ggg", // Could also be an IP address. Where the SMTP server is located

'IDHost'   => "xxxwiki.cloudapp.net/wiki",      // Generally this will be the domain name of your website (aka mywiki.org)

'port'     => 587,                 // Port to use when connecting to the SMTP server

'auth'     => true,               // Should we use SMTP authentication (true or false)

'username' => "zzz@azure.com",     // Username to use for SMTP authentication (if being used)

'password' => "pppppppppppppppp"       // Password to use for SMTP authentication (if being used)


Any clue as what to do?


KR

Henrik 152.73.244.16 (talk) 17:01, 6 February 2020 (UTC)

"host" should be smtp.sendgrid.net
Try to change IDHost to use only alphanumeric characters. I don't think slashes are allowed there. Ciencia Al Poder (talk) 10:27, 7 February 2020 (UTC)

How to cover all pages and lock them to anonymous visitors

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


Hi there,

Id like to ask for your help and advice. When someone come to my mediawiki and is some random anonymous vistor, I want him to see this: http://rnc.cz/ . I mean he could not see any other pages or even just list of them without signing in. The sign-in is required. Can you tell me how can I do that?

I admint Im total wikinoob so if there is some easy way Ill be happy. Thanks.

Tereza 37.188.131.22 (talk) 17:55, 6 February 2020 (UTC)

Maybe hide the entire wiki and use a separate home page. Jonathan3 (talk) 22:49, 6 February 2020 (UTC)
See Private wiki Ciencia Al Poder (talk) 10:17, 7 February 2020 (UTC)
Thanks, I did and it works :) . 80.83.66.2 (talk) 15:51, 7 February 2020 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Can't save changes.

Hi.


I have a huge problem. I recently made a fresh install of Mediawiki version 1.34 to upgrade my mediawiki from an old server, my previous was 1.23.


Everything goes without a problem, but when I try to save the changes of a page, I just receive a message in the browser that the connection was reset. And nothing happens. Also any change is save.


I look every log I can, and I don't find any error that could give some indication of what could be the problem.


Please help, I really need to put in production this wiki. 200.38.124.40 (talk) 18:36, 6 February 2020 (UTC)

A "connection reset" error means the server ended the connection abruptly before its completion. This is caused by a serious bug in the server or PHP engine, that caused it to crash during the response. This error is usually found in the system logs, or web server logs, or PHP error logs, as a "segmentation fault".
From my experience, this error usually comes from the PHP engine, when you have some op-code caching enabled that's buggy or incompatible with your version of PHP. See what php modules you have enabled and disable any module that looks like a cache (restart the webserver or php-fpm after that). If this doesn't solve the issue, look at other php modules. Or maybe try to upgrade PHP Ciencia Al Poder (talk) 10:25, 7 February 2020 (UTC)
Thank you.
I look at the debug and find this
MediaWiki\Block\DatabaseBlock::newLoad [0.001s] localhost: SELECT  ipb_id,ipb_address,ipb_timestamp,ipb_auto,ipb_anon_only,ipb_create_account,ipb_enable_autoblock,ipb_expiry,ipb_deleted,ipb_block_email,ipb_allow_usertalk,ipb_parent_block_id,ipb_sitewide,comment_ipb_reason.comment_text AS `ipb_reason_text`,comment_ipb_reason.comment_data AS `ipb_reason_data`,comment_ipb_reason.comment_id AS `ipb_reason_cid`,actor_ipb_by.actor_user AS `ipb_by`,actor_ipb_by.actor_name AS `ipb_by_text`,ipb_by_actor  FROM `ipblocks` JOIN `comment` `comment_ipb_reason` ON ((comment_ipb_reason.comment_id = ipb_reason_id)) JOIN `actor` `actor_ipb_by` ON ((actor_ipb_by.actor_id = ipb_by_actor))   WHERE ipb_address =
[DBQuery] MediaWiki\Block\BlockManager->trackBlockWithCookie [0s] localhost: COMMIT
I try from another pc on the same network segment and there wasn't any problem.
I wonder if I need to ask the firewall guys to give me permissions for the port of MariaDB between my PC and the MediaWiki server? 200.38.124.40 (talk) 18:40, 7 February 2020 (UTC)
the debug log is normal.
Its unlikely a firewall blocking mediawiki from talking to mariadb would cause this issue. (there is a possibility that a firewall between mediawiki and your computer could cause problems, but that would be unusual)
Check your apache error logs (or whatever webserver you are using) Bawolff (talk) 10:29, 8 February 2020 (UTC)

Two eEditions combined in error

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


We had a problem with FileZilla, which we use to upload our eEdition. Our IT guy got that straight by deleting one version and downloading the new one. Afterward, in an effort to catch up, I uploaded last week's eEdition, then waited a couple of hours and uploaded this week's. Now BOTH exist under the same icon. How do I separate the two?


WSJ Tommy (talk) 21:50, 6 February 2020 (UTC)

This doesn't seem related to MediaWiki. Please post your issue on a relevant forum Ciencia Al Poder (talk) 10:16, 7 February 2020 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Error when saving preferences

There is an internal error when saving preferences.
MediaWiki version: 1.34.0
PHP version: 7.3.14
SQLite version: 3.16.2

Error text:

[bc94ae2ae89bfd7b86a30498] /wiki/Special:Preferences TypeError from line 80 of /var/www/html/mediawiki/extensions/Popups/includes/UserPreferencesChangeHandler.php: Argument 2 passed to Popups\UserPreferencesChangeHandler::onPreferencesFormPreSave() must be an instance of PreferencesForm, instance of PreferencesFormOOUI given, called in /var/www/html/mediawiki/includes/Hooks.php on line 174
Backtrace:
#0 /var/www/html/mediawiki/includes/Hooks.php(174): Popups\UserPreferencesChangeHandler::onPreferencesFormPreSave(array, PreferencesFormOOUI, User, boolean, array)
#1 /var/www/html/mediawiki/includes/Hooks.php(202): Hooks::callHook(string, array, array, NULL)
#2 /var/www/html/mediawiki/includes/preferences/DefaultPreferencesFactory.php(1663): Hooks::run(string, array)
#3 /var/www/html/mediawiki/includes/preferences/DefaultPreferencesFactory.php(1714): MediaWiki\Preferences\DefaultPreferencesFactory->saveFormData(array, PreferencesFormOOUI, array)
#4 /var/www/html/mediawiki/includes/preferences/DefaultPreferencesFactory.php(1546): MediaWiki\Preferences\DefaultPreferencesFactory->submitForm(array, PreferencesFormOOUI, array)
#5 /var/www/html/mediawiki/includes/htmlform/HTMLForm.php(690): MediaWiki\Preferences\DefaultPreferencesFactory->MediaWiki\Preferences\{closure}(array, PreferencesFormOOUI)
#6 /var/www/html/mediawiki/includes/htmlform/HTMLForm.php(582): HTMLForm->trySubmit()
#7 /var/www/html/mediawiki/includes/htmlform/HTMLForm.php(597): HTMLForm->tryAuthorizedSubmit()
#8 /var/www/html/mediawiki/includes/specials/SpecialPreferences.php(102): HTMLForm->show()
#9 /var/www/html/mediawiki/includes/specialpage/SpecialPage.php(575): SpecialPreferences->execute(NULL)
#10 /var/www/html/mediawiki/includes/specialpage/SpecialPageFactory.php(611): SpecialPage->run(NULL)
#11 /var/www/html/mediawiki/includes/MediaWiki.php(296): MediaWiki\Special\SpecialPageFactory->executePath(Title, RequestContext)
#12 /var/www/html/mediawiki/includes/MediaWiki.php(900): MediaWiki->performRequest()
#13 /var/www/html/mediawiki/includes/MediaWiki.php(527): MediaWiki->main()
#14 /var/www/html/mediawiki/index.php(44): MediaWiki->run()
#15 {main}

Testuser3847 (talk) 23:10, 6 February 2020 (UTC)

Is this a new install or an upgrade from previous version? Ciencia Al Poder (talk) 10:30, 7 February 2020 (UTC)
It was an update from 1.31.0 Testuser3847 (talk) 13:08, 7 February 2020 (UTC)
My guess is that you didn't follow the Manual:Upgrading guide, specifically the part that talks about extracting the installation files in a new empty directory instead of overwriting the old files. Be sure you follow that, since it's very important. Ciencia Al Poder (talk) 12:10, 9 February 2020 (UTC)

Errors after install

Hello, when I try open index.php in browser and get these errors.


Warning: putenv() has been disabled for security reasons in /data/web/virtuals/166748/virtual/www/domains/naffarin.eu/wiki/includes/Setup.php on line 148

Warning: putenv() has been disabled for security reasons in /data/web/virtuals/166748/virtual/www/domains/naffarin.eu/wiki/includes/Setup.php on line 148

Warning: session_name(): Cannot change session name when headers already sent in /data/web/virtuals/166748/virtual/www/domains/naffarin.eu/wiki/includes/Setup.php on line 814

Warning: Cannot modify header information - headers already sent by (output started at /data/web/virtuals/166748/virtual/www/domains/naffarin.eu/wiki/LocalSettings.php:1) in /data/web/virtuals/166748/virtual/www/domains/naffarin.eu/wiki/includes/libs/HttpStatus.php on line 112

Warning: Cannot modify header information - headers already sent by (output started at /data/web/virtuals/166748/virtual/www/domains/naffarin.eu/wiki/LocalSettings.php:1) in /data/web/virtuals/166748/virtual/www/domains/naffarin.eu/wiki/includes/WebResponse.php on line 72

Warning: Cannot modify header information - headers already sent by (output started at /data/web/virtuals/166748/virtual/www/domains/naffarin.eu/wiki/LocalSettings.php:1) in /data/web/virtuals/166748/virtual/www/domains/naffarin.eu/wiki/includes/WebResponse.php on line 72

Warning: Cannot modify header information - headers already sent by (output started at /data/web/virtuals/166748/virtual/www/domains/naffarin.eu/wiki/LocalSettings.php:1) in /data/web/virtuals/166748/virtual/www/domains/naffarin.eu/wiki/includes/WebResponse.php on line 72

Warning: Cannot modify header information - headers already sent by (output started at /data/web/virtuals/166748/virtual/www/domains/naffarin.eu/wiki/LocalSettings.php:1) in /data/web/virtuals/166748/virtual/www/domains/naffarin.eu/wiki/includes/WebResponse.php on line 72

Warning: Cannot modify header information - headers already sent by (output started at /data/web/virtuals/166748/virtual/www/domains/naffarin.eu/wiki/LocalSettings.php:1) in /data/web/virtuals/166748/virtual/www/domains/naffarin.eu/wiki/includes/WebResponse.php on line 72

Warning: Cannot modify header information - headers already sent by (output started at /data/web/virtuals/166748/virtual/www/domains/naffarin.eu/wiki/LocalSettings.php:1) in /data/web/virtuals/166748/virtual/www/domains/naffarin.eu/wiki/includes/WebResponse.php on line 72 Sharik95 (talk) 10:06, 7 February 2020 (UTC)

Your host has disabled the "putenv" PHP function.
Ask them to enable it, or better think of moving your wiki to a less crappy host. Ciencia Al Poder (talk) 10:29, 7 February 2020 (UTC)
putevnv() isn't critical, and the rest of the errors are related to error handling. So if you disable php error reporting (put ini_set( 'display_errors', 0 ); in LocalSettings.php), your wiki will probably still just work. However, I agree with Ciencia, it would be better to get a better host. Bawolff (talk) 23:00, 9 February 2020 (UTC)

wgGroupPermissions are not working

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


  • MediaWiki 1.31.5 (On Windows Server 2019)
  • Bluespice 3.1.1
  • PHP 7.4.0

HeyHelloThere

Similar problem like [[Project:Support desk/Flow/2019/11#h-$wgGroupPermissions['*']['edit']_=_false;_is_not_working.-2019-11-08T19:52:00.000Z|this]] one.

I installed the MassEditRegex extension and added the following line to the end of the localsettings.php file.

$wgGroupPermissions['sysop']['masseditregex'] = true;

But when I try to access the Spezial:Regex-Massenbearbeitung (special:MassEditRegex) site I get a permission error. The added permission also doesnt show up on the Spezial:Gruppenrechte (special:usergrouprights) site.


I tried some other $wgGroupPermissions settings, but they also dont make any difference at all (no change on the usergrouprights site). RN my last two lines of the LocalSettings.php files are

$wgGroupPermissions['*']['edit'] = true;

$wgGroupPermissions['*']['read'] = true;


Any help would be greatly appreciated KAWAII BAAAKA (talk) 11:09, 7 February 2020 (UTC)

Well
$wgGroupPermissions['*']['edit'] = true;
$wgGroupPermissions['*']['read'] = true;
are also both defaults, so setting those in LocalSettings.php probably won't change much.
I don't know why what you're describing wouldn't work, although bluespice does have some of its own permission management code, maybe it has something to do with that?
As always, be sure that you are editing the right LocalSettings.php and that your lines aren't commented out Bawolff (talk) 22:58, 9 February 2020 (UTC)
"...although bluespice does have some of its own permission management code, maybe it has something to do with that?"
I looked into it and you are right! It seems to be that the BSPermissionManager is overwriting the permissions set in the localsettings.php.
How to set permissions for extensions. :
$bsgPermissionConfig["extensionPermission"] = [
"type" => "global",
"roles" => ["admin", "reader" ]
];?
Thanks a lot for your help! :) KAWAII BAAAKA (talk) 09:46, 11 February 2020 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Different page URL and page title?

Hi, in my own Mediawiki I want to create pages with a URL different to its title. For instance, the URL shall be:

http://example.com/wiki/foo

but the displayed title in the article shall be "Bar Something else".

How can I do this?

I see there is Extension:TitleAlias but it's now downloadable anymore. Jorges (talk) 16:24, 7 February 2020 (UTC)

You may want use {{DISPLAYTITLE}} magicword. By default, it allows a very minor modification, to use a modification like the one in your example, you've to set $wgRestrictDisplayTitle to false in your LocalSettings.php. – Ammarpad (talk) 20:13, 7 February 2020 (UTC)
Great, thanks, exactly what I needed! 2A01:C22:341F:7500:A874:3327:2034:3B5C (talk) 14:23, 8 February 2020 (UTC)

Uploading pdfs

How can I upload pdf files? 2601:402:4500:232:2838:65B0:616A:E9BA (talk) 00:49, 8 February 2020 (UTC)

Use c:Special:UploadWizard for upload files, but remember that files should be under free license. Regards, ZI Jony (Talk) 02:48, 8 February 2020 (UTC)
@ZI Jony No, only ever do that if you want to upload files to a website called Wikimedia Commons. Malyacko (talk) 12:18, 8 February 2020 (UTC)
if you mean on your own wiki see Manual:Configuring_file_uploads#Configuring_file_types Bawolff (talk) 10:25, 8 February 2020 (UTC)

a question

where can i find a list of vpn ip addresses and block them on my wiki? 46.166.142.220 (talk) 09:09, 8 February 2020 (UTC)

I'm not sure if there is anywhere on the internet providing that, but https://meta.wikimedia.org/wiki/Special:GlobalBlockList is probably a good starting place.
You might also want to read about manual:$wgEnableDnsBlacklist Bawolff (talk) 22:54, 9 February 2020 (UTC)

Contact management

Hi there,

sorry if this question has been asked, I wasn't able to find anything on the topic.


I'm using Wikimedia on a personal server as a database for me and some cooperators.

Besides from knowledge we gained, we also manage our contacts through the software.


Could you suggest good ways to do so? I was thinking of creating wiki-pages for each contact and assigning them a category, but that will make the extraction process tedious.


Thank you in advance! Rebrei (talk) 12:24, 8 February 2020 (UTC)

Extension:Page Forms (for the data entry forms) and Extension:Cargo (for making the database and querying data) would be ideal for this. Jonathan3 (talk) 20:21, 9 February 2020 (UTC)
Wonderful, I will read up on this - thank you! Rebrei (talk) 11:42, 10 February 2020 (UTC)

Is there any option to export articles with full edit history and then import that file into Wikipedia.org

I want to export articles with full edit history from my sandbox to global Wikipedia is there any way can I do it ? 2409:4070:2193:3687:0:0:7C8:80A1 (talk) 12:31, 8 February 2020 (UTC)

Would be better to ask at en:Wikipedia:Teahouse. AhmadF.Cheema (talk) 21:49, 9 February 2020 (UTC)
w:Wikipedia:User_access_levels#Importers_and_transwiki_importers might have helpful info. I think its technically possible but discouraged. Bawolff (talk) 22:52, 9 February 2020 (UTC)

Mobile & Desktop skin under same URL?

Hi, I want to have the Mobile & Desktop skin under same URL. Extension:MobileDetect seems to provide exactly this. So I installed it, and as mobile skin I wanted to use Skin:Minerva Neue. However, when I install it, an error gets thrown:

ExtensionDependencyError: MinervaNeue requires MobileFrontend to be installed

The problem with Extension:MobileFrontend is though:

Creates a separate mobile site for your mobile traffic.

So is there a way to run both Skin:Vector and Skin:Minerva Neue under the same URL?

Jorges (talk) 15:12, 8 February 2020 (UTC)

mobilefrontend has an option to do both mobile and desktop on same domain Bawolff (talk) 04:44, 9 February 2020 (UTC)
Thanks! Jorges (talk) 15:47, 10 February 2020 (UTC)

Upgrade to Mediawiki 1.34.0 makes files uploaded inaccessible

http://ltwiki.org

Product Version MediaWiki 1.34.0 PHP 7.2.27 (cgi-fcgi) MySQL 5.5.62-log ICU 52.1

http://ltwiki.org/index.php?title=File:Pweoverdrivepreamp2.asc for one example

It is uploaded at ltwiki.org at http://ltwiki.org/images/6/6a/Pweoverdrivepreamp2.asc

I made duplicate copies one in the folder /images directly below my folder for ltwiki.org, and another copy under /Ltwiki2/mediawiki-1.34.0/images/6/6a

Neither works. I tried deleting the file completely in Mediawiki, then uploading it again. It warned me that an exact copy had been deleted, but I said upload anyway. Even with the new upload, it will not appear within the wiki.

http://ltwiki.org/index.php?title=File:IEEE_754_Double_Floating_Point_Format.png I get a 404 message, for example.

In conclusion, the proper linkage seems broken. How do I get this to relink properly? Lewispaul53 (talk) 16:03, 9 February 2020 (UTC)

http://ltwiki.org/images/6/6a/Pweoverdrivepreamp2.asc seems to work fine.
Image serving isn't handled by MediaWiki, so this is more an issue with your webserver and where on the filesystem your images reside. The only thing that mediawiki has to do with images is $wgUploadPath controls where MW tells the web browser to look for images, and $wgUploadDirectory tells mediawiki what directory on the file system to put/fetch images from.
So basically, the exact same images directory as the old version should be located where ever $wgUploadDirectory points to. And $wgUploadPath should point to wherever that directory is served by your webserver. Bawolff (talk) 22:47, 9 February 2020 (UTC)

Disable "real name"

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


Hi, how can I disable the "real name" option when creating accounts on a wiki?

Thanks. Renamed user f26394dcb19bd7bdad78f0d752896653 (talk) 23:27, 9 February 2020 (UTC)

@Esteban16 Please provide steps where to see a "real name" option. Malyacko (talk) 23:54, 9 February 2020 (UTC)
On Special:CreateAccount, there's a field called "Real name (optional)". BTW, it is not on Wikimedia wikis. The wiki version is 1.27.7 Renamed user f26394dcb19bd7bdad78f0d752896653 (talk) 00:10, 10 February 2020 (UTC)
Set
$wgHiddenPrefs[] = 'realname';
In LocalSettings.php Bawolff (talk) 11:24, 10 February 2020 (UTC)
Thank you Renamed user f26394dcb19bd7bdad78f0d752896653 (talk) 11:39, 10 February 2020 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Error Using Wikipedia Infoboxes

Hi there.

I'm trying to import the wikipedia infoboxes to my wiki site. I've imported all the infoboxes, and all the links under 'templaes used in this preview' are blue. However, the 'catagories' box has lots of red (dead) links, so I've clearly not got everything I need imported/installed.


I've been following the tutorial Manual:Importing Wikipedia infoboxes tutorial, but cannot import the modules from step 3, as I get the error, Import failed: 'The content model 'Scribunto' is not registered on this wiki'. Clearly I need to install Scribunto, but I'm running v1.34 and I read that it should already be installed? Running website via infinity free, don't really know what's going on behind the scenes, have just been following what I've read online.


Any help on this matter would be greatly appreciated.


Thanks in advance. HDaggerz21 (talk) 00:13, 10 February 2020 (UTC)

Check the page Special:Version on your wiki and see if it displays Scribunto as being installed. Otherwise you'll need to install it. Ciencia Al Poder (talk) 10:26, 10 February 2020 (UTC)

ChangePropagation Error upon running #php ./maintenace/runJobs.php

Hi,

we are having following setup for MediaWiki under our RHEL7 server.

Installed software

Product Version
MediaWiki 1.31.1
PHP 7.1.30 (apache2handler)
MySQL 5.6.40
ICU 50.1.2
Semantic MediaWiki 3.0.2


But, we are facing following issue upon running the maintenance script: #php ./maintenace/runJobs.php


I could see several jobs ran after execute the runJobs.php script. But, it ends up with below ERROR and I still see there is message in Wiki page like "Change propagation updates are pending (190 jobs estimated) and it is recommended to wait with modifications to a category until the process has been finalized to prevent intermediary interruptions or contradictory specifications."


Could you suggest any solution/fix for below issue so that rest of 190 estimated jobs would be completed?


[94ba101628c7238e32a5b527] [no req]   TypeError from line 24 of /data/www/html/wiki/extensions/SemanticMediaWiki/src/MediaWiki/Jobs/ChangePropagationClassUpdateJob.php: Argument 1 passed to SMW\MediaWiki\Jobs\ChangePropagationClassUpdateJob::__construct() must be an instance of Title, null given, called in /data/www/html/wiki/extensions/SemanticMediaWiki/src/MediaWiki/Jobs/ChangePropagationDispatchJob.php on line 415

Backtrace:

#0 /data/www/html/wiki/extensions/SemanticMediaWiki/src/MediaWiki/Jobs/ChangePropagationDispatchJob.php(415): SMW\MediaWiki\Jobs\ChangePropagationClassUpdateJob->__construct(NULL, array)

#1 /data/www/html/wiki/extensions/SemanticMediaWiki/src/MediaWiki/Jobs/ChangePropagationDispatchJob.php(361): SMW\MediaWiki\Jobs\ChangePropagationDispatchJob->newChangePropagationUpdateJob(NULL, array)

#2 /data/www/html/wiki/extensions/SemanticMediaWiki/src/MediaWiki/Jobs/ChangePropagationDispatchJob.php(340): SMW\MediaWiki\Jobs\ChangePropagationDispatchJob->scheduleChangePropagationUpdateJobFromList(array)

#3 /data/www/html/wiki/extensions/SemanticMediaWiki/src/MediaWiki/Jobs/ChangePropagationDispatchJob.php(184): SMW\MediaWiki\Jobs\ChangePropagationDispatchJob->dispatchFromFile(SMW\DIWikiPage, string)

#4 /data/www/html/wiki/includes/jobqueue/JobRunner.php(296): SMW\MediaWiki\Jobs\ChangePropagationDispatchJob->run()

#5 /data/www/html/wiki/includes/jobqueue/JobRunner.php(193): JobRunner->executeJob(SMW\MediaWiki\Jobs\ChangePropagationDispatchJob, Wikimedia\Rdbms\LBFactorySimple, BufferingStatsdDataFactory, integer)

#6 /data/www/html/wiki/maintenance/runJobs.php(89): JobRunner->run(array)

#7 /data/www/html/wiki/maintenance/doMaintenance.php(94): RunJobs->execute()

#8 /data/www/html/wiki/maintenance/runJobs.php(122): require_once(string)

#9 {main}


Thanks,

Sanjay SanjayKSahu (talk) 08:30, 10 February 2020 (UTC)

This seems to be a bug in SemanticMediaWiki. Try using the latest version of SemanticMediaWiki. If that doesn't work, report it to the semantic mediawiki developers: https://www.semantic-mediawiki.org/wiki/Help:Reporting_bugs Bawolff (talk) 11:23, 10 February 2020 (UTC)
I could able to execute all 190 pending jobs successfully with a workaround while executing below scripts by observing the prev error on shell.
All the Change propagation updates are gone fine for all pending Jobs =190. And it unlocked the applicable pages. Issue resolved.
But, I think this ERR may be applicable to my application & so on the workaround.
# php ./maintenance/runJobs.php -s 1
# php ./maintenance/runJobs.php -s 101
# php ./maintenance/runJobs.php -s 119
# php ./maintenance/runJobs.php -s 136
# php ./maintenance/runJobs.php -s 137
# php ./maintenance/runJobs.php -s 141 SanjayKSahu (talk) 13:57, 10 February 2020 (UTC)

UserMerge install on docker image

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


Hi all

I am currently running an official docker image for Wikibase, my mediawiki version is 1.32.

I am struggling to install the UserMerge extension. I have tried adding the extension in a custom extension folder (outside the container) and mount the extension in docker-compose.yml (it seemed like the way to go according to this : https://addshore.com/2018/06/customizing-wikibase-config-in-the-docker-compose-example/ ). As soon as i try to add (to my mounted LocalSettings.php file) the lines as indicated in the install instructions here (Extension:UserMerge) and restart it all, I get this message in the browser :


Fatal error: Uncaught Exception: /var/www/html/extensions/UserMerge/extension.json does not exist! in /var/www/html/includes/registration/ExtensionRegistry.php:107 Stack trace: #0 /var/www/html/includes/GlobalFunctions.php(50): ExtensionRegistry->queue('/var/www/html/e...') #1 /var/www/html/LocalSettings.php(144): wfLoadExtension('UserMerge') #2 /var/www/html/includes/Setup.php(103): require_once('/var/www/html/L...') #3 /var/www/html/includes/WebStart.php(77): require_once('/var/www/html/i...') #4 /var/www/html/index.php(39): require('/var/www/html/i...') #5 {main} thrown in /var/www/html/includes/registration/ExtensionRegistry.php on line 107


I am not sure what to do so I would be happy to get any tips.


Thank you! Btatahlouwa (talk) 12:22, 10 February 2020 (UTC)

The error usually means that you are using an extension that should be loaded via a line like require_once "$IP/extensions/UserMerge.php"; and not wfLoadExtension( 'UserMerge' );
However UserMerge is supposed to use the latter. Are you sure you have the right version of the UserMerge extension? Bawolff (talk) 08:12, 11 February 2020 (UTC)
Yes so it appears that I couldn't follow the method from addshore but had to copy the extension files to the docker container, in spite of having mounted an other folder, and then eventually it went fine. ;-)
Thanks for the help! Btatahlouwa (talk) 09:03, 11 February 2020 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Jira and Mediawiki

Hi,

I have found this: Category:Jira extensions

Is it also possible to have a link (plugin) in Jira with see *this wiki*... for more information? GerbrandHop (talk) 12:44, 10 February 2020 (UTC)

How to clear the history of "deletion log" (יומן מחיקות in Hebrew)?

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


I have MediaWiki 1.33.0 in Hebrew.

In my website I have a web page named in Hebrew "יומן מחיקות", which I could intuitively translate to English as "deletion log" (literally it would be "dictionary (of) deletions" but this is an unlikely technical translation, of course.

The patterned web address of the aforementioned webpage is:
example.com/index.php?title=מיוחד:יומנים/delete
This webpage includes all deletions since my website was first created (I could read about all if I filter results as 500 per page or similar filtering).

I didn't find a parallel webpage in Hebrew Wikipedia named "יומן מחיקות", nor did I found a similar page in English Wikipedia.

My problem

In the aforementioned webpage, I don't have any button to clear it's history ; I could try to clear it's history by some "Database digging" via PHPMyAdmin but this is dangerous and I would like to avoid that and clear the history of this page in a conventional way, only.

Interim note

Personally I would prefer to delete not only the history of deleted articels in that page but the deleted pages themsevles as well from any cache in which they might be "preserved" without me knowing it, but if there is no simple way to do so I would be happy with deleting the history of deleted articles in that page.

My question

How to clear the history of "deletion log" (יומן מחיקות in Hebrew)? 49.230.29.167 (talk) 14:02, 10 February 2020 (UTC)

Hmm, why would you want to do that? That's a special page generated by the software to record deletions that you made. Hebrew Wikipedia has the page: https://he.wikipedia.org/wiki/מיוחד:יומנים/delete, the one for English Wikipedia is at https://en.wikipedia.org/wiki/Special:Log/delete. In fact, there's no Mediawiki installation where it does not exist, and deleting it is not feasible task.
You could not clear its history because it does not have one and you could not edit it because it's not a normal wikitext page. You should forget about deleting it from the database too, as it's part and parcel of the MediaWiki core setup.
I think what you need is to understand what these special pages are for; the help page here Help:Special_pages does not contain much info though, but should be a start and here's another on English Wikipedia, it list all/or most all the special pages, even the ones that may not appear on your wiki.
In summary, that page and all other special pages are neither editable nor deletable. They don't have associated talkpage and no history as they're not directly made by human editors. You need not bother about them too (as long as you're using MediaWiki). – Ammarpad (talk) 14:55, 10 February 2020 (UTC)
Hello @Ammarpad
I would like to delete the history/results of this page (not the page itself!) because some of its lines contain a trimmed part of the first passage of a deleted page which its data is either wrong or inaccurate or misleading or misphrased or exposes private data that was published by mistake ; there could be other reasons but I think this should not be further discussed here.
Anyway; please share - would would be a good bypass?
What about migrating all article data of my Wiki site to a new wiki site? Just the articles, categories, CSS, JS, and MediaWiki: namespace pages (sorry if I missed anything else editable)? 49.230.71.88 (talk) 16:05, 10 February 2020 (UTC)
That one is possible. You can use Revision deletion to delete a specific log or group of logs on that page. You can read that page for more detailed explanation.
In the current alpha MediaWiki, the right allowing that is disabled by default but I am not sure how it was in version 1.33.
So, anyway, you can set $wgGroupPermissions['sysop']['deletelogentry'] = true; in your LocalSettings.php, this will allow users in the 'sysop' group to delete/hide individual log entries from the page. Any hidden entry will no longer be visible to anyone but it will be to all those in the said 'sysop' group. You can use any custom group too, if you are using any. – Ammarpad (talk) 16:33, 10 February 2020 (UTC)
Hello @Ammarpad
Not deleting, but limiting, the results of this deletion log ("יומן מחיקות"), for sysops only, is a good enough solution for me.
Please just allow me to understand from you one more thing,
Did you mean to say that the command
$wgGroupPermissions['sysop']['deletelogentry'] = true;
Is working fine in 1.33.0, but doesn't work on the current latest release (1.34.0)? 49.230.71.88 (talk) 00:53, 11 February 2020 (UTC)
No, that's not what I mean. It will work on both if set correctly. I said in the current alpha/development version the right is disabled by default, (I am not sure why). You can see the relevant line of code here and note the prefixed hash sign. If the hash sign is not present in your DefaultSettings.php that means it was enabled by default in that version.
But all these does not matter much, what you set in LocalSettings.php will override that and provides you with what you want. – Ammarpad (talk) 05:53, 11 February 2020 (UTC)
See Manual:RevisionDelete for what Ammarpad suggests. Enabling that feature provides a button where you can "hide" specific log entries if you don't want them visible.
To hide the deletion log in general, add the following config line:
$wgLogRestrictions['delete'] = 'deletedtext';
Which will only allow people who can read deleted articles in general (Admins) to view Special:Log/delete. See manual:$wgLogRestrictions for more info Bawolff (talk) 08:10, 11 February 2020 (UTC)
Hello @Ammarpad and @Bawolff
Using only the code of Ammarpad didn't work for me when checking the webpage from a web browser by which I never logged in to MediaWIki,
But,
Using only the code of Bawolff did work for me --- after adding that code, the page was hidden to non sysop users in the same aforementioned browser.
I assume using only the code of Bawolff is enough to fully solve my problem (I am actually in order with hiding all logs whatsoever to non sysops).
Thank you both, 182.232.167.214 (talk) 12:05, 11 February 2020 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Removing "index.php?title="

Now the website works as requested. But mobile version looks not working (I have installed Extension:MobileFrontend after the procedure indicated in https://shorturls.redwerks.org

After installing Mediawiki, links appear to be in the form: http://[site name]/index.php?title=[Page name]

How I can use instead http://[site name]/[Page name]? (at the moment these pages give a "500 Internal Server Error "). Ensahequ (talk) 21:35, 10 February 2020 (UTC)

You'd need to set up Short URLs. See instructions at Manual:Short URL and associated pages depending on your webserver and needs. – Ammarpad (talk) 06:07, 11 February 2020 (UTC)
Perfect! Thanks.
But mobile version is not working... maybe I have to delete/change some RewriteCond? Ensahequ (talk) 16:21, 11 February 2020 (UTC)

Customizing Error pages

Is it possible to customise error pages? (e.g. 500 error page, 404 error page, etc.) Ensahequ (talk) 21:37, 10 February 2020 (UTC)

Yes, although how and where depends on what's generating that error page.
For apache (or whatever webserver you use) generated error pages, you need to see the apache docs e.g. https://httpd.apache.org/docs/2.4/custom-error.html
For MediaWiki generated pages, generally they are put together based on pages that have names starting with MediaWiki:. For example MediaWiki:noarticletext is used on the 404 page for missing article. Add ?uselang=qqx (or &uselang=qqx ) to the end of a url to see where the constituent parts come from. Bawolff (talk) 08:05, 11 February 2020 (UTC)
Is there a list with other titles of error pages like MediaWiki:noarticletext? Ensahequ (talk) 16:43, 11 February 2020 (UTC)
You can see the title of a message displayed on page using the qqx trick. Ciencia Al Poder (talk) 10:40, 12 February 2020 (UTC)

Landing page, just like Wikipedia.org

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


I'm using MediaWiki version 1.34

I need to create a landing page, just like Wikipedia (logo and search field centralized, customized header and footer). So basically:

• A customized page, with a different header and footer

• A search field that triggers the same wiki search

• Set it as the home page of my wiki (where it should go when you click on the wiki's logo)

While searching for this, it seems (I don't have a lot of experience in MediaWiki itself, although I know my way around HTML, CSS and even PHP) that I would need a couple extensions in order to accomplish this (actually I couldn't find how to get rid of the header and footer for a single page). Is there an easier (built-in, likely) way to achieve this? Arthurlucena (talk) 21:44, 10 February 2020 (UTC)

You don't need any extension to do this and note that the portal is not built with MediaWiki. It's just static webpage. You can get the source code from here. – Ammarpad (talk) 06:03, 11 February 2020 (UTC)
If you do want to build this in MediaWiki, some notes:
I appreciate your answers, @Ammarpad and @Bawolff!
Ammarpad, thanks for the link, I spent yesterday checking it out and, quite honestly, it seems a lot more complicated (and complete) solution to what I am looking for. All the features in Portal would go to waste in my scenario, besides, the instructions on the docs repository is focused on doing the installation on a command line prompt, which I am not familiar with.
Bawolff, thanks for the recommendation on the extensions. This is what I was concerned on my original post, it is just a simple html file that I already created and stylized - even the search box I put in is working. I just need to figure out a way to put this html file inside the media wiki installation folder and make it the default location on the user click on the logo or type the base url of my wiki. Arthurlucena (talk) 16:33, 12 February 2020 (UTC)
Why do you believe you need to include the static HTML file inside the MediaWiki installation folder? If you want it to be shown as the first page when users visit your web-domain, just place the HTML file directly inside the web facing folder and let the MediaWiki files be inside a sub-folder.
Regarding the logo link, see Manual:FAQ#How do I customize the link-URL of the site-logo in the top left corner of all pages that activates when the site-logo is clicked upon?. AhmadF.Cheema (talk) 20:08, 12 February 2020 (UTC)
If you have specific html you want in a page, you can look into things like manual:$wgRawHtml or extension:Widgets. However its often very unsafe (due to w:XSS) to that unless you trust everyone who can edit your wiki.
You can also of course, set up apache redirect urls, so that that specific url is not served by mediawiki, but by some static html file. Bawolff (talk) 06:03, 13 February 2020 (UTC)
Thanks @AhmadF.Cheema and @Bawolff!
Ahmad, the main reason I want to have this static html file inside my wiki folder is because I have other web applications running on the same server (2 wordpress installations, for example). So this is not supposed to be the first page for my web-domain, but only for my wiki. The link you pointed worked beautifully, so I really appreciated your reply!
Bawolff, although my wiki will be edited by only some few members, as you pointed out, the $wgRawHtml is indeed very unsafe. Setting a redirect url on Apache would be my last resort, but I could change the home page link with Ahmad's reply. It is working now the way I was looking for, the search field even carries the auto complete feature (I copied the html from a page inside my wiki so the same javascript files were referenced in my static html page).
Thanks again guys, that was very helpful! Arthurlucena (talk) 18:28, 13 February 2020 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Intermittent Stoppages/Stalls, Unable to Continue

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


Mediawiki 1.33.1 on a late 2012 Mac Mini Server running Yosemite (10.10.5) using Server Internal Apache Version 2.4.16, PHP 7.2.21, MySQL 5.6.22

I have been successfully running for 4 months now as per the above. All is fine, except for regular but unpredictable behaviour of my server becoming unresponsive, requiring a hard reboot of the server to get access once again.


Symptoms at failure point:

- Browser becomes unresponsive and progress bar stalls

- Closing/reopening browser does not seem to help

- Same behaviour from all access points (tried phone, or another computer) so it appears server related

- Other web installations on the same server such as Piwigo, Webtrees and Avideo continue to work fine


FYI - I am the only user of the server (it is private) so the server load is low.


Debug attempts so far:

- Enabled as much logging as I could understand, but logs do not show any entries

- Checked: error_log, access_log, php_errors.log

- Have experimented with Caching scheme, the following seems to be the most stable:

$wgMainCacheType = CACHE_DB;

$wgSessionsInObjectCache = true;

$wgSessionCacheType = CACHE_DB;

#$wgObjectCacheSessionExpiry = 3600; (so disabled)

$wgParserCacheType = CACHE_DB;

- Tried Chrome/Firefox in addition to Safari with same results

- Tried emptying Browser Cache with no effect

- Tried php maintenance/update.php before reboot with no effect


Clue? Hunch?:

- Previously I had $wgObjectCacheSessionExpiry enabled and the problem would occur at expiry time if the server stayed responsive long enough to reach the Expiry time

Could it be related?


Questions:

  1. Are there any specific debug actions I could take to collect relevant information?
  2. I don't fully understand the different caching schemes, so I would guess that what I have configured is not optimal. Any recommendations?
  3. It seems relevant that my other web installations work fine without interruptions, Avideo is PHP based so it seems there is something specific to Mediawiki that is problematic with my setup and I am reluctant to change my PHP installation unless necessary. I could provide any/all LocalSettings.php values as needed. Please suggest any that could help.
  4. Is there a way to reboot/restart Mediawiki without a hard reset/power cycling of my server?


Thank you,

Gregg GMShimokura (talk) 03:59, 11 February 2020 (UTC)

Its very hard to know without more details about what MediaWiki is getting stuck doing. Some possibilities is it might be getting stuck doing some sort of recache event (like for localisation cache) that never finishes so it tries to redo it on every request. Or similarly some job that just never finishes and gets retried on every request. Its somewhat odd that rebooting the server would actually fix but just waiting a while does not, since the PHP part of MediaWiki is mostly stateless. Are you using the same webserver for all apps?
It might be a little bit of a pain to setup, but if you could setup profiling - Manual:Profiling that might be helpful. As a first step though, if next time this happens you could run top on your server to see what process if any is using CPU. Setting $wgDebugLogFile to a file would also be helpful to get debug logging (Its important that wherever you set it is somewhere that apache has permission to write to)
So caching advice generally:
  • Do you have php-apcu installed? If so, CACHE_ACCEL would probably be a better choice for $wgMainCacheType
  • Some people say that CACHE_NONE is better for $wgMainCacheType than CACHE_DB, if CACHE_DB is all you have available.
  • Try to set $wgCacheDirectory to some location that the webserver can write to (preferably not web accessible). This may be more efficient for localization cache. Bawolff (talk) 08:00, 11 February 2020 (UTC)
Thank for the detailed reply. You have given me some things to try.
Re: Are you using the same webserver for all apps?
Ans: Yes - all using same Apache service
Re: Setting $wgDebugLogFile to a file
Ans: Already done, forgot to mention. Nothing recorded on failure..
Here is my plan based on your reply:
Trial 1:
- I will set the $wgCacheDirectory
- For next failure I will wait much longer to see if it fixes itself or an error message appears. If after 10 mins nothing happens I will assume that it can't fix itself - unless you think 10 mins is too short?
If something does appear I will update this issue with what I have found.
- I will check for renegade processes using top during the waiting period
Trial 2:
- I do have php-acpu install so I will try $wgMainCacheType = CACHE_ACCEL I think I did try this before but will try it again.
Trial 3:
- I will endeavour to setup Profiling and hope to provide some meaningful output..
Thanks again,
Gregg

GMShimokura (talk) 16:16, 11 February 2020 (UTC)
Here is a data point from Trial 1:
- No change in the log files - Nothing logged during 10-15 mins of waiting
Snapshot of top
Starting Trial #2:
ie. Changed $wgMainCacheType = CACHE_ACCEL

GMShimokura (talk) 00:31, 12 February 2020 (UTC)
Here is a second data point from Trial #2 with CACHE_ACCEL
- No change in the log files - Nothing logged during 10-15 mins of waiting
Observation: Anecdotally I would say on my server CACHE_ACCEL also accelerates the time to failure..
Attached is another top output.
Another Observation: There seems to be an active connection trying to be maintained between the browser and the server during the 'stalling' period. When I reboot the server, the browser then comes back with a 'lost connection' type of message where it says it can no longer reach the server while the power down is happening. When the server come back online, the message disappears and the browser goes back to trying to reconnect and do something as it was doing before the reboot.
Question: Is there a way to soft reboot Mediawiki so that I don't have to power cycle my server?
I will now try to enable Profiling but this will take some time.
Gregg

GMShimokura (talk) 01:48, 12 February 2020 (UTC)
Hi again.
Trial #3 Results:
I have failed to be able to install XHProf and/or Tideways. I get compiler errors when running make.
I have also reverted to CACHE_DB for the MainCacheType as it is more reliable (with CACHE_ACCEL I get the stalling in less than an hour).
Gregg GMShimokura (talk) 07:53, 12 February 2020 (UTC)
You can restart apache instead of reboot the computer.
The TOP displays a load of 2.06. However, the most CPU intensive process is top itself with 2.01%... And I don't see the I/O wait indicator in that top command (which is very useful to detect contention problems)
You seem to be using php as mod_php in apache. You may get some insights in apache subprocesses looking at this https://www.tecmint.com/check-apache-httpd-status-and-uptime-in-linux/ Ciencia Al Poder (talk) 10:38, 12 February 2020 (UTC)
I don't really know, but it sounds like this is maybe more an issue with apache or php, and not with MediaWiki.
To confirm, its loading forever (like the webserver keeps the connection open)? Its not just loading a blank page, but stalled trying to load something? It might be interesting to know what the network tab of the web browser developer console says, if it says that loading is stalled at a specific step (not that I would know what to do with that information) Bawolff (talk) 12:30, 12 February 2020 (UTC)
Hi.
I will endeavour to read up on mod_php. Is this the recommended method vs the alternatives?
I confirm the browser is loading forever (showing nothing) and it seems the browser/server connection is trying to be (re)established.
It is not loading a blank page. The progress bar/circle runs but does not progress.
I find it interesting that my other applications using the same Apache service all run great without interruption.
Gregg GMShimokura (talk) 23:47, 12 February 2020 (UTC)
mod_php and fastcgi or the two most popular methods for running php. Both are reasonable choices, and the differences are small enough to probably not make any difference in practice. Bawolff (talk) 06:06, 13 February 2020 (UTC)
Thanks.
Other than restarting Apache, is there some way to reset Mediawiki so that I don't affect all server websites?
Gregg GMShimokura (talk) 15:59, 14 February 2020 (UTC)
mod_php causes it to run inside the webserver worker processes. There's no way to reset "only" one application. Ciencia Al Poder (talk) 16:25, 14 February 2020 (UTC)
Hi, still trying to debug this problem.
Recently I noticed a stoppage instead of stalling and getting some output in the browser and in the logs. From Apache error_log:
[Thu Feb 20 09:27:52.552990 2020] [php7:notice] [pid 70816] [client 192.168.1.1:52945] PHP Notice:  unserialize(): Error at offset 492 of 1505 bytes in .../mediawiki/1.33.1/includes/libs/objectcache/APCUBagOStuff.php on line 111, referer: .../mediawiki/1.33.1/index.php/Main_Page
[Thu Feb 20 09:27:52.553115 2020] [php7:notice] [pid 70816] [client 192.168.1.1:52945] PHP Stack trace:, referer: .../mediawiki/1.33.1/index.php/Main_Page
[Thu Feb 20 09:27:52.553131 2020] [php7:notice] [pid 70816] [client 192.168.1.1:52945] PHP   1. {main}() .../mediawiki/1.33.1/load.php:0, referer: .../mediawiki/1.33.1/index.php/Main_Page
[Thu Feb 20 09:27:52.553145 2020] [php7:notice] [pid 70816] [client 192.168.1.1:52945] PHP   2. require() .../mediawiki/1.33.1/load.php:31, referer: .../mediawiki/1.33.1/index.php/Main_Page
[Thu Feb 20 09:27:52.553157 2020] [php7:notice] [pid 70816] [client 192.168.1.1:52945] PHP   3. require_once() .../mediawiki/1.33.1/includes/WebStart.php:77, referer: .../mediawiki/1.33.1/index.php/Main_Page
[Thu Feb 20 09:27:52.553170 2020] [php7:notice] [pid 70816] [client 192.168.1.1:52945] PHP   4. ExtensionRegistry->loadFromQueue() .../mediawiki/1.33.1/includes/Setup.php:127, referer: .../mediawiki/1.33.1/index.php/Main_Page
[Thu Feb 20 09:27:52.553183 2020] [php7:notice] [pid 70816] [client 192.168.1.1:52945] PHP   5. ExtensionRegistry->exportExtractedData() .../mediawiki/1.33.1/includes/registration/ExtensionRegistry.php:173, referer: .../mediawiki/1.33.1/index.php/Main_Page
[Thu Feb 20 09:27:52.553196 2020] [php7:notice] [pid 70816] [client 192.168.1.1:52945] PHP   6. Skins\\Chameleon\\Chameleon::init() .../mediawiki/1.33.1/includes/registration/ExtensionRegistry.php:407, referer: .../mediawiki/1.33.1/index.php/Main_Page
[Thu Feb 20 09:27:52.553208 2020] [php7:notice] [pid 70816] [client 192.168.1.1:52945] PHP   7. ExtensionRegistryHelper\\ExtensionRegistryHelper->loadExtensionRecursive() .../mediawiki/1.33.1/skins/chameleon/src/Chameleon.php:62, referer: .../mediawiki/1.33.1/index.php/Main_Page
[Thu Feb 20 09:27:52.553222 2020] [php7:notice] [pid 70816] [client 192.168.1.1:52945] PHP   8. ExtensionRegistryHelper\\ExtensionRegistryHelper->loadModuleRecursive() .../mediawiki/1.33.1/vendor/mediawiki/mw-extension-registry-helper/src/ExtensionRegistryHelper.php:53, referer: .../mediawiki/1.33.1/index.php/Main_Page
[Thu Feb 20 09:27:52.553235 2020] [php7:notice] [pid 70816] [client 192.168.1.1:52945] PHP   9. ExtensionRegistry->loadFromQueue() .../mediawiki/1.33.1/vendor/mediawiki/mw-extension-registry-helper/src/ExtensionRegistryHelper.php:81, referer: .../mediawiki/1.33.1/index.php/Main_Page
[Thu Feb 20 09:27:52.553263 2020] [php7:notice] [pid 70816] [client 192.168.1.1:52945] PHP  10. APCUBagOStuff->get() .../mediawiki/1.33.1/includes/registration/ExtensionRegistry.php:168, referer: .../mediawiki/1.33.1/index.php/Main_Page
[Thu Feb 20 09:27:52.553277 2020] [php7:notice] [pid 70816] [client 192.168.1.1:52945] PHP  11. APCUBagOStuff->doGet() .../mediawiki/1.33.1/includes/libs/objectcache/BagOStuff.php:183, referer: .../mediawiki/1.33.1/index.php/Main_Page
[Thu Feb 20 09:27:52.553289 2020] [php7:notice] [pid 70816] [client 192.168.1.1:52945] PHP  12. APCUBagOStuff->unserialize() .../mediawiki/1.33.1/includes/libs/objectcache/APCUBagOStuff.php:48, referer: .../mediawiki/1.33.1/index.php/Main_Page
[Thu Feb 20 09:27:52.553301 2020] [php7:notice] [pid 70816] [client 192.168.1.1:52945] PHP  13. unserialize() .../mediawiki/1.33.1/includes/libs/objectcache/APCUBagOStuff.php:111, referer: .../mediawiki/1.33.1/index.php/Main_Page
[Thu Feb 20 09:27:53.510827 2020] [core:notice] [pid 294] AH00052: child pid 70816 exit signal Segmentation fault (11)
[Thu Feb 20 09:27:53.510965 2020] [core:notice] [pid 294] AH00052: child pid 70778 exit signal Segmentation fault (11)
[Thu Feb 20 09:27:54.513008 2020] [core:notice] [pid 294] AH00052: child pid 70779 exit signal Segmentation fault (11)
During this messaging I do get in the Apache access_log:
"OPTIONS * HTTP/1.0" 200 -
A couple more notes:
- I am not using CACHE_ACCEL, still using CACHE_DB
- Other applications on the same Apache server continue to run fine.
- I have edited out my IP and local root directory from the above
Is there somewhere a recommended Apache setup that is known to work well with Mediawiki? GMShimokura (talk) 14:24, 20 February 2020 (UTC)
well the php segfaulting is definitely related.
For the unserialize error - i guess there is something corrupt in the cache. If that is somehow related to this could explain why restarting apache fixes it since i think that would cause a cache purge.
Try setting $wgMainCacheType = CACHE_NONE; to see if that fixes it (this will slow down things, but better a slow wiki than a dead wiki) [the other cache type variables should be fine as default, just comment them out in LocalSettings.php if they are specified. The important thing for this test is that none of them are CACHE_ACCEL since we want to check if apcu is the culprit)
Fwiw, this sounds more like an issue with your version of php (or possibly version of some php extension) than apache Bawolff (talk) 15:02, 20 February 2020 (UTC)
Sorry, i just saw you said you weren't using CACHE_ACCEL. I also just remembered that MediaWiki will still use apcu in certain circumstances (for data in a multi-server setup that you want per server).
Anyways, can you also try adding the following to LocalSettings.php
$wgObjectCaches['apcu'] = [ 'class' => EmptyBagOStuff::class, 'reportDupes' => false ];
$wgObjectCaches['apc'] = [ 'class' => EmptyBagOStuff::class, 'reportDupes' => false ];
Bawolff (talk) 15:10, 20 February 2020 (UTC)
Thanks I have this set for now:
$wgSessionsInObjectCache = true;
$wgSessionCacheType = CACHE_DB;
$wgMainCacheType = CACHE_DB;
$wgParserCacheType = CACHE_DB;
$wgObjectCaches['apcu'] = [ 'class' => EmptyBagOStuff::class, 'reportDupes' => false ];
$wgObjectCaches['apc'] = [ 'class' => EmptyBagOStuff::class, 'reportDupes' => false ];
Will report if things change.

GMShimokura (talk) 18:49, 20 February 2020 (UTC)
Hi Bawolff,
Well it has been 4 days without any stalls so I do believe we have found the root cause using the above configuration. Before closing this issue should I be trying to debug using CACHE_ACCEL any further?
For example:
Q1: In the long run do I need CACHE_ACCEL or in other words under what condition would CACHE_ACCEL be of significant benefit?
Q2: How would I determine if it is in fact my version of PHP (currently 7.2.21) that is at fault and more importantly which version of PHP that I should change to?
Q3: How would I determine if it is in fact a specific extension of PHP that is at fault and more importantly which version of the extension that I should change to?
Thank you very much for your patience and expertise,
Gregg GMShimokura (talk) 13:53, 24 February 2020 (UTC)
I would suspect it is your php (it might not even be the version, it could be a broken compile of it or something). It might be the apcu extension, i don't know. To debug further would require more specialist knowledge of php than i have. I guess you could ask in their forms.
Having working apcu will make mediawiki faster but is not critical. You can also potentially use memcached instead for a similar purpose. Bawolff (talk) 22:31, 24 February 2020 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Short URL Help

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


I've followed the tutorial but my Short URL is not working.

My current wiki URL is: example.com/w/index.php?title=Main_Page

My desired URL is: example.com/wiki/Main_Page

I followed MediaWiki's Apache Short URL Guide and ShortURL Builder but /wiki and /wiki/Main_Page are returning 404 Page Not Found.

These recommended settings also resulted in my entire domain being redirected to MediaWiki, which I did not want. It appears this is due to the second RewriteRule below.

What I added to .htaccess (in web root folder, not /w):

RewriteEngine On
RewriteRule ^/?wiki(/.*)?$ %{DOCUMENT_ROOT}/w/index.php [L]
RewriteRule ^/?$ %{DOCUMENT_ROOT}/w/index.php [L]

Added to /w/LocalSettings.php:

$wgScriptPath = "/w";
$wgScriptExtension = ".php";
$wgArticlePath = "/wiki/$1";
$wgUsePathInfo = true;

What needs to be changed to get my short url working?

I am using MediaWiki version 1.32.0 with Apache server on shared hosting (no root access).

Thanks in advance for any help. Knomanii (talk) 09:24, 11 February 2020 (UTC)

Bump. Was my question not clear enough? Or are there no technical issues the .htaccess rules above?
x-posted to stackoverflow Knomanii (talk) 01:05, 14 February 2020 (UTC)
If the second RewriteRule is working, it means the first one is also working, but I can't explain why it returns a 404 error.
You may want to look at apache error logs to find the real path being accessed Ciencia Al Poder (talk) 10:41, 14 February 2020 (UTC)
I finally got it working! The main problem was that my MediaWiki rules were placed AFTER my Wordpress site rules.
That said, I also ran into some major problems caused by some of the rules that the ShortURL Builder recommended, such as this one:
RewriteRule ^/?$ %{DOCUMENT_ROOT}/w/index.php [L]
I'm guessing that'd be why my ENTIRE SITE (example.com/) started directing to the wiki (/w/index.php)? The whole reason I was setting it up as /wiki was to separate it from the rest of the site, so I'm surprised this was the default recommendation.
Here were the final rules I used, from the URL/wiki/Page_Title htaccess instructions, which I actually can't find linked to or written anywhere on Manual:ShortUrl anymore, so perhaps they've been deleted from there? They were the only ones I could find that actually worked for me:
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^wiki/(.*)$ w/index.php?title=$1 [PT,L,QSA]
RewriteRule ^wiki/*$ w/index.php [L,QSA]
RewriteRule ^wiki$ w/index.php [L,QSA] Knomanii (talk) 12:15, 3 May 2020 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

How do I get the Name of any NameSpace by its number via PHP?

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


I'm tring to find a way to get the translated name of the namespace MediaWiki (Nr. 8) via my PHP code - for example in Bulgarian it is translated to МедияУики.

I've fund so far that the constant NS_MEDIAWIKI contains the number of the namespace 8. Also the I've found the translated names are defined via the the array $namespaceNames. But echo $namespaceNames[NS_MEDIAWIKI] returns nothing.

I'm using the hooks ArticleViewHeader and BeforePageDisplay, but if it is not possible to get the namespace name via these hooks I would use another one.

Could someone give me a hand in this case? Spas.Z.Spasov (talk) 11:09, 11 February 2020 (UTC)

You probably want either the getFormattedNsText or getNsText method of the language object.
It depends a bit what language you want it in. If you want to use the page language [e.g. what's stored in page_lang field in db, falling back to ContentHandler default, and then falling back to Content language], you might do something like $article->getTitle()->getPageLanguage()->getFormattedNsText( NS_MEDIAWIKI );. [Where $article would be the first argument to the ArticleViewHeader hook] If at all possible, this is probably the version you want. If page language isn't what language the page is actually written in, you probably want to fix that rather then use a different language object.
If you want to use the content language (Default language of the wiki): MediaWiki\MediaWikiServices::getInstance()->getContentLanguage()->getFormattedNsText( NS_MEDIAWIKI );
If you want the user language, use $article->getContext()->getLanguage()->getFormattedNsText( NS_MEDIAWIKI );. Be very careful with this version though, as if it gets cached you may have cache pollution issues where users get the wrong langauge.
If you want to do it for an arbitrary language (replacing 'bg' with the lang code):
MediaWiki\MediaWikiServices::getInstance()->getLanguageFactory()->getLanguage( 'bg' )->getFormattedNsText( NS_MEDIAWIKI ); Bawolff (talk) 10:56, 12 February 2020 (UTC)
Thank you very much, @Bawolff, for the great answer! Spas.Z.Spasov (talk) 16:53, 12 February 2020 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

How to use JavaScript document.write in jQuery ready function?

We want to add content before every 3rd headline within the content area. We do so with jQuery in Common.js. Now we want to add a JavaScript code for splittesting. This code uses document.write.

From [1] I learned that one can not use document.write in Common.js. And [2] says that I can't use jQuery (ready function) within the articles itself.

So how can I use the jQuery ready function in combination with document.write in MediaWiki? Stefahn (talk) 16:37, 11 February 2020 (UTC)

You can not use document.write in current HTML code on any modern browser (unless you want to render a completely blank and unusable page).
You'll need to replace document.write with DOM manipulation. Ciencia Al Poder (talk) 18:01, 11 February 2020 (UTC)
For some reason document.write within this JavaScript code works fine, if added statically to a page - see the second line here: https://secret-wiki.de/wiki/Hilfe:Sandkasten2 (the JavaScript outputs just one single line of German text)
My question is still: How can I use the jQuery ready function in combination with document.write in MediaWiki? Stefahn (talk) 15:24, 12 February 2020 (UTC)
You can't use document.write in MediaWiki. Period.
What does document.write do? Write text on the page. Where on the page? Where the document.write is present.
What do you expect document.write to write to if placed inside a JavaScript file, or even inside a jQuery ready function??? Ciencia Al Poder (talk) 10:26, 13 February 2020 (UTC)
As I mentioned the second line on https://secret-wiki.de/wiki/Hilfe:Sandkasten2 is generated by document.write. So MediaWiki seems to be able to handle it if I put the JavaScript directly on a page.
I need the jQuery ready function so that I can do the following:
$( "h2:nth-of-type(3n+3)" ).before('HTML code containing the JavaScript code with document.write'); Stefahn (talk) 21:59, 14 February 2020 (UTC)
I'm not going to repeat myself, since my the last message already covers that.
You're trying to use DOM functions with jQuery to inject HTML where you want (which is the right thing to do), but instead of normal HTML you want to inject a piece of JavaScript that does document.write to write HTML. Think how absurd is this. Ciencia Al Poder (talk) 14:28, 15 February 2020 (UTC)
Okay, I think I got it now.
I can use document.write if I add the JavaScript code directly on my article (with Extension:Secure_HTML for example). But I can't use it within other JavaScript code.
Maybe there's a way to save the html that document.write produces in a variable, which is then used by the jQuery ready function... Stefahn (talk) 08:51, 18 February 2020 (UTC)

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


Not sure if the code will display correctly. Is there a way to have inline category links like below automatically add the page to those categories without having to retype the links at the end of the code? See code example below:

{| class="wt (deliberate redaction of code for display purposes

!Account Manager

!Project Manager

!Notes

|-

|[[:Category:Jane Doe|Jane Doe]]

|[[:Category:John Doe|John Doe]]

|None

|}


I'd like this page added to the Categories for Jane Doe and John Doe, with those category links hidden at the bottom of the page. I know how to do that by adding [[:Category:Jane Doe]] etc to the bottom of the code. Is there a way to make the table links add the page to the appropriate categories WITHOUT having to retype the category links? I'm basically typing them twice right now.


Thanks in advance. John Doe 68.69.237.18 (talk) 17:20, 11 February 2020 (UTC)

Category links should work at any place within the page. You just need to remove the "escaping" colon in ":Category:...". So using [[Category:Jane Doe]] somhwere inline should be fine. Osnard (talk) 08:33, 12 February 2020 (UTC)
You can also create a template that does the duplication for you.
For example:
[[:Category:{{{1}}}]][[Category:{{{1}}}]]
Imagine you name this template "Template:Category", you'll use it as {{Category|Jane Doe}} Ciencia Al Poder (talk) 10:27, 12 February 2020 (UTC)
Thank you. 68.69.237.18 (talk) 14:16, 12 February 2020 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

On my Wiki when a page xxxx is translated, the name of the translated page is simply with xxxx/yy where yy identifies a language.


It was done like this a long time ago, and I can't change it now, because there are softwares expecting this scheme to display help pages in different languages.


With MW 1.28 I'm able to use the CustomTitle extension to add, in the title area, some links computed from the page name to the translations when they exists. Unfortunately in following versions the extension was deprecated.


What is the best way to add some HTML in the beginning of a page, depending on the page name and either making queries in the database, or able to find if a named page exists.

I tried onOutputPageBeforeHTML hook, but can't obtain anything from it. Is there some SIMPLE examples showing how we can do this ?


Thanks


Tintinux (talk) 17:51, 11 February 2020 (UTC)

You might want to also look into extension:Translate.
There's a lot of different hooks depending on what you want to do. I think the Translate extension uses ArticleViewHeader hook (Calling $article->getContext()->getOutput()->addHtml( 'html here' );). Not sure if its the best approach, but it is an approach. Bawolff (talk) 10:44, 12 February 2020 (UTC)
Ok, thanks, I have found the way to use OutputPageBeforeHTML hook.
The problem was the documentation don't say that wfLoadExtension don't actually load the extension, as it's name looks like... With adding include or require, it is OK. Tintinux (talk) 10:54, 12 February 2020 (UTC)
wfLoadExtension does load an extension, without using any requires.
If you need requires then something is missing in your extension.json.
Edit: To be more specific - wfLoadExtension will load your extension, but it looks in extension.json at either the AutoloadNamespaces or AutoloadClasses directive to decide which files are part of your extension and should get loaded. See Manual:Extension.json/Schema#AutoloadClasses Bawolff (talk) 11:00, 12 February 2020 (UTC)
I have put in extension.json exactly what is given in the documentation.
{
"Hooks": {
"OutputPageBeforeHTML": "MyExtensionHooks::onOutputPageBeforeHTML"
}
}
Of course MyExtensionHooks was replaced by the class name.
If something else is required to find and/or load the class (which is defined in a php file aside extension.json), it is not written here...
Sorry, I'm used to easier IDE. Tintinux (talk) 11:17, 12 February 2020 (UTC)
Well that documentation page is for that hook specificly, not for generally registering an extension.
You need to tell MediaWiki what file contains that class. you need to use something like { "AutoloadedClasses": { "MyExtensionHooks": "includes/MyExtensionHooks.php" } }. Alternatively you can use AutoloadedNamespaces to guess the filename following PSR-4 standard. Bawolff (talk) 12:14, 12 February 2020 (UTC)

Cannot update MW1.34 using update.php

Whenever I attempt to run php update.php i get the following error:

MediaWiki 1.34.0 Updater

Your composer.lock file is up to date with current dependencies!

Wikimedia\Rdbms\DBConnectionError from line 1380 of /mnt/c/xampp/htdocs/w/includes/libs/rdbms/loadbalancer/LoadBalancer.php: Cannot access the database: Unknown error (127.0.0.1)

#0 /mnt/c/xampp/htdocs/w/includes/libs/rdbms/loadbalancer/LoadBalancer.php(931): Wikimedia\Rdbms\LoadBalancer->reportConnectionError()

#1 /mnt/c/xampp/htdocs/w/includes/libs/rdbms/loadbalancer/LoadBalancer.php(898): Wikimedia\Rdbms\LoadBalancer->getServerConnection(0, 'wikidb', 4)

#2 /mnt/c/xampp/htdocs/w/includes/libs/rdbms/loadbalancer/LoadBalancer.php(1043): Wikimedia\Rdbms\LoadBalancer->getConnection(-2, Array, 'wikidb', 4)

#3 /mnt/c/xampp/htdocs/w/maintenance/Maintenance.php(1401): Wikimedia\Rdbms\LoadBalancer->getMaintenanceConnectionRef(-2, Array, 'wikidb')

#4 /mnt/c/xampp/htdocs/w/maintenance/update.php(147): Maintenance->getDB(-2)

#5 /mnt/c/xampp/htdocs/w/maintenance/doMaintenance.php(99): UpdateMediaWiki->execute()

#6 /mnt/c/xampp/htdocs/w/maintenance/update.php(277): require_once('/mnt/c/xampp/ht...')

#7 {main}


I have changed the $wgDBserver to both localhost and 127.0.0.1 and continue to get the same error. My wiki can be accessed and edited with no problem, and I also have access to the database which says the server is at 127.0.0.1.


I have double and triple checked both the username and password for the database as well.


Anyone have any suggestions for anything else I can try?


2001:56A:7833:6C00:F16B:1715:1E74:B342 (talk) 20:23, 11 February 2020 (UTC)

Do you have SELinux or similar things installed. Perhaps they are limiting access to your database from commandline php?
Can you access your db from the mysql command line program?
If all else fails, its possible to run the updater from the web interface (albeit not reccomended). If the url to your wiki's index.php is https://mywiki.com/w/index.php you would go to https://mywiki.com/w/mw-config/ to do this. Bawolff (talk) 13:10, 12 February 2020 (UTC)

is it possible to have parallel categories (MW1.30)?

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


I would like to have a second collection of relationships that works identical to categories but have another name (projects in my case, not to be confused with the WM projects). This, while keeping the categories too, so just renaming that in translation wouldn't do. Is this possible, or are categories a unique feature? If so, how could I achieve this?

I am using MW1.30 and have full access to source, config and database. Wimw (talk) 20:31, 11 February 2020 (UTC)

@Wimw On an unrelated note, you are using an old unsupported MediaWiki version with security vulnerabilities, so your installation is insecure. Please upgrade. Malyacko (talk) 00:24, 12 February 2020 (UTC)
Have a look at Extension:Semantic MediaWiki Osnard (talk) 08:27, 12 February 2020 (UTC)
1.30 is the most recent release available for the operating system, or rather, php 5.6 is. That limits the choice.
I will look into the semantic. Thanks. Wimw (talk) 12:21, 12 February 2020 (UTC)
Note, that php 5.6 has no longer been getting security updates for over a year now [3], unless your distro is backporting things themselves. Bawolff (talk) 13:00, 12 February 2020 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Table with IP Addresses and status UP/DOWN

Hi, I'm on MediaWiki 1.34.0,PHP 7.2.18 (fpm-fcgi), MySQL, 5.6.39, ICU 50.1.2.

I'm building some basic documentation for my workplace and wondering if it's possible to add a ping status result to each IP listed in a table. When Accesing that specific page should see something like 192.168.0.10 UP

192.168.0.11 DOWN.

I know there are plenty of network tools that already do that but I am being asked if this is possible.

Thanks. Panseluta123 (talk) 07:55, 12 February 2020 (UTC)

You will probably need to implement a small extension for stuff like that. It's not hard to do if you know a little PHP. See Manual:Tag_extensions or Manual:Parser_functions as a starting point. Osnard (talk) 08:29, 12 February 2020 (UTC)

None of my images are clickable.

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


The images are inside a gallery tag. They are all wrapped in <a> tags and the cursor changes when hovering over it like it is a link. I've noticed that the class="image" on the <a> tag. If I change it to class="internal" using chrome dev tools inspector, it works. I'm not sure where the bug is to fix it though or what I've done to break it. It makes a large part of my wiki unusable to the average user at the moment though. 2A02:C7F:C478:2000:297E:2BF9:F95E:FB44 (talk) 15:36, 12 February 2020 (UTC)

I should add, this behaviour is broken across a couple themes I've tried. I'm using Vector though. 2A02:C7F:C478:2000:297E:2BF9:F95E:FB44 (talk) 15:36, 12 February 2020 (UTC)
mediawiki.org also has class="image" on the <a> tag and the images are clickable. Can you mention which MediaWiki version and browsers you're using? AhmadF.Cheema (talk) 20:14, 12 February 2020 (UTC)
1.34. It doesn't work on Chrome (desktop) or Safari (mobile).

2A02:C7F:C478:2000:297E:2BF9:F95E:FB44 (talk) 20:35, 12 February 2020 (UTC)
Have you made any modifications in the page MediaWiki:Common.css or other css files?
Which skin are you using? Bawolff (talk) 06:23, 13 February 2020 (UTC)
Vector. No manual changes to files (other than LocalSettings). I'm running in a docker container. 2A02:C7F:C478:2000:F507:E3E7:2E51:40F3 (talk) 08:15, 13 February 2020 (UTC)
MediaWiki:Common.css is not a file, but a wiki page named MediaWiki:Common.css.
This can also be a problem with MediaWiki:Common.js or another gadget/script, or even an extension (Multimedia Viewer?). For example, a script to make images being enlarged on the same page on click instead of opening the file description page. But maybe a JavaScript error is preventing it from fully functioning and it only prevents the default behavior. Ciencia Al Poder (talk) 10:42, 13 February 2020 (UTC)
Thanks, Ciencia Al Poder. I stumbled onto the solution based on your comment. I tried searching and viewing MediaWiki:Common.css and got a stack trace from Syntax Highlighter. I updated the SyntaxHighlighter extension and now it works. This seemed bizarre to me - why would a default extension be out of date? This made me realise that my docker set up is flawed; I have /var/www/html mapped to a local directory. I did this so I could easily edit LocalSettings.php as well as install new extensions and skins that would persist. But this means my extensions aren't getting updated when the docker image is! I updated mediaviewer to the latest version and my images are working again. I'll have to fix my docker configuration! Thanks to everyone else that chimed in too! 2A02:C7F:C478:2000:F507:E3E7:2E51:40F3 (talk) 20:33, 13 February 2020 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

How to block pages in a certain Namespace for all but one group?

Hallo, I find no way to do a simple Thing on mediawiki 1.34.0:


I want, that pages in a certain (selfcreated) namespace are only seen by members of a certain group.


For instance The page "GKR:members" should only be seen by members of the group "entitled".


I tried much, which I found in internet, but either the page could be seen by nobody ar by all users. Can anybody give me the link to a good howto?


Thanks Holger 2003:E2:4F0C:901D:E463:1512:D54F:B726 (talk) 15:42, 12 February 2020 (UTC)

See Manual:Preventing access#Restrict viewing of certain specific pages and Manual:Preventing access#Restrict editing of an entire namespace Malyacko (talk) 18:04, 12 February 2020 (UTC)
I tried to do it well with the following code in LocalSettings.php:
//Only Group "Pfarrer" may see artcles in namespace "Pfarrer"
define("NS_PFARRER", 110);
define("NS_PFARRER_TALK", 111);
// Add namespace.
$wgExtraNamespaces[NS_PFARRER] = "Pfarrer";
$wgExtraNamespaces[NS_PFARRER_TALK] = "Pfarrer_talk";
//Protect namspace for all, who are not in group "Pfarrer"
$wgNamespaceProtection[NS_Pfarrer] = array( 'editPfarrer' ); // permission "editPfarrer" required to edit the Pfarrer namespace
$wgGroupPermissions['Pfarrer']['editPfarrer'] = true;      // permission "editPfarrer" granted to users in the "Pfarrer" group
$wgNamespaceProtection[NS_Pfarrer_TALK] = array( 'editPfarrer' ); // permission "editPfarrer" required to edit the Pfarrer_talk namespace
$wgGroupPermissions['Pfarrer']['editPfarrer'] = true;      // permission "editPfarrer" granted to users in the "Pfarrer" group
But users without group-membership may still read and edit for instance the article "Pfarrer:Test". Whats wrong? 2003:E2:4F0C:901D:8392:1EF6:28DD:E95B (talk) 21:14, 12 February 2020 (UTC)
Does these restrictions show up on your wiki's Special:UserGroupRights (There should be a table at bottom of namespace restrictions)?
Also, $wgNamespaceProtection[NS_Pfarrer] = array( 'editPfarrer' ); needs to be $wgNamespaceProtection[NS_PFARRER] = array( 'editPfarrer' ); probably Bawolff (talk) 06:21, 13 February 2020 (UTC)
Thank you very much.
At first I have altered the line as mentioned above. and now - correct - users, who are not members of "Pfarrer" cannot edit the article any longer. That worked.
--
BUT: What do I have to do, so that they don't even see the articles in the namespace?
--
In Special:UserGroupRights I see:
==Namensraumbeschränkungen==
Namensraum Rechte, die dem Benutzer die Bearbeitung erlauben
(Seiten) editPfarrer (editPfarrer)
MediaWiki Systemnachrichten und Benutzeroberflächen bearbeiten (editinterface)
Pfarrer editpfarrer (editPfarrer)
Open editopen (editopen) 2003:E2:4F0C:901D:8392:1EF6:28DD:E95B (talk) 15:53, 13 February 2020 (UTC)
To restrict read permission per namespace, keeping in mind the limitations, see Extension:Lockdown. And also, Extension talk:Lockdown/Archive 2/Flow export#h-Namespace_lockdown_doesn't_work_correctly_in_MW_1.31-2018-06-19T06:13:00.000Z for direct LocalSettings.php code to enable namespace restriction. AhmadF.Cheema (talk) 18:03, 13 February 2020 (UTC)
Thanks, Lockdown is the solution!!
Thank you all for your time. Great.
Holger 2003:E2:4F0C:901D:8392:1EF6:28DD:E95B (talk) 11:00, 15 February 2020 (UTC)

adding infoboxes

Hey,

So, first of all, I am not too familiar with computer stuff. I have recently opened a wiki using MediaWiki and I want to use Infoboxes in the wiki pages. I think, I have read almost everything that I should do to add infoboxed, but due to me being new to everything, I only understood half of it. So, my Wiki is www.ldwiki.ml. After reading this page among others, I did the following

- CSS and JS preparation on my site

- installed the ParserFunctions Extention and made the changes in the LocalSettings File

- installed Scribunto and set the execute permissions and made the changes to the LocalSettings File

I did not manage to:

- install Composer and Wikibase as said in this guide

My first question would be how to install Composer. I have downloaded the Composer-Setup.exe file but did not manage to go further than one step in the installation and when I use the scripts, I get errors (Probably doing something wrong there as I never used those before though)

An Example of the error I currently get can be found here

Thanks in advance

Felix FS7615 (talk) 18:37, 12 February 2020 (UTC)

The infobox appears to be working fine; if not, can you explain exactly how you think it should look?
You probably will have absolutely no need to install Wikibase, so no need to go through the trouble on that front.
Regarding Composer, are you running your MediaWiki on some Linux OS or is it on Windows? AhmadF.Cheema (talk) 19:58, 12 February 2020 (UTC)
Yeah, it works now. Seems like it just took a while. The Template pages still look a bit weird though (see here).
Composer: I am hosting the site via http://hosting.danwin1210.me/ and don't know the system that it's hosted on. Is there a way to find out? My Computer is a Windows, but I guess that it's more about where the website is hosted at, right? FS7615 (talk) 20:59, 12 February 2020 (UTC)
Do you have shell (ssh) access to your host site? I think its using linux. Possibly composer might already be installed there, so you should try at first just using the composer command to see if it works. If it doesn't, follow the command line instructions at https://getcomposer.org/download/ (doing it over your ssh connection) [You may have to type php composer.phar anywhere the instructions say to type composer.
By the way you can usually figure out what type of system something is by typing the command uname and hitting enter from the ssh connection (or uname -a if you want full details).
But also, you may want to consider if you really want to install wikibase. It might be needed if you want to use the exact code that wikipedia uses, but wikibase adds a lot of complications and will be pretty useless to you unless you want to install it for the general reason. Bawolff (talk) 06:17, 13 February 2020 (UTC)
I guess this doesn't work for me as I never did something like that before and I'm probably doing something wrong. Do I need to be in a certain url path so that it works? Well at least when I type in php composer.phar, it gives this answer:
Could not open input file: composer.phar
The uname command did work, it is a Linux system.
Now to the steps on https://getcomposer.org/download/:
When I type in php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" as it sais on the site, I am getting this as answer:
Warning: copy(composer-setup.php): failed to open stream: Permission denied in Command line code on line 1
As said, I am probably doing something wrong. Do I need to be in a certain directory to make it work? (such as giving the command from Folder /Extentions/Composer/ or so)?
And concerning the question if Composer is already installed: There is no "Composer" Folder in the Extentions Folder, but I have a file named "composer.json" and one named "composer.local.json-sample" in the /www directory FS7615 (talk) 02:51, 14 February 2020 (UTC)
You need to be in a directory you have write access to. Probably easiest is where mediawiki is installed.
By already installed i mean present on the system so you can just type composer and it works. It would not be in extensions/composer (/usr/bin or /usr/local/bin would be the usual place if preinstalled, but that doesnt really matter) Bawolff (talk) 05:06, 14 February 2020 (UTC)
Oh yeah, composer is actually installed there and the "composer" command worked 😅. Thank you for the help ^^ FS7615 (talk) 17:13, 14 February 2020 (UTC)
Regarding your Wiki's Template:Infobox and the error you're getting, these errors are often due to the fact Wikipedia templates using Lua are often updated to make use of the latest MediaWiki and extension versions, however, these updates also make them incompatible with older software versions.
Third-party Wikis such as yours are usually using comparatively older versions of MediaWiki/extensions, thereby displaying such errors on import of latest versions of such templates.
Sometimes, one solution for this is to use an older revision of the required template which works on your Wiki. AhmadF.Cheema (talk) 20:33, 13 February 2020 (UTC)
I also have another minor problem with the IP Address. Whenever someone is not logged in and makes edits, the recorded IP Adress is 0.0.0.0 instead of the real IP Address. Is this a known problem? FS7615 (talk) 03:08, 14 February 2020 (UTC)
well thats weird. w:0.0.0.0 is not a real ip address and used usually as a placeholder for unknown.
Maybe your host is trying to keep ips secret for privacy reasons? Bawolff (talk) 05:11, 14 February 2020 (UTC)
Hm, maybe. I believe my hoster is not just offering normal web hosting, but also offers web hosting for darknet websites. I just use it as it's a free and easy-to-use hoster but maybe it does have privacy rules like that. In the access logs I can see the IP Addresses though 😬😅 FS7615 (talk) 17:15, 14 February 2020 (UTC)

Hidden Filters/Tags

For some reason some filters are hidden, specifically the parody:"teen titans$" filter and parody:"teenage mutant ninja turtles$". The page says No hits found yet I can see the comics with the tag if I don't search it or look up a different tag on a comic with the tag. Is there something blocking tags without me knowing? 2600:8805:3A00:BEE:11D1:6895:613F:49D6 (talk) 01:38, 13 February 2020 (UTC)

I think you are asking in the wrong place. I have no idea what you are referring to. Bawolff (talk) 06:09, 13 February 2020 (UTC)

upgrade error from 1.33 to 1.34

I have upgraded MediaWiki from 1.33 to 1.34, but encountered some errors and enabled exception details display

I saw these errors in the console

[00d414ed3b6a6d303136e5c7] /load.php?lang=zh-cn&modules=startup&only=scripts&raw=1&skin=vector   InvalidArgumentException from line 172 of /var/www/wiki/includes/resourceloader/ResourceLoaderOOUIModule.php: Invalid OOUI images module 'textures'
Backtrace:
#0 /var/www/wiki/includes/resourceloader/ResourceLoaderOOUIImageModule.php(99): ResourceLoaderOOUIImageModule->getThemeImagesPath()
#1 /var/www/wiki/includes/resourceloader/ResourceLoaderOOUIImageModule.php(43): ResourceLoaderOOUIImageModule->loadOOUIDefinition()
#2 /var/www/wiki/includes/resourceloader/ResourceLoaderImageModule.php(421): ResourceLoaderOOUIImageModule->loadFromDefinition()
#3 /var/www/wiki/includes/resourceloader/ResourceLoaderModule.php(825): ResourceLoaderImageModule->getDefinitionSummary()
#4 /var/www/wiki/includes/resourceloader/ResourceLoaderStartUpModule.php(283): ResourceLoaderModule->getVersionHash()
#5 /var/www/wiki/includes/resourceloader/ResourceLoaderStartUpModule.php(468): ResourceLoaderStartUpModule->getModuleRegistrations()
#6 /var/www/wiki/includes/resourceloader/ResourceLoaderModule.php(719): ResourceLoaderStartUpModule->getScript()
#7 /var/www/wiki/includes/resourceloader/ResourceLoaderModule.php(687): ResourceLoaderModule->buildContent()
#8 /var/www/wiki/includes/resourceloader/ResourceLoaderModule.php(822): ResourceLoaderModule->getModuleContent()
#9 /var/www/wiki/includes/resourceloader/ResourceLoader.php(665): ResourceLoaderModule->getVersionHash()
#10 [internal function]: ResourceLoader->{closure}()
#11 /var/www/wiki/includes/resourceloader/ResourceLoader.php(677): array_map()
#12 /var/www/wiki/includes/resourceloader/ResourceLoader.php(764): ResourceLoader->getCombinedVersion()
#13 /var/www/wiki/load.php(48): ResourceLoader->respond()
#14 {main}
(anonymous) @ load.php?lang=zh-cn&modules=startup&only=scripts&raw=1&skin=vector:20

And I couldn't open the visual editor or the sub pages of the special:preferences 62.133.35.152 (talk) 06:18, 13 February 2020 (UTC)

➤ apache2 -version
Server version: Apache/2.4.39 (Ubuntu)
Server built:   2019-04-02T20:30:08
➤ php -v
PHP 7.4.2 (cli) (built: Feb  5 2020 16:50:21) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Zend OPcache v7.4.2, Copyright (c), by Zend Technologies
➤ cat /etc/issue
Ubuntu 16.04.4 LTS \n \l 62.133.35.152 (talk) 06:23, 13 February 2020 (UTC)
System Linux miniServer 4.15.0-76-generic #86~16.04.1-Ubuntu SMP Mon Jan 20 11:02:50 UTC 2020 x86_64
Build Date Feb 5 2020 16:50:21
Server API Apache 2.0 Handler
Virtual Directory Support disabled
Configuration File (php.ini) Path /etc/php/7.4/apache2
Loaded Configuration File /etc/php/7.4/apache2/php.ini
Scan this dir for additional .ini files /etc/php/7.4/apache2/conf.d
Additional .ini files parsed /etc/php/7.4/apache2/conf.d/10-mysqlnd.ini, /etc/php/7.4/apache2/conf.d/10-opcache.ini, /etc/php/7.4/apache2/conf.d/10-pdo.ini, /etc/php/7.4/apache2/conf.d/15-xml.ini, /etc/php/7.4/apache2/conf.d/20-apcu.ini, /etc/php/7.4/apache2/conf.d/20-calendar.ini, /etc/php/7.4/apache2/conf.d/20-ctype.ini, /etc/php/7.4/apache2/conf.d/20-curl.ini, /etc/php/7.4/apache2/conf.d/20-dom.ini, /etc/php/7.4/apache2/conf.d/20-exif.ini, /etc/php/7.4/apache2/conf.d/20-ffi.ini, /etc/php/7.4/apache2/conf.d/20-fileinfo.ini, /etc/php/7.4/apache2/conf.d/20-ftp.ini, /etc/php/7.4/apache2/conf.d/20-gd.ini, /etc/php/7.4/apache2/conf.d/20-gettext.ini, /etc/php/7.4/apache2/conf.d/20-iconv.ini, /etc/php/7.4/apache2/conf.d/20-imagick.ini, /etc/php/7.4/apache2/conf.d/20-intl.ini, /etc/php/7.4/apache2/conf.d/20-json.ini, /etc/php/7.4/apache2/conf.d/20-mbstring.ini, /etc/php/7.4/apache2/conf.d/20-mysqli.ini, /etc/php/7.4/apache2/conf.d/20-pdo_mysql.ini, /etc/php/7.4/apache2/conf.d/20-pdo_sqlite.ini, /etc/php/7.4/apache2/conf.d/20-phar.ini, /etc/php/7.4/apache2/conf.d/20-posix.ini, /etc/php/7.4/apache2/conf.d/20-readline.ini, /etc/php/7.4/apache2/conf.d/20-shmop.ini, /etc/php/7.4/apache2/conf.d/20-simplexml.ini, /etc/php/7.4/apache2/conf.d/20-sockets.ini, /etc/php/7.4/apache2/conf.d/20-sqlite3.ini, /etc/php/7.4/apache2/conf.d/20-sysvmsg.ini, /etc/php/7.4/apache2/conf.d/20-sysvsem.ini, /etc/php/7.4/apache2/conf.d/20-sysvshm.ini, /etc/php/7.4/apache2/conf.d/20-tokenizer.ini, /etc/php/7.4/apache2/conf.d/20-xmlreader.ini, /etc/php/7.4/apache2/conf.d/20-xmlwriter.ini, /etc/php/7.4/apache2/conf.d/20-xsl.ini, /etc/php/7.4/apache2/conf.d/20-zip.ini, /etc/php/7.4/apache2/conf.d/25-apcu_bc.ini
PHP API 20190902
PHP Extension 20190902
Zend Extension 320190902
Zend Extension Build API320190902,NTS
PHP Extension Build API20190902,NTS
Debug Build no
Thread Safety disabled
Zend Signal Handling enabled
Zend Memory Manager enabled
Zend Multibyte Support provided by mbstring
IPv6 Support enabled
DTrace Support available, disabled
Registered PHP Streams https, ftps, compress.zlib, php, file, glob, data, http, ftp, zip, phar
Registered Stream Socket Transports tcp, udp, unix, udg, ssl, tls, tlsv1.0, tlsv1.1, tlsv1.2, tlsv1.3
Registered Stream Filters zlib.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, dechunk, convert.iconv.*
This program makes use of the Zend Scripting Language Engine:
Zend Engine v3.4.0, Copyright (c) Zend Technologies
   with Zend OPcache v7.4.2, Copyright (c), by Zend Technologies

Null ever (talk) 06:33, 13 February 2020 (UTC)

Can you check to make sure that all the extensions you have installed correspond to the version of MediaWiki you have installed (And the version of MediaWiki you installed is just version 1.34 and not a mix of files. If you were installing via git (as opposed to the tarball) you ran composer update) Bawolff (talk) 06:38, 13 February 2020 (UTC)
Thanks a lot, i have solved this problem by upgrading again Null ever (talk) 07:30, 13 February 2020 (UTC)
Thanks your suggestion
I have almost remove all the extensions and skins I have installed
And I execute the mwExtUpgrader.phar, I got some error too
➤ php ./mwExtUpgrader.phar 
Note that this release of code is not stable. Do not use for production.
Welcome to use mwExtUpgrader. This script can help you bulk upgrade MediaWiki extensions.
Continue with this action? (y/n) y
Please type the absolute path to the MediaWiki directory: /var/www/wiki
mwExtUpgrader detected your MediaWiki version is 1.34.0
Confirm version to be upgraded (default: 1.34)
  [0] 1.31
  [1] 1.32
  [2] 1.33
  [3] 1.34
 > 3
SyntaxHighlight_GeSHi successfully upgraded to 2.0
Scribunto successfully upgraded
PdfHandler successfully upgraded
MultimediaViewer successfully upgraded
TextExtracts successfully upgraded
Renameuser successfully upgraded
ReplaceText successfully upgraded to 1.4.1
ImageMap successfully upgraded
LocalisationUpdate successfully upgraded to 1.4.0
OATHAuth successfully upgraded to 0.4.4
InputBox successfully upgraded to 0.3.0
ConfirmEdit successfully upgraded to 1.6.0
Nuke successfully upgraded to 1.3.0
CodeEditor successfully upgraded
Gadgets successfully upgraded
WikiEditor successfully upgraded to 0.5.2
ParserFunctions successfully upgraded to 1.6.0
TitleBlacklist successfully upgraded to 1.5.0
Interwiki successfully upgraded to 3.2
PageImages successfully upgraded
CiteThisPage successfully upgraded
Poem successfully upgraded
CategoryTree successfully upgraded
SpamBlacklist successfully upgraded
Cite successfully upgraded to 1.0.0
In UpgradeTask.php line 156:
                                                                                                                  
  file_get_contents(/var/www/wiki/skins/Vector/extension.json): failed to open stream: No such file or directory  
                                                                                                                  
exec:update
Null ever (talk) 06:51, 13 February 2020 (UTC)
solved this problem by upgrading again Null ever (talk) 07:30, 13 February 2020 (UTC)
as an aside, this is the first time i have ever heard of mwextupgrader.phar. It sounds like a cool project. Bawolff (talk) 10:34, 13 February 2020 (UTC)
oh you can see this link MwExtUpgrader Null ever (talk) 12:53, 13 February 2020 (UTC)

Sudden changes in appearance

Before today, every clicked link was displayed in a purplish hue, clearly different from unclicked links. Now it's strikingly similar to an unclicked link. Is this the effects of a recent update? Checked all my preferences, but I haven't touched them in ages. Also the "Comapare selected revision" button is different for us who use the MonoBook skin. How do I change it back to how it was yesterday? Robbie SWE (talk) 10:49, 13 February 2020 (UTC)

@Robbie SWE: Hi, whatever unmentioned website you are referring to, you will have to ask the maintainers of that website if they changed anything since yesterday. :) Malyacko (talk) 13:03, 13 February 2020 (UTC)
I was referring to English Wiktionary and according to our message boards, no new changes have been implemented. 78.70.152.147 (talk) 14:00, 13 February 2020 (UTC)
If this is about MonoBook, see https://phabricator.wikimedia.org/diffusion/SMNB/history/master/ for its latest changes. Malyacko (talk) 10:31, 14 February 2020 (UTC)

Wiki moved to a new server

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


Hi everyone,

I had to move a Wiki (version 1.32.2) to another server and I wanted to also move to version 1.34.

I extracted the Wiki archive on the new server, copied LocalSettings.php, images and extensions folders and updated LocalSettings.php to reflect the DB settings on the new server. I then exported (with mysqldump) the old database and imported the new one with

new_db_name < db_name_dump.sql

after creating the new_db_name database.

I can access the URLs and the title of the page is recognized but there is no content. Wiki says this page does not exist, you can create it, etc.. If I visit the "all pages" special webpage, I can see all the titles of the pages of the old wiki so I presume that the copy of the database was successfull.

I also have the problem that I cannot login because Wiki says that the account creation is not possible because the account already exists.


Can someone please help me with these two problems?


Thanks in advance and have a great day. Angelo 495na (talk) 15:59, 13 February 2020 (UTC)

Did you run update.php on the new install? See Manual:Upgrading Ciencia Al Poder (talk) 18:36, 13 February 2020 (UTC)
Thanks! That was exactly what I had to do. You saved me a lot of time.
Thanks again Angelo 495na (talk) 19:31, 17 February 2020 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Installing MediaWiki via Bitnami for an offline personal wiki. Is it okay to set the domain to 127.0.0.1?

I'm trying to set up an offline, personal wiki for a project. No one needs to access it except myself. I've installed XAMPP and downloaded the Bitnami MediaWiki for XAMPP installer. I was going to leave the domain as '127.0.0.1' but noticed there's a warning in the installer to not set it as 'localhost'. I thought I'd double check, does that mean specifically not 'localhost' or not '127.0.0.1' as well? Apologies for the dumb question! I'm very much a luddite when it comes to networking matters. FlakyAdeptness (talk) 18:42, 13 February 2020 (UTC)

i think its because often people install on localhost and then try to access elsewhere and it doesnt work, maybe. I'm not sure what the warning is about but it should be fine to set to any of localhost, 127.0.0.1, ::1, etc Bawolff (talk) 19:27, 13 February 2020 (UTC)

Reporting that "(Cannot access the database)" though I can connect via terminal to mysql.

I believe this is not actually a connect issue, as I can see "title-invalid-e" and I can connect with the same credentials found in my LocalSettings.php file.

Any help would be much appreciated.

http://gwart.co.uk/

Sorry! This site is experiencing technical difficulties.

Try waiting a few minutes and reloading.

(Cannot access the database)

Backtrace:

#0 /var/www/gwart.co.uk/mediawiki/includes/libs/rdbms/loadbalancer/LoadBalancer.php(753): Wikimedia\Rdbms\LoadBalancer->reportConnectionError()
#1 /var/www/gwart.co.uk/mediawiki/includes/GlobalFunctions.php(2653): Wikimedia\Rdbms\LoadBalancer->getConnection(0, Array, false)
#2 /var/www/gwart.co.uk/mediawiki/includes/cache/localisation/LCStoreDB.php(54): wfGetDB(-1)
#3 /var/www/gwart.co.uk/mediawiki/includes/cache/localisation/LocalisationCache.php(410): LCStoreDB->get('en', 'deps')
#4 /var/www/gwart.co.uk/mediawiki/includes/cache/localisation/LocalisationCache.php(456): LocalisationCache->isExpired('en')
#5 /var/www/gwart.co.uk/mediawiki/includes/cache/localisation/LocalisationCache.php(375): LocalisationCache->initLanguage('en')
#6 /var/www/gwart.co.uk/mediawiki/includes/cache/localisation/LocalisationCache.php(294): LocalisationCache->loadSubitem('en', 'messages', 'title-invalid-e...')
#7 /var/www/gwart.co.uk/mediawiki/languages/Language.php(2640): LocalisationCache->getSubitem('en', 'messages', 'title-invalid-e...')
#8 /var/www/gwart.co.uk/mediawiki/includes/cache/MessageCache.php(984): Language->getMessage('title-invalid-e...')
#9 /var/www/gwart.co.uk/mediawiki/includes/cache/MessageCache.php(942): MessageCache->getMessageForLang(Object(LanguageEn), 'title-invalid-e...', false, Array)
#10 /var/www/gwart.co.uk/mediawiki/includes/cache/MessageCache.php(884): MessageCache->getMessageFromFallbackChain(Object(LanguageEn), 'title-invalid-e...', false)
#11 /var/www/gwart.co.uk/mediawiki/includes/Message.php(1312): MessageCache->get('title-invalid-e...', false, Object(LanguageEn))
#12 /var/www/gwart.co.uk/mediawiki/includes/Message.php(864): Message->fetchMessage()
#13 /var/www/gwart.co.uk/mediawiki/includes/Message.php(956): Message->toString('text')
#14 /var/www/gwart.co.uk/mediawiki/includes/title/MalformedTitleException.php(49): Message->text()
#15 /var/www/gwart.co.uk/mediawiki/includes/title/MediaWikiTitleCodec.php(297): MalformedTitleException->__construct('title-invalid-e...', '')
#16 /var/www/gwart.co.uk/mediawiki/includes/Title.php(3752): MediaWikiTitleCodec->splitTitleString('', 0)
#17 /var/www/gwart.co.uk/mediawiki/includes/Title.php(378): Title->secureAndSplit()
#18 /var/www/gwart.co.uk/mediawiki/includes/MediaWiki.php(83): Title::newFromURL('')
#19 /var/www/gwart.co.uk/mediawiki/includes/MediaWiki.php(140): MediaWiki->parseTitle()
#20 /var/www/gwart.co.uk/mediawiki/includes/MediaWiki.php(778): MediaWiki->getTitle()
#21 /var/www/gwart.co.uk/mediawiki/includes/MediaWiki.php(517): MediaWiki->main()
#22 /var/www/gwart.co.uk/mediawiki/index.php(42): MediaWiki->run()
#23 {main} Jamiehutber (talk) 21:34, 13 February 2020 (UTC)
it probably is one. Check your mysql is setup to use password based authentication Bawolff (talk) 01:30, 14 February 2020 (UTC)
Thanks very much @Bawolff for the reply!!
I am able to connect to the mysql with a pass in CLI.
So this means that I cannot connect to the db for some reason, which there is no end to why. Though I could previously without any problems.
But it is certainly not a username/password issue. Jamiehutber (talk) 08:42, 17 February 2020 (UTC)
> I am able to connect to the mysql with a pass in CLI.
Can you connect with the same username/password that MediaWiki is configured to use in LocalSettings.php ? Can you connect to the database when using the sql.php maintenance script from the command line?
Have you upgraded mysql recently? Have you upgraded php recently? Are you using SELinux or similar security tools that might block php from accessing the database (If so, check their logs)? Bawolff (talk) 09:29, 17 February 2020 (UTC)
Thanks again!!
> Can you connect with the same username/password that MediaWiki is configured to use in LocalSettings.php ?
I can connect with these details
> sql.php
[9c50504668796b7bedf5c5c9] [no req]   Wikimedia\Rdbms\DBConnectionError from line 1195 of /var/www/gwart.co.uk/mediawiki/includes/libs/rdbms/loadbalancer/LoadBalancer.php: Cannot access the database: Unknown error (mysql)
Backtrace:
#0 /var/www/gwart.co.uk/mediawiki/includes/libs/rdbms/loadbalancer/LoadBalancer.php(753): Wikimedia\Rdbms\LoadBalancer->reportConnectionError()
#1 /var/www/gwart.co.uk/mediawiki/maintenance/sql.php(85): Wikimedia\Rdbms\LoadBalancer->getConnection(integer, array, boolean)
#2 /var/www/gwart.co.uk/mediawiki/maintenance/doMaintenance.php(94): MwSql->execute()
#3 /var/www/gwart.co.uk/mediawiki/maintenance/sql.php(205): require_once(string)
#4 {main}
Which is clearly a connection issue as you say.
> Have you upgraded mysql recently? Have you upgraded php recently?
Very good question, I do believe I downgraded my php version from 7.4 to 7.0.
> Are you using SELinux or similar security tools that might block php from accessing the database (If so, check their logs)?
I have other sites on the same server that is connecting to the DB. Which adds to my confusion. Jamiehutber (talk) 12:17, 17 February 2020 (UTC)
Any other thoughts :) I would love to fix this. Thanks still for all the help you've given me Jamiehutber (talk) 09:55, 28 February 2020 (UTC)
I wonder if there is any way to restore to an earlier time directly in the DB? Jamiehutber (talk) 15:29, 6 March 2020 (UTC)
Could it be as simple as a DB issue, though I am certain I have fixed this now.

Jamiehutber (talk) 23:16, 10 March 2020 (UTC)
Its an error connecting to the DB, so its probably not an issue in regards to the content of your database. It may be an issue with the administration of your db (Like what processes it accepts connections from and other user rights things) or it may be a problem on the php side. Bawolff (talk) 02:19, 11 March 2020 (UTC)
I had this error after upgrading.
What i found out was that the line
$wgDBport           = "5432";
in LocalSettings.php that appeared under the heading
# Postgres specific settings
in the updated version, is no longer a Postgres specific settings and applies to MySQL as well, so after upgrading mediawiki tried to access MySQL on the Postgres port and failed.
Commenting out the "Postgres specific settings", made the MySQL connection work. 130.238.68.12 (talk) 07:23, 10 September 2021 (UTC)
For anyone else that comes across this error. For me it was selinux.
- If your website is saying "(Cannot access the database)"
- You CAN connect to mysql like: mysql -u [username] -p -h [host] [database]
- If you CAN run: php maintenance/sql.php --query "SELECT user_name from user;"
Then it might be selinux.
To check: getenforce
- May return "Enforcing"
You may need to tess selinux to allow http to connect to a database. to do so:
- setsebool -P httpd_can_network_connect 1
- setsebool -P httpd_can_network_connect_db 1 128.231.234.80 (talk) 21:24, 13 July 2023 (UTC)
err, tell. 128.231.234.80 (talk) 21:25, 13 July 2023 (UTC)

Gadget not working

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


Hi. I wrote a gadget here, but the script does nothing, not even adding the main object to mw. The code works if I paste directly on the browser console, and I also removed all deprecated functions listed on ResourceLoader/Migration guide (users), so I don't know what another thing can I do. I'm using MediaWiki 1.29.2. Thanks for the help. --Tinker Bell 05:01, 14 February 2020 (UTC)

On an unrelated note, 1.29.x is an old version unsupported since middle of 2018, so that website (and data of its users) is insecure.
You could add some debugging and use your web browser's developer tools. Malyacko (talk) 10:23, 14 February 2020 (UTC)
I know 1.29 is already obsolete, I don't have access to the server. The developer tools' console doesn't show any error, so I don't know what's wrong. --Tinker Bell 02:44, 15 February 2020 (UTC)
Does any error show in the error console? You can also try with debug=true in the URL.
Also, there's a missing semicolon (try pasting the code to https://jshint.com/ ), that may be an issue when the code is minimized Ciencia Al Poder (talk) 10:38, 14 February 2020 (UTC)
I wrote the missing semicolon, and I checked the code on that page. The console simply doesn't show any error, even with debug=true. The same code works if I put it in MediaWiki:Common.js, so I'm sure it isn't a syntax problem. --Tinker Bell 02:53, 15 February 2020 (UTC)
Looking at https://es.vikidia.org/wiki/MediaWiki:Gadgets-definition
It's definition says type=styles, which is wrong since you're trying to run JavaScript... Ciencia Al Poder (talk) 14:30, 15 February 2020 (UTC)
Mmm, I didn't realized of that. Now it works. Thanks. --Tinker Bell 20:08, 15 February 2020 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Got error when I try to edit

Hi!

I use the docker installation of MediaWiki 1.34 with MariaDB:latest. When I try to edit Pages I got the following Error Message:

[7d5eb5390247cf7c07dfa756] /index.php?title=Startseite&action=edit Wikimedia\Rdbms\DBReadOnlyRoleError from line 1195 of /var/www/html/includes/libs/rdbms/database/Database.php: Cannot write; target role is DB_REPLICA

Backtrace:

#0 /var/www/html/includes/libs/rdbms/database/Database.php(1148): Wikimedia\Rdbms\Database->executeQuery(string, string, integer)
#1 /var/www/html/includes/libs/rdbms/database/DBConnRef.php(68): Wikimedia\Rdbms\Database->query(string, string, integer)
#2 /var/www/html/includes/libs/rdbms/database/DBConnRef.php(292): Wikimedia\Rdbms\DBConnRef->__call(string, array)
#3 /var/www/html/extensions/SelectCategory/SelectCategory_body.php(190): Wikimedia\Rdbms\DBConnRef->query(string, string)
#4 /var/www/html/extensions/SelectCategory/SelectCategory_body.php(31): SelectCategory::getAllCategories(integer)
#5 /var/www/html/includes/Hooks.php(174): SelectCategory::showHook(boolean, EditPage, OutputPage)
#6 /var/www/html/includes/Hooks.php(202): Hooks::callHook(string, array, array, NULL)
#7 /var/www/html/includes/EditPage.php(2818): Hooks::run(string, array)
#8 /var/www/html/includes/EditPage.php(703): EditPage->showEditForm()
#9 /var/www/html/includes/actions/EditAction.php(55): EditPage->edit()
#10 /var/www/html/includes/MediaWiki.php(511): EditAction->show()
#11 /var/www/html/includes/MediaWiki.php(302): MediaWiki->performAction(Article, Title)
#12 /var/www/html/includes/MediaWiki.php(900): MediaWiki->performRequest()
#13 /var/www/html/includes/MediaWiki.php(527): MediaWiki->main()
#14 /var/www/html/index.php(44): MediaWiki->run()
#15 {main}

I can also use the Visual Editor which works fine. The MobileEditor of MinervaNeue works, too. Only the WikiEditor did not work.

Couldn't find anything about that error in the web, so hopefully someone could tell me what's wrong. I don't have a Master Slave MariaDB running, it's just a single instance.


Please help me :-)


cheers,

Andreas 37.209.65.246 (talk) 12:51, 14 February 2020 (UTC)

SelectCategory extension is broken (making write queries to a read only db handle,) Bawolff (talk) 14:53, 14 February 2020 (UTC)
Thank you for the hint! Yes, the extension SelectCategory in Branch Version 1_34 does not work. I now use the master branch and everything ist fine :-)
THANK you so much!
regards,
Andreas 37.209.65.246 (talk) 15:24, 14 February 2020 (UTC)

Undefined index: REQUEST_TIME_FLOAT in ...\wiki\includes\WebStart.php

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


After installing Semantic MW, I get the error message "Undefined index: REQUEST_TIME_FLOAT in ... \wiki\includes\WebStart.php on line 42


The line indicated reads:

  /**
  * @var float Request start time as fractional seconds since epoch
  * @deprecated since 1.25; use $_SERVER['REQUEST_TIME_FLOAT'] or
  *   WebRequest::getElapsedTime() instead.
  */
  $wgRequestTime = $_SERVER['REQUEST_TIME_FLOAT'];

What is the way to solve this? There are two more units using this index (WegRequest and Timing), but both first test it with isset(). Should I change this line similarly? Or should I defer it as suggested in the comment to WebRequest (but then, what is the correct syntax in php?). Or is the solution not to be sought in code?

thanks Wimw (talk) 13:26, 14 February 2020 (UTC)

replacing that code with
isset( $_SERVER['REQUEST_TIME_FLOAT'] ) ? $_SERVER['REQUEST_TIME_FLOAT'] : microtime( true );
(copied from WebRequest) solved this issue. Wimw (talk) 19:43, 14 February 2020 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Database error after moving to a new server

Hi there,

I recently moved to my wiki to a new server, everything looks good(accessing, browsing and etc.) until I tried to make some modifications on the page, I got database query error


[XkHQiKhUqHERY0V-7PCKAAAAAAw] /wiki/index.php?title=Runs&action=submit DBQueryError from line 1054 of /var/www/html/wiki/includes/libs/rdbms/database/Database.php: A database query error has occurred. Did you forget to run your application's database schema updater after upgrading?

Query: INSERT INTO text (old_id,old_text,old_flags) VALUES (NULL,'{| class = "wikitable sortable" width="700"

#Blablabal....

|}','utf-8')

Function: Revision::insertOn/single-row

Error: 8 attempt to write a readonly database

Backtrace:

#0 /var/www/html/wiki/includes/libs/rdbms/database/Database.php(912): Database->reportQueryError(string, integer, string, string, boolean)

#1 /var/www/html/wiki/includes/libs/rdbms/database/Database.php(1498): Database->query(string, string)

#2 /var/www/html/wiki/includes/libs/rdbms/database/DatabaseSqlite.php(616): Database->insert(string, array, string, string)

#3 /var/www/html/wiki/includes/Revision.php(1441): DatabaseSqlite->insert(string, array, string)

#4 /var/www/html/wiki/includes/page/WikiPage.php(1832): Revision->insertOn(DatabaseSqlite)

#5 /var/www/html/wiki/includes/page/WikiPage.php(1735): WikiPage->doModify(WikitextContent, integer, User, string, array)

#6 /var/www/html/wiki/includes/EditPage.php(2141): WikiPage->doEditContent(WikitextContent, string, integer, boolean, User, string, array)

#7 /var/www/html/wiki/includes/EditPage.php(1467): EditPage->internalAttemptSave(array, boolean)

#8 /var/www/html/wiki/includes/EditPage.php(612): EditPage->attemptSave(array)

#9 /var/www/html/wiki/includes/actions/EditAction.php(59): EditPage->edit()

#10 /var/www/html/wiki/includes/actions/SubmitAction.php(38): EditAction->show()

#11 /var/www/html/wiki/includes/MediaWiki.php(495): SubmitAction->show()

#12 /var/www/html/wiki/includes/MediaWiki.php(289): MediaWiki->performAction(Article, Title)

#13 /var/www/html/wiki/includes/MediaWiki.php(851): MediaWiki->performRequest()

#14 /var/www/html/wiki/includes/MediaWiki.php(512): MediaWiki->main()

#15 /var/www/html/wiki/index.php(43): MediaWiki->run()

#16 {main}


Here are the things I tried:

1) ran the update.php

2) check the permission of the database folder and file, all apache and have the write permissions. I'm using CentOS.

3) Check the database file, I used sqlite, no username or password required.


Please help.

Thanks.

V Vincent2587 (talk) 15:46, 14 February 2020 (UTC)

How to change ID tag in TOC (Error when use Unicode)

Hi all,

My website is showing TOC errors specifically as follows:

This is TOC of the site vi.wikipedia.org (https://vi.wikipedia.org/wiki/Đàm_Vĩnh_Hưng)
<a href="&lt;nowiki&gt;<nowiki>'''#Sự_nghiệp_âm_nhạc'''</nowiki>&lt;/nowiki&gt;">2 Sự nghiệp âm nhạc</a>
Screenshot:
[4]https://prnt.sc/r2g0in
[5]https://prnt.sc/r2g0kl

This is TOC of my site:
<a href="&lt;nowiki&gt;<nowiki>'''#Ti.E1.BB.83u_s.E1.BB.AD'''</nowiki>&lt;/nowiki&gt;">1 Tiểu sử</a>
Screenshot:
[6]https://prnt.sc/r2g0h6
[7]https://prnt.sc/r2g0ex

Please guide me to fix this for a more friendly ID when using Unicode.

Thanks!!! Xuanthucit (talk) 18:34, 14 February 2020 (UTC)

Set the following in LocalSettings.php:
$wgFragmentMode = [ 'html5', 'legacy' ];
Honestly, I'm actually surprised this isn't the default.
See manual:$wgFragmentMode for more details. Bawolff (talk) 23:17, 14 February 2020 (UTC)
Thank you so much!!! 14.169.58.218 (talk) 02:57, 15 February 2020 (UTC)

Error suggesting search results with accents (UTF-8)

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


Hi All,

My site is having problems with search suggestions.

When searching with accents:
[8]https://prnt.sc/r2larq

When searching unsigned
[9]https://prnt.sc/r2latq

Please help me!
Thanks!!! Xuanthucit (talk) 04:28, 15 February 2020 (UTC)

I guess accent folding is part of extension:CirrusSearch and not the default search engine. Bawolff (talk) 10:26, 15 February 2020 (UTC)
I guess this could also be a feature request for the TitleKey extension. Indeed, alternatively one would have to look into CirrusSearch. [[kgh]] (talk) 12:07, 15 February 2020 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Issues on wiki farm with logging into wikis using a shared database

After upgrading from 1.31 to 1.34 it is no longer possible to automatically log into sister wikis using user tables.

Error message when trying to log in: Auto-creation of a local account failed: Username entered already in use. Please choose a different name.

$wgSharedDB = 'mywiki';
$wgSharedPrefix = 'prefix_';
$wgSharedTables = [
	'user',
	'user_groups',
	'interwiki',
	'ipblocks'
];
$wgCookieDomain = '.example.org';
$wgMainCacheType = CACHE_NONE;
$wgSessionCacheType = CACHE_DB;

$wgGroupPermissions['*']['autocreateaccount'] = true; // I added this and truncated the object cache table afterwards. In 1.31 it worked without it.


I have no clue how to go about it. Setting $wgSessionCacheType or not does not make a difference. Hoping for advice. 91.65.183.96 (talk) 09:46, 15 February 2020 (UTC)

I cannot edit my previous post. The software appears to be broken. I wanted to write "After upgrading from 1.31 to 1.34 it is no longer possible to automatically log into sister wikis using a shared user table." instead of "After upgrading from 1.31 to 1.34 it is no longer possible to automatically log into sister wikis using user tables." 91.65.183.96 (talk) 09:49, 15 February 2020 (UTC)
Hello, in order to edit your previous post you need to create and use an account.
Here is the relevant part of our wiki family CommonSettings.php, that works as it is expected with MW 1.33 and now with 1.34 - note you need to check the option 'Keep me logged in' on the page 'Special:UserLogin':
<?php
$wgMainCacheType = CACHE_ACCEL;
$wgMainStash = CACHE_ACCEL;
$wgSessionCacheType = CACHE_ACCEL;
$wgParserCacheType = CACHE_ACCEL;  // optional
$wgMessageCacheType = CACHE_ACCEL; // optional
$wgUseGzip = true;
$wgUseGzip = true;
wfLoadExtension( 'Interwiki' );
$wgEnableScaryTranscluding = true;
//$wgInterwikiViewOnly = true;
$wgGroupPermissions['sysop']['interwiki'] = true;
$wgInterwikiCentralDB = 'example_commons';
$wgInterwikiMagic = true;
$wgHideInterlanguageLinks = false;
$wgSharedDB = 'example_commons'; // wiki database holding the main user table
//$wgSharedPrefix = 'm_';        // Currently we do not use prefix!
$wgSharedTables[] = 'user';      // I think we do not need that table
$wgSharedTables[] = 'ipblocks';
$wgSharedTables[] = 'user_groups';
$wgSharedTables[] = 'interwiki';
$wgSharedTables[] = 'user_properties';
// Login in all wikis at once; our wikis:
//   bg.example.org, ru.example.org, en.example.org, commons.example.org
// Note you need to check the option 'Keep me logged in'
//   on the page 'Special:UserLogin'.
// After some change is made here, restart the web server
//   and completely flush the browser's cache
$wgCookieDomain = '.example.org';
//$wgCookieSecure = false;

Spas.Z.Spasov (talk) 16:01, 16 February 2020 (UTC)
Thanks a lot for your reply. I am afraid that it did not help me. I still have the same issue. Moreover I have to do
$wgSessionCacheType = CACHE_DB;
because otherwise I cannot even log in to the main wiki. The other two differences between your setup and mine was setting
$wgMainStash = CACHE_ACCEL;
which I have done now and adding the 'user_properties' table to the array of shared tables. I conclude that MediaWiki is not up for the job in a stable manner which is a bit disappointing. Still wonder why it worked in MediaWiki 1.31 91.65.183.96 (talk) 11:32, 18 February 2020 (UTC)
Hmm, now that the users are on the wiki the login to all wikis work, at least for existing users. The question is wether this is only an issue for me and me and the clients I use to access the site or because I use a newly created account. 91.65.183.96 (talk) 10:10, 26 February 2020 (UTC)
Ooo i like the idea of wiki but things must change 41.114.198.251 (talk) 15:24, 26 February 2020 (UTC)

Change of Home wiki

Hi there! According to this page it says that my Home wiki is nl.wiki. I haven't participated in editing there since 2007 while contributing 70k of edits to other wikis, notably en.wiki. Would it possible to change my Home wiki to en.wiki? Gidonb (talk) 18:15, 15 February 2020 (UTC)

@Gidonb Hi, which problem would be solved if your home wiki was changed? Malyacko (talk) 18:25, 15 February 2020 (UTC)
Hi @Malyacko. The problem is my freedom to set my own home at Wikipedia! I have asked for this about 10 years ago (really rough estimate) but the change wasn't possible at that time. I ran into this very historic affiliation again so decided to try once more. Wikipedia has come a long way in the meantime. Can you do this now? Gidonb (talk) 18:30, 15 February 2020 (UTC)
Sorry, no. "Home" wikis are pretty meaningless, but you can't change it. Bawolff (talk) 01:52, 16 February 2020 (UTC)

Translation of pages

How to translate this page Extension:StringFunctions on russian lang. ? (redirect) LllKSTlll (talk) 21:23, 15 February 2020 (UTC)

Looks like this page is not marked for translation and it still uses the old system. @Shirayuki: can you help to migrate the page translation system to use Special:Translate? Ainz Ooal Gown (talk) 23:11, 15 February 2020 (UTC)
The page says "This extension is obsolete." No need to migrate. Shirayuki (talk) 23:17, 15 February 2020 (UTC)
This extension is obsolete only for Wikimedia projects. But functions #len: #pos: #rpos: #sub: #replace: #explode: are used in many wikiprojects based on the MediaWiki engine. I participate in wikiprojects http://cyclowiki.org and http://wikireality.ru, and I write templates for these wikis. Therefore, translation of the article is required as this material continues to be used. LllKSTlll (talk) 00:16, 16 February 2020 (UTC)
Those functions are provided by Extension:ParserFunctions . See phab:diffusion/EPFN/browse/master/includes/Hooks.php$45. Shirayuki (talk) 00:30, 16 February 2020 (UTC)
The page Help:Extension:ParserFunctions does not contain a description and reference information about this functions: #len: #pos: #rpos: #sub: #replace: #explode:
Maybe information about these functions needs to be transferred from the article Extension:StringFunctions to the article Help:Extension:ParserFunctions to create translations into other languages? LllKSTlll (talk) 01:01, 16 February 2020 (UTC)
I wish I could have read your reply sooner. By that time, I already prepared this page for translation. Should I revert my edits? Ainz Ooal Gown (talk) 23:20, 15 February 2020 (UTC)
I think so. The page contains wrong markup. Shirayuki (talk) 23:37, 15 February 2020 (UTC)

Lost access to EDIT pages

Hi,

For some reason I've lost admin access and can not edit pages.

The edit link on top of pages is gone, and access to Special:SpecialPages gives me: You have requested an invalid special page.

Can anyone let me know where I can start looking for the problem? I have access to the server files and database. I think the version is 1.24.2

Thanks.

EDIT: I checked the database, and in the user_groups, my ug_user is listed as both 'sysop' and 'user' in two different rows. BubbaUsesWiki (talk) 09:39, 16 February 2020 (UTC)

if you go to special:preferences, under member of group, does it list you as an admin?
If you go directly to the edit page (adding either ?action=edit or &action=edit to the end of the url) what error do you get? Bawolff (talk) 23:59, 16 February 2020 (UTC)
Hi
Thanks for your response!
1) "special:preferences" brings me to a login page. But the Wiki is an addon/extension of a gaming website, so all usernames and passwords are created through the game's signup page, not through MediaWiki. I'm sorry, but I don't know the exactly how that technically works.
I could investigate that further, but the database lists the passwords a "BLOB"
2) "?action=edit" brings up the response:
You do not have permission to edit this page, for the following reason:
The action you have requested is limited to users in one of the groups: Administrators, contributor.
You can view and copy the source of this page:
[the the source code is listed below]
3) Should I try and create a row, or change my user_groups from 'sysop' and 'user' to something else?
Thanks. BubbaUsesWiki (talk) 00:59, 17 February 2020 (UTC)
Well if you're not logged in then it doesn't matter whether the user you are is an administrator. It sounds like your single signon system broke somehow. Bawolff (talk) 02:11, 17 February 2020 (UTC)
Thanks!
I used the special:preferences link you mention, and I reset my password, which for some reason was blank. And now the EDIT link appears!
So at least that part is a success.
Now I have to follow that path and see why my password was blank to begin with. You might be right about the single signon system. But if there is a workaround, then that is a great step forward.
Thanks for the lead. BubbaUsesWiki (talk) 02:22, 17 February 2020 (UTC)
if logins are handled externally, than a blank password is the norm since that password field isnt used but the external system (blank means no valid password not literally empty string is the password) Bawolff (talk) 07:38, 17 February 2020 (UTC)

Globales Benutzerkonto abstellen

Ich habe ein Benutzerkonto für www.mediawiki.org. Ich habe ein anderes Benutzerkonto für die deutsche Wikipedia. Das soll auch so bleiben. Durch das "globale Benutzerkonto" wird aber mein Anmeldestatus automatisch auf x andere Wikis übertragen, auch auf solche, an denen ich nicht mitarbeiten möchte. Wie kann ich das abstellen, bitte? AnonymusGdpr (talk) 09:10, 17 February 2020 (UTC)

Which underlying problem would be solved if you were not logged in on other Wikimedia websites? Malyacko (talk) 09:56, 17 February 2020 (UTC)
This is sadly enough an answer typical for the mindsetting of common internet "help panels". There is a user having a peculiar topic, asking a question of how to solve a (in his eyes) nuisance. Now, someone who does not agree and personally thinks of the topic being a nice feature, gives his "helpful answer" by presenting his one-and-only-opinion, masked as a question.
Please note:
  1. I do have different user accounts in different wikis.
  2. I do want to keep them different.
  3. At the moment, it is not possible to keep them different because of a "feature" I did not ask for.
  4. What I asked for, is there a possibility to switch the feature off.
  5. If you do not have an answer, step back and give way for someone willing and being able to help. AnonymusGdpr (talk) 10:10, 17 February 2020 (UTC)
I have no idea where I did not "not agree". Feel free to read my comment again. You asked a question. I asked which underlying problem you want to solve. See https://meta.stackexchange.com/questions/66377/what-is-the-xy-problem#answer-66378 why I asked you to clarify. Malyacko (talk) 13:32, 17 February 2020 (UTC)
If you prefer, we could just say "no" and leave it at that.
There are two reasons why Malyacko is asking. A) We are not just the people providing support for the software, we are also the people who write the software. If you have a good enough reason, we might change the software. As it stands, what you want is not available because it would make things complicated. If there was a good reason that outweighed that, maybe we would add support for what you are asking about [In theory. In this particular situation its pretty unlikely]. B) Most people don't actually want a specific technical solution. They want their problem solved. Understanding what the problem is can help us suggest alternative solutions, that might fix the the underlying problem just as well. Even if the alternative solutions don't fix the problem, they might get you half-way there which might be better than nothing. For this question, I would say alternative solution might be something like https://addons.mozilla.org/en-CA/firefox/addon/multi-account-containers/ Bawolff (talk) 12:48, 17 February 2020 (UTC)
I do not want anyone to change the software. I have been explaining the problem as exactly as necessary and if the answer is "no, the software can't" then it is disappointing, but that'd be a clear answer I will of course accept. Everything else is just a waste of time, your time just as well as mine.
Posting a link like "look what idiots some users are" is exactly as impolite as I am regarding Malyackos question to be. AnonymusGdpr (talk) 13:55, 17 February 2020 (UTC)

How to migrate MediaWiki from ver 1.17 to 1.31.6 (LTS)

Hi.

I migrated MediaWiki from ver 1.17 to 1.31.6 (LTS).

From Linux Debian 8 to Linux Debian 10.

From MySQL DB to MariaDB.


The following method of exporting data from MediaWiki was developed by our team?

Is this approach correct? Is it still valid for MediaWiki 1.31.6?


Export pages

cd $WIKI_DIR

php maintenance/dumpBackup.php --current > /tmp/pages_dump.xml


Export images

mkdir /tmp/images_dump

cd $WIKI_DIR

cp `php maintenance/dumpUploads.php | sed -E 's#.*local-public/(.*)#images/\1#' | xargs` /tmp/images_dump/

cd /tmp

tar czvf /tmp/wiki_images.tgz images_dump/*


Copy file 'pages_dump.xml' and 'wiki_images.tgz' to server target to directory '/tmp'.


On the server-target, the new instanace of MediaWiki.


Import pages

cd $WIKI_DIR

php maintenance/importDump.php /tmp/pages_dump.xml

php maintenance/rebuildrecentchanges.php


Import images

cd /tmp

tar xvf wiki_images.tgz

cd $WIKI_DIR

php maintenance/importImages.php /tmp/images_dump/

chown -R www-data images/

php maintenance/update.php


State of database on the new MediaWiki server

# mysql -u root

Server version: 10.3.22-MariaDB-0+deb10u1 Debian 10


MariaDB [(none)]> use csirtwikidb

MariaDB [csirtwikidb]> select img_name from csirt_image;

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

| img_name                                         |

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

| SSC4_score_form.png                              |

| SSC4_bonus_form.png                              |

| Kronos.jpg                                       |

| Green-planet.jpeg                                |

| Vulcan.jpg                                       |

| Bolarus.jpeg                                     |

| Erde.jpeg                                        |

| EGI-CSIRT-Logo-1-tdank.png                       |

| EGI-CSIRT-Logo-2-tdank.png                       |

| EGI-CSIRT-Logo-3-tdank.png                       |

| Adium.gif                                        |

| Flag_of_the_United_Federation_of_Planets.svg.png |

| GAIM-conference.png                              |

| SSC3_eval.png                                    |

| SSC4_eval.png                                    |

| Ssc-3-final-report.gif                           |

| Andoria.jpg                                      |

| CMS_SSC12_try1c.png                              |

| CVE-2016-1950.png                                |

| CVE-2015-7547.png                                |

| 2.png                                            |

| 4.png                                            |

| CMS_SSC12_try1a.png                              |

| 8.png                                            |

| CMS_SSC12_try1b.png                              |

| 6.png                                            |

| 7.png                                            |

| 5.png                                            |

| 3.png                                            |

| LaunchedInves.png                                |

| Ssc-ideas-28jan16.jpg                            |

| LaunchingInves2.png                              |

| 1.png                                            |

| IncCreated.png                                   |

| EditCFIR.png                                     |

| NewIR.png                                        |

| DisplayInc.png                                   |

| IncCreation.png                                  |

| IRAfterEdit.png                                  |

| Rt-ir_comm_chall_launch_invest.png               |

| LaunchInves.png                                  |

| RTIRataglance.png                                |

| Create.jpg                                       |

| Status.jpg                                       |

| Createfilled.jpg                                 |

| TakeIR.png                                       |

| Owner.jpg                                        |

| RTataglance.jpg                                  |

| Kampus.jpg                                       |

| EGI-CSIRT-F2FApril2013photo.JPG                  |

| EGI-IR-check-list.jpg                            |

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

51 rows in set (0.001 sec)


I expect to find theses images in directory $WIKI_DIR/images.

Problem to solve: None is these images are available in that directory.


Where is is the issue?

  - the method of exporting

  - the method of importing Pavche (talk) 14:04, 17 February 2020 (UTC)

Did maintenance/importImages.php report any success?
Anyway, exporting and importing from XML dump will cause it to loss a lot of internal metadata, like for example logs and user accounts. See Manual:Moving a wiki for other options. You can basically export your mysql database with mysqldump and import it to the new, copy the images folder, and do a normal upgrade on the new server Ciencia Al Poder (talk) 10:41, 18 February 2020 (UTC)

Art. 17 GDPR

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


As of Art. 17 GDPR, I kindly ask to completely delete my user account. I have never been agreeing to a data interchange between several other wikis, and I will not. If information about that data misuse is part of the small print, well, then it's been my fault. AnonymusGdpr (talk) 14:07, 17 February 2020 (UTC)

this form is not monitored by wikimedia foundation staff in their staff capacity. Please email privacy@wikimedia.org to make these kind of requests. Bawolff (talk) 21:33, 17 February 2020 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Can Semantic MW run in a different language?

Semantic MW is not the easiest concept to grasp. What it makes a lot harder even, is that over-active localizers have also translated the technical jargon. This makes it quite difficult to follow the documentation (not translated ;-)), and after importing the example pages (definitely not translated), in just a few hours trying the mess is complete. I am sorry to note this translation in particular has been badly done from a linguistic perspective too.

So I wonder: could I force SMW to remain English even though the wiki's language is not English?

Thanks Wimw (talk) 20:45, 17 February 2020 (UTC)

well you could delete the i18n file for your language (in most extensions that is in an i18n subdirectory and named langcode.json. important you dont delete english). Not sure i would reccomend that but it would work (note magic words like #ask and special page names are in a separate i18n file than the main one).
Also note you can change specific messages on a case by case basis in the mediawiki namespace (see qqx and the page Special:allmessages on your wiki) Bawolff (talk) 01:20, 18 February 2020 (UTC)
Thank you Bawolff, that sounds like a good tip that I will try later today. I had noted the second option you mention only after posting my question. If I knew exactly which terms to exclude from the translation that would have been a good one, but I am afraid they will turn up one by one. If removing the json file won't clear things up, I think I'd better switch to English for the entire installation. Wimw (talk) 11:40, 18 February 2020 (UTC)

Hi Everyone, I need help, I just installed Nuke extension and when i need delete in mass this appears, Thanks......

[11cceb0a4df1605266a8c64e] /index.php?title-Especial:Eliminar Borrado&action-delete Wikimedia-Rdbms-DBQueryError de la línea 1603 de /home/(user)/public_html/includes/libs/rdbms/database/Database.php: Se ha un error de base de datos de datos de datos de datos datos datos datos. ¿Olvidó el ejecutaron's database schema updater after upgrading?Query: DELETE FROM `mwxd_approved_revs` WHERE page_id = '199'

I censured many confidential information


Function: Wikimedia\Rdbms\Database::delete

Error: 1146 Table '(user)_mw19XXX.mwxd_approved_revs' doesn't exist (localhost)

Backtrace:

#0 /home/(user)/public_html/includes/libs/rdbms/database/Database.php(1574): Wikimedia-Rdbms-Database->getQueryExceptionAndLog(string, integer, string, string)

#1 /home/(user)/public_html/includes/libs/rdbms/database/Database.php(1152): Wikimedia-Rdbms-Database->reportQueryError(string, integer, string, string, boolean)

-2 /home/(user)/public_html/includes/libs/rdbms/database/Database.php(3027): Wikimedia-Rdbms-Database->query(string, string)

.3 /home//public_html/includes/libs/rdbms/database/DBConnRef.php(68): Wikimedia-Rdbms-Database->delete(string, string)

#4 /home/(user)/public_html/includes/libs/rdbms/database/DBConnRef.php(512): Wikimedia\Rdbms\DBConnRef->__call(string, array)

#5 /home/(user)/public_html/extensions/ApprovedRevs/includes/ApprovedRevs_body.php(519): Wikimedia\Rdbms\DBConnRef->delete(string, array)

#6 /home/(user)/public_html/extensions/ApprovedRevs/includes/ApprovedRevs.hooks.php(750): ApprovedRevs::deleteRevisionApproval(Title)

#7 /home/(user)/public_html/includes/Hooks.php(174): ApprovedRevsHooks::deleteRevisionApproval(WikiPage, User, string, integer, WikitextContent, ManualLogEntry, integer)

#8 /home/(user)/public_html/includes/Hooks.php(202): Hooks::callHook(string, array, array, NULL)

#9 /home/(user)/public_html/includes/page/WikiPage.php(2820): Hooks::run(string, array)

#10 /home/(user)/public_html/includes/page/WikiPage.php(2663): WikiPage->doDeleteArticleBatched(string, boolean, User, array, string, boolean)

#11 /home/(user)/public_html/includes/page/WikiPage.php(2608): WikiPage->doDeleteArticleReal(string, boolean, NULL, NULL, string, User, array, string, boolean)

#12 /home/(user)/public_html/includes/page/Article.php(2878): WikiPage->doDeleteArticle(string, boolean, NULL, NULL, string, NULL, boolean)

#13 /home/(user)/public_html/extensions/Nuke/includes/SpecialNuke.php(352): Article->doDeleteArticle(string)

#14 /home/(user)/public_html/extensions/Nuke/includes/SpecialNuke.php(57): SpecialNuke->doDelete(array, string)

#15 /home/(user)/public_html/includes/specialpage/SpecialPage.php(575): SpecialNuke->execute(NULL)

#16 /home/(user)/public_html/includes/specialpage/SpecialPageFactory.php(611): SpecialPage->run(NULL)

#17 /home/(user)/public_html/includes/MediaWiki.php(296): MediaWiki\Special\SpecialPageFactory->executePath(Title, RequestContext)

#18 /home/(user)/public_html/includes/MediaWiki.php(900): MediaWiki->performRequest()

#19 /home/(user)/public_html/includes/MediaWiki.php(527): MediaWiki->main()

#20 /home/(user)/public_html/index.php(44): MediaWiki->run()

#21 {main}

[11cceb0a4df1605266a8c64e] /index.php?title-Especial:Eliminar Borrado&action-delete Wikimedia-Rdbms-DBQueryError de la línea 1603 de /home/(user)/public_html/includes/libs/rdbms/database/Database.php: Se ha un error de base de datos de datos de datos de datos datos datos datos. ¿Olvidó el ejecutaron's database schema updater after upgrading?

Query: DELETE FROM `mwxd_approved_revs` WHERE page_id = '199'

Function: Wikimedia\Rdbms\Database::delete

Error: 1146 Table '(user)_mw19XXX.mwxd_approved_revs' doesn't exist (localhost)

Backtrace:

#0 /home/(user)/public_html/includes/libs/rdbms/database/Database.php(1574): Wikimedia-Rdbms-Database->getQueryExceptionAndLog(string, integer, string, string)

#1 /home/(user)/public_html/includes/libs/rdbms/database/Database.php(1152): Wikimedia-Rdbms-Database->reportQueryError(string, integer, string, string, boolean)

-2 /home/(user)/public_html/includes/libs/rdbms/database/Database.php(3027): Wikimedia-Rdbms-Database->query(string, string)

.3 /home//public_html/includes/libs/rdbms/database/DBConnRef.php(68): Wikimedia-Rdbms-Database->delete(string, string)

#4 /home/(user)/public_html/includes/libs/rdbms/database/DBConnRef.php(512): Wikimedia\Rdbms\DBConnRef->__call(string, array)

#5 /home/(user)/public_html/extensions/ApprovedRevs/includes/ApprovedRevs_body.php(519): Wikimedia\Rdbms\DBConnRef->delete(string, array)

#6 /home/(user)/public_html/extensions/ApprovedRevs/includes/ApprovedRevs.hooks.php(750): ApprovedRevs::deleteRevisionApproval(Title)

#7 /home/(user)/public_html/includes/Hooks.php(174): ApprovedRevsHooks::deleteRevisionApproval(WikiPage, User, string, integer, WikitextContent, ManualLogEntry, integer)

#8 /home/(user)/public_html/includes/Hooks.php(202): Hooks::callHook(string, array, array, NULL)

#9 /home/(user)/public_html/includes/page/WikiPage.php(2820): Hooks::run(string, array)

#10 /home/(user)/public_html/includes/page/WikiPage.php(2663): WikiPage->doDeleteArticleBatched(string, boolean, User, array, string, boolean)

#11 /home/(user)/public_html/includes/page/WikiPage.php(2608): WikiPage->doDeleteArticleReal(string, boolean, NULL, NULL, string, User, array, string, boolean)

#12 /home/(user)/public_html/includes/page/Article.php(2878): WikiPage->doDeleteArticle(string, boolean, NULL, NULL, string, NULL, boolean)

#13 /home/(user)/public_html/extensions/Nuke/includes/SpecialNuke.php(352): Article->doDeleteArticle(string)

#14 /home/(user)/public_html/extensions/Nuke/includes/SpecialNuke.php(57): SpecialNuke->doDelete(array, string)

#15 /home/(user)/public_html/includes/specialpage/SpecialPage.php(575): SpecialNuke->execute(NULL)

#16 /home/(user)/public_html/includes/specialpage/SpecialPageFactory.php(611): SpecialPage->run(NULL)

#17 /home/(user)/public_html/includes/MediaWiki.php(296): MediaWiki\Special\SpecialPageFactory->executePath(Title, RequestContext)

#18 /home/(user)/public_html/includes/MediaWiki.php(900): MediaWiki->performRequest()

#19 /home/(user)/public_html/includes/MediaWiki.php(527): MediaWiki->main()

#20 /home/(user)/public_html/index.php(44): MediaWiki->run()

#21 {main}


SamiWey (talk) 22:58, 17 February 2020 (UTC)

mi wiki is attached of very spam, reply fast (if someone can) i need delete the explicit content SamiWey (talk) 23:03, 17 February 2020 (UTC)
do you have the approvedrevs extension installed? It seems like some sort of problem with how that extension combines with the nuke extension (or if you installed approvedrevs recently maybe you just need to run update.php Bawolff (talk) 23:06, 17 February 2020 (UTC)
p.s. if you need more realtime help try the #mediawiki irc channel on freenode. Bawolff (talk) 23:06, 17 February 2020 (UTC)
that disappointed, I was banned from the group for just writing my mistake in the group!

SamiWey (talk) 23:35, 17 February 2020 (UTC)
i'm not sure what you mean. Where were you banned from? Bawolff (talk) 01:06, 18 February 2020 (UTC)
oh i see, it triggered filter 44 and 43. They are automated spam filters. Sorry about that. Looks like it saw the git hash and thought that was keyboard mashing. Its probably not great that we are basically banning people from posting stack traces as spam on a support forum Bawolff (talk) 01:16, 18 February 2020 (UTC)
Bro, i use approvedrevs extension, I have no idea how to run update.php, Is it just creating the file? I have a shared hosting and mediawiki 1.34.0 SamiWey (talk) 00:15, 18 February 2020 (UTC)
On shared hosting, you have to go to the mw-config subdirectory (e.g. if you have https://mywiki.com/w/index.php you would go to https://mywiki.com/w/mw-config ) and run the installer in upgrade mode. Note, if this was the issue i wouldnt expect approvedrevs to work at all, but its still a good thing to try as if its uneeded it wont hurt anything. Bawolff (talk) 01:09, 18 February 2020 (UTC)

403 forbidden

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


I have installed mediawiki on my centos server and the wiki folder is in /var/www/tesseractnet.org, but when trying to go to tesseractnet.org/wiki, i get 403 forbidden. Please help. 208.191.210.45 (talk) 03:50, 18 February 2020 (UTC)

check permissions on the directories. Use chmod to make sure apache can read
Your apache error log will prob tell you exactly why its a 403, but 90% chance its a permission error Bawolff (talk) 04:21, 18 February 2020 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Shared User Account Database with Non-Wiki Website

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


My website has a wiki which is private and requires an account to access. In addition, my website has other components beyond the wiki, all of which should require the user to be logged in.

I'd like to make it so one account is created per user and the user's one set of credentials provide access to the full site.

Is this possible? If so, how can I have a non-wiki page check if the user is logged in or not? Further, is it possible to have my own log in form which passes the credentials onto MediaWiki for verifying and logging in? Jer Hughes (talk) 07:14, 18 February 2020 (UTC)

yes, although requires some coding. See AuthManager Bawolff (talk) 07:27, 18 February 2020 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

false

I have tried to log in 15 times. I put in the word you are to copy,but it says l am always wrong.

My email address is ... clsterling2@gmail.com Thank You 192.235.227.254 (talk) 07:16, 18 February 2020 (UTC)

Nobody except for you know which website this is about so there is nothing to do. If this is about some website running on MediaWiki, use the "Forgot your password?" link. Malyacko (talk) 07:56, 18 February 2020 (UTC)

Mailing to all registered users

Could you please help me if there is a way to make mailing to all registered users? Can't see any extension that allows to do that. Fokebox (talk) 07:34, 18 February 2020 (UTC)

Extension:MassMessage might be the closest. (And you are free to query your database for email addresses, to then manually spam all users.) Malyacko (talk) 07:54, 18 February 2020 (UTC)
How can I get the list of emails from database not entering into it directly? Fokebox (talk) 08:27, 18 February 2020 (UTC)
You can't really (Although in theory their may exist extensions somewhere). The query though is pretty easy (SELECT user_name, user_email from user;) Bawolff (talk) 10:04, 18 February 2020 (UTC)
Could you please help to correct a query:
$result = mysql_query("SELECT user_name, user_email from user;",$db);
do{
    echo "Email: ".$myrow['user_email']."<br>";
}
while ($myrow = mysql_fetch_array($result));

Fokebox (talk) 10:22, 25 February 2020 (UTC)
Well for starters you want a while loop, not a do-while loop (or $myrow will be undefined in the first iteration).
If you have have wgDBPrefix setup, your user table might be named something else.
you may want to use a commandline mysql client. It may be simpler for you. Bawolff (talk) 14:37, 26 February 2020 (UTC)

Can't Log In

We created a new MediWiki site. It has one user at the moment.I tried to log in but failed so asked for a reset. I got the email and then was taken to the password reset page where I reset the password. I don#t know if I should be austologged in after setting the password, I wasn't.

I attemped to loggin using the new password. The login panel disappeared and I thought everything was fine. Except that

a) my name id not shown on the top right#

b) if I go to 'Edit' it gives me a 'not logged in message': https://www.screencast.com/t/2i5YqJGoLP4r


I have doen this three times now and cann't understand what is going on.


Any suggestions? Thank you........................................... liz


86.250.144.157 (talk) 14:54, 18 February 2020 (UTC)

I should have mentioned my user name has an embedded underscore 86.250.144.157 (talk) 14:56, 18 February 2020 (UTC)
We are on the latest version

86.250.144.157 (talk) 17:54, 18 February 2020 (UTC)
Likely your temporary directory is not writeable or something, so that session information cannot be stored.
Manual:How to debugTheDJ (Not WMF) (talkcontribs) 19:18, 18 February 2020 (UTC)
Thank you for your suggestion.This is our first wiki so we are beginners altho reasonably tech savvy. My question about your reply is this: would the original install not have naturally set the temp directory to writeble as a default? Or should we have done this as part pf the install? Lizat17 (talk) 09:53, 19 February 2020 (UTC)
afaik, newer versions of mediawiki don't use the temporary directory for sessions anymore. Non writeable temp directory was a common cause of log in issues on older versions of mediawiki.
Generally speaking mediawiki uses the system temp directory as its temp directory Bawolff (talk) 11:45, 19 February 2020 (UTC)
try setting $wgSesssionCacheType = CACHE_DB; (if that works it means that something is messed up with caching which can cause other problems so you should still try and figure out what) Bawolff (talk) 19:55, 18 February 2020 (UTC)
Hi Bawolf,
I have tried this, less one 's' - $wgSessionCacheType = CACHE_DB;, I hope that's correc. N luck. so the behaviour is still:
  1. log in, dialogue closes with no reported errors but no user name top right
  2. selecte Edit on the main page and there is a warning that I'm not logged in:https://www.screencast.com/t/0jeoUAyoJ
There is another reference to cache like this:
## Shared memory settings
$wgMainCacheType = CACHE_NONE;
$wgMemCachedServers = [];
And this is commented
## Set $wgCacheDirectory to a writable directory on the web server
## to make your wiki go slightly faster. The directory should not
## be publicly accessible from the web.
#$wgCacheDirectory = "$IP/cache";
I also looked at the tmp directorysas a previous reply suggested this. It is specified in the localsetting file as follows:
> $wgTmpDirectory = "/home/xxxxxx/tmp_1xovu7";
it is rewritable but it sounds as though this isn't needed should I remove that line?
Sorry this is such a basic problem, I just want to get going!
liz Lizat17 (talk) 15:36, 19 February 2020 (UTC)
if wgMainCacheType is DB_NONE then session cache type defaults to CACHE_DB anyways. So that probably wasn't the issue.
> Sorry this is such a basic problem, I just want to get going!
No worries. What you're describing is unusual and different from the usual login problems people describe. Bawolff (talk) 02:00, 20 February 2020 (UTC)
I have created a new user and this works fine. i have no idea what has happened with the original user but at least I can now get on!
My problem will be that the original user is the only admin and whilst i don't need it today we will undoubtedly at some point. The original user must be corrupt in some way, although it sounds unlikely especially as I can change the password. What can I do?

Lizat17 (talk) 20:00, 19 February 2020 (UTC)
hmm. Maybe it was some messed up cookie thing. You could try logging in with the old user in a different web browser and see what happens.
To turn a user into an admin see manual:createAndPromote.php Bawolff (talk) 02:01, 20 February 2020 (UTC)
Triedd two other browsers, no go. Currently can't run createAndPromote because php version is wring and there's a problem upgrading. So back to this later!

Lizat17 (talk) 16:45, 20 February 2020 (UTC)
Often from the command line, the correct version is present but under a different name (E.g php7.0 or php-7.1).
There are also some other options at Manual:FAQ#Initial_user_was_not_created_by_installer_or_it_is_not_an_administrator Bawolff (talk) 16:57, 20 February 2020 (UTC)

Trouble Updating from 1.29.1 to 1.34/1.33

Good Morning! I've been working on trying to upgrade my web hosted wiki from version 1.29.1 to 1.34.0 (and/or 1.33.2) on a local windows xampp install. I've finally gotten things to seemingly run smoothly, yet I'm getting blank pages. (ex: https://imgur.com/pLUdkZJ) Any page I go to shows the same thing, doesn't seem to have a revision history, and the recent changes page shows nothing even though it should at least show edits from earlier in the week, and then two months ago.


What I should be seeing, minus the different skin (Live install 1.29.1): http://wiki.tf-575.com/index.php?title=Main_Page


Thanks for your time, and I appreciate any assistance that can be given. 2601:603:5001:15A0:C084:1C3:ACCA:A0AE (talk) 17:05, 18 February 2020 (UTC)

Sounds like either an issue updating the actor or comments table. Try running cleanupUsersWithNoId.php followed by migrateActors.php --force and migrateComments.php Bawolff (talk) 19:52, 18 February 2020 (UTC)
Thanks for your reply, I started with cleanupUsers... It did the revision table just fine, but got hung up on archives.

Query: SELECT  ar_id,ar_user,ar_user_text,ar_id  FROM `archive`    WHERE (1=1)  ORDER BY ar_id LIMIT 100

Function: CleanupUsersWithNoId::cleanup
Error: 1054 Unknown column 'ar_user' in 'field list' (localhost)
(There are no ar_user_* tables in my database, and my understanding was that there shouldn't be, if the upgrade had successfully completed?)

Using migrateActors netted this result, along with the inability to migrate 4 usernames:

Completed migration, updated 6 row(s) with 1 new actor(s), 227 error(s)
migrateComments actually seemed to complete successfully:

Beginning migration of revision.rev_comment to revision_comment_temp.revcomment_comment_id

Completed migration, updated 0 row(s) with 0 new comment(s) 2601:603:5001:15A0:C084:1C3:ACCA:A0AE (talk) 22:59, 18 February 2020 (UTC)
the archive error is something broken with the script. Its probably fine to ignore. You might want to try running it with the --table option for each table separately (except archive) (see Manual:cleanupUsersWithNoId.php for the list, and then try running migrateActors.php again. Bawolff (talk) 23:41, 18 February 2020 (UTC)
Oof. So... every table had errors relating to query's.

Query: SELECT  log_id,log_user,log_user_text,log_timestamp,log_id  FROM `logging`    WHERE log_user = '0' AND (1=1)  ORDER BY log_timestamp,log_id LIMIT 100

Function: CleanupUsersWithNoId::cleanup
Error: 1054 Unknown column 'log_user' in 'field list' (localhost)Every following table had the same error essentially with '*_user' columns. (And 'ipb_by' for the ipblocks table)
Migrateactors then threw the exact same error as before.

Creating actor entries for all registered users

... 1 - 101
... 102 - 202
... 203 - 282
Completed actor creation, added 0 new actor(s)
Beginning migration of revision.rev_user and revision.rev_user_text to revision_actor_temp.revactor_actor
User name "User Name" is usable, cannot create an anonymous actor for it. Run maintenance/cleanupUsersWithNoId.php to fix this situation.
User name "User Name" is usable, cannot create an anonymous actor for it. Run maintenance/cleanupUsersWithNoId.php to fix this situation.
User name "Username" is usable, cannot create an anonymous actor for it. Run maintenance/cleanupUsersWithNoId.php to fix this situation.
User name "USER NAme" is usable, cannot create an anonymous actor for it. Run maintenance/cleanupUsersWithNoId.php to fix this situation.
... rev_id=5421
... rev_id=5803
... rev_id=6101
Completed migration, updated 0 row(s) with 0 new actor(s), 227 error(s)
No need to migrate archive.ar_user, field does not exist
No need to migrate ipblocks.ipb_by, field does not exist
No need to migrate image.img_user, field does not exist
No need to migrate oldimage.oi_user, field does not exist
No need to migrate filearchive.fa_user, field does not exist
No need to migrate recentchanges.rc_user, field does not exist
No need to migrate logging.log_user, field does not exist
Beginning migration of log_search
Completed migration, inserted 0 row(s) with 0 new actor(s), 0 error(s)I removed the user names since the wiki is still an active one on the web, but I did preserve the formatting, so the spaces/cases are accurate representations. 2601:603:5001:15A0:C084:1C3:ACCA:A0AE (talk) 23:59, 18 February 2020 (UTC)
Did cleanupUsersWithNoId give the same error for --table revision ? Bawolff (talk) 00:08, 19 February 2020 (UTC)
Revision is the only one that didn't actually give any errors. 2601:603:5001:15A0:39EB:4ABE:3E54:1618 (talk) 02:06, 19 February 2020 (UTC)
well revision is the table migrateActors.php is complaining about. Not sure why cleanupUsersEithNoId is not fixing those usernames. Is there anything odd about those usernames or their edits (e.g. were they imported? Do they have unusual characters) Bawolff (talk) 02:27, 19 February 2020 (UTC)
The only unusual characters would be a space as far as I'm aware (which other accounts have, and were seemingly processed just fine). I've kept a pretty good lock down over the ten years I've had the wiki, so any accounts that are there, are meant to be, and likely deliberately created, and shouldn't be missing any required information. We tend not to import pages at all unless consolidating from one of the other smaller wiki's I've had, but there are still probably <50 pages that have been imported over the years. 2601:603:5001:15A0:39EB:4ABE:3E54:1618 (talk) 02:46, 19 February 2020 (UTC)
Well cleanupUsersWithNoId seems to not be working for you on the revision table for some unknown reason. I'm not sure why.
You are upgrading to 1.34 right? If you still have backups, there's a possibility it might work better in steps e.g. do it in the following order:
  • Starting place of 1.29 db
  • Change MW files to MW 1.33.2
  • run php cleanupUsersWithNoId.php --prefix='import>' --assign
  • run update.php
  • check to see if the wiki still works at this point and if there are any blank pages
  • change MW files to MW 1.34
  • run update.php
There are major DB changes in both 1.33 and 1.34, which is why i think doing it in steps might be effective. Something you can try anyways, sorry I haven't been more helpful. Bawolff (talk) 04:39, 19 February 2020 (UTC)
Thanks for all your assistance, I'll give it a go either way, nothing to lose but time at this point. 2601:603:5001:15A0:39EB:4ABE:3E54:1618 (talk) 05:02, 19 February 2020 (UTC)

Editing toolbar

I have a new installation of Mediawiki. I expected to see an editing toolbar but it isn't present. Under what circumstances is it not displayed and how do I switch it on? Lizat17 (talk) 18:00, 18 February 2020 (UTC)

it rrquires an extension. There are various such extensions. The most popular being extension:WikiEditor and extension:VisualEditor Bawolff (talk) 19:41, 18 February 2020 (UTC)
I read this: 'This extension comes with MediaWiki 1.18 ' and therefore thought I did not need to do anything as I am on1.34. Can you confirm that I do in fact need to install this extension (I don't want to screw things up!)
Thank you Lizat17 (talk) 08:34, 19 February 2020 (UTC)
It depends how you obtained MediaWiki. It does come with the official (tarball) download from this website. Some people install mediawiki from git or other sources which might not include the extension.
Even if you have a copy that includes the extension, there is a checkbox in the installer for if you want to use it. Possibly you didn't check it.
Anyways. If you have a directory in your install named extensions/WikiEditor then you have a copy. If not you have to download. Next check if it is enabled by if you have the line wfLoadExtension( 'WikiEditor' ); in LocalSettings.php [Usually fairly near the bottom]. If not, add it to the bottom of the file and you are good to go.
Additionally, you can check if the extension is installed and enabled by looking at the page named Special:Version on your wiki, which lists all installed and enabled extensions. Bawolff (talk) 08:57, 19 February 2020 (UTC)

contacting wiki editors/subject creators

hey, so i have to do a prodject on Gabriel Beaurieux, who is an old french shientist who did a decapitation experiment but i cant find much about him. im not exactly sure how to contact people like this, so please help 168.212.156.253 (talk) 19:04, 18 February 2020 (UTC)

try w:WP:RD instead. This forum is only for tech questions about MediaWiki software. Bawolff (talk) 19:40, 18 February 2020 (UTC)

Login to mediawiki from external site through url

Hi, I need help with the following: Login to mediawiki from external site through url 191.103.84.98 (talk) 21:20, 18 February 2020 (UTC)

see AuthManager.
If you want more specific advice you're going to have to ask a more specific question. Bawolff (talk) 23:36, 18 February 2020 (UTC)
I have a site built in php, in which users enter with a username and password, and I would like to place a link that takes them to my mediawiki without having to re-enter username and password 191.103.84.98 (talk) 15:01, 19 February 2020 (UTC)
we can answer specific questions (I'm trying X it didn't work, it did Y instead, i don't understand why can you tell me?). We can also point to existing solutions for common problems.
However if you are looking for someone to create a new solution for you from scratch, you would probably have to hire someone. See https://www.mediawiki.org/wiki/Professional_development_and_consulting Bawolff (talk) 01:57, 20 February 2020 (UTC)
Hello, look I have a php site in which we have already registered people, and I need that with the same authentication of the php site I can log in through a link, and tried the API,
example api.php?action=login&lgname=usere&lgpassword=12345 but it doesn't work for me 191.103.84.98 (talk) 14:58, 20 February 2020 (UTC)
You can't pass passwords in query parameters. MediaWiki will forbid them, because it's a big security risk, since all query parameters get logged on the server. Instead, they should be sent in a POST request, in the body of the request.
On the other hand, the response will contain the cookies that identify your logged session. You'll have to pass them in your response to the user, but have in mind that cookies will only work on the same domain where they are set, which means MediaWiki must be accessed from the same domain as your current application Ciencia Al Poder (talk) 10:30, 21 February 2020 (UTC)
Do you have an example that can guide me? 191.103.84.98 (talk) 19:45, 21 February 2020 (UTC)

Importing a Mediawiki instance, including extensions

Hello,

I'm a beginner with Mediawiki and would like to import the articles of a Wikipedia instance (say, en.wikipedia.org) on my local machine. I have checked out the documentation regarding dumps and it seems easy enough to import this data. However, I don't know how to import the Mediawiki extensions that this Wikipedia instance is using : according to https://en.wikipedia.org/wiki/Special:Version there are dozens of them for the EN wikipedia instance, and for a lot of them (for instance Scribunto) there can be a lot of configuration to add to the LocalSettings.php file to make the extension be properly loaded. Is there a way to load this list of extensions in the same way as they are loaded on the original Wikipedia instance? I would like my local instance to be "as close to production" as possible.

Thanks in advance for your help. Nonoxb (talk) 22:20, 18 February 2020 (UTC)

Adding extensions is pretty easy, just follow the instructions on their documentation, and if you get stuck, ask
Making it as close as possible to mw production would require lots of effort and at the very least knowledge of php and linux server administration, but see https://github.com/wikimedia/operations-mediawiki-config especially the wmf-config subdirectory, which contains the equivalent to LocalSettings.php
Also much of the non mediawiki server config is available at https://github.com/wikimedia/puppet Bawolff (talk) 23:34, 18 February 2020 (UTC)
Thanks for the links! Yes, I have installed some extensions referenced in the Special:Version page of en.wikipedia.org on my local MediaWiki instance, but then I realized that it will be quite cumbersome to add all of them one by one (especially those that have special configuration). Looks like https://github.com/wikimedia/operations-mediawiki-config/blob/master/wmf-config/CommonSettings.php could be a good start like you wrote, but boy is it verbose! So, if I want to have a local copy of a Mediawiki instance with all the templates correctly rendered, is this the only way to do it? Nonoxb (talk) 12:46, 20 February 2020 (UTC)
most templates use only a few extensions. The critical ones are Scribunto and parser functions. Less important but sometimes still important is TemplateStyles. The Mediawiki:common.css magic page is also important.
JsonConfig and Wikibase are also somewhat important but getting them to work locally and use wikimedia as a data source seems very difficult (Is it even possible? If anyone figures it out they should write a guide.) Bawolff (talk) 14:52, 20 February 2020 (UTC)

Make Changes Attributed To User's Account, But No Log In Rights

I'd like to have a script be able to make changes to my wiki, with the changes made under one of multiple special accounts. However, for security purposes, I'd like to lock these unmanaged accounts down so they're not a vector for malicious attacks in the future.

Is this possible? Jer Hughes (talk) 08:16, 19 February 2020 (UTC)

Use the maintenance script edit.php to make the edits. Add the usernames to $wgReservedUsernames.
If you want to be extra paranoid, you can run the following command from eval.php
User::newSystemUser( 'Username here' );
Which will make a user that nobody can log into. For super paranoid security do both this and $wgReservedUsernames. You can read about what User::newSystemUser does at [10] Bawolff (talk) 08:45, 19 February 2020 (UTC)

Preventing to create empty pages

Find out some details

I have a problem at my wiki, most of the users are school pupils and they often create just empty pages adding just a couple words. Are there any tool that can prevent to create empty pages or pages with just couple of words? Fokebox (talk) 09:25, 19 February 2020 (UTC)

Extension:AbuseFilter wargo (talk) 10:37, 19 February 2020 (UTC)
Extension:AbuseFilter will work for this. You can create a rule like this:
page_id==0
&!("#redirec" in lcase(added_lines))
& (new_size < 20) Ciencia Al Poder (talk) 10:41, 19 February 2020 (UTC)
Guys, can you help me please. How to download Extension:AbuseFilter for older version of my wiki. I have 1.29.1 Fokebox (talk) 11:14, 19 February 2020 (UTC)
you should use a newer version. Mediawiki 1.29 hasnt been recieving security updates for over a year.
That said, you can get old versions from github https://github.com/wikimedia/mediawiki-extensions-AbuseFilter/archive/REL1_29.zip . I'm not sure if github downloads include vendor dependencies (prob not) so you also have to run composer install --no-dev in the AbuseFilter directory after you have unpacked it Bawolff (talk) 11:54, 19 February 2020 (UTC)
It seems to be that I have successfully installed the extension. So we shall I put this code?:
page_id==0
 &!("#redirec" in lcase(added_lines))
 & (new_size < 20)
In localsettings.php file? Fokebox (talk) 13:12, 19 February 2020 (UTC)
Have you tried reading the manual at Extension:AbuseFilter? Ciencia Al Poder (talk) 20:48, 19 February 2020 (UTC)
Yes, now I try to use it ) Thanks
So, when I try to save the filter in this code:
page_id==0
 &!("#redirec" in lcase(added_lines))
 & (new_size < 20)
I have a system mistake, that there is an error in syntax Fokebox (talk) 06:59, 20 February 2020 (UTC)
Syntax seems fine to me, are you sure you tried to add that code exactly? Bawolff (talk) 07:35, 20 February 2020 (UTC)
Here what I have, see the screenshot:
https://hkar.ru/119Ck Fokebox (talk) 08:18, 20 February 2020 (UTC)
Try
article_articleid==0
 &!("#redirec" in lcase(added_lines))
 & (new_size < 20)
instead (older versions of abusefilter might require that instead). Bawolff (talk) 08:20, 20 February 2020 (UTC)
Thanks! Now all seems to be fine, all works! Fokebox (talk) 13:40, 20 February 2020 (UTC)
Can you also help me how to create a filter that will not allow to non-registered users to insert external links in articles? Fokebox (talk) 10:45, 23 February 2020 (UTC)
action == 'edit'
& user_age == 0
& article_namespace == 0
& added_lines rlike 'https?://'
Matěj Suchánek (talk) 12:05, 23 February 2020 (UTC)
Hi! Can you please help me. I want to make an exception for uploaded files. So it it necessary to provide description and the filter blocks uploading if there isn't such description. So I want users allow to upload files without descriptions Fokebox (talk) 13:08, 21 September 2020 (UTC)
Adding article_namespace !== 6 & or action !== 'upload' & should suffice. Matěj Suchánek (talk) 15:45, 21 September 2020 (UTC)
Thanks!
The whole code looks now so:
article_articleid==0
 &!("#redirec" in lcase(added_lines))
 & (new_size < 30)
 & action !== 'upload'
Fokebox (talk) 16:34, 21 September 2020 (UTC)
Hello! I have updated my wiki to 1.35 and enables VisualEditor. So if I upload the image via VisualEditor, it shows me a message that cannot create empty page. Shall I add to the code exception for uploading a file via VisualEditor Fokebox (talk) 13:00, 20 October 2020 (UTC)
Maybe set exception to "File" namespace. wargo (talk) 07:40, 22 October 2020 (UTC)
I can try, can you please let me know how to make such exception to the code I have already Fokebox (talk) 08:37, 22 October 2020 (UTC)
Change action !== 'upload' to article_namespace !== 6 Ciencia Al Poder (talk) 21:14, 22 October 2020 (UTC)
I guess I do something wrong. I have following code:
article_articleid==0
 &!("#redirec" in lcase(added_lines))
 & (new_size < 30)
 & action !== 'upload' to article_namespace !== 6
And I cannot save it as I have message with error Fokebox (talk) 20:09, 23 October 2020 (UTC)
That to isn't valid. You were recommended to replace action !== 'upload' with article_namespace !== 6. Matěj Suchánek (talk) 07:25, 24 October 2020 (UTC)
Now all is fine. Thanks Fokebox (talk) 09:15, 25 October 2020 (UTC)
Hi! Could you please help?
i have the code as above and it works fine. But how should I change it if I want allow non-registered users to change the text and link itself on the existing page with such text and link, but at the same time disallow non-registered users to create new pages with links? Fokebox (talk) 22:35, 11 December 2020 (UTC)
Thx! Works perfect! Fokebox (talk) 18:28, 23 February 2020 (UTC)

Wiki does not load style

I moved a wiki to another server and it works so far. Unfortunately it does not load it's styling. On Firefox console there is the following Error.

Die Ressource von "http://URL/PATH/wiki/load.php?debug=false&lang=de&modules=startup&only=scripts&skin=vector" wurde wegen eines MIME-Typ-Konfliktes ("text/html") blockiert (X-Content-Type-Options: nosniff). Carchaias (talk) 12:44, 19 February 2020 (UTC)

In theory Manual:Errors and symptoms#The wiki appears without styles applied and images are missing though not sure that case is covered. Malyacko (talk) 16:27, 19 February 2020 (UTC)
check php error log for headers already sent" or other errors.
Go to the actual url given there. Does it begin with an error or anything that doesnt look like javascript Bawolff (talk) 01:53, 20 February 2020 (UTC)
I turned debugging on
error_reporting( -1 );
ini_set( 'display_errors', 1 );
The only error I found are:
Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /homepages/13/d71359079/htdocs/xz550/wiki/includes/json/FormatJson.php on line 297
Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /homepages/13/d71359079/htdocs/xz550/wiki/languages/LanguageConverter.php on line 771
The wiki is at http://xz550.info/wiki/index.php?title=Hauptseite Carchaias (talk) 08:15, 20 February 2020 (UTC)
To fix those errors, please use at least MediaWiki 1.31.2
I doubt those errors are causing the issue directly. However, sometimes error output can cause the issue you are describing. Bawolff (talk) 08:24, 20 February 2020 (UTC)
Thanks for the upgrade tip. Just upgraded to 1.34 and it runs fine. Mayhavebeen some missconfiguration in the old LocalSettings.php Carchaias (talk) 11:31, 20 February 2020 (UTC)

IS it possible to rename an existing NAR?

Our business would like change the name of our NAR. Can that be done? If not, if we added an Alias, how does that show up in dbUnity, or other NAR-related reports? Thx. 160.83.73.16 (talk) 17:40, 19 February 2020 (UTC)

i think you are in the wrong place. We can only answer questions about MediaWiki. Bawolff (talk) 01:51, 20 February 2020 (UTC)

Installing HTML2Wiki

We would like to use this extension however we are notr experienced enough to understand the instructions.

There seem to be a number of extensions that this extension is dependent on. The documentation suggests using composer however we don't understand how to install this on the wiki server. Althouhg it may be installed - we have a composer.json file in the wiki root. The instructions to use it need a comand line but we don't known how to

The instructions we found were not explicit enough- for us as beginners - so if anyone has a baby steps explanation then please can you help.


Thank you Lizat17 (talk) 18:39, 19 February 2020 (UTC)

If you download the extension from https://www.mediawiki.org/wiki/Special:ExtensionDistributor/Html2Wiki you probably don't need to do the composer step as it will be done for you (If you download it from somewhere else, like directly from git, you need to do the composer step) Bawolff (talk) 07:39, 20 February 2020 (UTC)
So it seems I need pandoc. I don't know exactly how to download and install this. It's on Github, can you give me an idiot's guide?

Lizat17 (talk) 16:54, 20 February 2020 (UTC)
This is much easier from the command line. If you have root sudo apt install pandoc (for debian/ubuntu. If using redhat/fedora it is a different command)
If you don't want to do that (And I'm assuming the server is 64bit linux here), you can download at https://github.com/jgm/pandoc/releases/download/2.9.2/pandoc-2.9.2-linux-amd64.tar.gz
If you decompress that, there should be a program named pandoc. You need to place this somewhere that is inside of the apache user's $PATH. /usr/local/bin would be the normal directory to put it in (You may not have permission to put things in that path by default). You also need to ensure that the file mode/permissions are such that the web user can execute (e.g. mode 555).
If you can't put the pandoc file in the system's path, you can put it in the MediaWiki directory (aka where LocalSettings.php is), and put the following in bottom of LocalSettings.php: putenv( getenv( 'PATH' ) . ":$IP" ); [This is not best practise but will probably work]. It is still important that the file permissions/mode has the execute bit set. Bawolff (talk) 17:12, 20 February 2020 (UTC)
we are on shared hosting and I can't play with apache. so I will use the other method. Just to be clear should I be typing exactly this in local settings file:
putenv( getenv( 'PATH' ) . ":$IP" );
I ask because I have done this and still get this error: Html2Wiki requires pandoc. Lizat17 (talk) 19:05, 20 February 2020 (UTC)
Sorry, should be
putenv( 'PATH=' . getenv( 'PATH' ) . ":$IP" ); Bawolff (talk) 20:03, 20 February 2020 (UTC)
Ok I have corrected as you said but still get the error: Html2Wiki requires pandoc.
Just to confirm, I downloaded the zipped files you linked to previously, unzipped and copied the file named 'pandoc' (no extension) that was in the bin folder. I put it in the root folder of the wiki as you suggested. https://www.screencast.com/t/dPxndnuCQ44
What else should I do? Lizat17 (talk) 14:34, 21 February 2020 (UTC)
You also need to make sure that the file is set to execute (File manager should have a permission or "mode" dialog somewhere. You need to ensure that pandoc is set execute (sometimes labeled as +x. If they ask for a number you want 555).
If you have command line access, you can use that to verify it works. You use cd foldername to change directories, ls to list what's in the current directory, and pwd to see what directory you are currently in. If you can get to the MediaWiki root directory, type ./pandoc --version If you get a version number, you completed that step correctly. If you get an error, then something is wrong.
Also, some hosts disable putenv, so its possible that it might not be working because of that. Or there could be something else i missed about the extension. You could request the author provide a config variable for the pandoc command, which is a much more reliable method of overriding the default path for a command. Bawolff (talk) 15:21, 21 February 2020 (UTC)

The connection was reset.

I have moved my wiki to another server. Everything seems correct. I can login access pages, but when I make an edit and try to save, it comes back with the following error message and I cannot figure out why or see anything that is set up different that the old server:


This site can’t be reached

The connection was reset.

Try:

Checking the connection

Checking the proxy and the firewall

Running Windows Network Diagnostics

ERR_CONNECTION_RESET 4.16.169.2 (talk) 19:05, 19 February 2020 (UTC)

do you have any web application firewalls between you and the server? Software that tries to filter pornography on the internet, or anything like that?
Do other websites from that server work? Bawolff (talk) 01:50, 20 February 2020 (UTC)
I looked at the firewalls and didn't see anything specific, there may be something I don't know about yet. I don't control the server or the domain. I verified that the 3306 port was allowed. There are many other websites that work fine. No others that use a mysql Database. 4.16.169.2 (talk) 16:45, 20 February 2020 (UTC)

private wiki

can I make a madiawiki accessible with log in only? Ninaschuback (talk) 19:12, 19 February 2020 (UTC)

This may help: Project:Support desk/Flow/2020/02#h-How_to_cover_all_pages_and_lock_them_to_anonymous_visitors-2020-02-06T17:55:00.000Z. Jonathan3 (talk) 21:47, 19 February 2020 (UTC)
manual:restricting access Bawolff (talk) 01:48, 20 February 2020 (UTC)

Captcha with Flow

Hi. Is there any way to make Extension:ConfirmEdit work with Extension:StructuredDiscussions? 23.227.143.98 (talk) 21:12, 19 February 2020 (UTC)

It should work just like for a normal wikipage Bawolff (talk) 07:37, 20 February 2020 (UTC)
Okay, but how? Adding captchatriggers "flow" didn't do it. 92.38.148.55 (talk) 12:36, 20 February 2020 (UTC)
as far as i know its just treated as a normal wikipage for captcha purposes, so if you have triggers on editing articles they should also apply to flow Bawolff (talk) 14:53, 20 February 2020 (UTC)
But see, we need a captcha trigger only for flow, not for the other namespaces. We use flow in very few places on the wiki and it seems only these are being targeted by spambots, rather than regular wikipages. 92.38.148.11 (talk) 11:50, 21 February 2020 (UTC)
I don't think that is currently supported by Flow.
You might be able to use Extension:AbuseFilter to do more targeted anti-spam measures only at Flow. Bawolff (talk) 13:33, 21 February 2020 (UTC)

Rerun PageContentSaveComplete hook

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


I setup a PageContentSaveComplete hook, but I have some existing pages that I would like to run the hook against. Is it possible to "resave" all my site in an automated method to run the hook against all the articles even though I won't be making any changes to the articles? Jer Hughes (talk) 23:56, 19 February 2020 (UTC)

Can i ask what you are doing with the hook?
It sounds a little bit like one of the LinksUpdate/SecondaryDataUpdate hooks might be better for your needs, but hard to say. Bawolff (talk) 01:48, 20 February 2020 (UTC)
The hook captures the contents from each page to save into an external database. I'd like to capture this data on some of the pages that were already created, but I don't need to change any of the page's content. Jer Hughes (talk) 05:37, 20 February 2020 (UTC)
So normally in MediaWiki, we use LinksUpdate/RevisionDataUpdates for this sort of thing - where you want to update some sort of secondary data store based on the content of the page (And assuming you can deduplicate the results). Pages in MediaWiki can change for reasons other then an edit (for example if a template changes), and LinksUpdate should run whenever that happens, if people make a null edit, do a linkspurge from the api, or run the script refreshLinks.php.
If you want to keep with the PageContentSaveComplete hook, i guess i would suggest making a dummy edit to all the pages (e.g. adding <!-- foo--> to all pages), but seriously consider if LinksUpdate could be a better fit, because then its much easier to force a linksupdate of all pages. Bawolff (talk) 07:34, 20 February 2020 (UTC)
Thank you so much, this seems perfect. So my understanding is, if I use either the `LinksUpdate` hook or the `RevisionDataUpdates` hook, then I can reprocess all my pages using the `refreshLinks.php` script. And that the difference between the two hooks is the first one runs synchronously, whereas the second one happens asynchronously. Is that correct? Jer Hughes (talk) 08:15, 20 February 2020 (UTC)
Note: This system has changed a bit recently. I hope everything i say is accurate, but I'm more familiar with the old version than the new version.
Yes, LinksUpdate does run asynchronously (via the refreshLinks job). It also provides access to the LinksUpdate object, which is important in some use cases (but probably not yours). The LinksUpdate will also only be triggered by normal wiki pages (You can use ContentHandler to for example, replace the MediaWiki parser with something else totally different. If you do that, LinksUpdate won't happen because its tied to the parser output)
RevisionDataUpdates can be either I think. If you want it to be asynchronous, you can have your hook insert a job to do the update later. Often people want their update to be in a separate job than the refreshLinks job, because then you can set up separate job queues for it.
There's also several other hooks, and I'm honestly not sure the difference between them all is.
https://github.com/wikimedia/mediawiki/blob/master/docs/pageupdater.md may be a helpful page. Bawolff (talk) 08:36, 20 February 2020 (UTC)
So I have my hook built using <code>$wgHooks['RevisionDataUpdates'][] = 'onRevisionDataUpdates';</code>. It works when I save my pages, but now I want to "resave" all my existing pages. I tried running refreshLinks.php alone and with runJobs.php but its not working as expected. Do I use a different maintenance script? Jer Hughes (talk) 07:23, 24 February 2020 (UTC)
No, refreshLinks.php should do it (refreshLinks.php calls WikiPage::doSecondaryDataUpdates, which calls DerivedDataPageUpdater::doSecondaryDataUpdates, which calls DerivedDataPageUpdater::getSecondaryDataUpdates, which calls all RevisionDataUpdates hooks. refreshLinks.php also calls DeferredUpdates::doUpdates() which should trigger all updates to be done immediately. Bawolff (talk) 08:13, 24 February 2020 (UTC)
Thank you very much. I have verified that refreshLinks.php is working. I didn't realize my hook failed when executed on some of the special pages when an element was expected that was not being provided. When it tried to save that page it stopped refreshLinks.php from completing. Once I fixed my issue the script works great now. Jer Hughes (talk) 23:34, 26 February 2020 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Closed email account and log in

I have been stupid: I have closed the email my account is linked to, so I can not log in. Please advice. Thanks


85.166.146.49 (talk) 09:11, 20 February 2020 (UTC)

Which website is this about (link)? Malyacko (talk) 10:21, 20 February 2020 (UTC)
Wikipedia.no

85.166.146.49 (talk) 11:07, 20 February 2020 (UTC)
Well normally you need the password not the email. You only need the email if you forgot the password.
If you can prove beyond a shadow of a doubt you own the account (e.g. You're friends in real life with someone who works at WMF or is a steward, or otherwise super high ranking in the community) and can vouch that you are who you say you are, we can give it back to you. Otherwise, create a new account. Bawolff (talk) 15:39, 20 February 2020 (UTC)

ファイルのアップロードにて

MediaWiki1.34.0にて画像をアップロードしようとしたのですが、

アップロード時に「[Xk58ZdHgMN9BfQErIWwzvAAAAAk] 2020-02-20 12:32:37: 種別「Error」の致命的例外」と

表示され、アップロードできません。

このエラーコードはどの様なものでしょうか? 渡波 空 (talk) 12:40, 20 February 2020 (UTC)

$wgShowExceptionDetails = true;」を設定します LocalSettings.phpで。
これにより、より詳細なアドバイスを提供できるように、エラーがより詳細になります。
Manual:How_to_debug/ja Bawolff (talk) 15:19, 20 February 2020 (UTC)
現在、渡波さんと同じエラーが出ている者です。
$wgShowExceptionDetails = true;」を設定したところ、
Error from line 160 of /includes/libs/mime/XmlTypeCheck.php: Class 'XMLReader' not found
という結果が出ました。
サーバー側のphpinfoを見てみるとXMLReaderはenabledになっていましたが、この後どう対処すればよろしいでしょうか。宜しくお願いします。 LongThickTabbyCat (talk) 01:23, 25 February 2020 (UTC)
こちらの皆様と同様のエラー「種別「Error」の致命的例外」で画像がアップロードできない状況でしたが、解決しました。
OSの違いにより参考になるかわかりませんが、phpの更新などがありますので事前に環境のバックアップなど必要かもしれません。
MediaWikiバージョン
  • 1.28
  • 1.31
1. LocalSettings.phpに$wgShowExceptionDetails = true;を追記
2.下記エラーが表示される
Error from line 160 of /includes/libs/mime/XmlTypeCheck.php: Class 'XMLReader' not found
3. このページ(Project:Support desk/Flow/2015/11#h-unable_to_upload_msword_document_doc_in_mediawiki-2015-11-06T10:11:00.000Z)を参考後、現行のphp7.0がそのままの状態で、再インストール(CentOS 7、PHP7.0 環境)
yum install --enablerepo=remi-php70 php-xml
systemctl restart nginx
systemctl restart php-fpm
4.すべてのページで別のエラー(種別「MWException」の致命的例外)が出るようになる
5. このページ(ttps://www.stix.id.au/wiki/php_7.1.0_to_7.1.3_breakage)を参考にしてphpのエラーを確認してphp.iniを編集
$ php
PHP Warning:  Module 'dom' already loaded in Unknown on line 0
PHP Warning:  Module 'SimpleXML' already loaded in Unknown on line 0
PHP Warning:  Module 'xml' already loaded in Unknown on line 0
vi /etc/php.ini
;extension=xml.so
;extension=dom.so
;extension=simplexml.so
systemctl restart php-fpm
systemctl restart nginx
これで画像がアップロードできるようになりました。
ただまた、別のエラーが出て、画像のサムネイルが表示されませんでした。
サムネイルの作成エラー: /bin/bash: /usr/bin/convert: No such file or directory
これは Imagemagick を入れていないことが原因でした。
6.ImageMagickのインストール
yum install ImageMagick
yum install ImageMagick-devel
vi /etc/php.ini
extension=imagick.so
LocalSettings.phpに追記
$wgUseImageMagick = true;
#$wgImageMagickConvertCommand = 'C:/ImageMagick/convert.exe'; # for windows
$wgImageMagickConvertCommand = '/usr/bin/convert'; # for linux
Momijimaple (talk) 22:37, 28 February 2020 (UTC)
5.のところでエラーが何も出ないんですよね...
一応エラーの検証ページ貼っときます...
ttps://projectr.ddo.jp/wiki/練習
追記:
サーバはXREAを使用しています。(SUSE Linux+Apache+MySQL+PHP7.4)(要はLAMP)
なので再インストールやすぐにリロードが出来ないので、
もしかするとリロードされてないだけ...? 渡波 空 (talk) 12:26, 27 March 2020 (UTC)

Category tags list on top of the pages?

Is it possible to get the Category tags list on top instead on the bottom of the pages? S0ring (talk) 12:52, 20 February 2020 (UTC)

I guess you could shift it with jQuery. Jonathan3 (talk) 15:37, 28 February 2020 (UTC)
Indeed it works with Javascript, for example just add in MW1.31 these lines to MediaWiki:Common.js
var contentElement = document.getElementById("content");
var categoryElement = document.getElementById("categories");
contentElement.parentNode.insertBefore(categoryElement, contentElement); S0ring (talk) 09:16, 5 March 2020 (UTC)

"CooperationStatistics" extension is outdated and no download available

Eventually this extension should be archived do not create confusion. S0ring (talk) 13:32, 20 February 2020 (UTC)

Note the download is still available, the link was just going to the wrong place.
That said, its probably still old, and doubtful if it still works Bawolff (talk) 15:15, 20 February 2020 (UTC)

Rewrite MediaWiki's URLs - Remove index.php

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


I've just deployed an internal wikipage for my company. As of now we have a couple of sections on the left navigation pane (we have more but only three are being used at the moment).

Section 1 Section 2 Section 3

Whenever I click on one of the sections I get the URL:

http://mediawiki.my.domain/mediawiki/index.php/Section 1

What we desire to do is to get URL: http://mediawiki.my.domain/mediawiki/Section 1

Please, don't instruct me to read: https://www.mediawiki.org/wiki/Manual:Short_URL, the guide might be clear for you guys but at least for me, it isn't. A real life scenario example would make things a LOT easier...but there aren't any available, not even outside their wikipage. I've also read similar threads here on stack overflow, but still, no luck.

According to what I've been reading, file LocalSettings.php should have at the end:

 ## The URL base path to the directory containing the wiki;
 ## defaults for all runtime URL paths are based off of this.
 ## For more information on customizing the URLs please see:
 ## http://www.mediawiki.org/wiki/Manual:Short_URL
 $wgScriptPath = "/mediawiki";
 $wgScriptExtension = ".php";
 $wgArticlePath = "{$wgScriptPath}/wiki/$1";
 $wgUsePathInfo = true

But there has to be an htaccess file also on the mediawiki web directory with something like this:

RewriteEngine On
 RewriteRule ^/?mediawiki/wiki(/.*)?$ %{DOCUMENT_ROOT}/w/index.php [L]
 RewriteRule ^/mediawiki*$ %{DOCUMENT_ROOT}/w/index.php [L]*

So if I create this file on the mediawiki directory, will this work? any other information I might be missing here? Mhuartamendia (talk) 16:39, 20 February 2020 (UTC)

Based on what you've been describing (You desire http://mediawiki.my.domain/mediawiki/ArticleNameHere . index.php is in the mediawiki directory), you need a couple of differences: $wgArticlePath = "mediawiki/$1"; for the article path instead of what you wrote (rest of LocalSettings.php is fine).
and for the .htaccess you want
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d
RewriteRule ^/?mediawiki(/.*)?$ %{DOCUMENT_ROOT}/w/index.php [L]
At least I think. I haven't tested this, ymmv. The .htaccess may depend on what webserver and if its configured to read .htaccess files. Bawolff (talk) 17:20, 20 February 2020 (UTC)
Hey @Bawolff
Thanks for answering!
I'll try this in a moment, web server is Apache and I'm not really sure where to put the file. Should this be in /mediawiki path? or in the webserver main root path? Mhuartamendia (talk) 17:58, 20 February 2020 (UTC)
@Bawolff
I edited local httpd.conf file to AllowOverride All, so .htaccess could have permissions to change the URL.
I also created the .htaccess file in /var/www/html with the content provided. However when browsing to http://mediawiki.my.domain/mediawiki, page is blank :(
Also edited LocalSettings.php as you said
Any ideas? Mhuartamendia (talk) 19:38, 20 February 2020 (UTC)
Also, at this point, I don't know if .htaccess has to be placed at /var/www/html or the media wiki path... Mhuartamendia (talk) 19:42, 20 February 2020 (UTC)
These questions seems to be about Apache HTTPD and not about MediaWiki. See https://httpd.apache.org/dev/debugging.html, https://stackoverflow.com/questions/9234289/how-to-debug-htaccess-rewriterule-not-working/16378968, etc. Seehttps://httpd.apache.org/docs/current/howto/htaccess.html Malyacko (talk) 22:14, 20 February 2020 (UTC)
Hi @Malyacko
I understand these questions are more suitable for HTTPD/Apache, but we are not even sure if the code:
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d
RewriteRule ^/?mediawiki(/.*)?$ %{DOCUMENT_ROOT}/w/index.php [L]
is correct.
Can you personally confirm that so I can move on to Apache/HTTPD Forums? Because if the code is wrong, there's no use on checking Apache Mhuartamendia (talk) 16:35, 21 February 2020 (UTC)
note those rewritecond rules are apache code not mediawiki code. I personally think its in scope here as configuring apache to work with mediawiki short urls is a common system admin task, and one lots of people have trouble with, but ultimately that is an apache question not a mediawiki question Bawolff (talk) 22:50, 21 February 2020 (UTC)
UPDATE:
Used this on Local Settings:
$wgScriptPath = "/mediawiki";
$wgArticlePath = "/mediawiki/$1";
And used this on .htaccess
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^mediawiki/(.*)$ w/index.php?title=$1 [PT,L,QSA]
RewriteRule ^mediawiki/*$ w/index.php [L,QSA]
RewriteRule ^mediawiki$ w/index.php [L,QSA]
It is now redirecting ok, but stating MainPage is not found on directory Mhuartamendia (talk) 19:36, 21 February 2020 (UTC)
I'm not quite sure what your last problem is regarding, but this tool can create automatic configurations. Þjarkur (talk) 13:25, 22 February 2020 (UTC)
in fairness you didn't mention in your otiginal post that mediawiki was in a directory named w. Bawolff (talk) 22:53, 21 February 2020 (UTC)
Hi @Bawolff
Actually that tool serves me right if the domain is public and it currently isn't
MediaWiki directory is in /mediawiki. Pretty sure that has something to do with it Mhuartamendia (talk) 13:42, 24 February 2020 (UTC)
UPDATE: So I change my LocalSettings.php content to:
$wgScriptPath = "/mediawiki";
$wgArticlePath = "/mediawiki/$1";
And .htaccess to:
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^mediawiki/(.*)$ mediawiki/index.php?title=$1 [PT,L,QSA]
RewriteRule ^mediawiki/*$ mediawiki/index.php [L,QSA]
RewriteRule ^mediawiki$ mediawiki/index.php [L,QSA]
Replacing all /w to mediawiki as it is the directory where it is installed
When I browse to http://mediawiki.my.domain/mediawiki I get:
=Not Found=
The requested URL /mediawiki/Main_Page was not found on this server.
Looks like rewriting works fine but there's no content now... (and there previously was)

Mhuartamendia (talk) 14:06, 24 February 2020 (UTC)
htaccess had to be on root path not mediawiki path, that was it! Thanks! Mhuartamendia (talk) 20:25, 25 February 2020 (UTC)
may i know what do u mean by root path? i am facing your not found issue. Simuako (talk) 05:24, 17 February 2022 (UTC)
the root path is usually "public_html" folder, it is the base directory where the webpage files are put. 84.205.231.40 (talk) 12:27, 22 June 2022 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Help with Parsoid

Hi, I have installed visual editor and I have no idea that it is parsoid from what I see is a server, it does not work without such a thing, I do not understand but I need to install it, I have a shared hosting php 7.4 SamiWey (talk) 19:43, 20 February 2020 (UTC)

How i can install parsoid SamiWey (talk) 19:53, 20 February 2020 (UTC)
See Parsoid/Setup Malyacko (talk) 22:10, 20 February 2020 (UTC)
for a shared host you may want to look into the new parsoid/php. However docs are a bit lacking. Bawolff (talk) 00:17, 21 February 2020 (UTC)

Adding alphabetical table of contents to category pages

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


I'm trying to add a table of contents to category pages containing large numbers of articles. I'd like to be able to navigate alphabetically, such that clicking on a hyperlink marked "T", e.g., would bring you to articles beginning with the letter "T". Does anyone have experience with this issue? Thanks! Jgosian (talk) 21:04, 20 February 2020 (UTC)

id suggest copying https://en.wikipedia.org/wiki/Template:Category_TOC Bawolff (talk) 21:18, 20 February 2020 (UTC)
Thanks a million, @Bawolf. That solution worked out great. Jgosian (talk) 14:50, 8 October 2020 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

GitHub

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


How do you link a GitHub organization to a MediaWiki wiki? AGreatUsernameChoice (talk) 14:51, 21 February 2020 (UTC)

What does that ("link") even mean? Please elaborate a lot more. Thanks! Malyacko (talk) 18:44, 21 February 2020 (UTC)
I have a miraheze wiki. I need to put Twinkle onto it. I need a way to link (and update) twinkle. AGreatUsernameChoice (talk) 20:05, 21 February 2020 (UTC)
Well for starters, why do you think that has anything to do with a github organization? Bawolff (talk) 20:33, 21 February 2020 (UTC)
TestWiki.wiki has it done. Pop over there to see the organization. AGreatUsernameChoice (talk) 20:57, 21 February 2020 (UTC)
i think you are confused over the definitions of the words you are using.
https://en.wikipedia.org/wiki/Wikipedia:Twinkle#Use_on_other_wikis may be of interest. Bawolff (talk) 22:46, 21 February 2020 (UTC)
Whelp, I already got it done. Thanks! AGreatUsernameChoice (talk) 22:56, 21 February 2020 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Automatic Tweets

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


I've recently switched from Goodreads to LT (bye Amazon!), and there are still some features I'm trying to figure out. Is there a way to automatically tweet every time I rate a book or write a review? I've linked my Twitter account with LibraryThing, but I don't see how to actually tweet anything. ...My apologies if this is not the right place to post this question. LT's Help page links here as the place to ask for support, but now I see this is a general help wiki for all kinds of apps? SamMusher (talk) 14:54, 21 February 2020 (UTC)

This isn't really the right place. You'll have to ask at LT, we don't know anything about them. This is a place to ask for help just about the wiki software.
> " LT's Help page links here as the place to ask for support"
Thanks for including this. We get all sorts of random support questions here, and it has always been very confusing how people end up here. I guess what's happening is various people use MediaWiki as a knowledge base (LibraryThing at least does), MediaWiki's own help links go back here in some places, and then once here, they see the support desk link (I think). Can I ask, what was the exact path you took to get from LT to over here? I think if we better understood why people were getting confused, we would maybe be able to fix it.
Thanks. Bawolff (talk) 15:07, 21 February 2020 (UTC)
wiki.librarything.com runs MediaWiki 1.29.2, an ancient and insecure version. If they ran 1.27 or ≥1.30, this problem would be solved. Malyacko (talk) 18:43, 21 February 2020 (UTC)
Ah, that explains it Bawolff (talk) 20:32, 21 February 2020 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Installing VisualEditor

Does anyone have an idiots guide for this?


I find it quite confusing that I can download a distributor version of an extension and still have to do a load of other stuff. And which stuff is not always clear to me.


I have uploaded the VE extension. But now need parsoid I think - but is it already there? I don't know how to check and I am not sure I can follow the install parsoid instructions.


I am on shared hosting.


Any recommendations? Lizat17 (talk) 16:45, 21 February 2020 (UTC)

@Lizat17 Have you seen Extension:VisualEditor#Set up a Parsoid service or VisualEditor/Installation on a shared host already? These resources might be helpful. User:SSethi_(WMF) 19:55, 21 February 2020 (UTC)

contribute to "Support 'maps' parameter in TemplateData GUI editor"

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


Hi! I am Soumya Rao from India. I am a sophomore at Indira Gandhi Delhi Technical University for Women. I am well versed in web development. I would like to contribute to "Support 'maps' parameter in TemplateData GUI editor" project. Please guide me through the process. Soumyaa.rao (talk) 16:41, 22 February 2020 (UTC)

Hi and welcome @Soumyaa.rao. Nobody knows what the "Support 'maps' parameter in TemplateData GUI editor" project is without any further information. (Maybe this is related to Outreach programs somehow?) Please also see How to become a MediaWiki hacker#Feedback, questions and support regarding your last sentence. Thanks a lot! Malyacko (talk) 09:36, 23 February 2020 (UTC)
It looks like this: Google_Summer_of_Code/2020#Support_'maps'_parameter_in_TemplateData_GUI_editor. The instructions state: "Express your interest in working on a project by commenting on the corresponding task on Wikimedia Phabricator." See T208305. Jonathan3 (talk) 19:10, 23 February 2020 (UTC)
@Soumyaa.rao In addition to what @Jonathan3 said, you can ask general program-related questions in the Wikimedia Zulip chat:https://wikimedia.zulipchat.com/#narrow/stream/220258-gsoc20-outreachy20 User:SSethi_(WMF) 02:50, 25 February 2020 (UTC)
@Soumyaa.rao Good luck :-) Jonathan3 (talk) 01:48, 27 February 2020 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Create a page with a text using mysql with insert into

I would like to launch an insert create a page with a text. What tables would it take for it to work? 46.37.82.235 (talk) 19:49, 22 February 2020 (UTC)

Why would you do such low-level fiddling, instead of using the proper API offered by MediaWiki? Malyacko (talk) 09:34, 23 February 2020 (UTC)

API action=parse styles

I've been out of the fold for a while, and in the meantime, something appears to have changed with API action=parse.

See the URL https://commons.wikimedia.org/w/api.php?action=parse&text={%7C%20class=%22wikitable%22%0a%7Chi%0a%7C}&title=Something&prop=text%7Cheadhtml&formatversion=2

The text to be parsed contains a styled table. This wikitext would display with the appropriate styles if I placed it on any Wikimedia Commons page. However, the stylesheets included within the headhtml section of the response do not include the wikitable class.

What's more, the returned styles don't even include correct global fonts. The text appears in the browser default serif font.

What is going on here? Why are these styles missing from action=parse's response?


This, that and the other (talk) 03:24, 23 February 2020 (UTC)

i think the this is because the legacy.shared module is missing.. Please file a ticket. —TheDJ (Not WMF) (talkcontribs) 12:24, 24 February 2020 (UTC)

Use a basic structure

Hello,

I work on a wiki for training-material. So people can insert their curse material. This material pages have an own namespace. And they should be uniform for a better overview. So, is there a solution to automatic insert a text-stucture in a new page in this namespace? TruckerB88 (talk) 08:32, 23 February 2020 (UTC)

This would work: Extension:MultiBoilerplate.
This might be even better: Extension:Page_Forms. Jonathan3 (talk) 12:59, 23 February 2020 (UTC)
see also the preload url parameter. Often used in combo with extension:InputBox Bawolff (talk) 15:19, 23 February 2020 (UTC)

List of all contributors, including IP addresses?

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


Is is possible to either:

  • Show a list of contributors (including IP addresses) with links to their user contributions pages.
  • Show an entire list of non-admin/sysop contributors (including IP addresses) with all their contributions shown on the one page. (Non-sysop because on my wiki it otherwise would be too large a list...)

I used to have Extension:Contribution Scores but from memory it only took account of registered users.

Thanks. Jonathan3 (talk) 12:47, 23 February 2020 (UTC)

this is specific enough, you would probably have to make it yourself.
Closest built un is special:activeusers Bawolff (talk) 15:17, 23 February 2020 (UTC)
Thanks. That's helpful. I'll try to make a special page based on that one. I "just" need to get it to look for users since the year dot, and include IP addresses :-) Jonathan3 (talk) 19:06, 23 February 2020 (UTC)
I don't need to look at this information regularly, so went for the easier option of saving a MySQL query to run periodically and paste into a wiki page.
SELECT CONCAT ("*[[Special:Contributions/", rev_user_text, "|", rev_user_text, "]] - {{#time:j/n/y|", 
rev_timestamp, "}} - ", COUNT(*), " edit(s) to [[{{namespace|", page_namespace, "}}", page_title, "]]")
FROM wm_revision  
INNER JOIN wm_page ON wm_page.page_id = wm_revision.rev_page
WHERE rev_user_text <> "MY USERNAME"  
GROUP BY CONCAT (rev_user_text, "-", rev_page)
ORDER BY rev_user_text, rev_timestamp
I had to create Template:Namespace using a #switch to convert the page_namespace numbers into their text equivalent. Jonathan3 (talk) 20:54, 23 February 2020 (UTC)
note: the above query will probably stop working in 1.34 due to schema changes. Bawolff (talk) 22:43, 23 February 2020 (UTC)
Thanks for the warning! :-) Jonathan3 (talk) 07:52, 24 February 2020 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

is there a possibility to display a page besides the editor window?

I want to display a page left of the editor window, when editing a text?

Is this possible with mediawiki?

Tried already with dokuwiki, its not possible with it.

The purpose is to translate docs collaborative in the wiki style without the need for registration. 2.247.244.206 (talk) 13:04, 23 February 2020 (UTC)

See Extension:Proofread Page, Extension:Translate, Extension:ContentTranslation for similar UI concepts. Malyacko (talk) 14:54, 23 February 2020 (UTC)
Thanks, I'll give it a try 94.217.59.20 (talk) 17:26, 23 February 2020 (UTC)

Error Style not displaying after removing index.php

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


mediawiki 1.34

.htaccess

RewriteEngine On
RewriteRule ^/?wiki(/.*)?$ %{DOCUMENT_ROOT}/index.php [L]

RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d
RewriteRule ^/?images/thumb/[0-9a-f]/[0-9a-f][0-9a-f]/([^/]+)/([0-9]+)px-.*$ %{DOCUMENT_ROOT}/thumb.php?f=$1&width=$2 [L,QSA,B]

RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d
RewriteRule ^/?images/thumb/archive/[0-9a-f]/[0-9a-f][0-9a-f]/([^/]+)/([0-9]+)px-.*$ %{DOCUMENT_ROOT}/thumb.php?f=$1&width=$2&archived=1 [L,QSA,B]

localsettings.php

 ## The URL base path to the directory containing the wiki;
 ##  defaults for all runtime URL paths are based off of this.
 ##  For more information on customizing the URLs please see: 

 ##  http://www.mediawiki.org/wiki/Manual:Short_URL  

 $wgScriptPath = ""; 

 $wgScriptExtension = ".php"; 

 $wgArticlePath = "/wiki/$1";
$wgUsePathInfo = true;
SamiWey (talk) 23:03, 23 February 2020 (UTC)
@SamiWey You posted stuff from files but did not explain what the problem is. Or if you have some question. Or where to see a problem. Malyacko (talk) 08:56, 24 February 2020 (UTC)
$wgScriptPath probably needs to be "/" instead of "" Nope, empty string is fine for this setting.
The configuration looks fine.
Hit the F12 key, select the network tab, and reload the page. Look at requests to the load.php URL and see if some of them return 5XX or 4XX status codes, open them and see if there's any error there. Ciencia Al Poder (talk) 10:31, 24 February 2020 (UTC)
style.css does not load https://dpaste.org/2oZu SamiWey (talk) 23:10, 25 February 2020 (UTC)
this appears in console
  1. Refused to apply style from 'https://www.wiki.org/wiki/public_html/load.php?lang=es&modules=mediawiki.legacy.commonPrint%2Cshared%7Cmediawiki.skinning.interface%7Cskins.vector.styles&only=styles&skin=vector' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
  2. Página_principal:12 GET https://www.wiki.org/wiki/public_html/load.php?lang=es&modules=startup&only=scripts&raw=1&skin=vector net::ERR_ABORTED 404 SamiWey (talk) 00:38, 26 February 2020 (UTC)
Is your wiki accessible under the URL /wiki/public_html/ ? Ciencia Al Poder (talk) 10:30, 26 February 2020 (UTC)
nop in the url w/ are all of the files SamiWey (talk) 15:40, 27 February 2020 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

NST Run on MY PC Check ?

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


I'm new to NST.

I've been reading for the past 2hrs.

Is there a 'check my PC to see if it will run NST' ?

I'm not sure if my PC is too old or not. 172.79.26.135 (talk) 23:24, 23 February 2020 (UTC)

wrong place to ask Bawolff (talk) 02:15, 24 February 2020 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Category update job fail to complete "Cannot flush snapshot because writes are pending"

I've seen several posts on various sites dated 2016 and 2018 mainly. I've not found a permanent solution to the automation fail.

My wiki is new as of four weeks ago. Versions are MediaWiki 1.32.0, PHP 7.2.24 (cgi-fcgi), SQLite 3.28.0, ICU 60.2. Beyond the standard install, I added a line to log output, enabled WikiEditor 0.5.2, and added the DarkVector skin. After starting to add categories, the category pages would not populate "automatically." I've seen several posts on various sites dated 2016 and 2018 mainly. Manually forcing a RefreshLinks on command line populates the categories. After failing to find a valid or even contemporary solution, I set up the log and found every page load was generating a version of the following error (several maybe sensitive bits obscured):

-- log excerpt begins

[runJobs] htmlCacheUpdate User:USERNAME table=redirect recursive=1 rootJobIsSelf=1 rootJobSignature=ffff rootJobTimestamp=0000 causeAction=page-edit causeAgent=unknown requestId=XXXX (id=5,timestamp=0000) STARTING

[exception] [XXXX] /w/index.php?title=PAGE   Wikimedia\Rdbms\DBUnexpectedError from line 4030 of /ROOTPATH/w/includes/libs/rdbms/database/Database.php: HTMLCacheUpdateJob::run: Cannot flush snapshot because writes are pending (JobQueueDB::claimRandom).

#0 /ROOTPATH/w/includes/libs/rdbms/loadbalancer/LoadBalancer.php(1622): Wikimedia\Rdbms\Database->flushSnapshot(string)

#1 /ROOTPATH/w/includes/libs/rdbms/loadbalancer/LoadBalancer.php(1786): Wikimedia\Rdbms\LoadBalancer->Wikimedia\Rdbms\{closure}(Wikimedia\Rdbms\DatabaseSqlite)

#2 /ROOTPATH/w/includes/libs/rdbms/loadbalancer/LoadBalancer.php(1623): Wikimedia\Rdbms\LoadBalancer->forEachOpenMasterConnection(Closure)

#3 /ROOTPATH/w/includes/libs/rdbms/loadbalancer/LoadBalancer.php(1388): Wikimedia\Rdbms\LoadBalancer->flushMasterSnapshots(string)

#4 /ROOTPATH/w/includes/libs/rdbms/lbfactory/LBFactory.php(219): Wikimedia\Rdbms\LoadBalancer->beginMasterChanges(string)

#5 /ROOTPATH/w/includes/libs/rdbms/lbfactory/LBFactorySimple.php(152): Wikimedia\Rdbms\LBFactory->Wikimedia\Rdbms\{closure}(Wikimedia\Rdbms\LoadBalancer, string, array)

#6 /ROOTPATH/w/includes/libs/rdbms/lbfactory/LBFactory.php(221): Wikimedia\Rdbms\LBFactorySimple->forEachLB(Closure, array)

#7 /ROOTPATH/w/includes/libs/rdbms/lbfactory/LBFactory.php(246): Wikimedia\Rdbms\LBFactory->forEachLBCallMethod(string, array)

#8 /ROOTPATH/w/includes/jobqueue/JobRunner.php(288): Wikimedia\Rdbms\LBFactory->beginMasterChanges(string)

#9 /ROOTPATH/w/includes/jobqueue/JobRunner.php(192): JobRunner->executeJob(HTMLCacheUpdateJob, Wikimedia\Rdbms\LBFactorySimple, BufferingStatsdDataFactory, integer)

#10 /ROOTPATH/w/includes/MediaWiki.php(1001): JobRunner->run(array)

#11 /ROOTPATH/w/includes/MediaWiki.php(984): MediaWiki->triggerSyncJobs(integer, MediaWiki\Logger\LegacyLogger)

#12 /ROOTPATH/w/includes/MediaWiki.php(908): MediaWiki->triggerJobs()

#13 /ROOTPATH/w/includes/MediaWiki.php(726): MediaWiki->restInPeace(string, boolean)

#14 /ROOTPATH/w/includes/MediaWiki.php(749): MediaWiki->{closure}()

#15 /ROOTPATH/w/includes/MediaWiki.php(550): MediaWiki->doPostOutputShutdown(string)

#16 /ROOTPATH/w/index.php(42): MediaWiki->run()

#17 {main}

[runJobs] htmlCacheUpdate User:USERNAME table=redirect recursive=1 rootJobIsSelf=1 rootJobSignature=ffff rootJobTimestamp=0000 causeAction=page-edit causeAgent=unknown requestId=XXXX (id=5,timestamp=0000) t=1 error=Wikimedia\Rdbms\DBUnexpectedError: HTMLCacheUpdateJob::run: Cannot flush snapshot because writes are pending (JobQueueDB::claimRandom).

Request ended normally

-- log excerpt ends

Only idea I have is a conflict in current pairing of php x sqlite and even x mediawiki but I haven't found any mentions. Possibly, I don't know what to look for. 184.195.209.100 (talk) 01:16, 24 February 2020 (UTC)

Problem to login with OuthAuth Plugin

Now I could not make login after I inputted correct 2FA numbers.

[XlKqEmLnWDD73fb2L9iWcwAAAAE] /index.php?title=%ED%8A%B9%EC%88%98:%EB%A1%9C%EA%B7%B8%EC%9D%B8&returnto=%EC%9C%84%ED%82%A4:%EB%8C%80%EB%AC%B8 Error from line 151 of /(wiki directory)/wiki/extensions/OATHAuth/src/Key/TOTPKey.php: Class 'jakobo\HOTP\HOTP' not found Backtrace:

  1. 0 /(wiki directory)/wiki/extensions/OATHAuth/src/Module/TOTP.php(88): MediaWiki\Extension\OATHAuth\Key\TOTPKey->verify(array, MediaWiki\Extension\OATHAuth\OATHUser)
  2. 1 /(wiki directory)/wiki/extensions/OATHAuth/src/Auth/TOTPSecondaryAuthenticationProvider.php(110): MediaWiki\Extension\OATHAuth\Module\TOTP->verify(MediaWiki\Extension\OATHAuth\OATHUser, array)
  3. 2 /(wiki directory)/wiki/extensions/OATHAuth/src/Auth/SecondaryAuthenticationProvider.php(65): MediaWiki\Extension\OATHAuth\Auth\TOTPSecondaryAuthenticationProvider->continueSecondaryAuthentication(User, array)
  4. 3 /(wiki directory)/wiki/includes/auth/AuthManager.php(651): MediaWiki\Extension\OATHAuth\Auth\SecondaryAuthenticationProvider->continueSecondaryAuthentication(User, array)
  5. 4 /(wiki directory)/wiki/includes/specialpage/AuthManagerSpecialPage.php(356): MediaWiki\Auth\AuthManager->continueAuthentication(array)
  6. 5 /(wiki directory)/wiki/includes/specialpage/AuthManagerSpecialPage.php(484): AuthManagerSpecialPage->performAuthenticationStep(string, array)
  7. 6 /(wiki directory)/wiki/includes/htmlform/HTMLForm.php(690): AuthManagerSpecialPage->handleFormSubmit(array, VFormHTMLForm)
  8. 7 /(wiki directory)/wiki/includes/specialpage/AuthManagerSpecialPage.php(417): HTMLForm->trySubmit()
  9. 8 /(wiki directory)/wiki/includes/specialpage/LoginSignupSpecialPage.php(313): AuthManagerSpecialPage->trySubmit()
  10. 9 /(wiki directory)/wiki/includes/specialpage/SpecialPage.php(575): LoginSignupSpecialPage->execute(NULL)
  11. 10 /(wiki directory)/wiki/includes/specialpage/SpecialPageFactory.php(611): SpecialPage->run(NULL)
  12. 11 /(wiki directory)/wiki/includes/MediaWiki.php(296): MediaWiki\Special\SpecialPageFactory->executePath(Title, RequestContext)
  13. 12 /(wiki directory)/wiki/includes/MediaWiki.php(900): MediaWiki->performRequest()
  14. 13 /(wiki directory)/wiki/includes/MediaWiki.php(527): MediaWiki->main()
  15. 14 /(wiki directory)/wiki/index.php(44): MediaWiki->run()
  16. 15 {main} Ellif (talk) 19:19, 24 February 2020 (UTC)
Seems the composer dependencies of your oathauth extension install are not installed.
You might want to read Composer#Using_composer-merge-pluginTheDJ (Not WMF) (talkcontribs) 19:48, 24 February 2020 (UTC)
It seems not.
[~/wiki] # composer require jakobo/hotp-php
Using version ^1.0 for jakobo/hotp-php
./composer.json has been updated
> ComposerHookHandler::onPreUpdate
Loading composer repositories with package information
Updating dependencies (including require-dev) Ellif (talk) 06:15, 25 February 2020 (UTC)

CodeEditor and CodeMirror together

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


I started to use Extension:CodeEditor the other day, and it works well for CSS and JS pages.

Today I read about Extension:CodeMirror (which does similar for wikitext) on User:Jeroen De Dauw's website. I think this will send him a ping: @Jeroen De Dauw:

Of course I'll install CodeMirror and give it a go, but does anyone know already whether these two extensions work well together? Thanks. Jonathan3 (talk) 20:33, 24 February 2020 (UTC)

Both are actively in use on the WMF sites, as can be observed on Special:Version. —TheDJ (Not WMF) (talkcontribs) 23:55, 24 February 2020 (UTC)
Thanks. Jonathan3 (talk) 15:30, 28 February 2020 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

upgrade to MW 1.33, problems with Arrays extension

I upgraded my database from MW 1.31 to 1.33, but I am having problems with the Arrays extension, specifically seeing strip markers (e.g. UNIQ--nowiki-ArrayArrayArrayArrayArrayArrayArray6-QINU) in the rendered page and the following errors:
Notice: Array to string conversion in extensions/Arrays/ExtArrays.php on line 1216
Warning: Cannot modify header information - headers already sent by (output started at /extensions/Arrays/ExtArrays.php:1216) in /includes/WebResponse.php on line 72
Login credentials below. Any help much appreciated!
http://names.tyndalehouse.com/mediawiki-1.33.0/index.php/Main_Page
Username: TestUser
Password: MotorcyleBeast456
MediaWiki 1.33.0
PHP 7.2.24-0ubuntu0.18.04.1 (apache2handler)
MySQL 8.0.17

50.233.98.57 (talk) 22:01, 24 February 2020 (UTC)

1.33.0 is an old insecure version. Please stay safe. For 1.33.x, that would be version 1.33.2 currently. Malyacko (talk) 10:04, 25 February 2020 (UTC)
Extension:Arrays - This extension is currently not actively maintained! Although it may still work, any bug reports or feature requests will more than likely be ignored.
If you are interested in taking on the task of developing and maintaining this extension, you can request repository ownership. As a courtesy, you may want to contact the author. You should also remove this template and list yourself as maintaining the extension in the page's infobox. —TheDJ (Not WMF) (talkcontribs) 23:52, 24 February 2020 (UTC)
I realize the extension is not maintained, but I still need to do this upgrade. I'm open to alternatives to the Arrays extension, if you know of any. 50.233.98.57 (talk) 19:42, 26 February 2020 (UTC)
This turned out to be a problem with the latest version (2.2.0) of the Arrays extension, which seems to be in a non-functional state (see Arrays talk page for more info). Fixed by reverting to an earlier version. 108.7.72.249 (talk) 13:40, 30 March 2020 (UTC)

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


Hi Support Desk,

Could you please help us providing any maintenance script exist in WIKI/maintenance to update the domain for external links under wiki pages?


Thanks you!

Sanjay SanjayKSahu (talk) 13:10, 25 February 2020 (UTC)

See if Extension:Replace Text helps. AhmadF.Cheema (talk) 14:14, 25 February 2020 (UTC)
If you mean, the external links that appear in Special:LinkSearch, use refreshLinks.php Bawolff (talk) 20:33, 25 February 2020 (UTC)
I have tried to use this wiki/index.php/Special:ReplaceText and I got 156 pages are successfully selected to replace below .
"http://sdp.domain.no" will be replaced with "https://sdp.domain.com" in 156 pages
But, nothing has changed after run this. I am surprised. SanjayKSahu (talk) 06:43, 27 February 2020 (UTC)
try running runJobs.php maintenance script, or just wait a little and see if it happens. Bawolff (talk) 09:41, 27 February 2020 (UTC)
Thanks, all jobs ran successfully with following command and I could see required domain link has been updated in all 156 pages.
php runJobs.php -v --memory-limit=max --conf=/data/www/html/wiki/LocalSettings.php -s 1 SanjayKSahu (talk) 07:07, 2 March 2020 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Install error

I'm currently receiving the following error on a fresh install of media wiki. I've not seen this before so any help would be greatly appreciated.


[XlUxDInaLdpKzzb5@CIEigAAACI] /mw-config/index.php?page=Install Wikimedia\Rdbms\DBQueryError from line 1603 of /home/vol1000_5/epizy.com/epiz_25226591/htdocs/includes/libs/rdbms/database/Database.php: A database query error has occurred. Did you forget to run your application's database schema updater after upgrading?

Query: CREATE TABLE `wikiuser` (

user_id int unsigned NOT NULL PRIMARY KEY AUTO_INCREMENT,

user_name varchar(255) binary NOT NULL default '',

user_real_name varchar(255) binary NOT NULL default '',

user_password tinyblob NOT NULL,

user_newpassword tinyblob NOT NULL,

user_newpass_time binary(14),

user_email tinytext NOT NULL,

user_touched binary(14) NOT NULL default '',

user_token binary(32) NOT NULL default '',

user_email_authenticated binary(14),

user_email_token binary(32),

user_email_token_expires binary(14),

user_registration binary(14),

user_editcount int,

user_password_expires varbinary(14) DEFAULT NULL

) ENGINE=, DEFAULT CHARSET=binary

Function: Wikimedia\Rdbms\Database::sourceFile( /home/vol1000_5/epizy.com/epiz_25226591/htdocs/maintenance/tables.sql )

Error: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' DEFAULT CHARSET=binary' at line 17 (sql308.epizy.com)

Backtrace:

#0 /home/vol1000_5/epizy.com/epiz_25226591/htdocs/includes/libs/rdbms/database/Database.php(1574): Wikimedia\Rdbms\Database->getQueryExceptionAndLog(string, integer, string, string)

#1 /home/vol1000_5/epizy.com/epiz_25226591/htdocs/includes/libs/rdbms/database/Database.php(1152): Wikimedia\Rdbms\Database->reportQueryError(string, integer, string, string, boolean)

#2 /home/vol1000_5/epizy.com/epiz_25226591/htdocs/includes/libs/rdbms/database/Database.php(4539): Wikimedia\Rdbms\Database->query(string, string)

#3 /home/vol1000_5/epizy.com/epiz_25226591/htdocs/includes/libs/rdbms/database/Database.php(4474): Wikimedia\Rdbms\Database->sourceStream(resource (closed), NULL, NULL, string, NULL)

#4 /home/vol1000_5/epizy.com/epiz_25226591/htdocs/includes/installer/DatabaseInstaller.php(228): Wikimedia\Rdbms\Database->sourceFile(string)

#5 /home/vol1000_5/epizy.com/epiz_25226591/htdocs/includes/installer/DatabaseInstaller.php(251): DatabaseInstaller->stepApplySourceFile(string, string, boolean)

#6 /home/vol1000_5/epizy.com/epiz_25226591/htdocs/includes/installer/Installer.php(1624): DatabaseInstaller->createTables(MysqlInstaller)

#7 /home/vol1000_5/epizy.com/epiz_25226591/htdocs/includes/installer/WebInstallerInstall.php(44): Installer->performInstallation(array, array)

#8 /home/vol1000_5/epizy.com/epiz_25226591/htdocs/includes/installer/WebInstaller.php(270): WebInstallerInstall->execute()

#9 /home/vol1000_5/epizy.com/epiz_25226591/htdocs/mw-config/index.php(80): WebInstaller->execute(array)

#10 /home/vol1000_5/epizy.com/epiz_25226591/htdocs/mw-config/index.php(38): wfInstallerMain()

#11 {main} 194.74.17.228 (talk) 14:54, 25 February 2020 (UTC)

Hi! Did you run Update.php? Also, which version of MediaWiki you are trying to install? User:SSethi_(WMF) 20:15, 25 February 2020 (UTC)
What is $wgDBTableOptions set to? I think it's set to something wrong. It should be something like $wgDBTableOptions = "ENGINE=InnoDB, DEFAULT CHARSET=binary"; Bawolff (talk) 20:24, 25 February 2020 (UTC)
Wait, this is in the installer. This would probably indicate _MysqlEngine is set to the empty string. I'm not sure how that could happen. Are you using the normal installer? Did you get MediaWiki from the official site?
Can you do the SQL query SHOW ENGINES; and tell us the results?
During the installer, on the MySQL settings step, what did you select for Storage engine: option? Bawolff (talk) 20:32, 25 February 2020 (UTC)
I am also having this issue while attempting to install MediaWiki 1.35 from GitHub. Sam1370 (talk) 21:18, 2 May 2020 (UTC)
Any solution? I have the excact problem 195.139.66.45 (talk) 19:56, 24 August 2020 (UTC)
people who are having the same issue should also answer my comment above asking for more details. Bawolff (talk) 00:39, 26 August 2020 (UTC)
The following is what I get when I query SHOW ENGINES;
Engine Support Comment Transactions XA Savepoints
PERFORMANCE_SCHEMA YES Performance Schema NO NO NO
CSV YES CSV storage engine NO NO NO
MRG_MYISAM YES Collection of identical MyISAM tables NO NO NO
BLACKHOLE YES /dev/null storage engine (anything you write to it... NO NO NO
MyISAM DEFAULT MyISAM storage engine NO NO NO
FEDERATED NO Federated MySQL storage engine NULL NULL NULL
ARCHIVE YES Archive storage engine NO NO NO
MEMORY YES Hash based, stored in memory, useful for temporary... NO NO NO
InnoDB NO Percona-XtraDB, Supports transactions, row-level l... NULL NULL NULL

69.181.241.89 (talk) 21:56, 14 September 2020 (UTC)

well you have both InnoDB and MyISAM which are the two mw looks for, so idk. Bawolff (talk) 05:55, 23 October 2020 (UTC)

Disable or Uncheck "Leave a redirect behind"

I'd like to disable, or at least make the default unchecked for "Leave a redirect behind" when a user moves a page. Is that possible? Jer Hughes (talk) 04:59, 26 February 2020 (UTC)

You could maybe add the following to the page MediaWiki:Common.js
if ( mw.config.get( 'wgCanonicalSpecialPageName' ) === 'Movepage' ) { $( function () { i= $( 'input[name=wpLeaveRedirect]' ); if ( i.length ) { i[0].checked = false; } } ) }
Bawolff (talk) 14:31, 26 February 2020 (UTC)

I am not very familiar with how copyrights are documented here.

The file

File:VLC 3.0.9 on Fedora Linux 31 and GNOME Shell 3.34 -- playing Spring, a short film by Blender Foundation.png

Looks like it is claiming that it is a screenshot from free and open source software (which VLC is) but does not appear to mention the copyright status of the Spring film itself.

Spring is under a Creative Commons Attribution 4.0 International license (CC BY 4.0). See

https://www.blender.org/press/spring-open-movie/

https://cloud.blender.org/p/spring/about

Should we somehow indicate the copyright status of the movie the screenshot is from as well as the copyright status of the software that the screenshot was taken from? Guy Macon (talk) 05:25, 26 February 2020 (UTC)

Both should be mentioned, if it's intended to be associated with both. Having separate sections for each - let's call it, component - of the screenshot with license info seems to be the best course of action. DSquirrelGM𝓣𝓟𝓒 05:57, 26 February 2020 (UTC)
honestly, i would much prefer these types of files be at commons. Local uploads are a it of a mess. Bawolff (talk) 07:35, 26 February 2020 (UTC)
Can someone please make the proper copyright notices happen? I don't know how. --Guy Macon (talk) 10:42, 26 February 2020 (UTC)
i just took a look at the image. File:VLC 3.0.9 on Fedora Linux 31 and GNOME Shell 3.34 -- playing Spring, a short film by Blender Foundation.png isn't even on this wiki. I am confused why you are asking us? Commons:COM:Help desk would be a better place. Bawolff (talk) 13:34, 26 February 2020 (UTC)
anyways, i fixed the file, but for future reference, non technical questions about images hosted at Wikimedia Commons should be directed to Wikimedia Commons. This page is for technical help using MediaWiki, with an emphasis on helping people who are using MediaWiki outside the Wikimedia movement. Bawolff (talk) 13:41, 26 February 2020 (UTC)

create account using SQL query

HI~

I want to create an account using a query (mysql).

But I don't know how to encrypt the password. Help me.



INSERT INTO user(

user_name,

user_password,

user_newpassword,

user_email,

user_touched,

user_email_token,

user_registration,

user_editcount) values (

'g',

???????????,

'',

'',

date_format(now(), '%Y%m%d%H%i%s'),

'',

date_format(now(), '%Y%m%d%H%i%s'),

0);
Sskorkim (talk) 06:43, 26 February 2020 (UTC)

dont do this. For starters you will have referential integrity issues with actor table.
Use createAndPromote.php instead Bawolff (talk) 07:34, 26 February 2020 (UTC)

Email address during registration

Hello,

How to make it obligatory to indicate email address during registration? Fokebox (talk) 07:39, 26 February 2020 (UTC)

None that I'm aware of. However, you can require it to be confirmed to edit: Manual:$wgEmailConfirmToEdit Ciencia Al Poder (talk) 10:41, 26 February 2020 (UTC)
What about trying Extension:ConfirmAccount? Jonathan3 (talk) 13:41, 26 February 2020 (UTC)
It has another function but I want to make obligatory condition to indicate email while registration Fokebox (talk) 09:23, 10 April 2020 (UTC)
Does this help? Manual:SessionManager_and_AuthManager/Adding_fields_to_the_registration_form. Jonathan3 (talk) 21:21, 12 April 2020 (UTC)
Email is already a field on the registration form. But it's not required.
Looks like there's no hook you can use to abort the creation of the account if the email is not present (the existing hooks are run after the account has been created, not before). Looks like you should implement a new authentication provider for this. Ciencia Al Poder (talk) 14:29, 13 April 2020 (UTC)
Ok, thanks! Fokebox (talk) 14:37, 13 April 2020 (UTC)

Security issuse of MediaWiki

Hi,

I am using Mediawiki version 1.33.0 with Visual Editor installed (hosted on CentOS 7). When i use some scanning tools to scan my site, the following issue pops out. May I ask if there is any way to handle it?  Thank you!


CGI abuses: CGI Generic Unseen Parameters Discovery TCP 80

Plugin Output:

Using the GET HTTP method, Nessus found that :

+ The following resources may be vulnerable to unseen parameters :

+ The 'debug' parameter of the /mw/load.php CGI :

/mw/load.php?lang=en&modules=ext.visualEditor.desktopArticleTarget.noscr

ipt%257Cmediawiki.legacy.commonPrint%252Cshared%257Cmediawiki.skinning.i

nterface%257Cskins.vector.styles&only=styles&skin=vector&debug=1

-------- output --------

/*

Problematic modules: {"ext.visualEditor.desktopArticleTarget.noscript%7C

mediawiki.legacy.commonPrint%2Cshared%7Cmediawiki.skinning.interface%7Cs

kins.vector.styles":"missing"}

*/

-------- vs --------

/*

Problematic modules: {

"ext.visualEditor.desktopArticleTarget.noscript%7Cmediawiki.le [...]

}

------------------------

Synopsis:

A CGI application hosted on the remote web server is potentially prone to information disclosure or privilege escalation.

Description:

By sending requests with additional parameters such as 'admin', 'debug', or 'test' to CGI scripts hosted on the remote web server, Nessus was able to generate at least one significantly different response even though the parameters themselves do not actually appear in responses.

This behavior suggests that such a parameter, while unseen, are used by the affected application(s) and may enable an attacker to bypass authentication, read confidential data (like the source of the scripts), modify the behavior of the application(s) or conduct similar attacks to gain privileges.

Note that this script is experimental and may be prone to false positives.

Solution:

Inspect the reported CGIs and, if necessary, modify them so that security is not based on obscurity. Keithsuen (talk) 08:13, 26 February 2020 (UTC)

its not a real issue. The report is saying output is different depending on if you specify debug mode or not, which is expected. The reason its complaining is that if instead of debug, there was a parameter named BeAdmin that turned you into an admin, that would be a problem. However debug is safe so nothing to see here.
Automated scan tools often lean on the side of report everything possible no matter how far fetched. As a result they often have a high false positive rate, so you need to verify their findings are really true. Bawolff (talk) 08:46, 26 February 2020 (UTC)

"String Functions" do not exist?

Help:Extension:ParserFunctions#StringFunctions lists various string functions, but they seem currently unavailable. Is there a workaround for extracting a single character from a string from a template input? AngeCI (talk) 10:26, 26 February 2020 (UTC)

On WMF wikis, Help:Lua Ciencia Al Poder (talk) 10:37, 26 February 2020 (UTC)
Though I'm not working on WMF wikis, my wiki currently seems to support Lua. However, I would avoid using it because I don't know when this functionality would be removed (since this did happen on other extensions, there's basically no way to have an effective communication between active users and the site administrator, and the site administrator is always randomly adding or removing extension) and there's no other Lua stuffs existing on my wiki currently. AngeCI (talk) 11:01, 26 February 2020 (UTC)
Whether or not string functions are enabled depends on if $wgPFEnableStringFunctions = true; is set. It is not set by default. You would have to talk to your hosting provider for getting it set. I would generally recommend lua instead, which is much more flexible than string functions. Bawolff (talk) 13:53, 26 February 2020 (UTC)
Well, I would probably use some JavaScript workaround for my project for portability reasons and prevent unintended modification or removal of extensions (since it is extremely hard for other users to communicate with the hosting provider). AngeCI (talk) 14:03, 26 February 2020 (UTC)
Maybe you should get a new hosting provider. If they are randomly taking stuff away, what makes you think they wouldn't take away javascript access? Bawolff (talk) 14:13, 26 February 2020 (UTC)
This is off topic, but this is indeed a persistent problem for our wiki. Almost all old users have already quit or disappeared, and mainly new users are contributing to the wiki nowadays. I am probably the only active member of the wiki who is able to deal with technical problems. AngeCI (talk) 14:38, 26 February 2020 (UTC)
Oh i guess i never answered your question.
You can sort of use padleft as a work around - see manual:Magic words.
Basically padleft lets you get a left-most prefix of a string. For example to get the first three characters do:
{{padleft:|3|abcdefgh}}
There's some complex stuff you can do to get the right-most characters [11]. it is much slower and less efficient than lua. Bawolff (talk) 14:21, 26 February 2020 (UTC)
JavaScript is part of MediaWiki core, it can't be taken away, and I have a sysop right on that wiki. I'm just asking if there is any workaround as if my wiki have no Lua support. AngeCI (talk) 14:21, 26 February 2020 (UTC)
> JavaScript is part of MediaWiki core, it can't be taken away,
That's definitely not true ($wgUseSiteJs), but i suppose that is neither here nor there. Bawolff (talk) 14:23, 26 February 2020 (UTC)

Parsiod & Node.js

I have installed Visual Editor and Html2Wiki extensions on my wiki. I was haveing difficulty getting both running and got a Curl 7 error. I suspected that it may be configuration on my shared hosting so I asked them and they have responded as follows:


'Please note that the mentioned Node.Js engine is not available on any of our hosting plans. This being said, I am afraid to inform you that running the mentioned extension called Parsoid would not be possible on our shared or Cloud hosting platforms.'


My research found that VE had been converted to php, is that true? and the Parsoid page on MediaWiki says this ' In 2019, Parsoid was ported to PHP, and the PHP version replaced the JS version on the Wikimedia cluster in Dec. 2019. '


So it sound like it shouldn't need Node.Js?


Can anyone advise please? Lizat17 (talk) 11:01, 26 February 2020 (UTC)

It has been, but the php port is fairly new and a bit experimental. There are also like almost no docs anywhere.
It appears you do something along the lines of: (Assuming parsoid is installed in extensions/Parsoid). This also assumes you are using latest version of MediaWiki (or possibly even master branch
wfLoadExtension( 'Parsoid/PHP', "$IP/extensions/Parsoid/extension.json" );
$wgVirtualRestConfig['modules']['parsoid'] = [
        'url' => $wgServer . $wgScriptPath . '/rest.php',
        'restbaseCompat' => false
];
That's my best guess anyways. I don't really know. Your millage may vary. Bawolff (talk) 14:11, 26 February 2020 (UTC)
Thank you @
Bawolff This doesn't quite work it hangs: https://www.screencast.com/t/vrh7E4pW
I commented out the original Parsoid VE li which was:
#enable Parsoid to talk to VE
$wgVirtualRestConfig['modules']['parsoid'] = array(
    // URL to the Parsoid instance
    // Use port 8142 if you use the Debian package
    'url' => 'http://localhost:8000');
So now I have:
#Load Parsoid php (experimental, code supplied by Bawolff at WM Support)
wfLoadExtension( 'Parsoid/PHP', "$IP/extensions/Parsoid/extension.json" );
$wgVirtualRestConfig['modules']['parsoid'] = [
        'url' => $wgServer . $wgScriptPath . '/rest.php',
        'restbaseCompat' => false
];
#-------
# load the visual editor
wfLoadExtension( 'VisualEditor' );
// Enable by default for everybody
$wgDefaultUserOptions['visualeditor-enable'] = 1;
I tried Edit Source and got this error, does it provide any clues?
Fatal error: Uncaught Exception: Unable to open file /home/groktor4/public_html/wiki/extensions/Parsoid/extension.json: filemtime(): stat failed for /home/groktor4/public_html/wiki/extensions/Parsoid/extension.json in /home/groktor4/public_html/wiki/includes/registration/ExtensionRegistry.php:136 Stack trace: #0 /home/groktor4/public_html/wiki/includes/GlobalFunctions.php(52): ExtensionRegistry->queue('/home/groktor4/...') #1 /home/groktor4/public_html/wiki/LocalSettings.php(164): wfLoadExtension('Parsoid/PHP', '/home/groktor4/...') #2 /home/groktor4/public_html/wiki/includes/Setup.php(124): require_once('/home/groktor4/...') #3 /home/groktor4/public_html/wiki/includes/WebStart.php(81): require_once('/home/groktor4/...') #4 /home/groktor4/public_html/wiki/index.php(41): require('/home/groktor4/...') #5 {main} thrown in /home/groktor4/public_html/wiki/includes/registration/ExtensionRegistry.php on line 136
If you don't know what more I should do can you suggest somewhere else to ask?
Thank you Lizat17 (talk) 09:48, 27 February 2020 (UTC)
the php parsoid port is still new and very experimental. To a certain extent you are going to be on your own. You can try asking in the #wikimedia-visualeditor irc channel (or other irc chsnnels. Not sure which is the best) on freenode maybe. Bawolff (talk) 10:00, 27 February 2020 (UTC)

Can't login or change password - only one account

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


Sysop account

When I try to log in at Special:UserLogin it says "The supplied credentials could not be authenticated."

When I try to reset password at Special:PasswordReset it says "The password reset was not handled. Maybe no provider was configured?"

When I try to change my password using changePassword.php it says:

[xxx] [no req] PasswordError from line 62 of xxx/maintenance/changePassword.php: * The supplied credentials cannot be changed, as nothing would use them.

*The authentication data change was not handled. Maybe no provider was configured?

Backtrace:

  1. 0 xxx/maintenance/doMaintenance.php(94): ChangePassword->execute()
  2. 1 xxx/maintenance/changePassword.php(73): require_once(string)
  3. 2 {main}

I initially couldn't log in using the phone, so tried the PC. I was still logged in on the PC, but when I logged out I coudn't log back in again.

Another account is fine...

However, when I enter a different account name the password reset works fine (it says it's sent an email).

When I run changePassword.php for that account it works: "Password set for xxx".

Then when I go to UserLogin, it works fine and I can log in.

General

I was experimenting with something and absent-mindedly left "Access-Control-Allow-Origin *" (see in w:Cross-origin resource sharing) in .htaccess for a several hours and wonder if this may have been a mistake...

I have installed a few new extensions in the last day or so, but think I've commented them all out in LocalSettings.php (and it still does the above).

Something similar happened in Project:Support desk/Flow/2017/12#h-ChangePassword.php_error-2017-12-20T21:42:00.000Z but $wgAuthManagerConfig / $wgAuthManagerAutoConfig seem to be the default, $wgReservedUsernames doesn't include any of my wiki's users, I'm not using extension NewUserMessage. (I've not gone through the thread in detail so don't understand it all yet.)

The sysop user still exists in the database table.

I have only tried these two accounts so far.

What more information would you like? I would be grateful for any help. Jonathan3 (talk) 01:41, 27 February 2020 (UTC)

P.S. I'm on MW version 1.31.1, and do plan to upgrade as soon as possible. Thanks. Jonathan3 (talk) 01:44, 27 February 2020 (UTC)
createAndPromote.php couldn't change the password either (same error) but I was able to create a new sysop account. Is there any way of moving the edit history etc of the original sysop account to this new one, deleting the old one and renaming this one? (If I can't work out the problem above.) Thanks. Jonathan3 (talk) 02:39, 27 February 2020 (UTC)
extension:renameuser
What's the account name?
Cors related settings do not effect this. Bawolff (talk) 09:44, 27 February 2020 (UTC)
Thanks. The account name is Jonathan. I'm pleased it's not related to that CORS setting.
I reset the password while trying to solve the problem last night. Today I was still getting the error "The supplied credentials could not be authenticated" whether I used the right password or wrong.
Since renaming it today using Extension:Renameuser to Jonathan1 I can log in no bother.
But when I try to rename it back again to see what it does, it says "The username "Jonathan" is invalid."
I guess this (combined with the other things) means that somehow it's a problem with the username rather than the user ID.
Here are some ideas:
  1. Sometimes I use the one or more of the LocalSettings.php debug variables ($wgShowExceptionDetails, $wgShowSQLErrors, $wgShowDebug, $wgShowDBErrorBacktrace) without hiding the wiki from view. I hate to admit that here. Do you think someone has gleaned some information from that to cause the problem?
  2. Recently I used Extension:Replace Text using the original sysop account (previously I'd used the name of a bot account), both on the command line (unsuccessfully) and the web interface. It seems unlikely to be linked but what do you think? @Yaron Koren
  3. I don't have any authentication extensions but recently added Extension:ConfirmAccount. I can't remember if I logged out and in since then (though I think I probably would have). I've disabled it for now anyway. @Aaron Schulz
I could keep things as they are, but I would like to get to the bottom of this! Jonathan3 (talk) 12:00, 27 February 2020 (UTC)
Finally! I have the answer. It seems to be a problem with my use of the variable $wgReplaceTextUser.
I had recently set it to "Jonathan". When I changed it just now to another username, I was able to rename my original sysop account back to "Jonathan", and was able to log in as normal, with no errors.
However... this caused exactly the same "supplied credentials could not be authenticated" problem with that other username... so I've removed that line altogether which removed the problem entirely. Jonathan3 (talk) 12:30, 27 February 2020 (UTC)
P.S. I was on ReplaceText REL1_31 but it's the same for the latest code too. Jonathan3 (talk) 13:50, 27 February 2020 (UTC)
Looks like it's this part of ReplaceTextHooks.php, at line 63:
	/**
	 * Implements UserGetReservedNames hook.
	 * @param array &$names
	 */
	public static function getReservedNames( &$names ) {
		global $wgReplaceTextUser;
		if ( !is_null( $wgReplaceTextUser ) ) {
			$names[] = $wgReplaceTextUser;
		}
	}
I had been checking the value of Manual:$wgReservedUsernames ("Array of usernames which may not be registered or logged in from.") in LocalSettings.php, which I guess was too soon. (What would have been the right way?)
If this is correct, then maybe the ReplaceText documentation should be amended to explain the situation. Jonathan3 (talk) 14:10, 27 February 2020 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

MobileFrontend/MinervaNeue Loads Then Clears Template

I'm using the preload and preloadparams[] parameters to preload content into my new pages. My URLs look like this: /w/index.php?title=Foo&action=edit&preload=Template:New_page&preloadparams%5b%5d=bar

This works great for Vector, but if the use has MobileFrontend/MinervaNeue the editing page shows the content, then it appears to clear the content. Is there a way I can prevent it from doing that? Jer Hughes (talk) 04:56, 27 February 2020 (UTC)

Disable MobileFrontend/MinervaNeue's Comment Section on Page Edits

I have a private wiki with a few editors. Most of our edits are made out in the field on our phones, so using MobileFrontend/MinervaNeue is very helpful. However, after every edit, the commenting page asking "How did you improve the page?" is a hindrance. For our use, we don't write comments. Is there a way to disable this page? Jer Hughes (talk) 05:04, 27 February 2020 (UTC)

Mailer problem

Hello!

I just finished installing a fresh MediaWiki.


Every time I try to get my email confirmed, I get the following message:

... could not send your confirmation mail. Please check your email address for invalid characters.

Mailer returned: Unknown error in PHP's mail() function.


Email address is correct.

Enabled logs but no luck there. No file was created.

Any help is welcome!


System info:

MediaWiki 1.34.0
PHP 7.4.3 (fpm-fcgi)
MySQL 5.6.40-84.0-log
ICU 50.2
pear/mail 1.4.1 BSD-2-Clause
pear/mail_mime 1.10.2 BSD-3-clause
pear/net_smtp 1.8.1 BSD-2-Clause


MaxwellJoneZ (talk) 10:24, 27 February 2020 (UTC)

check that the server has an mta installed (eg sendmail, qmail, etc) and configured correctly.
Or just use manual:$wgSMTP instead Bawolff (talk) 21:22, 27 February 2020 (UTC)

Log in with email address

Hi, I created an account and had forgotten that I had an account with same name so an email went to an old address of mine - how do I log in with new email address? 195.138.195.233 (talk) 12:59, 27 February 2020 (UTC)

You contact the owner of that website and try to proof somehow that you are the person who owns that old email address. Malyacko (talk) 14:48, 27 February 2020 (UTC)

image bad

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


Hi

I used the backbone option:

php dumpBackup.php --full> dump


And to upload from:

php dumpBackup.php --full > dump.xml


But then I uploaded the images manually.

  Does not show a series of images:

See link:

https://wikicod.ir/wiki/%D9%88%DB%8C%DA%98%D9%87:%D9%81%D9%87%D8%B1%D8%B3%D8%AA_%D9%BE%D8%B1%D9%88%D9%86%D8%AF%D9%87%E2%80%8C%D9%87%D8%A7


I'm glad you can help

With respect Sokote zaman (talk) 13:09, 27 February 2020 (UTC)

https://wikicod.ir/wiki/%D9%88%DB%8C%DA%98%D9%87:%D9%81%D9%87%D8%B1%D8%B3%D8%AA_%D9%BE%D8%B1%D9%88%D9%86%D8%AF%D9%87%E2%80%8C%D9%87%D8%A7 shows all images here. Malyacko (talk) 14:47, 27 February 2020 (UTC)
@Malyacko
Yes it does
Solved
Thanks for your follow up Sokote zaman (talk) 15:14, 27 February 2020 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

When using the * character why does it show a different character like ' ?

Please imagine you are somebody else and read this one line. Would you know what you refer to, and where...? Malyacko (talk) 14:46, 27 February 2020 (UTC)

Question about API: list all people's names in titles within Wikipedia

I am trying to using MediaWiki API to get all human names existing in wiki titles.

Is there a categorized GET request (or something else) to do that? Cvtaihou (talk) 15:28, 27 February 2020 (UTC)

How do you decide whether some group of characters is a "human name"? :) Malyacko (talk) 17:08, 27 February 2020 (UTC)
Actually there's a category in wikipedia called "People and self" and that is (approximately) what I want... Cvtaihou (talk) 19:56, 27 February 2020 (UTC)
you may also want to check out https://query.wikidata.org (it has a high learning curve but super powerful) Bawolff (talk) 21:19, 27 February 2020 (UTC)

question about wiki editing

Hi, i just edited the following page :

Manual:Short URL/Apache#setup

i am new to mediawiki software, my question is: what do the entries with "! double dash T colon |a number|" mean?

And why do they suddenly jump from 9 to 66?

Also, why is there no "translate" at the beginning of this section, but there is a "</translate>" - isn't the 2nd one supposed to end a translate section? So what is its function if there has been no translate command before it?

Also, why does every sentence towards the end of the section have separate "translate" and "</translate>" commands? is it not possible to do the command once at the beginning of the paragraph and do the "</translate>" at the end?

Finally, do you have recommendations for pages that i could read to learn about this, to avoid me having to ask you questions like this in the future?

many thanks for your help in advance!

Rik Wikirik123 (talk) 15:34, 27 February 2020 (UTC)

Hi and welcome! It's weird markup from Extension:Translate :) Malyacko (talk) 17:10, 27 February 2020 (UTC)

Create account/reset pwd timeouts and log-in failures

I have a mediawiki v1.34 over at https://wiki.vintagestory.at/ and rather suddenly I can no longer log in with my account. I get the message "Incorrect username or password entered. Please try again.".

I did not change my password. I also unsuccessfully tried to fix it using the direct database modification as suggested here: Manual:Resetting passwords#Direct database modification

Attempting to create an account or reset the password results in a timeout after a long time of loading. I can verify that it is not due to the SMTP settings.

This is all super weird to me and I have no idea on how to debug this. I'm the owner of the site so I can access all the files and database, if more information is needed.

Thanks for reading!


TyronX1 (talk) 15:54, 27 February 2020 (UTC)

i guess the timeout could be if pbkdf2 config had too many rounds ($wgPasswordConfig), but that would be really weird, so maybe its not that. Bawolff (talk) 21:55, 27 February 2020 (UTC)
Thank you for the response, Bawolff, I have not changed the value of $wgPasswordConfig. Are you aware of any debug option that would help me narrow down the cause? 2A03:EC00:B188:375:F57E:A2BC:16C0:825F (talk) 08:17, 28 February 2020 (UTC)
Ops, i was not logged in it seems TyronX1 (talk) 08:18, 28 February 2020 (UTC)
i mean, always check your error log just in case. If you are getting timeouts, you could try enabling profiling to see where mediawiki is getting stuck. Bawolff (talk) 16:28, 28 February 2020 (UTC)

Lost access to site login. How do I edit my site?

My web developer was the only one with access to my site and he recently passed away. Is there any way I can recover access to my website? I need to update some of the content.


Apparently the only admin account with editing access is WikiSysop, but I don't have the details for that and apparently there is no email attached to it to recover the password.


I also don't have access to the hosting/cpanel.


Any help much appreciated. 179.1.76.50 (talk) 19:07, 27 February 2020 (UTC)

you need some sort of access to cpanel (or ssh, ftp, etc) in order to recover in that situation. Bawolff (talk) 21:16, 27 February 2020 (UTC)
and then follow the steps in Manual:Resetting passwordsTheDJ (Not WMF) (talkcontribs) 12:31, 28 February 2020 (UTC)

Mw-config question

Hello, I am a security researcher, working on few sites which use MediaWiki, and those site haven't remove the mw-config file/folder on their site, i have reported to them i have got reply as

(Un)fortunately, we can't confirm your report as a real security threat. Attacker cannot start reinstalling process, without knowledge of current key, securely stored in config file.


How can i prove that its critical issue? Jessicano1 (talk) 19:41, 27 February 2020 (UTC)

it isnt a critical issue. Best practise is to remove, especially if you want a hardened install. But it is at best a hardening step. It is not a critical issue because you need a security key to start the process, and even if the attacker has that, it would be a pretty contrived situation where an attacker could do something malicious by running the web installer Bawolff (talk) 21:15, 27 February 2020 (UTC)

Upgrade question...

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


I've been tasked with upgrading our Mediawiki application. The upgrade path is a big jump:

Old:

New:

Product Version
MediaWiki 1.34.0
PHP 7.2.24-0ubuntu0.18.04.3 (apache2handler)
MariaDB 10.1.44-MariaDB-0ubuntu0.18.04.1
ICU 60.2

Not having any luck as to find the best way to get this upgrade done (new system is already online).

Is there any info on the best way to cut to old system over to the new one? Recommendations?

Thank you in advance! Etaulbee (talk) 20:40, 27 February 2020 (UTC)

well your lucky its 1.5 (1.4 is a pita to upgrade from).
Basically take a backup first of all. Then follow normal upgrading instructions (see manual:upgrading). In theory it should just work if your coming from 1.5. However upgrading from that old is prob not tested much. If it doesnt work, id say try and do it in steps - first to 1.16 and then to 1.34, but definitely try doing it in one shot first as it may just work. Bawolff (talk) 21:11, 27 February 2020 (UTC)
We'd also appreciate your feedback about the upgrade process, if you succeeded to do the one-step upgrade or if you did need to do multiple steps Ciencia Al Poder (talk) 10:25, 28 February 2020 (UTC)
I'll hopefully try this over the weekend - will post update.

Etaulbee (talk) 14:54, 28 February 2020 (UTC)
Forgot to update this - my apologies! Long story short, we're doing a manual cut over of data so no need to do an upgrade! Etaulbee (talk) 21:20, 17 March 2020 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

what is the cost of using Wikipedia api

what is the cost of using Wikipedia api 203.99.197.166 (talk) 09:43, 28 February 2020 (UTC)

it is free, but you need to comply with the API etiquetteTheDJ (Not WMF) (talkcontribs) 12:26, 28 February 2020 (UTC)

limit user creation to a specific email domain

Is there a way limit user creation to just emails that match anything@company.org ? 129.21.113.206 (talk) 14:41, 28 February 2020 (UTC)

I dont think email is required for account creation but you could use the ConfirmAccount extension. Jonathan3 (talk) 15:26, 28 February 2020 (UTC)

Hi all, i need some help with Enabling the sitelinks in my Wikibase installation. I have Wikimedia 1.34 and Wikibase 1.34 installed.

I am trying to follow this guideline: Wikibase/Installation#Enable Sitelinks but i'm stuck. I followed the instructions in step 1 to create the custom groups in my LocalSettings.php. There was no such entry yet in the LocalSettings.php file, so i made a new one. This appears to have worked. I used this code:

$wgWBRepoSettings['siteLinkGroups'] = [ 'Wikidata', 'Wikimedia Commons', 'MediaWiki', 'Wikispecies', 'Wikibooks', 'Wikimania', 'Wikinews', 'Wikipedia', 'Wikiquote', 'Wikisource', 'Wikiversity', 'Wikivoyage', 'Wiktionary', 'OpenStreetMap', 'other sites' ];

I also followed the actions under step 2.

Then, in step 3 i am instructed to add the sitelinks to my repo-wiki, but here i really do not know what to do. The instructions are unclear to me, i'm not sure what edit where, even with the specific instructions that Step 3 refers to.

Any help would be much appreciated!!


Wikirik123 (talk) 16:05, 28 February 2020 (UTC)

Any help, anyone? Wikirik123 (talk) 16:10, 28 February 2020 (UTC)
Hello. Please note in the $wgWBRepoSettings['siteLinkGroups'] you need to add groups of wiki, not individual wikis. For instance "Wikinews English" and "Wikipedia English" are part of two different groups called wikinews and wikipedia, so you need to add those groups to be able to use the individual wikis. Also is not clear what you want to do with "other sites" you wrote at the end.
Do you know how to open your MediaWiki database? If yes, look into the sites table and it should be much clearer.
Please try so and get back to this post with more details on what you want to achieve. Luca Mauri (talk) 16:24, 18 April 2020 (UTC)
I done for this, but I dont see when a page has site link, it not appear in sidebar sitelink, how it work? 180.252.120.50 (talk) 18:11, 9 February 2021 (UTC)

How to change defaults fonts to MonserratFont extension

i´ve installed Extension:MontserratFont , added localsettings configs, and i not have idea to activate in my wiki SamiWey (talk) 18:33, 28 February 2020 (UTC)
See Manual:CSS Malyacko (talk) 20:14, 28 February 2020 (UTC)
¿? SamiWey (talk) 19:25, 28 February 2020 (UTC)
Installing the extension merely makes the font available. You need to call the font through sitewide CSS or inline HTML styling (eg < div style=“font-family:Montserrat;” >). Harej (talk) 06:06, 29 February 2020 (UTC)

getting wikidata translation options into wikibase

There are 2 terms Wikidata does in terms of cross-lange searching that my wiki-repo which used Wikibase and ULS extension does NOT do:

  1. it gives cross-language results in the search box dropdown, eg my settings are set to English, yet when I search for "organisatie", a Dutch word, the search dropdown here gives as the 4th result the English word "organization" with the Dutch word "organisatie" in brackets behind it. My wiki-repo does not do this.
  2. it gives cross-language results in the search results. Again, settings to English, when i search for "organisatie" and press enter, the search results give English results with the Dutch translation behind it with "Dutch" in small italic letters superscript. My wiki-repo does not do this. It DOES list the English item in the search results, but it does not list the Dutch translation behind it with "Dutch" in small italic letters superscript.

Just to note: in my own repo i do have the item "organization" both in English and with the Dutch translation "organisatie", just as on Wikidata.

Can anyone help me in getting these great features that are present on Wikidata also onto my wiki-repo? Wikirik123 (talk) 18:47, 28 February 2020 (UTC)

404 not found when saving edits on MediaWiki under php-fpm/nginx

I was running MediaWiki on Apache with mod_php, but I switched over to php-fpm on nginx.

--> https://www.nginx.com/resources/wiki/start/topics/recipes/mediawiki/

The preview works successfully, but actually saving an edit causes a 404 not found error to be reported by nginx. I am wondering if something might be deadlocked in the database, and the fastcgi_pass to php-fpm is not producing any output.

No permanent damage, because it is possible to reload the page or navigate back to it, and find that one's edits were in fact saved.

Otherwise, php-fpm on nginx seems to be somewhat faster and use less resources than the "standard" Apache/mod_php solution. Justina colmena (talk) 02:46, 29 February 2020 (UTC)

You should check the nginx access logs and see if it's redirecting you to a wrong URL/domain causing the 404 error Ciencia Al Poder (talk) 10:35, 2 March 2020 (UTC)

Mediawiki Dumpbackup.php encoding error

Hello.

I have exported an XML dump for my wiki using Dumpbackup.php, but when I try to import it on another wiki, there seems to be an error:

Warning: XMLReader::read(): uploadsource://ee12ddd1df35d97dd98ea56d60b3b081:37: parser error : Opening and ending tag mismatch: namespace line 34 and namespaces in /srv/mediawiki/w/includes/import/WikiImporter.php on line 543

Warning: XMLReader::read(): </namespaces> in /srv/mediawiki/w/includes/import/WikiImporter.php on line 543

Warning: XMLReader::read(): ^ in /srv/mediawiki/w/includes/import/WikiImporter.php on line 543

Warning: XMLReader::read(): Load Data before trying to read in /srv/mediawiki/w/includes/import/WikiImporter.php on line 645

Warning: XMLReader::read(): Load Data before trying to read in /srv/mediawiki/w/includes/import/WikiImporter.php on line 620 Done!

So I checked my XML file, but the encoding was broken. There were many strange characters on the XML file, such as

     <namespace key="-2" case="first-letter">誘몃뵒??/namespace>

     <namespace key="-1" case="first-letter">?뱀닔</namespace>

     <namespace key="0" case="first-letter" />

     <namespace key="1" case="first-letter">?좊줎</namespace>

What should I do to get an normal XML dump file? 79brue (talk) 07:51, 29 February 2020 (UTC)

what version of mediawiki? What is your content language set to (zh?)? Have you customized namespace names (via $wgExtraNamespaces). Can you post the output of mywiki.com/w/api.php?action=query&meta=siteinfo&siprop=namespaces%7Cnamespacealiases (replacing mywiki.com with your domain name) Bawolff (talk) 14:12, 29 February 2020 (UTC)
My mediawiki version is 1.31.3, my content language is set to 'ko'(Korean), yes I customized some namespace names, I think you can find them below. This is the output of the link above.
{
    "batchcomplete": "",
    "query": {
        "namespaces": {
            "-2": {
                "id": -2,
                "case": "first-letter",
                "canonical": "Media",
                "*": "\ubbf8\ub514\uc5b4"
            },
            "-1": {
                "id": -1,
                "case": "first-letter",
                "canonical": "Special",
                "*": "\ud2b9\uc218"
            },
            "0": {
                "id": 0,
                "case": "first-letter",
                "subpages": "",
                "content": "",
                "*": ""
            },
            "1": {
                "id": 1,
                "case": "first-letter",
                "subpages": "",
                "canonical": "Talk",
                "*": "\ud1a0\ub860"
            },
            "2": {
                "id": 2,
                "case": "first-letter",
                "subpages": "",
                "canonical": "User",
                "*": "\uc0ac\uc6a9\uc790"
            },
            "3": {
                "id": 3,
                "case": "first-letter",
                "subpages": "",
                "canonical": "User talk",
                "*": "\uc0ac\uc6a9\uc790\ud1a0\ub860"
            },
            "4": {
                "id": 4,
                "case": "first-letter",
                "subpages": "",
                "canonical": "Project",
                "*": "\ub9ac\ubc84\ud2f0\uac8c\uc784"
            },
            "5": {
                "id": 5,
                "case": "first-letter",
                "subpages": "",
                "canonical": "Project talk",
                "*": "\ub9ac\ubc84\ud2f0\uac8c\uc784\ud1a0\ub860"
            },
            "6": {
                "id": 6,
                "case": "first-letter",
                "canonical": "File",
                "*": "\ud30c\uc77c"
            },
            "7": {
                "id": 7,
                "case": "first-letter",
                "subpages": "",
                "canonical": "File talk",
                "*": "\ud30c\uc77c\ud1a0\ub860"
            },
            "8": {
                "id": 8,
                "case": "first-letter",
                "subpages": "",
                "canonical": "MediaWiki",
                "*": "\ubbf8\ub514\uc5b4\uc704\ud0a4"
            },
            "9": {
                "id": 9,
                "case": "first-letter",
                "subpages": "",
                "canonical": "MediaWiki talk",
                "*": "\ubbf8\ub514\uc5b4\uc704\ud0a4\ud1a0\ub860"
            },
            "10": {
                "id": 10,
                "case": "first-letter",
                "subpages": "",
                "canonical": "Template",
                "*": "\ud2c0"
            },
            "11": {
                "id": 11,
                "case": "first-letter",
                "subpages": "",
                "canonical": "Template talk",
                "*": "\ud2c0\ud1a0\ub860"
            },
            "12": {
                "id": 12,
                "case": "first-letter",
                "subpages": "",
                "canonical": "Help",
                "*": "\ub3c4\uc6c0\ub9d0"
            },
            "13": {
                "id": 13,
                "case": "first-letter",
                "subpages": "",
                "canonical": "Help talk",
                "*": "\ub3c4\uc6c0\ub9d0\ud1a0\ub860"
            },
            "14": {
                "id": 14,
                "case": "first-letter",
                "canonical": "Category",
                "*": "\ubd84\ub958"
            },
            "15": {
                "id": 15,
                "case": "first-letter",
                "subpages": "",
                "canonical": "Category talk",
                "*": "\ubd84\ub958\ud1a0\ub860"
            },
            "110": {
                "id": 110,
                "case": "first-letter",
                "canonical": "Forum",
                "*": "Forum"
            },
            "111": {
                "id": 111,
                "case": "first-letter",
                "canonical": "Forum talk",
                "*": "Forum talk"
            },
            "828": {
                "id": 828,
                "case": "first-letter",
                "subpages": "",
                "canonical": "Module",
                "*": "\ubaa8\ub4c8"
            },
            "829": {
                "id": 829,
                "case": "first-letter",
                "subpages": "",
                "canonical": "Module talk",
                "*": "\ubaa8\ub4c8\ud1a0\ub860"
            },
            "2300": {
                "id": 2300,
                "case": "first-letter",
                "canonical": "Gadget",
                "*": "\uc18c\ub3c4\uad6c"
            },
            "2301": {
                "id": 2301,
                "case": "first-letter",
                "canonical": "Gadget talk",
                "*": "\uc18c\ub3c4\uad6c\ud1a0\ub860"
            },
            "2302": {
                "id": 2302,
                "case": "case-sensitive",
                "canonical": "Gadget definition",
                "defaultcontentmodel": "GadgetDefinition",
                "*": "\uc18c\ub3c4\uad6c\uc815\uc758"
            },
            "2303": {
                "id": 2303,
                "case": "case-sensitive",
                "canonical": "Gadget definition talk",
                "*": "\uc18c\ub3c4\uad6c\uc815\uc758\ud1a0\ub860"
            },
            "3002": {
                "id": 3002,
                "case": "first-letter",
                "canonical": "\ubcf4\uc874",
                "*": "\ubcf4\uc874"
            },
            "3003": {
                "id": 3003,
                "case": "first-letter",
                "canonical": "\ubcf4\uc874\ud1a0\ub860",
                "*": "\ubcf4\uc874\ud1a0\ub860"
            }
        },
        "namespacealiases": [
            {
                "id": -1,
                "*": "\ud2b9"
            },
            {
                "id": -1,
                "*": "\ud2b9\uc218\uae30\ub2a5"
            },
            {
                "id": 2,
                "*": "\uc0ac"
            },
            {
                "id": 3,
                "*": "\uc0ac\ud1a0"
            },
            {
                "id": 4,
                "*": "\ubc84"
            },
            {
                "id": 5,
                "*": "\ubc84\ud1a0"
            },
            {
                "id": 6,
                "*": "Image"
            },
            {
                "id": 6,
                "*": "\uadf8\ub9bc"
            },
            {
                "id": 7,
                "*": "Image talk"
            },
            {
                "id": 7,
                "*": "\uadf8\ub9bc\ud1a0\ub860"
            },
            {
                "id": 9,
                "*": "MediaWiki\ud1a0\ub860"
            }
        ]
    }
}
79brue (talk) 01:11, 1 March 2020 (UTC)

School block?

I saw a minor flaw in the plot description for the second episode of Outer Limits. Since it was a trivial edit, I didn’t bother to log in. But a pop up said I should go home first. Apparently the IPv6 of my AT&T cell hotspot is within the range someone assumed was for a school? The tag in “more details” was “schoolblock” 伟思礼 (talk) 13:38, 29 February 2020 (UTC)

complaints about blocks on wikipedia have to go to wikipedia. We cannot do anything about them. Please contact the blocking admin or try w:WP:Teahouse Bawolff (talk) 14:01, 29 February 2020 (UTC)

Error when upgrading MediaWiki

Hello!


I installed the GeoData extension, and now it needs me to update to get the geo_tags database table.

So I go to mw-config since I don't have access to the command line on my host, but I get this error:


Could not open "/maintenance/archives/patch-mime_minor_length.sql"


However, the file in question does exist

What do I do?


MediaWiki is version 1.34.0

PHP version is 7.3.6

MySQL version is 5.6.45-86.1

Website is http://conworldproject.epizy.com/ Astavie (talk) 15:36, 29 February 2020 (UTC)

This was the exact error? You didn't delete any of the path?
If so, suggests that MediaWiki is somehow not correctly identifying its install path, unless your mediawiki install is literally in the root directory of your server (Would be extremely weird)
> However, the file in question does exist
Does the user that mediawiki or apache run as have permission to read the file? Bawolff (talk) 23:09, 1 March 2020 (UTC)
Yeah, that's the entire error, nothing was removed. The site should have permission to read it. Astavie (talk) 13:41, 2 March 2020 (UTC)
what directory is mediawiki installed in? Is it the root directory? Bawolff (talk) 19:49, 2 March 2020 (UTC)
It is not installed in the root directory. 89.98.60.198 (talk) 14:02, 6 March 2020 (UTC)
It is not installed in the root directory. Astavie (talk) 14:03, 6 March 2020 (UTC)
I also have this issue. I think it has to do with using InfinityFree. Sam1370 (talk) 18:44, 29 April 2020 (UTC)

do i need to pay money to GCP for using contenttranslation tool?

i installed MediaWiki stable version and integrated content translation extension in it . It is working fine in giving suggestions but when it comes to translation it always convert into English rather than desired language . what should i need to do in order to convert in other language? Ramu ummadishetty (talk) 21:47, 29 February 2020 (UTC)

There are api keys that need to be configured in order for it to integrate into certain third party translation services. Look at the config files of cxserver. Bawolff (talk) 06:34, 2 March 2020 (UTC)