Project:Support desk/Flow/2022/03

This page is an archive.
Please ask questions on the current support desk.
Category:Support desk archives#Flow%20Archive%20Support%20desk/Flow/2022/03

How To add parameter template in wiki page

Hello team,

I'm new to wiki and trying to create a parameter template that I will insert into a page.

I am not understanding how to create a template with parameters and how to insert it in a wiki page.

Here is some tutorial that I do not understand.

I am not getting this tutorial: Help:Templates#Parameters

A little thank you... for all your effort. hugs, Me

A little thank you... for {{{1}}}. hugs, {{{2}}}.

A little thank you... for all your effort. Hugs, Me

.

Where should I placed this "A little thank you... for all your effort. hugs, Me" and

this " A little thank you... for {{{1}}}. hugs, {{{2}}}."


Would anyone be able to help me understand how to create and insert in the wiki page.


Thanks in advanced

Akki Ashu9333 (talk) 02:27, 1 March 2022 (UTC)

Have you created the template page yet? Which name does the page have? Malyacko (talk) 06:14, 1 March 2022 (UTC)
Yes!! I have created template with name Template:Testme Ashu9333 (talk) 07:14, 2 March 2022 (UTC)
I fixed above one,
could you please help to add one condition in my template. Ashu9333 (talk) 05:36, 3 March 2022 (UTC)

How to add legends on left column and do sorting for class

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 to add legends on left column and do sorting for class 195.218.169.25 (talk) 04:32, 1 March 2022 (UTC)

Please see "Post a new question" in the sidebar. Malyacko (talk) 06:13, 1 March 2022 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Donations

I have a donation that is charged to an old credit card. My name is Melody Doyle and I need to cancel the donation. Memaw41211 (talk) 05:52, 1 March 2022 (UTC)

@Memaw41211 Welcome to the support desk for the MediaWiki software. If you donated to something then please contact that place. :) In case this is about Wikimedia, see https://donate.wikimedia.org/wiki/FAQ - thanks. Malyacko (talk) 06:12, 1 March 2022 (UTC)

Php error after upgrading from 1.35 to 1.37

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 following php error on the top of the page after upgrading from 1.35 to 1.37:
Deprecated: Use of InternalParseBeforeSanitize hook (used in VariablesHooks::onInternalParseBeforeSanitize) was deprecated in MediaWiki 1.35. [Called from MediaWiki\HookContainer\HookContainer::run in /var/www/u1406315/data/www/wikireshebnik.org/includes/HookContainer/HookContainer.php at line 137] in /var/www/u1406315/data/www/wikireshebnik.org/includes/debug/MWDebug.php on line 375
Any ideas how to resolve it? Fokebox (talk) 07:58, 1 March 2022 (UTC)
see phab Abinayaputra (talk) 08:20, 1 March 2022 (UTC)
Thnks, it is resolved for now Fokebox (talk) 09:14, 2 March 2022 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

New installation

1. MediaWiki version: 1.37.1

2. PHP Version: 7.3.33

3. MySQL Version:  5.7.33-cll-lve

https:// x domain.com/mw-config/index.php?page=DBConnect

During installation, I have only PostgreSQL and SQLite options

How can I choose MYSQL as the data type? 2401:7400:C804:87EB:71BF:D885:5972:20EC (talk) 15:00, 1 March 2022 (UTC)

You need the mysqli php extension installed/enabled in php.ini Bawolff (talk) 15:49, 1 March 2022 (UTC)

robots.txt --- how to disallow anything which isn't an article or category?

In robots.txt, I want to prevent indexing of anything which isn't an article or category.

How to disallow anything which isn't an article or category? 79.176.94.174 (talk) 19:09, 1 March 2022 (UTC)

Manual:Robots.txt Malyacko (talk) 20:08, 1 March 2022 (UTC)
I don't think the manual contains an answer to my question.
It has examples about how to disallow anything which is, but not anything which is not. 79.176.94.174 (talk) 09:55, 2 March 2022 (UTC)
The manual contains "Allow:" and "Disallow:" examples. What makes you think it does not cover it? Malyacko (talk) 11:10, 2 March 2022 (UTC)
I didn't say it doesn't contain these keywords.
I just didn't find an example to the command set I seek in the manual, pseudocode:
Disallow: * EXCEPT /index.php/article/* AND /index.php/category/*;
Perhaps I should do something like:
Allow: /index.php/article/
Allow: /index.php/category/
Disallow: *
79.176.94.174 (talk) 12:03, 2 March 2022 (UTC)
command set = command* 79.176.94.174 (talk) 13:20, 2 March 2022 (UTC)
Is
Allow: /index.php/article/
Allow: /index.php/category/
Disallow: *
A good way to disallow anything which isn't an article or a category? 79.176.94.174 (talk) 16:37, 2 March 2022 (UTC)
No, that is not correct. That is not the url pattern that articles (main namespace?) And categories take. They use colon as seperators. Since main namespace has no prefix, you would have to explicitly disallow all other prefixes.
alternatively see $wgNamespaceRobotPolicies Bawolff (talk) 06:11, 3 March 2022 (UTC)
Hello @Bawolff
By "they use colon separators" I guess you meant only categories because I didn't find any colon in the URLs of articles.
But let's say that I change MediaWiki to do include such patterns:
  • article/ARTICLE
  • category/category:CATEGORY
Then, would
Allow: /index.php/article/
Allow: /index.php/category/
Disallow: *
Be good? 79.176.94.174 (talk) 14:49, 3 March 2022 (UTC)
Disallow: always takes precedence over Allow:, no matter how you arrange them.
See http://www.robotstxt.org/robotstxt.html Ciencia Al Poder (talk) 14:58, 3 March 2022 (UTC)
Darn.
Well, I quite lost words.
Is the only way just disallowing anything which isn't articles and categories?
Is there any MediaWiki website in which it was done already? 79.176.94.174 (talk) 16:01, 3 March 2022 (UTC)
Its confusing what you mean by the word "article".
But yes its possible. You have to disallow the things you don't want. Bawolff (talk) 01:18, 4 March 2022 (UTC)
By "Article" I mean an "article page" as in Wikipedia.
The typical webpage served to a user in gnerally any MediaWiki website. 79.176.94.174 (talk) 02:32, 4 March 2022 (UTC)

Webpages randomly redirect to old IP address

Installed mediawiki on a server with a DHCP address. Changed it to a different static address to fit with my "IP Scheme". While navigating pages or just sitting idle on a page will cause the web address to go back to the old IP address. EX: I sit on a preference page, then a few seconds later the webpage will show a error. I look at the web address bar, and the IP address has changed by itself. 74.62.127.242 (talk) 20:23, 1 March 2022 (UTC)

Make sure $wgServer gets updated correctly in LocalSettings.php when the servers name changes. Bawolff (talk) 06:07, 3 March 2022 (UTC)

Page Content Language not changing for subpages

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.


On my wiki, this page shows "English" as the page content language rather than Brazilian Portuguese. Is there any additional extension I need for it to automatically change based on the subpage's language code or do I just need to manually change them on each translated subpage? (I think the Translate extension does it automatically but I'm not using it anymore since my site's editors didn't like it) Vishkujo (talk) 21:52, 1 March 2022 (UTC)

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

Nuclear war resilience

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.


Due to the escalating conflict in Ukraine, the probability of nuclear war is rising. I'm making preparation plans with my fiance in case of a Russia/US nuclear war. Wikipedia is one of the most valuable resources in the world imo, and I would like to preserve everyones access. Unfortunately it seems that wikipedia is hosted mostly in one data center . Can developers confirm if this is the case? Could we get some servers hosted in non NATO countries if not? Thank you. Chriscanal4 (talk) 05:53, 2 March 2022 (UTC)

That link is 14 years old. See https://wikitech.wikimedia.org/wiki/Clusters instead. Malyacko (talk) 11:11, 2 March 2022 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

How to know if my hosting provider uses PHP as CGI or PHP as an Apache module?

Manual:Robots.txt#Without short URLs


This manual chapter contains two sub chapters:


I use shared hosting; I don't know by which of the two ways, if any, my shared hosting company serves my website (and to be honest I prefer not to ask the support).

How could I determine which of the ways, if any, is applicable in my case, without asking the hosting support? 79.176.94.174 (talk) 09:59, 2 March 2022 (UTC)

Add a phpinfo.php with the phpinfo() command to the root of your host. It should tell you if you are running php as an apache module, or as php-fpm (fastcgi) icw nginx or something, or as CGI.
See also: https://stackoverflow.com/questions/16414054/find-out-how-php-is-running-on-server-cgi-or-fastcgi-or-mod-php
apache handler (Apache_mod) and FPM/FastCGI (php-fpm) are the most common methods these days, the CGIWrap as discussed in the chapter is not that common in my experience.
Once you are done, make sure to delete the phpinfo file, as it is a security risk to have it publicly available, due to the amount of information of the setup it discloses. —TheDJ (Not WMF) (talkcontribs) 13:08, 2 March 2022 (UTC)

How to add a class to article URLs?

MediaWiki 1.36.1 on shared hosting with the following URL pattern for articles:

https://example.com/index.php/ARTICLE_NAME

I need to add an articles class in URLs of articles, so their URL pattern would become:

https://example.com/index.php/articles/ARTICLE_NAME

How to do that? 79.176.94.174 (talk) 12:10, 2 March 2022 (UTC)

Does manual:Short URLs help? Bawolff (talk) 06:04, 3 March 2022 (UTC)
Sadly not for me because I don't want short URLs. 79.176.94.174 (talk) 14:53, 3 March 2022 (UTC)

Automatische Kategorie Zuordnung in Datei Liezens

Wie kann man in einer Datei Liezens zb. {{PD-Image}} , eine kategorie hinzufügen Kategorie:PD? Damit diese automatisch einer Kategorie zugeordnet werden.

Gruss und danke Shadowslight 14:56, 2 March 2022 (UTC)

Welcome to Mediawiki. ↠Tanbirzx () 16:19, 3 March 2022 (UTC)
For questions about commons ask at commons:commons:help desk Bawolff (talk) 01:15, 4 March 2022 (UTC)

delete account

how do I delete my wikipedia account 216.184.81.54 (talk) 16:49, 2 March 2022 (UTC)

Have you already created a wiki account? ↠Tanbirzx () 18:28, 2 March 2022 (UTC)

Malware Protection for my wiki

Hi everyone. Hope all are well.

Today there was a huge issue with spam and malware on my wiki. Fake user accounts were created and used to add entries to my wiki that were unapproved.

Need help with the following if possible:

  1. Is there a free software or plugin i can use for my wiki to protect it from future malware, worms, and spam?
  2. Is there a way to block making new pages or adding new users without approval from an admin? I would like notifications that when someone is creating a new page on my wiki that it does not get added on officially without my approval.

I hope someone can help me out with this ASAP.


TIA Thepainking (talk) 17:54, 2 March 2022 (UTC)

Manual:Combating_spam Malyacko (talk) 19:53, 2 March 2022 (UTC)
> malware, worms
What you're describing is spam not malware nor worms. Bawolff (talk) 06:03, 3 March 2022 (UTC)

Elastica breaks wiki

I've just had a mediawiki server with 3 wikis running on it dumped in my lap to support. The search box was using CirrusSearch and ElasticSearch / Elastica to generate results, but that was recently broken when the security team did some sort of log4j remediation.

So, I've removed most traces of CirrusSearch / ElasticSearch and now have just the bare-bones MediaWiki search working. As you are all likely aware, the built-in search is trash, so I'm trying to get the search extensions working again by following the install guide.

I'm up to the step where it has me edit LocalSettings.php to add " wfLoadExtension( 'Elastica' ); ", but when I do this, the wiki using that settings file no longer loads. All I get is a blank page served. Not even broken html if I view the page source. Nothing.

Behind the scenes:

  • CentOS 7.3.1611
Product Version
MediaWiki 1.30.0
PHP 7.4.28 (apache2handler)
MySQL 5.7.20

Of course, I'd love to bring everything up to more current versions, but I'd like to get back to functional before I tackle that massive ball of version dependencies.

Any help is very much appreciated! Paul.lenhart (talk) 19:48, 2 March 2022 (UTC)

Please enable php error reporting (see How to debug) Bawolff (talk) 06:02, 3 March 2022 (UTC)
OK, to the LocalSettings.php, I added:
error_reporting( -1 );
ini_set( 'display_errors', 1 );
Save and reload the wiki and now above the header shows:
Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /data/www/html/REDACTED/includes/json/FormatJson.php on line 297
Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /data/www/html/REDACTED/languages/LanguageConverter.php on line 771
Warning: session_id(): Cannot change session id when session is active in /data/www/html/REDACTED/includes/Setup.php on line 790
Deprecated: Non-static method ExtLoopFunctions::foreachHook() should not be called statically in /data/www/html/REDACTED/includes/parser/Parser.php on line 4805
Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /data/www/html/REDACTED/includes/MagicWordArray.php on line 206 Paul.lenhart (talk) 18:56, 4 March 2022 (UTC)

Error when adding JavaScript to MediaWiki:Common.js

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.

When I try to add any JavaScript code to MediaWiki:Common.js, I get this error:


[7ee911e56efde506e5b37bfb] /index.php?title=MediaWiki:Common.js&action=submit MWException from line 619 of /var/www/html/includes/content/ContentHandler.php: Format text/javascript is not supported for content model wikitext


I am using a fresh installation of MediaWiki 1.28.2 (I need to port an extension). In LocalSettings.php I also set:

$wgUseSiteJs = true;

$wgAllowUserJs = true;

Does anyone have a clue? Pulsargranular (talk) 22:33, 2 March 2022 (UTC)

Kind of weird, but try using special:changeContentModel to change the content model to javascript. Bawolff (talk) 06:01, 3 March 2022 (UTC)
In addition, now I cannot change the content model back to wikitext... Pulsargranular (talk) 07:24, 3 March 2022 (UTC)
I changed the content model for MediaWiki:Common.js from wikitext to plainText or JSON, it accepts the JavaScript now but does not do anything with it (e.g. a simple alert() is not being executed). Pulsargranular (talk) 07:23, 3 March 2022 (UTC)
Solved: my extension implemented a PageContentSave hook which wrongly assumed the content model was always wikitext. It then changed all incoming content into wikitext, which caused the error on the MediaWiki:commons.js page. Pulsargranular (talk) 19:37, 4 March 2022 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Page using a template bug MW 1.37.1

Hello,

Upgraded to MW 1.37.1 and noticed that there aren't links provided to the pages that uses a template. I mean previously I could see all the pages that use certain template. Fokebox (talk) 07:13, 3 March 2022 (UTC)

Check to make sure job queue is working.
You can try refreshLinks.php (its slow) Bawolff (talk) 01:14, 4 March 2022 (UTC)
It didn't help. See how the problem look like:
Fokebox (talk) 07:04, 4 March 2022 (UTC)
So I think the links are there, but the titles of the page are not actually being shown ? —TheDJ (Not WMF) (talkcontribs) 09:39, 4 March 2022 (UTC)
The titles are not shown and when I click "edit" I have redirect to edit main page of the wiki site. Here is example of such page: Page with missing links for template usage Fokebox (talk) 11:08, 4 March 2022 (UTC)
Weird. Do you have any extensions that might be interfering with link display?
Looks like info is properly being recorded: https://wikiblog.ru/api.php?action=query&prop=info%7Ctemplates%7Ctranscludedin%7Cpageprops&titles=%D0%A8%D0%B0%D0%B1%D0%BB%D0%BE%D0%BD:%D0%91%D0%BB%D0%BE%D0%B3_%D1%85%D1%83%D0%B4%D0%BE%D0%B6%D0%BD%D0%B8%D0%BA%D0%B0/%D0%9D%D0%B0%D0%B2%D0%B8%D0%B3%D0%B0%D1%86%D0%B8%D1%8F&formatversion=2 Bawolff (talk) 17:35, 7 March 2022 (UTC)
Yes it is weird and I have such kind of bug just right after installation MW 1.37.1. There are only standard extensions that goes with Mediawiki Fokebox (talk) 13:05, 8 March 2022 (UTC)

Edit buttons disappeared on page

The edit button on https://curobotics.soc.srcf.net/wiki/Main_Page disappeared. How do I solve it? 131.111.193.104 (talk) 16:10, 3 March 2022 (UTC)

Is it your wiki or not, also are you logged-in or not? – Ammarpad (talk) 21:24, 3 March 2022 (UTC)

lost account

I sign in and my ranking and points are gone? 2601:406:8180:3020:E9FB:6B9B:2A07:76C5 (talk) 17:53, 3 March 2022 (UTC)

How do I ask someone to take a look at a file I've uploaded to make sure I'm not violating copyright? Valereee (talk) 18:11, 3 March 2022 (UTC)

Ask at commons:commons:help desk Bawolff (talk) 01:13, 4 March 2022 (UTC)

Export of multiple pages at once

I was wondering what exactly is behind the "export" button on this page: https://en.wikipedia.org/wiki/Special:Export

I underestood that I can get a XML version of any wikipedia page by accessing https://en.wikipedia.org/wiki/Special:Export/name_of_the_page e.g.: https://en.wikipedia.org/wiki/Special:Export/Barry_Tompkins

But can I export multiple pages at once with a single call, just like I can with using the "export" button on this page: https://en.wikipedia.org/wiki/Special:Export?addcat&catname=1940_births

I did not find any notes on this in the API documentation, so it probably perform multiple single exports and then merge those files together. But I wish I was wrong. Kotrblu2 (talk) 23:30, 3 March 2022 (UTC)

Its not precisely merging together, but fundamentally it fetchs a bunch of pages and makes the xml file from them. Bawolff (talk) 21:31, 5 March 2022 (UTC)

Tabs on all pages

I wanted to create tabs and wanted them to be on the top of EACH Wiki page. It is like Mediawiki's default tabs, Read, Discussion, Edit and etc..

I know that some extensions, i.e. Tabs, TabberNeue, can easily create tabs in a page, but those tabs are just parts the pages.

I am new to MediaWiki, and I just set up my first Mediawiki to play with. I truly appreciate any suggestions for do this tab. Xiaodongzhou (talk) 00:07, 4 March 2022 (UTC)

You should use SkinTemplateNavigation::Universal hook in your LocalSettings.php. There are examples in the manual if you read through. – Ammarpad (talk) 07:38, 4 March 2022 (UTC)
Thanks Ammarpad. I will invest some time on it.
- Albert Xiaodongzhou (talk) 22:27, 4 March 2022 (UTC)

In MediaWiki 1.37.1 I wish to backendly remove generally all links to non custom webpages, such as:

  • View source
  • Edit
  • History
  • Move
  • Delete
  • Download as PDF
  • Print
  • What links here
  • Related changes
  • Special pages
  • Page information

What I don't want to do

I don't want to restrict access to any of these webpages, they should all be 100% accessible for users knowing the keyboard shortcuts and/or using accessibility programs, etc.

I do want that links of the following categories would remain:

  • Footer links
  • Article custom links
  • Category custom links
  • Sidebar / burger custom links

Notes

  • By backendly I mean, from an extension or from the PHP, so not just a CSS display: none or a JavaScript remove()
  • robots.txt is nice, but won't necessarily be enough because I wish to prevent crawlers from any search engine to even discover (not even crawl, not even index) these webpages

My question

How to do that? 79.176.94.174 (talk) 00:22, 4 March 2022 (UTC)

Write a custom skin would probably be best. Bawolff (talk) 01:12, 4 March 2022 (UTC)
Oh, I don't think I could do that in any plausible time period.
Someone may want to recommend a skin which does that. 79.176.94.174 (talk) 02:35, 4 March 2022 (UTC)
There's none. – Ammarpad (talk) 07:33, 4 March 2022 (UTC)

Is there a skin PHP hierarchy in MediaWiki?

In generally every backend load, are there PHP files loaded before others?

Is there any such hierarchy shared for all skins whatsoever by a coding standard? 79.176.94.174 (talk) 13:23, 4 March 2022 (UTC)

Please describe what it is that you want to achieve, so that people can give you the best advice. —TheDJ (Not WMF) (talkcontribs) 15:07, 4 March 2022 (UTC)
If it's possible, I want to experiment in the last file in such hierarchy with "post processing" to prevent outputting HTML elements which would have been outputted otherwise. 79.176.94.174 (talk) 17:11, 4 March 2022 (UTC)
Of the rendered wikitext content, or or like literally anywhere on every single html page generated ? —TheDJ (Not WMF) (talkcontribs) 19:49, 4 March 2022 (UTC)
Anywhere on every single html page generated. 79.176.94.174 (talk) 20:18, 4 March 2022 (UTC)

(2 intermediate revisions by 2 users not shown)

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.


IF this is some is some kind of "helpful" change, it isn't. The skipped rev are Shown in the latest changes, which I know were not by that editor. When I review vandalism especially, I need the Exact changes. I've saved a jpg that I can email or up to commons.~~~~

https://en.wikipedia.org/w/index.php?title=The_Klansman&type=revision&diff=1075398620&oldid=1069706282

MediaWiki 1.38.0-wmf.24 (f9858b2)

15:05, 28 February 2022

PHP 7.2.34-18+0~20210223.60+debian10~1.gbpb21322+wmf5 (fpm-fcgi)
MariaDB 10.4.21-MariaDB-log
ICU 63.1
Pygments 2.10.0
LilyPond 2.22.0
Elasticsearch 6.5.4
LuaSandbox 3.0.3
Lua 5.1.5
Dave-okanagan (talk) 17:19, 5 March 2022 (UTC)
See How to report a bug if you think that something is wrong on a Wikimedia wiki; see https://meta.wikimedia.org/wiki/Tech for general tech questions for Wikimedia wikis. Malyacko (talk) 18:39, 5 March 2022 (UTC)
This has been the way it always worked when you ask for a diff spanning multiple revisions. Bawolff (talk) 21:30, 5 March 2022 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

I fear that installing an extension would make upgrading frustrating

To upgrade MediaWiki I do the following actions from a graphical user interface:

  • Backup the entire database and root directory
  • Backup customized files (.htaccess, LocalSettings.php, robots.txt, Google file, logo file)
  • Replacing the entire root directory with a fresh MediaWiki installation directory
  • Restoring special files backup

After that, I run a database update from a command line user interface.

I don't recall having a problem working this way.

---

I need to install Extension:Lockdown and I fear it might make that upgrading process frustrating (longer, significantly more risky).

A solution to the problem might be "go to a psychologist specializing in anxiety" but it is important for me to ask how would you prefer to do such a periodical upgrade (core + 1 extension)? 79.176.94.174 (talk) 18:02, 5 March 2022 (UTC)

There are many MediaWiki installations with custom extensions out there. See also Manual:Upgrading#Upgrade extensions. I don't see significantly more risk. Malyacko (talk) 18:38, 5 March 2022 (UTC)

Fatal exception "Error" on page edit?

After moving databases to a new server and upgrading to 1.37, my database is fine in read-only mode, pages and images are up and happy, but on editing any page, I get the error above. A backtrace gives me this -


[0814ff066068b5e7754011da] /index.php?title=Main_Page&action=edit Error: Call to a member function getNsText() on null

Backtrace:

from [redacted]/extensions/MsCatSelect/MsCatSelect.body.php(55) 2600:6C55:7800:795:141:33FE:3EA0:8057 (talk) 19:35, 5 March 2022 (UTC)

Database is MySQL 8, PHP version 7.4.2 2600:6C55:7800:795:141:33FE:3EA0:8057 (talk) 19:40, 5 March 2022 (UTC)
That file (MsCatSelect.body.php) does not exist in the latest MsCatSelect extension code in the branch for version 1.37: https://phabricator.wikimedia.org/diffusion/EMSC/browse/REL1_37/
It last existed in https://phabricator.wikimedia.org/rEMSC43b1f2331341e5cc62e618aa947fce6669c94bfd Malyacko (talk) 19:49, 5 March 2022 (UTC)
Which generally means the extension needs to be updated as well so the version matches your version of mediawiki. Bawolff (talk) 17:26, 7 March 2022 (UTC)

CUETools Issue

Hi, I'm not sure if this is where I am able to communicate a concern and ask a question but here goes. My name is John and I've been accessing the Lossless Music Archives page for several months now without any problems. I learned about using CUETools to "How to split & convert single-file FLAC Album into tracks" and it has worked beautifully until today. Today, it seems to do it's job except to unpack the album into it's separate songs. I tried reinstalling the CUEtools program and got it to add the folder "New" but it still doesn't unpack the individual songs. I'm not sure what to do next and was hoping that someone could give me some guidance. By the way, yesterday something occurred with the CUETools program that was odd, it shrank to a minimal open size on the desktop and it wouldn't let me expand it horizontally but would vertically. Then I decided that maybe if I updated to the latest version of CUETools that that would solve the issue...nope! So, it you can help me that would be nice, it not maybe you could direct me to someone?

I appreciate your help --- John 65.50.155.161 (talk) 20:08, 5 March 2022 (UTC)

You are in the wrong place —TheDJ (Not WMF) (talkcontribs) 20:16, 5 March 2022 (UTC)

If you get a weird "Unknown error in PHP's mail() function" and are using SiteGround, Amazon SES, and perhaps some other host when trying to send email or use ContactPage...

A week ago, I was baffled by this message:

My ContactPage had worked just fine a few weeks before; I hadn't changed anything involving it, and my host SiteGround said that they hadn't either. Kindly folks tried to help but they were casting around because...

Ultimately I found that the reason it broke is because in fact my host had changed email handling on me without telling me.

Specifically, a default install of MediaWiki and of the ContactPage extension results in the Contact Page spoofing email. If you test it by sending a Contact to yourself that uses some made-up email address, you see when you get it (when it's forwarded to your personal email, or whatever) it's says it is From that made-up address... but of course it isn't; it was actually sent from your wiki's admin account (or whatever you set it to). It's spoofing, by definition: It sends from one email address but says it's from some other, completely unrelated address. MW and ContactPage have always done this by default / if you don't change anything. What changed is my host decided it wouldn't allow spoofing any more.

You can see how host providers can have an issue with this... but if they were a little more intelligent about it, they'd realize you're only sending from a site you own, to a personal email registered to the owner... and, of course, it's probably labeled "Contact Info", too. So in one sense, there's no harm, no foul. But at least some host providers don't want to hassle with subtleties such as no harm actually being caused, laugh.

I personally would never have figured this out, but someone much better than I worked with me to determine that the root problem is some of the settings in Extensions/ContactPage/includes/SpecialContact.php. In particular, where the email is originating from. You'll also have to fix a second place if you allow the ability for Contactees to email themselves a copy of their form (so that this, too, doesn't spoof). He wrote the fix up in a nicely detailed page.

I hope this helps others. RedKnight7 (talk) 20:37, 5 March 2022 (UTC)

The OpenGarages.org page is inaccessible

I am not sure what is wrong with this domain but it appears to be having DNS issues or something? The site has not been updated in a while and there is no way to notify the webmaster that there is a problem. I am not familiar with MediaWiki so perhaps there is a reason why their site is now inaccessible? When I try to ping the domain the connection is timing out and I cannot reach the name server. Does MediaWiki offer a way to notify the owners of the site that there is a problem? 209.129.33.80 (talk) 22:47, 5 March 2022 (UTC)

This doesn't look like a MediaWiki problem, but rather that opengarages.org is not configured properly (i.e. the server is down). That wiki does have an entry at WikiApiary which also points to a dump of the site, so it might be possible to restore that dump and look for contact information in there. Sam Wilson 23:22, 5 March 2022 (UTC)

How to lock everything lockable with Lockdown?

I am having a bit of hard time to read Extension:Lockdown.

I seek to experiment with the extension by locking anything it allows to lock, as long as "Article", "Category" and "Footer" pages are available to all users.

How can this be done? 79.176.94.174 (talk) 23:38, 5 March 2022 (UTC)

Perhaps something like this?
$wgActionLockdown['*'] = [ 'user' ];
$wgSpecialPageLockdown['*'] = [ 'user' ];
$wgNamespacePermissionLockdown['*']['*'] = [ 'user' ];
79.176.94.174 (talk) 23:46, 5 March 2022 (UTC)
If your goal is to make it so logged out users cannot read anything except for a few select pages,you might want to consider using core's $wgWhitelistRead instead of Lockdown. Bawolff (talk) 14:48, 6 March 2022 (UTC)
I wouldn't say except for a few select pages, because I want to lock anything which isn't articles, category pages or footer pages. 79.176.94.174 (talk) 16:15, 6 March 2022 (UTC)
In other words, I want my website to behave towards non registered users as any typical Drupal/Joomla/Wordpress website would behave.
No history/management webpage would be available to non registered users. 79.176.94.174 (talk) 17:11, 6 March 2022 (UTC)
Update
What I seek is a single command which locks everything. 79.176.94.174 (talk) 02:53, 9 March 2022 (UTC)
That does not exist, I'm afraid. Malyacko (talk) 11:12, 9 March 2022 (UTC)
Alright,
What do you use to lock everything that is lockable with this extension? 79.183.173.166 (talk) 00:00, 10 March 2022 (UTC)
Read the manual page Ciencia Al Poder (talk) 09:50, 10 March 2022 (UTC)
@Ciencia Al Poder I've tried, but this manual is extremely hard for me to read.
I don't understand if the manual covers all possible examples or that there are other lock commands which I should "guess" which only a MediaWiki developer could really guess.
If someone knows a more user friendly guide, suitable for non MediaWiki developers as well, please share it. 79.183.173.166 (talk) 13:23, 10 March 2022 (UTC)
If nobody is going to document this to you for free, you can try hiring someone Ciencia Al Poder (talk) 13:31, 10 March 2022 (UTC)
As I want to only restrict crawlers from accessing special pages, I think that only $wgActionLockdown and $wgSpecialPageLockdown are relevant for me.
Am I wrong? 79.183.173.166 (talk) 13:32, 10 March 2022 (UTC)
You could try and find out yourself, or read the manual. Malyacko (talk) 13:18, 11 March 2022 (UTC)
User:Clump has surprisingly deleted this topic as "duplicate" without any clarification question / notice / warning so I will try to repost it here from what I remember.
==How to lock all special pages with lockdown?==
After pasting wfLoadExtension( 'Lockdown' ); in the end of LocalSettings.php I've tried both of these codes, each one alone, and both failed (no special page was locked down):
$wgSpecialPageLockdown['Special']['*'] = array('sysop');
$wgSpecialPageLockdown['Special:']['*'] = array('sysop');
79.183.173.166 (talk) 14:39, 10 March 2022 (UTC)
Okay, I believe I have found a way.
First, before locking all special webpages, one should lock all actions because it's much easier than locking all special webpages (there are about 6 actions but about 150 special webpages):
$wgActionLockdown['edit'] = array( 'sysop' );
$wgActionLockdown['delete'] = array( 'sysop' );
$wgActionLockdown['move'] = array('sysop');
$wgActionLockdown['protect'] = array( 'sysop' );
$wgActionLockdown['history'] = array( 'sysop' );
$wgActionLockdown['createtalk'] = array('sysop');
After that, locking all special pages is ha bit hard but currently possible somewhat automatically like this:
1) A list of all special pages is available at en.wikipedia.org/wiki/Help:Special_page
2) From the shell (CLUI) Download the webpage to stdin, match the names with grep, filter the name with sort (which also removes duplicates) and redirect the output to a txt file:
curl wikipedia.org/wiki/Help:Special_page -s | grep -oP 'Special:\K[a-zA-Z0-9]*' | sort -u > special_page_names.txt
3) Use AWK to put each name in the blocking template of Extension:Lockdown:
awk '{ print "$wgSpecialPageLockdown[\47"$0"\47] = array(\47sysop\47);" }' special_page_names.txt > special_page_names_processed.txt
4) Paste the output in your LocalSettings.php
---
If someone knows an easier way to lock all special webpages, please share it.
Add an https protocol to the curl command because I can't add it due to the abuse filter here. 79.183.173.166 (talk) 00:08, 14 March 2022 (UTC)
A more detailed explanation is available here
unix.stackexchange.com/questions/694268/how-to-lock-everything-for-registered-users-in-mediawiki 79.183.173.166 (talk) 00:09, 14 March 2022 (UTC)
I now use the MediaWiki API instead the page in Wikipedia, and a bit different command, with tr and also a few line breaks for code clarity.
pandoc -t plain 'mediawiki.org/w/api.php?action=query&meta=siteinfo&siprop=specialpagealiases' |
  grep -oP '"realname": \K"[A-Za-z0-9]*",' |
  sort -u |
  tr -d '[,"]' |
  tr -s ' ' \
  > special_page_names.txt
awk '{ print "$wgSpecialPageLockdown[\47"$0"\47] = array(\47sysop\47);" }' special_page_names.txt > special_page_names_processed.txt
79.183.173.166 (talk) 22:00, 14 March 2022 (UTC)
Add an https protocol to the pandoc command because I can't add it due to the abuse filter here. 79.183.173.166 (talk) 22:02, 14 March 2022 (UTC)
You might want to look into the jq command. Bawolff (talk) 05:41, 15 March 2022 (UTC)

add PopupWidget after successful login through extension

I've been trying to find either an existing extension that already does this, or tips on how to code this in my own extension.

What I want is (I think) pretty simple: after a successful login I want a little one-time OOUI/PopupWidget to show up to just confirm the successful login. Nothing more.

I was thinking of using the onUserLoggedIn Hook in my own extension, and within it do the following:

  1. get the Parser object and call its method enableOOUI()
  2. create the new OOUI\PopupWidget object and stringify it
  3. add it to the page using the Parser object's addHTML() method

But I'm sure I'm misunderstanding or missing something here, because the onUserLoggedIn hook 'only' offers the $user object. It makes sense to me - at that point there is no page content yet.

Any advice would be appreciated. I'm using mediawiki version 1.37.1. Llanddewi (talk) 12:32, 6 March 2022 (UTC)

I would assume that onUserLoggedIn hook would run prior to page redirection code.
Probably you need to do something like somehow make the succesful login redirect code add a url parameter, and look for that url parameter later to add the pop up. Bawolff (talk) 14:44, 6 March 2022 (UTC)
Thanks! I've thought about your approach and tried a few things. Turns out the PopupWidget is only available on the JavaScript level of OOUI, so my new attempts will be based on a ResourceModule. I think I'll attempt to set a global extension boolean in the UserLoggedIn hook that I can then pick up in BeforePageDisplay hook (or just pick up the User object and attempt to ascertain the login success from there), so that I can load the ResourceModule containing the JavaScript evoking the PopupWidget. Hope that makes sense. Llanddewi (talk) 16:11, 6 March 2022 (UTC)
I got it working just now. I ended up using the PostLoginRedirect hook to indeed add a parameter that I could then pick up within a BeforePageDisplay hook, in which case a ResourceModule with some very simple javascript and css would be loaded. Thanks again! Llanddewi (talk) 14:30, 7 March 2022 (UTC)

how to create extension for parse data api to one page?

i have one address of api mediawiki for user contributes and want get data and pars and show in one page


how i do this? 2A01:5EC0:2804:1C0A:EC70:9E82:63B7:7F63 (talk) 14:54, 6 March 2022 (UTC)

i read develop extension but i dont understand
please help 2A01:5EC0:2804:1C0A:EC70:9E82:63B7:7F63 (talk) 14:56, 6 March 2022 (UTC)
What have you tried so far exactly? What do you specifically want to do? What are "pars"? Please elaborate what is the underlying problem to solve. Malyacko (talk) 19:32, 6 March 2022 (UTC)

Changing the installation path

I would like to change the installation path on the server and move mediawiki to a subfolder. I am not really familiar working with command line tools. Hence my question: is it possible to move mediawiki to a new folder and just run the maintenance/update.php file? 95.112.93.156 (talk) 21:51, 6 March 2022 (UTC)

You might need to change some things in LocalSettings.php. in most installs that would be $wgScriptPath and maybe $wgArticlePath. Bawolff (talk) 23:11, 6 March 2022 (UTC)

How to remove history revisions altogether?

Let's say I don't want any history / diff pages in my website at all (but I still want to use MediaWiki without this feature).

How to remove history revisions altogether?

I don't mean to just clear existing history revisions so to make them empty or just clear any diff entry, rather, I mean to totally removing the history feature from a MediaWiki site so no one could review any page's edit history. 79.176.94.174 (talk) 23:25, 6 March 2022 (UTC)

$wgActions['history'] = false; i suppose, but that wouldn't stop the api or bruteforcing revision ids. Bawolff (talk) 01:05, 7 March 2022 (UTC)
just clear any diff entry --- just delete any diff entry
Nice, I find this command to be what I needed after testing it in LocalSettings.php.
What is the meaning that it won't stop the API?
Bruteforcing revision? 79.176.94.174 (talk) 01:19, 7 March 2022 (UTC)
Guessing the value of ?oldid url parameter or using manual:API Bawolff (talk) 17:25, 7 March 2022 (UTC)
I think I understand the API part,
History would still be documented in revisions. 79.176.94.174 (talk) 01:21, 7 March 2022 (UTC)

How to remove "Tools" sidebar chunk programmatically?

Version 1.37.1

If I don't want "Tools" sidebar chunk with

  • What links here
  • Related changes
  • Upload file
  • Special pages
  • Page information

How could I remove it from the PHP? 79.176.94.174 (talk) 23:57, 6 March 2022 (UTC)

I have tried to remove the following code chunk but it results in Error: Call to undefined method TimelessTemplate::getPortlet().
	protected function getPortlet( $name, $content, $msg = null, $setOptions = [] ) {
		// random stuff to override with any provided options
		$options = array_merge( [
			'role' => 'navigation',
			// extra classes/ids
			'id' => 'p-' . $name,
			'class' => [ 'mw-portlet', 'emptyPortlet' => !$content ],
			'extra-classes' => '',
			'body-id' => null,
			'body-class' => 'mw-portlet-body',
			'body-extra-classes' => '',
			// wrapper for individual list items
			'text-wrapper' => [ 'tag' => 'span' ],
			// option to stick arbitrary stuff at the beginning of the ul
			'list-prepend' => ''
		], $setOptions );
		// Handle the different $msg possibilities
		if ( $msg === null ) {
			$msg = $name;
			$msgParams = [];
		} elseif ( is_array( $msg ) ) {
			$msgString = array_shift( $msg );
			$msgParams = $msg;
			$msg = $msgString;
		} else {
			$msgParams = [];
		}
		$msgObj = $this->getMsg( $msg, $msgParams );
		if ( $msgObj->exists() ) {
			$msgString = $msgObj->parse();
		} else {
			$msgString = htmlspecialchars( $msg );
		}
		$labelId = Sanitizer::escapeIdForAttribute( "p-$name-label" );
		if ( is_array( $content ) ) {
			$contentText = Html::openElement( 'ul',
				[ 'lang' => $this->get( 'userlang' ), 'dir' => $this->get( 'dir' ) ]
			);
			$contentText .= $options['list-prepend'];
			foreach ( $content as $key => $item ) {
				if ( is_array( $options['text-wrapper'] ) ) {
					$contentText .= $this->makeListItem(
						$key,
						$item,
						[ 'text-wrapper' => $options['text-wrapper'] ]
					);
				} else {
					$contentText .= $this->makeListItem(
						$key,
						$item
					);
				}
			}
			$contentText .= Html::closeElement( 'ul' );
		} else {
			$contentText = $content;
		}
		$divOptions = [
			'role' => $options['role'],
			'class' => $this->mergeClasses( $options['class'], $options['extra-classes'] ),
			'id' => Sanitizer::escapeIdForAttribute( $options['id'] ),
			'title' => Linker::titleAttrib( $options['id'] ),
			'aria-labelledby' => $labelId
		];
		$labelOptions = [
			'id' => $labelId,
			'lang' => $this->get( 'userlang' ),
			'dir' => $this->get( 'dir' )
		];
		$bodyDivOptions = [
			'class' => $this->mergeClasses( $options['body-class'], $options['body-extra-classes'] )
		];
		if ( is_string( $options['body-id'] ) ) {
			$bodyDivOptions['id'] = $options['body-id'];
		}
		$afterPortlet = $this->getAfterPortlet( $name );
		if ( $name === 'lang' ) {
			$this->afterLangPortlet = $afterPortlet;
		}
		$html = Html::rawElement( 'div', $divOptions,
			Html::rawElement( 'h3', $labelOptions, $msgString ) .
			Html::rawElement( 'div', $bodyDivOptions,
				$contentText .
				$afterPortlet
			)
		);
		return $html;
	}
==What will you suggest to do with this situation?== 79.183.173.166 (talk) 17:46, 10 March 2022 (UTC)
I have managed to remove it this way:
In:
/includes/skins/Skin.php
I have located:
public function makeToolbox
There, in line 2,189 I have commented:
return $toolbox;
This way:
// return $toolbox;
79.183.173.166 (talk) 21:53, 10 March 2022 (UTC)
Thank you!! This works for me on v1.39.3 Jmr1985 (talk) 20:02, 19 May 2023 (UTC)

How to remove print/export section from PHP?

Version 1.37.1

It was written here:

"Yes it is possible with CSS or via a hook"

How to remove print/export section from PHP? 79.176.94.174 (talk) 00:50, 7 March 2022 (UTC)

I would suggest looking at what hooks the collection extension uses and seeing if the same hook could be used to unset() things. Bawolff (talk) 17:23, 7 March 2022 (UTC)

How do I add an infobox?

You know those infoboxes many politicians and famous people have?

Here are some examples:

John Tory, Doug Ford, Justin Trudeau


Obviously with my own name, my own details and at my own mediawiki based site. 65.95.58.133 (talk) 02:05, 7 March 2022 (UTC)

Does Manual:Importing Wikipedia infoboxes tutorial help? Bawolff (talk) 17:22, 7 March 2022 (UTC)

Is it true to say that LocalSettings.php runs last?

Is it true to say that LocalSettings.php runs last?

That it is the last PHP file running, after all PHP files (of the skin, of extensions) ran already?


---

I would bet that the answer is "No", that it is actually the first, because of database credentials, etc. 79.176.94.174 (talk) 13:03, 7 March 2022 (UTC)

No, it's not true. It's not the first neither, since there's some setup before it that checks some PHP requirements, sets some variables like $IP, and reads DefaultSettings.php. Ciencia Al Poder (talk) 14:43, 7 March 2022 (UTC)

How to study the source code of a skin with a PHP file of ~ 1,200 lines?

I consider to make some minor changes in a skin which its main PHP file is about 1,200 lines long.

Such a PHP file is extremely hard for me to read, not only because of it's longevity but because of my fundamental (not basic, not advanced) PHP knowledge.

I don't even believe that the skin creator actually sat down and wrote 1,200 lines of code, rather, there that this is a compilation of much smaller fractions of code.


How to study the source code of a skin with a PHP file of ~ 1,200 lines? 79.176.94.174 (talk) 17:09, 7 March 2022 (UTC)

1200 lines of code is not a large amount of code, as far as these things go. Bawolff (talk) 17:21, 7 March 2022 (UTC)
I agree,
But when all is dense in one large file, it's hard for me personally, to read, at least with my current PHP understanding.
Do skin developers really write skins this way?
Isn't there any compilation of smaller files?.. 79.176.94.174 (talk) 17:59, 7 March 2022 (UTC)
First question: Yes. Second question: No. Malyacko (talk) 11:13, 9 March 2022 (UTC)
Some documentation here. wargo (talk) 12:13, 9 March 2022 (UTC)

Mediawiki loading part by part, affecting CLS

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.


Hey,

I'm trying to fix the CLS (web vitals) performance on my wiki and after taking a closer look it looks like the way Mediawiki renders the page, part by part, as seen in this video: https://i.gyazo.com/15c66de3defedcee515b891b5d0de782.mp4 seems to be the issue.

As you can see from the video when you refresh the page it loads the page in parts making it all "jump/flicker/blink" for a split seconds, this is somewhat hard to notice by eye due to how fast it happens but Google catches that and the CLS of my website is actually 0.5, which is critical.

Doe someone know what can be done about this? Mukilol2 (talk) 17:50, 7 March 2022 (UTC)

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

How to find all skins which match a certain MediaWiki version?

I need to find all skins which match MediaWiki 1.37.1.

Of course, in the future the version might be different.


How to find all skins which match a certain MediaWiki version? 79.176.94.174 (talk) 23:02, 7 March 2022 (UTC)

Which underlying problem would that solve? Malyacko (talk) 07:29, 8 March 2022 (UTC)
Any problem which might arise from a mismatch between versions.
I don't want to install outdated skins on 1.37.1 ... 79.176.94.174 (talk) 08:16, 8 March 2022 (UTC)
It's not the matter of solving an actual problem, but of preventing a potential problem which I am not the authority to strictly rule out, due to mismatch between versions.
I don't want to install outdated skins on 1.37.1 ... 79.176.94.174 (talk) 08:30, 8 March 2022 (UTC)
Skins have branches (e.g. "REL1_37"); simply pick the branch corresponding to the MediaWiki version.
I'd assume most people install one skin because they like how the skin looks (after checking the compatibility information on the skin homepage) and would not install dozens of skins only after finding that they are not "outdated"... Malyacko (talk) 19:26, 8 March 2022 (UTC)

How do I make MediaWiki look like Wiktionary?

I want to make my own dictionary with mediawiki, but i just want it to look like wiktionary. i tried to google search it but nothing shows up. please show me a way! Funmoring46 (talk) 05:09, 8 March 2022 (UTC)

Wiktionary doesn't do much in terms of customization. Can you be more specific which aspect you want to copy? Bawolff (talk) 06:19, 8 March 2022 (UTC)
the design Funmoring46 (talk) 01:05, 9 March 2022 (UTC)
Funmoring46 (talk) 01:15, 9 March 2022 (UTC)
Does Manual:Using content from Wikipedia (just replace wikipedia with wiktionary. The steps are mostly the same) Bawolff (talk) 01:27, 9 March 2022 (UTC)
how do i also make the main page "wiktionary.org" Funmoring46 (talk) 05:10, 9 March 2022 (UTC)
https://meta.wikimedia.org/wiki/Project_portals#Other_Wikimedia_portals Malyacko (talk) 11:11, 9 March 2022 (UTC)

How to use UMEduWiki extension

How to use UMEduWiki extension in latest Media-wiki version -1.37 148.64.5.229 (talk) 05:48, 8 March 2022 (UTC)

Please read "Post a new question" in the sidebar and explain what is unclear and why, and how someone can help. Malyacko (talk) 07:29, 8 March 2022 (UTC)

WYSIWYG in latest MediaWiki

how to use WYSIWYG in latest media wiki or alternatives for this

can you please suggest. 148.64.5.229 (talk) 05:51, 8 March 2022 (UTC)

Please read "Post a new question" in the sidebar and explain what you want after which exact and clear steps where. Malyacko (talk) 07:28, 8 March 2022 (UTC)

PdfExport extension in Latest media-wiki

Can you help how to use PdfExport in latest media-wiki 148.64.5.229 (talk) 05:52, 8 March 2022 (UTC)

Please read "Post a new question" in the sidebar and explain clearly how to help. Malyacko (talk) 07:28, 8 March 2022 (UTC)

Enterprise MediaWiki Conference Spring 2022

Conference registration
Where I can register myself for the event?
Could you help me find the right path to register myself for the event as the dates are near. 59.99.155.146 (talk) 05:55, 8 March 2022 (UTC)
Please see EMWCon Spring 2022 instead. Malyacko (talk) 07:27, 8 March 2022 (UTC)
I think its still TBA. User:Bryandamon should know. Bawolff (talk) 06:17, 8 March 2022 (UTC)
Yeah, there is no link for registration yet.
If that opens can you send me an email?
My email id is liquidexp1@gmail.com 59.99.155.146 (talk) 09:02, 8 March 2022 (UTC)
The people who are managing the conference are different from the people answering questions here. You really need to direct questions to the conference organizers. Bawolff (talk) 17:24, 8 March 2022 (UTC)
Sorry for the delay, the official registration is coming soon and only required for people who intend on attending in-person, for now you can add your name to the sign-up here. If you want to attend online you can still add your name to the sign-up and the virtual conference platform details (Hopin) will be added to the conference page shortly. If you want to give a presentation, we're still accepting talks, please add your presentation name to the talks talks section. Bryandamon (talk) 04:37, 9 March 2022 (UTC)
==Thank you for your acknowledgement @Bryandamon==
I also want to know that Is there any criteria for registering for talk?
Is travel and accomodation for foreigners are free and provided at the place it is happening as I belongs to India?
Please, Let me know my email id is - liquidexp1@gmail.com Tarunsanjeev (talk) 11:56, 10 March 2022 (UTC)

There is no criteria to propose a talk, please add your name to the talks section. Yaron is the program chair, he will be scheduling the talks and may ask follow-up questions.

Unfortunately we do not have any grants or funding to pay for travel and accommodations this year, attendees will need to arrange this for themselves. This conference is not organized though the WMF, however you may try to secure a rapid grant through the WMF although I don't believe it will be approved.
We are accepting remote presentations though, so if you are interested in giving a talk, but can't attend in person, we can accommodate that. Bryandamon (talk) 18:45, 10 March 2022 (UTC)
@BryandamonCan you provide me the link for WMF, I can try once for sponsorship?
It would be great if I give talk in person, I also want to know the topics for talk.
@Yaron Can you please provide me the schedule for the talk and help me out for the accommodation and travel allowances. 59.99.155.146 (talk) 04:24, 12 March 2022 (UTC)
https://meta.wikimedia.org/wiki/Grants:Project/Rapid is the WMF grants page Bawolff (talk) 06:03, 12 March 2022 (UTC)

dump does not import all articles and template and module how to import all

wikipedia portugues contains 1,086,333, but when I import the dump, it only imports 705,000 and it doesn't matter the template, I've already verified that it imported the whole file Lucianoo6 (talk) 13:18, 8 March 2022 (UTC)

Where did you downloaded the dump from? Ciencia Al Poder (talk) 13:55, 8 March 2022 (UTC)
https://dumps.wikimedia.org/ptwiki/20220120/ I downloaded the file ptwiki-20220120-pages-articles-multistream.xml.bz2 Lucianoo6 (talk) 19:51, 8 March 2022 (UTC)
Pages-article dumps do not have all pages. Use pages-meta-history if you want absolutely everything. You might have to get from https://dumps.wikimedia.org/ptwiki/20220101/ Bawolff (talk) 01:25, 9 March 2022 (UTC)

Cannot bind over ldaps

Hello,


I'm having issues with connecting my wiki instance to our AD over ldaps. My asumption is that it's an issue with the public key of our AD on port 636 being a 1024 bit one. Due to the PKI infrastracture we cannot change that, so I would like to add an environment variable of "LDAPTLS_REQCERT never" to the LDAP configuration.


I've tried adding it in many different places, but I am unsure if I am doing it right, as there are many extensions here working intermittenly.


Below is my ldap configuration:


LocalSetting.php

wfLoadExtension( 'PluggableAuth' );

wfLoadExtension( 'LDAPProvider' );

wfLoadExtension( 'LDAPAuthentication2' );

wfLoadExtension( 'LDAPAuthorization' );

wfLoadExtension( 'LDAPUserInfo' );

wfLoadExtension( 'LDAPGroups' );

$LDAPProviderDomainConfigs = "/data/www/wiki/ldap.json";


ldap.json

{

   "ldap.example.com": {

      "connection": {

         "server": "dc03.ldap.example.com dc04.ldap.example.com",

         "port": "389",

         "user": "CN=someuser,OU=service accounts,OU=some ou,DC=ldap,DC=example,DC=com",

         "pass": "somepass",

         "enctype": "clear",

         "options": {

            "LDAP_OPT_DEREF": 1

         },

         "basedn": "something",

         "userbasedn": "something",

         "groupbasedn": "something",

         "searchattribute": "samaccountname",

         "usernameattribute": "samaccountname",

         "realnameattribute": "cn",

         "emailattribute": "mail",

         "grouprequest": "MediaWiki\\Extension\\LDAPProvider\\UserGroupsRequest\\UserMemberOf::factory"

      },

      "userinfo": [],

      "authorization": [],

      "groupsync": {

      }

   }

}


Please note that any sensitive information has been removed for this specific post.


I'd really appreciate some help and pointers as to what I need to change in the configuration, or where it would be best to put the env. I've tried adding it to LocalSetting.php, ldap.json under "options", in the global php.ini, and in the php.ini of the apache user which the site is loaded through. 188.252.255.186 (talk) 14:50, 8 March 2022 (UTC)

Just so be more clear, this is the working configuration over ldap, but when trying to switch the port to 636 it then ends up failing. Here is the trace of the error:
[Yidtf0xeLGXDKtnd9PTOjQAAAMI] /index.php?title=Posebno:PluggableAuthLogin MWException: Could not bind to LDAP: (-1) Can't contact LDAP server
Backtrace:
from /data/www/wiki/extensions/LDAPProvider/src/Client.php(170)
#0 /data/www/wiki/extensions/LDAPProvider/src/Client.php(93): MediaWiki\Extension\LDAPProvider\Client->establishBinding()
#1 /data/www/wiki/extensions/LDAPProvider/src/Client.php(330): MediaWiki\Extension\LDAPProvider\Client->init()
#2 /data/www/wiki/extensions/LDAPAuthentication2/src/PluggableAuth.php(184): MediaWiki\Extension\LDAPProvider\Client->canBindAs(string, string)
#3 /data/www/wiki/extensions/LDAPAuthentication2/src/PluggableAuth.php(55): MediaWiki\Extension\LDAPAuthentication2\PluggableAuth->checkLDAPLogin(string, string, string, NULL, NULL, NULL)
#4 /data/www/wiki/extensions/PluggableAuth/includes/PluggableAuthLogin.php(36): MediaWiki\Extension\LDAPAuthentication2\PluggableAuth->authenticate(NULL, string, NULL, NULL, NULL)
#5 /data/www/wiki/includes/specialpage/SpecialPage.php(647): PluggableAuthLogin->execute(NULL)
#6 /data/www/wiki/includes/specialpage/SpecialPageFactory.php(1366): SpecialPage->run(NULL)
#7 /data/www/wiki/includes/MediaWiki.php(314): MediaWiki\SpecialPage\SpecialPageFactory->executePath(string, RequestContext)
#8 /data/www/wiki/includes/MediaWiki.php(925): MediaWiki->performRequest()
#9 /data/www/wiki/includes/MediaWiki.php(559): MediaWiki->main()
#10 /data/www/wiki/index.php(53): MediaWiki->run()
#11 /data/www/wiki/index.php(46): wfIndexMain()
#12 {main}
Here's some info I found in the debug logs. I'll assume it's an issue either with the service being ldap:// not ldaps://, or the fact that there's a port variable set to 389
[LDAP] ldap_connect( $hostname = 'ldap://dc03.ldap.example.com:636 ldap://dc04.ldap.example.com:636', $port = 389 );
[LDAP] # __METHOD__ returns Resource id #1038
[MediaWiki\Extension\LDAPProvider\Client] Setting LDAP_OPT_PROTOCOL_VERSION to 3
[LDAP] ldap_set_option( $linkID, $option = 17, $newval = 3 );
[LDAP] # returns 1
[MediaWiki\Extension\LDAPProvider\Client] Setting LDAP_OPT_REFERRALS to 0
[LDAP] ldap_set_option( $linkID, $option = 8, $newval = 0 );
[LDAP] # returns 1
[MediaWiki\Extension\LDAPProvider\Client] Setting LDAP_OPT_DEREF to 1
[LDAP] ldap_set_option( $linkID, $option = 2, $newval = 1 );
[LDAP] # returns 1
[LDAP] ldap_bind( $linkID, $bindRDN = 'CN=graylog,OU=CS Servisni accounti,OU=CS Computer Systems,DC=intranet,DC=cs,DC=hr', $bindPassword = 'XXXX' );
[LDAP] # returns
[LDAP] ldap_error( $linkID );
[LDAP] # returns Can't contact LDAP server
[LDAP] ldap_errno( $linkID );
[LDAP] # returns -1 188.252.255.186 (talk) 14:54, 8 March 2022 (UTC)
The issue is definitely the fact that the extension always tries to go over ldap, regardless of the port:
ldapsearch -H ldap://dc03.ldap.example.com:636 -D "someuser" -b 'somebind' - 'somepass'
ldap_result: Can't contact LDAP server (-1) 188.252.255.186 (talk) 15:01, 8 March 2022 (UTC)
Have you tried setting "enctype": "ssl"? It should make the extension use ldaps://
EDIT: You should be able to omit the port. It should be autodetected based on the "enctype". Osnard (talk) 16:08, 8 March 2022 (UTC)
I was initially wondering if it may be due to the encryption type, which it was. Switching it to "ssl" made ldap_connect use ldaps. For testing purposes I tried omitting the port as well, but it defaulted to 389, so in my case I had to specify the port explicitly.
Thanks for the save there @Osnard! 188.252.255.186 (talk) 07:45, 9 March 2022 (UTC)

Some special pages not working anymore after upgrade

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 upgraded to MediaWiki 1.37.0 and now on some of my wikis some of the special pages are not working anymore, for example Special:Search shows the following message: "There is currently no text in this page. You can search for this page title in other pages, search the related logs, or create this page."

Also, some Wikibase items show wikitext after the update. It's pretty weird.

On another wiki, some articles were empty when I clicked them. I fixed that with php maintenance/cleanupTitles.php but I have no idea how to fix the broken special pages.

Any help is very much appreciated!

Thanks and cheers,

Till Till Kraemer (talk) 14:50, 8 March 2022 (UTC)

That is very weird. Do you have a link to your wiki if public?
The only thing i can think of, is sometimes misconfigured short urls can cause something sort of like that. Bawolff (talk) 17:25, 8 March 2022 (UTC)
@Bawolff, thank you very much for your reply! My Nginx config file indeed looks a little outdated but unfortunately, changing it didn't fix the problem.
The wikis are public but NSFW (at least for people not working in the adult industry :) If that doesn't scare you, here are the links :)
Special pages that don't work: Special:LinkSearch, Special:Search, Special:MIMESearch and Special:FileDuplicateSearch. So basically everything search-related is screwed up (no pun intended :) However, while this doesn't work, removing the &title=বিশেষ%3Aঅনুসন্ধান part of the URL shows the search results properly.
On another wiki, only Special:WhatLinksHere doesn't work.
Any idea what could be at play here? Could this still be a misconfiguration issue?
Thanks and cheers,
Till Till Kraemer (talk) 18:30, 9 March 2022 (UTC)
Wow that's weird.
It seems to have something to do with unicode. It seems only to effect pages that have unicode characters that aren't in latin1.
The really weird part is that even if the special char is not part of the namespace, it still makes mediawiki confused thinking its main namespace. E.g. compare https://pl.pornopedia.com/wiki/Specjalna:Linkuj%C4%85ce vs https://pl.pornopedia.com/wiki/Specjalna:foo
it also affects other namespace detection - https://pl.pornopedia.com/wiki/Talk:A gets redirected to localized version of talk but https://pl.pornopedia.com/wiki/Talk:%C4%85 does not.
This is a bit of a stab in the dark, but perhaps if php was compiled against a version of PCRE library that had unicode support disabled.
Could you enable logging all php warnings (see manual:how to debug), and if that doesn't show anything maybe mediawiki debug logs to. Look especially for errors that mention preg_match, preg_replace or unicode (but also just anything out of the ordinary that shows up) Bawolff (talk) 08:46, 10 March 2022 (UTC)
@Bawolff, thank you for your help! And yes, you're right, other special pages are also affected on the Polish wiki; sorry, I didn't notice that before. I don't really understand though why ą doesn't work but ł in Specjalna:Zasady_haseł does work.
Oh, yeah, the namespace confusion in your example is pretty weird and I don't know why the talk page of ą gets forwarded to Ä. "Close enough!" ;)
Another OpenBSD user also seems to experience an issue with the ą. I tested it and <?php var_dump(preg_match('/^.{5,64}$/', 'daswązdas')); also returns int(0) for me while <?php var_dump(preg_match('/^.{5,64}$/', 'daswęzdas')); returns int(1).
The PCRE section of phpinfo() looks like this:
PCRE (Perl Compatible Regular Expressions) Supportenabled
PCRE Library Version10.37 2021-05-26:
PCRE Unicode Version13.0.0
PCRE JIT Supportnot compiled in
DirectiveLocal ValueMaster Value:
pcre.backtrack_limit10000001000000
pcre.recursion_limit100000100000
PHP warnings are enabled but I didn't find anything in the logs.
I just upgraded from PHP 7.4.27 to PHP 7.4.28 but unfortunately, it didn't fix the problem.
I think I just wait for MediaWiki to be compatible with PHP 8 and see if that will solve the issue.
Thank you again for your kind help!
Cheers,
Till Till Kraemer (talk) 16:26, 10 March 2022 (UTC)
That thread was helpful.
I think what is happening is that pcre is being compiled with PCRE_CONFIG_NEWLINE set to -1, and mediawiki is not compatible with that. This config option causes the iso 8859 control character NEL - 0x85 to be interpreted as a line ending character, which messes things up for unicode characters that have a utf-8 representation containing 0x85 in it which includes ą.
At this point mediawiki is pretty reliant on pcre not having that compile time option enabled, so i think the only fix is to recompile pcre.
I filed a bug about detecting this during installer: https://phabricator.wikimedia.org/T303560 Bawolff (talk) 20:44, 10 March 2022 (UTC)
@Bawolff, Awesome! :) I just changed --enable-newline-is-any to --enable-newline-is-anycrlf in /usr/ports/devel/pcre2/Makefile and installed pcre2. Now it works! :) Thank you so much!
Another little issue occurred when I searched on the Bengali wiki. It said: "Precondition failed: This Title instance does not represent a proper page, but merely a link target." php maintenance/cleanupTitles.php fixed it though! :)
Cheers,
Till Till Kraemer (talk) 20:29, 11 March 2022 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Restoring deleted pages in batches

Hello. Hope all are doing well.

I previously installed and deleted pages in batches for my wiki. Was wondering if there is an extension or plugin that will allow me to restore my pages in batches?

Any assistance would be much appreciated.


TIA. Thepainking (talk) 19:17, 8 March 2022 (UTC)

Search yields Extension:UndeleteBatch. It's not been updated for a long time though, so it's more likely to not work. You should check.
There's also a Manual:DeleteBatch.php script which (with some minimal changes) can be used to achieve the reverse of what it does. – Ammarpad (talk) 10:16, 10 March 2022 (UTC)

Captcha extensions for spam protection for media wiki ver. 1.31

Good Day to all.

I am trying to install the "Math" extension to protect my wiki against spam. However i cannot seem to find a version that works for my media wiki (ver. 1.31). Can someone please provide assistance or an alternative to this for my version? My wiki is full of spam now.


TIA Thepainking (talk) 20:12, 8 March 2022 (UTC)

If you look in github, look for the branch named REL1_31.
Also we encourage you to update your wiki to more recent version. Bawolff (talk) 01:19, 9 March 2022 (UTC)
also, i checked and looks like the math extension for REL1_31 no longer exists. Is there an alternative for my current version of 1.31?? Thepainking (talk) 15:43, 11 March 2022 (UTC)
will updating the version disrupt or erase my content? If not, how do I update? Thepainking (talk) 15:25, 11 March 2022 (UTC)
please help! ^^ Thepainking (talk) 16:11, 29 March 2022 (UTC)
See Manual:Upgrading Malyacko (talk) 16:37, 29 March 2022 (UTC)

Where is the repository of Timeless skin?

Is it in GitHub?

In Phabricator?

In BitBucket?

Somewhere else?


The source code appearing in the file tree downloadable from here isn't what I seek because a long PHP file there of about 1,250 lines might be a compilation and not represent the communal codebase. 79.176.94.174 (talk) 00:09, 9 March 2022 (UTC)

https://github.com/wikimedia/mediawiki-skins-Timeless Bawolff (talk) 01:18, 9 March 2022 (UTC)
Thanks,
Darn,
It seems that the aforementioned file is about 1.250 lines there as well:
github.com/wikimedia/mediawiki-skins-Timeless/blob/master/includes/TimelessTemplate.php
79.176.94.174 (talk) 01:33, 9 March 2022 (UTC)
The GitHub repo is a mirror of the actual one, which is hosted in Gerrit: https://gerrit.wikimedia.org/r/admin/repos/mediawiki/skins/Timeless Sam Wilson 05:44, 9 March 2022 (UTC)
Regardless, that's the real file. It is not a compilation of smaller files. Bawolff (talk) 06:49, 9 March 2022 (UTC)

service cancellation

How do I cancel a Wikimedia account , the person has DIED 68.117.198.83 (talk) 15:47, 9 March 2022 (UTC)

Wikimedia doesn't sell services to individuals, so its unclear what you wish to cancel. Bawolff (talk) 18:13, 9 March 2022 (UTC)

What the hell happened to this website?

Why is the search bar on the top? Why is there an arrow on the top of the screen? What happened to the sunflower? It's unbearable, please fix this immediately! 72.142.100.254 (talk) 16:13, 9 March 2022 (UTC)

For the search bar position, if you create account, you can choose a skin that does not place the search bar there. For the sunflower, see Project:Proposal for changing logo of MediaWiki, 2020Ammarpad (talk) 09:41, 10 March 2022 (UTC)

Help with Magic Word

I have an older Extension, which, I believe adds a MagicWord? Since upgrading to MW 1.35, I get an error message: Error: invalid magic word 'rawurlencode'. I tried re-writing this to the new standards (very limited knowledge), but not having any luck... Can anyone help with this?

Here is the code used:

/*

{{#rawurlencode:value}}


URL-encodes the given value.

See: http://php.net/manual/function.urlencode.php


{{#rawurldecode:value}}


URL-decodes the given value.

See: http://php.net/manual/function.urldecode.php

*/


$dir = dirname( __FILE__ ) . '/';


$wgExtensionFunctions[] = 'wfRawUrlEncode';


$wgHooks['LanguageGetMagic'][] = 'wfRawUrlEncodeLanguageGetMagic';


function wfRawUrlEncode ( ) {

               global $wgParser;


               $wgRawUrlEncode = new ExtRawUrlEncode ( );

               $wgParser->setFunctionHook('rawurlencode',array(&$wgRawUrlEncode,'runRawUrlEncode'));

               $wgParser->setFunctionHook('rawurldecode',array(&$wgRawUrlEncode,'runRawUrlDecode'));

}


function wfRawUrlEncodeLanguageGetMagic( &$magicWords) {

               $magicWords['rawurlencode']    = array ( 0, 'rawurlencode' );

               $magicWords['rawurldecode']    = array ( 0, 'rawurldecode' );

               return true;

}


class ExtRawUrlEncode {


               /**

               * {{#urlencode:value}}

               */

               function runRawUrlEncode ( &$parser, $inStr = '' ) {

                               # encode

                               return rawurlencode ( $inStr );

               }


               /**

               * {{#urldecode:value}}

               */

               function runRawUrlDecode ( &$parser, $inStr = '' ) {

                               # decode

                               return rawurldecode ( $inStr );

               }

} 73.190.17.159 (talk) 19:12, 9 March 2022 (UTC)

LanguageGetMagic hook was removed. You have to use i18n files instead. See Manual:Magic words Bawolff (talk) 08:14, 10 March 2022 (UTC)
Yea, I think I am missing something since I still cannot get it to work... 73.190.17.159 (talk) 13:59, 10 March 2022 (UTC)

Violation of Personal Information Protection

Hello. The following website is mentioning myself without asking any permission from my side.

http://groovwiki.com/wiki/index.php/

The users are writing false information about myself and this is total defamation of the individuals. This is a serious violation of law in my country.

Anyone can search my name and information regarding myself and I really feel bad about it. I tried to contact a website manager to cancel my information, but It was unable to contact the site manager.

Even some of other people who are mentioned in this website are suffering from the violation of personal information protection.

Moreover, the users are giving biased information, which is leading to conflicts among the individuals.

I want to sincerely request that you could take some measures or if possible, shut down this website as soon as possible.

Once again, the website address is : http://groovwiki.com/wiki/index.php/ 124.56.77.115 (talk) 22:06, 9 March 2022 (UTC)

We are not affiliated with groovwiki, so you are going to have to find some other way to contact them. —TheDJ (Not WMF) (talkcontribs) 22:31, 9 March 2022 (UTC)
Thanks for your reply!
I witnessed the statement "Powered by mediawiki" on the right bottom side in this website so I thought this website is linked to mediawiki.
It's unable to contact the manger of that website. Could you give me some advice how I can do? I'm really suffering from this matter and there's no one to ask some help and support. 124.56.77.115 (talk) 22:42, 9 March 2022 (UTC)
anyone in the world can use our software, we are free and open and have 0 control about what people do with our software. It seems affiliated with some sort of school ? maybe try them. —TheDJ (Not WMF) (talkcontribs) 22:46, 9 March 2022 (UTC)

The TV IV is currently down

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.


For some unknown reason, the TV IV site is currently down following the latest upgrades, as all it keeps returning is database errors. This is the message:


A database error has occurred. Did you forget to run maintenance/update.php after upgrading? See: https://www.mediawiki.org/wiki/Manual:Upgrading#Run_the_update_script

Query: SELECT rev_id,rev_page,rev_text_id,rev_timestamp,rev_comment,rev_user_text,rev_user,rev_minor_edit,rev_deleted,rev_len,rev_parent_id,rev_sha1,rev_content_format,rev_content_model,page_namespace,page_title,page_id,page_latest,page_is_redirect,page_len,user_name FROM `tviv_revision` INNER JOIN `tviv_page` ON ((page_id = rev_page)) LEFT JOIN `tviv_user` ON ((rev_user != 0) AND (user_id = rev_user)) WHERE page_id = '1' AND rev_id = '2548059' LIMIT 1

Function: Revision::fetchFromConds

Error: 145 Table './tvivwiki/tviv_user' is marked as crashed and should be repaired (localhost)


Anything someone can do to help fix this? 2001:569:BD1A:CD00:A034:77F5:5685:A66C (talk) 07:31, 10 March 2022 (UTC)

You need to contact the admins of that site. Bawolff (talk) 08:11, 10 March 2022 (UTC)
No worries, the site is back up and running again. :D 2001:569:BD1A:CD00:BD7F:BE0B:1056:3E68 (talk) 08:27, 11 March 2022 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Retrieve talk pages after using hook Ar-Tabs.php

Hi,

I tested the AR-tabs.php hook found on this page : Manual:FAQ in chapter "How do I add/remove tabs throughout my wiki?".

Now I would like to retrieve Talk page. I commented the hook in Local Settings, but talk pages are not showing up. Could you help me please ? Delph mhk (talk) 08:45, 10 March 2022 (UTC)

They should re-appear pretty instantly after you comment out the hook. Are you sure its properly commented out? Bawolff (talk) 08:51, 11 March 2022 (UTC)
Thank's a lot for your answer.
Yes it was properly commented out.
I feel ashamed but thanks to you I have just checked Common.css page and realised that I had this line I tried and left not commented out !
#ca-talk { display:none!important; } Delph mhk (talk) 12:16, 11 March 2022 (UTC)

Update maintenance script throws db error

Hello Team,

I have recently installed Mediawiki 1.37.1 and Backend DB - MySQL on k8s cluster.

I have moved the content to the mediawiki and restored db from my old version mediawiki 1.33.1 to new installed MySQL and was able to view the content with out any issues.


But when i try to run the maintenance scripts (update.php) , i get below error, any comments on this please?


Error:

```

...page_restrictions in table page already modified by patch patch-page_restrictions-null.sql.

Renaming index ipb_address into ipb_address_unique to table ipblocks ...Wikimedia\Rdbms\DBQueryError from line 1809 of /var/www/html/includes/libs

/rdbms/database/Database.php: Error 1062: Duplicate entry '0-0' for key 'mw_ipblocks.ipb_address_unique' (mysql)

Function: Wikimedia\Rdbms\Database::sourceFile( /var/www/html/maintenance/archives/patch-ipblocks-rename-ipb_address.sql )

Query: ALTER TABLE `mw_ipblocks`

DROP INDEX ipb_address,

ADD UNIQUE INDEX ipb_address_unique (ipb_address(255), ipb_user, ipb_auto)

#0 /var/www/html/includes/libs/rdbms/database/Database.php(1793): Wikimedia\Rdbms\Database->getQueryException('Duplicate entry...', 1062, 'ALTER T

ABLE `mw...', 'Wikimedia\\Rdbms...')

#1 /var/www/html/includes/libs/rdbms/database/Database.php(1768): Wikimedia\Rdbms\Database->getQueryExceptionAndLog('Duplicate entry...', 1062, 'A

LTER TABLE `mw...', 'Wikimedia\\Rdbms...')

#2 /var/www/html/includes/libs/rdbms/database/Database.php(1327): Wikimedia\Rdbms\Database->reportQueryError('Duplicate entry...', 1062, 'ALTER TA

BLE `mw...', 'Wikimedia\\Rdbms...', false)

#3 /var/www/html/includes/libs/rdbms/database/Database.php(5407): Wikimedia\Rdbms\Database->query('ALTER TABLE `mw...', 'Wikimedia\\Rdbms...')

#4 /var/www/html/includes/libs/rdbms/database/Database.php(5340): Wikimedia\Rdbms\Database->sourceStream(Resource id #1393, NULL, NULL, 'Wikimedia

\\Rdbms...', NULL)

#5 /var/www/html/includes/libs/rdbms/database/DBConnRef.php(68): Wikimedia\Rdbms\Database->sourceFile('/var/www/html/m...')

#6 /var/www/html/includes/libs/rdbms/database/MaintainableDBConnRef.php(35): Wikimedia\Rdbms\DBConnRef->__call('sourceFile', Array)

#7 /var/www/html/includes/installer/DatabaseUpdater.php(704): Wikimedia\Rdbms\MaintainableDBConnRef->sourceFile('/var/www/html/m...')

#8 /var/www/html/includes/installer/DatabaseUpdater.php(951): DatabaseUpdater->applyPatch('/var/www/html/m...', false, 'Renaming index ...')

#9 /var/www/html/includes/installer/DatabaseUpdater.php(533): DatabaseUpdater->renameIndex('ipblocks', 'ipb_address', 'ipb_address_uni...', false,

'patch-ipblocks-...')

#10 /var/www/html/includes/installer/DatabaseUpdater.php(497): DatabaseUpdater->runUpdates(Array, false)

#11 /var/www/html/maintenance/update.php(193): DatabaseUpdater->doUpdates(Array)

#12 /var/www/html/maintenance/doMaintenance.php(108): UpdateMediaWiki->execute()

#13 /var/www/html/maintenance/update.php(264): require_once('/var/www/html/m...')

#14 {main}

``` 192.171.187.136 (talk) 10:30, 10 March 2022 (UTC)

i have delete the duplicate value and was able to resolve the issue and update script executed ahead and stuck with below error :
Creating echo_push_provider table ...done.
Creating echo_push_topic table ...done.
Creating echo_push_subscription table ...done.
...echo_unread_wikis table does not exist, skipping modify field patch.
...Comments table already exists.
...Comments_Vote table already exists.
...Comments_block table already exists.
Adding Comment_actor field to table Comments ...
An error occurred:
Error 1067: Invalid default value for 'Comment_Date' (mysql)
Function: Wikimedia\Rdbms\Database::sourceFile( /var/www/html/extensions/Comments/includes/../sql/patches/actor/add-Comment_actor.sql )
Query: ALTER TABLE `mw_Comments` ADD COLUMN Comment_actor bigint unsigned NOT NULL AFTER Comment_Page_ID
Note : running the script from web... 192.171.187.136 (talk) 12:21, 10 March 2022 (UTC)
Huh, this error is very strange:
Error 1067: Invalid default value for 'Comment_Date' (mysql)
Query: ALTER TABLE `mw_Comments` ADD COLUMN Comment_actor bigint unsigned NOT NULL AFTER Comment_Page_ID
I mean, Comment_Date hasn't been touched on this alter statement.
This may be possible if the table was created with an older mysql version, but the current version is more strict, and it complains when issuing an alter to the table even if that column hasn't been touched.
The default value for the Comment_Date is '1970-01-01 00:00:01' according to
comments.sql. Can you try changing it from phpmyadmin or sql? Ciencia Al Poder (talk) 13:38, 10 March 2022 (UTC)
Hello , Thanks for the response, I have passed that error with out any fix( just restarted my mysql pod) , now below is the error:
...echo_unread_wikis table does not exist, skipping modify field patch.
...Comments table already exists.
...Comments_Vote table already exists.
...Comments_block table already exists.
...flaggedimages doesn't exist.
...flaggedrevs table already exists.
...index fr_user already set on flaggedrevs table.
...uw_campaigns table already exists.
...index uw_campaigns_name already set on uw_campaigns table.
...index uw_campaigns_enabled already set on uw_campaigns table.
...abuse_filter table already exists.
...abuse_filter_log table does not contain afl_log_id field.
...have afl_filter_id field in abuse_filter_log table.
Renaming index wiki_timestamp into afl_wiki_timestamp to table abuse_filter_log ...
An error occurred:
Error 1091: Can't DROP 'af_group'; check that column/key exists (mysql)
Function: Wikimedia\Rdbms\Database::sourceFile( /var/www/html/extensions/AbuseFilter/includes/Hooks/Handlers/../../../db_patches/mysql/patch-rename-indexes.sql )
Query: ALTER TABLE `mw_abuse_filter`
DROP INDEX af_group,
ADD INDEX af_group_enabled(af_group,af_enabled,af_id)
appreciate your help on this !! 192.171.187.136 (talk) 14:14, 10 March 2022 (UTC)
Below is the table describe output:
mysql> desc mw_abuse_filter;
+--------------------+-----------------+------+-----+---------+----------------+
| Field              | Type            | Null | Key | Default | Extra          |
+--------------------+-----------------+------+-----+---------+----------------+
| af_id              | bigint unsigned | NO   | PRI | NULL    | auto_increment |
| af_pattern         | blob            | NO   |     | NULL    |                |
| af_user            | bigint unsigned | NO   | MUL | NULL    |                |
| af_user_text       | varchar(255)    | NO   |     | NULL    |                |
| af_timestamp       | binary(14)      | NO   |     | NULL    |                |
| af_enabled         | tinyint(1)      | NO   |     | 1       |                |
| af_comments        | blob            | YES  |     | NULL    |                |
| af_public_comments | tinyblob        | YES  |     | NULL    |                |
| af_hidden          | tinyint(1)      | NO   |     | 0       |                |
| af_hit_count       | bigint          | NO   |     | 0       |                |
| af_throttled       | tinyint(1)      | NO   |     | 0       |                |
| af_deleted         | tinyint(1)      | NO   |     | 0       |                |
| af_actions         | varchar(255)    | NO   |     |         |                |
| af_global          | tinyint(1)      | NO   |     | 0       |                |
| af_group           | varchar(64)     | NO   | MUL | default |                |
+--------------------+-----------------+------+-----+---------+----------------+ 192.171.187.136 (talk) 14:24, 10 March 2022 (UTC)
try to add the new index manually without removing af_group first.
Basically the line:
ADD INDEX af_group_enabled(af_group,af_enabled,af_id)
It's strange that the Comments table fixed itself. I'd check if the Comment_actor column was added. Otherwise this means the error skipped that update and you may get errors when the wiki requests that column. Ciencia Al Poder (talk) 22:22, 10 March 2022 (UTC)
ADD INDEX af_enabled_group(af_group,af_groupid,af_id)
ALTAR TABLE an error occurred
DEFINE USER "anonymous 1:1"
DISABLE parent_array
DEBUG children_string
WATCH undefined 2600:1700:EF40:6320:850A:2522:63EF:6166 (talk) 03:38, 11 March 2022 (UTC)
@Ciencia Al Poder ,
I just ran this command and it says duplicate key ..
mysql> ALTER TABLE `mw_abuse_filter` ADD INDEX af_group_enabled(af_group,af_enabled,af_id);
ERROR 1061 (42000): Duplicate key name 'af_group_enabled' 192.171.187.136 (talk) 08:26, 11 March 2022 (UTC)
@Ciencia Al Poder,
I think i have cracked the issue and fixed the issue.
Root cause, the names of index in which the query is dropping and adding are different, hence the problem is upgrading.
I fixed both the tables abuse filter and its related table, abuse filter log and boom the upgrade was done. 192.171.187.136 (talk) 08:51, 11 March 2022 (UTC)

How delete user's info page fo me not delete support

Hello, how do I delete a wiki page and information about me that contains incorrect and defamatory information about myself and my family? What should we do to make things happen so that there is no more to turn to? Rimasstonyss (talk) 13:43, 10 March 2022 (UTC)

Where is the page located?
Generally you have to contact the people responsible for the website in question (which unless its on mediawiki.org, is usually not us) Bawolff (talk) 04:35, 11 March 2022 (UTC)

Error: Lua error: Internal error: The interpreter exited with status 1.

Installed software Product Version MediaWiki 1.35.5 PHP 7.4.28 (fpm-fcgi) SQLite 3.37.2 ICU 70.1 Lua 5.2.4

What I have in LocalSettings.php

$wgScribuntoDefaultEngine = 'luastandalone'; $wgScribuntoEngineConf['luastandalone']['luaPath'] = '/usr/local/bin/lua52'; $wgScribuntoEngineConf['luastandalone']['errorFile'] = '/var/log/mediawiki/luaError.log'; $wgScribuntoEngineConf['luastandalone']['allowEnvFuncs'] = true;

What I try to do:

On a MediaWiki wiki with Scribunto enabled, create a page with a title starting with "Module:", for example "Module:Bananas". Into this new page, copy the following text:

local p = {} --p stands for package

function p.hello( frame )

   return "Hello, world!"

end

return p

Save that, .... and get this: Error: Lua error: Internal error: The interpreter exited with status 1.

and in my LuaError.log this: /usr/local/bin/lua52: ...ns/Scribunto/includes/engines/LuaStandalone/MWServer.lua:588: attempt to call global 'setfenv' (a nil value) stack traceback: ...ns/Scribunto/includes/engines/LuaStandalone/MWServer.lua:588: in function 'unserialize' ...ns/Scribunto/includes/engines/LuaStandalone/MWServer.lua:439: in function 'receiveMessage' ...ns/Scribunto/includes/engines/LuaStandalone/MWServer.lua:307: in function 'dispatch' ...ns/Scribunto/includes/engines/LuaStandalone/MWServer.lua:52: in function 'execute' ...ons/Scribunto/includes/engines/LuaStandalone/mw_main.lua:7: in main chunk [C]: in ?

Having searched the error and having read docs around this, I'm stuck and need help. 79.246.201.191 (talk) 14:27, 10 March 2022 (UTC)

Using this:
Scribunto – (04b897f) 07:00, 28 February 2022 79.246.201.191 (talk) 14:36, 10 March 2022 (UTC)
You have to use 5.1.x. lua 5.2 is not supported. Bawolff (talk) 17:59, 10 March 2022 (UTC)
Yes. Lua51 works. Thanks. 79.246.201.191 (talk) 22:04, 10 March 2022 (UTC)

How to load values from a PHP array into MediaWiki commands?

MediaWiki 1.36.1 with Extension:Lockdown.

This works:

wfLoadExtension( 'Lockdown' );
$wgSpecialPageLockdown['Recentchanges'] = array('sysop');
// Recentchanges page is locked from any user without sysop role;

But if I want to load names of special pages from an array:

$all_special_pages = array(
    'Recentchanges',
    'BrokenRedirects',
    'Disambiguations',
    'Userlogin',
    'Userlogout'
);

How to load the values of the array into a single $wgSpecialPageLockdown[] = array('sysop'); command? 79.183.173.166 (talk) 15:12, 10 March 2022 (UTC)

https://www.php.net/manual/en/control-structures.foreach.php Bawolff (talk) 17:57, 10 March 2022 (UTC)

Some Mac users have searching problem

I run a private mediawiki instance and recently upgraded to from 1.35.1 to 1.37.1. Now some of my mac users when trying to do a search for the word recombinase get an error message trying to display the special search page(you can't see the page "http://mediawiki/mediawiki/index.php?search=recombinase title=Special%3Search go=Go" because it is not on the approved list in Screen Time.) . Now if they search for recombinas it works just fine. I can't figure this out. 67.241.140.174 (talk) 16:48, 10 March 2022 (UTC)

ArgumentCountError and Exception caught inside exception handler

My website is working okay except that when I click the logo, I get the following two exceptions and their backtraces.

ArgumentCountError

ArgumentCountError: Too few arguments to function TimelessTemplate::getSidebarChunk(), 0 passed and at least 3 expected

from /skins/Timeless/includes/TimelessTemplate.php(305)
#0 /skins/Timeless/includes/TimelessTemplate.php(539): TimelessTemplate->getSidebarChunk()
#1 /skins/Timeless/includes/TimelessTemplate.php(90): TimelessTemplate->getPageToolSidebar()
#2 /includes/skins/SkinTemplate.php(131): TimelessTemplate->execute()
#3 /includes/skins/SkinTemplate.php(146): SkinTemplate->generateHTML()
#4 /includes/OutputPage.php(2634): SkinTemplate->outputPage()
#5 /includes/MediaWiki.php(927): OutputPage->output(boolean)
#6 /includes/MediaWiki.php(940): MediaWiki::{closure}()
#7 /includes/MediaWiki.php(546): MediaWiki->main()
#8 /index.php(53): MediaWiki->run()
#9 /index.php(46): wfIndexMain()
#10 {main}

Exception caught inside exception handler

Exception caught inside exception handler: [5da7ba178ae1bd2869def5a8] ArgumentCountError: Too few arguments to function TimelessTemplate::getSidebarChunk(), 0 passed in /skins/Timeless/includes/TimelessTemplate.php on line 539 and at least 3 expected

#0 /skins/Timeless/includes/TimelessTemplate.php(539): TimelessTemplate->getSidebarChunk()
#1 /skins/Timeless/includes/TimelessTemplate.php(90): TimelessTemplate->getPageToolSidebar()
#2 /includes/skins/SkinTemplate.php(131): TimelessTemplate->execute()
#3 /includes/skins/SkinTemplate.php(146): SkinTemplate->generateHTML()
#4 /includes/OutputPage.php(2634): SkinTemplate->outputPage()
#5 /includes/exception/MWExceptionRenderer.php(147): OutputPage->output()
#6 /includes/exception/MWExceptionRenderer.php(66): MWExceptionRenderer::reportHTML(ArgumentCountError)
#7 /includes/exception/MWExceptionHandler.php(106): MWExceptionRenderer::output(ArgumentCountError, integer)
#8 /includes/exception/MWExceptionHandler.php(185): MWExceptionHandler::report(ArgumentCountError)
#9 /includes/MediaWiki.php(568): MWExceptionHandler::handleException(ArgumentCountError, string)
#10 /index.php(53): MediaWiki->run()
#11 /index.php(46): wfIndexMain()
#12 {main}

79.183.173.166 (talk) 17:13, 10 March 2022 (UTC)

This no longer happens, I might have had a mistake somewhere. If something comes up I should update here. 79.183.173.166 (talk) 17:13, 10 March 2022 (UTC)

Where does the p-TOOLBOX element comes from?

In TimelessTemplate.php the main PHP file for Skin:Timeless I have removed almost anything I found redundant for my website but I have the problem that an element with the CSS ID p-TOOLBOX still exist and I didn't find where it comes from there, to remove it.
  • I didn't find it in MediaWiki repository in GitHub:
github.com/wikimedia/mediawiki/search?q=p-TOOLBOX
  • I also didn't find that source code when searching the file tree of MediaWiki in Windows 10 Home
How would you suggest me to find the source code which is responsible for this element? 79.183.173.166 (talk) 19:30, 10 March 2022 (UTC)
I cannot find any "p-toolbox" element when going to https://www.mediawiki.org/wiki/Project:Support_desk?useskin=timeless&debug=true. Might have been locally introduced by you?
See Help:Locating broken scripts for how to find from where things come from. Malyacko (talk) 13:25, 11 March 2022 (UTC)
Presumably they mean p-tb which is part of core. Internally its referred to as "toolbox" in a lot of places, but the actual id is p-tb Bawolff (talk) 13:45, 11 March 2022 (UTC)
I didn't manage to locate this CSS ID anywhere but I did manage to remove this toolbox from PHP, as I have described here:
Project:Support desk/Flow/2022/03#h-How_to_remove_"Tools"_sidebar_chunk_programmatically?-2022-03-06T23:57:00.000Z 79.183.173.166 (talk) 21:55, 10 March 2022 (UTC)

I wish to display #mw-page-header-links only for logged-in users (but not for anonymous users) in Skin:Timeless.

What should I add to the following code to achieve that?

protected function getContentBlock() {
    $html = Html::rawElement(
        'div',
        [ 'id' => 'content', 'class' => 'mw-body',  'role' => 'main' ],
        $this->getSiteNotices() .
        $this->getIndicators() .
        Html::rawElement(
            'h1',
            [
                'id' => 'firstHeading',
                'class' => 'firstHeading',
                'lang' => $this->get( 'pageLanguage' )
            ],
            $this->get( 'title' )
        ) .
        Html::rawElement( 'div', [ 'id' => 'bodyContentOuter' ],
            Html::rawElement( 'div', [ 'id' => 'siteSub' ], $this->getMsg( 'tagline' )->parse() ) .
            Html::rawElement( 'div', [ 'id' => 'mw-page-header-links' ],
                // @phan-suppress-next-line SecurityCheck-DoubleEscaped
                $this->getPortlet(
                    'namespaces',
                    $this->pileOfTools['namespaces'],
                    'timeless-namespaces',
                    [ 'extra-classes' => 'tools-inline' ]
                ) .
                // @phan-suppress-next-line SecurityCheck-DoubleEscaped
                $this->getPortlet(
                    'more',
                    $this->pileOfTools['more'],
                    'timeless-more',
                    [ 'extra-classes' => 'tools-inline' ]
                ) .
                $this->getVariants() .
                // @phan-suppress-next-line SecurityCheck-DoubleEscaped
                $this->getPortlet(
                    'views',
                    $this->pileOfTools['page-primary'],
                    'timeless-pagetools',
                    [ 'extra-classes' => 'tools-inline' ]
                )
            ) .
            $this->getClear() .
            Html::rawElement( 'div', [ 'id' => 'bodyContent' ],
                $this->getContentSub() .
                $this->get( 'bodytext' ) .
                $this->getClear()
            )
        )
    );

79.183.173.166 (talk) 19:50, 10 March 2022 (UTC)

Should it be possible to do with this?
RequestContext::getMain()->getUser()->isLoggedIn()
79.183.173.166 (talk) 08:56, 16 March 2022 (UTC)
Have you tried? If so, what was the outcome? Malyacko (talk) 11:24, 16 March 2022 (UTC)
@Malyacko
If I wrap the above large code with
RequestContext::getMain()->getUser()->isLoggedIn(
    ABOVE_LARGE_CODE
);
I get:
syntax error, unexpected 'RequestContext' (T_STRING), expecting function (T_FUNCTION) or const (T_CONST) 79.180.118.152 (talk) 14:35, 10 April 2022 (UTC)
Discussion in the above code snippet continues here:
Project:Support desk/Flow/2022/04#h-How_to_make_a_certain_skin_feature_to_be_available_only_for_logged-in_users?-2022-04-11T15:52:00.000Z 79.180.118.152 (talk) 20:55, 11 April 2022 (UTC)
Please stop starting new topics for no good reason Malyacko (talk) 05:17, 14 April 2022 (UTC)

PHP echo only for any logged-in user

I want that any logged-in user will see an echo "MESSAGE";.

How to do that? 79.183.173.166 (talk) 20:45, 10 March 2022 (UTC)

What does that have to do with MediaWiki ? —TheDJ (Not WMF) (talkcontribs) 21:10, 10 March 2022 (UTC)
@TheDJ
Because I want to ensure that this is a user who logged-in to a MediaWiki account.
Though I'm not a PHP programmer, I would assume that there is some sepcial MediaWiki syntax applied in this case, hence I ask it here. 79.183.173.166 (talk) 21:56, 10 March 2022 (UTC)
No, there isn't. Malyacko (talk) 13:20, 11 March 2022 (UTC)
Some features in MediaWiki are usable only for logged-in users...
So how is the test if a user is logged-in or not done?
What code uses for that? 79.183.173.166 (talk) 13:24, 11 March 2022 (UTC)
What have you tried yet to find out before posting here? Malyacko (talk) 13:26, 11 March 2022 (UTC)
Asking as https://lmgtfy.app/?q=mediawiki+check+if+user+is+logged+in etc come to my mind, listing some results? Malyacko (talk) 13:27, 11 March 2022 (UTC)
Yesterday I ran in Google:
  • if user is logged in do php mediawiki
  • if user is logged in php
  • concatenate if user is logged in
The last one was most probably a mistake.
Anyway the query you presented is indeed better. I should use it or a very similar query.
mediawiki check if user is logged in
My aim is to "do stuff" only for a logged-in user. 79.183.173.166 (talk) 13:46, 11 March 2022 (UTC)
I seek a global way to test this, not dependent on a particular skin.
Perhaps
if(!$this->data['loggedin']) {
}
Or
if( StubObject::isRealObject( $wgUser ) &&  $wgUser->isLoggedIn())
{
// code or HTML
}
?>
? 79.183.173.166 (talk) 13:57, 11 March 2022 (UTC)
RequestContext::getMain()->getUser()->isLoggedIn() would be the most generic way to do that, although sometimes not best practise depending on context.
Note, that in many places in mediawiki, you are not allowed to use Echo, and must use some other way of outputting, typically via OutputPage (RequestContext::getMain()->getOutput()) Bawolff (talk) 06:09, 12 March 2022 (UTC)
It's maybe not quite what you want but if you use both MediaWiki:Anonnotice and MediaWiki:Sitenotice then only a logged-in user will see the latter (see Manual:Interface/Sitenotice). Jonathan3 (talk) 23:14, 12 March 2022 (UTC)

PNG files blurring on upload?

We're working on a wiki with friends that is hosted with MediaWiki, yet when we upload a PNG file to it, it seems to blur itself? We have included a copy of the original image and how it uploaded itself to the site below.

Infuriatingly, we cannot find any decent answer to this phenomenon--the only result we found in our (admittedly cursory) search is from 11 years ago, where it was insisted to be a problem with the user accidentally zooming in to their browser. Another, sourced 5 years ago, seems to blame ImageMagick rather than MediaWiki.

However, we have plenty of evidence to the contrary being possible, namely how the fuzzy version can be copied and re-uploaded as the fuzzy version on external websites with simply copying the image, and how the only program used for the uploaded image itself (at least on the part of myself) was paint dot net--unless ImageMagick is integrated into MediaWiki, we see no reason that would be relevant, and indeed it seems the image itself is being blurred--not the web browser's perception of it. Camwoodstock (talk) 05:44, 11 March 2022 (UTC)

The files you linked are bit for bit identical and have the same SHA256 hash. If you think you can see any difference between them, its probably in your head, and would probably go away if you did a double blind test.
However if you are viewing thumbnails (aka smaller versions) of the file instead of the full sized file, the smaller versions may look different as the act of shrinking an image can make them look a bit fuzzier. There's a number of trade-offs involved when shrinking an image, with speed vs quality, but also different shrinking algorithms work better for different types of images. This is often noticeable in photographic images (at least for the algorithm we use), where its common to sharpen an image after shrinking to counteract the effects. For images that are more like line drawings, this tends to not look good. As a heuristic MediaWiki will tend to add an extra sharpening for JPG images but not PNG, on the basis that commonly JPGs are used for the type of photos where it would look good to add sharpening, and PNGs are often used for things where it doesn't. However, for this type of art, that heuristic might be wrong.
See also w:Image_scaling#Algorithms, https://www.smashingmagazine.com/2015/06/efficient-image-resizing-with-imagemagick/ and https://pseudo.ddo.jp/share/pseudo/doc/ImageMagick/Usage/resize/index.html#artifacts for more info on this topic. Bawolff (talk) 08:48, 11 March 2022 (UTC)

dryad & cerberus 11

When can I use these in the game I am a little confused as I can make them but not use them thank you Rainbow91572 (talk) 06:50, 11 March 2022 (UTC)

You are in the wrong place. Bawolff (talk) 08:28, 11 March 2022 (UTC)

Social Profile $wgUserStatsPointValues

Hey commuinty,


i am fairly new to MediaWiki, so i am very glad if you can help me.


We want to use the Social Profiles to give Points for different Tasks a User has done.

I allready checked the following pages

https://www.mediawiki.org/wiki/Extension:SocialProfile/Technical_documentation

https://www.mediawiki.org/wiki/Extension:SocialProfile

but i didn´t find all events i was looking for.


The Idea is to give Points for the following actions


-User signs in to the plattform for the first time

-User adds a profile picture for the first time

-User creates a page (everytime)

-User Adds content to a page (everytime)

-User approves a page (everytime)

-user participates in a discussion (everytime)

-is there also a posiblity to give Points for custom events? Like visiting a Page?


thx much in adv. Creamriper (talk) 08:15, 11 March 2022 (UTC)

Pump.
Any help or input how i can add userstatspoints for different actions?
$wgUserStatsPointValues['edit'] = 50
like
$wgUserStatsPointValues['approvecontent'] = 10
$wgUserStatsPointValues['visitaspecialpage'] = 10
$wgUserStatsPointValues['participateindiscussion'] = 10
$wgUserStatsPointValues['customevent'] = 10
thx much in adv. Creamriper (talk) 10:45, 16 March 2022 (UTC)

htaccess redirect prevents login

Hello,

I'm struggling with setting up my MW under www.krimpedia.de the way I want. I modified the htaccess to get short URLs. The content of the file looks like this:


RewriteEngine On

RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^(.*)$ /index.php?title=$1 [L,END]

RewriteCond %{QUERY_STRING} title=(.*)

RewriteRule "^(.*)$" /%1 [R=301,QSD,L]


Unfortunately that redirect leads to a loop on the sign-in that prevents me from logging in.

Do you have an idea how I could fix this?


Thanks 77.3.140.67 (talk) 09:36, 11 March 2022 (UTC)

? 77.3.140.67 (talk) 11:38, 11 March 2022 (UTC)
Its not clear to me what the last two lines are doing. Maybe they are the problem. Bawolff (talk) 13:44, 11 March 2022 (UTC)
I followed your advise and deleted the last two lines. With that change I was able to log in again but my shortened URLs also disappeared.
Is there another way to achieve pretty links? Krimpedia (talk) 15:21, 11 March 2022 (UTC)
try some of the instructions at manual:Short URL Bawolff (talk) 06:05, 12 March 2022 (UTC)
I am aware of these instructions.
Despite the suggestion I went for this structure: example.org/Page_title
Is it reasonable to believe that the issue with the log-in is caused by this? What would change if I would change it to example.org/wiki/Page_title ?
And the more important question: how would I do this? Sorry, I'm a newbie. Krimpedia (talk) 08:14, 12 March 2022 (UTC)
I wonder whether it's the ?title=$1 part. Anyway, I use the same URL structure so you could just get rid of what you have and try this:
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d
RewriteRule ^(.*)$ %{DOCUMENT_ROOT}/index.php [L]
Those lines are either from or based on the page Bawolff shared. Jonathan3 (talk) 10:52, 12 March 2022 (UTC)
Thank you Jonathan3. With your code I am able to log in again but the Urls show the "/index.php?title=" again. Krimpedia (talk) 12:04, 12 March 2022 (UTC)
Does anyone has another suggestion for me?
As stated above:
RewriteCond %{QUERY_STRING} title=(.*)
RewriteRule "^(.*)$" /%1 [R=301,QSD,L]
seems to do the trick with the URLs but then I am no longer able to log in. Krimpedia (talk) 13:10, 12 March 2022 (UTC)
Sorry, you still need the RewriteEngine on line at the start. So:
RewriteEngine on
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d
RewriteRule ^(.*)$ %{DOCUMENT_ROOT}/index.php [L]
Jonathan3 (talk) 23:02, 12 March 2022 (UTC)
Just to clarify, what is your $wgArticlePath set to? Bawolff (talk) 07:14, 13 March 2022 (UTC)
in my LocalSettings I have written the following
$wgScriptPath = "";
$wgArticlePath = "/$1";
the htaccess-file cotains the folowing:
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?title=$1 [L,END]
RewriteCond %{QUERY_STRING} title=(.*)
RewriteRule "^(.*)$" /%1 [R=301,QSD,L]
Jonathans suggestion enables me to log in again, but doesn't shorten the URL.
MW is installed in a folder named krimpedia.de. Krimpedia (talk) 08:58, 14 March 2022 (UTC)
I have the same settings for $wgScriptPath and $wgArticlePath as you. (I have a comment #previously had set to $wgServer and "/" for $wgScriptPath so, although likely they're wrong, it might be worth trying those two alternatives!)
Did you try again with the RewriteEngine on line included? Jonathan3 (talk) 11:28, 14 March 2022 (UTC)
Ok. I'm going crazy here... I didn't change anything and all of a sudden I can log in again. BUT: now the charset is messed up. If I try to use the search the colon is'nt recognized and I get the following message:
Der angeforderte Seitentitel enthält ungültige Zeichen: „%3A“.
On the other hand I can open the special pages page which does contain a colon in the URL. Krimpedia (talk) 21:30, 14 March 2022 (UTC)

Math extension cannot connect to Restbase.

I have migrated a server running a MediaWiki from Ubuntu 16.04 to Ubuntu 20. The server is administrated using Plesk Obsidian and the MediaWiki is 1.31 as included as a Plesk application.

The transfer of the MediaWiki was smooth but rendering formulas now results in Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":)

Attempts to re-install the Math extension from https://github.com/wikimedia/mediawiki-extensions-Math resulted in a broken Wiki after calling update.php through /mw-config


LocalSettings.php contains

wfLoadExtension( 'Math' );

$wgDefaultUserOptions['math'] = 'mathml';

$wgMathValidModes=['mathml']; Ingodahn (talk) 11:34, 11 March 2022 (UTC)

Mediawiki error 403

All link that contain colon return error 403, how to resolve this problem? 114.124.195.123 (talk) 15:33, 11 March 2022 (UTC)

i tried to install mediawiki using softaculous and by uploading wikimedia file manually via cpanel, but it still returns error 403. 114.124.195.123 (talk) 15:42, 11 March 2022 (UTC)
usually this is a short url problem. Bawolff (talk) 06:05, 12 March 2022 (UTC)

wikipedi arapça görünen rakamlar

vikipedi TR de uyelik alip cevrimici oldugumda rakamların tamamı arap rakamları olarak gorunuyor, dosya boyutlari ۷۱۸ bytes (۵۴ words) seklinde .. ben arabistan arapca vs boyle bir sey secmedigim halde bu ayarı kim yaptıysa iyiniyetli bulmuyorum ve cok kizdigimi, hayir duasi okudugumu belirtmek isterim .. Esenosman (talk) 16:42, 11 March 2022 (UTC)

@Esenosman Feel free to bring this up on https://meta.wikimedia.org/wiki/Tech instead, if some setting on a specific Wikipedia website isn't working as expected. Thanks. Malyacko (talk) 13:36, 13 March 2022 (UTC)

Does Mediawiki have to way to check if its using OPCache and APCU?

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 checked my phpinfo page and both of them are enabled, but when I disable them (and check that they are), I don't notice any performance differences. YousufSSyed (talk) 06:46, 12 March 2022 (UTC)

So opcache and apcu do really different things
Opcache affects php, and works on a layer below mediawiki. Mediawiki doesn't have to do anything to take advantage of it.
Apcu will only be used if $wgMainCacheType is set to CACHE_ACCEL. You can check if its being used by enabling mw debug logging. Also the apc.shm_size config variable can affect how effective it is a lot. Bawolff (talk) 07:32, 12 March 2022 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Hi all,

In order to improve the clarity of our Wiki, we try to embed some SVG diagrams in our main page. We would like that the integrated links (to the Wiki pages) in our diagrams are clickable. Unfortunately, MediaWiki converts automatically the diagrams into PNG images, where the integrated links don't work at all.

Is there any way to integrate the SVG diagrams, including the links?

Kind regards

Erik Breer genannt Nottebohm 2A02:8440:3340:4D83:2D79:F1AA:6DA:D977 (talk) 12:21, 12 March 2022 (UTC)

There is Extension:NativeSvgHandler, but that still won't allow you to click links in the the SVGs, unless you open the original files directly in the browser. In order to have links inline in pages, you would have to do inline SVG (perhaps you can adapt the NativeSvgHandler extension for that), but this also comes with potential security and XSS problems that you will have to deal with.
There are also some dedicated graph and diagram extensions, but as they are not deployed on wikipedia, the quality of those varies widely. —TheDJ (Not WMF) (talkcontribs) 10:35, 14 March 2022 (UTC)

Add Html code (Google Adsense Code) in Timeless Right sidebar

I want to add html code in Right sidebar of Timeless Skin.

https://i.stack.imgur.com/P2Ca5.png

you can suggest with hooks as well. I have tried with "SidebarBeforeOutput Hook but can't add html code. 2401:4900:54EF:FE3F:89C2:7309:155C:C69E (talk) 14:48, 12 March 2022 (UTC)

You can use SkinAfterPortletHook, and add the html based on the portlet internal name. ('more' in your case). – Ammarpad (talk) 07:36, 13 March 2022 (UTC)

Issue Upgrading from 1.33.4 to 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.


Error when upgrading from MediaWiki 1.33.4 to 1.34 on main page:


Hi all, I wonder if anyone can help?


When trying to upgrade from 1.33.4 to 1.34 I get the following error:


[YizDPmwd53OgEa32QAw-tQAAAAU] /index.php/Main_Page UnexpectedValueException from line 462 of /var/www/mediawiki-1.34.0/includes/libs/rdbms/loadbalancer/LoadBalancer.php: Invalid server index index #DB_SLAVE

Backtrace:

#0 /var/www/mediawiki-1.34.0/includes/libs/rdbms/loadbalancer/LoadBalancer.php(896): Wikimedia\Rdbms\LoadBalancer->getConnectionIndex(string, array, string)

#1 /var/www/mediawiki-1.34.0/includes/libs/rdbms/loadbalancer/LoadBalancer.php(1043): Wikimedia\Rdbms\LoadBalancer->getConnection(string, array, string, integer)

#2 /var/www/mediawiki-1.34.0/includes/GlobalFunctions.php(2576): Wikimedia\Rdbms\LoadBalancer->getMaintenanceConnectionRef(string, array, string)

#3 /var/www/mediawiki-1.34.0/extensions/DynamicArticleList/DynamicArticleList_body.php(31): wfGetDB(string)

#4 /var/www/mediawiki-1.34.0/includes/parser/Parser.php(4293): DynamicArticleList::renderTag(string, array, Parser, PPFrame_Hash)

#5 /var/www/mediawiki-1.34.0/includes/parser/PPFrame_Hash.php(328): Parser->extensionSubstitution(array, PPFrame_Hash)

#6 /var/www/mediawiki-1.34.0/includes/parser/Parser.php(3330): PPFrame_Hash->expand(PPNode_Hash_Tree, integer)

#7 /var/www/mediawiki-1.34.0/includes/parser/Parser.php(1489): Parser->replaceVariables(string)

#8 /var/www/mediawiki-1.34.0/includes/parser/Parser.php(593): Parser->internalParse(string)

#9 /var/www/mediawiki-1.34.0/includes/content/WikitextContent.php(368): Parser->parse(string, Title, ParserOptions, boolean, boolean, integer)

#10 /var/www/mediawiki-1.34.0/includes/content/AbstractContent.php(555): WikitextContent->fillParserOutput(Title, integer, ParserOptions, boolean, ParserOutput)

#11 /var/www/mediawiki-1.34.0/includes/Revision/RenderedRevision.php(264): AbstractContent->getParserOutput(Title, integer, ParserOptions, boolean)

#12 /var/www/mediawiki-1.34.0/includes/Revision/RenderedRevision.php(236): MediaWiki\Revision\RenderedRevision->getSlotParserOutputUncached(WikitextContent, boolean)

#13 /var/www/mediawiki-1.34.0/includes/Revision/RevisionRenderer.php(215): MediaWiki\Revision\RenderedRevision->getSlotParserOutput(string)

#14 /var/www/mediawiki-1.34.0/includes/Revision/RevisionRenderer.php(152): MediaWiki\Revision\RevisionRenderer->combineSlotOutput(MediaWiki\Revision\RenderedRevision, array)

#15 [internal function]: MediaWiki\Revision\RevisionRenderer->MediaWiki\Revision\{closure}(MediaWiki\Revision\RenderedRevision, array)

#16 /var/www/mediawiki-1.34.0/includes/Revision/RenderedRevision.php(198): call_user_func(Closure, MediaWiki\Revision\RenderedRevision, array)

#17 /var/www/mediawiki-1.34.0/includes/poolcounter/PoolWorkArticleView.php(196): MediaWiki\Revision\RenderedRevision->getRevisionParserOutput()

#18 /var/www/mediawiki-1.34.0/includes/poolcounter/PoolCounterWork.php(125): PoolWorkArticleView->doWork()

#19 /var/www/mediawiki-1.34.0/includes/page/Article.php(791): PoolCounterWork->execute()

#20 /var/www/mediawiki-1.34.0/includes/actions/ViewAction.php(63): Article->view()

#21 /var/www/mediawiki-1.34.0/includes/MediaWiki.php(511): ViewAction->show()

#22 /var/www/mediawiki-1.34.0/includes/MediaWiki.php(302): MediaWiki->performAction(Article, Title)

#23 /var/www/mediawiki-1.34.0/includes/MediaWiki.php(900): MediaWiki->performRequest()

#24 /var/www/mediawiki-1.34.0/includes/MediaWiki.php(527): MediaWiki->main()

#25 /var/www/mediawiki-1.34.0/index.php(44): MediaWiki->run()

#26 {main}


I’ve tried adding new extensions for 1.34, upgrading to different versions ‘upto the latest 1.37.1’ and made sure that the LoadBalancer.php has the DB_REPLICA setting enabled. This only seems to appear on the main page from what I can see.


Thanks Ljkennedy2000 (talk) 18:43, 12 March 2022 (UTC)

Are you sure DynamicArticleList is compatible with your version of mediawiki? Bawolff (talk) 20:48, 12 March 2022 (UTC)
Hi Bawolff,
Thanks for the response.
Unfortunately my Experience is limited with Media Wiki and i've been tasked with updating our current system, is that an extension of some sort and how would I check compatibility?
Thanks again. Ljkennedy2000 (talk) 07:39, 14 March 2022 (UTC)
Hi Bawolff,
I've found the DynamicArticleList.php file in extensions and noticed the following on line 24 -
// The callback function for converting the input text to HTML output
function DynamicArticleList( $input ) {
require_once ('CategoryUtil.php');
$dbr =& wfGetDB( DB_SLAVE );
// INVALIDATE CACHE
global $wgTitle;
$wgTitle->invalidateCache();
// Default Values
$listTitle = false;
$listType = 'new';
$listCount = 5;
$categoryRoot = false;
Should this be set to DB_REPLICA instead of DB_SLAVE  ?
Thanks Ljkennedy2000 (talk) 07:58, 14 March 2022 (UTC)
Also it's * Dynamic Article List v2.0 Ljkennedy2000 (talk) 07:59, 14 March 2022 (UTC)
Probably best to disable Extension:Dynamic Article List and try again :-) Jonathan3 (talk) 11:40, 14 March 2022 (UTC)
Hi Jonathan3,
Thanks for the response. To disable Dynamic Article List is this done in the Localsettings.php?
Thanks for you help. Ljkennedy2000 (talk) 12:55, 14 March 2022 (UTC)
Yes. There should be a line that starts with "require". Find the one for this extension and remove it. (Keep backups just in case) Bawolff (talk) 19:28, 14 March 2022 (UTC)
Hi,
I upgraded to 1.35.5 and disabled Dynamic Article List in the Localsettings.php which seems to let the main page work now apart from one of our side menus which shows the following error:
<dynamicarticlelist>
title=Recently Update Articles
type=update
count=5
</dynamicarticlelist>
<dynamicarticlelist>
title=Most Popular Articles
type=hot
count=5
</dynamicarticlelist>
Is there something else other than dynamic article lists that could be used to get this working or an update for it maybe?
I then tried upgrading to media wiki 1.36.0 to see if this would resolve it but it didn't work - the whole page seems to have lost images and styling it's showing text for everything 'although it lets me login etc'. The images were copied over and the permissions looked okay, I did have to install php-intl to get to 1.36.0 so i'm not sure if this caused it?
Thanks Ljkennedy2000 (talk) 16:33, 22 March 2022 (UTC)
Hi Bawolff,
Thanks for your input I will give it a try :) Ljkennedy2000 (talk) 07:28, 15 March 2022 (UTC)
Hi,
I upgraded to 1.35.5 and disabled Dynamic Article List in the Localsettings.php which seems to let the main page work now apart from one of our side menus which shows the following error:
<dynamicarticlelist>
title=Recently Update Articles
type=update
count=5
</dynamicarticlelist>
<dynamicarticlelist>
title=Most Popular Articles
type=hot
count=5
</dynamicarticlelist>
Is there something else other than dynamic article lists that could be used to get this working or an update for it maybe?
I then tried upgrading to media wiki 1.36.0 to see if this would resolve it but it didn't work - the whole page seems to have lost images and styling it's showing text for everything 'although it lets me login etc'. The images were copied over and the permissions looked okay, I did have to install php-intl to get to 1.36.0 so i'm not sure if this caused it?
Thanks Ljkennedy2000 (talk) 09:20, 21 March 2022 (UTC)
There are lots of similiar extensions, like DynamicPageList. Bawolff (talk) 06:13, 1 April 2022 (UTC)
Hi Bawolff,
I've managed to get to version 1.36 now :) but my next issue is all the main_page entries are in text format, I cannot see any of the images or headers etc.. The images files have been copied over into the correct folder. Could this be a php issue?
Thanks Ljkennedy2000 (talk) 16:07, 11 May 2022 (UTC)
What do you mean by headers?
For images, are their image description pages working? Bawolff (talk) 02:21, 12 May 2022 (UTC)
Hi Bawolff,
Thanks for the response. Apologies i've probably used the wrong terminology but basically the whole main page is in plain text and it doesn't render any images or sidebars etc when i upgrade from 1.35.0 to 1.36.0, if I move the wikimedia folder back to 1.35.0 it works fine. I've checked the skins folder and that looks the same, i've tried copying over the extensions folder and images but still no luck :(
Thanks Ljkennedy2000 (talk) 15:11, 12 May 2022 (UTC)
Is it just missing css (e.g. everything is text but for example headers and page title are still larger than other text?) Bawolff (talk) 15:50, 12 May 2022 (UTC)
Hi Bawolff,
Text is different sizes on the main page and links are still there so it looks like it could be missing CSS, is it possible that CSS is in a different location for 1.36.0 to what it was in 1.35.0?
Thanks Ljkennedy2000 (talk) 14:44, 16 May 2022 (UTC)
Hi Bawolff,
Thanks for the reply I will try and give that a go. Ljkennedy2000 (talk) 07:33, 6 April 2022 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

How to embed a multipage pdf file?

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 embed a pdf file with multiple pages on a page. It should only show the first page but allow to click on next page or previous page or go to a selected page like you see it at the right on pages in the file namespace, e.g. File:Example.pdf. Somehow I do not find the syntax for it. The docu on Extension:PDFHandler unfortunately lacks providing an example for this. [[kgh]] (talk) 20:36, 12 March 2022 (UTC)

That's not really possible (without additional js) - all you can do is display or link to specific pages. Bawolff (talk) 20:47, 12 March 2022 (UTC)
Wow! Seriously? Admittedly I never tried to do this before. Still I regard this feature to be that basic that I did not expect it not to be available. Anyhow, thanks a lot for clarifying. [[kgh]] (talk) 20:53, 12 March 2022 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Old Install of MW, need to upgrade

Hello, I have an older wiki that was bitten by what I feel is the PCRE issue, due to a host update. Nothing shows, but everything is there when editing.

$wgVersion = '1.20.0';

I understand that I need to "1.23 or earlier, you'll first have to upgrade your 1.23 wiki to 1.27 (or 1.35), and, from 1.27 (or 1.35), you'll be able to upgrade to 1.36."

Since my install is much older, what is my upgrade path, and where can I obtain the older versions?

Thank you in advance! JeztahMW (talk) 19:52, 13 March 2022 (UTC)

https://releases.wikimedia.org/mediawiki/ Bawolff (talk) 20:41, 13 March 2022 (UTC)
Thank you for that. Do you know what versions I can skip to from 1.20? JeztahMW (talk) 20:47, 13 March 2022 (UTC)
Do 1.27 Bawolff (talk) 21:28, 13 March 2022 (UTC)
Manual:Upgrading#Check requirements Malyacko (talk) 21:13, 13 March 2022 (UTC)

Where can I find a list of all special page names?

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 there a webpage here which includes a list of all special page names?


Each name of each "special page" in MediaWiki. 79.183.173.166 (talk) 23:23, 13 March 2022 (UTC)

The closest I found is this, in Wikipedia, ironically.
en.wikipedia.org/wiki/Help:Special_page 79.183.173.166 (talk) 23:24, 13 March 2022 (UTC)
There is a special page special:SpecialPages
However some internal special pages might not be shown. There is alsoa list at https://github.com/wikimedia/mediawiki/blob/master/includes/specialpage/SpecialPageFactory.php#L67 but doesn't include extension special pages or their actual names Bawolff (talk) 01:40, 14 March 2022 (UTC)
oh, almost forgot, you can get it from the api - https://www.mediawiki.org/w/api.php?action=query&meta=siteinfo&siprop=specialpagealiases&formatversion=2 (different wikis have different special pages so the answer will vary depending on which wiki's api you ask) Bawolff (talk) 01:44, 14 March 2022 (UTC)
Thanks, I believe this thread should be marked as solved. 79.183.173.166 (talk) 09:28, 14 March 2022 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

How to lock history diffs with extension:Lockdown?

How to lock all history diffs whatsoever with Extension:Lockdown? 79.183.173.166 (talk) 00:49, 14 March 2022 (UTC)

  1. What are "history diffs"?
  2. Which underlying problem would be solved if they were "locked"? Malyacko (talk) 11:49, 14 March 2022 (UTC)
Any diff whatsoever
(a comparison of two revisions).
The problem that crawlers crawl them.
Crawlers don't index them due to noindex yes, but they still crawl them, which is something I want to prevent so possible irrelevant deleted data won't be associated with the rest of my content. 79.183.173.166 (talk) 14:40, 14 March 2022 (UTC)
If they are crawled but not indexed, that won't make their contents display in search engines.
Even if you "lock them down", they will still crawl them.
Search engines like Google and Bing provide a control panel to disable crawling URLs with specific parameters, like "diff" or "oldid". That would prevent them overloading your server in the first place. And also, robots.txt may be used for this purpose if the crawler supports some advanced robots.txt syntax, like wildcards in the middle of the URL pattern. Ciencia Al Poder (talk) 15:10, 14 March 2022 (UTC)
@Ciencia Al Poder alright, it's not only pages with parameters such as "diff" or "oldid" but every special page whatsoever.
The very act of crawling long pages like these, is for me a problem.
I don't count on robots.txt alone.
Perhaps I should ask Google and Bing not to crawl anything with parameters.
Would that be plausible (if at all possible)? 79.183.173.166 (talk) 15:33, 14 March 2022 (UTC)
It is possible if you can prove you own your domain to Google and Bing. google:search+console Ciencia Al Poder (talk) 17:52, 14 March 2022 (UTC)
@Ciencia Al Poder
I misunderstand what you meant to say in the least passage.
Of course I own the domain and I have Search Console intact (Google). 79.183.173.166 (talk) 17:59, 14 March 2022 (UTC)

help buttons

hello,

I have installed wikimedia as an internal company wiki site.

Many pages (special pages) have a help button, links' url of this button are wikimedia help pages (like Special:MyLanguage/Help:Managing files in upload file page).

Is it possible to change the url to internal help pages (of my creation)?

I would like also to change in edit page the url of user guide (...... index.php/Mw:Special:MyLanguage/Help:VisualEditor/User_guide) how can I do it?

Thanks ForeachUser (talk) 09:03, 14 March 2022 (UTC)

Yes, if you append uselang=qqx parameter to the page, you can find the message to override the link. For example, you would change MediaWiki:Upload-helppage for the help page on Special:Upload, or MediaWiki:Visualeditor-help-link for the help page in the Visual Editor. Dylsss (talk) 03:02, 15 March 2022 (UTC)
Thanks @Dylsss for the reply.
Sorry for the question, but I am new in the wikimedia world.
I have add "uselang=qqx" in the url and I have understood that the element's name is "(helppage-top-gethelp)" and this is a link to "(upload-helppage)".
What I have to do now?
Thanks ForeachUser (talk) 09:44, 17 March 2022 (UTC)
Just create MediaWiki:Upload-helppage on your wiki with the name of the page you want it to link to. Dylsss (talk) 19:03, 17 March 2022 (UTC)
Hi Dylss,
I have done.
When I tried the first time, I was using an incorrect user profile.
To enter in the MediaWiki:Upload-helppage the correct user profile is "sysop".
Thank you for the help. ForeachUser (talk) 16:06, 21 March 2022 (UTC)

Checkbox

Bonjour,

je souhaite insérer une ligne de code sur mediawiki qui me permettrait d'avoir une cache que l'on pourrait cocher et décocher à souhait, quelle serait la ligne de code pour faire cela ?

Merci par avance pour vos retours.

Belle journée. 109.190.135.180 (talk) 09:25, 14 March 2022 (UTC)

What kind of cache exactly? Please also describe the underlying problem, not only a possible solution. :) Malyacko (talk) 10:08, 14 March 2022 (UTC)
Petit erreur ce n'est pas une cache mais une "checkbox" que je souhaite insérer en ligne de code, afin de pouvoir sélectionner ou non certaines infos.
Merci pour votre retour. 109.190.135.180 (talk) 14:26, 14 March 2022 (UTC)
I am not sure i understood, but is Manual:Collapsible elements what you are looking for? Bawolff (talk) 15:47, 14 March 2022 (UTC)

Bootstrap tooltip with HTML tags not rendering correctly

Hey,

I am using version 5.1 of Bootstrap on my wiki with the following installations:

MediaWiki 1.35.5
PHP 7.4.3 (apache2handler)
MySQL 8.0.28-0ubuntu0.20.04.3
ICU 66.1

I am trying to get the tooltips to work which works as expected unless there are HTML tags in the actual tooltip content. For some reason MediaWiki renders the HTML tags outside of the tooltip content as seen this this screenshot: https://i.gyazo.com/7d8d549582f8e2d54243a9fa1cadffd5.png

Is there any way to solve this? Mukilol2 (talk) 16:24, 14 March 2022 (UTC)

try escaping the < and > inside the attribute. E.g. do &lt;b&gt;
Also i don't really know how bootstrap works, but if your wiki is publicly editable you should make sure this feature is not an XSS vector Bawolff (talk) 19:25, 14 March 2022 (UTC)

Disallow crawling of anything with a query string

MediaWiki 1.36.1 with just one user account.

  • No core customizations
  • No non core skins
  • No non core extensions
  • No images
  • No videos
  • No audios

I want that crawlers won't index or even crawl anything with a URL parameter.

Is there a problem to disallow crawling of anything with a query string?

Disallow: /index.php?

Thank you for your help. 79.183.173.166 (talk) 21:38, 14 March 2022 (UTC)

This won't prevent indexing if other sites link to a page (see google docs).
It will prevent some crawlers (but not all, since not everyone respects robots.txt)
Assuming that your $wgArticlePath is somewhere different, i don't think it will break anything. Bawolff (talk) 04:26, 15 March 2022 (UTC)
@Bawolff
About what you said "This won't prevent indexing if other sites link to a page (see google docs)."
Are you sure that's correct?
I have just read here
developers.google.com/search/docs/advanced/robots/robots_txt
>>>> How Google interprets the robots.txt specification
Under the chapter "Disallow" I didn't find a similar saying. 79.183.173.166 (talk) 15:12, 15 March 2022 (UTC)
Bawolff I think I get the point now but this might be wrong because:
If Google crawled a page in my website and indexed it before accessing my robots.txt but then Google accessed my robots.txt,
The index will be canceled and won't happen again (as long as the directive is in my robots.txt).
Would you assume otherwise?
Thanks, 79.183.173.166 (talk) 15:38, 15 March 2022 (UTC)
Google will record links that are disallowed by robots.txt and show them but won't try to access them. See https://developers.google.com/search/docs/advanced/crawling/block-indexing Bawolff (talk) 04:38, 16 March 2022 (UTC)

Prevent crawling of any webpage which isn't an article or category

MediaWiki 1.37.1 core only.

Have I understood Manual:Robots.txt and the following should be enough?

Disallow: /index.php?
Disallow: /index.php?diff=	
Disallow: /index.php?oldid=	
Disallow: /index.php?title=Help	
Disallow: /index.php?title=Image	
Disallow: /index.php?title=MediaWiki	
Disallow: /index.php?title=Special:	
Disallow: /index.php?title=Template
Disallow: /ANY_DIRECTORY_IN_ROOT/

79.183.173.166 (talk) 02:17, 15 March 2022 (UTC)

If it's not enough, where could I read a full list of any =, section and namespace one can put there? 79.183.173.166 (talk) 02:19, 15 March 2022 (UTC)
Please delete my above message and this one. 79.183.173.166 (talk) 02:45, 15 March 2022 (UTC)
Umm, its not clear what you are trying to do. However the above is probably wrong since only the first and last line even do anything, the rest would be ignored because the first line includes more than them. Bawolff (talk) 04:20, 15 March 2022 (UTC)
@Bawolff
I just want Google to scan only article pages and category pages (the only pages users should access in my website),
Not any kind of "special", or "parameterized" or "raw data" page... 79.183.173.166 (talk) 14:48, 15 March 2022 (UTC)
What is $wgArticlePath and $wgScriptPath on your wiki?
When you say "article" do you mean pages without a namespace? Bawolff (talk) 04:35, 16 March 2022 (UTC)
  • In LocalSettings.php, I don't have $wgArticlePath
  • In LocalSettings.php, $wgScriptPath = "";
I think that yes, when I say "article" I do indeed mean any webpage without a namespace (and also without a parameter). 79.183.173.166 (talk) 04:57, 16 March 2022 (UTC)
Do normal pages on your wiki use the form index.php/Foo or index.php?title=foo (if you dont set $wgUsePathInfo or $wgArticlePath, mediawiki will decide for itself which to use)? Bawolff (talk) 03:13, 17 March 2022 (UTC)
Webpages in my wiki have index.php?title=foo. 79.183.173.166 (talk) 08:30, 17 March 2022 (UTC)
Oh, no, sorry,
Normal webpages in my wiki have index.php/foo. 79.183.173.166 (talk) 08:31, 17 March 2022 (UTC)
index.php/foo
index.php/Category:bar 79.183.173.166 (talk) 08:33, 17 March 2022 (UTC)
In that case, perhaps something like:
Disallow: /index.php?
Disallow: /index.php/*:
Allow: /index.php/Category:
The disallow all namespaces explocitly approach you mentioned elsewhere is also reasonable Bawolff (talk) 19:35, 17 March 2022 (UTC)
WOW thanks so much Bawolff. 79.183.173.166 (talk) 20:32, 17 March 2022 (UTC)
If I recall correctly robots.txt is case sensitive and it should be
disallow and allow instead Disallow and Allow
Quote:
Directives in the robots.txt file are case-sensitive.
From here
developers.google.com/search/docs/advanced/robots/robots-faq#h1b 79.183.173.166 (talk) 01:57, 18 March 2022 (UTC)
yes you are correct. Bawolff (talk) 05:56, 21 March 2022 (UTC)

How to delete a page on wikitia?

Hello. I'd like to delete a page I was drafting for a music artist that was never approved for a wikipedia page but then ended up on wikitia somehow. How do I go about doing so? The page is for 'Ron_Velvet' on wikitia. Thank you. Link: https://wikitia.com/wiki/Ron_Velvet Pinoypress1 (talk) 02:37, 15 March 2022 (UTC)

You would probably have to ask wikitia, we don't know much about them.
That said, they probably do have the legal right to use unapproved wikipedia drafts as long as they give credit. Bawolff (talk) 04:10, 15 March 2022 (UTC)

SQL dump ru wiki

Why can't you do a full dump in mysql? Or at least something related to articles, text templates, etc. At the moment, there are no ready-made solutions for fast imports, except for the slow importDump.php. I run in multiple threads https://prnt.sc/6M8_ituTNG5f but it doesn't affect the result much. At the moment it is not possible to make a full copy of the pages as on wikipedia.org. The assembly of the wiki was similar in modules, I import it via importDump.php. Could one of the competent guys help me with the setup and import on a paid basis? Roman Imbecile (talk) 13:30, 15 March 2022 (UTC)

What are "fast imports"? What are non-fast imports? Why "make a full copy" instead of using https://meta.wikimedia.org/wiki/Data_dumps ? Which underlying problem would you like to solve? Malyacko (talk) 13:50, 15 March 2022 (UTC)
I think its fears over private data. Its unfortunate mwimporter is no longer maintained. Bawolff (talk) 16:30, 15 March 2022 (UTC)

php createAndPromote.php does nothing

MediaWiki 1.35.5
Server Windows 2016
Web Server IIS
DataBase MariaDB 10.6.7
PHP 7.4.13
Extensions 1.35 rel

I built our Wiki on Windows 2016, IIS, PHP. I then connected it to AD for users with the LDAP Stack. I now want to add some additional local users accounts who will be sysop.

When I run "php createAndPromote --sysop [user] [password]", it does nothing. There is no user created in the datebase.

If I try to create a user from the Special:CreateAccount Page, it says "The supplied credentials could not be used for account creation."

The first local user account I created is working, and anyone in the approved AD groups I added the the ldap.json can sign in, working fine.

Private wiki, cannot publish page externally. Gregzme17 (talk) 20:08, 15 March 2022 (UTC)

Fetching file summary through API

Is there a way how to fetch information from the summary box of any file using any API.

For example on this page:

https://commons.wikimedia.org/wiki/File:Ayn_Rand_(1943_Talbot_portrait).jpg

I would be interested in getting the description and date information.

Description English: Photo portrait of Russian-American writer Ayn Rand used for the first-edition back cover of her novel The Fountainhead (1943).
Date Published 1943

I had some luck with wikidata SPARQL endpoint, but the information on the official commons page is a lot richer. Kotrblu2 (talk) 23:02, 15 March 2022 (UTC)

Try action=query&prop=imageinfo&iiprop=metadata|extmetadata
E.g. https://commons.wikimedia.org/w/api.php?action=query&prop=imageinfo&iiprop=metadata%7Cextmetadata&titles=File:Ayn_Rand_(1943_Talbot_portrait).jpg&formatversion=2 Bawolff (talk) 04:32, 16 March 2022 (UTC)

Template:Collapse top Really sorry for this question

Really sorry for this NOOB question. I'm trying to find the code for the collapse top templates.

Template:Collapse top#Parameters


On other templates, I was able to edit (for example on Template:Box-round) and simply copy paste the code into my site.


Again, I'm sorry I just cannot get the code for the collapse top template MarkRawsthorne (talk) 23:18, 15 March 2022 (UTC)

No need to apologize, we were all new once.
Its probably being complicated by the extension:translate syntax. It might also be using site css or js, although i dont think the current version uses custom site js.
anyways the code with translate tags removed is
<div style="display:{{{display|block}}};margin-{{dir|{{pagelang}}|right|left}}:{{{indent|0}}};{{{extrastyle|}}}"><!-- NOTE: width renders incorrectly if added to main STYLE section
--><table class="mw-collapsible {{#if:{{{expand|}}}|| mw-collapsed}}" style="margin-top:.2em; border:{{{border|1px}}} solid {{{b-color|silver}}};text-align:{{dir|{{pagelang}}|right|left}}; width: {{{width|100%}}};"><tr><th style="font-size:{{{title-font-size|112%}}};background:{{{bg|#F8FCFF}}};color:{{{fc|black}}};text-align:{{#if:{{{left|}}}
  | {{dir|{{pagelang}}|right|left}}
  | center
  }}">{{{1|{{{title|{{{reason|{{{header|{{{heading|Extended content}}}}}}}}}}}}}}}</th></tr><!--
  -->{{#if:{{{warning|{{{2|}}}}}}
  | <tr><td style="text-align:center;font-style:italic">{{{2| The following is a closed debate. {{Strong
    | style = color:red
    | 1 =  Please do not modify it.
    }}}}}</td></tr>
  }}<!--
  --><tr><td style="font-size:{{{font-size|112%}}};background:{{{bg2|white}}};border:solid {{{border2|1px silver}}};padding:{{{padding|8px}}}"></nowiki>
Bawolff (talk) 04:47, 16 March 2022 (UTC)
That is fantastic
Thank you so much. MarkRawsthorne (talk) 14:44, 16 March 2022 (UTC)

What are the URL patterns of webpages which aren't "article" or "category"?

MediaWiki 1.36.1 with long URLs.


So far I have recognized these URL patterns of webpages which aren't "article" or "category":

  • Directories
  • Namespaces (such as Special: or Talk:)
  • Parameterized URLs

A URL can be two of these, for example:

index.php?title=Talk:English_Language&action=info

What are the URL patterns of webpages which aren't "article" or "category"? 79.183.173.166 (talk) 01:51, 16 March 2022 (UTC)

What is a "URL pattern"? How does it matter anyway? Malyacko (talk) 07:33, 16 March 2022 (UTC)
It's a pattern in a URL which one could match with regex match as with, for example:
  • [A-Za-z0-9]*/ to match a directories
  • [A-Za-z9-9]*: for webpages named in a namespace
Why does it matter? Well for me personally knowing the patterns might help to work with robots.txt.
I might do disallow: Special: or disallow /index.php? as I don't want any page with such URL patterns to be crawled. 79.183.173.166 (talk) 08:42, 16 March 2022 (UTC)
Directories/pages can have characters other than [A-Za-z0-9] Bawolff (talk) 03:10, 17 March 2022 (UTC)
Oh, I guess something like [A-Za-z0-9_\/:]* due to Special:x_y/z .
Would anyone add something to the above? 79.183.173.166 (talk) 07:41, 17 March 2022 (UTC)
[A-Za-z0-9_\/]*: 79.183.173.166 (talk) 07:42, 17 March 2022 (UTC)
You also have apostrophes and non-english characters (which can be their actual character or percent encoded).
You can have other letters but its unusual. Bawolff (talk) 19:28, 17 March 2022 (UTC)
Bawolff, please share an example from core,
As I have never came across any such example or don't recall. 79.183.173.166 (talk) 06:07, 17 March 2022 (UTC)
for non english wikis, something like https://pl.wikipedia.org/wiki/Specjalna:Wyszukiwarka_link%C3%B3w Bawolff (talk) 19:31, 17 March 2022 (UTC)
Category page URLs have the namespace
Category: 109.253.160.125 (talk) 16:08, 16 March 2022 (UTC)

Is it plausible to disallow crawling of all website subdirectories?

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 core website.


Would it be plausible or reasonable, even in esoteric cases, to disallow crawling of all website directories in robots.txt?

For example:
disallow: /cache/
disallow: /docs/
disallow: /extensions/
disallow: /images/
disallow: /includes/
disallow: /languages/
disallow: /maintenance/
disallow: /mw-config/
disallow: /resources/
disallow: /skins/
disallow: /tests/
disallow: /vendor/
79.183.173.166 (talk) 02:01, 16 March 2022 (UTC)
Please also opine about files in the root tree which aren't directories. 79.183.173.166 (talk) 02:10, 16 March 2022 (UTC)
Normally people who are worried about that use web server config (eg .htaccess) to block, since that is a hard block where robots.txt is more a polite request (except for images which is needed and sometimes extensions directory). maintenance has this setup by default if using apache.
Otherwise that will work, however blocking images will break google image search.
Most people don't block those because adding to robots.txt will probably increase traffic, since legit spiders will never crawl those since nothing links there, and bad spiders use robots.txt to discover things to look at. Bawolff (talk) 04:30, 16 March 2022 (UTC)
I thank Bawolff for his helping remarks. 79.183.173.166 (talk) 07:16, 16 March 2022 (UTC)
Perhaps it's good to mark as solved. 79.183.173.166 (talk) 07:17, 16 March 2022 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Autoconfirm doesn't seem to be 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.


My install information:

Product Version
MediaWiki 1.35.5
PHP 7.4.27 (fpm-fcgi)
MySQL 5.6.51-log
ICU 65.1


I am having trouble with the autoconfirm functionality. A test user account is unable to do things that they should be, such as sending mail to other users. In LocalSettings.php, I have:

$wgAutoConfirmCount = 3;
$wgAutoConfirmAge = 86400*3; // three days

#Permission to send mail--must be autoconfirmed
$wgGroupPermissions['*']['sendemail']             = false;
$wgGroupPermissions['user']['sendemail']          = false;
$wgGroupPermissions['autoconfirmed']['sendemail'] = true;

#Permission to move pages--must be autoconfirmed
$wgGroupPermissions['*']['move']             = false;
$wgGroupPermissions['user']['move']          = false;
$wgGroupPermissions['autoconfirmed']['move'] = true;

#Autoconfirmed users skip Captcha for creating a new page (ConfirmEdit Extension)
$wgGroupPermissions['autoconfirmed']['skipcaptcha'] = true;
$wgCaptchaTriggers['create']        = true;

My test account is over three days old and has many more edits than 3. However, whenever I try to send mail or move a page while logged in that account, I get the You do not have permission... error for that action. Also, I receive the CAPTCHA test when trying to create a new page.

Thus, is appears that this account (and presumably, all others in the wiki) are not being promoted according to the $wgAutoConfirmCount and $wgAutoConfirmAge settings.

I assume that I messed up the settings for this. If anybody can help me troubleshoot this issue, I would be very grateful! Lost Student (talk) 06:27, 16 March 2022 (UTC)

You can view if the current user is autoconfirmed by checking special:preferences. That could help you determine if the issue is putting people in the group or if its the rights the group has. Bawolff (talk) 19:24, 17 March 2022 (UTC)
Thank you, that is actually very helpful. I kept trying to use Special:ListUsers but that doesn't show implicit membership. It turns out that the test account wasn't autoconfirmed even though it met the criteria. I manually autoconfirmed it.
Another test account was autoconfirmed as it should be. So it appears everything is functioning as it should be. Lost Student (talk) 23:03, 17 March 2022 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

How to disallow all namespaces besides category in robots.txt?

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 this the only way?

disallow: Media:

disallow: Media:

disallow: Media:

disallow: Media:

disallow: Media: 79.183.173.166 (talk) 07:19, 16 March 2022 (UTC)

Post posted by mistake (some key combo pressed).
@Clump please delete 79.183.173.166 (talk) 07:19, 16 March 2022 (UTC)
Duplicate of Project:Support desk/Flow/2022/03#h-How_to_disallow_all_namespaces_besides_main_and_category_in_robots.txt?-2022-03-16T07:25:00.000Z Malyacko (talk) 07:32, 16 March 2022 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

How to disallow all namespaces besides main and category in robots.txt?

Is this the only way?
disallow: Media:
disallow: Special:
disallow: Talk:
disallow: User:
disallow: User_talk:
disallow: Project:
disallow: Project_talk:
disallow: MediaWiki:
disallow: MediaWiki_talk:
disallow: Template:
disallow: Template_talk:
disallow: Help:
disallow: Help_talk:
  • I don't have images in this website so I don't mind blocking the Media namespace 79.183.173.166 (talk) 07:25, 16 March 2022 (UTC)
Media: namespace is virtual anyways, and never used in urls. Bawolff (talk) 19:15, 17 March 2022 (UTC)
I had to add forward slashes in each one.
disallow: /Media:
disallow: /Special:
disallow: /Talk:
disallow: /User:
disallow: /User_talk:
disallow: /Project:
disallow: /Project_talk:
disallow: /MediaWiki:
disallow: /MediaWiki_talk:
disallow: /Template:
disallow: /Template_talk:
disallow: /Help:
disallow: /Help_talk:
79.183.173.166 (talk) 08:52, 17 March 2022 (UTC)

Wikitext and other issues

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 just started a wiki on a local host using bitnami and i am trying to get some scripts working.

But all kinds of stuff is not working. First thing as a example:


Source:

This template takes two parameters, and creates underlined text with a hover box for many modern browsers supporting CSS:

{{H:title|This is the hover text|Hover your mouse over this text}}

Go to this page to see the H:title template itself: {{tl|H:title}}

Output:

This template takes two parameters, and creates underlined text with a hover box for many modern browsers supporting CSS:

Template:H:title

Go to this page to see the H:title template itself: {{#if:{{#switch: yes

| y | yes | t | true  | 1 = yes
| n | no  | f | false | 0 | = 
| =  
| #default = yes

}}|}}{{{{#if: |subst: }}[[{{#if: {{#pos: H:title | : }} || Template: }}H:title|{{ #ifeq: | Template | H:title | H:title }}]]{{ #if: | | }}{{ #if: | | }}{{ #if: | | }}{{ #if: | | }}{{ #if: | | }}{{ #if: | | }}{{ #if: | | }}{{ #if: | | }}}}{{#if:{{#switch: yes

|yes| yes | t | true  | n | no  | f | false | 0 |=| #default = yes

}}|}}{{#if: {{#pos: H:title | File: }}{{#pos: H:title | Category: }} | }}


Any idea how i can solve this? Anything i can find is that this just should work.

I hope solving this will fix the other issues Just8erry (talk) 13:43, 16 March 2022 (UTC)

Please see "Post a new question" in the sidebar. Malyacko (talk) 14:09, 16 March 2022 (UTC)
make sure extension:ParserFunctions are installed. Bawolff (talk) 14:12, 16 March 2022 (UTC)
See also https://www.mediawiki.org/wiki/Manual:Using_content_from_Wikipedia
That said #pos: is from the optional string functions part of parserfunctions extension, which has to be enabled seperately (and isnt used on wikipedia) Bawolff (talk) 14:21, 16 March 2022 (UTC)
ParserFunctions was indeed missing, thanks Just8erry (talk) 14:23, 16 March 2022 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Table contents (Specifically long URL's) are not wrapping in tables.

File:Problem with table cutting long URL.jpg The issue I am having, is that long URLs are cut on RHS of a mobile screen. (See attached image). They essentially extend past the screen edge, and it looks poor.


I am using the Pivot skin, which is mobile friendly.


Is there anyway to wrap the URLs within a cell or only display a specific number of characters in the cell. For example 20.


I could just replace the actual URL with shorter text and then assign a hyperlink, but that isn't really what I want to do. I want people to get to see the full URL in question.


Any help would be warmly appreciated. MarkRawsthorne (talk) 15:00, 16 March 2022 (UTC)

Use the following CSS: word-break: break-word; and put it in your MediaWiki:Common.css —TheDJ (Not WMF) (talkcontribs) 16:07, 16 March 2022 (UTC)
Oh actually, it seems like here you are putting urls in a table. The problem might be the table. Tables will become as big as the content wants them to be, that is their nature. So avoid using tables. —TheDJ (Not WMF) (talkcontribs) 16:09, 16 March 2022 (UTC)
Try this:
{| style="table-layout: fixed; width: 200px"
|-
! style="width: 50px" | URL
| style="word-wrap: break-word" | https://stackoverflow.com/questions/1258416/word-wrap-in-an-html-table
|}
URL https://stackoverflow.com/questions/1258416/word-wrap-in-an-html-table

Jonathan3 (talk) 16:44, 16 March 2022 (UTC)

Truly appreciate you taking the time to respond
Thank you. MarkRawsthorne (talk) 21:53, 16 March 2022 (UTC)
Don't (ab)use tables when you actually have a list, basically. Tables are for tabular data. Malyacko (talk) 18:38, 16 March 2022 (UTC)
Totally understand. However, I really want/need the background coloring options that a table offers.
Not sure if I can get similar effects just using lists. Do you know of a way to get similar results? (see image above) MarkRawsthorne (talk) 22:01, 16 March 2022 (UTC)
To me it does look like 2-column tabular data, so i don't see anything wrong with tables, although <dl> also might make sense. Bawolff (talk) 18:18, 17 March 2022 (UTC)

Images corrupted with HTTP response headers

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 am trying to set up an Azure fireshare volume to hold my images and I am able to mount the volume just fine and upload images that get saved to the volume. but when you attempt to view the images they are all corrupted. Looking into it the PNGs appear to have connection data appended to the front of the file that corrupts them.


If you open the files with something like notepad++ you see this

nges: bytes

Content-Length: 4178

Keep-Alive: timeout=5, max=100

Connection: Keep-Alive

Content-Type: image/png

‰PNG

   

IHDR  ��   ³��   a #�  ��PLTEÿÿÿB¦ã>­âYƒè9´áJ›åZé`xê<°âA¨ãC¥ã?«â...


If you remove the data before the PNG flag and save it. Then the pictures open just fine in the windows picture viewer. I'm not sure if this is an artifact from Azure or how Mediawiki retrieves images.


any help would be appreciated. thank you, 2600:1700:6950:69A0:A00C:2EE9:45AB:E7EF (talk) 19:26, 16 March 2022 (UTC)

I would assume an Azure issue. Normally mediawiki doesn't serve images itself but lets webserver do it. Does this happen when you look at the images from the commandline over ssh (e.g. using the head command)? Bawolff (talk) 03:08, 17 March 2022 (UTC)
Looking at the images with the head command doesn't show the response headers embedded in the image
root@SandboxHost:/var/www/html/images/1/1a# head Images3.png
PNG
IHDa    PLTEB>Y9JZ`x<AC?[MGWPEKU]|7R9MTI}g{j4|]zwb恠탷lexEU曻eBgRnX8^l됣gt얭blIDATx   [J!,#( kťv↵WU*W7sf$a}6x ?̜mHDIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIeI73ES$ESڝ0+k
T*
ðgt `bCuG`ARc
Also if I go to the Azure portal and open the image directly from the filestore there are no issues. So it is not saving them to the filestore with the headers. It just seems to be an issue when serving them from the mounted volume.
As a note I have the LocalSettings.php set up in a similar way where I have it in a fileshare and mount that to the container. Though Azure wont let you mount files directly so I had to mount the directory and then set up a symlink to the php file. The containers have no issue reading this config file and it does not contain any header pieces when reviewing it on the system.
<?php
# This file was automatically generated by the MediaWiki 1.37.1
# installer. If you make manual changes, please keep track in case you
# need to recreate them later. 2600:1700:6950:69A0:F921:9BC0:3D2F:EBFC (talk) 03:40, 17 March 2022 (UTC)
That's very weird.
I think its most likely something wrong with the webserver. You could also try downloading an image using curl -v http://mysite/image.jpg maybe there is something else in the http response that would give a hint. Bawolff (talk) 03:53, 17 March 2022 (UTC)
Curl
C:\Users\dt>curl -v //wiki-env-9/images/1/1a/Images3.png --output C:\Users\dt\Downloads\image.png
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0*   Trying 40.88.241.90:80...
* Connected to wiki-env-9.eastus.azurecontainer (40.88.241.90) port 80 (#0)
> GET /images/1/1a/Images3.png HTTP/1.1
> Host: wiki-env-9
> User-Agent: curl/7.79.1
> Accept: */*
>
* Received HTTP/0.9 when not allowed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
* Closing connection 0
curl: (1) Received HTTP/0.9 when not allowed
Curl with http0.9 specified works but downloads an image with the response headers included and corrupts the image
C:\Users\dt>curl -v //wiki-env-9/images/1/1a/Images3.png --output C:\Users\dt\Downloads\image.png --http0.9
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0*   Trying 40.88.241.90:80...
* Connected to wiki-env-9.eastus.azurecontainer (40.88.241.90) port 80 (#0)
> GET /images/1/1a/Images3.png HTTP/1.1
> Host: wiki-env-9.eastus.azurecontainer
> User-Agent: curl/7.79.1
> Accept: */*
>
{ [12 bytes data]
100  3367    0  3367    0     0    649      0 --:--:--  0:00:05 --:--:--     0
* Closing connection 0
discussion of apache having issues like this when folder ownership is not correct
superuser com/questions/1564329.apache-not-serving-some-content-from-network-share
Local container ownership
# pwd
/var/www/html/images
# ls -l
total 24
drwxr-xr-x 3 www-data www-data 4096 Feb  1 01:16 9
-rw-rw-r-- 1 www-data www-data   84 Nov  4  2019 README
drwxr-xr-x 4 www-data www-data 4096 Feb  2 14:19 archive
drwxr-xr-x 3 www-data www-data 4096 Feb  2 14:19 d
drwxr-xr-x 2 www-data www-data 4096 Feb  2 14:19 lockdir
drwxr-xr-x 4 www-data www-data 4096 Feb  2 14:19 thumb
#
Azure mounted volume ownership
root@SandboxHost:/var/www/html/images# ls -l
total 0
drwxrwxrwx 2 root root 0 Mar 16 19:05 1
drwxrwxrwx 2 root root 0 Mar 16 19:05 archive
drwxrwxrwx 2 root root 0 Mar 16 19:04 lockdir
drwxrwxrwx 2 root root 0 Mar 16 19:05 temp
drwxrwxrwx 2 root root 0 Mar 16 19:05 thumb
trying to do chown -R www-data:www-data /var/www/html/images changes the top level folder ownership but not the subfolders and files.
trying to change the ownership of a subfolder by itself like /var/www/html/images/1 also does not have any effect.
root@SandboxHost:/var/www/html/images# ls -l
total 0
drwxrwxrwx 2 root root 0 Mar 16 19:05 1
drwxrwxrwx 2 root root 0 Mar 16 19:05 archive
drwxrwxrwx 2 root root 0 Mar 16 19:04 lockdir
drwxrwxrwx 2 root root 0 Mar 16 19:05 temp
drwxrwxrwx 2 root root 0 Mar 16 19:05 thumb
root@SandboxHost:/var/www/html/images# chown -R www-data:www-data /var/www/html/images/1
root@SandboxHost:/var/www/html/images# ls -l
total 0
drwxrwxrwx 2 root root 0 Mar 16 19:05 1
drwxrwxrwx 2 root root 0 Mar 16 19:05 archive
drwxrwxrwx 2 root root 0 Mar 16 19:04 lockdir
drwxrwxrwx 2 root root 0 Mar 16 19:05 temp
drwxrwxrwx 2 root root 0 Mar 16 19:05 thumb 2600:1700:6950:69A0:F921:9BC0:3D2F:EBFC (talk) 18:18, 17 March 2022 (UTC)
Probably not an ownership thing. The post you linked also mentioned disabling sendfile. I think that's worth a try.
Http/0.9 doesn't support http headers which is probably how they are ending up in the file. It is probably not actually http/0.9 but just an invalid response that looks like http/0.9. It definitely sounds like something is misconfigured with your webserver. Perhaps the webserver is transfering in "as-is" mode. A forum dedicated to the webserver you are using might know better what could go wrong to cause this. Bawolff (talk) 19:13, 17 March 2022 (UTC)
I am using the latest mediawiki image from dockerhub so I hadn't touched the apache server settings. but you were right, following the edits Jack Wang suggested at the bottom of that thread seemed to fix the issue
I Edited "/etc/apache2/apache2.conf" and added the lines (both were needed for it to work)
EnableSendfile Off
EnableMMAP off
It is now serving images and thumbnails properly.
Thank you for all of your help. I'm still pretty new to doing any infrastructure work so I really appreciate it. 2600:1700:6950:69A0:3449:668B:ED0C:BF4B (talk) 19:49, 18 March 2022 (UTC)
Interesting. I guess its a bug in the network filesystem mount layer, but its kind of surprising that mmap and sendfile don't just work always in 2022. Bawolff (talk) 01:23, 19 March 2022 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

ShortURL issues

Solved externally.

I have created a new MediaWiki project and I am trying to change my URL's from /index.php/PAGENAME to /wiki/PAGENAME, I have tried to follow the MediaWiki guidance but I am having difficulties and, although I have followed the instructions, when I save the files my MediaWiki site gives a 404 and will not load.


In the .htaccess file I have:

RewriteEngine On

# main rewrite rule
RewriteRule ^/?wiki(/.*)?$ /w/index.php [L]

# Redirect / to Main Page
RewriteRule ^/*$ /w/index.php [L]

and in LocalSettings.php I have:

$wgScriptPath = "/w";
$wgArticlePath = "/wiki/$1";

Any help on how to solve this would be appreciated! 146.198.38.110 (talk) 20:38, 16 March 2022 (UTC)

Moving pages does not work; browser just spins

Product Version
MediaWiki 1.34.1
PHP 7.2.24-0ubuntu0.18.04.11 (fpm-fcgi)
MariaDB 10.4.22-MariaDB-1:10.4.22+maria~bionic-log
ICU 60.2
Lua 5.1.5

Hello,

I have a mediawiki installed on an internal server that I'm not able to share a link to.

We are seeing issues where we cannot "Move" pages. The page just sits there spinning.

I'm using Google Chrome.

I know in the past moving pages worked fine.

Admittedly, I inherited this server and am not too knowledgeable on how to troubleshoot this.

I have root access to the CLI of the Ubuntu server, and medium Linux-admin skills.

Is this a known bug? Is there an easy way to update the server? Or log files to check what is breaking?

Thanks in advance,

Chris 75.172.98.144 (talk) 21:49, 16 March 2022 (UTC)

I would first check the chrome dev tools to see if the request is being made, and if any responses are happening at all (or is it just hanging), etc.
I would then check the web server and php error logs to see if they have anything to say. Bawolff (talk) 03:05, 17 March 2022 (UTC)
Bawolff- Thank you for the response! I've tried Chrome and Firefox, and both of them are seeing the POST happen when the move button is clicked, but neither proceeds further.
I found this error in the nginx error logs. Something to do with LDAP?
2022/03/18 15:26:08 [error] 1649#1649: *2844 FastCGI sent in stderr: "PHP message: PHP Notice:  Array to string conversion in /data/wiki/webroot/mediawiki/extensions/LDAPProvider/src/Client.php on line 122
PHP message: PHP Warning:  constant(): Couldn't find constant 0 in /data/wiki/webroot/mediawiki/extensions/LDAPProvider/src/Client.php on line 123
PHP message: PHP Notice:  Array to string conversion in /data/wiki/webroot/mediawiki/extensions/LDAPProvider/src/PlatformFunctionWrapper.php on line 52" while reading response header from upstream, client: 1.2.3.4, server: wiki.domain.net, request: "GET /Test_Page HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.2-fpm.sock:", host: "mydomain", referrer: "mydomain/index.php?title=Special:UserLogin&returnto=Test+Page" 75.172.98.144 (talk) 15:43, 18 March 2022 (UTC)
those are warnings, which might indicate something is wrong, but probably wouldn't cause stuff to outright break like this.
Do the pages actually get moved (e.g. the problem is just displaying the success message) or do they not get moved at all? Bawolff (talk) 22:30, 19 March 2022 (UTC)
Unfortunately, no the pages do not get moved at all. 75.172.98.144 (talk) 22:30, 22 March 2022 (UTC)

503 Service Unavailable

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 a website hosted by GoDaddy.com. The website www.theherosguld.com works. However, I have attached three wikis to the website using MediaWiki (added through cPanel) and as of March 9, none of them are working. All three of them return the following message:

Service Unavailable

The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.

Additionally, a 503 Service Unavailable error was encountered while trying to use an ErrorDocument to handle the request.

_________


I was on the phone for hours with GoDaddy trying to fix the issue. They did all they said they could, but since MediaWiki is a 3rd party app, they were limited. They suggested I try here. I am a writer and designer, not a website builder/manager, trying to start a business. I have no idea what is wrong and why these wikis don't work, but they are integral to my business. Please help. Kaderystalmane (talk) 22:03, 16 March 2022 (UTC)

503 errors generally mean a problem with the layer below mediawiki (e.g. webserver or fastcgi). I think its unlikely to be a mediawiki issue.
That said, i would suggest trying to locate your webserver's error logs (there probably is a button for that in cpannel), which may have a more detailed error message which might help explain what is happening. Bawolff (talk) 03:02, 17 March 2022 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Issue styling vector tabs

Hi, I'm having issues styling the tabs on vector. I've managed to style every tab except the two that have dropdowns — these being the "variants" and "more" tabs. I can't get then to sit in line with the other tabs and they have quite a large size. I've tried removing padding, etc.

Does anyone know the issue? Link here. 146.198.38.110 (talk) 00:35, 17 March 2022 (UTC)

Active users list

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

I need to get last 6 months active users List, pls let me know from which tables i could get these. 143.97.2.35 (talk) 06:41, 17 March 2022 (UTC)

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

SharedDB help

I'm trying to set up a shared database between two MediaWiki wikis. I want to share the database from the first wiki, "wiki1". In the LocalSettings.php file of "wiki1", I have as follows:

##Database settings
$wgDBtype = "mysql";
$wgDBserver = "localhost";
$wgDBname = "wiki1";
$wgDBuser = "wiki1";
$wgDBpassword = "[redacted]";

#MySQL specific settings
$wgDBprefix = "mwbj_";

In "wiki2", then, I have put:

# This has no effect unless $wgSharedDB is also set.
$wgSharedTables[] = "actor";
$wgSharedDB = "wiki1";
$wgSharedPrefix = "mwbj_";

I'm getting this error on "wiki2", though:

Wikimedia\Rdbms\DBQueryError: A database query error has occurred. Did you forget to run your application's database schema updater after upgrading or after adding a new extension?

How can I solve this, or any help in solving would be appreciated! ArrakisMiner (talk) 10:13, 17 March 2022 (UTC)

SharedDB is less well supported than it used to be. Maybe you need both actor and user shared. Can you set $wgShowExceptionDetails=true; so we can see detailed error message? Bawolff (talk) 18:14, 17 March 2022 (UTC)

Numerous problems with search and special 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.


The charset on my MW installation on krimpedia.de behaves strangely. The search doesn't work at all and I get the folling message:

Der angeforderte Seitentitel enthält ungültige Zeichen: „%3A“.

[The requested page contains invalid characters "%3A"].


If I click on log-in I get forwarded to the the following URL withe message that this page doesn't exist:

https://www.krimpedia.de/Spezial:Anmelden&returnto=Hauptseite

I I change the URL to https://www.krimpedia.de/Spezial:Anmelden I can log in just fine.


The charset is set to binary:

# MySQL table options to use during installation or update

$wgDBTableOptions = "ENGINE=InnoDB, DEFAULT CHARSET=binary";


Do you have any idea how to fix this? Is it possible that this behavior is linked to a wrong forwarding? Krimpedia (talk) 10:48, 17 March 2022 (UTC)

What is $wgArticlePath, $wgScriptPath and any rewrite rules you have setup? Bawolff (talk) 18:12, 17 March 2022 (UTC)
Script and article path are
$wgScriptPath = "";
$wgArticlePath = "/$1";
the htaccess reads as follows:
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?title=$1 [L,END]
RewriteCond %{QUERY_STRING} title=(.*)
RewriteRule "^(.*)$" /%1 [R=301,QSD,L] Krimpedia (talk) 22:32, 17 March 2022 (UTC)
Your issue is caused by the last two lines.
They essentially say that apache should turn urls like https://www.krimpedia.de/index.php?title=Spezial:Anmelden&returnto=Hauptseite into https://www.krimpedia.de/Spezial:Anmelden&returnto=Hauptseite which is invalid Bawolff (talk) 01:54, 18 March 2022 (UTC)
That's it. Thank you so much. 95.112.99.213 (talk) 09:12, 18 March 2022 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Active Users Details of last 6 month or 1 year

Hi Team,

Please help me to get Active users details of Last 6 month, pls let me know which are the tables from where we can get these details. Pooja2425 (talk) 11:09, 17 March 2022 (UTC)

What does "active" mean? Which "details" exactly? Which underlying problem do you try to solve? Please also read "Post a new question" in the sidebar. Thanks. Malyacko (talk) 12:46, 17 March 2022 (UTC)
If you mean special:activeusers i think it uses querycachetwo.
If you want to calculate it yourself beyond manual:$wgRCMaxAge you would probably have to use revision table (normally it uses recentchanges table) Bawolff (talk) 18:10, 17 March 2022 (UTC)
Hi ,
Actually I need to get last 6 months or 1 year users details who has made changes into pages?
In revison table we have user columns from where we can check information about the users , But user columns is before 1.34 versions.
we are using mediawiki 1.35.3 v .p[lease let me know how i could get these users details who made changes in last 6 months to 1 year??? Pooja2425 (talk) 11:06, 23 March 2022 (UTC)
You use rev_actor. You can match actor ids to user ids via the actor table. Bawolff (talk) 06:12, 1 April 2022 (UTC)

Upgrade from MW 10.0 running on XP

Hi!

I was asked to move/upgrade an old MediaWiki 10.0 from 2007 running on Windows XP to a supported system by the company i work for. (This is my first time working with MW.)

So the plan is getting it running on Windows Server 2022. But after trying to export the DB and the files (as i read somewhere to do) to the new server, it recognized there was an old site, but, well it failed.. (surprise)

Any idea how to do this in so short steps as possible? Peter Andersson A (talk) 14:09, 17 March 2022 (UTC)

Try doing the upgrade in steps - mw 1.27 first, then the latest version.
Beyond that, could you describe how it failed? Any error messages? Bawolff (talk) 18:09, 17 March 2022 (UTC)
Ok to 1.27 first then..
This is the errors i got: After detection of the old site i clicked upgrade and then it runs for a couple of seconds until it finds it't missig a table or column, i added the missing table or column to the DB (based of the info i found here) then it runs for a couple of second untill another table or column is missing and so on. after all is done, is said the upgrade was successful but when i reload the site i get: "Sorry! This site is experiencing technical difficulties." i added some rows to the localsettings.php to get some more info and that's provided below.
Deprecated: Return type of MediaWiki\Session\PHPSessionHandler::open($save_path, $session_name) should either be compatible with SessionHandlerInterface::open(string $path, string $name): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in D:\inetpub\wwwroot\mediawiki_new\includes\session\PHPSessionHandler.php on line 181
Deprecated: Return type of MediaWiki\Session\PHPSessionHandler::close() should either be compatible with SessionHandlerInterface::close(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in D:\inetpub\wwwroot\mediawiki_new\includes\session\PHPSessionHandler.php on line 196
Deprecated: Return type of MediaWiki\Session\PHPSessionHandler::read($id) should either be compatible with SessionHandlerInterface::read(string $id): string|false, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in D:\inetpub\wwwroot\mediawiki_new\includes\session\PHPSessionHandler.php on line 210
Deprecated: Return type of MediaWiki\Session\PHPSessionHandler::write($id, $dataStr) should either be compatible with SessionHandlerInterface::write(string $id, string $data): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in D:\inetpub\wwwroot\mediawiki_new\includes\session\PHPSessionHandler.php on line 238
Deprecated: Return type of MediaWiki\Session\PHPSessionHandler::destroy($id) should either be compatible with SessionHandlerInterface::destroy(string $id): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in D:\inetpub\wwwroot\mediawiki_new\includes\session\PHPSessionHandler.php on line 344
Deprecated: Return type of MediaWiki\Session\PHPSessionHandler::gc($maxlifetime) should either be compatible with SessionHandlerInterface::gc(int $max_lifetime): int|false, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in D:\inetpub\wwwroot\mediawiki_new\includes\session\PHPSessionHandler.php on line 365
Deprecated: Message implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in D:\inetpub\wwwroot\mediawiki_new\includes\language\Message.php on line 138
Deprecated: MapCacheLRU implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in D:\inetpub\wwwroot\mediawiki_new\includes\libs\MapCacheLRU.php on line 36
Deprecated: strcasecmp(): Passing null to parameter #1 ($string1) of type string is deprecated in D:\inetpub\wwwroot\mediawiki_new\includes\session\CookieSessionProvider.php on line 99
Deprecated: Return type of MediaWiki\Session\Session::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in D:\inetpub\wwwroot\mediawiki_new\includes\session\Session.php on line 603
Deprecated: Return type of MediaWiki\Session\Session::current() should either be compatible with Iterator::current(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in D:\inetpub\wwwroot\mediawiki_new\includes\session\Session.php on line 609
Deprecated: Return type of MediaWiki\Session\Session::next() should either be compatible with Iterator::next(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in D:\inetpub\wwwroot\mediawiki_new\includes\session\Session.php on line 621
Deprecated: Return type of MediaWiki\Session\Session::key() should either be compatible with Iterator::key(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in D:\inetpub\wwwroot\mediawiki_new\includes\session\Session.php on line 615
Deprecated: Return type of MediaWiki\Session\Session::valid() should either be compatible with Iterator::valid(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in D:\inetpub\wwwroot\mediawiki_new\includes\session\Session.php on line 633
Deprecated: Return type of MediaWiki\Session\Session::rewind() should either be compatible with Iterator::rewind(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in D:\inetpub\wwwroot\mediawiki_new\includes\session\Session.php on line 627
Deprecated: Return type of MediaWiki\Session\Session::offsetExists($offset) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in D:\inetpub\wwwroot\mediawiki_new\includes\session\Session.php on line 643
Deprecated: Return type of & MediaWiki\Session\Session::offsetGet($offset) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in D:\inetpub\wwwroot\mediawiki_new\includes\session\Session.php on line 656
Deprecated: Return type of MediaWiki\Session\Session::offsetSet($offset, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in D:\inetpub\wwwroot\mediawiki_new\includes\session\Session.php on line 666
Deprecated: Return type of MediaWiki\Session\Session::offsetUnset($offset) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in D:\inetpub\wwwroot\mediawiki_new\includes\session\Session.php on line 671
Sorry! This site is experiencing technical difficulties.
Try waiting a few minutes and reloading.
(Cannot access the database)
Backtrace:
#0 D:\inetpub\wwwroot\mediawiki_new\includes\libs\rdbms\loadbalancer\LoadBalancer.php(991): Wikimedia\Rdbms\LoadBalancer->reportConnectionError()
#1 D:\inetpub\wwwroot\mediawiki_new\includes\libs\rdbms\loadbalancer\LoadBalancer.php(963): Wikimedia\Rdbms\LoadBalancer->getServerConnection()
#2 D:\inetpub\wwwroot\mediawiki_new\includes\libs\rdbms\loadbalancer\LoadBalancer.php(1128): Wikimedia\Rdbms\LoadBalancer->getConnection()
#3 D:\inetpub\wwwroot\mediawiki_new\includes\GlobalFunctions.php(2229): Wikimedia\Rdbms\LoadBalancer->getMaintenanceConnectionRef()
#4 D:\inetpub\wwwroot\mediawiki_new\includes\cache\localisation\LCStoreDB.php(57): wfGetDB()
#5 D:\inetpub\wwwroot\mediawiki_new\includes\cache\localisation\LocalisationCache.php(448): LCStoreDB->get()
#6 D:\inetpub\wwwroot\mediawiki_new\includes\cache\localisation\LocalisationCache.php(494): LocalisationCache->isExpired()
#7 D:\inetpub\wwwroot\mediawiki_new\includes\cache\localisation\LocalisationCache.php(413): LocalisationCache->initLanguage()
#8 D:\inetpub\wwwroot\mediawiki_new\includes\cache\localisation\LocalisationCache.php(332): LocalisationCache->loadSubitem()
#9 D:\inetpub\wwwroot\mediawiki_new\includes\language\Language.php(2611): LocalisationCache->getSubitem()
#10 D:\inetpub\wwwroot\mediawiki_new\includes\cache\MessageCache.php(1056): Language->getMessage()
#11 D:\inetpub\wwwroot\mediawiki_new\includes\cache\MessageCache.php(1014): MessageCache->getMessageForLang()
#12 D:\inetpub\wwwroot\mediawiki_new\includes\cache\MessageCache.php(956): MessageCache->getMessageFromFallbackChain()
#13 D:\inetpub\wwwroot\mediawiki_new\includes\language\Message.php(1379): MessageCache->get()
#14 D:\inetpub\wwwroot\mediawiki_new\includes\language\Message.php(903): Message->fetchMessage()
#15 D:\inetpub\wwwroot\mediawiki_new\includes\language\Message.php(993): Message->format()
#16 D:\inetpub\wwwroot\mediawiki_new\includes\title\MalformedTitleException.php(55): Message->text()
#17 D:\inetpub\wwwroot\mediawiki_new\includes\title\MediaWikiTitleCodec.php(92): MalformedTitleException->__construct()
#18 D:\inetpub\wwwroot\mediawiki_new\includes\title\MediaWikiTitleCodec.php(399): MediaWikiTitleCodec::{closure}()
#19 D:\inetpub\wwwroot\mediawiki_new\includes\Title.php(3093): MediaWikiTitleCodec->splitTitleString()
#20 D:\inetpub\wwwroot\mediawiki_new\includes\Title.php(493): Title->secureAndSplit()
#21 D:\inetpub\wwwroot\mediawiki_new\includes\MediaWiki.php(88): Title::newFromURL()
#22 D:\inetpub\wwwroot\mediawiki_new\includes\MediaWiki.php(161): MediaWiki->parseTitle()
#23 D:\inetpub\wwwroot\mediawiki_new\includes\MediaWiki.php(891): MediaWiki->getTitle()
#24 D:\inetpub\wwwroot\mediawiki_new\includes\MediaWiki.php(564): MediaWiki->main()
#25 D:\inetpub\wwwroot\mediawiki_new\index.php(53): MediaWiki->run()
#26 D:\inetpub\wwwroot\mediawiki_new\index.php(46): wfIndexMain()
#27 {main} Peter Andersson A (talk) 12:21, 18 March 2022 (UTC)
Some of the warnings make me think that your version of php is too new for mediawiki 1.27. Which version of php are you using?
For the actual error, in LocalSettings.php, do you have any custom config related to Localisation Cache?
Generally you shouldn't add tables/columns yourself unless something is going wrong. Is the updater not adding them itself? Bawolff (talk) 20:26, 18 March 2022 (UTC)
Hi!
The PHP version is 8.1.2 and the MW is 1.37.1, this is a little bit why i'm thinking of starting all over, i't maybe to new and a bit to large jump from 1.10.0..
I found this: Manual:Upgrading#Adapt your LocalSettings.php that says it's needed to be done in steps. 1.10 -> 1.27 -> 1.37 (or do i need 1.35 in between?)
Another thought, this wiki is only saved for archive purposes and viewing, do i really need to upgrade it for it to run on Windows Server 2022?
Thanks,
Peter Peter Andersson A (talk) 13:02, 21 March 2022 (UTC)

Issue creating MediaWiki install on Digital Ocean

Thanks, that worked perfectly!

I've been following this guide on downloading and installing MediaWiki on a Digital Ocean droplet. I'm pretty much at the end and my MediaWiki site loads, but without the skin. I've installed the skin both via wget and tried uploading it manually. I've put it into the /skins folder and MediaWiki does recognise that the skin is there.

When I add wfLoadSkin( 'Vector' ); to my LocalSettings.php file to activate the skin, however, the MediaWiki website crashes and I get a 500 error whenever I try to access it. The site is here: http://spicewars.whiki.online

I've also tried with MonoBook and other skins and get the same result. Anyone know what the issue could be? I think I'm doing everything as I should be. ArrakisMiner (talk) 18:30, 17 March 2022 (UTC)

Can you enable php error logs? It should give a better error message. See manual:how to debug for instructions.
Alternatively you could use https://releases.wikimedia.org/mediawiki/1.34/mediawiki-1.34.4.tar.gz which comes with the vector skin preinstalled. Bawolff (talk) 19:06, 17 March 2022 (UTC)

If I hire a MediaWiki developer, how much should this cost approximately?

I consider hiring someone to develop a display responsive skin which is perhaps the most minimal one can get.

The developer should develop the skin as a contrib skin available for anyone to download, install and use, just as any other skin.

This skin won't allow search engines to index, crawl or even discover anything which isn't content aimed for all human anonymous users (and which isn't by any mean "bureaucratic" content such as Special: pages, etc.) due to lack of any link linking to such "bureaucratic" content.

General

  • The only webpages available to an anonymous user are (main namespace) articles, category pages, search engine results page and login page
  • An anonymous user couldn't access anything which isn't the aforementioned webpages and if the user tried to access a URL of any such webpage (say, a Special: webpage) the webpage just won't be parsed and the anonymous user would be redirected to the homepage
  • There is no link to the login page (it could be accessed from the URL only)
  • Talk page links, Tools links (What links here, etc.), Print/export links (Create a book etc.) won't exist
  • The only links available to an anonymous user will be logo link, search engine links, search engine results page links, main navigation links, article links, category links (created with [[]]), footer links, separation region links (described below) and login page links
  • Naturally, general multilinguality is toggled off and websites with the skin are expected to be only in one language
  • Code segments dealing with general multilinguality and language change links would be in a standalone PHP file and that file would be loaded only if multilinguality would be toggled on by a website owner
  • lang.php data won't be served to the user unless general multilinguality was toggled on
  • The header has three toggleable regions:
  • Logo (text, or image, but not both)
  • Search box
  • free text box (good for putting a phone number)
  • Sidebars are off by default but a user can toggle a first sidebar (left in LTR, right in RTL) and a second sidebar (right in LTR, left in RTL) on and off.
  • Menus are off by default but a user can create a menu and put it in either sidebar or either separation region (described below)
  • Content from one sidebar won't appear in another sidebar (unless duplicated to the other sidebar)

Separation regions

  • First separation region is available between the header and the main region and is manageable just like a sidebar menu
  • Second separation region is available between the main region and the footer and is manageable just like the sidebar menu
  • A user could freely add content to separation regions
  • A user can toggle on or off any separation region

Software performance

  • No JavaScript and CSS would be served to the user besides what does with the appearance of each webpage

Miscellaneous

  • It would be advised, in skin documentation, to disallow crawling anything which isn't a (main namespace) article and category in robots.txt, as with:
disallow: /index.php?
disallow: /index.php/*:
allow: /index.php/Category:

Notes

  • I am not a PHP programmer let along not a MediaWiki developer so if I wrote anything absurd please forgive me
  • I might have forgot something but I believe you get the idea of what I seek (as far as it may be from the Wiki ideal and available software)

My questions

  • How many development hours should this take, approximately?
  • How much should this cost in a final price, approximately? 79.183.173.166 (talk) 01:54, 18 March 2022 (UTC)
> The only webpages available to an anonymous user are (main namespace) articles, category pages, search engine results page and login page
Just fyi for this part, there is a builtin core feature which might be useful (i did not test this ymmv):
$wgGroupPermissions['*']['read'] = false;
$wgWhitelistReadRegexp = [ "/^[^:]+$|^Category:|^Special:UserLogin|^Special:Search/" ];
(I don't know the answer to the actual question. Different people charge really different amounts, and i don't know what current going rates are. In the neighbourhood of $90/hour would be what i would expect, but i could be way off) Bawolff (talk) 06:23, 18 March 2022 (UTC)
Hello @Bawolff
Thank you so much !
This short code blocked all special (it didn't block history-pages, revision-pages and revision-diff-pages though).
One other thing that it blocked for anonymous users is the use of the search box, which I don't want to block. 79.180.118.152 (talk) 13:28, 10 April 2022 (UTC)
It also blocked anonymous users from reading category pages, but I don't want to restrict anonymous users from reading category pages. 79.180.118.152 (talk) 13:37, 10 April 2022 (UTC)
Is your wiki non english? If so you might have to use localized names, otherwise i dont know. Bawolff (talk) 20:07, 10 April 2022 (UTC)
Yes, my Wiki is non English, but even if I change everything to the standard Hebrew all problems persist:
$wgWhitelistReadRegexp = [ "/^[^:]+$|^קטגוריה:|^מיוחד:כניסה_לחשבון|^מיוחד:חיפוש/" ];
79.180.118.152 (talk) 11:57, 11 April 2022 (UTC)
I just tried changing my language code to "he" and this seemed to work fine. Bawolff (talk) 00:28, 13 April 2022 (UTC)

Cannot upload images, Apache permissions

Fixed.

I'm having a little trouble uploading images after a MediaWiki upgrade. I upgraded and copied over the images folder and understandably, this has caused some permission errors.

I've checked a few of the topics on here but none seem to help. Originally, I got an error about checking permissions, and as a result, I tried to give Ahpache permissions:

chgrp www-data /var/www/html/mediawiki/images
chgrp www-data /var/www/html/mediawiki/images/lockdir
chmod g+w /var/www/html/mediawiki/images
chmod g+w /var/www/html/mediawiki/images/lockdir

I'm now getting this error:

Could not create directory ‘mwstore://local-backend/local-public/archive/f/fc’.

Any idea what to do in this instance to fix this? 146.198.38.110 (talk) 18:11, 18 March 2022 (UTC)

Which mediawiki version you are using now? ↠Tanbirzx () 05:49, 19 March 2022 (UTC)
I think there's a way to change all directories at once (maybe -r for recursive?) Jonathan3 (talk) 21:54, 19 March 2022 (UTC)
Normally you would change the user of the file not the group. MediaWiki should be the owner of uploaded files. You also need to do this recursively like Johnathan said (i think its a capital -R)
chown -R www-data /var/www/html/mediawiki/images
assuming you are using apache and it runs as www-data (usually true on debian but not true on other OS's). Depending on things, you may have to run that with sudo. Bawolff (talk) 22:25, 19 March 2022 (UTC)

Forgot Your Password?

Is there a way to make the "Forgot Your Password" link appear for users on a MediaWiki install? At the moment the only link that shows is the Help link that directs to the password manual, therefore people cannot reset their own passwords — how do I enable this? 146.198.38.110 (talk) 18:18, 18 March 2022 (UTC)

Make sure you have email enabled. Its required for the link to show up. Bawolff (talk) 20:23, 18 March 2022 (UTC)
I figured it out that it was $wgEnableEmail and I've enabled that. I've tried sending a forgotten password link but nothing happens despite the success page. I think there may be another issue because when I try to confirm my email i get the message:
Please check your email address for invalid characters.
Mailer returned: Unknown error in PHP's mail() function.
Any idea how to fix this or where I should look? 146.198.38.110 (talk) 21:58, 18 March 2022 (UTC)
Often that error means that your webserver does not have an MTA (e.g. sendmail, qmail, postfix, etc) installed.
Check to see if that is missing, and if so install one.
Alternatively, try setting $wgSMTP Bawolff (talk) 23:26, 18 March 2022 (UTC)
@Bawolff, would that be <code>$wgEmailConfirmToEdit</code>? 146.198.38.110 (talk) 21:44, 18 March 2022 (UTC)

Editing Skin

The documentation on skinning for MediaWiki is pretty good, however I'm having a few issues.


I've want to change the vector skin a little bit and add a navigation bar right at the top of the wiki that will stay there. I thought perhaps using Mustache would be the best way to go about this, so I have created a new file called <code>GNav.mustache</code> in <code>/Vector/includes/templates</code> and then I have edited <code>skin.mustache</code> and added the <code>{{>GNav}}</code> where I want it to appear.


When I visit the wiki, however, no changes seem to have taken effect? I can't even see the html on the site or anything when I inspect element. Is there somewhere else I need to call this so it works? 146.198.38.110 (talk) 19:19, 18 March 2022 (UTC)

WikiFarm and Databases

Manage to fix.


For anyone else, it doesn't really matter what database alias you use.

I'm interested in creating two wikis on the same copy of MediaWiki, and I'm following the WikIFarm manual (and yes, I have done the research), but I'm a little confused by what it is saying.

With regards to databases, I probably want to go with the database alias, rather than creating two separate databases, right? Given this would allow for logging in between wikis with the same account.

What process do I follow for the database then? The instillation manual states:

CREATE DATABASE wikidb;
CREATE USER 'wikiuser'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON wikidb.* TO 'wikiuser'@'localhost' WITH GRANT OPTION;

But I already have the "mediawiki" database and want to use that, how do I go about that? Or should I just use the /mw-config/ URL to generate my LocalSettings.php file? If so, what do I enter in the "database" box and then what in the "database alias"?

Sorry if this question has been answered a lot, the guide isn't very clear for this. 146.198.38.110 (talk) 02:02, 19 March 2022 (UTC)

For example, on the talk page, someone states:
Then run the config script again to recreate LocalSettings.php file. Be sure to pick a new database, or give a different prefix from the first Wiki.
If I'm to do this, do I just use "mediawiki" for the database and add something random in the prefix box? 146.198.38.110 (talk) 02:03, 19 March 2022 (UTC)

Issues with SSL and ShortURL

Fixed.

I've been using ShortURLs with my MediaWiki wiki, but have recently enabled SSL via Certbot. Now, if I try to access my wiki whilst using short URL's I get an error that the server could not find the site. If I remove the shortURL configuration, however, I'm able to access the site. Does anyone know what could be causing this?

.htaccess file

RewriteEngine On
# main rewrite rule
RewriteRule ^/?wiki(/.*)?$ /index.php [L]
# Redirect / to Main Page
RewriteRule ^/*$ /index.php [L] 

LocalSettings.php file:

$wgScriptPath = "";
$wgArticlePath = "/wiki/$1";

It's only happening when I'm trying to use ShortURL's? ArrakisMiner (talk) 13:55, 19 March 2022 (UTC)

[ignore this comment]. ArrakisMiner (talk) 14:07, 19 March 2022 (UTC)
Your apache might have different virtual host config for ssl. Bawolff (talk) 19:24, 19 March 2022 (UTC)

Changing the background color of page tabs

I have been trying to change the color of the only tabs that are still white on the following screenshot. I tried everything but they do not seem to budge.

https://media.discordapp.net/attachments/739463264232275999/954772216183128064/unknown.png?width=1440&height=214 VeryGreatFrog (talk) 16:04, 19 March 2022 (UTC)

What version of MediaWiki are you running? Alternatively a link to your wiki would help. I believe a few selectors changed with the Vector skin between MediaWiki versions. ArrakisMiner (talk) 21:39, 19 March 2022 (UTC)
here ya go! That would be MediaWiki 1.37.1 VeryGreatFrog (talk) 23:23, 19 March 2022 (UTC)

Where are problems with this wiki discussed?

Concerning this wiki...

If collaboration and discussion is needed on improving a page of this wiki, and that page's talk page is infrequently visited, how does a wider discussion take place?

The Wikipedia wiki has the "request for comment" system, and a centralized page (on which to announce discussions) called wikipedia:Wikipedia:Centralized discussion for initiating community-wide discussion on a topic of importance about that wiki. What system does this wiki have? The Transhumanist (talk) 01:15, 20 March 2022 (UTC)

You can start a thread at project:current issues
Irc at #mediawiki on libera can also bring attention. Bawolff (talk) 01:20, 20 March 2022 (UTC)

CentralAuth issues

I've been trying to set up CentralAuth — I know, it isn't recommended etc., but its the route I want to take —and I've pretty much done it, but I'm struggling with a few of the fields. For example, I have this:

$wgConf->settings = array(

	'wgServer' => array(
	    'default' => 'https://localhost',
	),

	'wgCanonicalServer' => array(
	    'default' => 'https://localhost',
	),

But then when I navigate to pages such as Special:AccountMerge or Special:CentralAuth, I the wikis listed are in the form of

  • Localhost
  • Localhost
  • Localhost

And they direct to https://localhost/wiki/User:USERNAME instead of the actual wiki name. How can I get it to link to the actual user? 146.198.38.110 (talk) 01:20, 20 March 2022 (UTC)

Each wiki should have a different entry for $wgServer if they need different values. If you set just the default, all will use the default.
P.s. i think we should encourage central auth more. Its better tha the alternative solutions at this point. Bawolff (talk) 01:28, 20 March 2022 (UTC)
I don't know why I didn't think of that, thanks! It's working now.
Also I agree — most of the people told me that it was a bad idea not worth the hassle, but honestly, it's worth it once you manage to do it. It is a pain to set up, though, and the manual is a bit outdated. 146.198.38.110 (talk) 01:43, 20 March 2022 (UTC)
@Bawolff— I seem to be having a few issues with staying logged in across the wikis. For example, I log in at one wiki and It doesn't keep me logged in on the next one I visit:
# General CentralAuth configuration
$wgCentralAuthDatabase = 'centralauth';
$wgCentralAuthAutoMigrate = true;
$wgCentralAuthCookieDomain = '.subdomain.com';
$wgCookieSameSite = "None";
$wgUseSameSiteLegacyCookies = true;
$wgCentralAuthCreateOnView = true;
$wgCentralAuthSilentLogin = true;
$wgCentralAuthUseOldAutoLogin = false;
These are the cookie settings I'm using. Also, I'm using a shared cache table. Any idea where I've gone wrong? 146.198.38.110 (talk) 09:55, 20 March 2022 (UTC)
Also ,I'm getting a fatal exception error when visiting Special:MergeAccounts — these are the settings I'm using: /pastebin.com/RrV92rEj 146.198.38.110 (talk) 13:21, 20 March 2022 (UTC)
Okay, I managed to figure it out a bit — the fatal exception only happens when I visit Special:MergeAccounts with the account that is the same as entered in the MediaWiki configuration when installing (I don't think this really matters, too much?)
I'm still having issues with cookies, though, and can't get my browser sessions to stay logged in between wikis. ArrakisMiner (talk) 18:00, 20 March 2022 (UTC)
FIXED — still having cookie issue, though, if anyone can assist. ArrakisMiner (talk) 18:12, 20 March 2022 (UTC)
BLANK ^ See above. ArrakisMiner (talk) 18:40, 20 March 2022 (UTC)

Looking for someone who has imported English Wikipedia into MediaWiki

Hi,

I'm looking for anybody who has MediaWiki installed on their desktop computer, who has successfully imported English Wikipedia into it.

MediaWiki, not an offline reader like Xowa.

Please post here how you did it, starting with the version of MediaWiki you used, and approximate date of the import.

I'm interested in updating the relevant documentation on the various WM wikis (here, meta, and WP), as it is woefully out-of-date and unintelligible.

So, the first step is to find users experienced in running Wikipedia at home, and find out how they did it.

Do you have Wikipedia up and running on MediaWiki?

Or know anybody who does? The Transhumanist (talk) 07:53, 20 March 2022 (UTC)

Minor version upgrade

I'm using putty to try and do a minor version upgrade from 1.35.2 to 1.35.3 and so on until 1.35.5. I'm using PUTTY. The instructions say to use the patch command with a .patch file. However the files come as .tar.gz. So when gunzipped they are .tar. How do you create the patch file? If I run the patch command with tar it doesn't work and asks me which target file to apply it to. If I rename it to .patch it also doesn't work. It doesn't say any errors it just says:

File to patch: PuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTY

I then tried it in a competing shell and it also doesn't work, it ends with

File to patch:

without the PuTTYPuTTY business. InnerCitadel (talk) 12:21, 20 March 2022 (UTC)

Are you sure you are using the right file? Patch files is one option but you have to use the patch file. It sounds like you are using the normal download (which requires you to remove the old files and insert the new files) Bawolff (talk) 17:05, 21 March 2022 (UTC)
The manual for minor version upgrading doesn't tell you where the patch files are. It just links to the tarballs. It says for minor version upgrades you don't need to do the whole removing and replacing files thing, just run patch command. Only for major version do you need to do it the long way. The instructions are obviously wrong. I ended up switching to git with the help of a developer and it is working much better. Much less of a headache. InnerCitadel (talk) 22:33, 2 April 2022 (UTC)
Which instructions are you reading? Bawolff (talk) 22:09, 3 April 2022 (UTC)
. InnerCitadel (talk) 22:32, 2 April 2022 (UTC)

need help manual short URL

I tried following the steps in the Manual:Short URL but now the web page returns a 404 Not Found.

It is an apache server.

Apache is installed in /etc/apache2

The wiki is installed in /var/lib/mediawiki


I edited the file at /etc/apache2/sites-available/000-default.conf to the following:

<VirtualHost *:80>


ServerName mydomain.wiki

ServerAdmin webmaster@localhost

DocumentRoot /etc/apache2


ErrorLog ${APACHE_LOG_DIR}/error.log

CustomLog ${APACHE_LOG_DIR}/access.log combined


RewriteEngine On

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

RewriteRule ^/*$ %{DOCUMENT_ROOT}/mediawiki/index.php [L]

# Redirect / to Main Page

RewriteRule ^/$ /mediawiki/index.php [L,R=301]

# Domain

RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]

</VirtualHost>

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet


I edited the relevant lines in LocalSettings.php to the following:

$wgScriptPath = "/var/lib/mediawiki";

$wgArticlePath = "/wiki/$1";

$wgUsePathInfo = true;


The page does redirect to https://mydomain.wiki/wiki/Main_Page

It returns a 404 not found error. VeryGreatFrog (talk) 12:31, 20 March 2022 (UTC)

For starters $wgScriptPath is wrong.
Second if your wiki is installed in /var/lib/mediawiki, its possible you need different rewrite rules. It depends how the rest of your website is configured (e.g. are there symlinks? What is the document root?) Bawolff (talk) 18:38, 20 March 2022 (UTC)
What would WgScriptPath be instead? VeryGreatFrog (talk) 11:41, 23 March 2022 (UTC)
It should be the long form of the relative url your wiki uses for scripts like index.php or load.php (not a file system path). Bawolff (talk) 06:11, 1 April 2022 (UTC)

New Mediawiki Install Resulting in White Page

Linux Mint 20.3 Cinnamon

Cinnamon 5.2.7

Kernel 5.4.0-104-generic

Mediawiki versions 1.31.7-1, 1.37.1, and 1.35 are involved in some fashion


Trying to install MediaWiki on a Linux Mint server in order to migrate installations from a different endpoint.

Used apt-get to install mediawiki initially, but the version pulled down was 1.31 - which was too old for the associated database.

Tried upgrading the associated files manually by extracting the latest mediawiki .tar to /var/lib/mediawiki (where apt-get installs things *mostly*), and received various 403 errors.

Copied the .tar contents manually into their "appropriate" destinations (var/lib, etc/, and other directories, as apt-get had dispersed the files across several locations and made symlinks) and this has lead to a "white screen" when accessing Mediawiki, as opposed to the config script.

Have rebooted the server, restarted apache and php services multiple times. No amount of uninstalling mediawiki, deleting all mediawiki files (those copied around manually and/or otherwise generated by the apt-get installation), re-installing, or even manually installing mediawiki from scratch, has resulted in anything other than a white page at this point.

A LocalSettings.php file was never generated for this install - it never got that far. I've tried the various Blank Page fixes - PHP errors will not appear on the page, so far, after I added my backed up LocalSettings.php file to the directory and made the associated PHP changes to display logging.

Any help would be greatly appreciated! I cannot revert to the old endpoint as the package for mediawiki was using Apache 2.2, and neither Apache nor Mediawiki packages will launch any more for reasons I didn't care to investigate further in favor of migrating to a more reliable host (operating system was Synology 7.0.1). Wibbles42 (talk) 18:09, 20 March 2022 (UTC)

We dont reccomend using debians path unless you are using the debian package which has been modified to work that way. The official version of mediawiki is meant to be installed in your web directory. Bawolff (talk) 18:35, 20 March 2022 (UTC)
So that's my fault for not being explicit enough in my explanation.
By "manually installing mediawiki from scratch" I mean that I followed the manual installatioon procedure as set forth by mediawiki documentation. Files were copied from the .tar's extracted folder to - on separate attempts - /var/www/html and /var/www/html/mediawiki, for distinct, different installation attempts. Neither folder yielded success; a blank white page was the only result, both tries. Wibbles42 (talk) 03:16, 21 March 2022 (UTC)
Removed - replied directly. Wibbles42 (talk) 01:46, 21 March 2022 (UTC)
Can you make sure php error reporting is turned on? Does webservercerror log have any errors? See How to debug Bawolff (talk) 17:03, 21 March 2022 (UTC)
Turning on PHP error logging also resulted in a blank page, as mentioned. I suspect this was because the install web script never got as far as giving me a LocalSettings.php file, but I have no idea.
webservercerror log (located in /var/log/apache2/error.log) has the following output:
[Mon Mar 21 13:38:48.348536 2022] [php7:warn] [pid 5794] [client 127.0.0.1:58644] PHP Warning:  require_once(/usr/share/mediawiki/includes/libs/mime/defines.php): failed to open stream: No such file or directory in /usr/share/mediawiki/includes/Defines.php on line 23
[Mon Mar 21 13:38:48.348587 2022] [php7:error] [pid 5794] [client 127.0.0.1:58644] PHP Fatal error:  require_once(): Failed opening required '/usr/share/mediawiki/includes/libs/mime/defines.php' (include_path='.:/usr/share/php') in /usr/share/mediawiki/includes/Defines.php on line 23
Those are the only line items for today, after attempting to load the wiki page. Wibbles42 (talk) 17:41, 21 March 2022 (UTC)
This still sounds like its related to what directories mediawiki is installed in.
Normally you would install the entire thing in /var/www/html (or whatever your web root directory is) Bawolff (talk) 05:18, 23 March 2022 (UTC)
At this point I am rolling the server back to a snapshot before any changes were made, and re-attempting an installation.
Appreciate the responses, however, and thank you for trying to help. Hopefully restarting from a blank slate will get things running, or at least get me to an easier spot to troubleshoot. Wibbles42 (talk) 12:28, 22 March 2022 (UTC)
Manual:Errors and symptoms#You see a Blank Page Malyacko (talk) 12:47, 22 March 2022 (UTC)

Copying pages in upgrade process

Hello,

Our team has recently installed mediawiki version 1.37.1 on Linux system and we are using postgres/psql (10.17, server 11.12).

The goal is to copy the pages we had on our previous mediawiki version 1.23.0 which was using postgres/psql (10.17, server 9.4.8).

Is there any way we can copy the pages from older version to newer version like copying from database tables or with the help of any export/import feature if available any so to avoid manual page creation? Bthetfo (talk) 15:04, 21 March 2022 (UTC)

See Manual:Moving a wiki.
also, try copying the entire postgres database.
https://stackoverflow.com/questions/1237725/copying-postgresql-database-to-another-server Ciencia Al Poder (talk) 15:07, 21 March 2022 (UTC)

Cookies

I'm having a little trouble with CentralAuth and single-sign on cookies. When I sign into one wiki, it doesn't sign me into them all, and I have to manually sign in which is annoying and defeats a large purpose of using CA.


These are the cookies created when I log in:

sikinamess0-UserID
wikinamess0-UserName
wikinameUserID
wikinameUserName	
ss0-wikiname_session	

So it seems the cookies are being set, they're just not actually working, right? Any advice? Code is:

$wgCentralAuthAutoMigrate = true;
$wgCentralAuthCookieDomain = '.domain.com';
$wgCookieSameSite = "None";
$wgUseSameSiteLegacyCookies = true;
# Create the local account on pageview, set false to require a local login to create it.
$wgCentralAuthCreateOnView = true;
$wgForceHTTPS = true;
# Skips the "login success" page
$wgCentralAuthSilentLogin = true;
$wgCentralAuthAutoNew = true;
# Deprecated, will be removed soon.
$wgCentralAuthUseOldAutoLogin = false;

$wgCentralAuthDryRun = false;
    # unset( $wgGroupPermissions['*']['centralauth-merge'] );
    # $wgGroupPermissions['sysop']['centralauth-merge'] = true;

$wgCentralAuthAutoLoginWikis = [
		   # Mapping from domain name to wiki id for other wikis to automatically login into
		   "https://wiki3.domain.com" => "spicewars",
		   "https://wiki2.domain.com" => "wiki2",
		   "https://wiki1.domain.com" => "wiki1"
		];

Are there any errors with my cookie settings? 146.198.38.110 (talk) 16:39, 21 March 2022 (UTC)

I've somewhat managed to get this working, but the issue is, I can log in at wiki2 and it logs me in everywhere, but when I log in at wiki1, it doesn't? 146.198.38.110 (talk) 22:13, 21 March 2022 (UTC)
Hmm. If you clear all cookies on all the sites and then try again, does it work? Bawolff (talk) 05:16, 23 March 2022 (UTC)
@Bawolff yeah, but then if I log out and back in on wiki1 the same behaviour occurs. Only if I clear my cache can I log in on Wiki1 and it logs me in on wiki2. 45.131.192.40 (talk) 19:20, 23 March 2022 (UTC)

Search engine

Hello,

I have installed wikimedia as an internal company wiki site.

If I search in the search toolbar the word "webex" (for example) I found all the pages with this word. But If I search "webe" nothing. Is there a way to not have "exact text search" using the common search toolbar?

Thanks ForeachUser (talk) 16:49, 21 March 2022 (UTC)

You'll need to install Extension:TitleKey Ciencia Al Poder (talk) 22:10, 21 March 2022 (UTC)

LDAP integration

Trying to setup my media wiki instance with ldap, however I'm unable to make it work. Part of the problem that there is so much on the web about this but most appears to be outdated. So far I'm following the following mediawiki doc. https://www.mediawiki.org/w/index.php?title=Manual:Active_Directory_Integration&action=edit&section=9


or should I be following LDAP hub/Migration from extension LDAPAuthentication/Config conversion


Asking because so far I'm unable to make it work with the first reference doc.


Can somebody assist, please? 12.127.245.166 (talk) 03:23, 22 March 2022 (UTC)

What exactly do you want to archive?
  • Form based authentication against a LDAP server?
  • Implicit authentication (SSO) against a Kerberos server but with authorization against a LDAP server?
  • Syncing wiki user groups with a LDAP server?
Configuration of the LDAP-Stack extensions has not changed too much in the last years, so the documentation should be okay, at leas for the start.
You may want to start with installing some of the extensions listed on LDAP_Stack. LDAP_hub should give you an idea of what you need to fullfill your use case. For the concrete configuration you may want to have a look at the respective extension pages here on mw.org.
If it does not work for you, please gather some information (see LDAP_hub#Debugging) and ask here again.
Good luck! Osnard (talk) 07:50, 23 March 2022 (UTC)

About MediaWiki on Windows10

I am trying to install MediaWiki on Windows 10 Since the official MediaWiki instructions are more complicated, I use the equivalent instructions of wikihow. However, an error message is given where the configuration page should appear. The error message is like this: https://s3.bmp.ovh/imgs/2022/03/71b2e9facf136432.jpeg I followed its advice and went to https://www.php.net/intl, but what the site says is confusing... Thanks for the solution you came up with! ZhaoFJx (talk) 05:19, 22 March 2022 (UTC)

If you installed php using something like xampp try and see if they have instructions Bawolff (talk) 06:38, 22 March 2022 (UTC)

Why do I have two "administrator" groups in my Special:UserRights page?

As the admin of my own wikis, I see various groups I am assigned to and in the checkbox section "Groups you can change" I see the "administrator" group twice.

I am "Member of: administrator, administrators, Bureaucrats, Interface administrators, Administrators".

Did I do something wrong when adding group rights to a 'administrator' group? Should I have used the 'sysop' group to assign administrator rights to? Ulf Dunkel (talk) 08:10, 22 March 2022 (UTC)

You could have multiple groups that have different internal names but the same "translation" to english.
> Should I have used the 'sysop' group to assign administrator rights to?
Yes. Check also the page Special:listgrouprights on your wiki to see which groups have what. Bawolff (talk) 09:36, 22 March 2022 (UTC)

Broken Image Uploads

Hello,

similar problem like in this case but the answers there do not help further:

Broken Image Uploads on Project:Support desk (mediawiki.org)


MediaWiki 1.37.1

PHP 8.0.15 (cgi-fcgi)

MySQL 5.7.36-log

ICU 52.1


Upload of pictures is possible without problems. But the image (also the preview) cannot be displayed. We get the same "broken image" like in Imgur: The magic of the Internet


Any ideas? 217.91.157.155 (talk) 08:23, 22 March 2022 (UTC)

Open the image directly on a new tab/window, and see if there's an error message, and see if the URL of the image "looks correct" Ciencia Al Poder (talk) 08:58, 22 March 2022 (UTC)
Thanks for your answer!
The URL of the image looks and is absolutely correct. But we get an "500 Internal Server Error". The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator.... More information about this error may be available in the server error log.
I checked the server logfile: ".htaccess: RewriteOptions not allowed here" 217.91.157.155 (talk) 09:49, 22 March 2022 (UTC)
It seems to be a issue with the .htaccess file in the images-folder:
<IfModule rewrite_module>
RewriteEngine On
RewriteOptions inherit
# Fix for bug T64289
Options +FollowSymLinks
</IfModule>
# No php execution in the upload area
# php_admin_flag engine off 217.91.157.155 (talk) 09:57, 22 March 2022 (UTC)
Commenting out the .htaccess completely leads to displaying the pictures.
What is the the default code in the .htaccess for a private (not public) wiki, showing images only for the logged in users? 217.91.157.155 (talk) 10:14, 22 March 2022 (UTC)
You'll have to follow the instructions at Manual:Image authorization Ciencia Al Poder (talk) 11:12, 22 March 2022 (UTC)
Thanks for the link, i forgot pointing to the "img_auth.php" 217.91.157.155 (talk) 16:47, 22 March 2022 (UTC)

Embed a table within Box-round template.

Looking for a bit of help with respect to the Box-round template

Template:Box-round

The template allow users to enter a title and then text. I have also been able to insert an image (where you can add text. But I am looking to insert a small table.

Everything I try has resulted in, well, nothing. I cannot get a table to appear within the box-round template.

Any help you can give, would be warmly welcomed. MarkRawsthorne (talk) 11:11, 22 March 2022 (UTC)

Try using 2= for the se ond parameter
{{Box-round|title=Title|2=Table goes here}}
since unnamed parameters cant have equal signs in them.
If it still doesnt work, can you include code of what you are trying. Bawolff (talk) 05:15, 23 March 2022 (UTC)
Thanks for the reply. I think I must be doing something wrong.
I'm literally just trying to add the following table (see code below) but still cannot get anything to display in box-round. I think I might be using the |2= wrongly. Sorry for pestering.
{|
| style="text-align:center; width: 100px; background-color:#f6f6f6;" |
| style="background-color:#f6f6f6;" |
==Quick take: Avalanche==
<big>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled.</big>
|}
MarkRawsthorne (talk) 07:28, 23 March 2022 (UTC)
My bad, the parameter name is actually 1 not 2. Additionally if using wiki table syntax, you have to replace | with {{!}} (alternatively you can use html style tables)
{{Box-round|title=foo|1=
{{{!}}
{{!}} style="text-align:center; width: 100px; background-color:#f6f6f6;" {{!}}[[File:AvalanceLogo.png|center|frameless|750x750px]]
{{!}} style="background-color:#f6f6f6;" {{!}}
==Quick take: Avalanche==
<big>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled.</big>
{{!}}}
}}
edit

foo

:{|
| style="text-align:center; width: 100px; background-color:#f6f6f6;" |
File:AvalanceLogo.png
| style="background-color:#f6f6f6;" |
==Quick take: Avalanche==
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled.
|}

Bawolff (talk) 11:16, 23 March 2022 (UTC)

Well appearently that didn't work Bawolff (talk) 11:20, 23 March 2022 (UTC)
I guess i don't know what im talking about here.
Seems like the best way would be to maybe have the table as a separate template or use html style table.
Like in https://www.mediawiki.org/wiki/User:Bawolff/sandbox (flow seems to not like this)
sorry for writing wrong stuff earlier. Bawolff (talk) 11:34, 23 March 2022 (UTC)
I'm really really sorry, but I have one last question. The resultant table looks absolutely fantastic. However there is one small issue, that (again) I don't know where to begin to look, in order to sort it out.
Below the text, there is quite a bit of "dead" space that could potentially be trimmed. (You can see in the image above.) I am not sure if this is possible. If not no worries. Like I said the table looks fantastic. MarkRawsthorne (talk) 13:52, 23 March 2022 (UTC)
You could try and adjust margin and padding css, e.g. https://www.mediawiki.org/w/index.php?title=User:Bawolff/sandbox&diff=5125700&oldid=5125698
The web browser developer tools feature can make visualizing margin and padding easier. Bawolff (talk) 07:16, 24 March 2022 (UTC)
Once again, thank you.
Super helpful
Really appreciate the time and effort you have taken to help out.
truly invaluable.
Thank you again. MarkRawsthorne (talk) 03:57, 25 March 2022 (UTC)
Wow
That totally works. And it works really well
I cannot thank you enough.
Seriously. Thank you. MarkRawsthorne (talk) 12:54, 23 March 2022 (UTC)

Is MediaWiki WCAG 2.11 AA compliant?

I was asked to compare wiki software and make recommendations to my employer.

I found over 120 wiki softwares and based on the criteria I have narrowed it down to 10 so far. MediaWiki is in the top 10.

Criteria is:

Open Source

Secure (evidence of fixes)

Multilanguage support (Especially English/French)

Accessibility compliant (WCAG 2.1 AA or greater)

Markdown support

Is actively maintained

Has a docker image


Most of these are met. However I couldn't find evidence of WCAG 2.1 AA compliance nor Markdown support.

Hoping to confirm both of these.


Thanks


Chris 209.171.88.22 (talk) 19:45, 22 March 2022 (UTC)

There's a bunch of work done to make mediawiki accessible, however afaik nobody has assesed whether or not it meets wcag 2.1 aa. It might very well meet it, but you would have to do the assesment yourself.
Re markdown -not really. There might be some extensions like extension:markdown but i don't think they are maintained and i dont know anyone who uses it. Depending on "why" you need markdown, mediawiki's native mark up format might be sufficient. Bawolff (talk) 05:12, 23 March 2022 (UTC)
Thanks for the reply Bawolff. Appreciated.
I will update my comparison of Wiki Software to reflect current MediaWiki status. 209.171.88.22 (talk) 16:00, 23 March 2022 (UTC)

How to make a partial and a sitewide block simultaneously

I'm somehow coming up with a problem that seems like it should be easy to resolve: I want someone blocked for 24 hours sitewide and when that person is no longer blocked from the site, I want him blocked from two particular pages indefinitely. Adding the temporary sitewide block seems to undo or erase the page blocks, so that when this expires, he will be free to edit anything he wants again. Am I missing something about how to ensure this person is blocked? Can you help me set both an indefinite block for two pages _and_ a simultaneous sitewide block that is only one day long? Thanks. —Justin (koavf)TCM 20:31, 22 March 2022 (UTC)

How do I remove a user from the former group list

Hi. I have an issue where three users have become added to the user_former_group table and nothing I have tried allows them to be added back into the group. I have manually remove their entries from that table, but as soon as they log back in again, they are automatically re-added. I cannot find anything that adds them back in. The only code I can find that refers to this table is in the User.php and UserGroupMembership.php pages in ./includes/user, and the only one with insert code is the latter, in the function that deletes users from groups, and the function that purges expired group membership. In the case of the former we are going nowhere near the rights management page and in the case of the latter they have no current membership to expire.

Even if I manually delete the entries in user_former_groups and then add them back into the group using createAndPromote.php in the maintenance directory, as soon as they log in they are removed from the group and added to the user_former_groups table.

So I have no idea where this is coming from, but the bottom line is that I cannot re-add users back into a group from where they were removed. I assume there is an entry somewhere in a database table that has cached their old group membership but I cannot find it anywhere.

Help :-) 88.98.73.49 (talk) 12:31, 23 March 2022 (UTC)

Just worked out that we mapped the sysop group membership to an Active Directory group, which the users I was looking at were not members of. duh! 88.98.73.49 (talk) 13:05, 23 March 2022 (UTC)
So normally user_former_groups is mostly used by $wgAutopromoteOnce. Is it possible that your situation is not caused by the entry in user former groups, but instead its just an effect of whatever is causing the user to be removed from the group?
I would check to see if any extensions might be causing this. Bawolff (talk) 13:11, 23 March 2022 (UTC)

Blue fading lines between tabs

Hi. I'm having a problem with blue vertical lines between tabs. I tried to use the solution from the article Manual:Remove Tabs#Lines between tabs, but it didn't help. I managed to remove only the first of them with the following code.

<pre>

.vector-menu-content-list {background: none;}

</pre>

However, I could not find the elements to which these lines are attached.

Thanks for the advice 37.195.1.41 (talk) 13:48, 23 March 2022 (UTC)

UPD: The theme is Vector. Editing it via Common.css 37.195.1.41 (talk) 13:52, 23 March 2022 (UTC)
It looks like the selector should probably be .vector-menu-tabs li a although I'm not sure that catches the left-most vertical blue bar. Sam Wilson 02:43, 24 March 2022 (UTC)

Extracts missing for en.wikivoyage

A huge number of articles at en.wikivoyage are suddenly missing their extracts on the V1 REST API summary call. For example, France (empty string in the "extract" field) and New York City (just a newline character). Has something changed with the parser here? Thanks. Brycehughes (talk) 16:44, 23 March 2022 (UTC)

Perhaps it's something to do with en.wv's page banner template. I removed it as a test from one article, and it restored the extract via the API. But then London has a page banner template, and the extract there works just fine. Something is making the extract parser choke. Brycehughes (talk) 17:19, 23 March 2022 (UTC)
Bizarrely, if you delete Wikiwoyage's page banner template from a page, save the page (at which time the extract field will be restored), and then restore the page banner template, the extract will be still be there! This implies a very lame solution of finding every single page in Wikivoyage with the broken extract and then deleting/restoring the page banner template, but seems like this is indicative of something else? Caching by the REST API or something? Brycehughes (talk) 19:29, 24 March 2022 (UTC)
Maybe https://phabricator.wikimedia.org/T295255 is related Arlolra (talk) 18:44, 25 March 2022 (UTC)
Thanks. I think that's probably it. I added a comment about the Pagebanner template. Brycehughes (talk) 19:07, 25 March 2022 (UTC)

How to install CheckUser on Windows?

The CheckUser extension appears to only be available as a tar.gz. file; is there a way to install it on Windows 11? Gaetr (talk) 17:18, 23 March 2022 (UTC)

You could extract it using 7zip (and probably other things). Jonathan3 (talk) 17:34, 23 March 2022 (UTC)
You can download a .zip version from github. Bawolff (talk) 07:01, 24 March 2022 (UTC)

Error after installing CheckUser

I install CheckUser and this displays: Fatal error: Uncaught Exception: Unable to open file C:\xampp\htdocs\mywiki\mediawiki-1.37.1/extensions/CheckUser/extension.json: filemtime(): stat failed for C:\xampp\htdocs\mywiki\mediawiki-1.37.1/extensions/CheckUser/extension.json in C:\xampp\htdocs\mywiki\mediawiki-1.37.1\includes\registration\ExtensionRegistry.php:174 Stack trace: #0 C:\xampp\htdocs\mywiki\mediawiki-1.37.1\includes\GlobalFunctions.php(52): ExtensionRegistry->queue('C:\\xampp\\htdocs...') #1 C:\xampp\htdocs\mywiki\mediawiki-1.37.1\LocalSettings.php(194): wfLoadExtension('CheckUser') #2 C:\xampp\htdocs\mywiki\mediawiki-1.37.1\includes\Setup.php(145): require_once('C:\\xampp\\htdocs...') #3 C:\xampp\htdocs\mywiki\mediawiki-1.37.1\includes\WebStart.php(90): require_once('C:\\xampp\\htdocs...') #4 C:\xampp\htdocs\mywiki\mediawiki-1.37.1\index.php(44): require('C:\\xampp\\htdocs...') #5 {main} thrown in C:\xampp\htdocs\mywiki\mediawiki-1.37.1\includes\registration\ExtensionRegistry.php on line 174 2A00:23C7:3D09:6001:45D8:F207:7B79:E3AE (talk) 18:33, 23 March 2022 (UTC)

Unable to open file C:\xampp\htdocs\mywiki\mediawiki-1.37.1/extensions/CheckUser/extension.json
Something is wrong with that file (not readable by the webserver?). check it. —TheDJ (Not WMF) (talkcontribs) 19:13, 23 March 2022 (UTC)

Problem with SimpleBatchUpload

We installed SimpleBatchUpload but as soon as we open the wiki it instantly gives a HTTP 500 error. Not sure why.

@F.trott VeryGreatFrog (talk) 22:17, 23 March 2022 (UTC)

@VeryGreatFrog Please see "Post a new question" in the sidebar, and check your server logs for that 500 error. Malyacko (talk) 01:54, 24 March 2022 (UTC)

Access to survey results

I would like to use Limesurvey as a means to provide feedback to students giving presentations. Is there a way to have the survey results accessible to more than the admin of the survey? 129.194.236.183 (talk) 10:49, 24 March 2022 (UTC)

Please ask limesurvey, we are not them. —TheDJ (Not WMF) (talkcontribs) 10:52, 24 March 2022 (UTC)

Is there a template for dropdown menus? 130.199.251.4 (talk) 16:07, 24 March 2022 (UTC)

Tamplate shutdown my VisualEditor

I have a private wiki,
When I try to modify a page who contain a tamplate with the VisualEditor I have this error Error contacting the Parsoid/RESTBase server (HTTP 500) .
but when I don't have tamplate VisualEditor work well.
what should I do? Nicolas senechal (talk) 16:37, 24 March 2022 (UTC)
For the start, please see "Post a new question" in the sidebar. Malyacko (talk) 15:59, 26 March 2022 (UTC)
it's a local wiki
Produit Version
From Spécial:Version
MediaWiki 1.37.1
PHP 8.1.2 (apache2handler)
MariaDB 10.4.22-MariaDB
ICU 70.1
From Xampp
XAMPP 8.1.2
Apache 2.4.46
MariaDB 10.4.17
PHP 8.0.0

Nicolas senechal (talk) 07:29, 30 March 2022 (UTC)

DB connection error: No such file or directory (localhost)

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 discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Where to put robots.txt?

I'm trying to add a robots.txt file to my MediaWiki installation to only allow crawling of the main namespace. If my MediaWiki installation is at /var/www/html/mediawiki then where does my robots.txt file go? I've tried just putting it in the above directory but it doesn't seem to get recognised by Google or Bing. 146.198.38.110 (talk) 17:37, 24 March 2022 (UTC)

robots.txt must be served from the root of your domain (www.example.com/robots.txt) Ciencia Al Poder (talk) 20:39, 24 March 2022 (UTC)

Page has disappeared

I serve as Editor for a person's page that has gone missing. Granted I haven't made any updates in a while but where did the page go?? How can I restore it? Editor-Milburn (talk) 20:16, 24 March 2022 (UTC)

Based on https://en.wikipedia.org/w/index.php?title=Wikipedia:Requests_for_undeletion&diff=prev&oldid=1079069170 i assume you got your answer? Bawolff (talk) 07:12, 25 March 2022 (UTC)

Errors during Wiki setup

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.


During the wiki setup I am seeing a bunch of Deprecated: errors. I have installed MediaWiki 1.35.5 with PHP 8.1.4, ISS and Windows Server 2022.

I have included a pastebin with the error I get during the setup. Any assistance would be appreciated.

Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string - Pastebin.com 67.210.210.68 (talk) 17:30, 25 March 2022 (UTC)

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

Mediawiki errors during setup

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 1.35.5 LTS with php 8.1.4 using ISS on Windows Server 2022. During the setup I am seeing errors that I am not sure what could be the cause.

I have included a pastebin of the errors I am seeing. Any assistance would be appreciated.


Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string - Pastebin.com ZeonLighter (talk) 17:37, 25 March 2022 (UTC)

I'm pretty sure MediaWiki is incompatible with PHP 8. 162.212.107.134 (talk) 17:57, 25 March 2022 (UTC)
Can anyone confirm? When looking at the documentation it says PHP 7.4.3+ ? ZeonLighter (talk) 18:00, 25 March 2022 (UTC)
See Compatibility#PHPAmmarpad (talk) 18:23, 25 March 2022 (UTC)
Seems that downgrading to 7.4.3 was the solution. The guide found here Manual:Installing MediaWiki on Windows Server 2016 mentions PHP 8.0.3 which did not work for me. After downgrading the setup continued to work.
Thanks ZeonLighter (talk) 18:34, 25 March 2022 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

500/502 errors affecting certain pages on my wiki

Morning, MW team. This month, certain pages in a certain custom namespace on my creative-venture wiki have caught rather bad luck in regards to creation and/or access/loading.

As explained and detailed in this Miraheze Phabricator filing, a slew of titles in the custom "Entry" namespace--for my conlang dictionary--cannot be created through Page Forms for whatever reason. (The affected range is "S"/"T", but a few pages outside of it also fall into this trap; the form used is "Entry/RFM", imported/expanded from the original Referata version. ["RFM" stands for Tovasala, the conlang so covered.] Everything worked fine up till said form's [re-]introduction at the start of March, and that may be causing the problem--the same reason why I tagged this case as "Unbreak Now!" on Phabricator.)

This contributor uses Chrome on a Galaxy Tab A to edit Miraheze. On and off, on affected links, Chrome outputs this browser-specific message:

This page isn't working

constantnoble.miraheze.org is currently unable to handle this request.

HTTP ERROR 500

And sometimes, Miraheze itself displays its "502 Bad Gateway" message.

Both of them, inevitably, cause me to hit "Refresh" several times or more until the affectee appears.

On a related note: The Form namespace isn't configured to recognise subpages at the moment, at least on my wiki, and I don't want anything to break through ManageWiki or otherwise. See this November 2020 discussion with developer/Referata founder Yaron Koren (talk · contribs), as well as this local namespace API overview.

TL/DR: A 500/502 problem that only affects a certain subset of titles in the Entry namespace (viz. those starting with "S"/"T"), and no other pages. Extensions involved are DPL3 (Universal Omega (talk · contribs)) and Page Forms (Koren).

What I designate as "Wave 1" of the Referata-to-Miraheze imports can't finish soon enough on account of that bottleneck....

P.S. Sending @Yaron Koren: Yeah, you know the deal.

(MW 1.37.1 [8cea63d] / PHP 7.4.28 [fpm-fcgi] / 10.5.15-MariaDB-1:10.5.15+maria~bullseye-log)

--Slgrandson (talk) 14:00, 26 March 2022 (UTC)

DPL3, shouldn't be involved in this cause anymore. My recent changes to it seem to have successfully mitigated it causing issues like this. Though it does seem PageForms could likely be at fault. Universal Omega (talk) 21:06, 26 March 2022 (UTC)
And to @Bawolff: From Universal Omega (talk · contribs) himself at MH Phab, minutes ago (and apologies if it's nighttime EDT where I am):
[410434a990e99c6d7d7f7a99] /w/index.php?title=Entry:slenge&action=submit   PHP Fatal Error from line 341 of /srv/mediawiki/w/includes/libs/objectcache/MemcachedPeclBagOStuff.php: Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes)
...which may bring us one step closer to diagnosis (if that comes to pass). --Slgrandson (talk) 02:32, 13 April 2022 (UTC)
Pretty generic OOM error. Note, php OOM errors are unreliable when it comes to what line number they occur at, so there is not necessarily any reason to think it has something to do with MemcachedPeclBagOStuff.php.
Its still possible that this is triggered by an extension that has some sort of memory leak, or just processes a huge amount of data. You might want to try and generate a minimal test case.
128MB, while definitely a reasonable limit, is borderline on the low side for a memory limit (For comparison, i think WMF uses 666mb). Perhaps it should just be increased. However, whether or not that is an appropriate solution depends on the hosting situation so would be better answered by Miraheze staff (I want to be very clear that it would be 100% reasonable for miraheze staff to say, that due to the way that their hosting is setup, 128mb is what the memory limit has to stay at). Bawolff (talk) 03:41, 13 April 2022 (UTC)
From Universal Omega (talk · contribs) at MH Phab, last night:
I did some digging into this. The main issue seems to be the mentioned OOM (which I found is caused by RegexFunctions), with both Loops seemingly playing a part as well, though a bit rare for those ones. I decided to remove all overrides for the Loops extension, so the max limit must remain at 100, due to more than that causing issues with us.
Though it seems that ParserFunctions is another one that due to how much usages there is, is also playing a big part here, causing OOMs, and significantly slowing down the jobs.
Another (unrelated, this one is not causing OOMs, by itself anyway) issue is DPL3, once I tested by disabling ParserFunctions, I got an error for DPL3 sometimes:
2022-04-14 01:28:06 refreshLinks Template:Definition/Arrays pages={"1647":[3034,"dr\u00e8ve"]} rootJobSignature=28e5340e1f5eb5a76c907900dd8ec37c53011775 rootJobTimestamp=20220413202831 triggeredRecursive=1 causeAction=edit-page causeAgent=Routhwick namespace=10 title=Definition/Arrays requestId=da452712a4d937b5d2641c4f (uuid=f759c456ba214c50adf311d4833c64e7,timestamp=1649892120) t=553 error=Wikimedia\Rdbms\DBQueryError: Error 1146: Table 'constantnoblewiki.dpl_clview' doesn't exist (db101)
Function: MediaWiki\Extension\DynamicPageList3\Query::buildAndSelect - Entry:drève
Query: SELECT DISTINCT `page`.page_namespace AS `page_namespace`,`page`.page_id AS `page_id`,`page`.page_title AS `page_title`  FROM `page` INNER JOIN `dpl_clview` `cl1` ON ((`page`.page_id = cl1.cl_from AND (cl1.cl_to = 'rfm=Tovasala' OR cl1.cl_to = 'en' OR cl1.cl_to = '' OR cl1.cl_to = 'rfm=CH')))   WHERE `page`.page_is_redirect = 0 AND `page`.page_namespace = 3034  LIMIT 500
this one is because when DPL3 is installed with ManageWiki, it does not create the VIEW.
And on top of that, "RegexFunctions has been disabled as it's causing OOMs." Effectively meaning my Dictionary entries have once again been gored away for the time being, design-wise. Once everything returns to normal, I'll remind you.
In the meantime, bringing over RgxF developer @Skizzerz: Perhaps he may look into the issue further than we can. --Slgrandson (talk) 16:32, 14 April 2022 (UTC)
RegexFunctions will not block you from using a terrible regex that causes all sorts of backtracking and uses up a ton of resources. Either optimize your regexes or move to a solution like Scribunto (and lua's pattern matching, which is a lot lighter-weight than regex). If you want to go the former route, there is plenty of information online on how to avoid regex patterns that cause excessive backtracking. Skizzerz 18:40, 14 April 2022 (UTC)

Keywords causing a 500 Internal Server Error?

A community I'm in has been working on a wiki, and for some ungodly reason, certain words like "tree" are causing the wiki to refuse edits. It's not JUST the word tree, mind you, "track" and "trace" also cause it, and presumably other words as well. What's more, it only seems to actually get mad at these words under select circumstances, which are not understood.

The only thing we can find about this error claims it is an Out Of Memory error, but it doesn't seem to be that; plus, changing the $wgMaxShellMemory parameter hasn't actually fixed the error, even when un-capping it entirely.

For what it's worth, the version of MediaWiki itself is currently out-of-date, and there are plans to update it soon. But even then, we can't help but worry about if this would solve anything. One such hypothesis is that it might actually even be an anti-vandalism plugin backfiring. A link to our Special:Version page can be found here, if that helps narrow things down. Camwoodstock (talk) 18:38, 26 March 2022 (UTC)

Check for apache mod_security or other WAF.
Does your webserver error logs have any info? Bawolff (talk) 23:17, 26 March 2022 (UTC)

Migration of old versions of mediawiki currently blocked by deprecation in 1.35 of wgMultiContentRevisionSchemaMigrationStage

wgMultiContentRevisionSchemaMigrationStage was apparently added in 1.32 but then deprecated in 1.35.

It was added in 1.32 to allow users to upgrade old versions of Mediawiki. But now that it has been removed, it is not possible for me to migrate my old wikis using the LTS of 1.35.


Surely that is a serious problem. Do you really want to block users from upgrading their old wikis.


When I try and migrate from my old version wikis (1.19) from 1.35 it fails with the error:

MediaWiki\Revision\RevisionAccessException from line 1296 of /home/customer/www/youbelong.info/public_html/mediawiki-1.35.5/includes/Revision/RevisionStore.php: Main slot of revision not found in database. See T212428.


Apparently this problem can be fixed by using wgMultiContentRevisionSchemaMigrationStage as described here: https://civihosting.com/blog/mediawiki-main-slot-of-revision-not-found-in-database/


However, that will not work in version 1.35. When I try I get the following error:

Beginning migration of revision.rev_user and revision.rev_user_text to revision_actor_temp.revactor_actor

UnexpectedValueException from line 1034 of /home/customer/www/youbelong.info/public_html/mediawiki-1.35.5/includes/ServiceWiring.php: The MultiContentRevisionSchemaMigrationStage setting is no longer supported!


So - I am stuck. I cannot migrate to 1.35. And there is no currently available version of 1.34 (without building one for yourself from Git).


Wouldn't the simplest solution be to either remove the deprecation from 1.35 - or publish a version of 1.34 which people could use to fix the database, then upgrade from 1.34 to 1.35.

Otherwise you are abandoning all of us with old wikis. Camerojo (talk) 04:10, 27 March 2022 (UTC)

Yes, we really want. Manual:Upgrading#Check requirements covers that for very old versions. Malyacko (talk) 06:59, 27 March 2022 (UTC)
Old versions can be downloaded from https://releases.wikimedia.org/mediawiki/ Bawolff (talk) 07:15, 27 March 2022 (UTC)
I successfully upgrade from 1.34 to 1.35 (and 1.36, and 1.37, and downgrade back to 1.35 and 1.36) as follows:
  • reinstall all code files from scratch
  • make sure all local configuration and file uploads are in place
  • upgrade the database by running maintenance/update.php --quick Rp (talk) 10:37, 27 March 2022 (UTC)

How to automate customizing look & feel in a way that supports MediaWiki 1.37 and earlier versions?

We run some wikis with a custom layout, common to all.

Lacking the time and expertise to develop a MediaWiki skin, all we do is specify some CSS in a custom .less file, which then needs to be included in the right way. An alternative would be to compile it and include it into the MediaWiki:Common.css page.

Installation and configuration of these wikis is fully automated. A Makefile is used to download, install, configure and deploy each wiki, based on a couple of environment variables, one of which is the MediaWiki version to use. It can also back up and restore the database.

This works, but it is a challenge to keep it working with new MediaWiki releases, because the internals tend to change. A breaking change, for us, is the reorganization of skin files in 1.37. Our custom .less file is no longer being included.

Of course I can fix this, but things may change again in 1.38.

What would you advise me to do in order to maintain our (entirely CSS-based) automated look and feel customizations across different MediaWiki versions with the least amount of hassle?

  • Keep doing what I'm doing?
  • Automate moving the CSS code into the MediaWiki:Common.css page and do that instead?
  • Learn how to develop and maintain a skin, and do that?
  • Something else? Rp (talk) 09:34, 27 March 2022 (UTC)
I'd suggest making your own resource loader module (i.e. a small extension that loads only your .less file). That is less heavy than making your own skin. Using common.css is also a fine alternative.
see ResourceLoader and Manual:Hooks/BeforePageDisplay
I strongly reccomend against making random modifications to existing skins, as those are likely to break on upgrade. Bawolff (talk) 07:43, 28 March 2022 (UTC)
Thanks! What I do right now is add a statement to all variables.less-files that includes our custom .less-file. It may break later, but it works amazingly well for now. I'll try the extension once it breaks. Rp (talk) 11:31, 29 March 2022 (UTC)

"Invalid response from server" when logging out with VisualEditor and SimpleSAMLphp extensions enabled

When logging out on our wiki, the user sees a small reddish alert box saying Invalid response from server. and the page doesn't change (causing the user to think the logout has failed, which it hasn't).

This happens with MediaWiki 1.32-1.37, with VisualEditor, PluggableAuth and SimpleSAMLphp, and a few more extensions enabled.

The message appears to be from extensions/VisualEditor/modules/ve-mw/init/ve.init.mw.ArticleTarget.js.

What I think is happening:

  • The user logs out. The logout button specifies the URL of a page to load.
  • Upon logging out, the user loses editing rights.
  • The page is loaded, from the browser cache, with the VisualEditor elements still present.
  • The code in ve.init.mw.ArticleTarget.js somehow runs into trouble because editing is no longer enabled.

Can this be fixed through a MediaWiki setting, or is it something to be fixed within the VisualEditor code? Rp (talk) 10:22, 27 March 2022 (UTC)

Got the same error when I tried to upload an image within the visual editor. Although it uploaded the image it said "Invalid response from server". In my case switching the PHP version from 8.3 to 8.1. removed the error. Stefahn (talk) 17:54, 4 June 2024 (UTC)

how to enable media upload

Hello from Germany!

Im an absolute beginner with MediaWiki and php :-(


I need help to enable media upload function.

What I did until now:

I followed this guideline Extension:UploadWizard#Enabling uploads and thumbnails

I did all mentioned settings to php.ini and LocalSettings.php.

But in VE edit mode, no icon to upload shows up.


My goal is this:

User should be able to upload different media files like txt, pdf, jpg, xml, ... to a specified folder.

Right now my MediaWiki is running on my local Windows 11 machine. Latest xampp is installed and up and running. MediaWiki is up and running and I managed to create pages with tables and intern and external links.

But now Im stuck...


Thx for any hint in this case and pls pardon my bad english!


Best regards


Peter 93.244.187.20 (talk) 11:02, 27 March 2022 (UTC)

Upload wizard is separate from the visual editor upload dialog.
See https://www.mediawiki.org/wiki/Upload_dialog#Configuration_(for_wiki_sysadmins) for the VE upload dialog. Bawolff (talk) 22:02, 27 March 2022 (UTC)

Seeking an extension that allows me to organize a wiki around dates

I'm working on a wiki that is about events that have occurred. What I'd like to find (if it exists) is an extension that lets me link events by dates.

For instance, if event 1 occurred on 6/15/2020 and event 2 occurred on 6/8/1976 and event 3 also occurred 6/8/1976, what I'd like to do is be able to click on 6/8/76 and see all the events that occurred on that date. Even better if I could also see which events occurred in June regardless of year, or by year.


Right now, I'm thinking I need to create categories for each date, month or year I might want to query by and assign events to categories manually. The issue is some events have multiple dates associated - like the lead up to event occurs on X date, the event occurs Y date, and it occurs again on Z date.


It might be oddly specific, but is there an extension that allows linking dates together like this already? Lucasjkr (talk) 13:27, 27 March 2022 (UTC)

You could do this with Extension:Cargo. Each event page could have a structure such as
{{event | date=2020-06-15 }}
Event details here.
== On this date ==
{{events |month=6 |day=15 }}
where the {{event}} template could look like:
{<noinclude>{{#cargo_declare: | _table = events
 | date = Datetime
}}</noinclude><includeonly>{{#cargo_store: _table = events
 | date = {{{date|}}}
}}</includeonly>
and the {{events}} template like:
{{#cargo_query: tables=events
 | fields = _pageName
 | format = ul
 | where = MONTH(events.date) = {{{month}}} AND DAY(events.date) = {{{day}}}
}}
Sam Wilson 01:16, 28 March 2022 (UTC)

Hello from Germany!


Im using the latest MediaWiki and xampp.

Is it possible to add a dropdown/drilldown button into a table field to select a date from a calendar?

Here is a screenshot from my table, I "added" a dropdown symbol ;-)


https://drive.google.com/file/d/1nHYmRddIXXCZ1ZnJal08w4ZdlDqhRb-D/view?usp=sharing

And one more question:

haow can I let other user fill in values into the table without the VE or standard editor?

I dont want them to change the structure, only add values.


Thx for your help and best regards


Peter Peter58ha (talk) 14:24, 27 March 2022 (UTC)

Upgraded Wiki - Editing pages, "Save Changes" takes a long time to complete

Newly updated Mediawiki (official Docker container - 1.37.1 w/ PHP 7.4.28). Also upgraded MariaDB (official MariaDB container, 10.7.3-MariaDB-1:10.7.3+maria~focal-log).

I ran update.php afterwards as well. No errors or anything obviously wrong.

Everything seems to work ok EXCEPT when I try to edit a page.

When I make a simple edit and try to save it doesn't complete immediately like it used to. It sits there like it is waiting for a response to close the transaction or something. It does complete after 5 minutes if I let it sit.

I've turned on logging for all the things (mariadb, apache, mediawiki, php, etc.) and I don't see anything left to troubleshoot. For giggles I threw extra memory and cores at the containers but it didn't make any difference.

Anyone have an idea what I could look at? 142.180.254.199 (talk) 03:02, 28 March 2022 (UTC)

If its that long, it could actually be waiting for the http connection to complete. I've heard that happen sometimes if http/2 is misconfigured or there is a mismatch with content-length header. Sometimes using curl can get you more verbose protocol level errors. Bawolff (talk) 05:52, 28 March 2022 (UTC)
I did some more digging and am seeing something that might be the issue..
The activity is:
Load the main page ->
click edit ->
add some new lines on the page ->
press "Save Changes" and ->
wait 5+ minutes till it returns.
Here's what I see in the access.log (TZ=UTC):
==> apache2/access.log <==
192.168.86.10 - - [28/Mar/2022:16:03:22 +0000] "GET /load.php?lang=en&modules=jquery%2Coojs%2Coojs-ui-core%2Coojs-ui-widgets%2Csite%7Cjquery.client%2Ccookie%2ChighlightText%2ClengthLimit%2CmakeCollapsible%2Cspinner%2Csuggestions%2CtextSelection%2Cthrottle-debounce%2Cui%7Cjquery.makeCollapsible.styles%7Cjquery.spinner.styles%7Cmediawiki.String%2CTitle%2Capi%2Cbase%2Ccldr%2CconfirmCloseWindow%2Ccookie%2Cicon%2CjqueryMsg%2Clanguage%2Cstorage%2Ctemplate%2Cuser%2Cutil%7Cmediawiki.action.edit%7Cmediawiki.action.edit.collapsibleFooter%2CeditWarning%2Cpreview%7Cmediawiki.diff.styles%7Cmediawiki.language.specialCharacters%7Cmediawiki.libs.pluralruleparser%7Cmediawiki.page.ready%7Cmediawiki.page.watch.ajax%7Cmediawiki.widgets.visibleLengthLimit%7Coojs-ui-widgets.icons%7Coojs-ui.styles.icons-content%2Cicons-editing-advanced%2Cicons-editing-citation%2Cicons-editing-core%2Cicons-editing-list%2Cicons-editing-styling%2Cicons-media%7Cskins.vector.js%7Cuser.defaults&skin=vector&version=bwqsl HTTP/1.1" 200 271274 "https://web.blackleaf.ca/index.php?title=Main_Page&action=edit" "Mozilla/5.0 (X11; Linux x86_64; rv:98.0) Gecko/20100101 Firefox/98.0"
[here's the post api.php - nothing special]
192.168.86.10 - - [28/Mar/2022:16:03:40 +0000] "POST /api.php HTTP/1.1" 200 1286 "https://web.blackleaf.ca/index.php?title=Main_Page&action=edit" "Mozilla/5.0 (X11; Linux x86_64; rv:98.0) Gecko/20100101 Firefox/98.0"
[the 5+ minute wait happens here - note time stamp of the second line below here]
192.168.86.10 - - [28/Mar/2022:16:03:40 +0000] "POST /index.php?title=Main_Page&action=submit HTTP/1.1" 302 1418 "https://web.blackleaf.ca/index.php?title=Main_Page&action=edit" "Mozilla/5.0 (X11; Linux x86_64; rv:98.0) Gecko/20100101 Firefox/98.0"
[time gap recorded on this line]
192.168.86.10 - - [28/Mar/2022:16:10:08 +0000] "GET /index.php/Main_Page HTTP/1.1" 200 27980 "https://web.blackleaf.ca/index.php?title=Main_Page&action=edit" "Mozilla/5.0 (X11; Linux x86_64; rv:98.0) Gecko/20100101 Firefox/98.0"
192.168.86.10 - - [28/Mar/2022:16:10:08 +0000] "GET /load.php?lang=en&modules=site.styles&only=styles&skin=vector HTTP/1.1" 200 7452 "https://web.blackleaf.ca/index.php/Main_Page" "Mozilla/5.0 (X11; Linux x86_64; rv:98.0) Gecko/20100101 Firefox/98.0"
192.168.86.10 - - [28/Mar/2022:16:10:08 +0000] "GET /load.php?lang=en&modules=mediawiki.ui.button%2Cicon%7Cskins.vector.icons%2Cstyles&only=styles&skin=vector HTTP/1.1" 200 13988 "https://web.blackleaf.ca/index.php/Main_Page" "Mozilla/5.0 (X11; Linux x86_64; rv:98.0) Gecko/20100101 Firefox/98.0"
.
.
.
[etc]
Pretty normal looking except the time.
During the "timeout" I noticed that the mariadb procs are spinning at 100% like it's doing something.
Here is what I didn't notice yesterday in the mariadb error log (TZ=America/Toronto):
==> mysql-error.log <==
2022-03-28 12:10:07 468 [Warning] Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. INSERT... ON DUPLICATE KEY UPDATE on a table with more than one UNIQUE KEY is unsafe Statement: INSERT /* ActorMigrationBase::getInsertValuesWithTempTable */ INTO `revision_actor_temp` (revactor_rev,revactor_actor,revactor_timestamp,revactor_page) VALUES (53457,1,'20220328160340',1) ON DUPLICATE KEY UPDATE revactor_actor = 1,revactor_timestamp = '20220328160340',revactor_page = 1
That can't be good... and unfortunately doesn't mean a lot to me other than something is broken in the data/keys.
Ideas how to fix? 142.180.254.199 (talk) 16:29, 28 March 2022 (UTC)
To be clear, the mysql-error.log writes out that message when the table is updated - at the end of the 5+ minute period where the web page is saved. 142.180.254.199 (talk) 16:35, 28 March 2022 (UTC)
For the webserver log part. The get request happens as a result of the web browser recieving the post request, so that just means the post request took a long time to finish.
I don't think the mysql warning is something to worry about unless you are using statement based replication. (Which you arent)
You could try enabling the mediawiki debug log (see How to debug). Profiling can also yield useful debug info.
Just to eliminate causes, try temporarily setting $wgJobRunRate =0; to make sure it is not the job queue's fault (you will want to change it back after testing as job queue is important) Bawolff (talk) 06:21, 29 March 2022 (UTC)
Yes, I had the mediawiki and database logging maxed out as well... nothing of interest being posted in the logs.
So, I am at a loss how to troubleshoot this further so I have rolled back both database (I figure this is a DB issue) and mediawiki to mediawiki:1.35.5 and mariadb:10.2.43.
It is back to working properly now so there is something wrong with the upgrade path I took and/or the upgrade.php script is missing something.
I'm going to walk the containers forward version by version now and see if it breaks again.
My site is a personal site that has all my technical diary and project notes for the last 10 or more years so I've been quite stressed about this for the last few days.
Thanks for your help. 142.180.254.199 (talk) 16:15, 29 March 2022 (UTC)
OK - I am fixed.
I'm not certain what happened before. I did notice that this time when I upgraded from 1.35.5 to 1.36.3 the update.php script made a lot of changes that I don't recollect before. Maybe I missed a step before and that was the cause of my problem.
Regardless, I'm now fixed and can move forward.
Thanks 142.180.254.199 (talk) 17:58, 29 March 2022 (UTC)

TGS_REQ (4 etypes {18 17 16 23}) 10.201.168.155: NO PREAUTH: authtime 0, $client for $server, Generic error (see e-text)" Where is e-text ?

Hellow , I got an error log:   “ Mar 23 16:35:15 $kdchost krb5kdc[1781](info): TGS_REQ (4 etypes {18 17 16 23}) 10.201.168.155: NO PREAUTH: authtime 0,  $client for $server, Generic error (see e-text) “

Where is e-text ? Zhangxiping (talk) 07:55, 28 March 2022 (UTC)

Where's the information asked in the "Post a new question" section in the sidebar? Ciencia Al Poder (talk) 08:08, 28 March 2022 (UTC)

Mail gmx.at ist nicht möglich !

Mail gmx.at ist nicht möglich ! 62.240.134.167 (talk) 08:30, 28 March 2022 (UTC)

Read "Post a new question" in the sidebar! Malyacko (talk) 09:41, 28 March 2022 (UTC)

RSS feed from mediawiki

I want to display the latest pages of my wiki on a wordpress site using RSS. I want to add the feed  https://www.monstropedia.org/index.php?title=Special:Newpages&feed=rss but it does not seem to work ... Do I need an extension, it seems to me that it was working out of the box previously ... Monstr6 (talk) 11:03, 28 March 2022 (UTC)

It looks like that feed is fine, so perhaps the issue is on WordPress where you're trying to display it. The URL you posted actually redirects to the 'NewPages' (captial 'P') one, so maybe something isn't following the redirect? Sam Wilson 03:56, 29 March 2022 (UTC)

egitim

programla ilgili egitimleriniz varmı Aşilakhilleus (talk) 12:10, 28 March 2022 (UTC)

@Aşilakhilleus Please see "Post a new question" in the sidebar Malyacko (talk) 12:15, 28 March 2022 (UTC)

VisualEditor not working in MediaWiki 1.37.1

I am trying to enable VisualEditor in my LocalSettings.php

wfLoadExtension('VisualEditor');

However, whenever clicking on "Edit" on any page with existing content, it clears all the content and tries to edit an empty page.


I have tried adding:

AllowEncodedSlashes NoDecode

in the default config file: /etc/httpd/conf/sites_ssl/default.conf

I want to mention that we have multiple wikis running on the same MediaWiki installation and we have some customizations in LocalSettings.php and on our Apache. Let me know what other information you might need. I upgraded from 1.24 to 1.37. Elli777 (talk) 12:55, 28 March 2022 (UTC)

do you have browser console errors or apache/php log errors ? —TheDJ (Not WMF) (talkcontribs) 14:20, 29 March 2022 (UTC)
Thanks for answering! Please see my replies below. Elli777 (talk) 12:13, 31 March 2022 (UTC)
No real console or php/apache errors, nothing in error_log, this is in access_log:
10XXX - - [31/Mar/2022:14:05:10 +0200] "GET /itspublic/Eipod_Limesurvey_Integration HTTP/1.1" 200 196436
10XXX - - [31/Mar/2022:14:05:11 +0200] "GET /load.php?lang=en&modules=ext.visualEditor.desktopArticleTarget.noscript%7Cskins.vector.styles.legacy&only=styles&skin=vector HTTP/1.1" 200 7615 Elli777 (talk) 12:12, 31 March 2022 (UTC)
I should mention that the first time I click on "Edit" I get this windows with the following text on it:
Welcome to load.php?lang=en&modules=jquery%2Coojs%2Coojs-ui-core%2Csite%7Cjquery.client%2Ccookie%2CtextSelection%7Cmediawiki.String%2CTitle%2CUri%2Capi%2Cbase%2Ccldr%2Ccookie%2Cdebug%2CjqueryMsg%2Clanguage%2Cstorage%2Ctoc%2Cuser%2Cutil%7Cmediawiki.editfont.styles%7Cmediawiki.libs.pluralruleparser%7Cmediawiki.page.ready%7Coojs-ui-core.icons%2Cstyles%7Coojs-ui.styles.indicators%7Cskins.vector.legacy.js%7Cuser.defaults&skin=vector&version=1eut6
with two buttons: "Switch to source editor" or "Start editing"
The second time I load the page, the existing content of the page is removed and I see a blank page for editing. Elli777 (talk) 12:12, 31 March 2022 (UTC)

Error when installing CheckUser

Fatal error: Uncaught ExtensionDependencyError: CheckUser is not compatible with the current MediaWiki core (version 1.37.1), it requires: >= 1.38.0. in C:\xampp\htdocs\mywiki\mediawiki-1.37.1\includes\registration\ExtensionRegistry.php:404 Stack trace: #0 C:\xampp\htdocs\mywiki\mediawiki-1.37.1\includes\registration\ExtensionRegistry.php(228): ExtensionRegistry->readFromQueue(Array) #1 C:\xampp\htdocs\mywiki\mediawiki-1.37.1\includes\Setup.php(168): ExtensionRegistry->loadFromQueue() #2 C:\xampp\htdocs\mywiki\mediawiki-1.37.1\includes\WebStart.php(90): require_once('C:\\xampp\\htdocs...') #3 C:\xampp\htdocs\mywiki\mediawiki-1.37.1\index.php(44): require('C:\\xampp\\htdocs...') #4 {main} thrown in C:\xampp\htdocs\mywiki\mediawiki-1.37.1\includes\registration\ExtensionRegistry.php on line 404 Aalaa324 (talk) 13:32, 28 March 2022 (UTC)

Apparently the MediaWiki core version does not match the extensions required compatiblity level. Make sure to download the extension in the proper version. Use https://www.mediawiki.org/wiki/Special:ExtensionDistributor?extdistname=CheckUser&extdistversion=REL1_37 for a version compatible with you MediaWiki version. Osnard (talk) 14:29, 28 March 2022 (UTC)

diq language

In this language upper case for i is İ. 109.126.215.154 (talk) 15:15, 28 March 2022 (UTC)

Okay. How is this related to MediaWiki? Is there a bug? Malyacko (talk) 20:57, 28 March 2022 (UTC)
Is this about Turkish? There are several issues about these letters, see this search result for some of them. Some are quite old and resolved. – Ammarpad (talk) 07:04, 29 March 2022 (UTC)
Its about w:Zaza language which is not Turkish but spoken in Turkey.
I guess the original poster is saying it should have the same behaviour as tr does with İ. I have no idea if that's correct or not. The enwikipedia article seems to suggest using normal i/I and î/Î.
Regardless, if diq wants a behaviour change they need to show community consensus and file a phab bug. Bawolff (talk) 11:40, 29 March 2022 (UTC)
if this was about diq.wikipedia.org, this would be meta:Requesting wiki configuration changes Malyacko (talk) 16:38, 29 March 2022 (UTC)

Errors implimenting Infoboxes

Hello everyone,

I've followed the official instructions on installing Infoboxes to the tee, but when trying to change the page content model to Sanitized CSS as the page suggests, I'm met with several errors which prevent me from doing so. I'm certain it's not entirely a code issue on my behalf, as when copying the Infobox template page straight from Wikipedia itself, many of the same errors appear. Here are a sample of these errors from a page on my wiki:

Invalid newline in string at line 52 character 984.

Unexpected end of stylesheet in rule at line 64 character 13.

Missing selector list at line 1 character 1.

Any ideas as to what I could be doing wrong? Here is a link to the live wiki on Miraheze if more information could be found there. https://yamasztuka.miraheze.org/wiki/Alyssa 24.160.87.67 (talk) 00:47, 29 March 2022 (UTC)

Can I change the image depending on the language of the page?

I have a wiki that uses 2 languages. Sometimes I use images with some text written on them in Paint. If I change the language of the page I need to change the link to another image in another language. Is there a way to do so? MrJConstantine (talk) 04:28, 29 March 2022 (UTC)

Svgs have some multilingual support, but i dont know if it uses page language.
Otherwise you could have the text in wikitext and use css to overlay it on top of the image. Bawolff (talk) 06:02, 29 March 2022 (UTC)
How can I do it with css? MrJConstantine (talk) 05:53, 6 April 2022 (UTC)
Searching the internet for "css overlay image" provides some hints. Malyacko (talk) 07:14, 6 April 2022 (UTC)
It depends on which translation extension is used. If you use the translate extension, all images inside a <translate> </translate> tag can be inserted and translated for the corresponding language. Extension:Translate Media4art (talk) 21:36, 6 April 2022 (UTC)

How many pages are in a namespace?

How do you find out how many pages are in a particular namespace? The Transhumanist (talk) 06:01, 29 March 2022 (UTC)

I think it shows on special:statistics if you have $wgMiserMode set to false. There is also a parser function (see help:magic Words)
Otherwise if you have sql access and know the namespace number do something like SELECT page_namespace, COUNT(*) FROM page group by page_namespace; Bawolff (talk) 08:36, 29 March 2022 (UTC)

How do you get templates to work?

On an imported wiki, the templates aren't rendering.

Instead, the wiki is littered with strings like this, inside curly brackets:

#invoke:Infobox military conflict|main

How do you get the templates to work? The Transhumanist (talk) 06:32, 29 March 2022 (UTC)

Check whether you have Extension:Scribunto installed. – Ammarpad (talk) 06:55, 29 March 2022 (UTC)
It is not installed.
And there is no Module namespace. The Transhumanist (talk) 12:33, 29 March 2022 (UTC)

How to correctly update MediaWiki to the latest version?

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.

This is the first time I'm going to update my MediaWiki software to the latest version. My current version of MediaWiki is 1.32.0

https://www.mediawiki.org/wiki/Manual:Upgrading

I know I need to backup my database and files. And according to what is stated in this manual this is how I should update MediaWiki. Anything else I need to remember? Monocero (talk) 09:08, 29 March 2022 (UTC)

Hi, is anything unclear with the docs? Malyacko (talk) 10:56, 29 March 2022 (UTC)
I think the present manual is a bit very big and I think it is a bit less comprehensible to me. But I think I did everything right looking at this tutorial, which seems easier to me.
https://www.hostknox.com/tutorials/mediawiki/upgrade
But unfortunately there was an error after updating. I asked for help on a new thread. Monocero (talk) 12:43, 29 March 2022 (UTC)
The mediawiki.org tutorial is written for a very large audience who all might have very differing setups and requirements. It's indeed not very easy to follow. —TheDJ (Not WMF) (talkcontribs) 14:14, 29 March 2022 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Enabling Visual Editor Citation Tool

I am trying to enable the Visual Editor Citation Tool following these instructions, without success. I spent hours trying to understand the procedure - a total waste of time.

I get stuck when I am asked to create a special configuration message on my wiki MediaWiki:Visualeditor-cite-tool-definition.json. How is one supposed to do it? I would really appreciate some plain, operational, step-by-step instructions for this specific purpose. Mccollough75 (talk) 11:06, 29 March 2022 (UTC)

Anyone with interface-administrator permissions should be able to create the file MediaWiki:Visualeditor-cite-tool-definition.json a file written in JSON syntaxTheDJ (Not WMF) (talkcontribs) 14:09, 29 March 2022 (UTC)
I understand btw that these steps are not simple for most people, but please understand that you are literally changing the interface of the website, generally not an operation that casual editors would do. —TheDJ (Not WMF) (talkcontribs) 14:10, 29 March 2022 (UTC)
Thanks TheDJ.
I am not a casual editor. I am the one who set up the infrastructure and I have interface-administrator permissions. But I am an amateur, just trying to learn the basics to run a school-limited wiki. Anyway, I finally managed to create the file MediaWiki:Visualeditor-cite-tool-definition.json and the user interface has been properly updated. This page solved my problem. Mccollough75 (talk) 17:48, 29 March 2022 (UTC)
Hi,
I'm also trying to set up a mediawiki installation. Even reviewing the system messages page didn't answer it for me. I know what the contents of the file should be. But, do I create it in a text editor and upload it to my server? Or, is it a page that I create through the wiki interface itself. Thanks for your help! 108.45.66.5 (talk) 15:48, 13 June 2022 (UTC)
Find an extension to use VisualEditor's citation tool. 105.105.173.95 (talk) 12:52, 14 June 2022 (UTC)

I got this error message when importing

Using importDump.php, this error message was displayed, and the script closed.

MWUnknownContentModelException from line 203 of /var/lib/mediawiki/includes/content/ContentHandlerFactory.php: The content model 'Scribunto' is not registered on this wiki.

What is a "content model".

And what does "not registered on this wiki" mean? The Transhumanist (talk) 12:50, 29 March 2022 (UTC)

A content model, is the type of content stored in the wiki. Scribunto is the extension which handles Lua modules, so it is saying that it is trying to import a Lua module and that your wiki cannot store those Lua/Scribunto modules. So the solution is to install Scribunto so that you can import Lua modules. —TheDJ (Not WMF) (talkcontribs) 14:06, 29 March 2022 (UTC)

Errors appeared after updating the wiki

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. Errors appeared after updating the wiki. After entering my wiki these errors are displayed:


MediaWiki internal error.

Original exception: [9be04f0f00c109019fd3721e] 2022-03-29 12:22:55: Fatal exception of type "UnexpectedValueException"


I entered this command into the LocalSettings.php file:


$wgShowExceptionDetails = true;


And from that help thread:


Extension talk:TinyMCE/2020#h-Error_after_installing?-2020-01-27T17:29:00.000Z


I entered the following command into LocalSettings.php:


error_reporting( -1 ); ini_set( 'display_errors', 1 );


And now such errors are showing up:


Warning: Use of undefined constant DB_SLAVE - assumed 'DB_SLAVE' (this will throw an Error in a future version of PHP) in /home/user/www/myadress.pl/wiki/extensions/TinyMCE/TinyMCE.hooks.php on line 409 MediaWiki internal error.


Original exception: [0158056dfd9ae061cb9e981f] /wiki/index.php/Strona_g%C5%82%C3%B3wna UnexpectedValueException: Invalid server index index #DB_SLAVE Backtrace: from /home/user/www/myadress.pl/wiki/includes/libs/rdbms/loadbalancer/LoadBalancer.php(517)

0 /home/user/www/myadress.pl/wiki/includes/libs/rdbms/loadbalancer/LoadBalancer.php(961): Wikimedia\Rdbms\LoadBalancer->getConnectionIndex(string, array, string)

1 /home/user/www/myadress.pl/wiki/includes/libs/rdbms/loadbalancer/LoadBalancer.php(1128): Wikimedia\Rdbms\LoadBalancer->getConnection(string, array, string, integer)

2 /home/user/www/myadress.pl/wiki/includes/GlobalFunctions.php(2229): Wikimedia\Rdbms\LoadBalancer->getMaintenanceConnectionRef(string, array, string)

3 /home/user/www/myadress.pl/wiki/extensions/TinyMCE/TinyMCE.hooks.php(409): wfGetDB(string)

4 /home/user/www/myadress.pl/wiki/extensions/TinyMCE/TinyMCE.hooks.php(358): TinyMCEHooks::enableTinyMCE(Title, RequestContext)

5 /home/user/www/myadress.pl/wiki/includes/HookContainer/HookContainer.php(338): TinyMCEHooks::changeRedLink(MediaWiki\Linker\LinkRenderer, Title, boolean, HtmlArmor, array, NULL)

6 /home/user/www/myadress.pl/wiki/includes/HookContainer/HookContainer.php(137): MediaWiki\HookContainer\HookContainer->callLegacyHook(string, array, array, array)

7 /home/user/www/myadress.pl/wiki/includes/HookContainer/HookRunner.php(2031): MediaWiki\HookContainer\HookContainer->run(string, array)

8 /home/user/www/myadress.pl/wiki/includes/linker/LinkRenderer.php(321): MediaWiki\HookContainer\HookRunner->onHtmlPageLinkRendererEnd(MediaWiki\Linker\LinkRenderer, Title, boolean, HtmlArmor, array, NULL)

9 /home/user/www/myadress.pl/wiki/includes/linker/LinkRenderer.php(306): MediaWiki\Linker\LinkRenderer->buildAElement(Title, HtmlArmor, array, boolean)

10 /home/user/www/myadress.pl/wiki/includes/parser/LinkHolderArray.php(289): MediaWiki\Linker\LinkRenderer->makeBrokenLink(Title, HtmlArmor, array, array)

11 /home/user/www/myadress.pl/wiki/includes/parser/LinkHolderArray.php(167): LinkHolderArray->replaceInternal(string)

12 /home/user/www/myadress.pl/wiki/includes/parser/Parser.php(5002): LinkHolderArray->replace(string)

13 /home/user/www/myadress.pl/wiki/includes/parser/Parser.php(1700): Parser->replaceLinkHoldersPrivate(string)

14 /home/user/www/myadress.pl/wiki/includes/parser/Parser.php(659): Parser->internalParseHalfParsed(string, boolean, boolean)

15 /home/user/www/myadress.pl/wiki/includes/content/WikitextContent.php(327): Parser->parse(string, Title, ParserOptions, boolean, boolean, integer)

16 /home/user/www/myadress.pl/wiki/includes/content/AbstractContent.php(548): WikitextContent->fillParserOutput(Title, integer, ParserOptions, boolean, ParserOutput)

17 /home/user/www/myadress.pl/wiki/includes/Revision/RenderedRevision.php(263): AbstractContent->getParserOutput(Title, integer, ParserOptions, boolean)

18 /home/user/www/myadress.pl/wiki/includes/Revision/RenderedRevision.php(235): MediaWiki\Revision\RenderedRevision->getSlotParserOutputUncached(WikitextContent, boolean)

19 /home/user/www/myadress.pl/wiki/includes/Revision/RevisionRenderer.php(217): MediaWiki\Revision\RenderedRevision->getSlotParserOutput(string, array)

20 /home/user/www/myadress.pl/wiki/includes/Revision/RevisionRenderer.php(154): MediaWiki\Revision\RevisionRenderer->combineSlotOutput(MediaWiki\Revision\RenderedRevision, array)

21 [internal function]: MediaWiki\Revision\RevisionRenderer->MediaWiki\Revision\{closure}(MediaWiki\Revision\RenderedRevision, array)

22 /home/user/www/myadress.pl/wiki/includes/Revision/RenderedRevision.php(197): call_user_func(Closure, MediaWiki\Revision\RenderedRevision, array)

23 /home/user/www/myadress.pl/wiki/includes/poolcounter/PoolWorkArticleView.php(137): MediaWiki\Revision\RenderedRevision->getRevisionParserOutput()

24 /home/user/www/myadress.pl/wiki/includes/poolcounter/PoolCounterWork.php(162): PoolWorkArticleView->doWork()

25 /home/user/www/myadress.pl/wiki/includes/page/ParserOutputAccess.php(281): PoolCounterWork->execute()

26 /home/user/www/myadress.pl/wiki/includes/page/Article.php(691): MediaWiki\Page\ParserOutputAccess->getParserOutput(WikiPage, ParserOptions, MediaWiki\Revision\RevisionStoreCacheRecord, integer)

27 /home/user/www/myadress.pl/wiki/includes/page/Article.php(506): Article->generateContentOutput(User, ParserOptions, integer, OutputPage, array)

28 /home/user/www/myadress.pl/wiki/includes/actions/ViewAction.php(80): Article->view()

29 /home/user/www/myadress.pl/wiki/includes/MediaWiki.php(543): ViewAction->show()

30 /home/user/www/myadress.pl/wiki/includes/MediaWiki.php(320): MediaWiki->performAction(Article, Title)

31 /home/user/www/myadress.pl/wiki/includes/MediaWiki.php(930): MediaWiki->performRequest()

32 /home/user/www/myadress.pl/wiki/includes/MediaWiki.php(564): MediaWiki->main()

33 /home/user/www/myadress.pl/wiki/index.php(53): MediaWiki->run()

34 /home/user/www/myadress.pl/wiki/index.php(46): wfIndexMain()

35 {main}


Exception caught inside exception handler: [0158056dfd9ae061cb9e981f] /wiki/index.php/Strona_g%C5%82%C3%B3wna Error: Call to undefined method Title::userCan() Backtrace: from /home/user/www/myadress.pl/wiki/extensions/TinyMCE/TinyMCEAction.php(57)


0 /home/user/www/myadress.pl/wiki/includes/HookContainer/HookContainer.php(338): TinyMCEAction::displayTab(SkinVector, array)

1 /home/user/www/myadress.pl/wiki/includes/HookContainer/HookContainer.php(137): MediaWiki\HookContainer\HookContainer->callLegacyHook(string, array, array, array)

2 /home/user/www/myadress.pl/wiki/includes/HookContainer/HookRunner.php(3492): MediaWiki\HookContainer\HookContainer->run(string, array, array)

3 /home/user/www/myadress.pl/wiki/includes/skins/SkinTemplate.php(1193): MediaWiki\HookContainer\HookRunner->onSkinTemplateNavigation(SkinVector, array)

4 /home/user/www/myadress.pl/wiki/skins/Vector/includes/SkinVector.php(300): SkinTemplate->runOnSkinTemplateNavigationHooks(SkinVector, array)

5 /home/user/www/myadress.pl/wiki/includes/skins/SkinTemplate.php(1528): SkinVector->runOnSkinTemplateNavigationHooks(SkinVector, array)

6 /home/user/www/myadress.pl/wiki/includes/skins/SkinTemplate.php(823): SkinTemplate->buildContentNavigationUrls()

7 /home/user/www/myadress.pl/wiki/includes/skins/SkinTemplate.php(288): SkinTemplate->getPortletsTemplateData()

8 /home/user/www/myadress.pl/wiki/includes/skins/SkinMustache.php(79): SkinTemplate->getTemplateData()

9 /home/user/www/myadress.pl/wiki/skins/Vector/includes/SkinVector.php(329): SkinMustache->getTemplateData()

10 /home/user/www/myadress.pl/wiki/includes/skins/SkinMustache.php(56): SkinVector->getTemplateData()

11 /home/user/www/myadress.pl/wiki/includes/skins/SkinTemplate.php(144): SkinMustache->generateHTML()

12 /home/user/www/myadress.pl/wiki/includes/OutputPage.php(2644): SkinTemplate->outputPage()

13 /home/user/www/myadress.pl/wiki/includes/exception/MWExceptionRenderer.php(158): OutputPage->output()

14 /home/user/www/myadress.pl/wiki/includes/exception/MWExceptionRenderer.php(77): MWExceptionRenderer::reportHTML(UnexpectedValueException)

15 /home/user/www/myadress.pl/wiki/includes/exception/MWExceptionHandler.php(107): MWExceptionRenderer::output(UnexpectedValueException, integer)

16 /home/user/www/myadress.pl/wiki/includes/exception/MWExceptionHandler.php(202): MWExceptionHandler::report(UnexpectedValueException)

17 /home/user/www/myadress.pl/wiki/includes/MediaWiki.php(583): MWExceptionHandle


I changed the address so that bots would not identify this address.


There was a problem with the TinyMCE editor, what should I do now to fix my wiki? Monocero (talk) 13:20, 29 March 2022 (UTC)

Disable TinyMCE and file a bug report with the developer of TinyMCE —TheDJ (Not WMF) (talkcontribs) 14:01, 29 March 2022 (UTC)
Actually, it seems this is already fixed in TinyMCE, so you probably just forgot to update TinyMCE
https://github.com/wikimedia/mediawiki-extensions-TinyMCE/commit/3cb997180f3db74fe90895d0163673e76a625850TheDJ (Not WMF) (talkcontribs) 14:03, 29 March 2022 (UTC)
Thank you for your help. I removed the older version of TinyMCE and uploaded the latest version to the server and now everything is ok.
Extension:TinyMCE Monocero (talk) 14:57, 29 March 2022 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Internal server error when attempting to edit pages

Product Version MediaWiki 1.32.0 PHP 7.4.15 (cgi-fcgi) MySQL 5.7.28-log ICU 60.2

https://wiki.efupw.com/

Over the last year or so we have been seeing an intermittent issue (intermittent between pages at least) whereby when a user tries to edit a page/save changes to an edited page, an Internal Server Error is thrown. That page then becomes unavailable for editing.

Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at webmaster@wiki.efupw.com to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log. 2A0C:B381:102:2000:C88E:692:C16B:DFE6 (talk) 14:41, 29 March 2022 (UTC)

Are there any relevant messages in your webserver's error log? If so, please post them. Rp (talk) 15:14, 29 March 2022 (UTC)

Adding a command to the LocalSettings file that will prevent some files from being uploaded

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 have a question regarding the implementation of file extensions that will not be allowed to be uploaded to the wiki.


In the file I entered the command what types of files can be uploaded:


$wgFileExtensions = array( 'png', 'gif', 'jpg', 'jpeg' );


Manual:$wgFileExtensions


But now I want to entered file types that will not be allowed to be uploaded.


/**

* Files with these extensions will never be allowed as uploads.

* An array of file extensions to blacklist. You should append to this array

* if you want to blacklist additional files.

*/

$wgFileBlacklist = [

# HTML may contain cookie-stealing JavaScript and web bugs

'html', 'htm', 'js', 'jsb', 'mhtml', 'mht', 'xhtml', 'xht',

# PHP scripts may execute arbitrary code on the server

'php', 'phtml', 'php3', 'php4', 'php5', 'phps', 'phar',

# Other types that may be interpreted by some servers

'shtml', 'jhtml', 'pl', 'py', 'cgi',

# May contain harmful executables for Windows victims

'exe', 'scr', 'dll', 'msi', 'vbs', 'bat', 'com', 'pif', 'cmd', 'vxd', 'cpl' ];


Manual:$wgFileBlacklist


And I don't quite understand this text:


"$wgFileBlacklist overrides $wgFileExtensions, so you must remove an extension from the blacklist before you can upload files that have it".


Should I remove this command:


$wgFileExtensions = array( 'png', 'gif', 'jpg', 'jpeg' );


or should I leave it and just add the $wgFileBlacklist code above to the file? Monocero (talk) 16:59, 29 March 2022 (UTC)

Yes, leave it and also add the $wgFileBlacklist array.
What the text you quote means is simply this: if you have 'png' in $wgFileExtensions (i.e allowed) and also the same 'png' appears in $wgFileBlacklist (i.e disallowed), then the latter case takes precedence; files with 'png' extension would be disallowed in spite of the fact that it is in $wgFileExtensions. – Ammarpad (talk) 06:40, 30 March 2022 (UTC)
I understand. Thanks for the clarification. Monocero (talk) 10:09, 30 March 2022 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

How to add flags?

Hi, I'm new to MediaWiki and I'm trying to add country flags to my main page.


Everytime I use:

"flagicon:xxxx" it doesn't work and "flag:xxxx" comes up as a red link to a blank template. I'm tried everything I possibly could to add in the template but I have no clue, can someone help me out please? 2A02:C7E:2CF:6000:C5B8:99B9:5428:7D2F (talk) 22:44, 29 March 2022 (UTC)

You have to create the Template on your wiki. See w:Template:Flagicon and w:Template:Flagicon/core for what is done on English Wikipedia. – Ammarpad (talk) 06:45, 30 March 2022 (UTC)
Hi, what do I copy on the blank template for Flagicon? That's the part which isn't working for me. 2A02:C7E:2CF:6000:B92E:4023:72E:282B (talk) 09:06, 30 March 2022 (UTC)
For example: if I use "flagicon:GBR"
on my main page it comes up as [[File:Flag of {{{GBR}}}.svg]] 2A02:C7E:2CF:6000:B92E:4023:72E:282B (talk) 09:08, 30 March 2022 (UTC)
If you just want to add some flags, just download the images and add them as images :-) Jonathan3 (talk) 22:16, 4 April 2022 (UTC)

Help with the Password Reset

Hello, I'm trying to reset my password for 2 days but i am not receiving the email of it, can someone help me?

Have a good day! 2804:431:CFC9:B713:B1AB:FF71:BB87:4568 (talk) 04:06, 30 March 2022 (UTC)

Please see "Post a new question" in the sidebar Malyacko (talk) 07:03, 30 March 2022 (UTC)

Authentification mail is missing

Hey I installed media wiki via my provider (all-inkl.com) all went good and I can login to my new media wiki - but I can´t set any settings.

It says that I first have to click in my authentification email - but I never got it.

And when I try to click on the button to resend it - it errors: you have to rights to do so.


So I am stucked how can I get this email or how can I authentificate? 2A05:7AC0:203:5600:9C46:F07A:44D5:A046 (talk) 08:12, 30 March 2022 (UTC)

Is there any chance to allow markdown in this support desk?

Is there any chance to allow markdown in this support desk?

I think that using Markdown in this support desk would be better than MediaWiki syntax because software problem-solution sessions are generally done in Markdown and it would be most comfortable for someone publishing here at least in the first time.


I think it will be more comfortable for me to format text here in Markdown.


I suggest to at least allow a user to choose between MediaWiki or Markdown for formatting posts here. 79.180.118.152 (talk) 10:09, 30 March 2022 (UTC)

That'll require a lot of work in the Parser behind MediaWiki and is unlikely to happen. See also https://phabricator.wikimedia.org/T137946 Malyacko (talk) 10:29, 30 March 2022 (UTC)
Most people who post here are more familiar with mediawiki syntax. And if not, i dont think formatting matters. Bawolff (talk) 03:40, 31 March 2022 (UTC)

Why am I blocked??

Hello,


I just wanted to login to "wiki.openstreetmaps" and it doesn't work. Now I want to know why? Which settings should be changed?

It's written: The IP-adress is in DNSBL of Openstreetmap wiki listed as open proxy.


With best regards,

Marie Marie8869 (talk) 15:02, 30 March 2022 (UTC)

wiki.openstreetmaps is an independent wiki and we know nothing about that. Please contact them in their support forum (if they have one) or search for contact information on that wiki. Ciencia Al Poder (talk) 15:06, 30 March 2022 (UTC)
Thanks. but its written that I got blocked by MEDIAWIKI automatically and not byOpenstreetmaps :-( Marie8869 (talk) 15:19, 30 March 2022 (UTC)
MediaWiki has tools to block users automatically. For example, there are extensions that allow to block a list of IP addresses used by known open proxies.
Try not using a proxy for editing that wiki. Ciencia Al Poder (talk) 16:11, 30 March 2022 (UTC)
The most popular dnsbl is https://www.spamhaus.org/ i dont know if they use it, but if they do, their website would have more info. Bawolff (talk) 03:39, 31 March 2022 (UTC)
@Marie8869: You could try asking on the OSM support forum at https://community.openstreetmap.org Sam Wilson 04:48, 31 March 2022 (UTC)

Help: Forms and Templates on new page

I am creating a wiki site and want all new pages to use the same format .

Essentially, the 'Name' at the top, 'Address' options underneath, and then a few other open text boxes under that, but all the same format each time, the subject is always a building in the same spot, but multiples of them around the country.


What is best extension or template and are there any examples to hand? Stevio Bee (talk) 04:18, 31 March 2022 (UTC)

Extension:Page Forms. Maybe also Extension:Cargo? Jonathan3 (talk) 22:12, 4 April 2022 (UTC)
I have both these installed, but for some reason cannot get it to work, I know I am being dumb, is there any resource or similar examples that anyone knows of? Stevio Bee (talk) 02:59, 27 April 2022 (UTC)
On a wiki, I've used Extension:InputBox so a user can just type the page title, and using the preload= option to just paste a general layout for the user. IAmChaos (talk) 10:04, 27 April 2022 (UTC)
Or you cold try Extension:MultiBoilerplate. Jonathan3 (talk) 12:34, 27 April 2022 (UTC)
I am still struggling to get this sorted, it sounds easier but I cannot get a few 'common' entry prompts to enable an address box and previous names for public houses.
You can see the installation here: pubsproject.com, if anyone has time to take a look I would be most grateful.
I am trying to have every new page created by the user, automatically insert a full address box with country, and then create a free text area for the pubs history and previous names if any exist.
Thank you in advance... Stevio Bee (talk) 22:24, 19 June 2022 (UTC)
I see you've installed Cargo and Page Forms.
You just need to decide what data structure you want (e.g. each pub will have a field for address, previous names etc) then create forms (for data entry) and templates (for displaying on each pub page) to implement that structure.
The manual pages at Extension:Cargo and Extension:Page Forms are comprehensive and the author regularly replies on the extension talk pages. Better to ask a specific question there than a general one here. Good luck. Jonathan3 (talk) 23:06, 19 June 2022 (UTC)

Time out of server respond error

Set cache settings to resolve the issue

Hi I use MW 1.37 and faced with the problem when saving a page with a lot of text in it. I receive a message that server cannot receive respond for long period of time, but saves the page and some times gives me 502 error and page is not saved.

I made a request to my hosting provider and they replied me following:

While saving the page, the api.php script connects to third-party resources at the IP address 91.198.174.192. Apparently, due to the transfer of a large amount of data over the network, this script takes a long time - more than 30 seconds. The script terminates and the indicated error occurs. Please contact mediawiki support to find out the reason of such error.

When I make new page or page with small amount of text then all works fine.

Any suggestions to resolve this issue? Fokebox (talk) 07:01, 31 March 2022 (UTC)

91.198.174.192 is a wikimedia ip address, so if i were to guess its probably its probably instant commons related (but could be something else)
Are you using a lot of images on the page with the instant commons feature? If so, you could try extension:QuickInstantCommons.
Do you have object caching installed & enabled? (E.g. redis, APCu or memcache, etc, with $wgMainCacheType set appropriately) - that can make a significant difference. Bawolff (talk) 13:21, 31 March 2022 (UTC)
Yes, I have few images from QuickInstantCommons and I try to make all you have suggested. Fokebox (talk) 13:28, 31 March 2022 (UTC)
The problem has been resolved. I haven't set any cache at Localsetting.php. All works fine after I have made following settings:
## Shared memory settings
$wgMainCacheType = CACHE_ANYTHING;
$wgMemCachedServers = [
  "127.0.0.1:11211", # one gig on this box
  [ "192.168.0.1:11211", 2 ] # two gigs on the other box
Fokebox (talk) 13:10, 1 April 2022 (UTC)
Fyi, if your intention is to use memcached, you should probably set $wgMainCacheType to CACHE_MEMCACHED. What CACHE_ANYTHING means depends on other settings, but most likely it means use mysql as a cache.
Regardless, glad you got it to work. Bawolff (talk) 03:42, 2 April 2022 (UTC)
I tried to have:
## Shared memory settings
$wgMainCacheType = CACHE_MEMCACHED;
$wgMemCachedServers = [
  "127.0.0.1:11211", # one gig on this box
  [ "192.168.0.1:11211", 2 ] # two gigs on the other box
But returned internal error. Have I made it right? Fokebox (talk) 09:57, 4 April 2022 (UTC)
What is the error? Is memcache properly running on those two servers? Bawolff (talk) 08:08, 5 April 2022 (UTC)

Hiding categories seems not to work

I've set the content of some categories to __HIDDENCAT__ but they still get listed in the Categories Special page (click to check on my Wiki)

The Preferences are set correctly from the Appearance tab, so why I still see them? DukeNukem7D (talk) 11:12, 31 March 2022 (UTC)

Categories are only hidden from normal pages, not from special pages. Ciencia Al Poder (talk) 11:25, 31 March 2022 (UTC)
But so how can I see the list of categories which are not created by a template? I mean categories which have been created by a user. DukeNukem7D (talk) 12:10, 31 March 2022 (UTC)
There's no such functionality.
Categories is a special markup on the page. They're interpreted as such after all templates are expanded. MediaWiki doesn't know if they come from templates or because a user added them directly on a page. Ciencia Al Poder (talk) 12:43, 31 March 2022 (UTC)

Problems Loading Filters on Recent Changes Page

Hi everyone,

I'm testing an upgrade from MediaWiki 1.29 to 1.35 at the moment. I'm having a bit of a problem with the 'Recent Changes' page following the upgrade. The new filter control at the top of the page doesn't load.

I'm getting an error in the browser console like: "SessionManager.php: Sessions are disabled for this entry point".

At first I wasn't sure if it was related because I'm seeing that when loading every page in the site. It still might be, however - I found this line in the debug log:

[resourceloader] Calculating version for "mediawiki.rcfilters.filters.ui" failed: [Exception BadMethodCallException( ... SessionManager.php:848) Sessions are disabled for this entry point]

Has anyone else encountered any similar problems at all?


Thanks

Darren Dshinks (talk) 13:49, 31 March 2022 (UTC)

Usually this means you have an extension not compatible with your version of mw Bawolff (talk) 19:22, 31 March 2022 (UTC)
Update on this one,
I managed to isolate it to some config we added to our LocalSettings file. A very similar situation to the question that was asked/answered here:
https://www.mediawiki.org/w/index.php?title=Project%3ASupport%20desk/Flow/2020/01#c-Bawolff-2020-01-29T23%3A23%3A00.000Z-83.130.65.121-2020-01-29T21%3A26%3A00.000Z
Bawolff, applying the fix you you suggested there did the trick, it looks like. Just need to understand it better, and do some further testing on it!
Thanks v much! :) Dshinks (talk) 15:45, 1 April 2022 (UTC)
Thanks Bawolff.
I've not got any additional extensions installed on this instance - it's just a vanilla install of mw1.35. Dshinks (talk) 08:07, 1 April 2022 (UTC)

Ever increasing refreshLinksPrioritized jobs

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.


For some days we've been having trouble with ever increasing job queues. First the problem was with CirrusSearch jobs, but now those are gone and instead we have ever increasing refreshLinksPrioritized jobs. They all are immediately claimed but none seems to complete (they go abandoned after 3 tries). When I run showJobs.php --list they all seem almost identical, they all link to the main page, all report causeAction=unknown, causeAgent=unknown and isOpportunistic=1 (whatever that may mean). I rebooted the server several times and a few minutes ago I manually emptied the jobs table in the database but they continue to appear. What could be causing them?? And more importantly how do I stop them?? Thanks for any clues or ideas! Sophivorus (talk) 20:46, 31 March 2022 (UTC)

It seems the problem was SemanticMediaWiki. I disabled it and the job rush stopped. I then re-enabled it and it didn't return. Sophivorus (talk) 21:46, 31 March 2022 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.
Category:Support desk archives Category:Support desk archives with broken file links Category:Support desk archives with syntax highlighting errors