Jump to content

Project:Support desk/Flow/2022/11

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

New Pages

How can I know how many pages were created in the last year ? 134.191.195.252 (talk) 09:03, 1 November 2022 (UTC)

I've never used it but this looks good:
Extension:ExtendedStatistics Jonathan3 (talk) 11:49, 1 November 2022 (UTC)

"Main Page" won't open (PHP error?), all other pages do. Help!

The Poem extension stopped working, so I re-added it. Then Main Page stopped working, with it saying it couldn't open MultiCategorySearch.php. Tried undoing things, but error persists. Oddly, all other pages open fine. Error message as follows:


Fatal error: require_once(): Failed opening required '/home/customer/www/<domain redacted>/public_html/extensions/MultiCategorySearch/MultiCategorySearch.php' (include_path='/home/customer/www/<domain redacted>/public_html/vendor/pear/console_getopt:/home/customer/www/<domain redacted>/public_html/vendor/pear/mail:/home/customer/www/<domain redacted>/public_html/vendor/pear/mail_mime:/home/customer/www/<domain redacted>/public_html/vendor/pear/net_smtp:/home/customer/www/<domain redacted>/public_html/vendor/pear/net_socket:/home/customer/www/<domain redacted>/public_html/vendor/pear/net_url2:/home/customer/www/<domain redacted>/public_html/vendor/pear/pear-core-minimal/src:/home/customer/www/<domain redacted>/public_html/vendor/pear/pear_exception:.:/usr/local/php74/pear') in /home/customer/www/<domain redacted>/public_html/LocalSettings.php on line 155


What's really strange is the reference to MultiCategorySearch.php as I had previously removed it once before (because it didn't work). I've just now tried adding a fake, empty MultiCategorySearch.php file, but that didn't work. I cannot seem to find anything else that references MultiCategorySearch.php (though I cannot find a way to search through file contents).


Should I just try nuking the entire site and copying and pasting every page back afresh? (This will take me days) 8420 De Haan (talk) 12:01, 1 November 2022 (UTC)

If other pages open fine, it sounds like you might be experiencing some sort of caching issue with your host. Do you have some sort of html accelerator, CDN or frontend cache enabled (e.g. varnish, cloudflare, cloudfront, etc)? Bawolff (talk) 17:42, 2 November 2022 (UTC)

Where are image files stored?

Question as above. I have been hunting through various folders under the "images" folder but most seem to be empty. Are they simply stored inside the database then? How would I retrieve them? 8420 De Haan (talk) 13:52, 1 November 2022 (UTC)

they are stored in the filesystem (some extensions exist to change that so it depends on if you have those installed). Generally the scheme is take the md5 of the filename (not the file itself, just its name), then the first digit is the first folder and the first 2 are the second.
For example, the md5 of Example.png is 701dd924c073ab9e931a69b78d077bd3 [1] so it would be stored under images/7/70 Bawolff (talk) 21:11, 1 November 2022 (UTC)

MediaWiki 1.39 Search options

Currently I'm using Solr search but I was notified that the newest MediaWiki version would not support Solr search anymore, I was wondering if that was the case, and if so, would migrating to ElasticSearch be better, since it is a lot of work I'd rather stay with Solr, just wanted to check if it is going to be supported or not. Georgejobran (talk) 14:52, 1 November 2022 (UTC)

Ask for user's agreement before displaying external content?

Howdy,


is there an extension, or another easy solution, which allows to check for user's agreement before (!) showing external contents, e.g. images from external urls or Youtube videos? This needs to happen before the transcluded content is shown, before the user's browser establishes connection to the other site (GDPR issue).


Thanks in advance for any valuable hint ... 2003:C2:3F38:1A00:6077:428E:381D:7FBA (talk) 18:53, 1 November 2022 (UTC)

How to have a user read and agree to a set of rules before creating an account

Not too long ago, I had this question, which was answered by Bawolff. I have since changed my mind on how to allow users to edit on my wiki. I have now decided that instead of making it a whole separate process, I would like to make it easier by trying to make it part of the sign up process that would allow a user to edit. Bawolff told me that there is a way to incorporate a second page into the sign up process, and that he thinks there's some extensions that can do this, but didn't specify. I tried searching around for any such but couldn't find anything. Therefore I wanted to ask if anyone knew any extensions or methods of achieving this goal? Thanks Guillaume Taillefer (talk) 00:01, 2 November 2022 (UTC)

I cant find the one i was thinking of. There are some other ones like Extension:LegalLogin Bawolff (talk) 04:14, 2 November 2022 (UTC)
That might be it I'll have to try it thanks Guillaume Taillefer (talk) 11:19, 2 November 2022 (UTC)

fix template Template:neutral

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.


Template:neutral uses switch and never translates see =>Template talk:Neutral#h-Template_problem_:_'Neutral'_is_never_translated-20221101113700 . Can someone have a look ?  ; few lines only, should be easy to fix. Compare to Template:oppose which works. Thanks.

Christian 🇫🇷 FR (talk) 08:42, 2 November 2022 (UTC)

... jumping into Template: ! seems operational now.
Christian 🇫🇷 FR (talk) 13:52, 2 November 2022 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

There is currently no text in this page - strange things

Hi all,


I'm using mediawiki for +15 years. Sometimes you need newer versions.

After the hosting-installatron updates (start with 1.31.1) of mediawiki, my wiki became "corrupt".

Issue: There is currently no text in this page

Editing page does not work, cause page exists in DB. Also in the text table.

New pages creating goes fine. Putting backup back (v 1.31.1) gives the same issue (that's my strange point). It takes a lot time for me to find apossible issue. Not found yet (for sure I did place also more and older backups - same issue).

I decided to create fresh install (installatron) version 1.38.4

And putted an upgraded DB below.

For new pages everything works fine. The old existing pages which are "There is currently..." aren't available and do have the same issue as earlier (when I putted the backup back). So, the version does not affect issue (it's still same findings)

When I try to edit this page (same as earlier also), the next message becomes:

The revision #0 of the page named "IToon" does not exist.

This is usually caused by following an outdated history link to a page that has been deleted. Details can be found in the deletion log

I hope someone recognize this problem and give me an hint to tix. Thanks in advance Stephankk (talk) 14:36, 2 November 2022 (UTC)

I think most likely an issue with the actor table migration. Does manual:CleanupUsersWithNoId.php help? Bawolff (talk) 17:37, 2 November 2022 (UTC)
Thanks for your hint. Issue still there.
Also runned: attachLatest.php, findMissingActors.php, findAnomalies.php, migrateActors.php But no results.
Futher analysis: the revisionXX tables are not filled in. New created page they do.
So I tried creating records in the tables of an old existing page.
Just for checking if I can fix the problem with sql update queries.
Now, the correspondending old test page gives after refresh in the browser the message: Main slot of revision not found in database. See T212428. https://phabricator.wikimedia.org/T212428
I don't know if it gives more insight in my problem, but this are some findings..
Table revision_comment_temp , field revcomment_comment_id giving high number, issue still issue.
So I think it should be possible to make with good sql the old pages available, based on table page and table text (perhaps some more). Or do I miss something? Stephankk (talk) 23:45, 2 November 2022 (UTC)
that's probably from manually filling in some of the tables but not others. The error is essentially telling you there are referential integrity issues.
Generally i would reccomend not trying to manually adjust the database but use the updater script where possible. Bawolff (talk) 01:26, 3 November 2022 (UTC)
Yes they were for sure.
Problem found. The intallatron backup mechanism of the hosting skipped some tables.
So, manually import script and no modifications. And now it works. thanks again for help! Stephankk (talk) 22:33, 3 November 2022 (UTC)

(Cannot access the database)

we have an instance of mediawiki running on another server of an older ver. I have created a new VM (linux) running a newer ver of mediawiki (1.37.6) with nginx and php 7.3. The database is located on a remote host which I can access via CLI using the same credentials I have set in the LocalSettings.php file. When I enter the web address in my local machine browser I get the following. Any ideas as to what may be causing this would be great. As stated previously I am able to log into the DB server remotely using the same credentials as the mediawiki config file. Thank you.

Sorry! This site is experiencing technical difficulties.

Try waiting a few minutes and reloading.

(Cannot access the database)

Backtrace:

#0 /var/www/mediawiki/includes/libs/rdbms/loadbalancer/LoadBalancer.php(991): Wikimedia\Rdbms\LoadBalancer->reportConnectionError()
#1 /var/www/mediawiki/includes/libs/rdbms/loadbalancer/LoadBalancer.php(963): Wikimedia\Rdbms\LoadBalancer->getServerConnection(0, 'drwiki3', 0)
#2 /var/www/mediawiki/includes/libs/rdbms/loadbalancer/LoadBalancer.php(1096): Wikimedia\Rdbms\LoadBalancer->getConnection(-1, Array, 'drwiki3', 0)
#3 /var/www/mediawiki/includes/cache/LinkCache.php(501): Wikimedia\Rdbms\LoadBalancer->getConnectionRef(-1)
#4 /var/www/mediawiki/includes/cache/LinkCache.php(535): LinkCache->getGoodLinkRowInternal(Object(TitleValue), Array, 0)
#5 /var/www/mediawiki/includes/cache/LinkCache.php(430): LinkCache->getGoodLinkRow(0, 'Main_Page', Array, 0)
#6 /var/www/mediawiki/includes/Title.php(2921): LinkCache->addLinkObj(Object(Title))
#7 /var/www/mediawiki/includes/Title.php(1103): Title->getArticleID(0)
#8 /var/www/mediawiki/includes/MediaWiki.php(434): Title->getContentModel()
#9 /var/www/mediawiki/includes/MediaWiki.php(318): MediaWiki->initializeArticle()
#10 /var/www/mediawiki/includes/MediaWiki.php(932): MediaWiki->performRequest()
#11 /var/www/mediawiki/includes/MediaWiki.php(563): MediaWiki->main()
#12 /var/www/mediawiki/index.php(53): MediaWiki->run()
#13 /var/www/mediawiki/index.php(46): wfIndexMain()
#14 {main} James58122 (talk) 18:54, 2 November 2022 (UTC)

HTML Code or Pg in Editor

Sorry - total noob here


How can I include an external HTML page on the wiki page - what do I use in editor


As a preferred alternative - how can I add CSS and HTML code directly to a new wiki page? 45.37.52.14 (talk) 20:55, 2 November 2022 (UTC)

OHH - this is latest 1.38v w/ vector 22 skin 45.37.52.14 (talk) 20:56, 2 November 2022 (UTC)
Some html and css can be included in wikitext just normally (using the source editor).
For more complex html see manual:$wgRawHtml byt there are risks to that. Bawolff (talk) 21:17, 2 November 2022 (UTC)
That was it! Sry 1 more question...
I've successfully added html and css :). BUT... the css only works when it's embedded on the page - if I try to use something like:
<link rel="stylesheet" href="/html3/assets/css/app.css">
where html3 includes all the assets for the code I am adding - it doesn't load the CSS
Is there a better way? 45.37.52.14 (talk) 22:30, 2 November 2022 (UTC)
now registered DLl314 (talk) 22:33, 2 November 2022 (UTC)
nvrmnd - I found it in MediaWiki:Common.css DLl314 (talk) 00:04, 3 November 2022 (UTC)
You can put CSS in the MediaWiki:Common.css page. See Manual:CSS. Jonathan3 (talk) 00:11, 3 November 2022 (UTC)

OpenBSD 7.2 Media wiki installation with nginx

Hello I was wondering if there was anyone who set up media wiki with openbsd 7.2 and nginx. I would really like some assistance as after all my work I was unable to get anything working. 92.232.147.196 (talk) 22:19, 2 November 2022 (UTC)

if you explain the problems you encountered, someone might be able to help you. Its unlikely anyone will help with a question this generic. Bawolff (talk) 01:23, 3 November 2022 (UTC)

Trouble with Tabs

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


So, today I wrote this article, which uses an infobox that contains tabbed images.

My first problem is that despite setting the images to the same resolution, because they are all different aspect ratios, these cause the infobox to "jump" up and down depending on the image selected. I would like to know if it's possible to make the bottom of the image "ghost out" beyond a certain number of pixels so that the infobox stays static.

I'm not sure if this is simply a limitation with the way I have implemented tabs in my version of MediaWiki, or something I'm doing wrong, but whenever you load a page that has a tabbed infobox, for about a second (maybe less), you can see all of the tabbed images at the same time before it collapses.

Are there any fixes for these problems? AlexGRFan97 (talk) 22:44, 2 November 2022 (UTC)

The first question is probably something you can change with CSS in MediaWiki:Common.css (here's something from an internet search which might or might not work! https://stackoverflow.com/questions/19744396/how-to-show-only-the-top-portion-of-an-image-with-css)
With the second question, I'm going to guess that it's just the way the tabs extension works. Though now I've had a look at the extension page it says "independence from JavaScript results in having no flash of unstyled content when the page loads", so I don't know. Jonathan3 (talk) 00:09, 3 November 2022 (UTC)
note, instead of setting image width you can set height by using syntax [[File:Example.png|x100px]]
For flash of unstyled content. Maybe you could use inline display: none styles, that might load instantly before the main css (not sure) Bawolff (talk) 01:22, 3 November 2022 (UTC)
The extension seems to put its CSS directly onto the web page in a style tag: https://github.com/wikimedia/mediawiki-extensions-Tabs/blob/master/includes/Tabs.php#L398
I think MediaWiki can preload CSS etc (I'm not sure). So maybe the extension's styles, on the page itself, are being used too late in the day. Do you think maybe adding something like
body:not(oldbrowser) .tabs-content {
    display: none;
}
to MediaWiki:Common.css would load earlier than the extension's CSS (as Bawolff suggested is necessary)? Maybe the "body:not(oldbrowser)" part is a red herring but I saw it in the browser console. Jonathan3 (talk) 12:54, 3 November 2022 (UTC)
I could definitely try it. I sort of suspected that it had something to do with the way the Tab extension worked, owing to its age and the fact this doesn't happen with other collapsible elements I've placed into infoboxes.
There seems to be a lot of extensions that are just way beyond deprecation but are still used either out of habit or the fact alternatives don't really exist, even now.
Thanks for the help so far! AlexGRFan97 (talk) 16:07, 3 November 2022 (UTC)
> I think MediaWiki can preload CSS etc (I'm not sure)
Yeah, normal way would be to use addModuleStyles() with resource loader which i think would prevent this issue.
Although i thought inline style tags were instant as well as long as they come early enough in the page. Bawolff (talk) 21:34, 3 November 2022 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Wiktionary API for commercial use

Can wiktionary api be used in a commerical application 122.174.255.227 (talk) 12:49, 3 November 2022 (UTC)

Yes. See API:Etiquette Bawolff (talk) 18:14, 3 November 2022 (UTC)

Search Bar in WikiText Area

Is it possible to add the Wiki Search bar inside the wikitet area? eg - creating a help page and want to set a search bar on that page with namespace help defaulted.


1.38

vector DLl314 (talk) 18:36, 3 November 2022 (UTC)

Use extension:InputBox Bawolff (talk) 19:11, 3 November 2022 (UTC)

I just installed media wiki and the website is completly broken

Software Used:

Nginx 1.18.0, php8.1 with fpm (fast-cgi) and mariadb 15.1


The website is broken, showing a simple times new roman font with no format or style in the page 186.80.28.66 (talk) 20:48, 3 November 2022 (UTC)

Update: found this in the console.
Failed to load resource: the server responded with a status of 502 (Bad Gateway) load.php:1 186.80.28.66 (talk) 21:30, 3 November 2022 (UTC)
Probably an nginx config issue. Is load.php being forwarded to php-fpm? Bawolff (talk) 21:32, 3 November 2022 (UTC)
I have no idea, Im using this config provided by nginx, Since I cannot send links here you can search something like MediaWiki - NGINX 186.80.28.66 (talk) 22:18, 3 November 2022 (UTC)
location ~ \.php$ {
        include fastcgi_params;
        fastcgi_pass unix:/var/run/php/php8.1-fpm.sock;
        fastcgi_param SCRIPT_FILENAME $request_filename;
    }
This is basically what I have for php-fpm 186.80.28.66 (talk) 22:59, 3 November 2022 (UTC)
The error is when it tries to load load.php?lang=es&modules=ext.visualEditor.desktopArticleTarget.noscript%7Cmediawiki.action.styles%7Cmediawiki.interface.helpers.styles%7Cskins.monobook.styles&only=styles&skin=monobook now 186.80.28.66 (talk) 23:38, 3 November 2022 (UTC)
Solved, nginx config buffer for fastcgi was too small 186.80.28.66 (talk) 00:04, 4 November 2022 (UTC)

UploadWizard: Invalid chunk offset

Recently I was trying to test out the limits of UploadWizard on my Wiki (in particular how big of files I could upload), because I don't exactly know what its limits are. The reason is that in LocalSettings.php, I have $wgMaxUploadSize = 1024*1024*1024*10; for 10GB. However in my php.ini I have upload_max_filesize, post_max_size, and memory_limit all set to 1024M (M for megabytes I presume) which seems to me that it would only allow up to 1GB, however I tried uploading a pdf file that was 1.26 GB big, which went through, then I tried a 2.49 GB pdf file as well, which went through, and then when I tried uploading a 5.87 GB pdf file, it took around 45 mins to get through, but then stopped the download, which then gave the "Invalid chunk offset" error. I suspect that this has something to do with my settings, but given from my perspective how that doesn't make they don't make much sense with what was allowed, maybe it is that or its something else. Thanks

Update: I just tried uploading a 4.62 GB .MOV video and it came with the same error Guillaume Taillefer (talk) 22:37, 3 November 2022 (UTC)

So, i think there is an overall 4gb limit to chunked upload (which uploadwizard uses).
The normal upload limits (in php.ini et al) apply to normal upliads via Special:upload. ChunkedUpload splits uploads into multiple chunks so the limit applies to each chunk instead of the whole file. Bawolff (talk) 00:21, 4 November 2022 (UTC)
So how should I go about fixing this? Guillaume Taillefer (talk) 00:49, 4 November 2022 (UTC)
There is nothing really you can do.
See also https://phabricator.wikimedia.org/T191802 Bawolff (talk) 07:17, 4 November 2022 (UTC)
So I had tried to upload those bigger files through Special:Upload and the problem that I'm getting now (even though its allowing 10Gb), is it is giving me a 502 Bad Gateway message in response after a while. I'm pretty sure that this is a Bluehost and server issue so I'm going to contact them about it, but I wanted to also make sure this isn't a MediaWiki issue whatsoever either. Guillaume Taillefer (talk) 18:49, 5 November 2022 (UTC)
Mediawiki wont internally accept any files bigger than 4gb. The 502 failure is probably just happening before that step.
Most webserver setups start to get a bit unreliable after 100mb upload sizes, so while the 502 is a bluehost issue, most hosts would probably have some sort of issue with 10gb upload. Bawolff (talk) 20:23, 5 November 2022 (UTC)
Thats unfortunate, I'm trying to upload interviews and pdfs that could be potentially gigabytes big (although for the time being this might be somewhat rare). Hopefully Bluehost can figure something out for me. Otherwise I'm probably going to have people post big files like that to archive.org and just cite the link on there. Guillaume Taillefer (talk) 20:32, 5 November 2022 (UTC)

Can't get WikibaseImport to work

I am trying to create a local instance of Wikidata. MediaWiki 1.38.4 and Wikibase work fine, but WikibaseImport extension either breaks everything, or simply doesn't work.

There are two github repositories for this extenstion.

If I use

git clone https://github.com/filbertkm/WikibaseImport.git

to obtain it as stated in README files of both repositories and run

composer update in root mediawiki directory, I get this error:

C:\xampp\htdocs\w>composer update
> ComposerHookHandler::onPreUpdate
Loading composer repositories with package information
Info from https://repo.packagist.org: #StandWithUkraine
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
  Problem 1
    - Root composer.json requires monolog/monolog 2.2.0, ~1.18, found monolog/monolog[dev-main, 1.0.0-RC1, ..., 1.x-dev, 2.0.0-beta1, ..., 2.x-dev, 3.0.0-RC1, ..., 3.x-dev (alias of dev-main)] but it does not match the constraint.
  Problem 2
    - Root composer.json requires wikimedia/shellbox 3.0.0 -> satisfiable by wikimedia/shellbox[3.0.0].
    - wikimedia/shellbox 3.0.0 requires monolog/monolog ^2.0.0 -> found monolog/monolog[2.0.0, ..., 2.8.0] but it conflicts with your root composer.json require (2.2.0, ~1.18).


Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.

If I'm not mistaken, this kind of errors composer produces when MediaWiki and extension versions are incompatible.

If I use

git clone https://github.com/Wikidata/WikibaseImport.git

despite of instructions, composer install and composer update in root dir work fine.

But extension itself still doesn't work:

C:\xampp\htdocs\w>php extensions\WikibaseImport\maintenance\importEntities.php --all-properties
[3ae1833bcb4dd901e414d4ce] [no req]   Error: Call to undefined method Wikibase\Repo\WikibaseRepo::getDefaultInstance()
Backtrace:
from C:\xampp\htdocs\w\extensions\WikibaseImport\maintenance\importEntities.php(112)
#0 C:\xampp\htdocs\w\extensions\WikibaseImport\maintenance\importEntities.php(51): Wikibase\Import\Maintenance\ImportEntities->newEntityIdListBuilderFactory()
#1 C:\xampp\htdocs\w\maintenance\doMaintenance.php(114): Wikibase\Import\Maintenance\ImportEntities->execute()
#2 C:\xampp\htdocs\w\extensions\WikibaseImport\maintenance\importEntities.php(133): require_once(string)
#3 {main} 

README's in extension's githubs tell I should run composer update in /WikibaseImport/ directory, but this thread and this topic state it shouldn't be done, or root/maintenance/update.php will stop working. If I run composer update in /WikibaseImport/ anyway, update.php indeed stops working:

php C:\xampp\htdocs\w\maintenance\update.php
PHP Fatal error:  Wikibase\DataModel\Entity\SerializableEntityId cannot implement Wikibase\DataModel\Entity\EntityId - it is not an interface in C:\xampp\htdocs\w\extensions\Wikibase\lib\packages\wikibase\data-model\src\Entity\SerializableEntityId.php on line 11
Fatal error: Wikibase\DataModel\Entity\SerializableEntityId cannot implement Wikibase\DataModel\Entity\EntityId - it is not an interface in C:\xampp\htdocs\w\extensions\Wikibase\lib\packages\wikibase\data-model\src\Entity\SerializableEntityId.php on line 11

importEntities.php fails with the same output, and instead of pages of MediaWiki in browser there is a "not an interface" Fatal Error message. composer install , composer update and del /s composer.lock in different combinations have no effect - still "not an interface", until I will delete /vendor/ directories in extensions as stated in thread and topic I've mentioned earlier. But deleting them doesn't make WikibaseImport to work.

Please help. I am using MediaWiki 1.38.4, PHP 8.1.10 (apache2handler) and 10.4.25-MariaDB

I've cloned Wikibase from this github branch and followed instructions in it's README file and as stated here - Wikibase/Installation - I have added this to my LocalSettings.php :

# Wikibase
wfLoadExtension( 'WikibaseRepository', "$IP/extensions/Wikibase/extension-repo.json" );
require_once "$IP/extensions/Wikibase/repo/ExampleSettings.php";
wfLoadExtension( 'WikibaseClient', "$IP/extensions/Wikibase/extension-client.json" );
require_once "$IP/extensions/Wikibase/client/ExampleSettings.php";

# WikibaseImport
wfLoadExtension( 'WikibaseImport' );

and executed git submodule update --init in /Wikibase/ directory.

My w/composer.local.json contains wildcards by default (StackOverflow):

"extensions/*/composer.json",
"skins/*/composer.json" [[User:Podbrushkin|Podbrushkin]] ([[User talk:Podbrushkin|talk]]) 08:13, 4 November 2022 (UTC)

== How to install Wikidiff2 on Windows ==

Please explain how to install [[Wikidiff2]] on Windows (XAMPP).

There is an equivalent question on the [[Talk:Wikidiff2#Windows|discussion page]] for that page, but it has not been answered. [[Special:Contributions/240B:11:2301:FE00:E1AB:4926:B173:F7DA|240B:11:2301:FE00:E1AB:4926:B173:F7DA]] ([[User talk:240B:11:2301:FE00:E1AB:4926:B173:F7DA|talk]]) 09:16, 4 November 2022 (UTC)
:So first off, this will be a lot easier under linux. You should consider using linux.
:On windows you will have to compile it from source (i dont know if anyone has actually tested this on windows). See the manually section of the doc. If you have never done that before you should read a tutorial on compiling php extensions on windows.
:I strongly reccomend just using linux if you need wikidiff2. [[User:Bawolff|Bawolff]] ([[User talk:Bawolff|talk]]) 02:56, 5 November 2022 (UTC)
:Is there a site where I can download the dll for Wikidiff2.
:The .so file compiled on linux (virtual machine) could not be used on windows.
:It is not easy to change the operating system installed on a server. [[Special:Contributions/240B:11:2301:FE00:884E:5FCE:3F9F:AC7B|240B:11:2301:FE00:884E:5FCE:3F9F:AC7B]] ([[User talk:240B:11:2301:FE00:884E:5FCE:3F9F:AC7B|talk]]) 07:31, 5 November 2022 (UTC)
:I am not aware of any precompiled .dll of wikidiff for windows.
:> The .so file compiled on linux (virtual machine) could not be used on windows.
:You have to compile on windows to use on windows (in theory you might be able to cross compile on linux by specifying different compile time options, but that is probably more complicated than compiling on windows) [[User:Bawolff|Bawolff]] ([[User talk:Bawolff|talk]]) 08:22, 5 November 2022 (UTC)

== chmod cannot access files via terminal ==

Whenever I try to run chmod a+x wiki.allan.network/extensions/Scribunto/includes/Engines/LuaStandalone/binaries/lua5_1_5_linux_64_generic/lua it always says that the file was not found. [[Special:Contributions/213.237.94.6|213.237.94.6]] ([[User talk:213.237.94.6|talk]]) 16:03, 4 November 2022 (UTC)
:Maybe use cd to get to the lua5_1_5_linux_64_generic directory then just chmod a+x lua [[User:Jonathan3|Jonathan3]] ([[User talk:Jonathan3|talk]]) 19:19, 4 November 2022 (UTC)

== Upload file error after installation with bitnami ==

I have installed mediawiki with Bitnami, but when I uploaded file using Special:Upload page, it showed the error:

Could not open lock file for "mwstore://local-backend/local-public/b/be/Logohq.png". Make sure your upload directory is configured correctly and your web server has permission to write to that directory. 

How to fix this error? [[Special:Contributions/102.47.67.141|102.47.67.141]] ([[User talk:102.47.67.141|talk]]) 19:16, 4 November 2022 (UTC)
:Did you make sure "your web server has permission to write to that directory" as the error suggested? [[User:Bawolff|Bawolff]] ([[User talk:Bawolff|talk]]) 02:45, 5 November 2022 (UTC)
:Do you know how to know if the web server has permission to write to that directory? And how to change the permission to allow it? [[Special:Contributions/102.47.67.141|102.47.67.141]] ([[User talk:102.47.67.141|talk]]) 10:54, 5 November 2022 (UTC)
:It would depend on how your server is configured and what operating system it is using. If you are using linux you can use the chmod and chown command to adjust file system permissions.
:There's some information at [[Manual:Configuring file uploads]] but you would probably be better served by your operating system's documentation. [[User:Bawolff|Bawolff]] ([[User talk:Bawolff|talk]]) 11:45, 5 November 2022 (UTC)

== Editing own content on discussion pages here ==

It seems that I cannot edit the content here once saved:

Next to the title, I'm getting "Edit title" pointing to "..." next to the thread title, but the "..." offers a Permalink only.

So how to edit my own text after saving ? [[Special:Contributions/5.147.163.199|5.147.163.199]] ([[User talk:5.147.163.199|talk]]) 13:22, 5 November 2022 (UTC)
:I meant the "..." next to the content offers a Permalink only. [[Special:Contributions/5.147.163.199|5.147.163.199]] ([[User talk:5.147.163.199|talk]]) 13:29, 5 November 2022 (UTC)
:Anonymous (IP) authors cannot do so. You need to login to edit your own comments. [[User:Clump|Clump]] ([[User talk:Clump|talk]]) 13:53, 5 November 2022 (UTC)
:Thank you. [[Special:Contributions/5.147.163.199|5.147.163.199]] ([[User talk:5.147.163.199|talk]]) 23:59, 12 November 2022 (UTC)

== Editing search results' "Content pages" bar ==

MW 1.31. After running a search a bar appears on top with

'''Content pages''' Multimedia Everything Advanced

and each one of the 3 items linked for more specific site searches. Now, I would like to adapt '''Content pages''' so that it looks like the one below (providing an option to search the query on Google). I tried editing MediaWiki:Searchprofile-articles which contains the '''Content pages''' string as below but it was not parsed.<pre>
Look up on [https://www.google.com/search?q={{urlencode:$1}} Google] | Content pages

Spiros71 (talk) 15:21, 5 November 2022 (UTC)

How to create a list/category/page with wikipedia data?

Hello,

I would like to filter data from some pages to create a chronological list.


Example: https://en.wikipedia.org/wiki/Should_I_Stay_or_Should_I_Go

You can find the release date on the box, which contains day(sometimes), month(usually) and year.

There is already a category for music by date: https://en.wikipedia.org/wiki/Category:Music_by_date

wich contains singles by date, and that one contains singles by year:

https://en.wikipedia.org/wiki/Category:Singles_by_year


What I want is to create one which stacks it by release month and another by release day.


I have never collabed before, so I know very little about it. 87.196.80.45 (talk) 20:48, 5 November 2022 (UTC)

I think maybe sparql would be what you are looking for, but the learning curve is a bit steep: https://w.wiki/5v2M - https://w.wiki/5v4N Bawolff (talk) 02:42, 6 November 2022 (UTC)
Thanks.
I tried it and found Wikidata Query Builder:
5v3G (I can't paste the total link because there is a linkspam warning).
The results show nothing found.
I have tried several different inputs for the commons category:
"Category:Singles (music)"
"Category:Singles"
"Singles (music)"
"Singles"
"(Q7233245)"
"Q7233245"
and nothing worked.
I have tried "May 1982" and "1982" and no results.
I have manually inserted "wd:" on the code and nothing works:
It should at least give the result from the example I gave before. 87.196.80.45 (talk) 05:11, 6 November 2022 (UTC)
Wikidata doesn't precisely support the exact same information as wikipedia, just very similar information in an easier to query fashion.
In particular, commons category doesn't correspond to the category the item is in on wikipedia, but the item that describes the topic of the category. Bawolff (talk) 07:10, 6 November 2022 (UTC)
You mean I have to change the inputs? How to find the correct ones? 87.196.81.26 (talk) 12:21, 6 November 2022 (UTC)

Is it really not possible to make TimedMediaHandler play other video files like .mov and .wmv?

Hello, I was told a while back that it isn't possible for TimedMediaHandler to play .mov and other video files that aren't mp4, mp3, webm, and other files it allows. However I wanted to ask to make sure if it really isn't possible to somehow make TimedMediaHandler play .mov, .wmv, and other files? Thanks Guillaume Taillefer (talk) 21:29, 5 November 2022 (UTC)

A programmer could add support for other formats.
As long as it is a format ffmpeg supports, it would probably be relatively easy as far as these things go. Bawolff (talk) 02:43, 6 November 2022 (UTC)
Ok thanks I'll check it out Guillaume Taillefer (talk) 04:18, 6 November 2022 (UTC)

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


MediaWiki 1.36.0 with Skin:Timeless

The footer has natively 3 links:

  • Privacy Policy
  • About WEBSITE
  • Disclaimers

I need to add just one (Dofollow) link to this list.

How to do that? 171.6.241.97 (talk) 04:20, 6 November 2022 (UTC)

You can use manual:Hooks/SkinAddFooterLinks
e.g. in LocalSettings.php
$wgHooks['SkinAddFooterLinks'][] = static function  ( Skin $skin, string $key, array &$footerlinks  ) {
   if ( $key === 'places' ) {
      $footerlinks['mylink'] = Html::element( 'a', [ 'href' => 'https://URLFORLINK' ], 'Text of link' );
   }
};
Bawolff (talk) 07:06, 6 November 2022 (UTC)
Thanks, that solved my problem.
Please mark this case as solved. 171.6.241.97 (talk) 11:25, 6 November 2022 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Thumbnail errors w/ 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 have pdfhanndler extension installed. 1.38


when uploading a PDF file, I am getting the following error on the File page: (see below)


Do I need to compile/install imagemagick - I prefer not - is there another workaround?

** this post was updated to reflect the current error code ** >>>

Error creating thumbnail: convert: no decode delegate for this image format `' @ error/constitute.c/ReadImage/741. convert: no images defined `/tmp/transform_cb79f2dd030d.jpg' @ error/convert.c/ConvertImageCommand/334

>>> DLl314 (talk) 16:11, 6 November 2022 (UTC)

I went ahead installed image magick :( I se these parameters in local settings:
$wgUseImageMagick = true;
$wgPdfProcessor = "/usr/bin/gs";
$wgPdfPostProcessor = "/usr/local/bin/convert";
$wgPdfInfo = "/usr/bin/pdfinfo";
$wgPdftoText = "/usr/bin/pdftotext";
I am still getting an error - but different - below:
Error creating thumbnail: convert: no decode delegate for this image format `' @ error/constitute.c/ReadImage/741. convert: no images defined `/tmp/transform_cb79f2dd030d.jpg' @ error/convert.c/ConvertImageCommand/3342 DLl314 (talk) 17:55, 6 November 2022 (UTC)
did you configure image magick to not support jpg files? (I think you can do this at compile time or via a xml config file, altthough its a very unusual thing to do) Bawolff (talk) 20:31, 6 November 2022 (UTC)
I didn't remove jpg support - The GIT discussion suggested I might be missing the priory library, but I am not sure how to fix this.
still working DLl314 (talk) 21:06, 6 November 2022 (UTC)
its' not Ghostscript - that works
So Im stuck at setting delegates for image types. DLl314 (talk) 21:34, 6 November 2022 (UTC)
CLOSED - solution:
https://gist.github.com/nickferrando/fb0a44d707c8c3efd92dedd0f79d2911 DLl314 (talk) 22:49, 6 November 2022 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

wiki edit not working

Hello. Whenever I try to add css or code that has errors I get a 403.

for example: trying to add:

{| style="background-color: red;"

| test

|}

wont work. PHP Version is 8.1 and try it for yourself http://wiki.Allan.network/main_page and login as wiki-test and password Wiki123


–NOT ADVERTISING— 213.237.89.238 (talk) 17:45, 6 November 2022 (UTC)

try Extension:NewPageCss and then use <css> </css> tags DLl314 (talk) 17:57, 6 November 2022 (UTC)
is there a solution without extensions? 213.237.89.238 (talk) 18:21, 6 November 2022 (UTC)
that probably depends on your specific use - there are some JS scripts and Common files you can enable or edit -
MediaWiki:Common.css page. See Manual:CSS DLl314 (talk) 18:27, 6 November 2022 (UTC)
if you are a user, and not an administrator - search User Styles or Custom User Style - you will be able to update css for your user only DLl314 (talk) 18:30, 6 November 2022 (UTC)
I don't think DLI314 is correct here. A 403 error likely has a different cause.
Do you (or your web host) have apache mod_security or another Web application firewall (WAF) installed? Your host might call it something else like "hacking protection" Bawolff (talk) 20:28, 6 November 2022 (UTC)
@Bawolff this kind of fixed it. whenever a user tries to preview it, it will show a 403 even though I disabled modsecurity, and second of all. is there a way to fix both the issues without disabling security since there is login pages. 213.237.89.238 (talk) 07:33, 7 November 2022 (UTC)
You can adjust your configuration of mod_security. Your apache error log may have more details as to what is being triggered.
only happening on preview suggests some reflected xss filter. I didn't think mod_security supported that but i could be wrong. Maybe you have some sort of additional filter enabled.
The security provided by mod_security is significantly overated in my opinion. I personally don't think its really worth using. Bawolff (talk) 07:47, 7 November 2022 (UTC)
@Bawolff there is only an option to disable mod_security and hot link protection was already disabled so I enabled 213.237.90.36 (talk) 10:34, 8 November 2022 (UTC)

Lua error in package.lua at line 80: module 'strict' not found.

I keep getting the error when uploading new templates. In particular with source templates. When I tried importing them into my wiki, they were successful, but when I click on each template, it gives, or repeats the following error throughout:

Lua error in package.lua at line 80: module 'strict' not found.

I looked this error up and apparently only one person has had the problem:

https://stackoverflow.com/questions/74324839/mediawiki-error-lua-error-in-package-lua-at-line-80-module-strict-not-found

However I don't want to have to go through trying to find all the older modules that don't have strict, and have already redownloaded Scribunto to the "new version". So is there an actual way to solve this? Thanks Guillaume Taillefer (talk) 00:24, 7 November 2022 (UTC)

> already redownloaded Scribunto to the "new version"
Which version did you download? You would probably need master.
However it may make sense for us to backport this change for general compatibility. Bawolff (talk) 04:33, 7 November 2022 (UTC)
This has been backported now. So it should be included in the version of scribunto for your version of mediawiki if you re-download instead of just master. Bawolff (talk) 06:09, 7 November 2022 (UTC)
Oh wow now it works, Thanks! I had redownloaded the version for 1.38 a couple of hours before I had posted this when I reinstalled it. Now it no longer gives me the error Guillaume Taillefer (talk) 11:31, 7 November 2022 (UTC)
Still getting this issue in 1.38
Will try on the master and update. 66.213.91.4 (talk) 13:59, 15 November 2022 (UTC)
Disregard the previous comment I made, after a few minutes the error disappeared with the current 1.38 build. 66.213.91.4 (talk) 14:01, 15 November 2022 (UTC)

Mediawiki official image(MediaWiki-Docker) works for Azure?

Hi Support Desk,


Currently We're using following mediawiki v1.35.3 with the required software under RHEL7 server(on-premise)

Now, we plan to move our on-premise wiki server to the Azure cloud. Hence we do require your suggestion on migrating same with the mediawiki official image(MediaWiki-Docker). please suggest appropriate image that would contain all required latest software.

Installed software

Product Version
MediaWiki 1.35.3
PHP 7.4.25 (apache2handler)
MySQL 8.0.27
ICU 69.1
Lua 5.1.5
Elasticsearch 6.5.4

a Sanjay (talk) 14:37, 7 November 2022 (UTC)

When will The 1.39.0 stable release come out?

I am on 1.34 want to update, but i also want to install semantic mediawiki.

Will 1.39 be compatible with the newest semantic version?

Should I not update to 1.39 but rather an older version to install semantic mediawiki? 2003:D0:170C:1B59:4D2:D048:FC91:AB0C (talk) 17:01, 7 November 2022 (UTC)

"When will The 1.39.0 stable release come out?" Version lifecycle says November 2022.
"Will 1.39 be compatible with the newest semantic version?" Extension:Semantic MediaWiki says v4.0.2 is compatible with "1.35.0 - 1.37.x" and https://www.semantic-mediawiki.org/wiki/Semantic_MediaWiki_4.0.2 says that version "improves compatibility with MediaWiki 1.37 and 1.38". I see you asked on the talk page. They also have a mailing list. Jonathan3 (talk) 22:49, 7 November 2022 (UTC)
Thanks!
I looked here: github - Semantic Mediawiki
and it only says "Mediawiki 1.35 or above"
So your reccomendation is downloading 1.38 and then installing Semantic mediawiki, because following you link SMW 4.1x will only be compatible with 1.38x? 2003:D0:170C:1B60:3D79:2470:FDA7:E36D (talk) 09:06, 8 November 2022 (UTC)
I'd probably go for 1.35 for now and move to 1.39 after it's been out for a while and once SMW catches up. Both are LTS versions. I don't use SMW so can't comment with any authority on that (I use Cargo). I can speak with authority on having a wiki running on an obsolete MW version :-) I'm on 1.34 and plan to take the upgrade path set out here when I get a chance. Jonathan3 (talk) 09:20, 8 November 2022 (UTC)

Add checkbox in Edit Source / Edit Page

I'm wanting to add a checkbox on both the Edit and Edit Source pages for the purpose of some kind of auditing. I'm not sure which extension or where to modify and I know that I will also have to somehow save whether it was checked or not.


Has anyone done anything like this or have any advice on where to start? Any help would be greatly appreciated. Also, my apologies if this is better posted in the developer hub DrpepperUser (talk) 22:53, 7 November 2022 (UTC)

If you are looking for examples of people who have done similar things:
Extension:FlaggedRevisions adds a checkbox, but it has a reputation for having difficult to read code.
Extension:TemplateSandbox might be another one to look at.
Its totally fine to ask any type of mediawiki question here (imo) Bawolff (talk) 04:19, 8 November 2022 (UTC)
I'm not sure what your underlying problem is but maybe Extension:Approved Revs would solve it (albeit without a checkbox on the edit page, I think). Jonathan3 (talk) 09:14, 8 November 2022 (UTC)
Thank you for the response! I was looking for examples but more so a direction on where to make changes on existing code, where the edit options code already lives. If I was able to use the FlaggedRevisions to add a checkbox, where would that code go? And I do realize that approach may not be recommended. What do you think?
Thanks again for the response! DrpepperUser (talk) 15:00, 8 November 2022 (UTC)
I don't know. What exactly is it you want to achieve by adding a checkbox to the edit page? A term I learnt here is "XY problem" :-) Jonathan3 (talk) 22:58, 9 November 2022 (UTC)

Can we directly upgrade from 1.35 to 1.39 version of Mediawiki

Hello,

Our current mediawiki is on the following versions:-

MediaWiki 1.35.4

PHP 7.4.29 (apache2handler)

MySQL 8.0.29

ICU 50.2

Can we upgrade mediawiki directly to 1.39 and will the php, mysql, icu will be feasible in the new version or we have to upgrade them as well.


Also please tell if there is a way that users get notification for the new release of mediawiki versions. Shek sh11 (talk) 09:52, 8 November 2022 (UTC)

You should be able to directly upgrade. Your software versions also look fine. PHP 7.4 will soon be out of support from php upstream, but we still support it in MediaWiki 1.39 as that is what wikipedia is using.
You can get notifications by subscribing to the mediawiki-announce mailing list https://lists.wikimedia.org/postorius/lists/mediawiki-announce.lists.wikimedia.org/ Bawolff (talk) 11:35, 8 November 2022 (UTC)

请问谁可以帮我解决以下的错误?

我在试图使用Lua脚本创建module时遇到了以下的报错:

Lua error: Cannot create process: proc_open(/dev/null): failed to open stream: Operation not permitted

在我debug时,我始终得到以下的错误提示:

Warning: is_dir(): open_basedir restriction in effect. File(/tmp) is not within the allowed path(s): (/home/admin/web/mywikisite/public_html:/home/admin/tmp) in /home/admin/web/mywikisite/public_html/mywiki/includes/libs/filebackend/fsfile/TempFSFile.php on line 85

ps:我已经更改了一些目录名以保护我的wiki站点隐私。

我得知这是由于open_basedir保护的关系,但问题是我已经在PHP.ini中注释了open_basedir命令,它们应该不起作用才对。为什么我会持续遇到这个错误呢?

谢谢。 M.Lv (talk) 14:06, 8 November 2022 (UTC)

Restbase server on Windows

The restbase server is not recognizing it and when I open the visual Editor it comes up with this message "Revision IDs returned by the server do not match (document: undefined, metadata: 21)." What is it? And how do I solve it? WikiUser22222 (talk) 14:27, 8 November 2022 (UTC)

Special:Categories - List all on any page

How can I list all Categories at the bottom of a page (eg template:footer page) the same way they are listed on the bottom of the Special:Categories page ???


Is it possible to use the Categorytree extension to do it? I've tried magic word and using <categorytree> but I can only get it to work if I specify one - using "all" returns nothing. DLl314 (talk) 14:38, 8 November 2022 (UTC)

I suppose you can use {{special:allpages/Category:}}. Alternatively you can ue dpl extension. Bawolff (talk) 01:43, 9 November 2022 (UTC)

nuked pages are not moved to the archive table

after using nuke to delete spam content from a wiki (created with mediawiki 1.35), deleted content was not moved to the archive table. records are present in the text and content table, but nothing in the revisions or archive table.


maintenance scripts such as deleteArchivedRevisions.php and purgeOldText.php do not find the deleted content (there is nothing in the archives to delete, and purgeOldText only compares the content and text table, without checking whether corresponding entries exist in other tables).


is this the intended behaviour ? most help articles that people will find when trying to clean up a vandalised wiki suggest deleting the pages and then running deleteArchivedRevisions.php, but this no longer works -- at least in my case (not sure if others have experienced this). 192.222.162.46 (talk) 19:44, 8 November 2022 (UTC)

No, its not intended. Nuke is supposed to move things to archive table. Bawolff (talk) 01:42, 9 November 2022 (UTC)
thanks for your response @Bawolff!
any idea whether my situation is out of the ordinary ?
I'm trying to figure out whether I've made an error somewhere along the way, or if the changes to the database since 1.35 mean the standard spam clean up technique (nuke, then deleteArchivedRevisions, then removeUnusedAccounts) just doesn't work anymore 192.222.162.46 (talk) 17:16, 9 November 2022 (UTC)

Installed MediaWiki Successfully - but keep getting redirected to localhost

can anyone help!! Ramvenkey6278 (talk) 00:48, 9 November 2022 (UTC)

Its possible that the installer detected hour server name wrong. Can you check the value of $wgServer in your LocalSettings.php file. Bawolff (talk) 01:41, 9 November 2022 (UTC)
Thank you for your response, i changed $wgserver value to my sitename, it works fine now, thanks again for prompt response Ramvenkey6278 (talk) 23:40, 9 November 2022 (UTC)

Accidentally deleted an entry from revision table from my database in phpMyAdmin

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 accidentally deleted an entry from revision table from my database in phpMyAdmin and now I can no longer view, delete, move, etc. the corresponding page.

When I open the page it behaves like an empty redlink page and then when I try to create it I get an edit conflict displayed and then get caught in an endless loop.

When I try to move the page I get the following message:

MWException: Failed to create null revision while moving page ID 1129 to NEWSITENAME (page ID 1129)

Backtrace:

from /mediawiki/includes/MovePage.php(1005)
#0 /mediawiki/includes/MovePage.php(657): MovePage->moveToInternal(User, Title, string, boolean, array)
#1 /mediawiki/includes/MovePage.php(504): MovePage->moveUnsafe(User, string, boolean, array)
#2 /mediawiki/includes/specials/SpecialMovepage.php(721): MovePage->moveIfAllowed(User, string, boolean)
#3 /mediawiki/includes/specials/SpecialMovepage.php(204): MovePageForm->doSubmit()
#4 /mediawiki/includes/specialpage/SpecialPage.php(646): MovePageForm->execute(NULL)
#5 /mediawiki/includes/specialpage/SpecialPageFactory.php(1386): SpecialPage->run(NULL)
#6 /mediawiki/includes/MediaWiki.php(309): MediaWiki\SpecialPage\SpecialPageFactory->executePath(Title, RequestContext)
#7 /mediawiki/includes/MediaWiki.php(913): MediaWiki->performRequest()
#8 /mediawiki/includes/MediaWiki.php(546): MediaWiki->main()
#9 /mediawiki/index.php(53): MediaWiki->run()
#10 /mediawiki/index.php(46): wfIndexMain()
#11 {main}

How can I restore the page? 178.8.102.218 (talk) 06:53, 9 November 2022 (UTC)

Ok, I've got it working on my own now. I simply entered the previous revision in the page table at the corresponding entry under page_latest, now I can view and edit the page again. 178.8.102.218 (talk) 07:57, 9 November 2022 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Where to find shell?

I want to install SemanticResultFormats (after installing Semantic Mediawiki)

It says to run "mediawiki/semantic-result-formats": "~4.0" from the shell.

I could only find shell.php on my server, but i get the following error


Parse error: syntax error, unexpected ':' in /var/www/vhosts/mywebsite/includes/shell/Shell.php on line 255 2003:D0:170C:1BE4:40DE:E095:52C2:EB96 (talk) 11:26, 9 November 2022 (UTC)

Shell is SSH, so your terminal. you have to ssh into your server from your computer. Guillaume Taillefer (talk) 14:05, 9 November 2022 (UTC)
That also looks like a composer.json entry not a shell command, are you sure you are reading whatever instructions you are reading correctly? Bawolff (talk) 14:13, 9 November 2022 (UTC)
Instructions are what is reccomended when downloading SemanticResultFormat.
Answer was, that I dont have SSH acces on my server, so I couldnt find it. 2003:D0:170C:1BEF:E15B:3EB8:B552:BBF8 (talk) 13:28, 10 November 2022 (UTC)
if you use cpanel, there should be an option for terminal. it uses bash and might not show up depending on hosting or hosting plans. 213.237.90.36 (talk) 15:28, 10 November 2022 (UTC)
If you mean, https://www.semantic-mediawiki.org/wiki/Extension:Semantic_result_formats/Installation that wasn't ome of the shell commands. The shell command came later in that document. Bawolff (talk) 13:45, 10 November 2022 (UTC)

Editing CSS for one page

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 attempted to edit a single page via Common.css but it seems to work for some things and not others.

The below works when referencing the page and the element I want to target (if I wanted to change all pages, I can remove '.page-Index':

e.g. .page-Index .firstHeading {color:white;!important}


But when I run this, the background doesn't apply to just Index page referenced:

e.g. .page-Index body, html background-color: white;background-image: linear-gradient(to left, transparent, #202b5b), url('exampleimage.jpg'); background-repeat: no-repeat; !important}


Is it possible I have some syntax incorrect here? I'm confused as to why my background can't follow the same page rules I set as other elements. David.bucknor (talk) 14:46, 9 November 2022 (UTC)

I've not looked in detail but are you missing an opening {?
Also I've a feeling you can't set background image via css in Common.css (not sure). Jonathan3 (talk) 15:14, 9 November 2022 (UTC)
Hi Jonathan,
In the copy and paste yes, but I have got the missing bracket opening '{' in the actual thing.
You can change background image via CSS in Common using URL like normal - just unsure why I can only set it for every page despite specifying I only require it for index!
Will have to keep exploring options in the mean time. David.bucknor (talk) 16:10, 9 November 2022 (UTC)
If you set out here what works and what doesn't, using "syntaxhighlight" tags, I'll see whether it works on my wiki. Jonathan3 (talk) 22:54, 9 November 2022 (UTC)
thanks Jonathan, problem solved now thanks to below comment David.bucknor (talk) 10:48, 10 November 2022 (UTC)
Does body.page-Index { background-color: red; } work? Jonathan3 (talk) 22:56, 9 November 2022 (UTC)
The syntax of what you posted is wrong.
Assuming what you meant to write is
.page-Index body, html { background-color: white;background-image: linear-gradient(to left, transparent, #202b5b), url('exampleimage.jpg'); background-repeat: no-repeat; !important} e.g. adding a {, the reason its applying to everything is you have the , html part, which means all pages. The .page-Index body matches no pages (page-Index is a class on the body element, it will never also have a body element as a child), it should be just .page-Index Bawolff (talk) 02:45, 10 November 2022 (UTC)
This is a brilliant explanation, thank you - code amended and working as intended now - just have to sort out that CM of white space at the top of the page :) David.bucknor (talk) 10:49, 10 November 2022 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

How to stop VisualEditor from using images from wiki commons

Whenever I try to insert a file in an article through wiki commons, and try to search for it, it always comes with results from Wikimedia Commons. However I do not was my users to use images from Wiki Commons, nor do I want them to get confused with an image that is also on Wikimedia Commons. How could I disable VisualEditor from doing that, and to only use files from my wiki? Thanks Guillaume Taillefer (talk) 22:40, 9 November 2022 (UTC)

$wgUseInstantCommons = false;
Fokebox (talk) 07:46, 10 November 2022 (UTC)
Ok it works now. I did have UseInstantCommons set to false apparently twice but then I had it another time where it was set to true. I deleted all of them except for one false one and now it works Guillaume Taillefer (talk) 11:44, 10 November 2022 (UTC)
Si el problema del usuario instantáneo siempre va a demorar iba así que se caiga y obviamente que vamos a tener un un delay 2803:9800:988C:8396:B42A:5096:8E86:CAAB (talk) 15:00, 10 November 2022 (UTC)

Subpage breadcrumb display not happening

I am adding subpages to my MediaWiki and the breadcrumb trail does not display, despite adding the appropriate line to the LocalSettings.php file $wgNamespacesWithSubpages[NS_MAIN] = true;

Is there something else I need to do? Gina Kingston (talk) 01:09, 10 November 2022 (UTC)

I think that should work. What skin are you using? Jonathan3 (talk) 09:35, 10 November 2022 (UTC)

Limit display of table?

I use Semantic Mediawiki. Tables are limited to 500, you have to klick expand to see it. Any chance to override it? 2003:D0:170C:1BEF:E15B:3EB8:B552:BBF8 (talk) 13:25, 10 November 2022 (UTC)

I tried with: $smwgQMaxInlineLimit: = 1000;
in localsettings under enable Semantics but then I get blank pages in my WIKI 2003:D0:170C:1BEF:E15B:3EB8:B552:BBF8 (talk) 13:43, 10 November 2022 (UTC)
So I changed it in the Semantic Mediawiki file, not in localsettings and it works. There has to be a safer way though. 2003:D0:170C:1BEF:E15B:3EB8:B552:BBF8 (talk) 14:03, 10 November 2022 (UTC)
You don't want the colon in front of the equals sign. Jonathan3 (talk) 14:15, 10 November 2022 (UTC)

Redirect users

Hello. I’m trying to make it so I can redirect users like this

user types example.com/article1

sire redirects user to example.com/wiki/article1

Or like how most WMF websites do it. 213.237.90.36 (talk) 15:27, 10 November 2022 (UTC)

How to do this depends on which webserver you are using.
In apache, you typically use RewriteRule to accomplish this. Bawolff (talk) 15:33, 10 November 2022 (UTC)
@Bawolff
cPanel Version 102.0 (build 24)
Apache Version 2.4.54
PHP Version 7.3.33
MySQL Version 10.3.36-MariaDB-cll-lve
Architecture x86_64
Operating System linux
is to possible to do it using htaccess and localsettings.php 213.237.90.36 (talk) 15:54, 10 November 2022 (UTC)
yes. Look up a tutorial on rewrite rules. Bawolff (talk) 16:14, 10 November 2022 (UTC)
Something like this?
RewriteEngine On
RewriteRule ^([^/]*)$ /wiki/$1 [L]
Jonathan3 (talk) 02:46, 11 November 2022 (UTC)
Do I change anything on localsettings.pho? And Well the problem is that it’s now giving me a 404. @Jonathan3 213.237.90.36 (talk) 14:50, 11 November 2022 (UTC)
I'm not any good at this sort of thing! I got my wiki to work based on the "short URLs" page, which is the height of it :-) Jonathan3 (talk) 22:10, 11 November 2022 (UTC)
If you are redirecting to existing short url (and not creating the short url in the first place) then nothing needs to change in LocalSettings.php
So if example.com/wiki/article1 already works,no change would be needed for LocalSettings.php.
I dont think the flags are right in what Johnathan posted. Having Last flag, but not making it an external redirect will probably prevent the short url from being processed. Maybe try instead.
RewriteRule ^/([^/]*)$ /wiki/$1 [R,L]
Bawolff (talk) 08:58, 13 November 2022 (UTC)

Calling Loop index inside #if (Parser functions and LoopFunctions extensions)

I wanted to create a condition inside a for loop that used the index of the loop. According to the LoopFunctions documentation, one can call the index with $n$. This works inside the for, but not if it is inside a parser function that is inside a for loop. Is there something I am missing or is it simply not possible to use the index inside another function? Jdm.oliveira (talk) 15:29, 10 November 2022 (UTC)

What about using the Scribunto extension? It's not as difficult as it first seems. Jonathan3 (talk) 02:36, 11 November 2022 (UTC)
Sorry that I forgot to answer. Thank you, Scribunto did the trick after some research. Jdm.oliveira (talk) 14:52, 25 November 2022 (UTC)

Querying multiple endpoints (LinkedWiki)

I have been working with LinkedWiki and have queried some endpoints to list some properties' values. Since the things I have queried have the same property names as my own page, I would like to simultaneously query my properties and the other endpoints' and list what is returned either in a map or a table. Is this by any chance possible? Jdm.oliveira (talk) 15:52, 10 November 2022 (UTC)

Recover old wiki versions

I'd like to know if there is a way to recover old wiki versions.

Apparently, due to TamperMonkey, one of our bigger wikis broke after saving, so I would need to recover the older version. 85.251.252.137 (talk) 14:12, 11 November 2022 (UTC)

What wiki version are you using. Can you also provide php version, database type and version? 213.237.90.36 (talk) 14:52, 11 November 2022 (UTC)
You can revert pages to older versions by using the history feature. See help:History Bawolff (talk) 19:42, 11 November 2022 (UTC)

Upgrade schema from 1.18

Hi, I'm trying to find instructions for importing a MySQL database that has been extended with additional tables. I am installing 1.38 replacing a 1.18 installation. Nothing was output when update.php was run.

Are there any hints I could use?

Thanks

/Jay Belltowerwikis (talk) 06:00, 12 November 2022 (UTC)

See Manual:Upgrading#Check_requirements.
Since Version 1.36, MediaWiki only commits to supporting upgrades from two LTS releases ago (see phab:T259771). Upgrades from older versions of MediaWiki will have to be performed in multiple steps. This means that if you want to upgrade to 1.36 from 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.
Shirayuki (talk) 06:37, 12 November 2022 (UTC)
That said, if nothing was output when update.php was run, that probably means that there is something wrong with how it was run, since normally there would be an error message telling you to upgrade to 1.35 first. Check you have php error reporting enabled. Bawolff (talk) 07:43, 12 November 2022 (UTC)
Ah I see. The issue is to upgrade PHP (at 5.6.40) to 7.3.19 to 7.4.3, respectively to update the schema from 1.18 to 1.27 to 1.35+, running update.php in each of the three PHP environments. Further MySQL 5.0 is necessary to upgrade to 1.27 while MySQL 5.5.8 is used thereafter. ... I believe the error 255 was due the PHP mismatch. Belltowerwikis (talk) 20:24, 12 November 2022 (UTC)

Module not working

Hello. I have Scribunto installed as an extension and I made a page called module:message box and pasted local messageBox = require('Module:Message box'); in it but whenever I type {{ambox}} it gives me a red link. Can anyone help me out? 213.237.90.36 (talk) 11:37, 12 November 2022 (UTC)

Did you copy over Template:Ambox ? Use w:special:export on wikipedia, selecting the "include templates" checkbox, and Special:Import on your wiki, to make sure you have all the neccessary templates.
Additionally making a page named module:message box and just typing local messageBox = require('Module:Message box'); probably won't really work because that's just including itself. Bawolff (talk) 17:02, 12 November 2022 (UTC)
ibb.co/hMV1zSM i set interwiki prefix to "template" and now I get this error@Bawolff 213.237.90.36 (talk) 19:59, 12 November 2022 (UTC)
Module:Strict not found means you have to upgrade your version of Extension:Scribunto. Bawolff (talk) 20:18, 12 November 2022 (UTC)
it works now but there's still some broken stuff in the pages but it also imported the documentation from wikipedia. and how to mass delete the pages because its not working. 213.237.90.36 (talk) 08:57, 13 November 2022 (UTC)

Weird category bind glitch

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


After my previous issues were fixed, it's largely been plain sailing from there, except for an annoying problem I've discovered with my revised "Song" template.

It's supposed to create a category of episodes featuring that song in them. Here's an example of it being used: https://wiki.gearknob.org/index.php?title=Top_Gear_(1977_TV_series)/Series_23/Episode_1

I know exactly what's causing the issue, since only songs that have article links are broken in this manner. However, I would like a solution that keeps this article link, since these songs are important enough to warrant their own articles. AlexGRFan97 (talk) 13:10, 12 November 2022 (UTC)

You could separate the songname parameter into multiple parameters - {{{artist}}}, {{{songname}}}, {{{songpage}}} and then do something like
<small>▶️ '''{{{artist}}} - {{#ifexist:{{{songpage}}}|[[{{{songpage}}}|{{{songname}}}]]''': {{{playswhen}}}</small>[[Category:Automotive journalism media which feature the track "{{{songname}}}" in its soundtrack]]<br> Bawolff (talk) 17:00, 12 November 2022 (UTC)
Can confirm it works now, but I did have to make a couple changes. Namely, the square brackets for the article link were in the wrong place, causing "songname" not to print anything if "songpage" was left empty.
Also, the closing brackets from the "ifexist" statement was missing, added those back in. Now it works like a charm! AlexGRFan97 (talk) 16:59, 13 November 2022 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Plain text after new install

Downloaded and installed mediawiki to my Apache24/PHP8 site moments ago. Went through all steps of the config, downloaded LocalSettings, put it in the main directory, went to the site and saw plain text with no formatting or no images whatsoever.

Looked at this thread Project:Support desk/Flow/2012/01#h-[RESOLVED]_New_installed_MediaWiki_looks_"a_little_weird"_-_no_images_at_all_onl-2012-01-05T09:15:00.000Z tried the .htaccess trick but nothing changed. In dev tools/network I see the following entries:


index.php?title=Main_Page - 304

poweredby_mediawiki_88x31.png - 200

load.php?lang=en&modules=skins.vector.styles.legacy&only=styles&skin=vector    - 500 error

load.php?lang=en&modules=startup&only=scripts&raw=1&skin=vector - 200

favicon.ico - 302

load.php?lang=en&modules=jquery%2Csite%7Cjquery.client%7Cmediawiki.String%2CTitle%2Capi%2Cbase%2Ccldr%2CjqueryMsg%2Clanguage%2Cutil%7Cmediawiki.libs.pluralruleparser%7Cmediawiki.page.ready%7Cskins.vector.legacy.js&skin=vector&version=1gzxe - 200

cropped-IconZen-32x32.png - 206


In the console I can see this error:

The resource from “https :// www . wiki . local/wiki/load.php?lang=en&modules=skins.vector.styles.legacy&only=styles&skin=vector” was blocked due to MIME type (“text/html”) mismatch (X-Content-Type-Options: nosniff).

I cannot see any PHP errors but the following Apache error is raised for every access to Wiki:

Premature end of script headers: load.php, referer: https://www.mywiki.local/wiki/index.php?title=Main_Page


Googled for it but found mostly nodejs and other strange server issues. What should I do to allow Mediawiki to load properly? Furfarthl (talk) 13:50, 12 November 2022 (UTC)

Try this, and then send the result if there is any
Manual:How to debug 213.237.90.36 (talk) 14:43, 12 November 2022 (UTC)
Tried it but it did not write any errors to PHP error log.
I've scanned the debug log but found no error messages. Word Error is not found, Word Err is only found in Deferred or UserRights. See, pal: the problem is that if I see an error in Apache's error.log then PHP did not execute at all, and there will be nothing of value/interest in any of WM or PHP logs.
Anything specific I should look for? Furfarthl (talk) 15:37, 12 November 2022 (UTC)
premature end of script headers makes it sound like either php is hitting some sort of timeout or php is segfaulting.
I would check what type of timeouts you have set. If this is the first access, mediawiki has a cold cache, and is maybe taking longer than a normal request as it has to generate a bunch of stuff. Bawolff (talk) 16:53, 12 November 2022 (UTC)
Error 500 occurs before any possible timeouts, within 1900 msec of request.
The next line in the debug window starts at the same time of 1200 and takes 200 msec longer but succeeds.
Does it still sound like timeout? Furfarthl (talk) 17:19, 12 November 2022 (UTC)
It depends how things are configured. Its unlikely that anyone would intentionally set a timeout that low, but if everything was configured correctly you wouldn't have an issue. However at first glance it seems less likely given that info.
> The next line in the debug window starts at the same time of 1200 and takes 200 msec longer but succeeds.
Which debug window?
Other investigative options start to get complicated. You could try to use something like strace to figure out what is going on with the php process. In particular determine if the process is segfaulting or something like that.
> the problem is that if I see an error in Apache's error.log then PHP did not execute at all
I dont think this is true. The error you posted suggests php didn't run to completion, not that it neccesarily didn't run at all. Bawolff (talk) 19:24, 12 November 2022 (UTC)
Browser debug window, F12. This is quickly becoming way too technical. Seeing how Wordpress runs just fine off the same virtual host I doubt this issue has anything to do with Apache or PHP. The root .htaccess could theoretically mess things up, true, but after I temporarily removed it Wiki still repeated the same error. Furfarthl (talk) 21:58, 12 November 2022 (UTC)
You would not be getting the apache error you mentioned for rewrite rules or .htaccess.
The "premature end of script headers" error you mentioned is an error about apache communicating with php. It is way below the level mediawiki operates at. Bawolff (talk) 22:12, 12 November 2022 (UTC)
I moved the whole wiki folder to another virtual host that runs PHP7.4 and has little in the way of .htaccess:
<IfModule mod_headers.c>
Header set X-XSS-Protection "1; mode=block"
</IfModule>
and it does not load there as well. The PHP site on that host also runs perfectly fine but not Wiki. We run webmail, CMSs, admins for MySQL and other such things and never had any issues like this one. So, why can Apache communicate with PHP for Wordpress and a handful of other apps but not for Wiki? What are Wikimedia requirements that my host may not be satisfying?
Also, if this is about Apache not communicating with PHP then why did Wiki installation run perfectly fine but not the site itself? They run off the same vhost and same configuration. Why does load.php generate one CSS perfectly fine but not the other?
Quick question: I can see file l10-en-cache.cdb under /wiki/cache. Is it an SQLite DB? I tried to open it with SQlite driver, to validate if it is not corrupt, but it errored that it is not a valid SQLite database.
Is PHP-CGI mode that we use fine by Wikimedia? I googled about this error and found that quite a few users had issues running Wiki under fastCGI, but I do not have any errors mentioned, like mismatch between #of children between httpd.conf and php.ini etc. Furfarthl (talk) 22:17, 12 November 2022 (UTC)
I am not an expert on Procmon but it looks like there are no file permission issues in the below capture of everything that is not Result=SUCCESS for httpd.exe:
21:26:34.3621499    httpd.exe    5588    QueryAllInformationFile    C:\WWW\domain4.local\wiki\index.php    BUFFER OVERFLOW    CreationTime: 2022-11-12 07:44:11, LastAccessTime: 2022-11-12 07:44:11, LastWriteTime: 2022-11-12 14:26:07, ChangeTime: 2022-11-12 14:26:07, FileAttributes: AC, AllocationSize: 4,096, EndOfFile: 2,083, NumberOfLinks: 1, DeletePending: False, Directory: False, IndexNumber: 0x500000004f931, EaSize: 0, Access: Read Attributes, Synchronize, Position: 0, Mode: Synchronous IO Non-Alert, AlignmentRequirement: Word
21:26:34.3681584    httpd.exe    5588    QueryAllInformationFile    C:\WWW\domain4.local\wiki\.htaccess    BUFFER OVERFLOW    CreationTime: 2022-11-12 08:34:48, LastAccessTime: 2022-11-12 08:34:48, LastWriteTime: 2022-11-12 08:57:38, ChangeTime: 2022-11-12 08:57:38, FileAttributes: AC, AllocationSize: 104, EndOfFile: 102, NumberOfLinks: 1, DeletePending: False, Directory: False, IndexNumber: 0x8400000004c893, EaSize: 0, Access: Generic Read, Position: 0, Mode: Synchronous IO Non-Alert, AlignmentRequirement: Word
21:26:34.3705269    httpd.exe    5588    ReadFile    C:\WWW\domain4.local\wiki\.htaccess    END OF FILE    Offset: 102, Length: 4,096
21:26:39.8640693    httpd.exe    5588    QueryAllInformationFile    C:\WWW\domain4.local\wiki\resources\assets\poweredby_mediawiki_88x31.png    BUFFER OVERFLOW    CreationTime: 2022-11-12 07:44:11, LastAccessTime: 2022-11-12 07:44:11, LastWriteTime: 2021-11-13 20:12:54, ChangeTime: 2022-11-12 07:44:41, FileAttributes: C, AllocationSize: 8,192, EndOfFile: 3,839, NumberOfLinks: 1, DeletePending: False, Directory: False, IndexNumber: 0x500000005000c, EaSize: 0, Access: Read Attributes, Synchronize, Position: 0, Mode: Synchronous IO Non-Alert, AlignmentRequirement: Word
21:26:39.8655100    httpd.exe    5588    QueryAllInformationFile    C:\WWW\domain4.local\wiki\.htaccess    BUFFER OVERFLOW    CreationTime: 2022-11-12 08:34:48, LastAccessTime: 2022-11-12 08:34:48, LastWriteTime: 2022-11-12 08:57:38, ChangeTime: 2022-11-12 08:57:38, FileAttributes: AC, AllocationSize: 104, EndOfFile: 102, NumberOfLinks: 1, DeletePending: False, Directory: False, IndexNumber: 0x8400000004c893, EaSize: 0, Access: Generic Read, Position: 0, Mode: Synchronous IO Non-Alert, AlignmentRequirement: Word
21:26:39.8655994    httpd.exe    5588    ReadFile    C:\WWW\domain4.local\wiki\.htaccess    END OF FILE    Offset: 102, Length: 4,096
21:26:39.8657927    httpd.exe    5588    CreateFile    C:\WWW\domain4.local\wiki\resources\.htaccess    NAME NOT FOUND    Desired Access: Generic Read, Disposition: Open, Options: Synchronous IO Non-Alert, Non-Directory File, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
21:26:39.8659893    httpd.exe    5588    CreateFile    C:\WWW\domain4.local\wiki\resources\assets\.htaccess    NAME NOT FOUND    Desired Access: Generic Read, Disposition: Open, Options: Synchronous IO Non-Alert, Non-Directory File, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
21:26:39.9745543    httpd.exe    5588    QueryAllInformationFile    C:\WWW\domain4.local\wiki\load.php    BUFFER OVERFLOW    CreationTime: 2022-11-12 07:44:11, LastAccessTime: 2022-11-12 07:44:11, LastWriteTime: 2022-09-29 21:39:52, ChangeTime: 2022-11-12 07:44:39, FileAttributes: C, AllocationSize: 4,096, EndOfFile: 2,096, NumberOfLinks: 1, DeletePending: False, Directory: False, IndexNumber: 0x500000004fd4b, EaSize: 0, Access: Read Attributes, Synchronize, Position: 0, Mode: Synchronous IO Non-Alert, AlignmentRequirement: Word
21:26:39.9815533    httpd.exe    5588    QueryAllInformationFile    C:\WWW\domain4.local\wiki\.htaccess    BUFFER OVERFLOW    CreationTime: 2022-11-12 08:34:48, LastAccessTime: 2022-11-12 08:34:48, LastWriteTime: 2022-11-12 08:57:38, ChangeTime: 2022-11-12 08:57:38, FileAttributes: AC, AllocationSize: 104, EndOfFile: 102, NumberOfLinks: 1, DeletePending: False, Directory: False, IndexNumber: 0x8400000004c893, EaSize: 0, Access: Generic Read, Position: 0, Mode: Synchronous IO Non-Alert, AlignmentRequirement: Word
21:26:39.9817183    httpd.exe    5588    ReadFile    C:\WWW\domain4.local\wiki\.htaccess    END OF FILE    Offset: 102, Length: 4,096 Furfarthl (talk) 23:01, 12 November 2022 (UTC)
Fast-cgi and normal cgi (not the same thing) should both be supported, with fastcgi used by many mediawiki websites (including this one).
it is unlikely what you are describing would be caused by a file permission error. Its also much more likely to be an error on the php process not the httpd process.
> Also, if this is about Apache not communicating with PHP then why did Wiki installation run perfectly fine but not the site itself? They run off the same vhost and same configuration. Why does load.php generate one CSS perfectly fine but not the other?
you would need to narrow it down much further than that to say anything useful (does the php process exit abnormally? Does it happen on a specific line? Is there something significantly different about the response to that page, e.g. a header that is abnormally long, etc).
if it also fails in the same way for a different version of php, that makes it less likely to be a php bug, and more likely to be a config error, but there is still a question of why is it only happening to you and not other people.
> Quick question: I can see file l10-en-cache.cdb under /wiki/cache. Is it an SQLite DB? I tried to open it with SQlite driver, to validate if it is not corrupt, but it errored that it is not a valid SQLite database.
No, its a CDB file as the extension would indicate. CDB is not as popular as sqlite, but its still a popular format and you should be able to find reader software on the internet if you are curious. Mediawiki can also be configured to use other formats for l10n cache.
In any case i dont think corruption would cause the issue you describe, but its also safe to delete that file in which case it should be regenerated on next load. Bawolff (talk) 06:17, 13 November 2022 (UTC)
Thanks for your insight and tips! Seeing how involved the installation is and how vague requirements are, I'll have no choice than to give up :( Furfarthl (talk) 14:26, 14 November 2022 (UTC)

Weird keyboard on automated testing with Cypress

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


I'm working on code that will test regressions in Polish Dark Theme (plugin/extension) and I have problem to login to Wikipedia. First login works but second login looks weird. It shows some kind of IME keyboard and probably auto submit a form without clicking login button or pressing enter.

Here is the link to discussion on Cypress project on GitHub. Can anyone tell who is to blame? Is it Cypress issue or maybe MediaWiki is auto submitting the form without touching the login button?

I'm testing using Google Chrome.

Any hints how to fix the issue would be great.

I've investigated this problem a bit and it seems that my testing browser has MediaWiki IME keyboard present that somehow redirect to login page without pressing enter.

IS there a way to disabled that keyboard. Why I have that keyboard enabled? Can a user disable it in settings? Jcubic (talk) 22:48, 12 November 2022 (UTC)

I was able to solve the issue, I've disabled the IME keyboard on test user and my tests works now. Jcubic (talk) 23:38, 12 November 2022 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

MediaWiki login protection

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.


Does Media Wiki (specifically Wikipedia) have some kind of login protection. When using automated code to login to Wikipedia my second login got blocked by some kind of security protection. Got this message in Polish:

  Wydaje się, że wystąpił błąd z Twoją sesją zalogowania; to działanie zostało anulowane, aby uniknąć przechwycenia sesji. Prześlij formularz jeszcze raz.

I'm helping someone to write tests for Dark Mode extension. But I'm not able to login second time. This is specific user created just for tests. His password is protected and will not be exposed anywhere. I plan to add tests to GitLab CI/CD, but the password is added as secret variable so it will not be visible in Code. Jcubic (talk) 23:05, 12 November 2022 (UTC)

No we dont. Most likely there is a bug in your automated login code. That error happens if you send the wrong cookies or post parameters. Bawolff (talk) 05:59, 13 November 2022 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Help with Extension:TreeAndMenu

Hello, I am new to MediaWiki. Trying build selfhosted server. I installed it seems to be working fine. I have also installed the extension (Extension:TreeAndMenu#) . I am trying build sidebar menu system similar to this website (https://wikizilla.org/wiki/Main_Page), but so far failed. I have read the instruction on the extension page, but the instructions assumes i am familiar with MediaWiki, hence so far no success. can anyone please guide me or send a sample menu code where i can copy and paste it? I am happy to learn, but at the moment i dont know where to start. TIA 86.161.1.21 (talk) 15:39, 13 November 2022 (UTC)

Hello, I will like to remove or update the logo from our company as it has been updated and the one published is not the correct:


https://es.wikipedia.org/w/index.php?title=Archivo:Escudo_Cune_Color_small.jpg&action=info


On our companies page the correct logo is published.

https://es.wikipedia.org/wiki/Compa%C3%B1%C3%ADa_Vin%C3%ADcola_del_Norte_de_Espa%C3%B1a

Please can you let us know how can this be changed, as a lot of people use this logo CVNE - Maria (talk) 08:46, 14 November 2022 (UTC)

Hi, this forum is only for technical questions. Try asking at commons:commons:help desk
That said i listed it at https://commons.wikimedia.org/wiki/Commons:Deletion_requests/File:Escudo_Cune_Color_small.jpg in order that admins may see it. Feel free to edit that page if you have additional arguments for why it should be deleted. Bawolff (talk) 09:04, 14 November 2022 (UTC)

In the comments of the file tests/parser/parserTests.txt (Wikimedia) it is written that the file includes context from metawiki pages. The GNU FDL and CC BY-SA 3.0 licenses do not allow inclusion of content into the GNU GPLv2. Dušan Kreheľ (talk) 10:45, 14 November 2022 (UTC)

Do the examples have enough creativity to be eligible for copyright? I would assume they would be public domain for being non-creative.
This might not be the best forum to discuss this. It might be better to file a task on phab (tagging legal i guess?) Or start a thread on wikitech-l. Bawolff (talk) 11:14, 14 November 2022 (UTC)
@Bawolff: Wikimedia Mediawiki does not have an official standard for wiki syntax. This means that everything that the Wikimedia Mediawiki software says, acts or does is under the Copyright of Wikimedia Mediawiki, i.e. GPLv2. The exception may be instructions (not part of the official Wikimedia Mediawiki software package), due to the legal exception for educational purposes or non-profit. The copied text serves as a standard for the Mediawiki parser, so if someone wants to develop a new parser, then if he wants to be sure of the correct implementation, he must test his parse on identical data. So, these few lines play an important role in the following. Dušan Kreheľ (talk) 12:29, 14 November 2022 (UTC)
Please file a ticket in Phab, tagged with MediaWiki-Parser and Software-Licensing (Legal does not use Phab). Malyacko (talk) 13:05, 14 November 2022 (UTC)
> This means that everything that the Wikimedia software says, acts or does is under the Copyright of Wikimedia
I strongly doubt this interpretation. In particular, I don't think the copyright of any code contributors of MediaWiki extends to the output of the MediaWiki software package. Additionally, "Wikimedia" (Different from Wikimedia foundation) is not a legal entity and is not one of the copyright holders in question.
Anyways, to the topic at hand. I don't think https://meta.wikimedia.org/wiki/Parser_testing/strip and friends meet the threshold of originality. However even if they did, those pages was written mostly by Tim Starling and Erik Moller, who are also mediawiki contributors, and presumably consented to it being re-licensed when it was submitted to MediaWiki, making it a moot point. Bawolff (talk) 13:20, 14 November 2022 (UTC)
I meant Mediawiki, I wrote Wikimedia. I repaired it. Dušan Kreheľ (talk) 13:26, 14 November 2022 (UTC)
It was created T323024. Dušan Kreheľ (talk) 13:21, 14 November 2022 (UTC)

Babel does not work properly in the Lombard Wiktionary

Babel does not create categories and does not classify users by category on the Lombard language Wiktionary. The problem, already reported to phabricator(https://phabricator.wikimedia.org/T299307 )almost a year ago, has not been resolved yet. Is there a solution? Gat lombard (talk) 22:43, 14 November 2022 (UTC)

I think the right people just didn't see that bug.
See also meta:Requesting wiki configuration changes Bawolff (talk) 22:53, 14 November 2022 (UTC)

False-positive session save path error from 1.35.8

After having failed to troubleshoot error 500 from load.php of the latest version, I tried the oldest but could not start the setup:

Your session data was lost! Check your php.ini and make sure session.save_path is set to an appropriate directory.

It is not true. The session path is set properly, and I can write files to it, with this simple test script:

<?php

try {

$sp = session_save_path();

echo "<p>$sp</p>";

$fil = fopen($sp."/test", "w");

fwrite($fil, "success");

fclose($fil);

echo "<p>success</p>";

} catch(Exception $ex) {

echo "<p>Error: $ex->getMessage()</p>";

}

?>

It prints 'success', and the file is created. Other applications on the same virtual host use sessions all the time, and I can see their session files in that folder being updated as users log in. Any ideas?


When I open the installation page, 2 files are created:


installData|a:1:{s:32:"20458044ff12f9c77231a90c7e200cda";a:4:{s:4:"test";b:1;s:10:"happyPages";a:0:{}s:12:"skippedPages";a:0:{}s:8:"settings";a:61:{s:9:"_UserLang";s:2:"en";s:12:"_Environment";b:0;s:12:"_RaiseMemory";b:0;s:12:"_UpgradeDone";b:0;s:12:"_InstallDone";b:0;s:7:"_Caches";a:0:{}s:16:"_InstallPassword";s:0:"";s:12:"_SameAccount";b:1;s:16:"_CreateDBAccount";b:0;s:14:"_NamespaceType";s:9:"site-name";s:10:"_AdminName";s:0:"";s:14:"_AdminPassword";s:0:"";s:21:"_AdminPasswordConfirm";s:0:"";s:11:"_AdminEmail";s:0:"";s:10:"_Subscribe";b:0;s:13:"_SkipOptional";s:8:"continue";s:14:"_RightsProfile";s:4:"wiki";s:12:"_LicenseCode";s:4:"none";s:7:"_CCDone";b:0;s:11:"_Extensions";a:0:{}s:6:"_Skins";a:0:{}s:17:"_MemCachedServers";s:0:"";s:19:"_UpgradeKeySupplied";b:0;s:19:"_ExistingDBSettings";b:0;s:5:"_Logo";s:45:"$wgResourceBasePath/resources/assets/wiki.png";s:28:"wgAuthenticationTokenVersion";i:1;s:10:"wgSitename";s:9:"MediaWiki";s:16:"wgPasswordSender";s:19:"apache@🌻.invalid";s:14:"wgLanguageCode";s:2:"en";s:12:"wgRightsIcon";N;s:12:"wgRightsText";N;s:11:"wgRightsUrl";N;s:13:"wgEnableEmail";b:1;s:17:"wgEnableUserEmail";b:1;s:16:"wgEnotifUserTalk";b:0;s:17:"wgEnotifWatchlist";b:0;s:21:"wgEmailAuthentication";b:1;s:8:"wgDBname";s:7:"my_wiki";s:8:"wgDBtype";s:5:"mysql";s:7:"wgDiff3";s:14:"/usr/bin/diff3";s:27:"wgImageMagickConvertCommand";s:16:"/usr/bin/convert";s:8:"wgGitBin";s:12:"/usr/bin/git";s:2:"IP";s:22:"C:\WWW\domain\wiki";s:12:"wgScriptPath";s:5:"/wiki";s:15:"wgMetaNamespace";s:9:"MediaWiki";s:18:"wgDeletedDirectory";s:37:"C:\WWW\domain\wiki/images/deleted";s:15:"wgEnableUploads";b:0;s:13:"wgShellLocale";s:7:"C.UTF-8";s:11:"wgSecretKey";b:0;s:19:"wgUseInstantCommons";b:0;s:12:"wgUpgradeKey";b:0;s:13:"wgDefaultSkin";s:6:"vector";s:10:"wgPingback";b:0;s:8:"wgServer";s:24:"http://www.domain.local";s:8:"wgScript";s:15:"/wiki/index.php";s:12:"wgLoadScript";s:14:"/wiki/load.php";s:11:"wgStylePath";s:11:"/wiki/skins";s:16:"wgLocalStylePath";s:11:"/wiki/skins";s:21:"wgExtensionAssetsPath";s:16:"/wiki/extensions";s:12:"wgUploadPath";s:12:"/wiki/images";s:18:"wgResourceBasePath";s:5:"/wiki";}}}


and


installData|a:1:{s:32:"20458044ff12f9c77231a90c7e200cda";a:0:{}}


When I click on 'Continue', 2 more of the same are created. Furfarthl (talk) 00:26, 15 November 2022 (UTC)

How are you clicking continue if you cannot start the installer? Bawolff (talk) 10:43, 15 November 2022 (UTC)
Great question! It is probably a confusion over terminology. By starting the installer I mean proceeding past its 1st screen, i.e. seeing something after clicking Continue. Furfarthl (talk) 13:28, 15 November 2022 (UTC)
So, if 1.38 installs but 1.35 errors, this should be treated as a bug in 1.35.8. 72.10.138.14 (talk) 12:00, 16 November 2022 (UTC)
Yes. If you can come up with a reproducible minimal test case, we would consider it a valid bug in 1.35 Bawolff (talk) 13:14, 16 November 2022 (UTC)
I am just a humble user... I do not know all of this stuff: what is reproducible, what is minimal, what is test case etc. It either works or it does not. So, I've spent obscene amount of time on this task that is supposed to be trivial and got absolutely nowhere. Now I am under pressure to deliver at least some documentation CMS, and I have to go. Sorry! 72.10.138.14 (talk) 13:55, 16 November 2022 (UTC)
Your not obliged to do anything, but a bug report without detailed instructions on how to make the bug appear for the person reading the report, are usually ignored. Bawolff (talk) 17:26, 16 November 2022 (UTC)

TOC table of contents not showing

Hi,


My TOC is not showing on any of my pages. Does anyone have an idea where I can start looking to solve this?

MediaWiki 1.35.0
PHP 7.4.33 (cgi-fcgi)
MariaDB 10.5.15-MariaDB-0+deb11u1
ICU 67.1

URL - https://wiki.majorcommand.com/Maps

Thanks! :-) BubbaUsesWiki (talk) 06:08, 15 November 2022 (UTC)

I think its a bug in the skin you are using. You can see that on other skins e.g. https://wiki.majorcommand.com/Maps?useskin=vector the TOC shows up fine. Bawolff (talk) 10:42, 15 November 2022 (UTC)
That's great! Thanks!
I will start with looking at the skin first. Hopefully that will lead me to it.
Thanks for the direction! BubbaUsesWiki (talk) 23:36, 15 November 2022 (UTC)

Adding picture to the far top of the page

I want to add a banner at the far top of the page, basically behind the "message" and "discussion" and other tabs. Is there a CSS command which will put a picture here? Encyclovideo (talk) 13:56, 15 November 2022 (UTC)

How can I get the same skin as on mediawiki.org?

I'm using Vector 1.0.0, 9 November 2022. But the skin on mediawiki.org looks more modern. 2003:FD:6734:2DD0:EDF5:87B0:E4C6:16C8 (talk) 19:13, 15 November 2022 (UTC)

There is like a legacy vector and a 2022 vector that are separate skins with the same name. Maybe you need the master version of vector skin. Bawolff (talk) 23:08, 17 November 2022 (UTC)
Many thanks for the answer. I'm using the Vector 2022 skin. But if this is MediaWiki's default skin, why does the skin on www.mediawiki.org looks better? Are you really using the same skin?
www.mediawiki.org/wiki/Skin:Vector/2022
$wgDefaultSkin = 'vector-2022';
wfLoadSkin( 'Vector' );
Preferences > Appearance > Vector (2022) 87.148.255.138 (talk) 15:59, 18 November 2022 (UTC)
Vector 2022 is under active development, this site might just have a newer version or a different config (sorry, i havent fully been following the development of vector 2022). Bawolff (talk) 20:32, 18 November 2022 (UTC)

Error contacting the Parsoid/RESTBase server (HTTP 400)

I get a pop up saying “Error contacting the Parsoid/RESTBase server (HTTP 400)” whenever I try to use visual editor. I’m logged in as an administrator account. 185.85.44.153 (talk) 11:13, 16 November 2022 (UTC)

Are you running apache or nginx, what version of mediawiki do you have? 86.97.0.62 (talk) 07:53, 20 November 2022 (UTC)
Apache and 1.38 mediawiki @86.97.0.62 80.62.117.23 (talk) 18:24, 21 November 2022 (UTC)
This might be a problem with your SSL.
Another cause of this issue is wrong Short Url configuration related to apache.
One more possible is the configuration of /rest.php/?$query_string server block located within your apache available site configuration file, 5.193.68.230 (talk) 08:37, 24 November 2022 (UTC)

Add OOUI icon to wiki page

Is it possible to add one of the icons at https://doc.wikimedia.org/oojs-ui/master/demos/?page=icons&theme=wikimediaui&direction=ltr&platform=desktop to the content of a wiki page? Thanks. Jonathan3 (talk) 12:38, 16 November 2022 (UTC)

Pluggable SSO Settings

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 copied pluggable sso fodler in to /extensions and added this wfLoadExtension( 'PluggableSSO' ); in to localsettings.php. i am unable to locate it in "Special:Version", am i missing something here? it is running on windows Ramvenkey6278 (talk) 03:47, 17 November 2022 (UTC)

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

Performance for importing big dumps

Can I run reboottextindex.php, rebootrecentchanges.php and refreshLinks.php in parallel?


And is it possible to parallelize refreshLinks.php? 212.164.205.136 (talk) 04:46, 17 November 2022 (UTC)

The sequence of rebuildAll.php is as following:
rebuildtextindex.php followed by rebuildrecentchanges.php, and finally refreshLinks.php
Finish the first tow steps then move to refreshLinks.php
Note: a good job runner is a must here.
After importing large dumps, you may think of running refreshLinks in small patches.
php refreshLinks.php --e 50000 -- 0
This code will refresh links starting with page id 0, ending with 50000.
then next patch should be
php refreshLinks.php --e 100000 -- 50000. 86.97.0.62 (talk) 08:02, 20 November 2022 (UTC)

Mediawiki running on PHP v 7.4.25 is going to expire in 10 days

Hi Team,

Product Version
MediaWiki 1.35.3
PHP 7.4.25 (apache2handler)
MySQL 8.0.27
ICU 69.1
Lua 5.1.5
Elasticsearch 6.5.4

Currently we are using above Software, But from security Team we got alert that PHP 7.4 Security Support going to end in 10 days, 28 NOV 2022 .https://www.php.net/supported-versions.php

Also if we want to upgrade PHP version to PHP 8, then MediaWiki is not compatible with PHP 8 clearly mention in Compatibility#PHP.

As we can see MediaWiki (1.38) runs on PHP 7.4.3 and higher. But now PHP 7.4 is going to expire . Please suggest us what we need to do ? Pooja2425 (talk) 08:23, 17 November 2022 (UTC)

My wiki uses 8.1 and works totally fine. 213.237.93.136 (talk) 10:50, 17 November 2022 (UTC)
You should be fine using php 8 or 8.1 with mediawiki. Some minor fixes for php 8 were included in 1.38, but even in 1.35 there aren't really any important bugs.
Note that if you want to stick with php 7.4, i think debian is supporting it past php eol. Bawolff (talk) 12:33, 17 November 2022 (UTC)
Thanks for help @Bawolff & 213.237.93.136 Pooja2425 (talk) 07:33, 18 November 2022 (UTC)
@213.237.93.136:
Which version of mediawiki did you use with php8.1? 62.68.29.252 (talk) 09:49, 18 November 2022 (UTC)
I am running MW 1.35.3 with PHP 8.0 , minor changes for variables & constants i did. Now its working fine. Pooja2425 (talk) 11:02, 18 November 2022 (UTC)
@Bawolff After upgrading php 7.4 to php 8.0 Extension:Mpdf not working .
pls suggest ? Pooja2425 (talk) 08:56, 25 November 2022 (UTC)
No, as "it doesn't work" is never ever enough information. Seehttps://phabricator.wikimedia.org/T323797 instead. Malyacko (talk) 15:18, 25 November 2022 (UTC)
Plus you also posted this as Project:Support desk/Flow/2022/11#h-MPDF_version_6.1_not_working_with_PHP_8-20221125075000. Please do not post in several places, it is not a good use of anyone's time and fragments conversations. Malyacko (talk) 15:19, 25 November 2022 (UTC)
@Malyacko this task https://phabricator.wikimedia.org/T323797 i have created but no help yet from anywhere. Pooja2425 (talk) 16:46, 25 November 2022 (UTC)
Correct. Please only ask for help on the mediawiki.org Support Desk, and please report software bugs on phabricator.wikimedia.org by following How to report a bug. Thanks! Malyacko (talk) 21:51, 25 November 2022 (UTC)
Also if you made unspecified changes to the extension, its much less likely anyone is going to help as we have no idea what you changed or if your issues are the result of the changes you made. Bawolff (talk) 22:51, 25 November 2022 (UTC)

Error contacting the Parsoid/RESTBase server (HTTP 400)

I get a pop up saying “Error contacting the Parsoid/RESTBase server (HTTP 400)” whenever I try to use visual editor. I’m logged in as an administrator account. 185.85.44.154 (talk) 09:27, 18 November 2022 (UTC)

Table do not fit to small images

Hello,

I'm working with last version of MediaWiki, using VisualEditor to edit pages.

I have created a table ("wikitable" when checking wikicode). When inserting images, the table dimension automatically fit to the image size. Except if the image is small.

Regardless of the image size, the width of the column with the image is minimum 200pixel (even for 25px images). What can I do to make the table fit even small images?


Maybe another solution would be not to use images. I would like green check and red cross (for a yes or no) in the table. So I am using images bur maybe there is another solution.

Thank you

Antoine AntoineNauzet (talk) 09:49, 18 November 2022 (UTC)

kartographer or graph error!

Uncaught Error: URL hostname is not whitelisted: mapsnapshot:///?width=300&height=150&zoom=14&lat=4

This happens after changing the following

$wgKartographerMapServer = 'https://a.tile.openstreetmap.org/';

$wgKartographerDfltStyle = '';

$wgKartographerStyles = []; 86.97.0.62 (talk) 16:50, 18 November 2022 (UTC)

adding
$wgGraphAllowedDomains = [
    'https' => [ 'a.tile.openstreetmap.org' ],
    'http' => [ 'a.tile.openstreetmap.org' ],
    'mapsnapshot' => [ 'a.tile.openstreetmap.org' ]
];
is not helping 86.97.0.62 (talk) 16:51, 18 November 2022 (UTC)
I don't know for sure, but i think mapsnapshot uses the geoshape entry of $wgGraphAllowedDomains, not a mapsnapshot entry. Try adding an entry for geoshape. Bawolff (talk) 18:16, 19 November 2022 (UTC)
as mentioned in the extension Graph
mapsnapshot:///?width=__&height=__&zoom=__&lat=__&lon=__ [&style=__] - Makes a link to the map snapshot service, so that a static map can be drawn for a given location/zoom/size. Parameters are converted it into a snapshot image request for Kartotherian -
So geoshape did not helped here. 86.97.0.62 (talk) 08:34, 20 November 2022 (UTC)
I was basing it on https://github.com/wikimedia/mediawiki-extensions-Graph/blob/fbc467603453614e277cfd8a6848ef396716a82d/lib/graph2.compiled.js#L465 and the fact that wikipedia sets a geoshape allowed domain but no mapsnapshot allowed domain. Bawolff (talk) 17:19, 20 November 2022 (UTC)
You are right, but still i can't see any solution for that. 86.97.0.62 (talk) 11:30, 21 November 2022 (UTC)

Help. GoDaddy ruined my MediaWiki!

I used the GoDaddy feature to upgrade my MW install to 1.38.4 (it had been at 1.25 or something previously).

Now it no longer functions.

GoDaddy says everything looks fine on their end. I have not made any changes to LocalSettings. I get this error:


If you use a relative URL for $wgArticlePath, it must start with a slash (/).

See https://www.mediawiki.org/wiki/Manual:$wgArticlePath.


It's very frustrating, I know the data is there, the SQL database is intact, but the MW install is just not talking to it, or crashing because of this error.


Any suggestions? Can anyone help?

MW 1.38.4

PHP 7.4

MySQL v. 5.6.51-cll-lve Bullleague (talk) 19:04, 18 November 2022 (UTC)

As the error message says, change the value of $wgArticlePath in LocalSettings.php so it starts with a / Bawolff (talk) 20:33, 18 November 2022 (UTC)
This is what it is right now:
## The URL base path to the directory containing the wiki;
## defaults for all runtime URL paths are based off of this.
## For more information on customizing the URLs please see:
## http://www.mediawiki.org/wiki/Manual:Short_URL
$wgScriptPath       = 'wiki.bullleague.org';
$wgRunJobsAsync = false;
$wgArticlePath = $wgScriptPath.'/wiki/$1';
$wgScriptExtension  = ".php"; Bullleague (talk) 03:18, 19 November 2022 (UTC)
you should have
$wgScriptPath = "";
Instead. If for some reason you really wanted the domain there, which is not reccomended,it would need to start with http:// Bawolff (talk) 13:14, 19 November 2022 (UTC)

MediaWiki not loading correctly after installation

Fresh server, mediawiki insalled by decompressing the zip in root

Using FastPanel to manage apache server


Immediately after installation, page loads like this LageriaDirector (talk) 05:08, 20 November 2022 (UTC)

Did you configured the default skin?
$wgDefaultSkin = 'vector';
wfLoadSkin( 'Vector' ); 86.97.0.62 (talk) 07:53, 20 November 2022 (UTC)
it's already added by default LageriaDirector (talk) 08:41, 20 November 2022 (UTC)
what version of MW? 86.97.0.62 (talk) 08:46, 20 November 2022 (UTC)
v1.38.4 LageriaDirector (talk) 08:58, 20 November 2022 (UTC)
Can you please add this to the end of localSettings.php
$wgDebugComments = true;
ini_set( 'display_errors', 1 );
$wgShowExceptionDetails=true;
and see if there will be any error displayed. 86.97.0.62 (talk) 09:11, 20 November 2022 (UTC)
added to the end of localsettings
uploaded back to server
refreshed website
nothing showing LageriaDirector (talk) 09:42, 20 November 2022 (UTC)
server log:
front end:
2022/11/20 06:14:33 [error] 65174#65174: *571 upstream sent too big header while reading response header from upstream, client: ipaddress, server: domain.xyz, request: "GET /load.php?lang=en&modules=ext.visualEditor.desktopArticleTarget.noscript%7Cskins.vector.styles.legacy&only=styles&skin=vector HTTP/1.1", upstream: "http://127.0.0.1:81/load.php?lang=en&modules=ext.visualEditor.desktopArticleTarget.noscript%7Cskins.vector.styles.legacy&only=styles&skin=vector", host: "domain.xyz", referrer: "https://domain.xyz/index.php"
2022/11/20 06:14:35 [error] 65174#65174: *583 upstream sent too big header while reading response header from upstream, client: ipaddress, server: domain.xyz, request: "GET /load.php?lang=en&modules=ext.visualEditor.desktopArticleTarget.noscript%7Cskins.vector.styles.legacy&only=styles&skin=vector HTTP/1.1", upstream: "http://127.0.0.1:81/load.php?lang=en&modules=ext.visualEditor.desktopArticleTarget.noscript%7Cskins.vector.styles.legacy&only=styles&skin=vector", host: "domain.xyz", referrer: "https://domain.xyz/index.php"
2022/11/20 06:14:39 [error] 65174#65174: *583 upstream sent too big header while reading response header from upstream, client: ipaddress, server: domain.xyz, request: "GET /load.php?lang=en&modules=ext.visualEditor.desktopArticleTarget.noscript%7Cskins.vector.styles.legacy&only=styles&skin=vector HTTP/1.1", upstream: "http://127.0.0.1:81/load.php?lang=en&modules=ext.visualEditor.desktopArticleTarget.noscript%7Cskins.vector.styles.legacy&only=styles&skin=vector", host: "domain.xyz", referrer: "https://domain.xyz/index.php"
2022/11/20 06:14:42 [error] 65174#65174: *583 upstream sent too big header while reading response header from upstream, client: ipaddress, server: domain.xyz, request: "GET /load.php?lang=en&modules=ext.visualEditor.desktopArticleTarget.noscript%7Cmediawiki.htmlform.styles%7Cmediawiki.special.userlogin.common.styles%7Cmediawiki.special.userlogin.login.styles%7Cmediawiki.ui%7Cmediawiki.ui.button%2Ccheckbox%2Cinput%2Cradio%7Cskins.vector.styles.legacy&only=styles&skin=vector HTTP/1.1", upstream: "http://127.0.0.1:81/load.php?lang=en&modules=ext.visualEditor.desktopArticleTarget.noscript%7Cmediawiki.htmlform.styles%7Cmediawiki.special.userlogin.common.styles%7Cmediawiki.special.userlogin.login.styles%7Cmediawiki.ui%7Cmediawiki.ui.button%2Ccheckbox%2Cinput%2Cradio%7Cskins.vector.styles.legacy&only=styles&skin=vector", host: "domain.xyz", referrer: "https://domain.xyz/index.php/Special:UserLogin"
2022/11/20 06:14:43 [error] 65174#65174: *583 upstream sent too big header while reading response header from upstream, client: ipaddress, server: domain.xyz, request: "GET /load.php?lang=en&modules=ext.visualEditor.desktopArticleTarget.noscript%7Cmediawiki.htmlform.styles%7Cmediawiki.special.userlogin.common.styles%7Cmediawiki.special.userlogin.login.styles%7Cmediawiki.ui%7Cmediawiki.ui.button%2Ccheckbox%2Cinput%2Cradio%7Cskins.vector.styles.legacy&only=styles&skin=vector HTTP/1.1", upstream: "http://127.0.0.1:81/load.php?lang=en&modules=ext.visualEditor.desktopArticleTarget.noscript%7Cmediawiki.htmlform.styles%7Cmediawiki.special.userlogin.common.styles%7Cmediawiki.special.userlogin.login.styles%7Cmediawiki.ui%7Cmediawiki.ui.button%2Ccheckbox%2Cinput%2Cradio%7Cskins.vector.styles.legacy&only=styles&skin=vector", host: "domain.xyz", referrer: "https://domain.xyz/index.php/Special:UserLogin" LageriaDirector (talk) 09:47, 20 November 2022 (UTC)
Looks to me like your NGINX buffer size might be too small. AlexGRFan97 (talk) 10:21, 20 November 2022 (UTC)
Are you getting any console log errors, in browser? 86.97.0.62 (talk) 12:24, 20 November 2022 (UTC)

Creating wiki family on a shared hosting with shared database & user

Hello. I'd like to create a wiki family of two wikis of different languages on two different subdomain with shared database and users, like Wikipedia.


I know there is Manual on here, MediaWiki but I got confused a little.


About wiki family; on the second line it says:

"Enable your web server to share your MediaWiki install with all wikis. For multiple (sub)domains, you can use listen on multiple server names."


I don't get it really. How do I share my MediaWiki install with other wikis?


About shared database; people say configure it before installing wiki but how do I configure a wiki even before installing it?


Should I place codes to each wiki's LocalSettings.php right after installation? But this way, doesn't first users conflict? 159.146.38.244 (talk) 08:27, 20 November 2022 (UTC)

There are lots of different ways to make a wikifarm, so it kind of depends on which you choose.
> Enable your web server to share your MediaWiki install with all wikis. For multiple (sub)domains, you can use listen on multiple server names."
I think this just means configure the virtual hosts in your webserver config to have them all point to mediawiki.
> About shared database; people say configure it before installing wiki but how do I configure a wiki even before installing it?
Most commonly, install one wiki and then copy the database to other dbs. It depends on how shared you want things Bawolff (talk) 17:26, 20 November 2022 (UTC)

Changing wiki's HTML

Greetings. Is it possible to edit my wiki's HTML? If no, how do I add new page elements, or, for example, move the navigation on the left to right? Maybe the question is dumb, but I'm new to MediaWiki, so sorry. Ферстикс (talk) 12:30, 20 November 2022 (UTC)

Depends what parts.
If you want to adjust the navigation interface, you can add a new Skin
If you want to make small css tweaks, see CSS
If you want to add new page elements, typically people use extensions. Some people use extension:Widgets but you have to be careful to ensure you only make secure widgets. Bawolff (talk) 17:24, 20 November 2022 (UTC)

Tables in Semantic Mediawiki

Ist it possible to show the results in a table only for a specific result of a property.

I want to show only the pages in a category that have property X with the value = 1. Bedtry (talk) 14:33, 20 November 2022 (UTC)

? Bedtry (talk) 11:54, 22 November 2022 (UTC)

Uprade to 1.38.4 yields ArgumentCount error

I attempted upgrade (actually fresh install) to 1.38.4 [PHP 8.14] and call to "SpecialPages" (to verify update version) got me...

[Y3qbAtsZ37nOZRri8h6B9wAAAPA] /wiki/index.php/Special:SpecialPages ArgumentCountError: Too few arguments to function MovePageForm::__construct(), 0 passed in /home4/pedsane1/public_html/wiki/extensions/Translate/tag/SpecialPageTranslationMovePage.php on line 31 and exactly 11 expected

Backtrace:

from /home4/pedsane1/public_html/wiki/includes/specials/SpecialMovepage.php(116)

#0 /home4/pedsane1/public_html/wiki/extensions/Translate/tag/SpecialPageTranslationMovePage.php(31): MovePageForm->__construct()

#1 /home4/pedsane1/public_html/wiki/vendor/wikimedia/object-factory/src/ObjectFactory.php(247): SpecialPageTranslationMovePage->__construct()

#2 /home4/pedsane1/public_html/wiki/vendor/wikimedia/object-factory/src/ObjectFactory.php(152): Wikimedia\ObjectFactory\ObjectFactory::getObjectFromSpec(array, array)

#3 /home4/pedsane1/public_html/wiki/includes/specialpage/SpecialPageFactory.php(1230): Wikimedia\ObjectFactory\ObjectFactory->createObject(string, array)

#4 /home4/pedsane1/public_html/wiki/includes/specialpage/SpecialPageFactory.php(1265): MediaWiki\SpecialPage\SpecialPageFactory->getPage(string)

#5 /home4/pedsane1/public_html/wiki/includes/specials/SpecialSpecialpages.php(53): MediaWiki\SpecialPage\SpecialPageFactory->getUsablePages(User)

#6 /home4/pedsane1/public_html/wiki/includes/specials/SpecialSpecialpages.php(42): SpecialSpecialpages->getPageGroups()

#7 /home4/pedsane1/public_html/wiki/includes/specialpage/SpecialPage.php(671): SpecialSpecialpages->execute(NULL)

#8 /home4/pedsane1/public_html/wiki/includes/specialpage/SpecialPageFactory.php(1378): SpecialPage->run(NULL)

#9 /home4/pedsane1/public_html/wiki/includes/MediaWiki.php(315): MediaWiki\SpecialPage\SpecialPageFactory->executePath(string, RequestContext)

#10 /home4/pedsane1/public_html/wiki/includes/MediaWiki.php(912): MediaWiki->performRequest()

#11 /home4/pedsane1/public_html/wiki/includes/MediaWiki.php(563): MediaWiki->main()

#12 /home4/pedsane1/public_html/wiki/index.php(53): MediaWiki->run()

#13 /home4/pedsane1/public_html/wiki/index.php(46): wfIndexMain()

#14 {main}


Unsure how to solve. Any help appreciated. 2601:144:C001:E370:C4C6:E347:39CA:76F3 (talk) 21:34, 20 November 2022 (UTC)

Are you sure you have the right version of the Translate extension for your version of mediawiki? Bawolff (talk) 23:22, 20 November 2022 (UTC)
Good catch....I didn't realize the latest version is from 10/22. Uploaded/installed...but not improved. 2601:144:C001:E370:CC70:1814:3842:89B (talk) 00:34, 21 November 2022 (UTC)
Did the error message change after you upgraded translate? Bawolff (talk) 00:57, 21 November 2022 (UTC)
I think it's the same...
[Y3rTAxVaEs1V1iVzJncf6AAAAXU] /wiki/index.php/Special:SpecialPages ArgumentCountError: Too few arguments to function MovePageForm::__construct(), 0 passed in /home4/pedsane1/public_html/wiki/extensions/Translate/tag/SpecialPageTranslationMovePage.php on line 31 and exactly 11 expected
Backtrace:
from /home4/pedsane1/public_html/wiki/includes/specials/SpecialMovepage.php(116)
#0 /home4/pedsane1/public_html/wiki/extensions/Translate/tag/SpecialPageTranslationMovePage.php(31): MovePageForm->__construct()
#1 /home4/pedsane1/public_html/wiki/vendor/wikimedia/object-factory/src/ObjectFactory.php(247): SpecialPageTranslationMovePage->__construct()
#2 /home4/pedsane1/public_html/wiki/vendor/wikimedia/object-factory/src/ObjectFactory.php(152): Wikimedia\ObjectFactory\ObjectFactory::getObjectFromSpec(array, array)
#3 /home4/pedsane1/public_html/wiki/includes/specialpage/SpecialPageFactory.php(1230): Wikimedia\ObjectFactory\ObjectFactory->createObject(string, array)
#4 /home4/pedsane1/public_html/wiki/includes/specialpage/SpecialPageFactory.php(1265): MediaWiki\SpecialPage\SpecialPageFactory->getPage(string)
#5 /home4/pedsane1/public_html/wiki/includes/specials/SpecialSpecialpages.php(53): MediaWiki\SpecialPage\SpecialPageFactory->getUsablePages(User)
#6 /home4/pedsane1/public_html/wiki/includes/specials/SpecialSpecialpages.php(42): SpecialSpecialpages->getPageGroups()
#7 /home4/pedsane1/public_html/wiki/includes/specialpage/SpecialPage.php(671): SpecialSpecialpages->execute(NULL)
#8 /home4/pedsane1/public_html/wiki/includes/specialpage/SpecialPageFactory.php(1378): SpecialPage->run(NULL)
#9 /home4/pedsane1/public_html/wiki/includes/MediaWiki.php(315): MediaWiki\SpecialPage\SpecialPageFactory->executePath(string, RequestContext)
#10 /home4/pedsane1/public_html/wiki/includes/MediaWiki.php(912): MediaWiki->performRequest()
#11 /home4/pedsane1/public_html/wiki/includes/MediaWiki.php(563): MediaWiki->main()
#12 /home4/pedsane1/public_html/wiki/index.php(53): MediaWiki->run()
#13 /home4/pedsane1/public_html/wiki/index.php(46): wfIndexMain()
#14 {main}
(I don't pretend to be able to read this....but it looks the same....more or less.)
If I skip "SpecialPages" and go directly to "Version" I see that it has upgraded to 1.38.4 and looks good. 2601:144:C001:E370:FCA7:CCB7:E9C:DA6F (talk) 01:31, 21 November 2022 (UTC)
Welp....I think you were RIGHT. I kept recursively uploading the files....and it seems like it worked. Fingers crossed.
Thank you so much! 2601:144:C001:E370:FCA7:CCB7:E9C:DA6F (talk) 02:01, 21 November 2022 (UTC)
Generally reccomend upload to a separate directory and then transfer over, since if there is a mix of different versions it can cause weird issues. Bawolff (talk) 14:07, 21 November 2022 (UTC)
I understand....thought I did that....but I guess I pushed the extensions (and images, LocalSettings.php) to the new install without adequately checking. Totally my fail.
Once again, thanks. 2601:144:C001:E370:48FA:3C28:13BD:D794 (talk) 23:46, 21 November 2022 (UTC)

captcha not show

creat account time captcha not showing 118.179.115.115 (talk) 12:50, 22 November 2022 (UTC)

Please read "Post a new question" in the sidebar. Malyacko (talk) 13:46, 22 November 2022 (UTC)

MediaWiki:Twocolconflict-preference-enabled. It's the first time, as I remember, that I see a link to mediawiki.org in a message. Shouldn't messages be without links? In order to respect the choice of a single Wiki to have links that point out of the site or not. Pierpao (talk) 15:23, 22 November 2022 (UTC)

Looks like it's set here:
https://github.com/wikimedia/mediawiki-extensions-TwoColConflict/blob/master/i18n/en.json
You could ask the extension authors. Jonathan3 (talk) 00:37, 23 November 2022 (UTC)
We generally discourage links (and other formatting) as it often makes things harder to translate, however they are allowed if it makes sense.
My larger concern is that its using an interwiki link, but there is no garuntee what the interwiki map of a third party wiki would be. Bawolff (talk) 00:50, 23 November 2022 (UTC)
Does it make sense? It depends, Wikimedia projects usually adopt the template:Soft redirect to link to other project help pages or use specific graphic formats to avoid confusion in users. So if you changed your policy at least a related mass message should be sent to the Wikimedia wikis. Pierpao (talk) 10:06, 23 November 2022 (UTC)

How to put a Page into a Namespace in own wiki?

If I want to create a "Help Page" how do it put a Page in that Namespace? Bedtry (talk) 17:07, 22 November 2022 (UTC)

If you have a "Help" namespace then just save a page with a name along the lines of "Help:My help page". Jonathan3 (talk) 18:40, 22 November 2022 (UTC)

Updating a 1.15.4 extension to 1.38.4

I've recently started a new wiki and found some extensions that would provide some much-needed functionality to my wiki. Trouble is, they're for an older version. I would be willing to update them myself with a little bit of help. These extensions both use magic words and implement custom parser functions, and I've been having a bit of trouble trying to figure out what exactly I would need to modify and how to get them up and running.

I did manage to get them connected briefly, but they return magic word errors when I load up the site, so I guess that's a good starting point in trying to figure out how to update all of this. Any help or pointers to similar projects that have the changes that need to be made laid out clearly would be really helpful. 2600:1700:1AD9:180:FC50:73D2:EB2:6C81 (talk) 22:40, 22 November 2022 (UTC)

Name them and see what people think. Jonathan3 (talk) 00:28, 23 November 2022 (UTC)
Oh boy, they're custom written.
Thankfully they're pretty small and basic (I think). They are used to create flexible navigation between article pages. The first one creates a parser function that correlates to a magic word. This word can then be used to read through a list and spit out certain values based on that list. The other takes the actual item being pointed at in the list and converts it to a usable URL portion that you can add to the end of a link to point to a specific page on or off the wiki.
They're used over on the HR Wiki (under Help:Parser functions) and one of the admins was kind enough to let me look at the code itself to try to figure out how to adapt it for my own project. They are #navlist and #urlformat, respectively and the documentation does a really great job explaining how they work.
I've been looking through some of the older and still maintained extensions available, and I think the closest (at least for #urlformat) is NumberFormat. I'm not sure what the closest would be for #navlist.
I tried doing an old-fashioned "require_once" direction for them, but got a magic word error back, so that definitely needs to be updated. Here is the code on GitHub: https://github.com/onioncritic/flexiblenavigation/blob/main/URLFormat.php (sorry, issues with the linkspam filter!) 75.45.55.110 (talk) 01:28, 23 November 2022 (UTC)
If its really old, the way magic words are registered has changed. I think 1.15 was new enough to support the new way, but lots of extensions from that era were still using the old ways.
languageGetMagic hook is no longer a thing, instead you have to use an i18n file.
Global $wgParser should no longer be used. Register parser function in ParserFirstCallInit hook instead of an extension function.
Anyways see manual:Magic words Bawolff (talk) 05:11, 23 November 2022 (UTC)
I did some work fixing up the code (at least for URLFormat, see previous GitHub link and "Issues" section for error logs), though it looks like now I'm just having syntax issues? I think the problem is on line 18 in the file, if I'm reading things correctly. Any feedback would be helpful. In the meantime, I'm going to try to do some more reading on what syntax I may have gotten wrong. 75.45.55.110 (talk) 17:09, 23 November 2022 (UTC)
You have a (non-lambda) function inside of another function. That's probably not what you want. Bawolff (talk) 20:26, 23 November 2022 (UTC)

Possible to refreshLinks.php without shell access?

I want to use the VIKI extension, but i dont have access to shell. Bedtry (talk) 15:20, 23 November 2022 (UTC)

Open all pages one by one and save them. not good for large number of pages. 5.193.68.230 (talk) 08:44, 24 November 2022 (UTC)
That answer makes no sense. Malyacko (talk) 09:08, 24 November 2022 (UTC)
Not really, but there are some hacky methods.
If you have access to cron, you can use that.
You can use a bot to hit API:Purge, or as the IP suggested, make a null edit to all pages, but that is annoying.
There used to be Extension:Maintenance but i dont think its maintained anymore. Bawolff (talk) 18:55, 24 November 2022 (UTC)

Installation stops at "install"; Is there an error log?

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 mediawiki 1.38.4 on RedHat Linux, and get quite far.

I have the whole LAMP stack installed, and can get through most of the installation of Mediawiki.

But when I get to the "Install" section of https://<internalIP>/mediawiki/mw-config/index.php?page=Install, the page seems to stop.

Is there a installation log kept somewhere? Or maybe an error log? Where should I look to troubleshoot this issue? Techcare.noc (talk) 16:01, 23 November 2022 (UTC)

logs are stored in /var/log 5.193.68.230 (talk) 08:42, 24 November 2022 (UTC)
I know that...
But *which* log am I supposed to look at for the installation of the application? Techcare.noc (talk) 09:56, 24 November 2022 (UTC)
Define "stop". What happens exactly?
I would suggest the php error log. Where its located can depend on your operating system. Make sure its enabled in your php.ini file.
See How to debug for more info. Bawolff (talk) 18:49, 24 November 2022 (UTC)
Hello Bawolff,
when I start the installation of Mediawiki via https://<ipaddress>/mediawiki/, I get "The environment has been checked. You can install MediaWiki.", can follow through all the steps:
  • Welcome to MediaWiki!
  • Connect to database
  • Upgrade existing installation
  • Database settings
  • Name
  • Options
But then I get the prompt [By pressing "Continue →", you will begin the installation of MediaWiki. If you still want to make changes, press "← Back".], and when I acknowledge that, All I get is a screen that says "MediaWiki 1.38.4 installation", the word "Install" underneath it, and the steps I went through so far on the right.
I *would* expect the space under the word "Install" to fill up with steps taken to install the different tables and other bits. But I don't get that.
I'll have a look at the php error log if that helps me any further.
Thank you thus far. Techcare.noc (talk) 10:33, 28 November 2022 (UTC)
I've found the log directory /var/log/php-fpm/ and the file /var/log/php-fpm/www-error.log-20221127 contains the following
[23-Nov-2022 13:05:27 UTC] PHP Notice:  Uncommitted DB writes (transaction from PopulateArchiveRevId::makeDummyRevisionRow) in /var/www/html/mediawiki-1.38.4/includes/libs/rdbms/database/TransactionManager.php on line 540
[23-Nov-2022 13:05:27 UTC] PHP Notice:  DB transaction writes or callbacks still pending (User::insertNewUser, MediaWiki\User\ActorStore::acquireSystemActorId, MediaWiki\User\ActorStore::setUpRollbackHandler) in /var/www/html/mediawiki-1.38.4/includes/libs/rdbms/database/Database.php on line 5592
The last few entries in the mysqld log file are
2022-11-23T15:48:48.320420Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2022-11-23T15:48:48.320468Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
2022-11-23T15:48:48.361247Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060, socket: /var/lib/mysql/mysqlx.sock
2022-11-23T15:48:48.361392Z 0 [System] [MY-010931] [Server] /usr/libexec/mysqld: ready for connections. Version: '8.0.30'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  Source distribution.
No entries from today, it seems. Techcare.noc (talk) 10:43, 28 November 2022 (UTC)
Which of the files is responsible for the execution of this last "install" step?
I'd think there would be *some* kind of log that captures errors in this process. Techcare.noc (talk) 07:41, 1 December 2022 (UTC)
I see there is a new LTS version released today.
I'll see if I fare better when installing that.
I'll also check the PHP hardening I did to see if that will help some. Techcare.noc (talk) 07:43, 1 December 2022 (UTC)
New version, same issue.
And I have no visibility on where the issue lies. Techcare.noc (talk) 09:49, 1 December 2022 (UTC)
looking in the /var/log directory, I find three logs that may be important:
  • /var/log/mysql/mysqld.log
  • /var/log/php-fpm/error.log
  • /var/log/php-fpm/www-error.log
Only in the www-error.log I find interesting data:
[01-Dec-2022 08:57:42 UTC] PHP Notice:  Uncommitted DB writes (transaction from PopulateArchiveRevId::makeDummyRevisionRow) in /var/www/html/mediawiki-1.39.0/includes/libs/rdbms/database/TransactionManager.php on line 583
[01-Dec-2022 08:57:42 UTC] PHP Notice:  DB transaction writes or callbacks still pending (User::insertNewUser, MediaWiki\User\ActorStore::acquireSystemActorId, MediaWiki\User\ActorStore::setUpRollbackHandler) in /var/www/html/mediawiki-1.39.0/includes/libs/rdbms/database/Database.php on line 3757
[01-Dec-2022 09:26:18 UTC] PHP Notice:  Uncommitted DB writes (transaction from PopulateArchiveRevId::makeDummyRevisionRow) in /var/www/html/mediawiki-1.39.0/includes/libs/rdbms/database/TransactionManager.php on line 583
[01-Dec-2022 09:26:18 UTC] PHP Notice:  DB transaction writes or callbacks still pending (User::insertNewUser, MediaWiki\User\ActorStore::acquireSystemActorId, MediaWiki\User\ActorStore::setUpRollbackHandler) in /var/www/html/mediawiki-1.39.0/includes/libs/rdbms/database/Database.php on line 3757
[01-Dec-2022 09:42:26 UTC] PHP Notice:  Uncommitted DB writes (transaction from PopulateArchiveRevId::makeDummyRevisionRow) in /var/www/html/mediawiki-1.39.0/includes/libs/rdbms/database/TransactionManager.php on line 583
[01-Dec-2022 09:42:26 UTC] PHP Notice:  DB transaction writes or callbacks still pending (User::insertNewUser, MediaWiki\User\ActorStore::acquireSystemActorId, MediaWiki\User\ActorStore::setUpRollbackHandler) in /var/www/html/mediawiki-1.39.0/includes/libs/rdbms/database/Database.php on line 3757
in php.ini I have configured the log /var/log/httpd/php_scripts_error.logbut that log does not get created... Techcare.noc (talk) 11:02, 1 December 2022 (UTC)
I'm going to start from scratch, following this article:
Manual:Running MediaWiki on Red Hat Linux
It looks slightly out of date, as Red Hat is now on version 9.0, and PHP is at version 8.1 Techcare.noc (talk) 15:22, 1 December 2022 (UTC)
Everything works now.
Thank you for your help.
It would be nice to have an installation error log though... Techcare.noc (talk) 13:14, 2 December 2022 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Extension support: WindowsAzureStorage

I am in the process of creating a wiki which is hosted in Azure using a docker container and app service. I would like to use the WindowsAzureStorage extension to persist wiki storage. I have followed the install instructions, however I am being thrown the following error when I navigate to "Special Pages":


[bf49979ead08c3a03544c173] /index.php/Special:SpecialPages Error: Class 'WindowsAzureFileBackend' not found

Backtrace:

from /var/www/html/includes/filebackend/FileBackendGroup.php(200)

#0 /var/www/html/includes/filerepo/FileRepo.php(185): FileBackendGroup->get(string)

#1 /var/www/html/includes/filerepo/LocalRepo.php(79): FileRepo->__construct(array)

#2 /var/www/html/includes/filerepo/RepoGroup.php(415): LocalRepo->__construct(array)

#3 /var/www/html/includes/filerepo/RepoGroup.php(387): RepoGroup->newRepo(array)

#4 /var/www/html/includes/filerepo/RepoGroup.php(309): RepoGroup->initialiseRepos()

#5 /var/www/html/includes/filerepo/RepoGroup.php(343): RepoGroup->getRepo(string)

#6 /var/www/html/includes/specials/SpecialUpload.php(65): RepoGroup->getLocalRepo()

#7 /var/www/html/vendor/wikimedia/object-factory/src/ObjectFactory.php(247): SpecialUpload->__construct(RepoGroup, MediaWiki\User\UserOptionsManager, NamespaceInfo)

#8 /var/www/html/vendor/wikimedia/object-factory/src/ObjectFactory.php(152): Wikimedia\ObjectFactory\ObjectFactory::getObjectFromSpec(array, array)

#9 /var/www/html/includes/specialpage/SpecialPageFactory.php(1230): Wikimedia\ObjectFactory\ObjectFactory->createObject(array, array)

#10 /var/www/html/includes/specialpage/SpecialPageFactory.php(1265): MediaWiki\SpecialPage\SpecialPageFactory->getPage(string)

#11 /var/www/html/includes/specials/SpecialSpecialpages.php(53): MediaWiki\SpecialPage\SpecialPageFactory->getUsablePages(User)

#12 /var/www/html/includes/specials/SpecialSpecialpages.php(42): SpecialSpecialpages->getPageGroups()

#13 /var/www/html/includes/specialpage/SpecialPage.php(671): SpecialSpecialpages->execute(NULL)

#14 /var/www/html/includes/specialpage/SpecialPageFactory.php(1378): SpecialPage->run(NULL)

#15 /var/www/html/includes/MediaWiki.php(315): MediaWiki\SpecialPage\SpecialPageFactory->executePath(string, RequestContext)

#16 /var/www/html/includes/MediaWiki.php(912): MediaWiki->performRequest()

#17 /var/www/html/includes/MediaWiki.php(563): MediaWiki->main()

#18 /var/www/html/index.php(53): MediaWiki->run()

#19 /var/www/html/index.php(46): wfIndexMain()

#20 {main}


Any support on how to fix this issue would be greatly appreciated. Many thanks.

Double check that all files from the extension are installed correctly. Maybe try redownloading and reinstalling the extension. Bawolff (talk) 18:48, 24 November 2022 (UTC)

After a certain number of edits using the VisualEditor's LaTeX editor, my server hangs

Whenever I make a serious number of edits, or even just small ones sometimes, my server will hang for hours. I have no idea why this happens. MediaWiki does not respond at all, and there is nothing in the error logs. 73.191.214.102 (talk) 22:31, 23 November 2022 (UTC)

I have tried multiple solutions, it is not ModSecurity, nor is it an error contacting Parsoid. I have tried loading the Parsoid module, and configuring PHP to access more memory. Nothing, absolutely nothing, works. I am using Apache, and it also crashes my Nginx server. 73.191.214.102 (talk) 22:32, 23 November 2022 (UTC)
Rather, this happens solely when I use the VisualEditor to edit math. Otherwise, it is perfectly fine. What always happen is:
  • I am typing math
  • The math stops rendering
  • My server hangs for hours
There are no error logs, no blank page, it just won't respond. 73.191.214.102 (talk) 22:37, 23 November 2022 (UTC)
It is by far one of the most irritating things I have encountered in my entire life. The issue is solved temporarily by restarting the server and continuing, but eventually my server will hang yet again. I cannot continue like this. 73.191.214.102 (talk) 22:39, 23 November 2022 (UTC)
Nginx hangs?
What do the nginx logs say? Are appropriate timeouts configured? Is the nginx process still running?
If its nginx having the error, you might get better advice at a forum specializing in nginx. Bawolff (talk) 18:45, 24 November 2022 (UTC)

global login not established from MediaWiki into WikiData

I have declared global connexion on meta to be connected automatically to the wikis. I logon under MediaWiki => https://www.mediawiki.org but on page
=> https://www.mediawiki.org/wiki/API:Client_code/Gold_standard/fr
when clicking on the 'API Wikidata' link of 'rend disponible l' API Wikidata' i hope to access
=> https://www.wikidata.org/wiki/Special:MyLanguage/Wikidata:Creating_a_bot#Using_Wikidata%27s_API_directly
but it lands on
=> https://www.wikidata.org/wiki/Wikidata:Creating_a_bot#Using_Wikidata%27s_API_directly
without interpreting the clause Special:MyLanguage where I am not connected (no invitation to make a 'reload of the page' to connect)

workaround: Only if I additionally do a manual logon in Wikidata, then I can access to the translated section of the FR API Wikidata page correctly.

Question 1 : i understand that if there is no logon, the default user language is EN, so that there is a break from FR page landing to an EN page, but why WikiData is not awaked by the global connection mechanism to assure continuity from FR page to FR page ?

Question 2: if this case is 'normal' (justify) it would be better to hard code the /fr suffix immediately in the translation or rather use the redundant form =>
=> https://www.wikidata.org/wiki/Special:MyLanguage/Wikidata:Creating_a_bot/fr#Using_Wikidata%27s_API_directly

Thanks -- Christian 🇫🇷 FR (talk) 10:43, 24 November 2022 (UTC)

Getting "error: ElasticaWrite job failed" Message

* MediaWiki version: 1.35.3

* PHP version: 7.4

* Database type and version: mysql 8.0.31


We're getting the below message whenever we run "php maintenance/runJobs.php". The effect being, while the mediawiki page still loads, the contents are not updated. We've tried searching for possible clues to the issues online and did not find anything. Would appreciate any leads, please. Thank you!


cirrusSearchElasticaWrite Special: method=sendData ... t=12 error=ElasticaWrite job failed: Requeued Timtaytango (talk) 11:31, 24 November 2022 (UTC)

Is ElasticSearch running and configured properly? (Or if you dont want to run elastic search, disable the CirrusSearch extension) Bawolff (talk) 18:43, 24 November 2022 (UTC)
Yes, elasticsearch service is running (version 6.8.22, on ubuntu 20.04). We ran a check on the health and the status shows "green" Timtaytango (talk) 06:57, 25 November 2022 (UTC)
I also noticed the following lines in elasticsearch_deprecation.log, consistently being added whenever we run the runJobs php script (not sure if it can be considered a possible cause for the ElasticaWrite job failed messages):
Deprecated field [_retry_on_conflict] used, expected [retry_on_conflict] instead Timtaytango (talk) 07:43, 25 November 2022 (UTC)
This may be due to Elasticsearch having run out of disk space for the indexes at one point, and set them to read-only.
I'm not an Elasticsearch expert, but I did run into this before with some other software that uses it, so this was familiar ground once I realized I was having the same issue with CirrusSearch.
The solution in both cases was to free disk space and/or alter the "high water" or "flood-stage" settings in Elasticsearch, then unblock the indexes as prescribed in this Support desk topic. This seems like something that CirrusSearch could detect, and give better error messages about, or even something that Elasticsearch could give better error messages about, but alas. Here we are, googling the error message.
On the topic of the deprecation warnings in elasticsearch_deprecation.log, I wouldn't worry too much about those. That is a warning to the developers of the CirrusSearch extension (that they need to update their code), not you.
Two years too late, but I hope that helps someone. --Ernstkm (talk) 13:14, 4 June 2024 (UTC)

What's wrong?

After installation MediaWiki 1.35.6 this info:

Error starting session: session_start(): open(/php_sessions/sess_068395adb91a0f14f6d8cae7d362f5b5, O_RDWR) failed: No such file or directory (2)


What's wrong?

Please answer in German language. Thank you. 2003:E7:A703:2302:DCF8:9C15:5FE7:727E (talk) 11:49, 24 November 2022 (UTC)

To start: Why would you install outdated 1.35.6? See Download.
See https://stackoverflow.com/questions/34025899/php-session-start-error-no-such-file-or-directory-found Malyacko (talk) 13:09, 24 November 2022 (UTC)
Upgrade to 1.38.4 was also wrong. Server use PHP 7.4.8, maybe this is the problem. Thanks for help. Bye 2003:E7:A703:2302:DCF8:9C15:5FE7:727E (talk) 17:46, 24 November 2022 (UTC)

API Login Fails

I'm logging in through the API using the following path:

api.php?action=login&format=json


I keep getting this error:


{"login":{"result":"Failed","reason":"Unable to continue login. Your session most likely timed out."}}


Why is this happening? TheManInTheBlackHat (talk) 21:54, 24 November 2022 (UTC)

First thing i would check is if you are sending cookies properly.
Another possibility is that the wiki has session cache misconfigured. Bawolff (talk) 00:06, 25 November 2022 (UTC)
I'm using Python requests, what cookies should I set? Also, where in settings would I look for cache issues? I don't have a cache in front of the server. TheManInTheBlackHat (talk) 00:16, 25 November 2022 (UTC)
You should ensure the bot sends back any cookies that are set on it.
If $wgSessionCacheType is set to something that doesn't work, it can cause problems (e.g. if you set to CACHE_ACCEL, using apcu but apcu.shm_size was set to 0, it would cause problems). If nothing is set, it defaults to the DB, which should be fine. Bawolff (talk) 00:22, 25 November 2022 (UTC)
Genius, that fixed it, thank you. I passed my cookies from the previous API response to the login API call. This is my code if anyone reading this in the future wants it.
----
import requests
token = requests.get("http://192.168.0.2/api.php?action=query&meta=tokens&type=login&format=json")
data = {"lgname": "test", "lgpassword": "test0", "lgtoken": token.json()["query"]["tokens"]["logintoken"]}
d = requests.post("http://192.168.0.2/api.php?action=login&format=json", data=data, cookies=token.cookies)
print(d.cookies)
print(d.text) TheManInTheBlackHat (talk) 00:26, 25 November 2022 (UTC)

MPDF version 6.1 not working with PHP 8

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


Product Version

MediaWiki 1.35.3

PHP 8.0.25 (apache2handler)

MySQL 8.0.26

Lua 5.1.5

Elasticsearch 6.5.4

We are using above & Mpdf 6.1 Extension:Mpdf as erlier we re using php v7.4 . But Now we have upgraded the Php to 8.0 and PDF is not working, done so many changes i.e () to [] ,replaced each() with new function in mpdf file but still facing issues. pls suggest which mpdf version we need to use for pdf .

also when trying to update mpdf to another version facing issues with elastic search

  Problem 1

    - elasticsearch/elasticsearch v6.5.0 requires php ^7.0 -> your PHP version (8.0.25) does not satisfy that requirement.

    - elasticsearch/elasticsearch v6.5.0 requires php ^7.0 -> your PHP version (8.0.25) does not satisfy that requirement.

    - Installation request for elasticsearch/elasticsearch  6.5 -> satisfiable by elasticsearch/elasticsearch[v6.5.0].


As elastic server 6.5.4 is suitable for MW 1.35.3 & ElasticSearch Php Client 6.5 for Elastic Server 6.5.4.


Please suggest what to do for pdf. Pooja2425 (talk) 07:50, 25 November 2022 (UTC)

Warning: Undefined variable $footer in /data/www/html/wiki/extensions/Mpdf/MpdfAction.php on line 39
[Y4BnM7MF2q2VgmHCDaL-kQAAAAE] /wiki/...../&action=mpdf MpdfException from line 297 of /data/www/html/wiki/extensions/Mpdf/vendor/mpdf/mpdf/classes/otl.php: Can't open file /data/www/html/wiki/extensions/Mpdf/vendor/mpdf/mpdf/ttfontdata/dejavusansmono.GSUBGPOStables.dat
also header is not coming in pdf when generating pdf in some pages, alignment issue also there.
As in php 7 supporting int+float+string , but not php 8. i.e ( 10px+27px +auto ) so many issue in mpdf 6.1 libary code in php 8. Pooja2425 (talk) 08:03, 25 November 2022 (UTC)
Neither of those errors you posted sound like php8 issues.
You should probably take this up with the extension maintainer. Bawolff (talk) 18:57, 25 November 2022 (UTC)
As said, there are multiple different problems here, some unrelated to Mpdf. A good practice when reporting bugs is to dissociate independent issues.
About the strict issue of PHP 8 for the extension Mpdf, see phabricator:T227479 and the linked Gerrit patch. ~ Seb35 [^_^] 14:49, 11 June 2024 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Dump loading order for en Wikipedia

I want to restore dumps for english wikipedia (https://dumps.wikimedia.org/enwiki/20221001/). In what order should I do it? First sql dumps, and then xml?

The dumps contain *-pagelinks.sql.gz, *-imagelinks.sql.gz, etc. Do I need to do a refreshlinks.php if the dumps already have these datasets? 31.44.94.162 (talk) 14:50, 25 November 2022 (UTC)

I dont think the order matters as long as the importer is not refreshing links (if it was, the .sql files are pointless).
If you import the .sql link tables, running refreshLinks.php should be unnessary. Also refreshLinks is very slow, running it on an enwikipedia import will probably take the rest of your life. Bawolff (talk) 15:58, 25 November 2022 (UTC)

LinkedWiki problems (SMW)

Is it possible to query multiple endpoints at once (for example, Wikidata, Europeana and our own pages) and then represent the returned properties in a map or data table, as it is possible to do with a single endpoint? I wanted to be able to show common properties between these endpoints and each of their entries. Jdm.oliveira (talk) 14:55, 25 November 2022 (UTC)

How to exclude noindex pages from sitemap?

I have some pages that should not be indexed. How do I exclude them from the script generateSitemap.php?

In fact those pages include <meta name="robots" content="noindex"/> in their head. This is set with help of the Extension:WikiSEO. Stefahn (talk) 15:09, 25 November 2022 (UTC)

I also tried with the magic word __NOINDEX__, but no luck.
Any idea? Stefahn (talk) 16:08, 1 December 2022 (UTC)

1.38.4 not showing any skin.

I installed everything correctly as I have in the past a thousand times, and for some reason there is no skin showing at all. Please, if anybody can help me get this sorted, I'd be forever grateful.


http://direfall.com/index.php?title=Main_Page Hydrofox78 (talk) 23:27, 27 November 2022 (UTC)

See the network tab of your browser's developer tools: There is a 500 Internal Server Error. Malyacko (talk) 00:19, 28 November 2022 (UTC)
I have working wikis that have the same internal server error. But those wikis still show up fine. This is strange. I've done a complete fresh install again with entirely new databases. I also made sure PHP is defaulted to 8.1. I'm not seeing a single reason why this should be happening. Hydrofox78 (talk) 00:31, 28 November 2022 (UTC)
look in your web server or php log. See How to debug.
> I have working wikis that have the same internal server error
That is very unlikely. Your main css is giving a 500 error. That is obviously going to break your wiki. Bawolff (talk) 07:01, 28 November 2022 (UTC)

global login not established into WikiData

1. Be logged out on all MediaWiki wikis

2. I login userId/pw to Mediawiki using icon '...' from page => https://www.mediawiki.org/wiki/Localisation/fr ; ok, FR page displayed, connected

3. from mediawiki i access the Incubator page  : Ajouter un wiki dans une nouvelle langue / Manuel d'aide de Wikimedia Incubator => https://incubator.wikimedia.org/wiki/Special:MyLanguage/Help:Manual

4. I access https://incubator.wikimedia.org/wiki/Help:Manual

5. Not logged automatically (no 'reload' popup, ..strange) ; i hit manually ... Login on the Incubator page ; result: ok incubator awakes, connects and reloads the EN page automatically

6. Question 1: why incubator doent present the popup 'Reload the page' to be connected ?

7. Remark 1: I have lost continuity because I request the /fr page and I get the EN one when connected

8. I select the FR page in incubator => https://incubator.wikimedia.org/wiki/Incubator:Wikidata/fr

9. At page bottom (Liens externes / Introduction à Wikidata) i access the wikidata page : => https://www.wikidata.org/wiki/Special:MyLanguage/Wikidata:Introduction

10. nok, wikidata is not awaked; hit '...' and Logon have no effect ; Must redo a manual logon in wikidata (global userID + pw) to be connected in wikidata

11. Question 2: why my declared Central connexion on Meta does not operate/propagate onto wikidata  ?

--Christian 🇫🇷 FR (talk) 12:30, 28 November 2022 (UTC)

Web browsers locked down third party cookies which may reduce the effectiveness of the central login. Bawolff (talk) 17:20, 28 November 2022 (UTC)
The same problem occurs from Meta; example for translation of image of the day alert received in MW: MW=> Meta is ok to reach the article (connect with reload), META => Wikidata is not ok to update the elements (does not propagate and you must do manually).
Which manual action should i do (or have forgotten) for Wikidata no longer bother me with password ?
Thanks. -- Christian 🇫🇷 FR (talk) 11:23, 9 January 2023 (UTC)

Update.php fails for 1.38.4

After upgrading Ubuntu from 22.04 to 22.10 my local wiki with version 1.36.2 failed because Apache2 did not find /etc/apache2/mods-enabled/php7.4.load /usr/lib/apache2/modules/libphp7.4.so. I installed PHP8.1 and enabled it for Apache2. Now mediawiki 1.36.2 started but with a number of messages like mediawiki 1.36.2 ... deprecated. Therefore I started to upgrade to 1.38.4. I downloaded the tar and extracted it into a new directory. Then, according to the documentation I moved my old extensions directory into the new directory. A lot of files where thus overwritten.

Then I run php update.php

../maintenance$ sudo php update.php

[sudo] password for tpollak:

MediaWiki 1.38.4 Updater

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

InvalidArgumentException from line 491 of /var/www/html/mediawiki-1.38.4/includes/libs/rdbms/database/Database.php: Wikimedia\Rdbms\Database::getClass no viable database extension found for type 'mysql'

As it worked before the upgrade, I do not understand what error there is (other apps using MySQL work).

Can you help me? TPollak (talk) 17:04, 28 November 2022 (UTC)

Php uses separate config files for cli and web server. It probably means that mysql is disabled in the cli (i.e. the php.ini file is missing the line to load the mysql extension). Web stuff might still work due to using a different config file. Bawolff (talk) 17:18, 28 November 2022 (UTC)
The problem is solved. However uncommenting extension=mysql in phph.ini did not solve it. As a comparison showed that my settings for PHP7.4 included the so but not 8.1 I installed the mysql extension with "sudo apt install php8.1-mysql". Now I could execute "php update.php" and restart apache2 service. The wiki is now avalable. TPollak (talk) 15:38, 5 December 2022 (UTC)

The revision #0 of the page named "x" does not exist.

I get this error for a specific page (MW 1.31) without following a history link.

The revision #0 of the page named "x" does not exist.

This is usually caused by following an outdated history link to a page that has been deleted. Details can be found in the deletion log.


When I try to edit and save, I get the same error and/or


Someone else has changed this page since you started editing it. The upper text area contains the page text as it currently exists. Your changes are shown in the lower text area. You will have to merge your changes into the existing text. Only the text in the upper text area will be saved when you press "Save changes".


But when saving and then accessing the page I get the same as the first error. Spiros71 (talk) 19:24, 28 November 2022 (UTC)

Some sort of DB referential integrity error.
Most common cause is that update.php didn't do the actor migration correctly (see Manual:cleanupUsersWithNoId.php, manual:migrateActors.php) Bawolff (talk) 06:01, 29 November 2022 (UTC)
The migration was many years ago... Is there any solution to this? Nuking the page? Not sure what parameters to include in Manual:CleanupUsersWithNoId.php. I tried php maintenance/cleanupUsersWithNoId.php --prefix '*' --table user
but this did not change anything.
I can see these: https://phabricator.wikimedia.org/T249185 Stackoverflow Spiros71 (talk) 09:33, 29 November 2022 (UTC)
i mean, if it was many years ago, but just happening now, the cause is probably different.
You need to figure out what is wrong with db. Basically find the entry in the page table for that page and the corresponding revision entry, and see if anything it references is 0 or missing. Bawolff (talk) 16:15, 29 November 2022 (UTC)
It may have been there all along, but just now I discovered it.
The first screen from a working page, second from dodgy one
https://ibb.co/8sDJ2J5
https://ibb.co/tw6tydF
Revision table
https://ibb.co/RDGbmnc
I can see in a working revision table entry the rev_parent_id has a value, whereas in the non-working one it is 0 but I guess this only means that there are no other revisions for that page. Spiros71 (talk) 17:05, 29 November 2022 (UTC)

Wiki family and redirect issue

Hi. I was trying to setup a wiki farm (family) on my hosting. I've created two subdomain, placed installation files to one, and set other one's Document Root to the subdomain where installation is located.


But when I try to enter second subdomain, it redirects to installation subdomain instead of showing second wiki.


Any idea what can cause this on MediaWiki's side? 159.146.29.169 (talk) 20:00, 28 November 2022 (UTC)

Check $wgServer in LocalSettings.php Bawolff (talk) 00:04, 29 November 2022 (UTC)

Is it possible to have templates parse individual characters from a parameter?

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.


To try and explain what I want, in the clearest manner possible:

I have a template, Song.

I have a parameter, songname.

I wish to alter the template so it will automatically take the first letter of the songname parameter (i.e. if the song's name is "Jessica", then it will take the "J", and that will allow me to create a sub-parameter that will then link to a page called "List of music featured in automotive journalism media/J", which will then have (#songname) appended to the end so it automatically jumps to the relevant song in that article.

Thanks in advance. AlexGRFan97 (talk) 23:19, 28 November 2022 (UTC)

I would reccomend extension:Scribunto (lua) for the cleanest solution.
An alternative is the string functions part of extension:ParserFunctions (they are disabled by default and need a config setting to enable) Bawolff (talk) 00:04, 29 November 2022 (UTC)
Right, the second option sounds good to me!
My only question how would I then use the substring as a parameter of its own once it's been generated?
So I'd imagine it would be set up like:
{{#sub:{{{songname}}}|1}} and that would get me the substring I seek without modifying the data already input. So if the songname variable was "Jessica", the "1" would denote it to sample only the J.
I would then append a link to [[List of music featured in automotive journalism media/{{{substringvarname}}}#{{{songname}}}]] in the template. If I'm right, it should just be a case of putting the "sub" template in the place of "substringvarname", but I could be wrong. AlexGRFan97 (talk) 13:07, 29 November 2022 (UTC)
Yes Bawolff (talk) 16:13, 29 November 2022 (UTC)
Right, that's sorted.
For future reference, in case anyone wants to do what I did, you need to use {{#sub:{{{songname}}}|0|1}}so it takes only the first letter of the phrase, as opposed to just "1" on its own, which takes away the first letter and leaves the rest of the string intact.
Solved! AlexGRFan97 (talk) 20:53, 29 November 2022 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Wiki farm recommendation?

Might be the wrong place to ask but I'm finding it difficult to find a wiki farm that suits my needs. Preferably, I'd want something run with MediaWiki, with access to the Vector skin (Wikipedia style) and all the basic functions and options for extensions. Miraheze seems to be the closest to what I'm looking for but I really hate their hands-on approach and would rather have something moderation-free. ShoutWiki was another good suggestion but it's currently down and has been for a while. Could anyone help me out here? Thanks 31.205.38.26 (talk) 00:39, 29 November 2022 (UTC)

Shoutwiki is up http://www.shoutwiki.com/wiki/Main_Page Bawolff (talk) 02:31, 29 November 2022 (UTC)
Is self-hosting not an option in your current situation? I'd consider a web service that specialises in MW like A2, pay the extra premium for your first year, and then you can relax and pay comparatively pennies for however long you plan to run your website for. Plus, no moderation and no rules.
Skins are also just about the easiest thing to install on MW. AlexGRFan97 (talk) 20:56, 29 November 2022 (UTC)

template is deleted accidently

Hi,

Team one template is deleted by user, so facing issue in lot of wiki page Titles.

tempalte deletion issue

please suggest how we can restore deleted templates.?? Pooja2425 (talk) 14:07, 29 November 2022 (UTC)

Use Special:undelete on your wiki Bawolff (talk) 16:12, 29 November 2022 (UTC)

Wide screen button

I have notice that MW sites (including this one) has a button in the bottom-right corner. Could some one let me know how to have it at my wiki? Fokebox (talk) 14:53, 29 November 2022 (UTC)

Maybe part of vector-2022? Im not sure. Bawolff (talk) 16:11, 29 November 2022 (UTC)
I have vector-2022 skin at my MW 1.38, but can't see this button or any settings to switch it in on. Fokebox (talk) 11:04, 30 November 2022 (UTC)
Please share image of the button. – Ammarpad (talk) 13:17, 30 November 2022 (UTC)
Here it is:
Wide screen button at Mediawiki
Fokebox (talk) 14:34, 30 November 2022 (UTC)
The button is part of Vector 2022 / Desktop Improvements , as a common dislike of existing community members was the limited content width. Malyacko (talk) 13:58, 30 November 2022 (UTC)
How switch it on at my wiki? Fokebox (talk) 14:34, 30 November 2022 (UTC)
It seems daft that hiding the sidebar here doesn't move the left margin across to the left, so this is an improvement! From the link above it looks like it's not fully ready yet. Jonathan3 (talk) 20:30, 30 November 2022 (UTC)
Maybe you need the master version of the skin, or something like that Bawolff (talk) 05:12, 1 December 2022 (UTC)
Do we have information how to include this button now? I have installed MW 1.39.3. Fokebox (talk) 08:24, 18 April 2023 (UTC)

Looking for subsection text

For an extension I need to obtain the parsed and fully rendered, formatted HTML from a subsection.

I have a content object in `$content` and can get sections via `$content->getSection("3")` and can proceed with $`getText()` but what I actually need is something like `$content>getSection("3.1")`

Unfortunately this returns `false`.

However, I do get the text of the entire section via `$content->getSection("3.0")->getText()` so I am a bit confused...

This is with 1.38.0 (e5cd267) 217.95.165.151 (talk) 15:47, 29 November 2022 (UTC)

I'm not 100% sure, but i believe this uses just incrementing section numbers not hierarical.
So for example:
==A==
1
===B===
2
===C===
3
==D==
4
Section 1 includes all of section A including B and C (but not D), where section 2 is just B, section 3 is just C and section 4 is just D. Bawolff (talk) 23:52, 4 December 2022 (UTC)
Yes. And that's the perfect explanation. I had incorrectly assumed that the sectional structure is reflected in this API call. Thanx. Very helpful 87.163.207.87 (talk) 16:53, 5 December 2022 (UTC)

Variable number of parameters in template?

How do I make a template that can accept any number of arguments? I want to make a template that will call another template for every argument provided, but I'm not sure if this is possible to do without dropping down to Lua. RPI2026F1 (talk) 16:32, 29 November 2022 (UTC)

Its very annoying to do without lua. Its probably possible, but save yourself the headache and just use lua. Bawolff (talk) 21:28, 6 December 2022 (UTC)
Seems likely. Is there a guide to learning MediaWiki Lua anywhere? RPI2026F1 (talk) 22:09, 6 December 2022 (UTC)
Most of lua is generic, so any tutorial should cover the basics.
There is Lua/Tutorial although i dont think its that great of a tutorial Bawolff (talk) 22:18, 6 December 2022 (UTC)
I was more interested in learning the MediaWiki-specific extensions to lua. RPI2026F1 (talk) 02:29, 7 December 2022 (UTC)
https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Scribunto_libraries is probably the best reference for that. Bawolff (talk) 03:27, 7 December 2022 (UTC)

DynamicPageList and Categories

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, due to a lack of community-Contributors (content is more or less fine) I would have liked to work on some automatic structuring-"tools" based on categories and DPL on dewikibooks. Now I read, DPL has problems (and possibly might be abandoned in the future? Compare phab:T287380) and I found w:en:Category:Overpopulated_categories . So I'm worried, if my ideas will be feasible at all.

What I would like to do: via categorization of pages sort the structure of Wikibooks more or less automatically, so that content contributors need only to worry about categorization and not editing community-pages. Hence less edits, less errors, less archive-work. To do this and to have some kind of control of the visual representation I would have liked to use DPL. Because of the above mentioned problem I don't think this might be a good idea. Now, if I discard the idea of having some kind of control on the visual representation, I could use category-pages itself. But if those are limited in some way it might be a bad idea for the future. Not that I expect to run into problems in the near future, but there might come the time, when somebody will. Restructuring then might become a pretty big task. So, if my ideas do not have any structural benefit for the future (aka "exploding" categories instead of "exploding" other pages) it might be a good idea to retire the idea and think about something else.

So two short questions:

  1. can someone elaborate in short where the problem is with dpl, because I'm not quite sure if I understand it correctly? And as a follow up: Would you recommend not using it? The answer here is probably not really crucial, because I already think it's a good idea not to use it extensively. But any explanation here will be highliy appreciated.
  2. is there a physical limit on how many pages a category can contain, and if so, which is it and where can I read up on this topic?

Thank you very much for any help anyone can provide. Best regards, HirnSpuk (talk) 18:16, 29 November 2022 (UTC)

Honestly, i would just use DPL for now. There is unease with the extension, but as of right now there doesn't seem to be any positive plan to get rid of it.
So the problem with the extension: If you combine (intersect) multiple categories it does that inefficiently for large categories. i.e. It works by loading all the entries in the first category, and checking each one to see if it is in all the other categories[1]. If the first category has 200 entries, this is fine. If instead it has 2 million entries, this is not so fine.
However if you are only using DPL with 1 category, then none of this applies. DPL just looks at the entries of the category it needs and displays them. It takes the same amount of time regardless of how big the category is. [And the sorting method is categorysortkey or categoryadd. Sorting by lastedit, length, created may require loading the whole category]
Anyways, de.wikibooks.org is really small, so things should be fine no matter what you do.
In conclusion, I would suggest using DPL if its useful. Keep in mind that should de.wikibooks.org really take off and increase in size by 10 or 20 times, you might have to change your templates if they use DPL with multiple categories intersecting.
As far as the drama goes with ru.wikinews.org - A lot of that was due to the community not being very cooperative with developers. In the very unlikely event that something happens and developers tell you you need to change something due to performance concerns, just change whatever needs to be changed. As they say on en wikipedia at w:Wikipedia:Don't worry about performance - generally speaking you shouldn't worry too much, but if something does happen, just cooperate with the people who are trying to fix whatever it is.
For question 2: No limit. de.wikibooks only has about 70,000 pages, so i suppose at most you could have a category with 70,000 pages in it (And currently the biggest is much smaller [2]). Most of MediaWiki is designed so that if you look at a category, mediawiki only has to load the first 200 entries not the entire thing, so it doesn't matter much how big they get (DPL when intersecting multiple categories is an exception to this).
[1] - Please note, I'm oversimplifying a lot here, and strictly speaking this is not quite true, but its mostly close enough. Bawolff (talk) 20:08, 29 November 2022 (UTC)
Thank you very much for the explanation, that's exactly the "simplified" version I was looking for. Regarding "oversimplification", just one follow-up for question 2:
  • So I'm getting it right, there's no limit at all? Not only "no limit, because de.wb is small"? Is this in any way server-cost relevant if categories are large? Can I read up on this somewhere?
That said, another thing regarding oversimplification, being curious and seeing that you might have deeper insights, please feel free to elaborate further, if you'd like. I'm electrical engineer by training can program a little and might get it, if I'm not forced to look at a lot of pages figuring out the causal relations by myself. Use any of my talk pages, if you have the time and would like to.
Another side-note: I didn't follow the mentioned "drama". It might not be a question of "wanting to cooperate", but of availability, activity in the wikimedia-universe, enough spare time and ability (regarding rights and/or knowledge). Sure, I'd like to cooperate, but I might not be able to guarantee it because of "real-life-constraints" ;-). Thanks again, regards, HirnSpuk (talk) 12:06, 30 November 2022 (UTC)
There are eventually some limits - servers would eventually run out of disk space and that sort of thing. However, we're not really very close to those limits. There's also some softer limits - as the dataset gets bigger, less of it is going to be cached in ram at any given time, which can have a performance impact. Similarly, that's why large wikis like English Wikipedia get their own DB server, and smaller wikis share a DB server.
Currently the largest category is on commons with 34 million entries [3].
The way databases work, is you have the data, and then a bunch of "indexes" of the data. The index is just a sorted list of all the data based on some criteria. In the categorylinks table there are a bunch of indexes but the important one for viewing a category page is the one on (cl_to, cl_type, cl_sortkey, cl_from) which basically sorts all the entries in order based on the name of the category, followed by the page type (media, subcategory or "normal" page) and the sortkey/name of the page in the category. So if you want to display the first 200 normal page entries of a category, the DB basically just finds where that category begins in the index (Taking O(log N) time), and then starts reading 200 entries on that list in order starting at that point. Since its already in sorted order, the database can just look at the first 200 entries and stop, instead of looking through the whole category. If you're interested in the nitty gritty details on how this works see w:B-tree.
However, for DPL where multiple categories are specified, you can't really do it like that since you have to find the pages that are in all specified categories. The best case scenario is still relatively cheap, but the worst case might involve looking through all the entries in the category.
The situation on russian wikinews, was that they mass imported a lot (Like half a million) pages from a freely-licensed russian news source. All of these pages had an infobox on them with a DPL. The increasing size of the categories made these DPLs slow. Additionally, importing all these articles quickly, meant they all had to be rendered at the same time. Most of MediaWiki assumes database queries are very quick, and that most of the time rendering is spent in the CPU doing non-database stuff. This wasn't really true in this situation, as a result the DB started to get backed up, and requests to it piled up overwhelming it, making everything even slower.
Anyways, after that was dealt with, a few months later russian wikinews did another similar import. Although there may possibly have been language barrier issues, i don't know, at the time it seemed like they did it very uncautiously, doing the import as fast as possible without any consideration of possible risks. This caused the same DB problem, but also because the DB was so slowed down, normal requests to projects using that DB sort of hanged. As a result all the PHP servers were stuck waiting on the DB to respond, and web requests started to pile up, which caused things to spill out of control even further, triggering downtime not just for sites using that DB server, but all wikimedia websites. Anyways, when russian wikinews was told they had to stop, they got very angry, called all the devs incompetent, and wrote a "news" article about how WMF devs are screwing over ru wikinews. This didn't really endear them to the developers involved, who were not too happy to have to deal with a second outage caused by the same people doing the same thing. End result was that DPL was removed from ruwikinews (After all, it was only designed for small wikis, and ruwikinews was no longer small after the mass import). Additionally some changes were made to DPL that was hoped would improve performance. Recently made DPL queries were cached for a short time, as a big part of the problem was doing the same DPL query over and over for templates used on many pages. There was an attempt to use [PoolCounter]] to limit concurrency, but that wasn't enabled due to a bug that we couldn't figure out. A timeout to DPL queries was also added.
The nitty gritty technical details of the russian wikinews situation is at wikitech:Incidents/2021-07-26_ruwikinews_DynamicPageList
Anyhow, the moral of the story, if you do something that takes down Wikimedia websites, be really careful before doing it a second time, and don't get angry when someone tells you to stop. Bawolff (talk) 04:50, 1 December 2022 (UTC)
You Sir are a steely eyed wikimedia man :-)! Thank you so much for the perfect answer and explanation, I really sincerely appreciate your time and effort you put into answering my question! Have a nice christmas time of year! Best regards HirnSpuk (talk) 14:46, 1 December 2022 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

[[::]]

We have table that have cell which reference data from another page by using [[::]]. I'm having trouble implementing this at another part of the site. Is there documentation on this? 73.74.209.90 (talk) 22:09, 30 November 2022 (UTC)

Is this a extension:semantic MediaWiki question? Bawolff (talk) 02:48, 1 December 2022 (UTC)