Jump to content

Project:Support desk/Flow/2022/04

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

Latest Wikidata Toolkit Client

Hi,

I'm trying to download Wikidata using a standalone client (version 0.8.0 - last one I see). It errors on lexeme and other id types. Where can I get a newer (~ 0.13.0) standalone wdtk client jar?

Thanks,

Kiran 2600:1700:CCD0:D920:3C38:8BBD:6BAB:A9B2 (talk) 00:39, 1 April 2022 (UTC)

If you see something somewhere, please provide links so we can all make sure we talk about the same thing. Thanks! Malyacko (talk) 05:15, 1 April 2022 (UTC)
Sorry about missing details.
Following instructions on Wikidata Toolkit/Client to download (03302022) wikidata contents using 0.7.0 or 0.8.0 jar client reports below errors and aborts:
--
2022-03-31 22:40:27 ERROR - Error when reading JSON for entity: Could not resolve type id 'lexeme' into a sub
type of [simple type, class org.wikidata.wdtk.datamodel.json.jackson.JacksonTermedStatementDocument]: known t
ype ids = [JacksonTermedStatementDocument, item, property]
at [Source: java.util.zip.GZIPInputStream@2b4a2ec7; line: 2, column: 2]
2022-03-31 22:40:27 WARN  - Entering recovery mode to parse rest of file. This might be slightly slower.
2022-03-31 22:40:27 WARN  - Skipping rest of current line: type":"statement","id":"L4$d4a63d17-43ea-749d-5860
-21b90feb83f7","rank":"normal"}]},"forms":[{"id":"[...]BB8","rank":"normal"}]}}],"lastrevid":1438080201}
-- WK Rainman (talk) 15:02, 1 April 2022 (UTC)
Release notes for subsequent releases (e.g. 0.9.0) add: basic support of Wikibase Lexeme
However Subsequent releases are missing Wikidata Toolkit Client jar file.
I'm looking for the latest Standalone Wikidata Toolkit Client (or alternate programs) to successfully extract the Wikidata contents.
Thanks. WK Rainman (talk) 15:04, 1 April 2022 (UTC)

Issue upgrading from 1.35.5 to 1.35.6

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'm upgrading from 1.35.5 to 1.35.6 using terminal in OS Monterey. Have expanded patch file MediaWiki-1.35.6.patch into main MediaWiki directory and have used patch -p1 --dry-run -i mediawiki-1.35.6.patch to upgrade. Have done this many times with previous upgrades with no issue. This time I get the error -bash: patch: command not found. Have tried on two Macs and still same issue. Is it me or a server issue? Leeshore1966 (talk) 07:49, 1 April 2022 (UTC)

patch should be at /usr/bin/patch so it is strange if it cannot be found. Maybe you need Xcode developer tools installed ? I don't have a clean Mac here to check that with —TheDJ (Not WMF) (talkcontribs) 09:54, 1 April 2022 (UTC)
patch is in /usr/bin Leeshore1966 (talk) 13:08, 1 April 2022 (UTC)
All sorted = was a server side issue at my web hosting Leeshore1966 (talk) 17:25, 1 April 2022 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Fatal exception of type "Error"

Hello,

I installed my mediawiki 1.37.1 one time on a localhost and one time on a webserver.

The installation was completely succesfull on the localhost and on the webserver (bplaced) I got the Fatal exception of type "Error". Can you support me on this matter?


Regards 2A02:8388:1980:FB80:6999:435A:94D6:8DB4 (talk) 12:12, 1 April 2022 (UTC)

Read Manual:How to debug and come with a more descriptive error message Ciencia Al Poder (talk) 12:59, 1 April 2022 (UTC)

Mediawiki Wiki Farm Setup

Hello! I been using Miraheze and Fandom for sometimes now and I wanted to advance further by hosting my own wiki and wiki farm like Fandom and Miraheze. I found this article:

Manual:Wiki family

I wanted to use the basic principle (is everything in the pages needed to be follow or there are a few ways to start a wiki farm?). Unfortunately, I face some question and issues and I hope everyone could help me:

  1. Does I hv admin access on all of my wiki when I installed it? Like in Wikipedia, there are stewards that hv access to all wiki?
  2. Could I implement new settings from my settings and all wiki automated hv the new settings like extension and etc?
  3. How to start a new wiki in my wiki farm? Small Pig reporter (talk) 15:10, 1 April 2022 (UTC)

Issues with Minerva and MobileFrontEnd

I seem to be having issues with Minerva and MobileFrontEnd. It seems as though when using MobileFrontEnd (or indeed the Minerva skin at all), it doesn't take the value of the main page as the main page and, therefore, when Google indexes pages, (using Google Mobile Bot or whatever), it is indexing my wiki mainpage as " — wiki name" without anything at the beginning of the -.

Is there any way to force Minerva to read the value of the main page and pass it when using mobile? 87.114.79.233 (talk) 17:22, 1 April 2022 (UTC)

Hi, please see "Post a new question" in the sidebar Malyacko (talk) 11:21, 2 April 2022 (UTC)
This is a known issue, that is fixed in 1.38: see phab:T305285. (Also phab:T265892). Mainframe98 talk 12:08, 2 April 2022 (UTC)

Re using collected X and Y Coordinates in Maps extension

MediaWiki-1.37.1 PHP -7.4.28 (fpm-fcgi) Page Forms - 0.6 Maps 9.0.7

I have a form that I am using to collect coordinates in the X and Y format. Once that is collected I would like to show that into a map that is also part of the form. The snippet of the wiki mark up is as below and it does not work. The map does not pull the coordinates supplied.

{{{for template|Location}}}

{| class="formtable"

!Title: |{{{field|Title|hidden}}}

|- !Ycoord: |{{{field|Ycoord|size=50|placeholder=The Latitude of the Location }}}

|- !Xcoord: |{{{field|Xcoord|size=50|placeholder=The Longitude of the Location }}}

|-

|} {{{end template}}}

{{#display_map:Ycoord Xcoord|scrollwheelzoom=off}} Gachangi (talk) 12:30, 2 April 2022 (UTC)

You cannot do this, unless you feed the variable to one and the same Lua module or template. State is only being kept within one and the same execution of a template and/or module. —TheDJ (Not WMF) (talkcontribs) 09:03, 4 April 2022 (UTC)

How to read the entire category tree of my website in a tree like fashion?

MediaWiki 1.36.1

How to read the entire category tree of my website in a tree like fashion?

Similar to directory tree with tree command in unix-like systems? 79.180.118.152 (talk) 12:40, 2 April 2022 (UTC)

Closest is Extension:CategoryTree Bawolff (talk) 19:55, 2 April 2022 (UTC)
I need an entire map, a "huge" shell output which I could redirect to a file, or, perhaps even more piquant --- a PDF document which I could scroll both horizontally and vertically.
Ain't that somethin'. 79.180.118.152 (talk) 16:31, 4 April 2022 (UTC)

MediaWiki has not worked for me.

I have not been able to create an account and log into the WhitneyResearchGroup page powered (or not) by MediaWiki. Any assistance would be greatly appreciated.

Thanks,

Philip Whitney

PhilipWhitney1956

philip@whitneymc.com 68.90.146.222 (talk) 15:16, 2 April 2022 (UTC)

Whatever website this refers to, you need to contact the people running that website. That's not us. Malyacko (talk) 16:26, 2 April 2022 (UTC)

I can't upload my picutre on Wikipedia

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 my VDC: https://developer.valvesoftware.com/wiki/User:TheBlokker Account and

  1. I have a old account on Wikipedia: Name = TheBlokker, i can't change my password (No e-mail)
  2. It's say problem with CC. TheBlokkerYT (talk) 19:22, 2 April 2022 (UTC)
Not every wiki is wikipedia. If you have a problem with the valve software wiki, please contact their staff. —TheDJ (Not WMF) (talkcontribs) 09:06, 4 April 2022 (UTC)
ok TheBlokkerYT (talk) 07:17, 25 May 2022 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Paragraphs added after infoboxes

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 two infoboxes (musicals and plays) that add 2 or 3 paragraphs with breaks in them after the infobox.


Here's an example of the Musical:

https://jaxplays.com/wiki/Bonnie_%26_Clyde_(musical)_(2022)


Here's an example of the Play infobox:

https://jaxplays.com/wiki/Radio_Golf_(2020)


I've tried everything I can think of to fix it, including stripping my Cargo customization and changing it back to the vanilla version from wikipedia, but every time it still has

<p><br></p>

<p><br></p>

<p><br></p> RayHollister (talk) 02:02, 4 April 2022 (UTC)

Your Infobox musical templates has several newlines included at the end, because the <nowiki><noinclude> and <includeonly> Ciencia Al Poder (talk) 08:00, 4 April 2022 (UTC)
Thanks for taking a look at it Ciencia. I feel like you got cut off there. You mentioned <nowiki>, did you mean <noinclude>? RayHollister (talk) 14:51, 4 April 2022 (UTC)
LOL I answered my own question by trying to enter the same code. I took out the extra includeonly and noinclude that I had added for Cargo, and it still created the extra linebreaks and paragraphs, but I just realized I never purged the cache. I'll give that a try and see if it fixes the issue. RayHollister (talk) 14:53, 4 April 2022 (UTC)
noinclude and includeonly tags, that's what I wanted to post Ciencia Al Poder (talk) 15:25, 4 April 2022 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

How to Install Proton Service for Media wiki for PDF Export

I Installed "Extension:ElectronPdfService" in media wiki. they are saying to install Proton and RestBase. But I am not getting any video or link how to install and use Proton for PDF Export in Mediawiki.

Can you please help me to resolve this issue. 168.149.166.48 (talk) 04:25, 4 April 2022 (UTC)

Fornthe start, please check "Post a new question" in the sidebar, and link to docs you're following. Thanks. Malyacko (talk) 05:34, 4 April 2022 (UTC)

installation de mediawiki

Erreur interne MediaWiki 1.37

L'installation de certaines extensions PHP est nécessaire.


Bonjour je reçois le message ci-dessus lors de l'installation. Comment je peux le résoudre ?Je suis Windows 10 213.36.7.9 (talk) 09:23, 4 April 2022 (UTC)

Does the information at Manual:Installation requirements help? Jonathan3 (talk) 22:03, 4 April 2022 (UTC)

Export to DPL

Dear ∀, Is there a way to hand certain page content to the DPL output, e.g. a #var or a template with its current parameter values? Or more generally, can I export a variable or current template representation, so it can be processed anywhere else; without transcluding the complete page? Thank you in advance! Yours, Ciciban (talk) 10:52, 4 April 2022 (UTC)

You've lost me but could you give an example of what you want to achieve? Jonathan3 (talk) 15:40, 6 April 2022 (UTC)
@Jonathan3: Thanks for your reply.
Imagine, every page that is being collected with my DPL-script contains a #var:myvar, or, if necessary, #var:myvar{{PAGENAME}}.
How must the DPL-output be defined, so it shows the value of #var:myvar on the respective page?
Thank you in advance.
Yours, Ciciban (talk) 08:59, 7 April 2022 (UTC)
Could you explain by giving a concrete example? Unless someone else replies in the meantime :-)
Is it an extension that introduces the #var thing? I don't think DPL3 can get that sort of thing. It can display the contents of page sections. Maybe that would help?
Otherwise, you could try Cargo. Each page can store data for various fields, and a query can display the page title alongside values for any of those fields. So if you had a page each for 100 books, each page could have author and date fields, and you could create a table with column headings Book (i.e. page title), Author, Date. Jonathan3 (talk) 14:04, 7 April 2022 (UTC)

Why do I see &#x3c;noinclude&#x3e;{| class="wikitable" ... instead of {| class="wikitable" ... ?

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.


Something strange seems to have happened from my XML Wikipedia imports. For example comparing:

https://en.wikipedia.org/w/index.php?title=Template:Site_active&action=edit

   <noinclude>{| class="wikitable"
   |-
   |</noinclude>style="background: #9EFF9E; vertical-align: middle; text-align: {{{align|center}}}; {{{style|}}}" class="active table-siteactive"|{{{1|Active}}}<noinclude>
   |}
   {{Documentation|Template:Table cell templates/doc}}
   </noinclude>

to

https://moasspedia.org/w/index.php?title=Template:Site_active&action=edit

   &#x3c;noinclude&#x3e;{| class="wikitable"
   |-
   |&#x3c;/noinclude&#x3e;style="background: #9EFF9E; vertical-align: middle; text-align: {{{align|center}}}; {{{style|}}}" class="active table-siteactive"|{{{1|Active}}}&#x3c;noinclude&#x3e;
   |}
   {{Documentation|Template:Table cell templates/doc}}
   &#x3c;/noinclude&#x3e;

there appears to be a formatting issue showing &#x3c; instead of &lt; and &#x3e; instead of &gt;.

I backtracked to check the XML file that I generated from https://en.wikipedia.org/wiki/Special:Export, the XML file that I used to import, and the last revision in the XML file is formatted correctly. Also it matches another generated XML export. I also tested importing the XML file into development environment, and there were no issues in the development environment. The issue still exists in the production environment. I found the specific row in the MySQL `text` table for the latest revision of Template:site active and downloaded the `old_text` blob column for the data in both the production and development environments, and they were identical, and both formatted correctly, showing <noinclude> properly.


Even though it may appear redundant, here is a copy/paste of the contents of the text-old_text.bin blob data downloaded using phpMyAdmin for the revision text of Template:Site active:


   <noinclude>{| class="wikitable"
   |-
   <nowiki>|style="background: #9EFF9E; vertical-align: middle; text-align: center; " class="active table-siteactive"|Active</nowiki>
   |}
   {{Documentation|Template:Table cell templates/doc}}
   <nowiki></nowiki>

That is from the production environment, which is not working, and somehow showing

   &#x3c;noinclude&#x3e;{| class="wikitable" ...

instead of

   <noinclude>{| class="wikitable" ...

This issue also appears a bit confusing because on the production website, there are other template modules that do not reproduce this issue. For example Template:No works and appears fine. I was trying replace {{no}} to {{site inactive}} in a wikitable and that's when I noticed it didn't work, where each {{site inactive}} was malformed, and embedded the documentation into table cells each reference. Same with {{site active}}, which is what led me to search for help/assistance.

Also I am using the same LocalSettings.php for the development and production environments, which contains a few unimportant differences depending on whether production or development environment, e.g. which database to use, but other than that, in the production environment, I did configure a few gadget javascripts and set up some MediaWiki: namespace pages. Possibly something like that might be interfering or causing an issue? Jasonkhanlar (talk) 15:13, 4 April 2022 (UTC)

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

Error in running Wikidata Toolkit Example

Following https://github.com/Wikidata/Wikidata-Toolkit-Examples/blob/master/README.md

instructions with Wikidata Toolkit release 0.13.1, Maven 3.8.5 and Java 1.8 distributtion:

mvn exec:java -Dexec.mainClass="examples.EntityStatisticsProcessor"

reports an error

[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:3.0.0:java (default-cli) on project wdtk-parent: An exception occured while executing the Java class. examples.EntityStatisticsProcessor

Running with debug (-X) flag shows

[WARNING]

java.lang.ClassNotFoundException: examples.EntityStatisticsProcessor

    at java.net.URLClassLoader.findClass (URLClassLoader.java:387)

    at java.lang.ClassLoader.loadClass (ClassLoader.java:418)

    at java.lang.ClassLoader.loadClass (ClassLoader.java:351)

    at org.codehaus.mojo.exec.ExecJavaMojo$1.run (ExecJavaMojo.java:246)

    at java.lang.Thread.run (Thread.java:748)

[INFO] ------------------------------------------------------------------------

[INFO] Reactor Summary for Wikidata Toolkit 0.13.1:

[INFO]

[INFO] Wikidata Toolkit ................................... FAILURE [  0.603 s]

[INFO] Wikidata Toolkit Utilities ......................... SKIPPED

[INFO] Wikidata Toolkit Testing Utilities ................. SKIPPED

[INFO] Wikidata Toolkit Data Model ........................ SKIPPED

[INFO] Wikidata Toolkit Storage ........................... SKIPPED

[INFO] Wikidata Toolkit Dump File Handling ................ SKIPPED

[INFO] Wikidata Toolkit Wikibase API ...................... SKIPPED

[INFO] Wikidata Toolkit RDF ............................... SKIPPED

[INFO] Wikidata Toolkit Examples .......................... SKIPPED

[INFO] Wikidata Toolkit Distribution ...................... SKIPPED

[INFO] ------------------------------------------------------------------------

[INFO] BUILD FAILURE

[INFO] ------------------------------------------------------------------------

[INFO] Total time:  3.424 s

[INFO] Finished at: 2022-04-04T19:32:03Z

[INFO] ------------------------------------------------------------------------

[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:3.0.0:java (default-cli) on project wdtk-parent: An exception occured while executing the Java class. examples.EntityStatisticsProcessor -> [Help 1]

org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:exec-maven-plugin:3.0.0:java (default-cli) on project wdtk-parent: An exception occured while executing the Java class. examples.EntityStatisticsProcessor

errors.

Prior mvn compile did produce

./wdtk-examples/target/classes/org/wikidata/wdtk/examples/EntityStatisticsProcessor.class

file. Not sure what I'm missing. Appreciate any help. Thanks. 2600:1700:CCD0:D920:5048:4433:3088:4F24 (talk) 20:05, 4 April 2022 (UTC)

Found the issue, needed to adjust the mainClass with fully qualified class name relative tto root:
--
find . -type f -print | grep FetchOnlineDataExample
./wdtk-examples/src/main/java/org/wikidata/wdtk/examples/FetchOnlineDataExample.java
./wdtk-examples/target/classes/org/wikidata/wdtk/examples/FetchOnlineDataExample.class
--
pom entry: <root>src/main/java</root>
--
Working invocation::
cd wdtk-examples
mvn exec:java -Dexec.mainClass="org.wikidata.wdtk.examples.FetchOnlineDataExample"
--
Thanks. 2600:1700:CCD0:D920:5048:4433:3088:4F24 (talk) 22:32, 4 April 2022 (UTC)

Using Wikimate to edit multiple pages

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


I've got Wikimate to work for editing a single named page, but is there a way of running through all pages in a category? Or even all pages on the whole wiki? Thanks. Jonathan3 (talk) 21:51, 4 April 2022 (UTC)

I've a feeling this isn't possible with Wikimate. But I took the plunge and looked at the Mediawiki API... and against all expectations it's quite easy! Jonathan3 (talk) 10:20, 5 April 2022 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Problem with navbox?

Hey, I just created my account to ask this question- why is my navbox never represented once clicking the View, Discuss, or Edit buttons? You can still access it via search, however I don't know why it is not accessible by viewing as other navboxes are? (It wil not let me use links here, so search Template:Hiblund navbox in iiwiki) StrikerArrow H (talk) 22:35, 4 April 2022 (UTC)

Wikidata Toolkit EntityStatisticsProcessor example fails to parse Wikidata dump

Following the instructions on https://github.com/Wikidata/Wikidata-Toolkit-Examples , running EntityStatisticsProcessor example on a machine with Wikidata Toolkit release 0.13.1, Maven 3.8.5 and Java 1.8 distributtion reports error in processing wikidata-20220330-lexemes.json.gz file reports errors in parsing.


mvn -X exec:java -Dexec.mainClass="org.wikidata.wdtk.examples.EntityStatisticsProcessor"

Apache Maven 3.8.5 (3599d3414f046de2324203b78ddcf9b5e4388aa0)

Maven home: /opt/apache-maven-3.8.5

Java version: 1.8.0_312, vendor: Red Hat, Inc., runtime: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.312.b07-1.amzn2.0.2.x86_64/jre

Default locale: en_US, platform encoding: UTF-8

OS name: "linux", version: "5.10.102-99.473.amzn2.x86_64", arch: "amd64", family: "unix"

...

...

2022-04-04 23:12:40 INFO  - Processing JSON dump file wikidatawiki-json-20220330

2022-04-04 23:12:40 ERROR - Error when reading JSON for entity: Cannot deserialize value of type `java.util.ArrayList<org.wikidata.wdtk.datamodel.implement

ation.SenseDocumentImpl>` from Object value (token `JsonToken.START_OBJECT`)

at [Source: (GZIPInputStream); line: 3, column: 674] (through reference chain: org.wikidata.wdtk.datamodel.implementation.LexemeDocumentImpl["senses"])

2022-04-04 23:12:40 WARN  - Entering recovery mode to parse rest of file. This might be slightly slower.

2022-04-04 23:12:40 WARN  - Skipping rest of current line: type":"string"},"datatype":"string"}]},"qualifiers-order":["P304"],"id":"L117$4f82b2c4-4003-d67b

-234[...]fbd","rank":"normal"}]}}],"lastrevid":1406617570},

2022-04-04 23:12:40 ERROR - Error when reading JSON for entity: Cannot deserialize value of type `java.util.ArrayList<org.wikidata.wdtk.datamodel.implement

ation.SenseDocumentImpl>` from Object value (token `JsonToken.START_OBJECT`)

at [Source: (String)"{"type":"lexeme","id":"L25","lemmas":{"en":{"language":"en","value":"strengthen"}},"lexicalCategory":"Q24905","language":"Q1860","cla

ims":{"P5238":[{"mainsnak":{"snaktype":"value","property":"P5238","datavalue":{"value":{"entity-type":"lexeme","numeric-id":4699,"id":"L4699"},"type":"wiki

base-entityid"},"datatype":"wikibase-lexeme"},"type":"statement","qualifiers":{"P1545":[{"snaktype":"value","property":"P1545","hash":"2a1ced1dca90648ea7e3

06acbadd74fc81a10722","datavalue":{"value":"1","type":"st"[truncated 3426 chars]; line: 1, column: 3901] (through reference chain: org.wikidata.wdtk.datamo

del.implementation.LexemeDocumentImpl["senses"])

2022-04-04 23:12:40 ERROR - Problematic line was: {"type":"lexeme","id":"L25","lemmas":{"en":{"langu...

2022-04-04 23:12:40 ERROR - Error when reading JSON for entity: Cannot deserialize value of type `java.util.ArrayList<org.wikidata.wdtk.datamodel.implement

ation.SenseDocumentImpl>` from Object value (token `JsonToken.START_OBJECT`)

at [Source: (String)"{"type":"lexeme","id":"L67","lemmas":{"en":{"language":"en","value":"interrogate"}},"lexicalCategory":"Q24905","language":"Q1860","cl

aims":{},"forms":[{"id":"L67-F1","representations":{"en":{"language":"en","value":"interrogate"}},"grammaticalFeatures":["Q3910936"],"claims":[]},{"id":"L6

7-F2","representations":{"en":{"language":"en","value":"interrogates"}},"grammaticalFeatures":["Q3910936","Q51929447"],"claims":[]},{"id":"L67-F3","represe

ntations":{"en":{"language":"en","value":"interrogated"}}"[truncated 344 chars]; line: 1, column: 820] (through reference chain: org.wikidata.wdtk.datamode

l.implementation.LexemeDocumentImpl["senses"])

2022-04-04 23:12:40 ERROR - Problematic line was: {"type":"lexeme","id":"L67","lemmas":{"en":{"langu...

...


Is the issue with 20220330 wikidata dump or wdtk 0.13.1 library files?


Thanks in advance. 2600:1700:CCD0:D920:5048:4433:3088:4F24 (talk) 00:23, 5 April 2022 (UTC)

how to underline

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, we admins from Wikipedia Ligure have a problem with underlining two or three letters within a word to render a specific pronunciation. We have tried everything, in vain. Could you please help us?

best wishes Luensu1959 (talk) 09:43, 5 April 2022 (UTC)

Like this: abcdefghijklm?
Use <u> tag Bawolff (talk) 10:00, 5 April 2022 (UTC)
Thanks, I'm getting close. An example: in the word Mandillo I have to underline the double ll but it turns out I underline the "o" that follows as in
mandi<u>ll<u>o
I also tried to work on a sentence in whjich I have to underline éu in the first word and only "s" in the finel word, but it doesn't work
beṣ<u>éu<u>gna che i se de<u>s<u>ciùle Luensu1959 (talk) 12:42, 5 April 2022 (UTC)
You need to a slash to the second/closing tag: </u> Jonathan3 (talk) 12:47, 5 April 2022 (UTC)
Great! I made it! Thx a lot! Luensu1959 (talk) 13:16, 5 April 2022 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Mediawiki binary file Timestamp conversion

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


Hi Team,

Please let me know if there is any method to convert bin file timestamp i.e rc_timestamp : 323032323032323331343338323, this is a biary file which holds data , 20220223143826.

SO is there any mysql function so that we can directly convert rc_timestamp column data to datetime format.


select mysql_function_to_convert_DateTime(rc_timestamp) from revision table; Pooja2425 (talk) 10:43, 5 April 2022 (UTC)

Try using CAST(rc_timestamp as DATETIME)
not 100% sure but its something like that. Bawolff (talk) 08:12, 7 April 2022 (UTC)
Thanks @Bawolff for suggestion, yes its converting to DATETIME. Pooja2425 (talk) 11:08, 11 April 2022 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

How can I add the infobox template to the pages from certain namespaces?

I use a template like this:

<div class="infobox">
<div class="infobox-title">{{{title|{{PAGENAME}}}}}</div>
<table>{{#if:{{{type|}}}|<tr><br />
    <th>Тип</th><br />
    <td>{{{type}}}</td><br />
</tr>}}{{#if:{{{module|}}}|<tr>
    <th>Модуль</th><br />
    <td>{{{module}}}</td><br />
</tr>}}{{#if:{{{place|}}}|<tr>
    <th>Место использования</th>
    <td>{{{place}}}</td><br />
</tr>}}{{#if:{{{object|}}}|<tr>
    <th>Объект</th><br />
    <td>{{{object}}}</td>
</tr>}}{{#if:{{{version|}}}|<tr>
    <th>Версия</th><br />
    <td>{{{version}}}</td>
</tr>}}</table>
</div>

I need to paste the following:

{{InfoBox
|type = Method
|module = DispIntf
|place = Client, Server
|object = 
|version = 1.0.0.0
}}

onto to the pages from certain namespaces, so I won't have to do this manually for every single page. How can that be done? MrJConstantine (talk) 13:13, 5 April 2022 (UTC)

If you want to add the infobox text whenever you create a new page, you could use something like Extension:MultiBoilerplate. Jonathan3 (talk) 09:47, 6 April 2022 (UTC)
All those pages were already created. MrJConstantine (talk) 07:47, 8 April 2022 (UTC)
You're sorted then! Jonathan3 (talk) 10:07, 8 April 2022 (UTC)

Having trouble with JS snippet

Since early this morning, I've been having a good deal of trouble trying to get B.D. Chauvette's Leipzig.js going on my creative-venture wiki. (Leipzig.js is used for interlinear formatting.)

For whatever reason, this JS snippet (and its earlier variants) doesn't seem to load correctly no matter how much I try. (From my wiki's Common.js.)

/* Leipzig.js (Interlinear system) */
/* Author: B.D. Chauvette */
/* Source: http://bdchauvette.net/leipzig.js/ */
mw.loader.load( '//cdn.jsdelivr.net/npm/leipzig@latest/dist/leipzig.min.css', 'text/css' );
mw.loader.load( '//cdn.jsdelivr.net/npm/leipzig@latest/dist/leipzig.min.js' );
document.addEventListener('DOMContentLoaded', function() {
        Leipzig({ spacing: false }).gloss();
      });

This HTML code, tested on JSFiddle, represents how it's supposed to work:

<html>
  <head>
    <link rel="stylesheet" href="//cdn.jsdelivr.net/npm/leipzig@latest/dist/leipzig.min.css">
  </head>
  <body>
    <div data-gloss="">
      <p>salout {} maund -t   -e</p>
      <p>hello  {} world -VOC -N</p>
      <p>‘Hello, world!’</p>
    </div>
    <script src="//cdn.jsdelivr.net/npm/leipzig@latest/dist/leipzig.min.js"></script>
    <script>
      document.addEventListener('DOMContentLoaded', function() {
        Leipzig({ spacing: false }).gloss();
      });
    </script>
  </body>
</html>

Already brought up on Miraheze hours ago. Asking once again: Did I do it the right way, or is something amiss in the structure (especially as far as the last bit is concerned)? (Nominating anyone else in this field here to give me a hand.)

(MW 1.37)

--Slgrandson (talk) 23:05, 5 April 2022 (UTC)

You might have a race condition where your event listener fires before the external JS is loaded.
If that is the issue you would probably see an error about Leipzig being undefined, in the dev console. Bawolff (talk) 23:26, 5 April 2022 (UTC)
Only that I don't have access to a dev console, as I edit via Chrome on a Galaxy Tab A (Android). --Slgrandson (talk) 23:37, 5 April 2022 (UTC)
To @Bawolff:
The day after the last reply (last week), I finally got it to work. Valid code follows below:
/* Leipzig.js (Interlinear system) */
/* Author: B.D. Chauvette */
/* Source: http://bdchauvette.net/leipzig.js/ */
mw.loader.load( '//cdn.jsdelivr.net/npm/leipzig@latest/dist/leipzig.min.css', 'text/css' );
mw.loader.getScript( '//cdn.jsdelivr.net/npm/leipzig@latest/dist/leipzig.min.js' )
.then(
    function() {
    var glossers = [
    /* After http://bdchauvette.net/leipzig.js/theme/js/examples.js */
    Leipzig({ spacing: false, lastLineFree: false }), // Two-line default--just the gloss
    Leipzig('.ilnr-en', { spacing: false }), // Gloss + EN translation
    Leipzig('.ilnr-rfm-en', { firstLineOrig: true, spacing: false }) // Full package, containing RFM text
  ];
    glossers.forEach(function(glosser) {
      glosser.gloss();
    });
        // Script succeeded. You can use X now.
    },
    function ( e ) {
        // Script failed. X is not available
        mw.log.error( e.message ); // => "Failed to load script"
    }
);
With that out of the way, I leave you with
this overview of the local Leipzig.js installation at my creative-venture wiki. Take care!
P.S. Thanks to RegexFunctions being recently disabled per T8866 (at Miraheze Phabricator), the Dictionary entries and morpheme tables (among other pages) are not in the best of shape design-wise (e.g.
Entry:erumi
and its morpheme-table counterpart). Once everything returns to normal, I'll remind you.
Crossposted from Miraheze's Community noticeboard.
--Slgrandson (talk) 16:16, 14 April 2022 (UTC)

Problems with syntax highlighting

Hi there,

Since I can finally encrypt my site with SSL, I wanted to move my WIKI. My original installation was installed over a subdomain. I'm still using MediaWiki 1.35.0 there.

Syntax highlighting works there. As an an example:

http://arm.satyria.de/index.php?title=ARM-Programmierung_unter_Linux


The new installation was completely new, including its own database. However, in a directory of the domain, so that SSL is also inherited. Here I use the MediaWiki 1.35.6:

https://www.satyria.de/arm/index.php?title=ARM-Programmierung_unter_Linux


The code of the page is completely identical.

Syntax highlighting does not work there.


Basically, both have the same server, each with the same basic configuration.

At first I also installed MediaWiki 1.37.2 here, which didn't work either. After troubleshooting, I read that MediaWiki is not compatible with PHP 8 in this version and since the "old" version was working, I switched to the LTS version.

Here is the respective version info of the two configurations:

Old:

software version

MediaWiki 1.35.0

PHP 8.0.17 (cgi-fcgi)

MySQL 5.7.36-log

ICU 52.1

Lua 5.1.5


New:

MediaWiki 1.35.6

PHP 8.0.17 (cgi-fcgi)

MySQL 5.7.36-log

ICU 52.1

Lua 5.1.5


Does anyone have any ideas as to what could be wrong here?

Best wishes Matthias Satyria-my (talk) 06:53, 6 April 2022 (UTC)

maybe something wrong with calling pygments. If you check php error log are there any warnings? If you enable mediawiki debug log, anything of interest? Bawolff (talk) 07:22, 6 April 2022 (UTC)
Wow... Just got my LocalSettings with "$wgDebugLogFile = '$wgResourceBasePath/logfile';" expanded and after that the page was offline (HTTP ERROR 500). Even when I undid it, the error remained...
After just making this change, I'm assuming the pages are shattered. I'll install the latest version and try again. Unfortunately, the examples don't work anymore... Get in touch when I'm ready again... Satyria-my (talk) 08:48, 6 April 2022 (UTC)
Usually that means you made a typo. The php error log will tell you more details. Bawolff (talk) 17:04, 6 April 2022 (UTC)
The pages are accessible again. I suspected that the provider did not give me the rights to do this.
Then I did a local installation to see if the provider might cause this feature, but he does the same thing on the local side...
What's wrong with it in the LocalSettings with "$wgDebugLogFile = '$wgResourceBasePath/logfile';" no log files generated? Do I still have to set a switch somewhere? Satyria-my (talk) 07:20, 7 April 2022 (UTC)
$wgResourceBasePath wont be substituted if you use single quotes (') only double ("). Bawolff (talk) 02:01, 8 April 2022 (UTC)
The sample page above seems to work. As i maight have the same problem with may page, i was wondering what you have done to get the syntax highlighting back to work 80.218.116.56 (talk) 12:54, 8 April 2022 (UTC)
The sample page "http://arm.satyria.de/index.php?title=ARM-Programmierung_unter_Linux" works with Mediwiki version 1.35.0. Unfortunately not with the latest version, although the same syntax is used there.
However, I have now made several attempts (in the meantime more than 2 days) and also installed the old version of Mediawiki, but this error everywhere. Unfortunately, I cannot understand what is different from the old version (installed in 2021) to the current one. I'm just reinstalling the latest version and going over this error. This error may be corrected in the next versions. I have no idea what could be causing this.
But I'm glad that there are other people who have the same problem.
I still can't get it to create a log file. Nothing is generated... Satyria-my (talk) 14:04, 8 April 2022 (UTC)

Cirrus Search Issue

Product Version
MediaWiki 1.37.1
PHP 7.4.28 (apache2handler)
MariaDB 10.3.34-MariaDB-0ubuntu0.20.04.1
ICU 66.1
Lua 5.1.5
Pygments 2.10.0
Elasticsearch 6.5.4
Cirrus Search 6.5.4

Articles with tables only are not showing up on search. Neither the contents nor the title. Gachangi (talk) 09:03, 6 April 2022 (UTC)

Have you got it disabled in the settings? How did you connect mediawiki to Elasticsearch did you update the search index ok? AlgorithmGG (talk) 01:19, 9 May 2022 (UTC)

password reset for Wiki users

Who do I email to reset password for Wiki? 2600:1700:201:A370:4007:F846:CCE6:3453 (talk) 14:36, 6 April 2022 (UTC)

This is a self-service: Special:PasswordReset (you should use that page on the wiki you're requesting your password to be reset, not necessarily here!). Obviously, that only works if your account has an email set and confirmed.
If you're on a non-WMF wiki, you should find some administrative contact information to ask for help. Ciencia Al Poder (talk) 14:39, 6 April 2022 (UTC)

WikiEditor and VisualEditor randomly missing

Hello,


I am in the process of setting up a new mediawiki install (1.35) on Windows Server and previously WikiEditor and VisualEditor were simply working out of the box. I don't believe any changes were made that would affect these two extensions and I have noticed they are no longer working. When going to edit a page I am only given the option to edit text with wikimarkup. Any help would be appreciated. WikiAnon999 (talk) 16:24, 6 April 2022 (UTC)

Sorry! This site is experiencing technical difficulties.

I need your help! I've been trying to access Awful Movies Wiki and/or Terrible Shows & Episodes Wiki, and all I've got here is this error message that says:

Sorry! This site is experiencing technical difficulties.

Try waiting a few minutes and reloading. For more information on this error please check out our twitter page (https://twitter.com/Miraheze) or contact the system administrators by connecting to #miraheze-sre on irc.libera.chat.

(Cannot access the database: Cannot access the database: Connection refused (db121) (db121))

I don't know why or how it gotten this error, but I'm in desperate need of an emergency. Can someone please help me fix this problem as quickly as possible? Thanks. Alexpixar (talk) 00:15, 7 April 2022 (UTC)

Also, Crappy Games Wiki and Awesome Games Wiki aren't working either. Alexpixar (talk) 00:19, 7 April 2022 (UTC)
Hi, you would need to talk to miraheze (we aren't miraheze).
Generally though, this error means a system overload, so if you wait a bit, the system might just stabalize by itself. Bawolff (talk) 04:14, 7 April 2022 (UTC)
You posted "contact the system administrators by connecting to #miraheze-sre on irc.libera.chat" so I'm not sure why you posted here instead. Malyacko (talk) 05:55, 7 April 2022 (UTC)

Moving the Sidebar to the left

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.


Can someone please tell me if it is possible for me to move the sidebar from the right to the left?


https://ibb.co/0V1pz9j Fomkwiki (talk) 11:36, 7 April 2022 (UTC)

Hi, where on which page? How to see that somewhere? Which MediaWiki skin? Which MediaWiki version? Please see "Post a new question" in the sidebar. Malyacko (talk) 12:51, 7 April 2022 (UTC)
Here you go:
www.futureofmankind.co.uk/Billy_Meier/Test
I want both "Page tools" and "More" to move to the left either above "Wiki tools" or beneath it. I don't know which version of Mediawiki it is. Sorry. Fomkwiki (talk) 13:13, 7 April 2022 (UTC)
Fomkwiki (talk) 13:14, 7 April 2022 (UTC)
Looks like Skin:Timeless. Jonathan3 (talk) 14:05, 7 April 2022 (UTC)
Yes, it most probably is. Fomkwiki (talk) 14:21, 7 April 2022 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Hello. I didn't find the answer in the documentation.

How do we write a link= to an external url in a gallery ?

I know how to do it on a simple picture but I didn't find the correct code for a picture in a gallery.

Thanks Dehaasbe (talk) 14:28, 7 April 2022 (UTC)

Should be the same:
<gallery>
File:Example.svg|link=https://example.com
</gallery>
makes

Bawolff (talk) 00:15, 13 April 2022 (UTC)

It seems like link has to be the last parameter if you are also using a caption Bawolff (talk) 00:22, 13 April 2022 (UTC)

Blank paragraph generated from parser function

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, in my wiki i made a Template with some "if" to display only the paragraph that correspond to certain parameter. If those parameter doesn't exist in the page i see some blank paragraph. As follow an example of the code to understand what i mean.


{{#if: {{{a|}}} | ==Paragraph title A==

Some text | }

{{#if: {{{b|}}} | ==Paragraph title B==

Some text | }

{{#if: {{{c|}}} | ==Paragraph title C==

Some text | }

{{#if: {{{d|}}} | ==Paragraph title D==

Some text | }


Trying what is suggested here (Project:Support desk/Flow/2014/01#h-[RESOLVED]_empty_parameter_still_produces_a_line_break-2014-01-15T19:55:00.000Z) the paragraph titles aren't no more displayed. So how can i fix this? Cible30 (talk) 16:00, 7 April 2022 (UTC)

I've not checked your code but just squish everything onto one line with no line returns. Jonathan3 (talk) 22:30, 7 April 2022 (UTC)
If i do that he doesen't recognise the paragraph titles anymore and it display the code as i write it (so for example, if c exist, it display the following text: "==Paragraph title C== Some text") Cible30 (talk) 09:47, 8 April 2022 (UTC)
Put line returns directly before the == or use HTML p or br tags. Jonathan3 (talk) 10:09, 8 April 2022 (UTC)
Unfortnately the result is the same he doesen't display the paragraph titles but only the code as i write it. I tried with every combination of returns, <p> and <br>. Cible30 (talk) 12:23, 8 April 2022 (UTC)
Could you link to your template or paste it here between syntaxhighlight tags? Jonathan3 (talk) 15:38, 8 April 2022 (UTC)
Could you try this?
{{#if: {{{a|}}} | <br/>
==Paragraph title A==
Some text}}<!--
//-->{{#if: {{{b|}}} | <br/>
==Paragraph title B==
Some text}}<!--
//-->{{#if: {{{c|}}} | <br/>
==Paragraph title C==
Some text}}<!--
//-->{{#if: {{{d|}}} | <br/>
==Paragraph title D==
Some text}}
Jonathan3 (talk) 21:57, 8 April 2022 (UTC)
Thank you very much, it works! So the logic here is that the paragraph titles must be in a row separated from other sentences by line returns and the ifs must be one after the other without spaces. Cible30 (talk) 23:15, 8 April 2022 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

People Deleting Edits

iT's too sad that somebody would be preoccupied by deleting the achievements of others // I got my edit removed too! I think it would be GORGEOUS if Wiki could tell us who those people are so that we can be even more careful, because if somebody deletes your undeniable work, what that person can do to you!? Too weak, and Too cheap indeed to act like this! Saaad. Gmuhirwa (talk) 18:01, 7 April 2022 (UTC)

This is off topic for this forum. This forum is for technical questions only.
More to the point, records are already maintained over who removes what, and there are processes in place to launch appeals. You should discuss the situation at whatever wiki this is about (this website you are at now is not wikipedia). Bawolff (talk) 01:57, 8 April 2022 (UTC)

Hunk FAILED Patching 1.36.0 > 1.36.1 vendor/composer/installed.json

Unfortunately, when I patch from 1.36.0 > 1.36.1, I get the message "Hunk FAILED" in the vendor/composer/installed.json file. I noticed that, for example, the version of "wikimedia/minify" in my installed.json file is 2.2.1, although my MediaWiki shows 2.2.2 on the "Version" special page. Is it possible that my installed.json is corrupted? Can I rebuild this file?

Thank you for your support!

Olaf Olaf.boehlk (talk) 18:16, 7 April 2022 (UTC)

Its possible to manually run composer update command to regenerate everything in the vendor directory. Bawolff (talk) 06:48, 8 April 2022 (UTC)
Thank you very much. This is exactly the hint I was looking for! Oboehlk (talk) 11:37, 8 April 2022 (UTC)

SimpleSecuirty Extension replacement

Hello,


Looking for extension suggestions that would replace SimpleSecurity. Basically just need the ability to restrict pages to read only for certain groups. WikiAnon999 (talk) 19:38, 7 April 2022 (UTC)

Are you just looking for the built in page protection feature (help:Protect) Bawolff (talk) 01:53, 8 April 2022 (UTC)

mediawiki Table updatelog doesn't exist

Hi,

I'm trying to run my wiki in a container with another mariadb container. The previous wiki installation has the 1.37.0 version number. I use the same version in the container. When running the installation with a mysql account created for the wiki:

1adc60567d4a1fb3ab292246] /mw-config/index.php?page=Install Wikimedia\Rdbms\DBQueryError: A database query error has occurred. Did you forget to run your application's database schema updater after upgrading or after adding a new extension?

Please see https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Upgrading and https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:How_to_debug for more information.

Error 1044: Access denied for user 'spaniej'@'%' to database 'wiki' (172.20.0.2)

Function: MysqlInstaller::setupDatabase

Query: CREATE DATABASE `wiki`CHARACTER SET utf8

Backtrace:

from /var/www/html/includes/libs/rdbms/database/Database.php(1809)

#0 /var/www/html/includes/libs/rdbms/database/Database.php(1793): Wikimedia\Rdbms\Database->getQueryException(string, integer, string, string)

#1 /var/www/html/includes/libs/rdbms/database/Database.php(1768): Wikimedia\Rdbms\Database->getQueryExceptionAndLog(string, integer, string, string)

#2 /var/www/html/includes/libs/rdbms/database/Database.php(1327): Wikimedia\Rdbms\Database->reportQueryError(string, integer, string, string, boolean)

#3 /var/www/html/includes/installer/MysqlInstaller.php(450): Wikimedia\Rdbms\Database->query(string, string)

#4 /var/www/html/includes/installer/Installer.php(1714): MysqlInstaller->setupDatabase(MysqlInstaller)

#5 /var/www/html/includes/installer/WebInstallerInstall.php(44): Installer->performInstallation(array, array)

#6 /var/www/html/includes/installer/WebInstaller.php(269): WebInstallerInstall->execute()

#7 /var/www/html/mw-config/index.php(82): WebInstaller->execute(array)

#8 /var/www/html/mw-config/index.php(40): wfInstallerMain()

#9 {main}


it tries to create a database that already exists actually... but seems like it guess that the sql account has no access to the database instance. I run GRANT ALL PRIVILEGES ON wiki.* TO 'spaniej'@'localhost' WITH GRANT OPTION; before running installation.


when using mysql root:

An error occurred:

Error 1146: Table 'wiki.updatelog' doesn't exist (172.20.0.2)

Function: DatabaseUpdater::updateRowExists

Query: SELECT  1 AS X  FROM `updatelog`    WHERE ul_key = 'recentchanges-rc_ip-patch-rc_ip_modify.sql'  LIMIT 1   Spaniej (talk) 21:28, 7 April 2022 (UTC)

It sounds like the installation processdidnt work and tables werent created. Bawolff (talk) 01:52, 8 April 2022 (UTC)
how to fix the problem? Spaniej (talk) 17:56, 8 April 2022 (UTC)

MediaWiki shows subcategories as pages

I have a category with only one subcategory that belongs to a parent category. However, MediaWiki shows on the parent category's page that the category has 1 page and 0 categories. Furthermore, the CategoryTree extension doesn't work. I don't know why MediaWiki is doing this. A relevant link is https://wiki.remocracy.ml/wiki/Category:Reports. 2603:7000:E43F:9867:14DF:225:BDDB:69A5 (talk) 00:29, 8 April 2022 (UTC)

I'm not seeing what you are seeing. Bawolff (talk) 01:50, 8 April 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.


I imported a complete dump of the wikibook but the index links of the books are "/introduction/" but the page exists.

https://planetadownload.com.br/livros/index.php/Introdu_ao_Ray_Tracing Lucianoo6 (talk) 02:34, 8 April 2022 (UTC)

You need to set
$wgNamespacesWithSubpages[NS_MAIN] = true; Bawolff (talk) 06:46, 8 April 2022 (UTC)
Perfect... Thanks.. working for me Lucianoo6 (talk) 20:17, 9 April 2022 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

how to export the contents of a page post authentication which is present in a tool called wiki

How to export contents from a wiki page as json or html after entering the tool with authentication using python programs in backend. Is there any specific source or API that we could refer for this.

Please help. 66.209.91.155 (talk) 08:35, 8 April 2022 (UTC)

See API:Revisions and API:Parsing wikitext Ciencia Al Poder (talk) 09:26, 8 April 2022 (UTC)
Thanks Ciencia, Is there a chance for some kind of resource where I can find some example snippets for the same 66.209.91.155 (talk) 06:00, 11 April 2022 (UTC)
Look at the "Sample Code" section on the same page Ciencia Al Poder (talk) 07:58, 11 April 2022 (UTC)
The issue we are facing while using the sample code approach is that ssl certificate of that site is unverified so it is not getting directed to the login page.
Is there a way to bypass this. 66.209.91.155 (talk) 07:33, 12 April 2022 (UTC)
If you require login, you should login first with API:Login. Be sure to use the same request session in all the following requests.
About bypassing certificate errors, using an untrusted certificate defeats the purpose of ssl. Anyway, you can find how to do that with some search on the internet: google:python+requests+bypass+certificate+errors Ciencia Al Poder (talk) 07:47, 12 April 2022 (UTC)

Good morning,

in a new installation I have a problem in the last edited row in the footer.

Something like this:

Questa pagina è stata modificata per l'ultima volta { {#switch:8|8|11|8-|8/|8.|08=l'|#default=il} }8 apr 2022 alle 09:25

How to fix it?

MediaWiki 1.37.2 PHP 7.4.15 (cgi-fcgi) MySQL 5.7.28-log ICU 60.2 https://reca.re-bike.it/wiki

Thank you Camperxr (talk) 13:46, 8 April 2022 (UTC)

Is extension:ParserFunctions installed? Bawolff (talk) 19:58, 8 April 2022 (UTC)
Oh weird, the italian translation is broken in 1.37.2 ( https://github.com/wikimedia/mediawiki/blob/1.37.2/languages/i18n/it.json#L350 ). You can also manually change https://reca.re-bike.it/wiki/index.php?title=MediaWiki:Lastmodifiedat&action=edit . This is definitely a bug in mediawiki. I filed https://phabricator.wikimedia.org/T305758 for this issue. Bawolff (talk) 21:04, 8 April 2022 (UTC)

How to add a heading (from the skin) to the TOC?

In our Chameleon skin we output the heading "Comments" if certain conditions are true. This heading is not added to the table of contents (TOC). Is there a way to do so? Stefahn (talk) 14:56, 8 April 2022 (UTC)

Definitely not easily
I guess you could try and fetch the current toc with $parserOutput->getTOCHTML(), modify it somehow, and set it with $parserOuput->setTOCHTML(), but that seems very hacky and error prone (be careful about XSS) Bawolff (talk) 00:11, 13 April 2022 (UTC)

01753602148

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


how do i talk to someone at meadiamonkey is there a phone number 67.158.10.66 (talk) 18:00, 8 April 2022 (UTC)

We are not associated with mediamonkey. You'd have to ask them. Bawolff (talk) 20:55, 8 April 2022 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Special:ChangePassword doesn't work but throws no errors

This support ticket continues on from phab:T305311

Hello. The password change page does not work. When I go to save the password the password does not change. Thanks! AlPaD (talk) 19:04, 8 April 2022 (UTC)

Can you confirm what browser you are currently using? P858snake (talk) 06:09, 9 April 2022 (UTC)
Google Chrome AlPaD (talk) 06:14, 9 April 2022 (UTC)
Hello, can you help me please? Thanks! AlPaD (talk) 07:20, 22 April 2022 (UTC)
When did you actually last change your password? I need a fairly specific time and date. There's not enough information to even begin to help you.
I can see log attempts of password resets, and logins using temp passwords... Reedy (talk) 10:49, 22 April 2022 (UTC)
@Reedy: 13 April 2022, 12:00 - 12:30 pm, but if I log in with a temporary password I can change it. AlPaD (talk) 12:09, 22 April 2022 (UTC)
What happens when you don't login with a temporary password and try and change your password? Does it say it succeeded? Does it say it failed? Does it say anything?
What sort of password are you using? Reedy (talk) 11:31, 23 April 2022 (UTC)
@Reedy: It says me to fill in the page again as if nothing happened. I have 2fa, but my first password has problem, not 2fa. AlPaD (talk) 12:04, 23 April 2022 (UTC)
@Reedy: I have this problem on original site matrix and on Beta Cluster too. AlPaD (talk) 10:44, 26 April 2022 (UTC)
I tried again from another device and it hadn't problem. My device has a problem. Do you know how to I fix it? Thanks! AlPaD (talk) 10:19, 29 April 2022 (UTC)

Biography in table

How to make main table for writing biography with data like homecounrty, height, weight and etc? 5.165.71.169 (talk) 20:59, 8 April 2022 (UTC)

See Help:TablesAmmarpad (talk) 22:11, 9 April 2022 (UTC)

How to expose a category tree in it's entirety?

In MW 1.36.1 I use Extension:CategoryTree to view all my categories.

I can expose the entire tree by clicking on each collapsed entry but I seek an automatic way to show all the tree exposed ("Each button is clicked once").

So far, I didn't find a JavaScript way to do so but please share one if you have. 79.180.118.152 (talk) 10:26, 9 April 2022 (UTC)

Wikitext for VisualEditor's demo ?

Hello, VisualEditor's demo uses HTML as source editor, would it be possible to have a demo that would use Wikitext as source editor ? Thanks ! KaKi87 (talk) 10:32, 9 April 2022 (UTC)

Showing only user

I've spent some hours trying to understand how to sort out my categories: I'd like to start from checking categories with 0 or 1 article inside.

So I've tried to visualize only the most important categories of my wiki but I found out that it's not trivial. I tried to set the content of some categories to __HIDDENCAT__ but they still get listed in the Categories Special page (click to check on my Wiki).

I understood that the functionality is not working as I was expecting so I am trying to look for some help.

How can I implement (develop) a filter to the shown categories? Hyperreview (talk) 11:09, 9 April 2022 (UTC)

Nothing

I used to have a mediawiki site with its own domain address. I allowed that domain to expire but now I want to recover its contents using a different URL. Bluehost hosts my sites. I have an offline backup. I've created an all-new mediawiki instance on Bluehost using a different URL. The original database is still on Bluehost, presumably usable. I just lack the knowledge to resume access to connect the new mediawiki instance to the old database or, as an alternative, to restore the offline backup for use with the new mediawiki instance.


Please point me in the right direction. I have modest skills with PHP and web hosting generally, but mediawiki I find hard to work with. I need a little help, please. Rjimtucker (talk) 19:09, 9 April 2022 (UTC)

Fixing a script/module error

On a wiki I'm active on, all pages using Template:Head add the pages it's used on to Category:Pages_with_script_errors. These errors seem to create a lot of memory usage. The template invokes Module:Headword/templates, which I suspect is where the error is coming from. Reverting the module to the oldest version as well as to another version from Wiktionary seems to still produce script errors. How could I go about locating and fixing the error(s) that cause this? Peloñe (talk) 08:08, 10 April 2022 (UTC)

How to prevent all users from viewing history-revisions and history-revision-diff pages?

MediaWiki 1.36.1.

The command $wgActions['history'] = false; prevents all users to view history pages but it doesn't also prevent all users from viewing history-revisions and history-revision-diff pages.

How to prevent all users from viewing history-revisions and history-revision-diff pages? 79.180.118.152 (talk) 13:47, 10 April 2022 (UTC)

I wonder if you would be better off using a WAF (or apache rewrite rules, etc) and whitelisting only the urls you want Bawolff (talk) 23:36, 10 April 2022 (UTC)
@Bawolff
Yes, my Wiki is non English, but even if I change everything to the standard Hebrew all problems persist:
$wgWhitelistReadRegexp = [ "/^[^:]+$|^קטגוריה:|^מיוחד:כניסה_לחשבון|^מיוחד:חיפוש/" ];
79.180.118.152 (talk) 08:22, 11 April 2022 (UTC)
Wrong thread reply above, sorry. 79.180.118.152 (talk) 08:43, 11 April 2022 (UTC)
@Bawolff
Apache rewrite rules are likely to just disable serving of such pages altogether, I don't want to not serve them.
I just want them to be served for specific-role users, any registered user, in this case.
I should however check about WAF. 79.180.118.152 (talk) 08:45, 11 April 2022 (UTC)
You can distinguish whether or not the user has a session cookie.
Or user-agent if you primarily care about google bot. Bawolff (talk) 12:55, 15 April 2022 (UTC)
I am checking the WAF issue with information security experts, more information in the following Information Security Stack Exchange discussion with the following title (I can't link due to spam filter):
Block certain namespace webpages for anonymous users (non registered users) with some Information Security method
79.180.118.152 (talk) 12:31, 11 April 2022 (UTC)

How To Become Admin In My Own Wiki?

I just started a new wiki for the first time. I had to create a new WikiName account, but I'm not sure how to make myself the admin of my own Wiki. 2600:8800:5D03:F00:84BD:E70:23B5:B279 (talk) 01:27, 11 April 2022 (UTC)

You should create admin account while setting up your wiki. Fokebox (talk) 07:48, 11 April 2022 (UTC)
You can use createAndPromote.php script to do that. – Ammarpad (talk) 09:26, 11 April 2022 (UTC)

Moving site to new server

Hi all,


We have mediawiki 1.22.2 on a Centos 6.10 with Mysql 5.1.73. We want to move it to a new server running Ubuntu 20 with MySQL 8.0 and latest Mediawiki and PHP. On the old server I used mysqldump to backup the "wiki" database, and restored it on the new server then ran update.php with no error. However, the site itself did not display.

From what I see /var/www/html seems like the root folder.


Thanks

Monah MonahBaki (talk) 12:05, 11 April 2022 (UTC)

I need to edit something I wrote here, how can I do that?

I need to edit something I wrote here as an anonymous user (it's not a title), how can I do that? 79.180.118.152 (talk) 12:30, 11 April 2022 (UTC)

You need to create an account to edit your posts. Clump (talk) 12:43, 11 April 2022 (UTC)
Hello @Clump
Do you mean that if I create an account I can create posts from that account or did you mean that with an account I could edit what I have already wrote without an account? 79.180.118.152 (talk) 13:54, 11 April 2022 (UTC)
create posts from that account = create editable posts from that account 79.180.118.152 (talk) 14:03, 11 April 2022 (UTC)
With an account you can edit your own posts. Clump (talk) 14:21, 11 April 2022 (UTC)
@Clump
Sorry, I don't understand what you mean, the posts I've posted here anonymously could also be understood as "my own" posts. 79.180.118.152 (talk) 15:38, 11 April 2022 (UTC)
Account "A" can edit posts made by account "A", and the comment system also allows a regular account to edit posts made by others. The latter is a bit controversial, but usually ok if it's reasonably clear that it is the same person or made in good faith to correct basic formatting or template errors that obviously obfuscate the intent. Clump (talk) 16:50, 11 April 2022 (UTC)
Okay, so I understand that account A can edit both posts of account A and of account B (say, of a temporary account of anonymous user) and if of account B then via the comment system. 79.180.118.152 (talk) 20:43, 11 April 2022 (UTC)
@Testaccount985. Sorry to have apparently misled you. At least you will be able to edit your own words going forward. If there's a major concern with an older post I can delete it, although I don't see anything obvious from your IP that merits that. Clump (talk) 20:54, 12 April 2022 (UTC)
I think it was a recent change that normal accounts cannot edit all posts. We've had some problems in the past with people editing things maliciously. Bawolff (talk) 00:05, 13 April 2022 (UTC)

Fatal error: Maximum execution time of 30 seconds exceeded

I am getting this error. I added max_execution_time = 300 to /etc/php.ini and I restarted php-fpm. php-fpm -i shows that it is 300:


bash-4.2# /usr/sbin/php-fpm -i | grep max_execution_time

max_execution_time => 300 => 300


But still I get the error showing 30. What am I missing here? LarryMartell59 (talk) 15:10, 11 April 2022 (UTC)

php-fpm uses pools to host different kinds of applications and apply specific settings to each pool. Executing php-fpm directly won't give you the setting for the specific pool MediaWiki is using.
See Manual:php.ini for the correct way to get the currently applied settings. Ciencia Al Poder (talk) 07:54, 12 April 2022 (UTC)

If I open an account here just to edit a post, could I delete the account?

I principally avoid opening profiles in applications due to privacy and philosophy considerations.


If I will open a user account here just to edit a post which I've posted as an anonymous user, could I later delete the account? 79.180.118.152 (talk) 15:39, 11 April 2022 (UTC)

You can just stop using the account, and if you decide you will never return and want it permanently disabled/blocked here that is fine, but accounts are never actually "deleted". Clump (talk) 16:52, 11 April 2022 (UTC)

How to make a certain skin feature to be available only for logged-in users?

I tried to wrap the feature this way:

RequestContext::getMain()->getUser()->isLoggedIn(
    CODE_SNIPPED_OF_THE_FEATURE
);

I got:

syntax error, unexpected 'RequestContext' (T_STRING), expecting function (T_FUNCTION) or const (T_CONST)

How to make a certain skin feature to be available only for logged-in users? 79.180.118.152 (talk) 15:52, 11 April 2022 (UTC)

The syntax is wrong because you're putting the code snippet where the function parameters to isLoggedIn() would be. What you want is
if ( RequestContext::getMain()->getUser()->isLoggedIn() ) {
    CODE_SNIPPED_OF_THE_FEATURE;
}
Though you should probably use isRegistered() as isLoggedIn() was deprecated in 1.36 and was removed in 1.38. Dylsss (talk) 17:13, 11 April 2022 (UTC)
Thank you, if I wrap the feature with this code I get:
ParseError: syntax error, unexpected 'if' (T_IF), expecting function (T_FUNCTION) or const (T_CONST)
79.180.118.152 (talk) 08:30, 12 April 2022 (UTC)
@Dylsss 79.180.118.152 (talk) 08:31, 12 April 2022 (UTC)
The file I edit is:
skins/Timeless/includes/TimelessTemplate.php
Above line 123 with the feature starting with:
protected function getContentBlock() {
79.180.118.152 (talk) 08:47, 12 April 2022 (UTC)
Well the PHP parser says that it is expecting a function or const, not an if statement. You're probably putting the code directly inside the class, which is not correct. Classes can only contain properties and functions, you can't put code directly in the class. The code needs to be in one of the class's methods. Dylsss (talk) 16:50, 12 April 2022 (UTC)
Hello @Dylsss I search and search and don't find what to wrap in the following code.
I know only Bash and JavaScript syntax, but barely any PHP syntax.
Please help me by guiding me what to wrap with the wrapper we discussed above.
	protected function getContentBlock() {
		$html = Html::rawElement(
			'div',
			[ 'id' => 'content', 'class' => 'mw-body',  'role' => 'main' ],
			$this->getSiteNotices() .
			$this->getIndicators() .
			Html::rawElement(
				'h1',
				[
					'id' => 'firstHeading',
					'class' => 'firstHeading',
					'lang' => $this->get( 'pageLanguage' )
				],
				$this->get( 'title' )
			) .
			Html::rawElement( 'div', [ 'id' => 'bodyContentOuter' ],
				Html::rawElement( 'div', [ 'id' => 'siteSub' ], $this->getMsg( 'tagline' )->parse() ) .
				Html::rawElement( 'div', [ 'id' => 'mw-page-header-links' ],
					// @phan-suppress-next-line SecurityCheck-DoubleEscaped
					$this->getPortlet(
						'namespaces',
						$this->pileOfTools['namespaces'],
						'timeless-namespaces',
						[ 'extra-classes' => 'tools-inline' ]
					) .
					// @phan-suppress-next-line SecurityCheck-DoubleEscaped
					$this->getPortlet(
						'more',
						$this->pileOfTools['more'],
						'timeless-more',
						[ 'extra-classes' => 'tools-inline' ]
					) .
					$this->getVariants() .
					// @phan-suppress-next-line SecurityCheck-DoubleEscaped
					$this->getPortlet(
						'views',
						$this->pileOfTools['page-primary'],
						'timeless-pagetools',
						[ 'extra-classes' => 'tools-inline' ]
					)
				) .
				$this->getClear() .
				Html::rawElement( 'div', [ 'id' => 'bodyContent' ],
					$this->getContentSub() .
					$this->get( 'bodytext' ) .
					$this->getClear()
				)
			)
		);
		return Html::rawElement( 'div', [ 'id' => 'mw-content' ], $html );
	}
109.64.104.73 (talk) 20:43, 15 April 2022 (UTC)
This function creates the page, if you don't call the function, there will be no page content (everything inside the element with id="content" class="mw-body"). If that's what you want, then you need to use the conditional when the function is called in the function execute(). here: https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/skins/Timeless/+/refs/heads/master/includes/TimelessTemplate.php#82. Dylsss (talk) 21:37, 15 April 2022 (UTC)
$content = $this->getSkin()->getUser()->isRegistered() ? $this->getContentBlock() : '';
$html .= Html::rawElement( 'div', [ 'id' => 'mw-content-container', 'class' => 'ts-container' ],
	Html::rawElement( 'div', [ 'id' => 'mw-content-block', 'class' => 'ts-inner' ],
		Html::rawElement( 'div', [ 'id' => 'mw-content-wrapper' ],
			$content .
			$this->getAfterContent()
		) .
		Html::rawElement( 'div', [ 'id' => 'mw-site-navigation' ],
			$this->getLogo( 'p-logo', 'image' ) .
			$this->getMainNavigation() .
			$this->getSidebarChunk(
				'site-tools',
				'timeless-sitetools',
				// @phan-suppress-next-line SecurityCheck-DoubleEscaped
				$this->getPortlet(
					'tb',
					$this->pileOfTools['general'],
					'timeless-sitetools'
				)
			)
		) .
		Html::rawElement( 'div', [ 'id' => 'mw-related-navigation' ],
			$this->getPageToolSidebar() .
			$this->getInterwikiLinks() .
			$this->getCategories()
		) .
		$this->getClear()
	)
);
The above should work if that's what you want. If you want to conditionally hide something else, you can do something similar. Dylsss (talk) 21:58, 15 April 2022 (UTC)
Sadly the code snippets you have provided didn't work for me.
  • The first code snippet from GitHub brought 500 HTTP status
  • The second code snippet brought:
ParseError: syntax error, unexpected '$content' (T_VARIABLE), expecting function (T_FUNCTION) or const (T_CONST)
Both problems happened when I tried to replace the original code (which I have pasted above) with yours.
Perhaps, instead replacing such large code snippets I can paste some conditional in the end of the PHP file. 109.64.104.73 (talk) 09:15, 16 April 2022 (UTC)
I didn't mean for you to paste that code snippet anywhere, I meant for you to replace it with the existing code in execute() where this->getContentBlock() is called. I.e. replace the code from line 78 (https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/skins/Timeless/+/refs/heads/master/includes/TimelessTemplate.php#78) to 107 (https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/skins/Timeless/+/refs/heads/master/includes/TimelessTemplate.php#107) with the code snippet. Note the line numbers may be different if you are not using master. Dylsss (talk) 17:03, 16 April 2022 (UTC)
@Dylsss sadly replacing 78 up to (and including 107) didn't work for me.
I use MediaWiki 1.36.1, which version of MediaWiki do you use? 109.64.104.73 (talk) 07:49, 17 April 2022 (UTC)
Also, perhaps there is a way with much less code to do so such as adding a conditional in the end of the PHP file as discussed here?
Project:Support desk/Flow/2022/04#h-How_to_make_Timeless_page_VIEW-TALK-FAVORITE-EDIT-HISTORY_links_appear_only_to_a-2022-04-16T15:20:00.000Z 109.64.104.73 (talk) 07:50, 17 April 2022 (UTC)
@Dylsss I am still stuck with this.
Please help me by uploading a 1.36.1 skins/Timeless/includes/TimelessTemplate.php which works for you.
Then, I will compare my current file with your file in a diff checker and see what I missed out. 109.64.104.73 (talk) 20:53, 18 April 2022 (UTC)

upgrade woes

trying to upgrade from 1.30 to 1.37.2

mostly goes well, until in update.php I can't get past this issue:


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

Wikimedia\Rdbms\DBQueryError from line 1809 of /var/www/html/mediawiki-1.37.2/includes/libs/rdbms/database/Database.php: Error 1062: Duplicate entry 'Maintenance script' for key 'actor.actor_name' (localhost)

Function: MigrateActors::addActorsForRows

Query: INSERT INTO `actor` (actor_name) VALUES ('Maintenance script') 129.21.36.151 (talk) 18:18, 11 April 2022 (UTC)

Is this genuine?

https://wikitia.com/wiki/Dawood_Pervez


Does anyone know if this is a genuine wikitia page? It looks like one, but when I try to edit it from my media wiki account it says the page does not exist.


It also has a link at the top to a page to pay $100 fee to make an edit. Is this some kind of scam?


Thanks for your help for a new user :) Franshackell15 (talk) 19:30, 11 April 2022 (UTC)

We are not associated with (or for that matter have ever heard of) wikitia.
Its probably genuinely a page on that website, whatever that means. Bawolff (talk) 22:02, 11 April 2022 (UTC)

Error contacting the Parsoid/RESTBase server + Appache permission error

I'm stuck.

I have copied my mediawiki from on subdomain ti another and can't make VisualEditor to work on a copy. I get an error "Error contacting the Parsoid/RESTBase server (curl error 28) Timeout was reached"

and error in Appache log:

"[Mon Apr 11 22:54:37.123002 2022] [fcgid:warn] [pid 310049] [client xxx,xxx,xxx,xxx:58564] mod_fcgid: stderr: PHP Warning:  fopen(/tmp/mw-GlobalIdGenerator-UUID-128): failed to open stream: Permission denied in /home/MYDOMAIN/domains/mediawiki.MYDOMAIN.si/public_html/mw/includes/libs/uuid/GlobalIdGenerator.php on line 449"

The "original" copy on subdomain mail,MYDOMAIN,si works as charm

on Ubuntu Linux 20.04.2, Virtualmin


Everything seems to be the same - same database, same folde, same LocalSettings.php, proper ownership and permissions.


I wonder why on Appache "/tmp" on root is listed? What may be if everything but VisulalEditor work as charm?


BTW, out of curisoity I did try

$wgTmpDirectory     = "/home/MYDOMAIN/domains/mediawiki.MYDOMAIN.si/public_html/mw/iamges/tmp";


and got


"[Mon Apr 11 22:04:33.423030 2022] [fcgid:warn] [pid 318839] [client 192.168.1.9:47084] mod_fcgid: stderr: PHP Warning:  fopen(/home/alba/domains/mediawiki.alba.si/public_html/mw/iamges/tmp/mw-GlobalIdGenerator-UUID-128): failed to open stream: No such file or directory in /home/MYDOMAIN/domains/mediawiki.MYDOMAIN.si/public_html/mw/includes/libs/uuid/GlobalIdGenerator.php on line 449"


Thanks you any tip. GoranBe (talk) 21:14, 11 April 2022 (UTC)

This usually happens if the tmp directory (or the tmp file specificly) is owned by a different user than the one running mediawiki.
For the second error with: $wgTmpDirectory = "/home/MYDOMAIN/domains/mediawiki.MYDOMAIN.si/public_html/mw/iamges/tmp";
its probably because you mispelled "iamges" so the parent directory doesnt exist. Bawolff (talk) 22:06, 11 April 2022 (UTC)
Bawolf,
thank you for noticing I don't know how to use the keyboard. After correcting "iamges" to "images" everything works as charm. Thx!
Everything makes sense now... GoranBe (talk) 05:48, 12 April 2022 (UTC)
Bawolff,
<Grin>I'm dislectic. obviously. I misspeled your name in previous post, sorry,</Grin>> GoranBe (talk) 05:50, 12 April 2022 (UTC)
Lol Bawolff (talk) 17:43, 12 April 2022 (UTC)

Error in Special Pages - Editable content found in Special Pages

Hello,

The "Export Pages" within the Page tools of Special:Export/MediaWiki found to be having editable content (which shouldn't be their normally) that I have created/saved as as page. Can anyone give me some guidance on how to solve this issue?

Thank you. AIDInn - pmbd (talk) 06:45, 12 April 2022 (UTC)

I guess this is a bug, special page (specifically "Export") the php file is calling some how the main page (I mean by main page: the content that I found in Special:Export/MediaWiki that must exist only in a page that I created). However, it is just a guess so your help will be much appreciated. AIDInn - pmbd (talk) 07:03, 12 April 2022 (UTC)
I don't understand. What is it you expect to be on the export page and what is there instead? Bawolff (talk) 20:19, 12 April 2022 (UTC)
It must show as shown in the figure attached but it was showing some other content that exists in another page. I have figured it out, somehow the Export pages was calling that page for some reason... but thanks for your reply AIDInn - pmbd (talk) 08:39, 13 April 2022 (UTC)
Its working the way its supposed to. Go to special:export if you want to see the form. Special:export/mediawiki will export the paged named mediawiki Bawolff (talk) 09:10, 13 April 2022 (UTC)
The problem was already solved. When I raised the question it was showing something else. Thanks anyway for your time. AIDInn - pmbd (talk) 10:09, 13 April 2022 (UTC)

Hello,


I am noticing with mediawiki 1.35 that when trying to find pages with some searches nothing is returned when I hit enter. If I look for pages with "MFA" in the title it will yield no results. The strange thing is that if I am typing MFA in the search bar it will suggest the pages with this in title. Hitting enter to see all search results returns nothing. Is there any idea why this is the case? WikiAnon573 (talk) 17:06, 12 April 2022 (UTC)

looking for consultants/web masters specialized in media wiki software

Good Day. Hope all are well.

I am looking for a consultant or web master that can assist in maintaining our wiki. It would be on-call ( or as-needed) basis.

If anyone is interested please reply to this message.

TIA Thepainking (talk) 17:15, 12 April 2022 (UTC)

There is a list of people at Professional development and consulting Bawolff (talk) 17:42, 12 April 2022 (UTC)

Is there a way to update our wiki automatically?

Is there a way we can update our wiki automatically when a new version comes up? or can this only be done manually?? Thepainking (talk) 17:16, 12 April 2022 (UTC)

No.
You could use a hosting provider that administers the wiki for you and takes care of that sort of thing (E.g. Miraheze, or one of the paid for ones) Bawolff (talk) 22:59, 12 April 2022 (UTC)
i am having a trouble updating my media wiki due to incompatibility of our server. media wiki versions 1.35+ requires PHP 7.3.19; however, my server is PHP 7.3.11.
Wondering if there are any functional extension for media wiki version 1.34? This version is the most recent version that is compatible with my server. Thepainking (talk) 14:59, 13 April 2022 (UTC)
Most extensions work on 1.34 but you may need to get older versions. Try looking for the REL1_34 branch on their github page. After you have selected, you should be able to download a zip file of the extension for that version. Bawolff (talk) 00:18, 14 April 2022 (UTC)
I still haven't got round to upgrading from 1.34 either... which extensions are you thinking about? I might be able to let you know which versions I'm using. Jonathan3 (talk) 10:21, 14 April 2022 (UTC)
so currently im using 1.31 and the extensions i need are spam related. I want to use the recaptcha extensions but there are no versions compatible to 1.31. I may have found a way to add it using some coding, but I am a novice in all of this so it's starting to become quite confusing.
Any assistance would be greatly appreciated. TIA Thepainking (talk) 14:46, 19 April 2022 (UTC)
Looks like Extension:ConfirmEdit should work. Jonathan3 (talk) 21:22, 19 April 2022 (UTC)
Unfortunately, this did not prevent future spam. I have come to realize that if you are logged in, you can still edit without having to do captcha. The spammers are becoming users somehow by creating fake accounts and skipping the captcha step.
How do I change the permissions for ConfirmEdit so everyone (including users) has to do a captcha before editing a page?
Note: although a captcha needs to be solved to create an account, spammers are still able to create an account. How can i prevent this?
TIA Thepainking (talk) 15:38, 20 April 2022 (UTC)
I'm sure the settings allow that. Check out its MediaWiki page.
The best one is QuestyCaptcha. Jonathan3 (talk) 19:06, 20 April 2022 (UTC)
you're right. I tried it out and it worked great! Thanks. Thepainking (talk) 14:03, 20 April 2022 (UTC)

Need to reset my password at Peltedverse.org

Need to reset my password at Peltedverse.org and I can not find a link to do so. 63.155.116.42 (talk) 00:35, 13 April 2022 (UTC)

We are not Peltedverse.org so you need to contact Peltedverse.org about Peltedverse.org Malyacko (talk) 09:12, 13 April 2022 (UTC)

getting error while accessing api.php

I am getting error '[709c8fcf099af360bdfba465] 2022-04-13 17:37:56: Fatal exception of type "InvalidArgumentException"' whenever I am trying to access api.php at Internal error - test. I am a fresher in mediawiki.php. i was trying to register an api module for my work. But now I came to know that my base api.php is not accessible. what could be the possible cause and how to solve that? 174.2.10.111 (talk) 17:40, 13 April 2022 (UTC)

mediawiki: 1.37.1,
php: 7.4.28 (apache2handler) by XAMPP
database: mysql 174.2.10.111 (talk) 17:48, 13 April 2022 (UTC)
Please set $wgShowExceptionDetails=true; Bawolff (talk) 00:16, 14 April 2022 (UTC)
I did. And got the following issues:
[e6b79ba6fff83db156c3583c] /mediawiki/api.php InvalidArgumentException: $spec must define a class name
Backtrace:
from C:\xampp\htdocs\mediawiki\includes\api\ApiModuleManager.php(123)
#0 C:\xampp\htdocs\mediawiki\includes\api\ApiModuleManager.php(79): ApiModuleManager->addModule(string, string, array)
#1 C:\xampp\htdocs\mediawiki\includes\api\ApiMain.php(599): ApiModuleManager->addModules(array, string)
#2 C:\xampp\htdocs\mediawiki\api.php(75): ApiMain->__construct(RequestContext, boolean)
#3 C:\xampp\htdocs\mediawiki\api.php(45): wfApiMain()
#4 {main} 174.2.10.111 (talk) 02:12, 14 April 2022 (UTC)
Do you use the "Citizen" MediaWiki skin? If yes, then update it. Malyacko (talk) 04:56, 14 April 2022 (UTC)
my default skin is vector. my LocalSetting.php contains the following:
$wgDefaultSkin = "vector";
# The following skins were automatically enabled:
wfLoadSkin( 'MonoBook' );
wfLoadSkin( 'Timeless' );
wfLoadSkin( 'Vector' ); 174.2.10.111 (talk) 05:19, 14 April 2022 (UTC)
Try disabling all extensions and other customizations. Bawolff (talk) 19:18, 14 April 2022 (UTC)
Thank you for the help. Disabling all extensions has solved the issue. Now I am trying to create a new API. All the examples of mediawiki regarding API is based on mediawiki 1.28 version. It would be great for novice developer like me to have examples of mediawiki 1.37. 174.2.10.111 (talk) 16:31, 15 April 2022 (UTC)

DB-errors when trying to setup wiki-farm (MySQL)

I have a running wiki on wiki.domain.com - all good.


I am trying to setup additional, completely separate, wikis like wiki2.domain.com, wiki3.domain.com, etc.


I have set up additional databases and corresponding database-users in MySQL following this: Manual:Installing MediaWiki#Create a database

I am following the "separate settings file" method in this guide: Manual:Wiki family/en#Separate settings files

(The settings manage to get loaded. When I go to wiki2.domain.com the browser-window changes name to "Wiki2" as I instructed in LocalSettings_wiki2.php)


When I try to access wiki2.domain.com I get this error:

"Fatal exception of type Wikimedia\Rdbms\DBQueryError"


Any clues where to look, and how to fix this? Thanx :) Derrickn (talk) 20:24, 13 April 2022 (UTC)

Here is the debug-info:
/mediawiki/index.php/ Wikimedia\Rdbms\DBQueryError from line 1457 of /usr/share/mediawiki/includes/libs/rdbms/database/Database.php: A database query error has occurred. Did you forget to run your application's database schema updater after upgrading?
Query: SELECT lc_value FROM `l10n_cache` WHERE lc_lang = 'en' AND lc_key = 'deps' LIMIT 1
Function: LCStoreDB::get
Error: 1146 Table '[WIKI-NAME]wiki.l10n_cache' doesn't exist (localhost)
Backtrace:
#0 /usr/share/mediawiki/includes/libs/rdbms/database/Database.php(1427): Wikimedia\Rdbms\Database->makeQueryException()
#1 /usr/share/mediawiki/includes/libs/rdbms/database/Database.php(1200): Wikimedia\Rdbms\Database->reportQueryError()
#2 /usr/share/mediawiki/includes/libs/rdbms/database/Database.php(1653): Wikimedia\Rdbms\Database->query()
#3 /usr/share/mediawiki/includes/libs/rdbms/database/Database.php(1479): Wikimedia\Rdbms\Database->select()
#4 /usr/share/mediawiki/includes/cache/localisation/LCStoreDB.php(52): Wikimedia\Rdbms\Database->selectField()
#5 /usr/share/mediawiki/includes/cache/localisation/LocalisationCache.php(412): LCStoreDB->get()
#6 /usr/share/mediawiki/includes/cache/localisation/LocalisationCache.php(458): LocalisationCache->isExpired()
#7 /usr/share/mediawiki/includes/cache/localisation/LocalisationCache.php(377): LocalisationCache->initLanguage()
#8 /usr/share/mediawiki/includes/cache/localisation/LocalisationCache.php(292): LocalisationCache->loadSubitem()
#9 /usr/share/mediawiki/languages/Language.php(2599): LocalisationCache->getSubitem()
#10 /usr/share/mediawiki/includes/cache/MessageCache.php(913): Language->getMessage()
#11 /usr/share/mediawiki/includes/cache/MessageCache.php(868): MessageCache->getMessageForLang()
#12 /usr/share/mediawiki/includes/cache/MessageCache.php(808): MessageCache->getMessageFromFallbackChain()
#13 /usr/share/mediawiki/includes/Message.php(1290): MessageCache->get()
#14 /usr/share/mediawiki/includes/Message.php(842): Message->fetchMessage()
#15 /usr/share/mediawiki/includes/Message.php(934): Message->toString()
#16 /usr/share/mediawiki/includes/title/MalformedTitleException.php(49): Message->text()
#17 /usr/share/mediawiki/includes/title/MediaWikiTitleCodec.php(310): MalformedTitleException->__construct()
#18 /usr/share/mediawiki/includes/Title.php(3631): MediaWikiTitleCodec->splitTitleString()
#19 /usr/share/mediawiki/includes/Title.php(366): Title->secureAndSplit()
#20 /usr/share/mediawiki/includes/MediaWiki.php(85): Title::newFromURL()
#21 /usr/share/mediawiki/includes/MediaWiki.php(141): MediaWiki->parseTitle()
#22 /usr/share/mediawiki/includes/MediaWiki.php(777): MediaWiki->getTitle()
#23 /usr/share/mediawiki/includes/MediaWiki.php(524): MediaWiki->main()
#24 /usr/share/mediawiki/index.php(42): MediaWiki->run()
#25 {main} Derrickn (talk) 22:16, 13 April 2022 (UTC)
its saying the table is missing. Is the dbname (and dbprefix if using correct)? Did you run the installer for all dbs? Bawolff (talk) 00:16, 14 April 2022 (UTC)
no, I did not run the installer for all dbs, only followed the guide above quite strictly. How can I run the installer for the extra wiki's? Derrickn (talk) 11:07, 14 April 2022 (UTC)
The guide you linked says to run the installer for all dbs.
Easiest is to temp remove LocalSettings.php, ho through the install steps with other db name, but dont use the generated LocalSettings.php from the last step as instead you use the custom one you made. Bawolff (talk) 19:15, 14 April 2022 (UTC)
(DBname is correct, tried to login w/ mysql -u username -p etc... - dit not make any whanges to prefix, used the script in the guide for LocalSettings.php) Derrickn (talk) 11:09, 14 April 2022 (UTC)

Visual editor isn't loading

I'm send to the following page.

"The editor will now load. If you still see this message after a few seconds, please reload the page."


But visual editor isn't loading. There is no blue download bar. 2401:7400:C805:B121:6501:98BC:F08:67DA (talk) 04:41, 14 April 2022 (UTC)

Please read "Post a new question" in the sidebar. Malyacko (talk) 04:52, 14 April 2022 (UTC)
MediaWiki version 1.37.3
PHP version 7.4.3
Database type and version Mariadb 10.3.34 210.10.3.76 (talk) 06:42, 14 April 2022 (UTC)

Mediawiki sometimes incredibly slow on raspberry 4b with ssd (GenderCache::doQuery/Skin::preloadExistence [50.323s])

It occurs when i do a fresh login, see the last changes, chose the top entry of the list.

Do you have any Idea?


Console (1) Queries (255) Debug log (898) Request PHP includes (1019) MediaWiki: 1.37.2 PHP: 7.4.28 Time: 51.63420 Memory: 5,91 MB (Peak: 6,04 MB)


95.58% 50327.361 1 - GenderCache::doQuery

95.57% 50322.441 1 - section.query-m: SELECT user_name,up_value FROM `user` LEFT JOIN `user_properties` ON ((user_id = up_user) AND up_property = 'X' [TRX#a03740]

3.99% 2100.670 1 - SkinMustache::generateHTML

2.07% 1087.534 1819 - Message::fetchMessage

43 127.0.0.1: SELECT user_name,up_value FROM `user` LEFT JOIN `user_properties` ON ((user_id = up_user) AND up_property = 'gender') WHERE user_name = '(user)' 50323.0000ms GenderCache::doQuery/Skin::preloadExistence


[DBConnection] Wikimedia\Rdbms\LoadBalancer::getLocalConnection: reused a connection for local/0

[DBPerformance] Expectation (readQueryTime <=) 5 by MediaWiki::main not met (actual: 50.322683095932):

query-m: SELECT user_name,up_value FROM `user` LEFT JOIN `user_properties` ON ((user_id = up_user) AND up_property = 'X'  [TRX#a03740]

[DBQuery] GenderCache::doQuery/Skin::preloadExistence [50.323s] 127.0.0.1: SELECT user_name,up_value FROM `user` LEFT JOIN `user_properties` ON ((user_id = up_user) AND up_property = 'gender') WHERE user_name = '(user)'

[objectcache] fetchOrRegenerate(mediawiki:page-content-model:30497): miss, new value computed

Software Version
MediaWiki 1.37.2
PHP 7.4.28 (apache2handler)
MariaDB 10.0.28-MariaDB-2+b1
ICU 65.1
Lua 5.1.5

Suavemende (talk) 06:27, 14 April 2022 (UTC)

Something presumably wrong or misconfigured with your db. It should not take 50 seconds to do a single indexed sql query that looks at a single row. Bawolff (talk) 06:44, 14 April 2022 (UTC)
You think it is the db?
it has nothing to do with GenderCache or any other mediawiki-cache?
But it is not everytime, when the query is entered.
i can manuelly enter the query, and it is done < 1sec. Suavemende (talk) 07:55, 14 April 2022 (UTC)
The profile you posted, is saying gender cache had a cache miss so attempted to get the underlying data from the db (the query-m line), which took 50 seconds. It should not take 50 seconds to do that.
So i think its db, or something to do with how mw talks to db, or maybe something to do with how the system is configured.
I would suggest for next steps enabling mariadb query log (assuming you are using mariadb), finding the query next time this happens, and checking how long mariadb thinks the query takes. That would help distinguish if its a problem talking to mariadb or a problem with mariadb. Bawolff (talk) 08:07, 14 April 2022 (UTC)
Thank you,
I increased key_buffer_size in mariadb-config, it looks like that was the point. Suavemende (talk) 09:59, 14 April 2022 (UTC)

welcome bot

Greetings,

Can it be set that the bot that sends the welcome message will send it only 10 minutes after registration?

Thank you! 2.55.15.231 (talk) 12:45, 14 April 2022 (UTC)

Who and where is that "the bot"? Please see "Post a new question" in the sidebar. Malyacko (talk) 14:14, 14 April 2022 (UTC)
@Malyacko There is a bot extension that sends a welcome message to each user created. The question is about him. Neriah (talk) 17:35, 14 April 2022 (UTC)
Is it this? Extension:NewUserMessage Jonathan3 (talk) 15:29, 16 April 2022 (UTC)
@jonathan3 @malyacko Yes. 2.53.171.60 (talk) 15:56, 17 April 2022 (UTC)
@Malyacko @Jonathan3? Neriah (talk) 12:45, 6 May 2022 (UTC)

Implement function for search box that allows to search for page_id

Hello,

I am looking for a way to let the search box can search for page_id. The page_id is created through the magic work {{PAGEID}}, and by doing that, every page is created, it contains its ID number.

It will be helpful for me if I can search for the page using the id number while not using the page title. Is there a way to do that?

I found the extension called Extension:CirrusSearch but I am not sure if it can exactly do what I am looking for. Your help is much appreciated.

Thank you. AIDInn - pmbd (talk) 13:48, 14 April 2022 (UTC)

Not as far as i know. You can instead use the curid= url parameter (e.g. index.php?curid=12345 ) Bawolff (talk) 19:13, 14 April 2022 (UTC)
You could use Cargo and Page Forms to create a new search form for this.
Cargo can store page ID: Extension:Cargo/Storing_data#Database_storage_details.
Not quite what you asked though. Jonathan3 (talk) 10:13, 15 April 2022 (UTC)
@Bawolff Thank you for your help. Your way worked for me but do you know if there is a more nicer way as I requested (i.e. using the search box) ? Thank you again. AIDInn - pmbd (talk) 07:19, 21 April 2022 (UTC)

Warning: session_name(): Cannot change session name when headers already sent in /home3/xxxx/xxxx/includes/Setup.php on line 749

What do I need to do to fix this error?


Warning: session_name(): Cannot change session name when headers already sent in /home3/xxxx/xxxx/includes/Setup.php on line 749 200.187.164.149 (talk) 14:27, 14 April 2022 (UTC)

Make sure you dont have anything (including BOM, spaces, anything at all) before the <?php at the beginning of LocalSettings.php. make sure there is no ?> anywhere in LocalSettings.php Bawolff (talk) 04:25, 15 April 2022 (UTC)

Error: 2006 MySQL server has gone away when rebuilding index

DB is located on a remote server and is indexing ~12000 pages. The wait_timeout variable is the default of 28800 seconds (8 hours). I find it hard to believe this would be an issue on the db side. Any suggestions would be appreciated. WikiAnon573 (talk) 20:49, 14 April 2022 (UTC)

what does "indexing" mean here? Bawolff (talk) 04:24, 15 April 2022 (UTC)
using the rebuildtextindex.php script in /maintenance to rebuild the search index. WikiAnon573 (talk) 13:37, 15 April 2022 (UTC)
This is an issue of mysql. Check the configuration advices at https://stackoverflow.com/questions/7942154/mysql-error-2006-mysql-server-has-gone-away Ciencia Al Poder (talk) 14:19, 15 April 2022 (UTC)
I have seen this post before. The max_allowed_packet is set to1048576 and wait_timeout variable is the default of 28800 seconds (8 hours). The error occurs when the script gets to ~11000/~12000 pages each time. WikiAnon573 (talk) 14:26, 15 April 2022 (UTC)

Edit screens

How do I close edit screens? 2600:8800:A584:E900:F86E:7830:172A:3F14 (talk) 22:17, 14 April 2022 (UTC)

X? Cancel? Jonathan3 (talk) 10:09, 15 April 2022 (UTC)

Can't modify the mediawiki sidebar

I'm using the Medik skin (Skin:Medik - MediaWiki) for my new MediaWiki site. I created the MediaWiki:Sidebar page and edited it as per instructions on Manual:Interface/Sidebar - MediaWiki, however nothing happens. The sidebar appears unchanged despite refreshing the browser multiple times. Am I missing something? The.machine.preacher (talk) 04:41, 15 April 2022 (UTC)

Some skins dont support editing the sidebar. I dont know if that is one of them that does. Bawolff (talk) 06:49, 15 April 2022 (UTC)
Yes it should work with Medik.
Does it work when you use Vector?
It's odd that you had to create the page. Usually there'd be a sidebar page already there. Are you sure you typed the page name correctly? Jonathan3 (talk) 08:57, 15 April 2022 (UTC)

How to block all non---main-namespace pages from anonymous users?

I want to keep working with MediaWiki but feel pressure to do so.

Per each general-audience webpage (any main-namespace page such as an article page or Category: page), MediaWiki creates about 10 or 100 or 1,000 if not more webpages (link pages, revision pages, revision-diff pages, etc.) and for me that's a problem.

  • MediaWiki doesn't have any core or non-core fast way to lock all these "machine raw data pages" (for lack of a better term) so they'd be available only for registered users, thus naturally any "anonymous user" which is also a Google crawler will crawl them each time anew and this can easily finish the crawling budget allocated for that website

Blocking these pages with some brutal robots.txt such as the following is nice but robots.txt blocking is by nature only "advisory" and anyway directives may go outdated; directives won't necessarily effect all search engines; and the following directives aren't accessible for users who don't know, or don't know enough, regex.

User-agent: *
Sitemap: https://example.com/sitemap/sitemap.xml
disallow: /index.php?
disallow: /index.php/*:
allow: /index.php/Category:
allow: /index.php/קטגוריה:

I personally know a small bit of robots.txt language and of regex and can edit my own robots.txt without a significant problem and users can learn to do that but this may not be the issue, the issue may be that as of the time of publishing this post, MediaWiki doesn't have any command to block anything which isn't main-namespace from anonymous users (so it won't even initially be discovered by search engines) and for me that's a serious SEO problem because it makes thousands if not tens or hundreds of thousands possibly irrelevant webpages to be discovered and most likely also periodically crawled (if or if not indexed) and it just "eats" any plausible crawling budget, hence the question in title. 109.64.104.73 (talk) 09:05, 15 April 2022 (UTC)

If there is no MediaWiki solution and I need to migrate my website into another similar software please do recommend such software, most preferably Free and Open Source and also gratis. 109.64.104.73 (talk) 09:41, 15 April 2022 (UTC)
Why not try Wordpress? What sort of site do you have?
I think the search engines actually like MediaWiki sites! Jonathan3 (talk) 10:06, 15 April 2022 (UTC)
> thus naturally any "anonymous user" which is also a Google crawler will crawl them
This isn't really true. They are marked noindex,nofollow automatically so google should not crawl them. Bawolff (talk) 12:45, 15 April 2022 (UTC)
I'd also add that if you want to make a robots.txt file easily, just use a url structure like wikipedia where articles are in /wiki/Article_name and history pages are /w/index.php?title=foo&action=history Bawolff (talk) 12:53, 15 April 2022 (UTC)
@Jonathan3
I would generally prefer Drupal over WordPress but in this case a system with a content API and syntax such as MediaWiki is needed. 109.64.104.73 (talk) 15:04, 15 April 2022 (UTC)
@Bawolff
Not indexing doesn't matter to me because I don't want these pages would be crawled or even discovered.
About nofollow I still get thousands of webpages discovered and crawled (and then excluded) in Google Search Console so either nofollow isn't effective or my website's skin (Skin:Timeless) doesn't have nofollow for all such machine links. 109.64.104.73 (talk) 15:08, 15 April 2022 (UTC)
are you sure that wouldn't be the case even if you blocked access to those pages? Bawolff (talk) 21:07, 15 April 2022 (UTC)
@Bawolff
Now it would still be the case because the thousands of irrelevant URLs have been discovered already but if since the start of the website I could block them only for registered users than I wouldn't have the problem I am having.
Now, the solution must be partial and from robots.txt with the directives which I have learned from you in another thread which as I understand, is to prevent crawling of anything which isn't in the main namespace):
disallow: /index.php?
disallow: /index.php/*:
allow: /index.php/Category:
allow: /index.php/קטגוריה:
109.64.104.73 (talk) 03:40, 16 April 2022 (UTC)
More opinions? 109.64.104.73 (talk) 09:11, 18 April 2022 (UTC)

Wikibase

Hi! The Wikibase installation is marked as outdated. In fact, it is not easy to handle for beginners. Is a revision planned here? 2003:C5:FF16:A6A8:539:B131:4C6A:BF5A (talk) 17:58, 15 April 2022 (UTC)

Allow iframe

How can I allow iframe to all domains? I found some extensions, but as far as i understand docs, I have to predefined allowed domains... 193.91.139.145 (talk) 19:05, 15 April 2022 (UTC)

You could use Extension:Widgets - I think. Jonathan3 (talk) 22:18, 15 April 2022 (UTC)
If is a local install you can think of having raw html turned on 31.158.69.96 (talk) 00:07, 20 April 2022 (UTC)

Thumb folder is massive - necessary to back it up?

My images directory is 8.3GB. The thumb directory is 7.3GB of that. I have a lot of PDF files, and the thumb folder seems mostly to be jpg images of all PDF pages, probably from Extension:PdfHandler.

If exclude the thumb directory from my backup, and need in future to restore from that backup, would the thumbnails be recreated automatically when needed? Alternatively, would there be a way of recreating them all at once? Jonathan3 (talk) 22:17, 15 April 2022 (UTC)

It depends if you have 404 thumb handling enabled.
If yes, then they will be regenerated as needed.
If no, they wont be, but you might be able to force regeneration via a maintenance script like refreshLinks.php. Bawolff (talk) 00:03, 16 April 2022 (UTC)
Thanks. Could you please share a link explaining 404 thumb handling? Jonathan3 (talk) 15:17, 16 April 2022 (UTC)
Manual:thumb_handler.php has some info. Bawolff (talk) 19:47, 16 April 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.


I have setup a private wiki in a docker container with persistent volumes to keep and organise what my brain will no longer retain. I have enabled RelatedArticles extension. I have setup some templates and the site generally works. I get a bulleted list of articles on top like so:

Related articles

I am hoping this will be straightforward, but what I was hoping to accomplish is a related articles box in the upper right-hand corner, similar to what can be seen here:

https://wiki.archlinux.org/title/File_systems

I have some experience with the ArchLinux Wiki (as a user editing page contents and formatting) but I have no web coding knowledge whatsoever.

Can someone perhaps help me out moving that bulleted list to the right hand corner as seen on the Arch Wiki?

Thanks! I9i2ex (talk) 07:06, 16 April 2022 (UTC)

Looks like it uses three templates: Template:Related articles start for the header, Template:Related for each item, and Template:Related articles end at the end.
Template:Related articles start just calls Template:META Related articles start which just uses: <div class="archwiki-template-meta-related-articles-start"><p>{{{1}}}</p><ul>
Template:Related just uses: <li>[[{{{1}}}]]</li>
And Template:Related articles end just uses: </ul></div>
The CSS for the div.archwiki-template-message class is in MediaWiki:Common.css Jonathan3 (talk) 15:26, 16 April 2022 (UTC)
Thanks! That works beatifully. Really appreciate it, now I just need to change the colors but that is easy now. I9i2ex (talk) 07:09, 17 April 2022 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

How download Coptic Orthodox reader on laptop?

How download Coptic Orthodox reader on laptop? 58.84.204.26 (talk) 08:44, 16 April 2022 (UTC)

We don't know. We are MediaWiki. For Coptic Orthodox reader, you need to ask Coptic Orthodox reader. Malyacko (talk) 09:05, 16 April 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.


In MediaWiki 1.36.1 with Skin:Timeless I wish to make page VIEW-TALK-FAVORITE-EDIT-HISTORY links appear only to registered users (no anonymous user could read these links).

How to do that from the PHP?


If it matters, the CSS ID mw-page-header-links reflects these links and appears in /skins/Timeless/includes/TimelessTemplate.php. 109.64.104.73 (talk) 15:20, 16 April 2022 (UTC)

Maybe this? Manual:User group CSS and JavaScript Jonathan3 (talk) 16:08, 16 April 2022 (UTC)
The Foreground skin uses this: <?php if ($wgUser->isLoggedIn() ...... Jonathan3 (talk) 16:15, 16 April 2022 (UTC)
Hello dear Jonathan3 !
I want to restrict the feature in skin Timeless only for registered users and only via PHP. 109.64.104.73 (talk) 16:55, 16 April 2022 (UTC)
The second answer is php. Jonathan3 (talk) 17:04, 16 April 2022 (UTC)
@Jonathan3
Yes, though I didn't understand what you meant by that snippet. 109.64.104.73 (talk) 18:15, 16 April 2022 (UTC)
What is the meaning of:
The Foreground skin uses this: <?php if ($wgUser->isLoggedIn() ......
I don't understand how this should help me because I use Timless and not Foreground. 109.64.104.73 (talk) 16:21, 17 April 2022 (UTC)
Also @Dylsss told me that isRegistered should be used over isLoggedIn. 109.64.104.73 (talk) 02:56, 18 April 2022 (UTC)
Eventually I have found it better to just remove the code block of this and create a JavaScript alternative as hinted here:
Project:Support desk/Flow/2022/04#h-JavaScript_to_edit_a_page_or_move_a_page-2022-04-20T21:22:00.000Z
Project:Support desk/Flow/2022/04#h-JavaScript_to_view_the_history_of_a_page-2022-04-21T16:19:00.000Z 109.64.104.73 (talk) 09:43, 25 April 2022 (UTC)
I suggest to mark this thread as sovled. 109.64.104.73 (talk) 09:43, 25 April 2022 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Docker is not running on cloud services as expexted

Hi

We are trying to dockerize the new version of VideoCutTool but having few issues with the cloud service.

The first issue is that the docker process runs for few minutes then stops serving the assets of the frontend. We get `net::ERR_ABORTED 504` error.

The second issue is that the backend should run on port 4000 but instead we get `This site can’t be reached` error. I have configured the URL to open port 4000 on horizon as well as exposed it on docker file.

I run the docker container using this command:

`sudo docker-compose -f ./docker-compose.prd.yml up --build -d`

The full code to the tool can be found here: https://gerrit.wikimedia.org/r/c/labs/tools/VideoCutTool/+/716255

And this is the docker file content:

```

# Install node

FROM node:16 as build

# Install FFMPEG library

RUN apt update -y

RUN apt install ffmpeg -y

# Set the workdir /app

WORKDIR /app

# Frontend

# Copy the package.json to workdir

COPY package.json ./

COPY server/package.json ./server/

# Install dependncies

RUN npm install --legacy-peer-deps

# Copy application source

COPY . .

EXPOSE 80 4000

# run express server

# RUN node server/index.js

CMD ["npm", "run", "prd"]

# Build

RUN npm run build

# Run ngnix server

FROM nginx:1.21.4 as server

COPY --from=build /app/build /usr/share/nginx/html

```

@Tgr Khr2003 (talk) 17:21, 16 April 2022 (UTC)

I'm not the best person to ping on Docker configuration issues. Tgr (talk) 00:05, 19 April 2022 (UTC)

How to streamline a big upgrade leap

Hi, everyone.

My private wiki (just stored and accessed on my local PC) has worked fine for me in Windows XP Pro for more than 12 years. I finally have a Windows 10 computer and want to migrate my wiki to it from my XP machine.

The "Special:Version" page in my XP wiki says I'm using MediaWiki 1.18.5, with PHP 5.3.0 (apache2handler), with MySQL 5.1.36-community-log. Under "Installed extensions", "Special pages", it lists "CategoryTree" and "Replace Text (Version 0.9.3)". Under "Installed extensions", "Parser hooks", it lists "CategoryTree", "CharInsert", "Cite", and "ParserFunctions (Version 1.4.1)".

So far, on my Windows 10 computer, I have not installed anything that would be necessary to migrate my wiki.

Being far from expert, I would like to know the best way to go straight from the existing wiki installation on my Windows XP computer to whatever newer versions would let me take best advantage of having Windows 10 to run my wiki. I'm afraid that if I don't get advice then I'll take unnecessary intermediate steps and gum things up.

Thanks for the help! Preslethe (talk) 21:53, 16 April 2022 (UTC)

Upgrade to mediawiki 1.35 first then upgrade to newest version. Bawolff (talk) 10:07, 18 April 2022 (UTC)

Revoked the bureaucrat right from the only bureaucrat

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 was running a wiki locally, and I was the only user. However, I accidentally revoked the bureaucrat right from myself, and now no one is a bureaucrat. How can this be fixed? ~ Weeklyd3 (talk) 23:55, 16 April 2022 (UTC)

The wiki is running locally, so I can't provide a link to it. ~ Weeklyd3 (talk) 23:56, 16 April 2022 (UTC)
See Manual:CreateAndPromote.php. Dylsss (talk) 23:59, 16 April 2022 (UTC)
Got it, thanks! ~ Weeklyd3 (talk) 00:01, 17 April 2022 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

I have now two accounts in MCA Hogarth's Peltverse.

I have now two accounts in MCA Hogarth's Peltverse. I am not sure I can access either.

I need to change my password, I have seemingly lost both passwords.

I am ready to try a third accont,

I use two machines, The windows 10 machine has one account running, and I fear if I shut it down it will not let me back one. The Linux Mint latest version is locked out from both.

I am nor locked out of studiomcah.locals.com. But that is a different link.

I guess that I did not give a email addr?

What can I do? 63.155.116.42 (talk) 01:03, 17 April 2022 (UTC)

You should contact "MCA Hogarth's Peltverse", whatever that is. Bawolff (talk) 03:13, 17 April 2022 (UTC)

"Stable release" template no longer working

I have an internal script that needs to figure out the latest version of mediawiki. I used to access this wiki template which always gave the latest stable version:

Template:MW stable release number

However it currently returns 1.37.1, and 1.37.2 is the latest stable version. Can this be fixed or is this no longer supported? Hannob (talk) 09:37, 17 April 2022 (UTC)

The page needed a purge Malyacko (talk) 09:41, 17 April 2022 (UTC)

Transcluding

On my creative-venture wiki (and its Referata forebears), I've long had trouble with the <noinclude></noinclude> wraparound on a preloaded template of mine. What I call "Template starter" sets up the bare bones for creating a template, adding a doc-page section that is always hidden from view outside a template's page à la Wikimedia.

With my latest attempt today, I followed the instructions provided at Manual:Creating pages with preloaded text#Loading the preload file (<no<includeonly></includeonly>include></noinclude>), but instead of the expected:

<!-- Please replace this with template content --><noinclude>{{doc tag|categories=<includeonly>Templates</includeonly>}}</noinclude>

all I'm getting is just the comment after loading:

<!-- Please replace this with template content -->

I've tried getting this to work time and again, to the point where spaces before the tag name (< noinclude></ noinclude>) must do as a compromise in our current setup. Of course, that's not really what I even wanted to deal with; I simply want to get the proper s on the page without any hassle. How else to go about it?

(MW 1.37.2; code loaded via Extension:Preloader)

--Slgrandson (talk) 14:17, 17 April 2022 (UTC)

Turns out this is an upstream bug, reported back in April 2021, and there's not much any user can do about it at this time. A merge/fix was also proposed back then, but has not been acted upon for lack of maintainers. (Mentioned at w:Special:PermanentLink/1083469433#Transcluding_<noinclude>.)
To @Bawolff: /@Pppery: /@Shirayuki: /@Universal Omega: /co-developer @Troyengel: Do you know anyone else (on GitLab, Wikimedia, or both) who can resolve the issue sooner rather than later? (To say nothing of Robchurch (talk · contribs)'s long-time absence from the Wikimedia scene...) --Slgrandson (talk) 16:20, 19 April 2022 (UTC)
That's not in WMF's repositories so i have limited power to do much about the patch. Bawolff (talk) 23:40, 19 April 2022 (UTC)
@Slgrandson I have not run a MediaWiki instance in years, the Preloader project has been in need of a new maintainer for quite some time. I'm happy to transfer ownership if someone steps up with interest and pings me on Gitlab. https://gitlab.com/troyengel/Preloader/-/issues/5 troyengel (talk) 19:07, 16 May 2022 (UTC)
@Troyengel: Miraheze already took care of it last month (through a locally maintained version). --Slgrandson (talk) 20:09, 16 May 2022 (UTC)

HTTP methods used by MediaWiki

Hi,

I'm configuring a WAF for my MediaWiki installation and according to the API documentation, MediaWiki only uses GET and POST requests. Is this the same for the index.php endpoint that browsers would use? Am I safe to only allow GET/POST requests and deny all other HTTP methods on my web server? Thanks Grovebose (talk) 06:11, 18 April 2022 (UTC)

You'll also need to allow HEAD requests, since most browsers use preflight requests to enforce various Content Security Policies. Ciencia Al Poder (talk) 09:42, 18 April 2022 (UTC)
CORS preflight generally uses OPTIONS not HEAD.
There is a new REST api that might use other methods like PUT - API:REST API Bawolff (talk) 10:05, 18 April 2022 (UTC)

Fatal Exception Type

Hi. Recently, things worked fine on a Wiki I run.


It is MediaWiki version 1.37.2, running on PHP 8.0.17, MariaDB 10.3.34 and ICU 69.1.

Recently, however, a new error has popped up any time we try editing any page on the wiki.


[Ylwy4aGs_nnxFHEnkroW3AADRA0] 2022-04-17 15:31:47: Fatal exception of type "Wikimedia\Rdbms\DBQueryError"


The host I use has no idea what is going on, and has even tried downgrading PHP to 17.4 and now 17.3, but nothing has changed in regards to this error, and they have sent me here to try to find answers. Soultastic (talk) 06:31, 18 April 2022 (UTC)

You should open debug options for more detailed error messages can you see Project:Support desk/Flow/2017/11#h-Fatal_exception_of_type_Wikimedia\Rdbms\DBQueryError_after_update_upto_1.29.2-2017-11-18T21:50:00.000Z Prince 06:35, 18 April 2022 (UTC)
It wouldn't let me post the error initially.
[Yl0Gljykp_WZVKwfm7TeQgACBAU] /index.php?title=Editable&action=submit Wikimedia\Rdbms\DBQueryError: A database query error has occurred. Did you forget to run your application's database schema updater after upgrading or after adding a new extension?
Please see https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Upgrading and https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:How_to_debug for more information.
Error 1021: Disk full (/tmp/#sql_605_5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device") (localhost)
Function: MediaWiki\Revision\RevisionStore::findIdenticalRevision
Query: SELECT * FROM (SELECT rev_id,rev_page,rev_timestamp,rev_minor_edit,rev_deleted,rev_len,rev_parent_id,rev_sha1,comment_rev_comment.comment_text AS `rev_comment_text`,comment_rev_comment.comment_data AS `rev_comment_data`,comment_rev_comment.comment_id AS `rev_comment_cid`,actor_rev_user.actor_user AS `rev_user`,actor_rev_user.actor_name AS `rev_user_text`,temp_rev_user.revactor_actor AS `rev_actor` FROM `mwcc_revision` JOIN `mwcc_revision_comment_temp` `temp_rev_comment` ON ((temp_rev_comment.revcomment_rev = rev_id)) JOIN `mwcc_comment` `comment_rev_comment` ON ((comment_rev_comment.comment_id = temp_rev_comment.revcomment_comment_id)) JOIN `mwcc_revision_actor_temp` `temp_rev_user` ON ((temp_rev_user.revactor_rev = rev_id)) JOIN `mwcc_actor` `actor_rev_user` ON ((actor_rev_user.actor_id = temp_rev_user.revactor_actor)) WHERE rev_page = 2842 ORDER BY rev_timestamp DESC,rev_id DESC LIMIT 1,15 ) `recent_revs` WHERE rev_sha1 = 'gd9t46uri4zha4aebb1ustgn2tnc8br' LIMIT 1
Backtrace:
from /home/seiohkin/xmen.seiohki.net/includes/libs/rdbms/database/Database.php(1809)
#0 /home/seiohkin/xmen.seiohki.net/includes/libs/rdbms/database/Database.php(1793): Wikimedia\Rdbms\Database->getQueryException(string, integer, string, string)
#1 /home/seiohkin/xmen.seiohki.net/includes/libs/rdbms/database/Database.php(1768): Wikimedia\Rdbms\Database->getQueryExceptionAndLog(string, integer, string, string)
#2 /home/seiohkin/xmen.seiohki.net/includes/libs/rdbms/database/Database.php(1327): Wikimedia\Rdbms\Database->reportQueryError(string, integer, string, string, boolean)
#3 /home/seiohkin/xmen.seiohki.net/includes/libs/rdbms/database/Database.php(2012): Wikimedia\Rdbms\Database->query(string, string, integer)
#4 /home/seiohkin/xmen.seiohki.net/includes/libs/rdbms/database/Database.php(2112): Wikimedia\Rdbms\Database->select(array, string, array, string, array, array)
#5 /home/seiohkin/xmen.seiohki.net/includes/libs/rdbms/database/DBConnRef.php(68): Wikimedia\Rdbms\Database->selectRow(array, string, array, string)
#6 /home/seiohkin/xmen.seiohki.net/includes/libs/rdbms/database/DBConnRef.php(342): Wikimedia\Rdbms\DBConnRef->__call(string, array)
#7 /home/seiohkin/xmen.seiohki.net/includes/Revision/RevisionStore.php(3342): Wikimedia\Rdbms\DBConnRef->selectRow(array, string, array, string)
#8 /home/seiohkin/xmen.seiohki.net/includes/Storage/EditResultBuilder.php(203): MediaWiki\Revision\RevisionStore->findIdenticalRevision(MediaWiki\Revision\MutableRevisionRecord, integer)
#9 /home/seiohkin/xmen.seiohki.net/includes/Storage/EditResultBuilder.php(112): MediaWiki\Storage\EditResultBuilder->detectManualRevert()
#10 /home/seiohkin/xmen.seiohki.net/includes/Storage/PageUpdater.php(1104): MediaWiki\Storage\EditResultBuilder->buildEditResult()
#11 /home/seiohkin/xmen.seiohki.net/includes/Storage/PageUpdater.php(1216): MediaWiki\Storage\PageUpdater->buildEditResult(MediaWiki\Revision\MutableRevisionRecord, boolean)
#12 /home/seiohkin/xmen.seiohki.net/includes/Storage/PageUpdater.php(833): MediaWiki\Storage\PageUpdater->doModify(CommentStoreComment, User, integer)
#13 /home/seiohkin/xmen.seiohki.net/includes/page/WikiPage.php(1994): MediaWiki\Storage\PageUpdater->saveRevision(CommentStoreComment, integer)
#14 /home/seiohkin/xmen.seiohki.net/includes/EditPage.php(2351): WikiPage->doUserEditContent(WikitextContent, User, CommentStoreComment, integer, boolean, array, integer)
#15 /home/seiohkin/xmen.seiohki.net/includes/EditPage.php(1687): EditPage->internalAttemptSave(array, boolean)
#16 /home/seiohkin/xmen.seiohki.net/includes/EditPage.php(665): EditPage->attemptSave(array)
#17 /home/seiohkin/xmen.seiohki.net/includes/actions/EditAction.php(71): EditPage->edit()
#18 /home/seiohkin/xmen.seiohki.net/includes/actions/SubmitAction.php(38): EditAction->show()
#19 /home/seiohkin/xmen.seiohki.net/includes/MediaWiki.php(543): SubmitAction->show()
#20 /home/seiohkin/xmen.seiohki.net/includes/MediaWiki.php(320): MediaWiki->performAction(Article, Title)
#21 /home/seiohkin/xmen.seiohki.net/includes/MediaWiki.php(930): MediaWiki->performRequest()
#22 /home/seiohkin/xmen.seiohki.net/includes/MediaWiki.php(564): MediaWiki->main()
#23 /home/seiohkin/xmen.seiohki.net/index.php(53): MediaWiki->run()
#24 /home/seiohkin/xmen.seiohki.net/index.php(46): wfIndexMain()
#25 {main} Soultastic (talk) 06:37, 18 April 2022 (UTC)
Did you run Manual:update.php Prince 06:40, 18 April 2022 (UTC)
The error message says run update.php on every db error,however it wont help with a full disk Bawolff (talk) 09:56, 18 April 2022 (UTC)
I have not. I did not change anything for this to happen, and am unsure how to run that. Soultastic (talk) 06:42, 18 April 2022 (UTC)
An error occurred:
Error 1021: Disk full (/tmp/#sql_605_5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device") (localhost)
Function: MysqlUpdater::doLanguageLinksLengthSync
Query: SHOW COLUMNS FROM `mwcc_l10n_cache` LIKE 'lc_lang'
This is what I get from trying to use update.php... and according to the website, I'm not out of space... but I am contacting my host again regardless. Soultastic (talk) 06:54, 18 April 2022 (UTC)
It doesnt neccesarily mean you are totally out of space, it could just be that /tmp is out of space.
If you have ssh access, run df -h to check. Bawolff (talk) 09:59, 18 April 2022 (UTC)

Wrap Multiple Rows or Paragraphs around image even after a Line Break

Can someone please tell me if it is possible to wrap either a left or right aligned image at the beginning of a row or new paragraph even after there is a line break. Can this be done via CSS? Fomkwiki (talk) 11:07, 18 April 2022 (UTC)

Help:Images Malyacko (talk) 15:26, 18 April 2022 (UTC)
This is called "clear"-ing an image and can be done with CSS, see also: Help:Images#Stopping_the_text_flow. Many wikis have implemented templates like {{- }} or {{Break }} or something that do this for you. —TheDJ (Not WMF) (talkcontribs) 10:14, 19 April 2022 (UTC)

Wiki Farm

Did I set up LocalSettings.php correctly to make a wiki farm? https://gist.github.com/Jst-Tan/c366a13e2252b31d2fc38b8f3d82aec1

and once it is corrected, I would like to ask how to install a new wiki with the method I used in the local settings.php codes. Small Pig reporter (talk) 15:40, 18 April 2022 (UTC)

Disable "Group changes by page in recent changes and watchlist"?

Is there a way to disable "Group changes by page in recent changes and watchlist" for users not logged into the wiki? I don't see this as a configuration available for $wgDefaultUserOptions. Nicole Sharp (talk) 19:16, 18 April 2022 (UTC)

Adding
$wgDefaultUserOptions['usenewrc'] = 0;
to LocalSettings.php indirectly disables "group changes by page in recent changes". Nicole Sharp (talk) 19:27, 18 April 2022 (UTC)

Call to a member function getComponents (SkinTemplate)

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


I've recently done a clean install of a wiki (1.39) on a remote host with a, yet I receive this error after installation (domain and dbname replaced);


MediaWiki internal error.

Original exception: [Yl3OcRieSV7ht-egJUogpgAAAWE] /[dbname]/index.php Error: Call to a member function getComponents() on null

Backtrace:

from /var/www/[domain]/public_html/[dbname]/includes/skins/Skin.php(174)

#0 /var/www/[domain]/public_html/[dbname]/includes/skins/SkinTemplate.php(202): Skin->getTemplateData()

#1 /var/www/[domain]/public_html/[dbname]/includes/skins/SkinTemplate.php(218): SkinTemplate->getTemplateData()

#2 /var/www/[domain]/public_html/[dbname]/includes/skins/SkinTemplate.php(134): SkinTemplate->prepareQuickTemplate()

#3 /var/www/[domain]/public_html/[dbname]/includes/skins/SkinTemplate.php(151): SkinTemplate->generateHTML()

#4 /var/www/[domain]/public_html/[dbname]/includes/OutputPage.php(2809): SkinTemplate->outputPage()

#5 /var/www/[domain]/public_html/[dbname]/includes/MediaWiki.php(926): OutputPage->output(boolean)

#6 /var/www/[domain]/public_html/[dbname]/includes/MediaWiki.php(939): MediaWiki::{closure}()

#7 /var/www/[domain]/public_html/[dbname]/includes/MediaWiki.php(566): MediaWiki->main()

#8 /var/www/[domain]/public_html/[dbname]/index.php(50): MediaWiki->run()

#9 /var/www/[domain]/public_html/[dbname]/index.php(46): wfIndexMain()

#10 {main}

Exception caught inside exception handler: [Yl3OcRieSV7ht-egJUogpgAAAWE] /[dbname]/index.php Error: Call to a member function getComponents() on null

Backtrace:

from /var/www/[domain]/public_html/[dbname]/includes/skins/Skin.php(174)

#0 /var/www/[domain]/public_html/[dbname]/includes/skins/SkinTemplate.php(202): Skin->getTemplateData()

#1 /var/www/[domain]/public_html/[dbname]/includes/skins/SkinTemplate.php(218): SkinTemplate->getTemplateData()

#2 /var/www/[domain]/public_html/[dbname]/includes/skins/SkinTemplate.php(134): SkinTemplate->prepareQuickTemplate()

#3 /var/www/[domain]/public_html/[dbname]/includes/skins/SkinTemplate.php(151): SkinTemplate->generateHTML()

#4 /var/www/[domain]/public_html/[dbname]/includes/OutputPage.php(2809): SkinTemplate->outputPage()

#5 /var/www/[domain]/public_html/[dbname]/includes/exception/MWExceptionRenderer.php(157): OutputPage->output()

#6 /var/www/[domain]/public_html/[dbname]/includes/exception/MWExceptionRenderer.php(76): MWExceptionRenderer::reportHTML(Error)

#7 /var/www/[domain]/public_html/[dbname]/includes/exception/MWExceptionHandler.php(107): MWExceptionRenderer::output(Error, integer)

#8 /var/www/[domain]/public_html/[dbname]/includes/exception/MWExceptionHandler.php(204): MWExceptionHandler::report(Error)

#9 /var/www/[domain]/public_html/[dbname]/includes/MediaWiki.php(588): MWExceptionHandler::handleException(Error, string)

#10 /var/www/[domain]/public_html/[dbname]/index.php(50): MediaWiki->run()

#11 /var/www/[domain]/public_html/[dbname]/index.php(46): wfIndexMain()

#12 {main} Trickpants (talk) 20:52, 18 April 2022 (UTC)

Which skin are you using? – Ammarpad (talk) 07:58, 19 April 2022 (UTC)
Thank you for the reply, I got it solved thanks to your question!
Answer for others; I manually downloaded and installed skins and it resolved the errors.
My theory is that it wasn't a complete clean install after all, and I might have used old skins with deprecated files. Trickpants (talk) 09:45, 19 April 2022 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

How to find the PHP code which prints a certain element?

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 store my MediaWiki 1.36.1 website with Skin:Timeless on a shared hosting environment with Cpanel file manager.


In my website, there is a certain footer element with the following CSS ID:
footer-info-lastmod
How could I find in which PHP file this CSS ID is available?

i.e. how could I find the PHP file from which the element with this CSS ID is printed? 109.64.104.73 (talk) 21:45, 18 April 2022 (UTC)

grep?
Although its possibly not a single place, but across a function call with string concatenation. Bawolff (talk) 03:04, 19 April 2022 (UTC)
Running with grep on the entire (relative) web application root?
grep "footer-info-lastmod" example.com/
This brings:
grep: example.com/: Is a directory
What did you mean please? 109.64.104.73 (talk) 03:23, 19 April 2022 (UTC)
use the -r option to grep.
grep -r "lastmod" example.com Bawolff (talk) 22:41, 19 April 2022 (UTC)
The value is set by the SkinTemplate at https://gerrit.wikimedia.org/g/mediawiki/core/+/b6d486b4158fd7f92a0a65e61b187d61afd26ca0/includes/skins/SkinTemplate.php#304
These values are then consumed by a skin via something like getTemplateData or getTemplateFooterData, and the skin then generates and outputs the ids and inserts the contents. The key is a compound of "footer" (page section), info (info section of the footer), "lastmod" (last modified date of the page) —TheDJ (Not WMF) (talkcontribs) 10:10, 19 April 2022 (UTC)
Eventually what I did was:
  • In /includes/skins/Skin.php
  • Comment 'lastmod' => !$useCredits ? $this->lastModified() : null,
//'lastmod' => !$useCredits ? $this->lastModified() : null,
109.64.104.73 (talk) 17:58, 19 April 2022 (UTC)
I thank the commenters, this issue is now resolved. 109.64.104.73 (talk) 10:29, 20 April 2022 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

TemplateData, VisualEditor, suggestedvalues not working

I am currently trying to create a template for VisualEditor with TemplateData's suggestedvalues.


I am running MediaWiki 1.37.1 with the latest stable versions of VisualEditor, TemplateData and Semantic MediaWiki. I tried adding


<templatedata>

{

   "params": {

      "media_type": {

   "label": "Type of media",

   "example": "Newspaper",

   "type": "string",

   "description": "In what medium was the article published?",

   "suggestedvalues": [

       "",

       "Journal",

       "Book",

       "Newspaper",

       "Magazine"

   ]

}

   }

}

</templatedata>


to a template an loading it onto a page via VisualEditor and for some reason the dropdown menu with the suggested values doesn't show up. Does anyone have any idea what I might be doing wrong ? 213.240.108.236 (talk) 23:57, 18 April 2022 (UTC)

Also I wanted to add that the suggested values don't show up in the TemplateData editor either. and I have no way of adding them via the TemplateData editor despite using one of the supported data types aka string 213.240.108.236 (talk) 00:04, 19 April 2022 (UTC)

file cache disables Main Page redirect

When FileCache is enabled with short URLs

$wgUseFileCache = true;

"Main Page" will no longer redirect from /w to /wiki/Main_Page.

Is there an easy fix for this on Apache?

I had to enable CanonicalServerLink to avoid confusing search engines with five different (non-redirected) URLs for the Main Page:

$wgEnableCanonicalServerLink = true;

The problem is specific to the HTML cache and only affects users when logged out of the wiki.

Nicole Sharp (talk) 01:20, 19 April 2022 (UTC)

When trying to access from:
  • /w
  • /w/index.php
  • /wiki
  • /w/index.php?title=Main_Page
None of these pages redirect to /wiki/Main_Page but instead display duplicated content.
Nicole Sharp (talk) 01:35, 19 April 2022 (UTC)
You can use rewrite rules in apache config or .htaccess. Bawolff (talk) 03:02, 19 April 2022 (UTC)
Yes, they are already set up for short URLs and work correctly with the file cache disabled. The problem is that when file cache is enabled, the rewrite rules in .htaccess no longer work. I am guessing because MediaWiki is serving the HTML files instead of the PHP pages. It looks like a bug but not sure if there is an easy fix other than by disabling the file cache. I don't know how to change the rewrite rules so that it can work for the cached HTML pages without affecting the PHP pages. Nicole Sharp (talk) 12:09, 19 April 2022 (UTC)
RewriteEngine On
RewriteRule ^/?wiki(/.*)?$ %{DOCUMENT_ROOT}/w/index.php [L]
# https://www.mediawiki.org/wiki/manual:short_URL/Apache
Nicole Sharp (talk) 12:09, 19 April 2022 (UTC)
I meant you would need an additional rewrite rule like
RewriteRule ^/w(iki)?/?$ %{DOCUMENT_ROOT}/wiki/Main_Page [R,L]
(This should be added in the middle,after rewriteEngine on,but before the existing short url rule)
[I did not test this, so this is just a guess as to what should work, but i may be mistaken] Bawolff (talk) 22:38, 19 April 2022 (UTC)
That does not work unfortunately. For now, the best solution seems to be to leave the file cache enabled, and use CanonicalServerLink to tell search engines which URL is the canonical or preferred one. But human users cannot see the canonical link without viewing the HTML source. Clicking the wiki logo though brings the user back to the canonical link for the mainpage. Otherwise it looks like the file cache will need to be disabled instead. Nicole Sharp (talk) 23:43, 20 April 2022 (UTC)

Can you make a page/fandom on here?

Can you please let me know whether or not I can make a fandom on here! ☆ Lilianna Pumpkin-Wolf ☆ (talk) 04:34, 19 April 2022 (UTC)

No Prince 06:05, 19 April 2022 (UTC)
Project:About Malyacko (talk) 09:06, 19 April 2022 (UTC)
We aren't that type of site. If you want to make something like that, you have to go to a wiki host site like fandom, mitaheze or shoutwiki.
We also have instructions here if you want to start your own wikihost. Bawolff (talk) 22:31, 19 April 2022 (UTC)

Display of the images at new vector skin at MW 1.37

Hi, I am running following MW:

Продукт Версия
MediaWiki 1.37.2

And I faced with problem on displaying standard images at mobile devices having new vector skin. So the text overlays the image and looks not so good. see image example:

Could you please help to fix this. What shall I add to my common.css file or mobile css file? Fokebox (talk) 07:25, 19 April 2022 (UTC)

Hard to say what the problem is without looking at the HTML or wiki text Malyacko (talk) 09:06, 19 April 2022 (UTC)
Here is the link to the page with the example of issue. Fokebox (talk) 09:24, 19 April 2022 (UTC)
You are using Vector 2022 on a mobile device, and want the images to clear the text content ? Unfortunately Vector 2022 isn't fully mobile compatible yet, so it doesn't do this by default yet. Did you set VectorResponsive to true to switch this on ? —TheDJ (Not WMF) (talkcontribs) 10:05, 19 April 2022 (UTC)
Yes, I am using Vector 2022 and yes, I have set $wgVectorResponsive = true;, but all it doesn't work. So shall I wait for the update of Vector 2022 skin? Fokebox (talk) 11:01, 19 April 2022 (UTC)

Help !

I don't want my server hacked. I posted a backtrace here, and it seems to have a lot of info that I don't think should be public. I'm probably worrying over nothing. But could someone take a look at it? https://m.mediawiki.org/wiki/Extension_talk:WikiForum 107.77.205.159 (talk) 08:05, 19 April 2022 (UTC)

It's public code anyway. :) There is nothing concerning or problematic in your post Malyacko (talk) 09:05, 19 April 2022 (UTC)

MediaWiki 1.36.1

If I go to any category page there is a link on top of it, named "Help".

How to remove it from all category pages? 109.64.104.73 (talk) 19:27, 19 April 2022 (UTC)

I guess setting the page MediaWiki:namespace-14-helppage to something that is not a valid page name (but not empty or '-') would do it. For example, setting it to '<'.
You could also add css like .mw-helplink { display:none} (That will kill all help links, not just the category ones) Bawolff (talk) 06:03, 20 April 2022 (UTC)
I've used .mw-indicators {display: none} and according to past me's comments this gets rid of things including help links on category pages. Jonathan3 (talk) 11:18, 20 April 2022 (UTC)
What I did was to go to
skins/Timeless/includes/TimelessTemplate.php
And comment the code which prints the button, so
$this->getIndicators() .
Becomes
// $this->getIndicators() .
109.64.104.73 (talk) 11:29, 20 April 2022 (UTC)
What I did disappeared it both for mobile and desktop displays. 109.64.104.73 (talk) 15:12, 20 April 2022 (UTC)

How to access history, edit, delete and move without ALT+SOMETHING?

I didn't manage to limit the management bar only for registered users so I removed it completely from the PHP but now I can't access history, edit, delete and move articles via:

  • ALT+H
  • ALT+E
  • ALT+D
  • ALT+M

This is the PHP code I have removed:

Html::rawElement( 'div', [ 'id' => 'mw-page-header-links' ],
	// @phan-suppress-next-line SecurityCheck-DoubleEscaped
	$this->getPortlet(
		'namespaces',
		$this->pileOfTools['namespaces'],
		'timeless-namespaces',
		[ 'extra-classes' => 'tools-inline' ]
	) .
	// @phan-suppress-next-line SecurityCheck-DoubleEscaped
	$this->getPortlet(
		'more',
		$this->pileOfTools['more'],
		'timeless-more',
		[ 'extra-classes' => 'tools-inline' ]
	) .
	$this->getVariants() .
	// @phan-suppress-next-line SecurityCheck-DoubleEscaped
	$this->getPortlet(
		'views',
		$this->pileOfTools['page-primary'],
		'timeless-pagetools',
		[ 'extra-classes' => 'tools-inline' ]
	)
) .

How to access history, edit, delete and move without ALT+SOMETHING? 109.64.104.73 (talk) 19:29, 19 April 2022 (UTC)

if its deleted its deleted - the accesskey is part of the link code. You can manually type in the url to those pages. Bawolff (talk) 22:43, 19 April 2022 (UTC)
In codidact.com there is a discussion about an alternative JavaScript way to access these pages:
Move to the edit webpage of a webpage via the keyboard with vanilla JavaScript
codidact.com/posts/286256
109.64.104.73 (talk) 10:54, 20 April 2022 (UTC)
Please do not post broken links here which lack any context. Malyacko (talk) 12:42, 20 April 2022 (UTC)
The correct link is
software.codidact.com/posts/286256
@Malyacko
I don't don't post broken links here which lack any context.
I pasted a link based on a sub domain which my browser omitted --- by mistake !
Furthermore, responsibly I also gave the title of the discussion to search in Google.
Please don't accuse users in this general way for a trivial random mistake. 109.64.104.73 (talk) 15:16, 20 April 2022 (UTC)
@Clump
Hopefully it's okay I ping you here (please tell me if it's not) but there are two spam comments just above this message. 109.64.104.73 (talk) 07:57, 21 April 2022 (UTC)
Already deleted by Mainframe98. Clump (talk) 11:41, 21 April 2022 (UTC)
Relevant side topics:
Project:Support desk/Flow/2022/04#h-JavaScript_to_edit_a_page_or_move_a_page-2022-04-20T21:22:00.000Z
Project:Support desk/Flow/2022/04#h-JavaScript_to_view_the_history_of_a_page-2022-04-21T16:19:00.000Z 109.64.104.73 (talk) 16:22, 21 April 2022 (UTC)

How to acces the section number?

Greetings,

In the n-th section of a page, clicking edit source links to the url /w/index.php?title=page name&action=edit&section=n.

Is there a magic word which returns this number according to the section where it is located? GrandEscogriffe (talk) 19:36, 19 April 2022 (UTC)

Unfortunately no. Bawolff (talk) 22:19, 19 April 2022 (UTC)

「脚注」のテンプレートを追加したい

新規にMediaWikiをインストールしました。

「脚注」にWikipediaのような「日付」等を簡便な操作で入力できる「Cite news」テンプレートを使用できるようにしたいのですが、方法が分からず困っております。

知識が足りずたいへん恐縮ですが、ご教示のほど、よろしくお願い致します。 153.231.84.170 (talk) 04:18, 20 April 2022 (UTC)

申し訳ありません。変換がかなりおかしくなっています・・・。
「脚注」にウィキペディアでされているような「日付」等を簡便な操作で入力できる「Cite」等のテンプレートを使用したいのですが、方法が分からず困っております。
知識が足りずたいへん恐熱ですが、よろしくお願いいたします。 153.231.84.170 (talk) 04:21, 20 April 2022 (UTC)
I have newly installed MediaWiki.
I would like to be able to use the "Cite news" template for "Footnotes", which allows me to input "dates" and other information in a simple operation like Wikipedia, but I am having trouble understanding how to do this.
I am very sorry for my lack of knowledge, but I would appreciate your help. 153.231.84.170 (talk) 05:48, 20 April 2022 (UTC)

How to Align 2 Images with small text Below each image Horizontally?

Can someone please tell me how do I align 2 images with small text below each image without sacrificing display:flex and flex-wrap:wrap?

Here is the HTML code:

SMALL ENGLISH TEXT 1 GOES HERE
SMALL ENGLISH TEXT 2 GOES HERE

Fomkwiki (talk) 06:56, 20 April 2022 (UTC)

What does this have to do with MediaWiki? Please see "Post a new question" in the sidebar. Malyacko (talk) 07:18, 20 April 2022 (UTC)

Domain isn't working after loading back-up; htaccess permissions?

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


Hey everyone. Hope all are well.

Having an issue with my wiki sinceI've uploaded the backup. When accessing the site it says:

Forbidden

You don't have permission to access this resource.Server unable to read htaccess file, denying access to be safe.


anyone have any suggestions for a novice to fix this?


TIA Thepainking (talk) 14:05, 20 April 2022 (UTC)

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

Night mode

When activated, the night mode has a white stripe in the left portion of the screen that can be visible by scolling down the page 95.244.34.32 (talk) 15:57, 20 April 2022 (UTC)

What "night mode" where and how, in which skin, after which steps? Please read "Post a new question" in the side bar. Malyacko (talk) 06:38, 21 April 2022 (UTC)

Spammer blocking???

Despite having a captcha for spammers to edit pages on my wiki, I'm still getting spam from existing users.

Any suggestions on how to block all these users (autoconfirmed user group) all at once, would be greatly appreciated.

TIA. Thepainking (talk) 17:59, 20 April 2022 (UTC)

Manual:Combating spam may help – Ammarpad (talk) 08:58, 21 April 2022 (UTC)

JavaScript to edit a page or move a page

Please disable the edit and move built-in buttons and try this JavaScript (credit to user:hkotsubo‭ from codidact.com).

let domain = window.location.host;
let protocol = window.location.protocol;
let h1 = document.querySelector("h1");

window.addEventListener('keydown', function(event) {
    if (event.altKey && event.shiftKey && event.key === 'E') {
        window.location.href = `${protocol}//${domain}/index.php?title=${h1.innerText}&action=edit`;
    }
});

window.addEventListener('keydown', function(event) {
    if (event.altKey && event.shiftKey && event.key === 'M') {
        window.location.href = `${protocol}//${domain}/index.php?title=${h1.innerText}&action=move`;
    }
});

After running this code in console, I can edit a page but I cannot move it; when I try to move it I get "אין פעולה כזו" ("there is no such action").

Why?

Thanks, 109.64.104.73 (talk) 21:22, 20 April 2022 (UTC)

Page move is not implemented with Action mechanism.
You have to use something like this: (untested)
window.addEventListener('keydown', function(event) {
    if (event.altKey && event.shiftKey && event.key === 'M') {
        window.location.href = `${protocol}//${domain}/index.php/Special:MovePage/${h1.innerText}`;
    }
});
Ammarpad (talk) 08:56, 21 April 2022 (UTC)
Thank you so much, @Ammarpad
Special:MovePage worked for me, double tested.
In big plea, one more similar question,
What about history?
I also didn't find action=history
I tried Special:History and Special:PageHistory but I didn't reach the history page of the associated article.
Please share with us, what's worth trying? 109.64.104.73 (talk) 09:11, 21 April 2022 (UTC)
There's `action=history`. It the url is correct (and the page exists) it should work normally. – Ammarpad (talk) 10:48, 21 April 2022 (UTC)
@Ammarpad
I tried this:
let domain = window.location.host;
let protocol = window.location.protocol;
let h1 = document.querySelector("h1");
window.addEventListener('keydown', function(event) {
    if (event.altKey && event.shiftKey && event.key === 'D') {
        window.location.href = `${protocol}//${domain}/index.php?title=${h1.innerText}&action=history`;
    }
});
But in MediaWiki 1.36.1 in Hebrew it doesn't work.
I get "אין פעולה כזו" (there's no such action). 109.64.104.73 (talk) 11:31, 21 April 2022 (UTC)
=== 'D' 
Should be
=== 'H'
109.64.104.73 (talk) 15:46, 21 April 2022 (UTC)
Sadly it doesn't work, but I guess I should open a new dedicated thread since this is a new standalone problem. 109.64.104.73 (talk) 15:46, 21 April 2022 (UTC)
Please mark the current thread as solved because the original problem has been solved but the aside discussion in another similar problem continues here:
Project:Support desk/Flow/2022/04#h-JavaScript_to_view_the_history_of_a_page-2022-04-21T16:19:00.000Z 109.64.104.73 (talk) 16:21, 21 April 2022 (UTC)

pass data to an API

I am trying to send two data to my API. If the user press submit button, then the user and a flag will be sent to the API for storing into database. I can successfully use the user name from the API without passing data from AJAX by using $this->getUser(). But I want to pass the information through Ajax but not able to do that. Can anyone please help me how can I do that. I am a fresher in mediawiki.

my .js file

function savedata(evt) {

mw.loader.using( 'mediawiki.api', function () {

( new mw.Api() ).get( {

action: 'praisebutton',

rsargs:['xyz',1]

} ).done( function ( data ) {

alert('Thank you.');

window.location.href = "http://localhost/mediawiki/index.php/Main_Page";

});

} );

evt.stopPropagation();

}

$("#tn1").on("click", savedata);

my my_api.php

class praiseapi extends ApiBase {

public function execute() {

$this->getResult()->addValue(null, $this->getModuleName(), $this->getUser() );


$param = $this->extractRequestParams();

$f = $param['flag'];

$name = $param['nam'];

$dbw = wfGetDB( DB_MASTER );

$insertQuery = $dbw->insert(

'praisegm',

array(

'username' => $name,//$name,

'flag' => $f

)

   );

   

}

public function getAllowedParams() {

        return [

'nam' => [

                 ApiBase::PARAM_TYPE => 'string'

             ],

'flag' => [

                 ApiBase::PARAM_TYPE => 'integer'

             ],

];     

}

} 174.2.10.111 (talk) 05:28, 21 April 2022 (UTC)

HTML in Sitenotice

Is there any way to re-enable HTML parsing inside of Sitenotice the way it was back in 1.23 ? My Wiki-as-Webiste used that to include global pulldown menus at the top of every page. Tehrasha (talk) 07:33, 21 April 2022 (UTC)

It's working for me. Please give more details or link to the site if it's public? – Ammarpad (talk) 08:38, 21 April 2022 (UTC)
We disabled raw html in all mediawiki messages as a security measure a while back (too easy to get adversary controlled data into error messages leading to xss).
The security issue doesnt apply to site notice, but its a blanket disable on all messages Bawolff (talk) 11:34, 21 April 2022 (UTC)
Original Site MW 1.23.3 (working) www.spacemice.org
New Site MW 1.35.3 (not working or public yet)
Displays <html> tags cannot be used outside of normal pages. at top of every page.
$wgRawHtml is set to True on both Tehrasha (talk) 10:41, 21 April 2022 (UTC)
Manual:hooks/SiteNoticeAfter might be the best solution here. Unfortunately there is no way to disable the raw html restriction just for the sitenotice.
E.g. (untested) in LocalSettings.php
$wgHooks['SiteNoticeAfter'][] = function(&$sitenotice) { $sitenotice .= "html here";};
Bawolff (talk) 11:40, 21 April 2022 (UTC)
Thanks! This got me 90% of the way there. Now if I can just get the embedded javascript to work... Tehrasha (talk) 06:54, 27 April 2022 (UTC)

Javascript not loading

After Updating from 1.31 to 1.36 to 1.37 (but already happend on 1.36) my javascripts are not working, so i cant tab in the user preferences tabs and also Wikieditor or the default editor are not showing up.

The following error is showing up if i analyze with F12.

I also disabled various Extensions already without success.


load.php?lang=de&modules=startup&only=scripts&raw=1&skin=timeless:1

       Uncaught SyntaxError: Private field '#function' must be declared in an enclosing class (at load.php?lang=de&modules=startup&only=scripts&raw=1&skin=timeless:1:1) 109.199.165.149 (talk) 09:24, 21 April 2022 (UTC)

Please use the "safemode=true" URL parameter to find the exact place in the code where this happens. Malyacko (talk) 11:34, 21 April 2022 (UTC)
i reset the snapshot to 1.33 and then updated to 1.35, and now it's working, maybe something went wrong, as i read it's better to update to the LTS version first.
Now it's working! 109.199.165.149 (talk) 08:40, 22 April 2022 (UTC)

API call is not working

We are trying to connect to our wiki site with API using python, but we are getting the error "readapidenied","info":"You need read permission to use this module","*"". We are not able to get the login token as well. Any suggestion how to fix this issue?

We are trying to copy the contents from our wiki site to confluence by using the API. User Tusar (talk) 10:14, 21 April 2022 (UTC)

You need to be logged in Bawolff (talk) 11:32, 21 April 2022 (UTC)

Upgarding wiki farm from 1.35 to 1.37

Need help to update

Hi, I am running wiki farm website with different localisations but using one file system. And I would like to upgrade MW from 1.35 to 1.37.

All was prepared, but as soon as I run update.php I have following error:

root@mail:/var/www/admin/www/mediawiki-1.37.2/maintenance# /opt/php73/bin/php update.php
Warning: include(/var/www/admin/www/mediawiki-1.37.2/vendor/composer/../liuggio/statsd-php-client/src/Liuggio/StatsdClient/Factory/StatsdDataFactoryInterface.php): failed to open stream: No such file or directory in /var/www/admin/www/mediawiki-1.37.2/vendor/composer/ClassLoader.php on line 571
Warning: include(/var/www/admin/www/mediawiki-1.37.2/vendor/composer/../liuggio/statsd-php-client/src/Liuggio/StatsdClient/Factory/StatsdDataFactoryInterface.php): failed to open stream: No such file or directory in /var/www/admin/www/mediawiki-1.37.2/vendor/composer/ClassLoader.php on line 571
Warning: include(): Failed opening '/var/www/admin/www/mediawiki-1.37.2/vendor/composer/../liuggio/statsd-php-client/src/Liuggio/StatsdClient/Factory/StatsdDataFactoryInterface.php' for inclusion (include_path='/var/www/admin/www/mediawiki-1.37.2/vendor/pear/console_getopt:/var/www/admin/www/mediawiki-1.37.2/vendor/pear/mail:/var/www/admin/www/mediawiki-1.37.2/vendor/pear/mail_mime:/var/www/admin/www/mediawiki-1.37.2/vendor/pear/net_smtp:/var/www/admin/www/mediawiki-1.37.2/vendor/pear/net_socket:/var/www/admin/www/mediawiki-1.37.2/vendor/pear/net_url2:/var/www/admin/www/mediawiki-1.37.2/vendor/pear/pear-core-minimal/src:/var/www/admin/www/mediawiki-1.37.2/vendor/pear/pear_exception:.:/opt/php73') in /var/www/admin/www/mediawiki-1.37.2/vendor/composer/ClassLoader.php on line 571
Fatal error: Interface 'Liuggio\StatsdClient\Factory\StatsdDataFactoryInterface' not found in /var/www/admin/www/mediawiki-1.37.2/includes/libs/stats/IBufferingStatsdDataFactory.php on line 13
root@mail:/var/www/admin/www/mediawiki-1.37.2/maintenance# 

Any suggestions how to resolve the issue? Fokebox (talk) 14:11, 21 April 2022 (UTC)

Really don't know what to do ( Fokebox (talk) 14:30, 21 April 2022 (UTC)
This error sometimes happens when using 7zip to extract tar files. If you are on linux try using commandine tar program instead (or anything that isnt 7zip) Bawolff (talk) 23:36, 21 April 2022 (UTC)
Yes, it seems to be so, the problem is gone when I uploaded the folder via ftp. Usually I use terminal to upload the archive and extract files with mc. And what is the correct way to unarchieve the flies then? Fokebox (talk) 05:41, 22 April 2022 (UTC)
Im surprised that mc would have this error. Generally using tar command (e.g. tar xvzf mediawiki.tar.gz) works. Its an issue related to some tar implementations not supporting long file names. Bawolff (talk) 13:20, 22 April 2022 (UTC)
I haven't used command tar xvzf, I simply entered the archieve and copied files. May be that's why I have had the issue? Fokebox (talk) 13:53, 22 April 2022 (UTC)

JavaScript to view the history of a 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.


Please disable the View History built-in button and try this JavaScript to view the revision history of an article (credit to user:hkotsubo‭ from codidact.com).
let domain = window.location.host;
let protocol = window.location.protocol;
let h1 = document.querySelector("h1");
window.addEventListener('keydown', function(event) {
    if (event.altKey && event.shiftKey && event.key === 'H') {
        window.location.href = `${protocol}//${domain}/index.php?title=${h1.innerText}&action=history`;
    }
});
Running this code in MediaWiki 1.36.1 in Hebrew idoesn't work.

I get "אין פעולה כזו" (there's no such action).


Why would this happen and how to solve that problem? 109.64.104.73 (talk) 16:19, 21 April 2022 (UTC)

I couldn't access the history due to having
$wgActions['history'] = false; # Complete history lockup;
In the web application root's LocalSettings.php file.
After I have commented this command, I could access the history just fine. 109.64.104.73 (talk) 21:49, 21 April 2022 (UTC)
Someone, please delete the spam message above and I also suggest to mark this thread as solved. 109.64.104.73 (talk) 08:47, 22 April 2022 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

load image from computer

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 want to show an image on my special page from my computer. So far I have added image from a website to my special page using

$output->addHTML('<div style="width: 48%; float:left; height:60%;border-style: solid; border-color: green;"> <img src = "https://www.gardeningknowhow.com/wp-content/uploads/2021/07/sulfur-cosmos-mexican-aster-flowers-400x300.jpg" style="width:100%;height:120%;"></image>

  </div>');

but if I want to use image from my local machine, how to do that? 174.2.10.111 (talk) 06:10, 22 April 2022 (UTC)

You should copy that file from your local computer to the server where MediaWiki is running, and place it inside the extension folder where your special page is located (ideally inside a folder named "resources" or similar). Then build a URL to that image using $wgScriptPath and then append the remaining of the URL to it, so it can work even if you change the location of your wiki. Ciencia Al Poder (talk) 08:04, 22 April 2022 (UTC)
thank you. it is working now 174.2.10.111 (talk) 08:39, 22 April 2022 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

What is MediaWiki, the software

Is MediaWiki used to create a wiki or what? - CafeGurrier66 (talkcontribs) 10:24, 22 April 2022 (UTC)

Yes.
For example, Wikipedia is run on MediaWiki.
If you installed MediaWiki, you could start your own wiki, or run a copy of an existing wiki. The Transhumanist (talk) 10:48, 22 April 2022 (UTC)
OK. Thanks. - CafeGurrier66 (talkcontribs) 12:54, 22 April 2022 (UTC)

How do you search support desk threads?

Where are the discussions from the support desk archived?

And how do you search them? The Transhumanist (talk) 10:55, 22 April 2022 (UTC)

(Referring to posts from 2016 to present) The Transhumanist (talk) 10:58, 22 April 2022 (UTC)

Is there a way to view Project:Support desk as a normal page?

How? The Transhumanist (talk) 10:56, 22 April 2022 (UTC)

No Bawolff (talk) 13:21, 22 April 2022 (UTC)

error on mediawiki 1.38-rc.0

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


hello i detected mediawiki beta of 1.38 have a error when edit a page and insert a math formule or chemistry formule. save the page and had this error

Error: Class 'Wikimedia\Equivset\Equivset' not found

this library don't found in the vendor folder Gota de agua (talk) 16:29, 22 April 2022 (UTC)

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

How to open the visual editor with JavaScript?

MediaWiki 1.36.1 with Skin:Timeless

The following JavaScript doesn't work.

I get in the browser console:

Your skin is incompatible with VisualEditor. See https://www.mediawiki.org/wiki/Extension:VisualEditor/Skin_requirements for the requirements.

That's strange because right after installing Visual Editor, when I first came to edit, I was asked if I want to use the source code editor OR the visual editor and when I chose the Visual Editor, it worked fine.

let domain = window.location.host;
let protocol = window.location.protocol;
let h1 = document.querySelector("h1");

window.addEventListener('keydown', function(event) {
    if (event.altKey && event.shiftKey && event.key === 'E') {
        window.location.href = `${protocol}//${domain}/index.php?title=${h1.innerText}&veaction=edit`;
    }
});

Why do I get the above error in console and how to solve it? 109.64.104.73 (talk) 16:39, 22 April 2022 (UTC)

Perhaps there is a need in dispatchEvent(new Event('change')); somewhere? 109.64.104.73 (talk) 16:40, 22 April 2022 (UTC)
Nope, no need in dispatchEvent. 109.64.104.73 (talk) 16:41, 22 April 2022 (UTC)
Please try to explain the problem. 109.64.104.73 (talk) 17:05, 22 April 2022 (UTC)
@Clump
Man, so sorry to bother you, my last comment here should have been written in another thread so please delete it.
I promise that this should never happen again.
Stress, tiredness and too many bookmarks of threads took me down.
I am sorry ! 109.64.104.73 (talk) 03:22, 23 April 2022 (UTC)
A nice workaround I've found:
Enabling both Extension:WikiEditor and Extension:VisualEditor from LocalSettings.php and then accessing the Visual Editor from WikiEditor.
In the WikiEditor toolbar, in the left edge there should be a pencil icon which clicking on gives the option to switch for Visual Editor. 109.64.104.73 (talk) 03:28, 23 April 2022 (UTC)

How to present a list of a few most read articles ever?

MediaWiki 1.36.1.

I want to present a small box in the homepages with a list of the, say, 5-10 most read articles (or most visited pages, for that matter).

Is there a core way to do that? 109.64.104.73 (talk) 16:43, 22 April 2022 (UTC)

No. All methods require extensions. Core does not keep track of page views. Bawolff (talk) 21:22, 22 April 2022 (UTC)
If I install Google Analytics, I could draw the data from there, by some HTML with a script accessing the API of the local Google Analytics.
Is that correct? 109.64.104.73 (talk) 22:08, 22 April 2022 (UTC)
I think it'd be better if I open another thread dedicated to Google Analytics. 109.64.104.73 (talk) 13:12, 23 April 2022 (UTC)
Please consider to mark this thread as solved. 109.64.104.73 (talk) 13:12, 23 April 2022 (UTC)
Continuation thread
Project:Support desk/Flow/2022/04#h-Use_Google_analytics_to_get_the_most_visited_pages_and_show_them_in_a_template-2022-04-23T13:17:00.000Z 109.64.104.73 (talk) 18:44, 23 April 2022 (UTC)

Is there a way to redirect all source code edit pages into visual editor edit pages?

Is there a way to redirect all source code edits into visual editor edits?

Odd, I know, but just a temporary workaround to solve the problem described here:

Project:Support desk/Flow/2022/04#h-How_to_open_the_visual_editor_with_JavaScript?-2022-04-22T16:39:00.000Z 109.64.104.73 (talk) 17:27, 22 April 2022 (UTC)

I have found a better workaround:
Enabling both Extension:WikiEditor and extension:VisualEditor and then accessing the Visual Editor from WikiEditor. 109.64.104.73 (talk) 03:24, 23 April 2022 (UTC)

How do I report a Wiki?

Hello,

I found a Wiki page containing illegal activity. I was wondering how to report it and get it taken down. 2605:8D80:4E0:9A43:F89D:5D1D:7DAA:5E9D (talk) 17:50, 22 April 2022 (UTC)

Which wiki is it.
If it is a Wikimedia foundation wiki (Wikipedia, wikibooks, etc) then it depends on the nature of the activity. If its copyright related, most wikis have an onwiki process or you can file a dmca notice. If it is not copyright depends on what it is but if users are engaging in criminal activity probably email trust & safety - trusa@wikimedia.org
If its a non wikimedia foundation wiki, not much you can do other than going to the police. (For copyright you can file dmca takedown) Bawolff (talk) 21:21, 22 April 2022 (UTC)
Hello,
That email you gave said it's a invalid address 2605:8D80:4E0:9A43:F89D:5D1D:7DAA:5E9D (talk) 01:11, 23 April 2022 (UTC)
try ca@wikimedia.org . Bawolff (talk) 01:55, 23 April 2022 (UTC)
Hello,
I used that email and got a reply:
Thank you for your email to the Wikimedia Foundation's Trust and Safety team. We have looked into this matter and wanted to let you know that *******.wiki is not a Wikimedia Project and therefore we are unable to remove the page as you requested.
We hope the above information is helpful and have a great week ahead.
Best regards,
Julius Dion
Trust and Safety Specialist
Wikimedia Foundation 216.36.180.118 (talk) 03:44, 25 April 2022 (UTC)
Which is why i asked whether or not it was a wikimedia wiki, as that contact is only for issues involving wikimedia wikis.
None of the wikis that use the TLD .wiki as their canonical name are wikimedia wikis. Bawolff (talk) 14:30, 25 April 2022 (UTC)
Call your local police department —TheDJ (Not WMF) (talkcontribs) 21:26, 22 April 2022 (UTC)
Local police do not have jurisdiction unless it is hosted locally. If there is no contact information provided directly, then you check the ICANN WHOIS database: https://lookup.icann.org/. If nothing else, it should tell you who is hosting the site, and if you cannot reach the site admin, you can ask the host to remove the content if it violates their terms of use (most illegal content does).
When I check for mediawiki.org for example, it says that the contact info for the Wikimedia Foundation has been redacted for privacy, but the domain name is registered via MarkMonitor.com, a commercial domain registrar who does have contact information available, with a hotline to report abuse.
There are also specialized agencies to investigate specific crimes such as child abuse or terrorism. Depending on your location, there are usually hotlines available to inform authorities. If you are not sure who to call, I would recommend (in the USA) contacting the FBI: https://www.fbi.gov/contact-us/.
Nicole Sharp (talk) 05:32, 25 April 2022 (UTC)

How to run MediaWiki code inside HTML?

I wish to run MediaWiki code inside HTML.

I have pasted the following HTML+MediaWiki code inside the homepage of my website.

<html>
	<body>
		<div class="mainpage_row">
			<div class="mainpage_box">[[Special:Randompage]]</div>
			<div class="mainpage_box">{{NUMBEROFARTICLES}}</div>
		</div>
	</body>
</html>

Expected output

A link to a random page and a counting of articles

Current output

Mere text, as:

[[Special:Randompage]]
{{NUMBEROFARTICLES}}

109.64.104.73 (talk) 20:19, 22 April 2022 (UTC)

By the way, it doesn't matter if the nesting is tabulation based or whitespace based; in either the problem persists. 109.64.104.73 (talk) 20:51, 22 April 2022 (UTC)
@Clump I think that the above message might be spam. I am really not sure. 109.64.104.73 (talk) 22:10, 22 April 2022 (UTC)
What I had to do was to separate the <html> tags from the <div> tags, so that <html> would wrap only the <style> tags.
Here is a code example
<html>
	<style>
		.mainpage_row {
		display: flex;
		flex-direction: row;
		justify-content: space-evenly;
		padding: 0;
		}
		.mainpage_box {
		border: 1px solid #CCC;
		margin: 5px;
		min-width: 200px;
		padding: 0 10px 10px 10px;
		box-shadow: 0 2px 2px rgba(0, 0, 0, 0.1);
		}
	</style>
</html>
<div class="mainpage_row">
	<div class="mainpage_box">[[מיוחד:דף אקראי|דף אקראי]]</div>
	<div class="mainpage_box">יש כרגע באתר {{NUMBEROFARTICLES}} {{קתים}}</div>
</div>
Why is this separation necessary? I don't know, it might do with how MediaWiki interprets its article codes.
Maybe I should add that I did all of this when working with Manual:$wgRawHtml set to true. 109.64.104.73 (talk) 03:22, 23 April 2022 (UTC)
Because div is valid both in wikitext and html, where style is only allowed in html,and stuff in { are only allowed in wikitext.
If you wanted to do it in pure wikitext you can use style attributes. Extension:TemplateStyles is another popular option. Bawolff (talk) 07:12, 23 April 2022 (UTC)
Thank you Bawolff !
Side note "קתים" is an abbreviation of "קטעי תוכן" (pieces of content) which I use in a template in case I would want to change all "articles" to "pages" or another similar word, easily in one go. I know it can also be done with SQL, but I just like it this way. 109.64.104.73 (talk) 08:22, 23 April 2022 (UTC)

False, missleading Information.

I have found a profile of a person to verify what was reported by an international news media. After some minor research. To say not really any effort. I found that Wikipedia is posting bad information.

Ive been looking for a reason to start a web server project to protect People from false information. Which ive never done. Ive been waiting for, lets just say the stars to align.

My question is why do a major website such as yourselves post false information that avoids satire? 72.47.14.191 (talk) 20:51, 22 April 2022 (UTC)

Please direct wikipedia questions to wikpedia. We wre MediaWiki not Wikipedia.
That said, reading w:Wikipedia might answer your question.
See also w:WP:BLP Bawolff (talk) 21:03, 22 April 2022 (UTC)

How to turn on WikiText editor?

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


I understand that MediaWiki core includes two text editors

  • WikiText editor (kind of a "WYSIWYG" editor
  • Visual Editor


Both are not on by default.

While one can turn on Visual Editor from LocalSettings.php, it is unclear to me how one should turn on the more trivial WikiText editor.


How to turn on WikiText editor? 109.64.104.73 (talk) 01:07, 23 April 2022 (UTC)

Neither of these are part of mediawiki core. They are both extensions. Extension:WikiEditor and extension:VisualEditor have more instructions. Bawolff (talk) 01:51, 23 April 2022 (UTC)
Oh, by "core" I meant "coming with the program" (no need to download).
Is there a better term then? 109.64.104.73 (talk) 02:15, 23 April 2022 (UTC)
Core+bundled extensions.
However it depends on how you obtain mediawiki, some methods do not include bundled extensions and there are alternative versions that bundle different extensions than the normal download page. Bawolff (talk) 07:09, 23 April 2022 (UTC)
I thank Bawolff for is terminology remark.
I suggest to mark the thread as solved. 109.64.104.73 (talk) 08:25, 23 April 2022 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

500 error PHP style

I installed a new wiki (1.37.2) on nginx and wanted to install the Library style, but the server gives me a 500 error

Log:

2022/04/23 11:08:04 [error] 623#623: *48 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught Exception: Unable to open file /var/www/mediawiki/skins/Library/skin.json: filemtime(): stat failed for /var/www/mediawiki/skins/Library/skin.json in /var/www/mediawiki/includes/registration/ExtensionRegistry.php:182

Stack trace:

#0 /var/www/mediawiki/includes/GlobalFunctions.php(89): ExtensionRegistry->queue()

#1 /var/www/mediawiki/LocalSettings.php(136): wfLoadSkin()

#2 /var/www/mediawiki/includes/Setup.php(145): require_once('/var/www/mediaw...')

#3 /var/www/mediawiki/includes/WebStart.php(90): require_once('/var/www/mediaw...')

#4 /var/www/mediawiki/index.php(44): require('/var/www/mediaw...')

#5 {main}

  thrown in /var/www/mediawiki/includes/registration/ExtensionRegistry.php on line 182" while reading response header from upstream, client: 94.25.238.101, server: badega.ru, request: "GET /index.php?title=%D0%97%D0%B0%D0%B3%D0%BB%D0%B0%D0%B2%D0%BD%D0%B0%D1%8F_%D1%81%D1%82%D1%80%D0%B0%D0%BD%D0%B8%D1%86%D0%B0 HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.4-fpm.sock:", host: "badega.ru"

2022/04/23 11:08:06 [error] 623#623: *48 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught Exception: Unable to open file /var/www/mediawiki/skins/Library/skin.json: filemtime(): stat failed for /var/www/mediawiki/skins/Library/skin.json in /var/www/mediawiki/includes/registration/ExtensionRegistry.php:182

Stack trace:

#0 /var/www/mediawiki/includes/GlobalFunctions.php(89): ExtensionRegistry->queue()

#1 /var/www/mediawiki/LocalSettings.php(136): wfLoadSkin()

#2 /var/www/mediawiki/includes/Setup.php(145): require_once('/var/www/mediaw...')

#3 /var/www/mediawiki/includes/WebStart.php(90): require_once('/var/www/mediaw...')

#4 /var/www/mediawiki/index.php(44): require('/var/www/mediaw...')

#5 {main}

  thrown in /var/www/mediawiki/includes/registration/ExtensionRegistry.php on line 182" while reading response header from upstream, client: 94.25.238.101, server: badega.ru, request: "GET /index.php?title=%D0%97%D0%B0%D0%B3%D0%BB%D0%B0%D0%B2%D0%BD%D0%B0%D1%8F_%D1%81%D1%82%D1%80%D0%B0%D0%BD%D0%B8%D1%86%D0%B0 HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.4-fpm.sock:", host: "badega.ru"

2022/04/23 11:08:07 [error] 623#623: *48 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught Exception: Unable to open file /var/www/mediawiki/skins/Library/skin.json: filemtime(): stat failed for /var/www/mediawiki/skins/Library/skin.json in /var/www/mediawiki/includes/registration/ExtensionRegistry.php:182

Stack trace:

#0 /var/www/mediawiki/includes/GlobalFunctions.php(89): ExtensionRegistry->queue()

#1 /var/www/mediawiki/LocalSettings.php(136): wfLoadSkin()

#2 /var/www/mediawiki/includes/Setup.php(145): require_once('/var/www/mediaw...')

#3 /var/www/mediawiki/includes/WebStart.php(90): require_once('/var/www/mediaw...')

#4 /var/www/mediawiki/index.php(44): require('/var/www/mediaw...')

#5 {main}

  thrown in /var/www/mediawiki/includes/registration/ExtensionRegistry.php on line 182" while reading response header from upstream, client: 94.25.238.101, server: badega.ru, request: "GET /index.php?title=%D0%97%D0%B0%D0%B3%D0%BB%D0%B0%D0%B2%D0%BD%D0%B0%D1%8F_%D1%81%D1%82%D1%80%D0%B0%D0%BD%D0%B8%D1%86%D0%B0 HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.4-fpm.sock:", host: "badega.ru"

2022/04/23 11:08:07 [error] 623#623: *48 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught Exception: Unable to open file /var/www/mediawiki/skins/Library/skin.json: filemtime(): stat failed for /var/www/mediawiki/skins/Library/skin.json in /var/www/mediawiki/includes/registration/ExtensionRegistry.php:182

Stack trace:

#0 /var/www/mediawiki/includes/GlobalFunctions.php(89): ExtensionRegistry->queue()

#1 /var/www/mediawiki/LocalSettings.php(136): wfLoadSkin()

#2 /var/www/mediawiki/includes/Setup.php(145): require_once('/var/www/mediaw...')

#3 /var/www/mediawiki/includes/WebStart.php(90): require_once('/var/www/mediaw...')

#4 /var/www/mediawiki/index.php(44): require('/var/www/mediaw...')

#5 {main}

  thrown in /var/www/mediawiki/includes/registration/ExtensionRegistry.php on line 182" while reading response header from upstream, client: 94.25.238.101, server: badega.ru, request: "GET /index.php?title=%D0%97%D0%B0%D0%B3%D0%BB%D0%B0%D0%B2%D0%BD%D0%B0%D1%8F_%D1%81%D1%82%D1%80%D0%B0%D0%BD%D0%B8%D1%86%D0%B0 HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.4-fpm.sock:", host: "badega.ru"

2022/04/23 11:08:08 [error] 623#623: *48 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught Exception: Unable to open file /var/www/mediawiki/skins/Library/skin.json: filemtime(): stat failed for /var/www/mediawiki/skins/Library/skin.json in /var/www/mediawiki/includes/registration/ExtensionRegistry.php:182

Stack trace:

#0 /var/www/mediawiki/includes/GlobalFunctions.php(89): ExtensionRegistry->queue()

#1 /var/www/mediawiki/LocalSettings.php(136): wfLoadSkin()

#2 /var/www/mediawiki/includes/Setup.php(145): require_once('/var/www/mediaw...')

#3 /var/www/mediawiki/includes/WebStart.php(90): require_once('/var/www/mediaw...')

#4 /var/www/mediawiki/index.php(44): require('/var/www/mediaw...')

#5 {main}

  thrown in /var/www/mediawiki/includes/registration/ExtensionRegistry.php on line 182" while reading response header from upstream, client: 94.25.238.101, server: badega.ru, request: "GET /index.php?title=%D0%97%D0%B0%D0%B3%D0%BB%D0%B0%D0%B2%D0%BD%D0%B0%D1%8F_%D1%81%D1%82%D1%80%D0%B0%D0%BD%D0%B8%D1%86%D0%B0 HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.4-fpm.sock:", host: "badega.ru"

2022/04/23 11:08:08 [error] 623#623: *48 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught Exception: Unable to open file /var/www/mediawiki/skins/Library/skin.json: filemtime(): stat failed for /var/www/mediawiki/skins/Library/skin.json in /var/www/mediawiki/includes/registration/ExtensionRegistry.php:182

Stack trace:

#0 /var/www/mediawiki/includes/GlobalFunctions.php(89): ExtensionRegistry->queue()

#1 /var/www/mediawiki/LocalSettings.php(136): wfLoadSkin()

#2 /var/www/mediawiki/includes/Setup.php(145): require_once('/var/www/mediaw...')

#3 /var/www/mediawiki/includes/WebStart.php(90): require_once('/var/www/mediaw...')

#4 /var/www/mediawiki/index.php(44): require('/var/www/mediaw...')

#5 {main}

  thrown in /var/www/mediawiki/includes/registration/ExtensionRegistry.php on line 182" while reading response header from upstream, client: 94.25.238.101, server: badega.ru, request: "GET /index.php?title=%D0%97%D0%B0%D0%B3%D0%BB%D0%B0%D0%B2%D0%BD%D0%B0%D1%8F_%D1%81%D1%82%D1%80%D0%B0%D0%BD%D0%B8%D1%86%D0%B0 HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.4-fpm.sock:", host: "badega.ru"

2022/04/23 11:08:08 [error] 623#623: *48 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught Exception: Unable to open file /var/www/mediawiki/skins/Library/skin.json: filemtime(): stat failed for /var/www/mediawiki/skins/Library/skin.json in /var/www/mediawiki/includes/registration/ExtensionRegistry.php:182

Stack trace:

#0 /var/www/mediawiki/includes/GlobalFunctions.php(89): ExtensionRegistry->queue()

#1 /var/www/mediawiki/LocalSettings.php(136): wfLoadSkin()

#2 /var/www/mediawiki/includes/Setup.php(145): require_once('/var/www/mediaw...')

#3 /var/www/mediawiki/includes/WebStart.php(90): require_once('/var/www/mediaw...')

#4 /var/www/mediawiki/index.php(44): require('/var/www/mediaw...')

#5 {main}

  thrown in /var/www/mediawiki/includes/registration/ExtensionRegistry.php on line 182" while reading response header from upstream, client: 94.25.238.101, server: badega.ru, request: "GET /index.php?title=%D0%97%D0%B0%D0%B3%D0%BB%D0%B0%D0%B2%D0%BD%D0%B0%D1%8F_%D1%81%D1%82%D1%80%D0%B0%D0%BD%D0%B8%D1%86%D0%B0 HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.4-fpm.sock:", host: "badega.ru" Plostvaler (talk) 09:15, 23 April 2022 (UTC)

Did you install the skin in the right directory? Does the file /var/www/mediawiki/skins/Library/skin.json exist and readable by webserver? Bawolff (talk) 11:12, 23 April 2022 (UTC)
I want to note that the standard styles work
Now the engine gives this error (library style):
MediaWiki internal error.
Original exception: [582f3e9af218e8d55d95aafb] /index.php?title=%D0%97%D0%B0%D0%B3%D0%BB%D0%B0%D0%B2%D0%BD%D0%B0%D1%8F_%D1%81%D1%82%D1%80%D0%B0%D0%BD%D0%B8%D1%86%D0%B0 RuntimeException: Could not compile template `skin`: Could not find partial `Searchbox` at /var/www/mediawiki/skins/Library/includes/templates/Searchbox.mustache
Backtrace:
from /var/www/mediawiki/includes/TemplateParser.php(230)
#0 /var/www/mediawiki/vendor/zordius/lightncandy/src/Partial.php(119): TemplateParser->{closure}()
#1 /var/www/mediawiki/vendor/zordius/lightncandy/src/Partial.php(105): LightnCandy\Partial::resolver()
#2 /var/www/mediawiki/vendor/zordius/lightncandy/src/Partial.php(59): LightnCandy\Partial::resolve()
#3 /var/www/mediawiki/vendor/zordius/lightncandy/src/Validator.php(873): LightnCandy\Partial::read()
#4 /var/www/mediawiki/vendor/zordius/lightncandy/src/Validator.php(211): LightnCandy\Validator::partial()
#5 /var/www/mediawiki/vendor/zordius/lightncandy/src/Validator.php(644): LightnCandy\Validator::operator()
#6 /var/www/mediawiki/vendor/zordius/lightncandy/src/Validator.php(52): LightnCandy\Validator::token()
#7 /var/www/mediawiki/vendor/zordius/lightncandy/src/Compiler.php(40): LightnCandy\Validator::verify()
#8 /var/www/mediawiki/vendor/zordius/lightncandy/src/Partial.php(143): LightnCandy\Compiler::compileTemplate()
#9 /var/www/mediawiki/vendor/zordius/lightncandy/src/Compiler.php(400): LightnCandy\Partial::compileStatic()
#10 /var/www/mediawiki/vendor/zordius/lightncandy/src/Validator.php(211): LightnCandy\Compiler::partial()
#11 /var/www/mediawiki/vendor/zordius/lightncandy/src/Compiler.php(351): LightnCandy\Validator::operator()
#12 /var/www/mediawiki/vendor/zordius/lightncandy/src/Compiler.php(59): LightnCandy\Compiler::compileToken()
#13 /var/www/mediawiki/vendor/zordius/lightncandy/src/LightnCandy.php(46): LightnCandy\Compiler::compileTemplate()
#14 /var/www/mediawiki/includes/TemplateParser.php(252): LightnCandy\LightnCandy::compile()
#15 /var/www/mediawiki/includes/TemplateParser.php(157): TemplateParser->compile()
#16 /var/www/mediawiki/includes/TemplateParser.php(290): TemplateParser->getTemplate()
#17 /var/www/mediawiki/skins/Library/includes/SkinLibrary.php(449): TemplateParser->processTemplate()
#18 /var/www/mediawiki/includes/skins/SkinTemplate.php(144): SkinLibrary->generateHTML()
#19 /var/www/mediawiki/includes/OutputPage.php(2644): SkinTemplate->outputPage()
#20 /var/www/mediawiki/includes/MediaWiki.php(944): OutputPage->output()
#21 /var/www/mediawiki/includes/MediaWiki.php(957): MediaWiki::{closure}()
#22 /var/www/mediawiki/includes/MediaWiki.php(564): MediaWiki->main()
#23 /var/www/mediawiki/index.php(53): MediaWiki->run()
#24 /var/www/mediawiki/index.php(46): wfIndexMain()
#25 {main}
Exception caught inside exception handler: [582f3e9af218e8d55d95aafb] /index.php?title=%D0%97%D0%B0%D0%B3%D0%BB%D0%B0%D0%B2%D0%BD%D0%B0%D1%8F_%D1%81%D1%82%D1%80%D0%B0%D0%BD%D0%B8%D1%86%D0%B0 RuntimeException: Could not compile template `skin`: Could not find partial `Searchbox` at /var/www/mediawiki/skins/Library/includes/templates/Searchbox.mustache
Backtrace:
from /var/www/mediawiki/includes/TemplateParser.php(230)
#0 /var/www/mediawiki/vendor/zordius/lightncandy/src/Partial.php(119): TemplateParser->{closure}()
#1 /var/www/mediawiki/vendor/zordius/lightncandy/src/Partial.php(105): LightnCandy\Partial::resolver()
#2 /var/www/mediawiki/vendor/zordius/lightncandy/src/Partial.php(59): LightnCandy\Partial::resolve()
#3 /var/www/mediawiki/vendor/zordius/lightncandy/src/Validator.php(873): LightnCandy\Partial::read()
#4 /var/www/mediawiki/vendor/zordius/lightncandy/src/Validator.php(211): LightnCandy\Validator::partial()
#5 /var/www/mediawiki/vendor/zordius/lightncandy/src/Validator.php(644): LightnCandy\Validator::operator()
#6 /var/www/mediawiki/vendor/zordius/lightncandy/src/Validator.php(52): LightnCandy\Validator::token()
#7 /var/www/mediawiki/vendor/zordius/lightncandy/src/Compiler.php(40): LightnCandy\Validator::verify()
#8 /var/www/mediawiki/vendor/zordius/lightncandy/src/Partial.php(143): LightnCandy\Compiler::compileTemplate()
#9 /var/www/mediawiki/vendor/zordius/lightncandy/src/Compiler.php(400): LightnCandy\Partial::compileStatic()
#10 /var/www/mediawiki/vendor/zordius/lightncandy/src/Validator.php(211): LightnCandy\Compiler::partial()
#11 /var/www/mediawiki/vendor/zordius/lightncandy/src/Compiler.php(351): LightnCandy\Validator::operator()
#12 /var/www/mediawiki/vendor/zordius/lightncandy/src/Compiler.php(59): LightnCandy\Compiler::compileToken()
#13 /var/www/mediawiki/vendor/zordius/lightncandy/src/LightnCandy.php(46): LightnCandy\Compiler::compileTemplate()
#14 /var/www/mediawiki/includes/TemplateParser.php(252): LightnCandy\LightnCandy::compile()
#15 /var/www/mediawiki/includes/TemplateParser.php(157): TemplateParser->compile()
#16 /var/www/mediawiki/includes/TemplateParser.php(290): TemplateParser->getTemplate()
#17 /var/www/mediawiki/skins/Library/includes/SkinLibrary.php(449): TemplateParser->processTemplate()
#18 /var/www/mediawiki/includes/skins/SkinTemplate.php(144): SkinLibrary->generateHTML()
#19 /var/www/mediawiki/includes/OutputPage.php(2644): SkinTemplate->outputPage()
#20 /var/www/mediawiki/includes/exception/MWExceptionRenderer.php(158): OutputPage->output()
#21 /var/www/mediawiki/includes/exception/MWExceptionRenderer.php(77): MWExceptionRenderer::reportHTML()
#22 /var/www/mediawiki/includes/exception/MWExceptionHandler.php(107): MWExceptionRenderer::output()
#23 /var/www/mediawiki/includes/exception/MWExceptionHandler.php(202): MWExceptionHandler::report()
#24 /var/www/mediawiki/includes/MediaWiki.php(583): MWExceptionHandler::handleException()
#25 /var/www/mediawiki/index.php(53): MediaWiki->run()
#26 /var/www/mediawiki/index.php(46): wfIndexMain()
#27 {main} Plostvaler (talk) 14:40, 23 April 2022 (UTC)
Make sure all skin files are present. Failing that maybe the library skin just isnt compatible with your version of mediawiki. Bawolff (talk) 23:52, 23 April 2022 (UTC)
The file that the engine is looking for is in the style folder. Permissions for all files are the same - 774. In the json file, the requirements indicate >=1.35.0. I don't understand what's wrong Plostvaler (talk) 08:41, 24 April 2022 (UTC)
You might get better help by filing a bug against the extension. Bawolff (talk) 19:39, 26 April 2022 (UTC)

If possible, how to centralize an heading with MediaWiki syntax?

==HEADING==

Is there some argument I can give to centralize an heading directly with MediaWiki syntax? For example

==HEADING==C

C here means "center".

Of course, one find out a CSS selector (translated Xpath) from the dev tool and give CSS directives but I ask specifically about a MediaWiki syntax for that. 109.64.104.73 (talk) 09:32, 23 April 2022 (UTC)

==HEADING==C
Is the the smallest pseudocode possible, I'd assume that if there is anything as I seek, the syntax would be longer.
109.64.104.73 (talk) 09:34, 23 April 2022 (UTC)
Smallest pseudocode possible by mean of one character* 109.64.104.73 (talk) 09:34, 23 April 2022 (UTC)
https://developer.mozilla.org/en-US/docs/Web/CSS/text-align Bawolff (talk) 14:33, 25 April 2022 (UTC)

How to display all new pages only with date and name?

I used this:

Special:Newpages|limit=5

I expected to get only dates and names but got much more information (edit || history buttons), content summary, etc. Trying to cut only dates and names, I did:

.rootpage-example .mw-userlink,
.rootpage-example .mw-usertoollinks, 
.rootpage-example .comment,
.rootpage-example .mw-newpages-history,
.rootpage-example .mw-newpages-edit,
.rootpage-example .mw-newpages-length {
    display: none;
}

But,

I still have some strange content:

21:42, 21 באפריל 2022 א ( | ) ‏ ‏
09:36, 10 באפריל 2022 ב ( | ) ‏ ‏
18:10, 7 באפריל 2022 ג ( | ) ‏ ‏
07:23, 7 באפריל 2022 ‏ד ( | ) ‏ ‏
06:36, 7 באפריל 2022 ה ( | ) ‏ ‏

I don't know what is this ( | ).

I assume it to be some pseudo-element because it doesn't have a CSS selector.

How to remove the ( | ) or at least how to display all new pages only with date and name? 109.64.104.73 (talk) 10:16, 23 April 2022 (UTC)

I run Special:Newpages|limit=5 as {{Special:Newpages|limit=5}} 109.64.104.73 (talk) 10:21, 23 April 2022 (UTC)
I was able to cut out the irrelevant remnant part ( | ) with JavaScript and regex.
document.querySelector('.new_pages').innerHTML = document.querySelector('.new_pages').innerHTML.replace(/[\|\(\)]/g, '');
Where [\|\(\)] is actually a backslash escaped |, escaped ( and an escaped ), 109.64.104.73 (talk) 00:02, 24 April 2022 (UTC)

Use Google analytics to get the most visited pages and show them in a template

I seek a way to display up to five most visited pages in a template.

I know that at least in version 1.36.1 it's not possible by MediaWiki itself so I was thinking about getting these data from the Google Analytics JavaScript program and put them in the template.


Can MediaWiki communicate with Google Analytics to get these data and if so how is it normally done? 109.64.104.73 (talk) 13:17, 23 April 2022 (UTC)

What have you searched and tried so far? See Extension:GoogleAnalyticsMetrics or Extension:Google Analytics Integration Malyacko (talk) 18:11, 23 April 2022 (UTC)
In this context I didn't search anything or tried anything.
I prefer not to install an extension for such data and would remain without it (it's not critical to my website).
I do aim to ask the PHP programmers here, specializing in MediaWiki, if someone has developed something personal which focuses on pulling these very specific data, without an extension. I'd like to try to study the source code of such recommendation from experience. 109.64.104.73 (talk) 18:34, 23 April 2022 (UTC)
In that case I'd appreciate if you did some basic research before questions here. If you don't want to install extensions for reasons unknown to us, you may want to look at the extensions' code instead. Malyacko (talk) 18:47, 24 April 2022 (UTC)
of such program recommended from experience* 109.64.104.73 (talk) 18:36, 23 April 2022 (UTC)
Not sure about Google Analytics, but you should be able to do this with Matomo Analytics. Matomo is open source and should allow embedding live analytics data into wikipages. A simpler option would be to generate a weekly or monthly PDF report with the analytics data, and then upload the PDF report to the wiki. Users can then browse the most popular pages as well as other analytics data, without any security risks of directly linking the wiki to the analytics software. Nicole Sharp (talk) 06:51, 25 April 2022 (UTC)

size math

hello, at the moment the extension simple math jax is the extension with setting for personalizate the formuls of math and chemistry, the extension have the config $wgSmjScale for change the size of the formuls, the extension math have that config similar? PetaloAzul (talk) 19:49, 23 April 2022 (UTC)

or exist a setting similar this Extension talk:SimpleMathJax#h-Visual_Editor_Integration-2021-03-14T09:03:00.000Z work in the version recent of mediawiki PetaloAzul (talk) 20:58, 23 April 2022 (UTC)

Turning off the async attribute in MediaWiki resource loader script tag

Hi. I have a dependency, and I think the asynchronous loading of MediaWiki resources (jQuery specifically) is causing a problem. Is there a way to switch off this attribute in a MediaWiki setting? Image in this post: [1] Willjonesuk (talk) 21:49, 23 April 2022 (UTC)

No. You should change your dependency to wait until everything is loaded before doing stuff that needs the dependency. Bawolff (talk) 03:01, 24 April 2022 (UTC)

Mediawiki 1.37 - VisualEditor - "Error contacting the Parsoid/RESTBase server: (curl error: 28) Timeout was reached"(sometimes, not always)

Hello,

Please help, I am stuck. :)

I've search related threads which could not help me.

My version of Mediawiki is 1.37.2

While editing a page with VisualEditor, I sometimes get the following error (Sometimes it works, sometimes I get the error ; it can work 10 times in a row and then don't work):


"Error contacting the Parsoid/RESTBase server: (curl error: 28) Timeout was reached"**


The error seems to occur whatever the page size.

Note: I do not have this error on another test server with the same configuation.


In the log file I get :

[http] HTTP start: GET https://mysite.com/wiki/rest.php/mysite.com/v3/page/html/Language%2FMultiple-languages/129917?redirect=false&stash=true
 
[http] Error fetching URL "https://mysite.com/wiki/rest.php/mysite.com/v3/page/html/Language%2FMultiple-languages/129917?redirect=false&stash=true": 
 
(curl error: 28) Timeout was reached


  • I also sometimes get a timeout error when using this url directely in a browser:

https://mysite.com/wiki/api.php?action=visualeditor&paction=parse&page=Language/Multiple-languages


  • I never get an error if I do (using SSH):

curl https://mysite.com/wiki/rest.php/mysite.com/v3/page/html/Language%2FMultiple-languages/129917?redirect=false&stash=true


or

curl https://mysite.com/wiki/api.php?action=visualeditor&paction=parse&page=Language/Multiple-languages



  • My config in LocalSettings.php
wfLoadExtension( 'VisualEditor' );
$wgDefaultUserOptions['visualeditor-enable'] = 1;
$wgDefaultUserOptions['visualeditor-editor'] = "visualeditor";
$wgGroupPermissions['*']['read'] = true;
$wgGroupPermissions['*']['edit'] = true;
$wgGroupPermissions['*']['writeapi'] = true;

Vscheideck (talk) 08:33, 24 April 2022 (UTC)

Hello Vincent, did you find a solution to this problem? I seem to have the same issue on my side since I upgraded to 1.37 - parsoid timeouts from time to time, with pages that are not that long...? BertrandGorge (talk) 08:23, 2 August 2022 (UTC)
I found something. Apparently this is due to a template that would perform a search based on DPL, but because of the too large result set would fail to process. I don't understand why Parsoid/Visual Editor do even need to parse the template, but by removing it it worked. BertrandGorge (talk) 09:28, 2 August 2022 (UTC)

Contributors Extension Upgrade Script Error

Upgrade Script Error (Mediawiki 1.37)

When launching the upgrade script (php extensions/Contributors/maintenance/PopulateContributorsTable.php, I get :

Error: Class 'Revision' not found

In the script, this is the line causing the error :

$dbr->bitAnd( 'rev_deleted', Revision::DELETED_USER ) . ' = 0'

➡ How to correct this script please?? 😀😅 Vscheideck (talk) 09:31, 24 April 2022 (UTC)

You should ask the author of the script to update their extension for newer versions of MediaWiki. Bawolff (talk) 12:26, 24 April 2022 (UTC)
Thanks :) How to find the script author?
https://www.mediawiki.org/wiki/Extension:Contributors Vscheideck (talk) 14:50, 24 April 2022 (UTC)
The author suggested I create a bug. I did here: https://phabricator.wikimedia.org/T306900 Vscheideck (talk) 15:39, 26 April 2022 (UTC)
good idea, will do :) 80.215.32.77 (talk) 14:40, 24 April 2022 (UTC)

caching nonexistent pages and images

I uninstalled and reinstalled MediaWiki (deleting all original files and the original MySQL database and user, then uploading a newly downloaded copy of MediaWiki and creating a new MySQL database and user) but pages that do not exist on the newly installed wiki are visible in "/w/uploads/cache/history/" and images that do not exist on the wiki are visible in "/w/uploads/thumb/".

My theory is that webcrawler bots are trying to re-crawl the pages on the wiki to update their indices for search engines, despite the fact that the pages were removed from the sitemap when the wiki was deleted. All of the cached HTML files for the nonexistent pages appear to not have any content written by me (since the original wiki was deleted). So is it possible that MediaWiki is creating a cached HTML file every time a page title is requested that does not exist on the wiki? That seems like an extremely poor use of storage and system resources rather than just returning a 404 error?

What is more confusing though is why or how thumbnails are being generated for images that do not exist on the wiki? I have InstantCommons disabled, and am instead using ForeignFileRepos so that thumbnails are stored locally without needing to hotlink to Wikimedia Commons. Could webcrawler bots also be requesting images in such a way that MediaWiki is generating local thumbnails from images on Wikimedia Commons, despite the fact that the images are not in use anywhere on the wiki? This is especially troublesome, since it could be used as an attack vector by a bad crawler bot to overload the server if requesting that MediaWiki generate many local thumbnails for images that don't exist on the wiki.

Other than disabling file caching or enabling InstantCommons, any suggestions on how to fix this, or explanations as to what might be happening with MediaWiki to generate the HTML files and image thumbnails for content that does not exist on the wiki?

Nicole Sharp (talk) 23:05, 24 April 2022 (UTC)

> Could webcrawler bots also be requesting images in such a way that MediaWiki is generating local thumbnails from images on Wikimedia Commons, despite the fact that the images are not in use anywhere on the wiki?
Do you have 404 thumbnailing setup (it is not the default)? If yes, then that could happen otherwise no.
Are these thumbnails of images on your wiki or just random images.
Similarly, are the contents of the html cache items corresponding to pages in your new wiki or your old wiki?
Are you sure you deleted everything when you reinstalled? Bawolff (talk) 04:15, 25 April 2022 (UTC)
$wgLocalFileRepo['transformVia404'] = true;
$wgGenerateThumbnailOnParse = false;
gives a MediaWiki Internal Error Fatal Exception.
The /w/ directory was deleted, as was both the MySQL database and the MySQL user, as well as the sitemap. The Cloudflare cache was also purged. This is a completely new installation, including a fresh download from MediaWiki.org, a new MySQL database and a new MySQL user. Nothing from the previous installation should exist on the new installation. The only explanation I can think of is webcrawler bots which indexed the previous wiki installation and are now looking for the missing URLs apparently for both pages and images.
As far as I can tell, all of the thumbnailed images are either from the current wiki installation or the previous wiki installation. Ditto for the cached HTML files. They do not appear to be random and are presumably from a systematic crawl based on a third-party sitemap generated from a previous crawl of the old wiki installation. It is not good for the bots either if they are not getting 404 errors for the content that was deleted, since they may think the content still exists otherwise.
Nicole Sharp (talk) 05:19, 25 April 2022 (UTC)
$wgThumbnailScriptPath = "{$wgScriptPath}/thumb.php";
$wgGenerateThumbnailOnParse = false;
allows the wiki to continue functioning normally. I don't see anything different on the browser. I am confused by the GenerateThumbnailOnParse manual page though. Is the change in the wiki then that local thumbnails will no longer be cached? I don't want the wiki to dynamically generate new thumbnails for every pageview. The point of the local thumbnail cache is to try to reduce server load while also limiting cross-domain requests to Wikimedia Commons.
Nicole Sharp (talk) 06:10, 25 April 2022 (UTC)
I wasn't neccesarily suggesting enabling that setting - if that setting is enabled mediawiki will automatically create things on crawling, sort of like what you described, so i was wondering if you had it turned on. The default off is probably what you want. Bawolff (talk) 14:18, 25 April 2022 (UTC)
I think I see the problem. If I just go to the URL of (for example) "/wiki/file:RandomImageFromWikimediaCommons" the wiki shows the Wikimedia Commons metadata but the thumbnail for the image is stored locally, despite the fact that the random image from Wikimedia Commons is not used anywhere on the local wiki. "Copy Image Address" then gives the URL of the thumbnail as "/w/uploads/thumb/d/dd/RandomImageFromWikimediaCommons". I think the only way to solve this problem is to enable InstantCommons and use the hotlinks to the thumbnails from Wikimedia Commons instead. Then if I really want a local copy of the thumbnail, I will have to download the file from Wikimedia Commons, and manually upload it to the local wiki under a different filename. 06:21, 25 April 2022 (UTC)
I'm confused - is this a local image or one from wikimedia commons?
> the thumbnail for the image is stored locally, despite the fact that the random image from Wikimedia Commons is not used anywhere on the local wiki. "Copy Image Address" then gives the URL of the thumbnail as "/w/uploads/thumb/d/dd/RandomImageFromWikimediaCommons".
if this is an image from wikimedia commons (via instant commons or ForeignApiRepo) this should not happen. It is possible to set mediawiki up to do that, but its not the default.
If this is a file you uploaded locally that happens to be the same as a file from commons, mediawiki wont know the file on commons is the same, so naturally will make a local thumbnail.
note local files will still have some thumbnails even if they aren't used anywhere, as they have to be displayed on the image page, which requires thumbnails. Bawolff (talk) 14:25, 25 April 2022 (UTC)
What I would like to though is to configure MediaWiki so that it will only save local thumbnails when a page on the wiki using that image is saved. Any other image thumbnails would then be hotlinked to Wikimedia Commons, including for page previews while editing (before the page is saved). Is there any easy way to configure MediaWiki to do this? Nicole Sharp (talk) 06:27, 25 April 2022 (UTC)
mediawiki can be configured to hot link foreign images or download locally, but it can't mix and match. Can i ask why you want this? Bawolff (talk) 14:27, 25 April 2022 (UTC)
These are all images from Wikimedia Commons, with no locally uploaded images. I think the problem is that I want both local thumbnails and hotlinked thumbnails. I want a hotlink to the Wikimedia Commons thumbnail for a page preview while editing and then only save the local thumbnail when the page edit is saved. If that is not currently supported, then maybe a job for a future extension or version of MediaWiki.
I don't want local thumbnails for images not used on the wiki, which is when hotlinks to Wikimedia Commons are preferred. For saved pages, then I would like local thumbnails of the Wikimedia Commons images. That reduces cross-domain requests during general browsing, and allows the thumbnails from Wikimedia Commons to be displayed offline if necessary.
For now, I re-enabled InstantCommons to avoid MediaWiki creating lots of thumbnails for images that don't exist on the wiki. There is still the other issue that MediaWiki is generating cached HTML files for pages that don't exist. Any suggestions for that? That is less problematic, since the HTML files for the nonexistent pages are much smaller in file size and don't use as much server resources to generate as thumbnails. But it could still be an attack vector if a bad bot tried to request thousands of page titles that don't exist if MediaWiki has to generate a new HTML file for each new page title request. It would be better if MediaWiki returned 404 errors instead.
Nicole Sharp (talk) 16:14, 25 April 2022 (UTC)
I think I figured out what is going on with the cached HTML files for nonexistent pages. If you go to
https://www.mediawiki.org/wiki/page_that_does_not_exist
MediaWiki does not give a 404 error for the nonexistent page but instead generates a new page with the content
"There is currently no text in this page. You can search for this page title in other pages, search the related logs, or create this page."
or on a private wiki:
"There is currently no text in this page. You can search for this page title in other pages, or search the related logs, but you do not have permission to create this page."
So I think that is what the HTML files are for. A webcrawler bot is looking for the page titles that used to exist, but no longer exist, and MediaWiki is generating blank HTML pages for each new page request (all of the HTML files in /uploads/cache/history/ appear to be approximately the same size with the same text).
I am guessing the only way to stop this is to disable file caching? If a 404 error was returned, it would have to only be for anonymous or logged-out users, since logged-in users should be able to link to nonexistent page titles in order to create new pages from redlinks.
Nicole Sharp (talk) 19:54, 25 April 2022 (UTC)
Even after enabling InstantCommons (but leaving file caching enabled) and deleting the thumbnail directory, MediaWiki recreated the same thumbnails from Wikimedia Commons for the images not used on the wiki in the "uploads/thumb" directory. I can try to disable file caching as well since that might be part of the problem maybe. Nicole Sharp (talk) 05:03, 28 April 2022 (UTC)
Instant commons in default config should not create local thumbnails for images from commons. File cache should not affect this.
for file cache i would suggest using varnish instead if possible. Bawolff (talk) 02:27, 12 May 2022 (UTC)

Desktop Improvements update

Hello. I wanted to give you an update about the Desktop Improvements project, which the Wikimedia Foundation Web team has been working on for the past few years. Our work is almost finished! 🎉

The goals of the project are to make the interface more welcoming and comfortable for readers and useful for advanced users. The project consists of a series of feature improvements which make it easier to read and learn, navigate within the page, search, switch between languages, use article tabs and the user menu, and more.

The newest features

File:Table of contents shown on English Wikipedia 02.webm.jpg

  • Table of contents - our version is easier to reach, gain context of the page, and navigate throughout the page without needing to scroll. It will be tested across our pilot wikis this week.
  • Page tools - now, there are two types of links in the sidebar. There are actions and tools for individual pages (like Related changes) and links of the wiki-wide nature (like Recent changes). We are going to separate these into two intuitive menus.

How to enable the improvements

Global preferences

  • It is possible to opt-in on all wikis using the global preferences.
  • On wikis where the changes are visible by default for all, logged-in users can always opt-out to the Legacy Vector. There is an easily accessible link in the sidebar of the new Vector.

The improvements are already visible by default for readers and editors on more than 30 wikis, including Wikipedias in French, Portuguese, and Persian.

The changes apply to the Vector skin only. Monobook or Timeless users are not affected.

Learn more and join our events

If you would like to follow the progress of our project, you can subscribe to our newsletter.

You can read the pages of the project, check our FAQ, write on the project talk page, and join an online meeting with us.

Thank you! SGrabarczuk (WMF) (talk) 01:47, 25 April 2022 (UTC)

Non deterministic API results

MediaWiki API results are changing more that I would expect and I would just like to know what is the cause.

I made couple of batch calls that looked like this:

https://en.wikipedia.org/w/api.php?action=query&titles=Ayn%20Rand&prop=pageprops&format=json&formatversion=2

In all of them there were exactly 50 titles as that is the max limit. I fetched around 3k pages and the results always changed in around 30 pages. What might cause the possible changes to the results?

Example:

I fetched those pages for all people born in 1860 (as mentioned above, chunked into 50 titles in one call). These were the result when I performed set complement operation:

A - B:

Alfred_Ploetz.jpg

Alfred_Pullin.jpg

Alice_Jamieson_1913_na-2315-1.jpg

Autoportrait_de_HENRI_DUHEM.jpg

Bhatkhande.jpg

Charles_Arthur_Gauvreau.jpg

Charles_Chilton,_1895c.jpg

Charles_E_Russell_ca1907.jpg

ClarenceCGilhams.jpg

DhunbaiCowasjiJehangir1940.png

Edward_Kern_of_Los_Angeles,_California,_soldier_and_politician.png

Effie-hegermann-lindencrone-1879.jpg

Florence_Morphy.jpg

G._I._Rossolimo.JPG

Grand_Duchess_Anastasia_Mikhailovna_of_Russia.jpg

Hajredin_Cakrani.png

Haldane_MacFall_1917.jpg

Henri_Pouctal.jpg

HmelevskiyVF.jpg

Julia_Wernicke_Medalle_de_bronze_1904_Caras_y_caretas.png

Mary_Roberts_Coolidge_1921.png

Meikhtila_Princess.jpg

Nikolaos_Kollias.JPG

Paljor_Dorje_Shatra.jpg

Paul_Alexandrovich,_Grand_Duke_of_Russia.jpg

SEARS,_WILLIS_G.,_HONORABLE_LCCN2016861962_(cropped).jpg

Samuel_J._Seymour_(cropped).jpg

Stoke_Park_Hospital,_clock_tower,_from_south.jpg

Vasily_Velichko.jpg

Wirt_Dexter_Walker_(1860–1899).png


B - A

"A_Portrait",_by_Elizabeth_Gowdy_Baker.png

AnnaGroffBryant1915.tif

Bathhouse_John_Coughlin_(2).jpg

Charles_Page_American_Magazine_(cropped).jpg

Etta_H._Maddox.jpg

F._L._Washburn.png

Fannie_Franklin_Wall.jpg

Frederick_Gebhard-LOCongress.jpg

Garrett_Droppers.jpg

Hans_Solereder01.jpg

Isabel_Hampton_Portrait.jpg

Ishi_portrait.jpg

JUrquhart.jpg

James_Scobie,_horse_trainer,_1922.png

JohnGBartholomew-wiki.jpg

JohnNetley.jpg

Lansing_Hoskins_Beach_in_1920.jpg

Lilah_Denton_Lindsey.png

Lilian_June_Henschel_-_Bailey,_by_Julius_Rolshoven.jpg

Morritt.jpg

P-_Hulasa_Ram_Dutta_Main.jpg

Philip_Daly.JPG

Pop_Joy.jpg

Portrait_of_Florence_Pash.jpg

Rear_Adm'l._Wm._E._Reynolds,_1-25-23_LOC_npcc.07693_(cropped).jpg

Ronald_Munro_Ferguson_(Barnett-02).jpg

Royal_Scottish_Academy_2_(5798145460).jpg

Sargent_-_Familie_Sitwell.jpg

Schuyler_Wheeler_1914.jpg

Sir_Arthur_Weir_Mason.jpg

This_is_a_picture_of_Armenian_author_Tlgadintsi.jpeg

Warren_Henry_Manning.jpg

Wilmer_Ingalls_Gordon.png Kotrblu2 (talk) 05:40, 25 April 2022 (UTC)

Wikipedia is a live site, people edit pages every second. Ciencia Al Poder (talk) 08:27, 25 April 2022 (UTC)
I can understand that, but those two samples were gathered like 10 seconds apart. Kotrblu2 (talk) 20:12, 25 April 2022 (UTC)
I tried one, its not a page on wikipedia but on commons. So it would have no pageprops. I suspect that your script is broken for non-existent pages. Maybe the negative pseudo page ids throw it off. Bawolff (talk) 22:01, 25 April 2022 (UTC)

How to put a phone number in a template?

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 tried to create a template such as {{phone number}} with the following text but instead getting a telephone number output I get a pure HTML output.
<a href="tel:NUMBER_WITHOUT_SPECIAL_SIGNS" style="display: inline;">NUMBERמספר </a>
What is the problem with the above template text? 109.64.104.73 (talk) 09:40, 25 April 2022 (UTC)
template:phone number contains the above code. 109.64.104.73 (talk) 10:05, 25 April 2022 (UTC)
You can't use <a> tags in wikitext.
Use external link syntax instead:
[tel:9876543210 9876543210]
9876543210 Ciencia Al Poder (talk) 10:09, 25 April 2022 (UTC)
Thanks, Ciencia ! 109.64.104.73 (talk) 10:39, 25 April 2022 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

media screen and (min-width: 851px) {...} isn't recognized

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


I am trying to use indocument responsive CSS directive media screen and (min-width: 851px) {...} in MediaWiki 1.36.1 with Manual:$wgRawHtml set to true.

As can be read, there are two chunks for code below; one is the mobile first code and the second is the desktop-display adjustment code.

While the first is effective (effects HTML in the specific webpage), the second code chunk isn't effective, for some reason.
<html>
	<style>
		.mainpage_row {
		display: flex;
		flex-direction: column;
		justify-content: center;
		padding: 0;

		}
		
		media screen and (min-width: 851px) {
			.mainpage_row {
				flex-direction: row;
				justify-content: space-evenly;
			}
		}
	</style>
</html>
Why is the second code chunk ineffective and how to solve that problem? 109.64.104.73 (talk) 11:28, 25 April 2022 (UTC)
because it is @media. —TheDJ (Not WMF) (talkcontribs) 11:52, 25 April 2022 (UTC)
Indeed,
I forgot it.
Thank you for that remark.
I suggest to mark this thread as solved. 109.64.104.73 (talk) 12:15, 25 April 2022 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

How to search for pages with a particular ending

How can I search for pages that have a particular ending, such as “-ton” → “Washington,” “Isaac Newton,” etc.? If no matching page is found, I would like it to return the closest match, e.g. “-tionary” → “missionary“. Is it possible to do this without relying on an extension or applying specific categories to every page? Latisc (talk) 15:05, 25 April 2022 (UTC)

Not really no. Except for using raw sql.
You might be able to do it with extension:CirrusSearch Bawolff (talk) 08:46, 26 April 2022 (UTC)

Install error: Wrong PHP version but error shows correct version?

I had 7.3.29 and saw this error (but with 7.3.29 showing) and upgraded to 7.3.3, but still see this... what's the deal?
=MediaWiki 1.37 internal error=
MediaWiki 1.37 requires PHP 7.3.19 or higher (and not 7.4.0 - 7.4.2); you are using PHP 7.3.3. 70.125.39.198 (talk) 03:24, 26 April 2022 (UTC)
You cannot upgrade from 7.3.29 to 7.3.3 but only downgrade. 3 is less than 29. Malyacko (talk) 07:00, 26 April 2022 (UTC)
My cwp dashboard says I'm at 7.3.30, but the mediawiki error says 7.3.3. I just bumped to 7.4.28 and it sill says "you are using php 7.3.3" 70.125.39.198 (talk) 15:33, 26 April 2022 (UTC)
See for examplehttps://stackoverflow.com/questions/64775217/php-version-mismatch-with-composer. What does "php -v" say? Malyacko (talk) 16:17, 26 April 2022 (UTC)
Got it working, my CWP setup had multiple concurrent PHP versions running, even though my php switcher was set to something different
. 70.125.39.198 (talk) 16:29, 26 April 2022 (UTC)

How to get all pages and context information from a large wikisource project?

Hi there,


I would like to get all text information from https://de.wikisource.org/wiki/Die_Gartenlaube Each year has its own overview https://de.wikisource.org/wiki/Die_Gartenlaube_(1853) with information like issue, page, title and author (+ comments). I managed to scrape this for all years. Another wikisourcian used the MediaWiki API to download all plain text. The text is not included in this space https://de.wikisource.org/wiki/An_unsere_Freunde_und_Leser_(Gartenlaube_1853) but comes from here https://de.wikisource.org/wiki/Seite:Die_Gartenlaube_(1853)_001.jpg he used TextExctracts With mwparserfromhell from Python he got all plain text, but looses all information from templates, i.e. from here https://de.wikisource.org/w/index.php?title=Seite:Die_Gartenlaube_(1853)_001.jpg&action=edit it ignored {GLÜberschrift|1||An unsere Freunde und Leser!}


How can I get all text information from a big wikisource project? All context information from the year overviews https://de.wikisource.org/wiki/Die_Gartenlaube_(1853) ? And all category information from the page https://de.wikisource.org/wiki/An_unsere_Freunde_und_Leser_(Gartenlaube_1853) ?


Best regards WissensDürster (talk) 07:36, 26 April 2022 (UTC)

How to force direct download of zip files instead of opening inline in browser?

MediaWiki (Docker image): 1.37.1

PHP: 7.4.28

DB: MySQL

Browser: Mozilla Firefox, Google Chrome, Microsoft Edge


Hello. I need help in order to understand following: I have enabled support for upload of ZIP files but once you click on a file link, it attempts to load the ZIP file inline in browser instead of direct download.

According to this Wiki: Manual:MIME type detection#MIME types when downloading , files are served by the web server itself and proper MIME type detection must therefore be done by the web server. In my case it's Apache2. I've tried to fix this by adding following to .htaccess which is located in /var/www/html/ :

<FilesMatch "\.zip$">

    ForceType application/octet-stream

    Header set Content-Disposition attachment

</FilesMatch>

This doesn't help. I've tried with <File> also as described here: https://fedingo.com/how-to-force-download-in-apache/

mod_headers and mod_mime modes are enabled.

No Content-Type header is being set on request, only these are available and may be relevant here:

Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8

Accept-Encoding: gzip, deflate, br


Support for zip upload is enabled like this in LocalSettings.php:

$wgFileExtensions[] = 'zip';

// $wgTrustedMediaFormats[] = 'ARCHIVE';

$wgTrustedMediaFormats[] = 'application/zip';

In mime.types file in /etc/, it was also defined like:

application/zip zip

Now I'm not sure where else can I force the direct file download when it's a zip file. Can someone please help me to understand this?

Thanks in advance! Krisssde (talk) 13:55, 26 April 2022 (UTC)

> No Content-Type header is being set on request, only these are available and may be relevant here
The headers on the request don't matter for this, only the response headers.
Can you check what what the headers on the response currently are (content-type)? Also what is the exact filename on the webserver?
Content-disposition can force a download for all types, but if content-type is correct, the browser will always try to download a zip file, so its not strictly needed in this case.
zip is a common file extension. Apache should support it properly out of the box. Bawolff (talk) 19:32, 26 April 2022 (UTC)

How to show #ifingroup in VisualEditor?

We use #ifingroup for several reasons. One is to not show content to visitors as long as an article is in draft mode. However in the VisualEditor all ifingroup statements show up as a puzzle icon. See https://pasteboard.co/I4ckujT4MShA.png for a screenshot.

Is there any way to show the content of ifingroup in the VisualEditor so that it can be edited? At least to the corresponding user group?

To edit the content in the puzzle (very small) pop up is not an option for us. Stefahn (talk) 18:38, 26 April 2022 (UTC)

Fatal exception of type "Wikimedia\Rdbms\DBQueryError"

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 installed a new wiki for the first time. If I try to get Check user data/log or create new account, there comes an error message- “Fatal exception of type "Wikimedia\Rdbms\DBQueryError"” Yahya (talk) 21:54, 26 April 2022 (UTC)

See "Post a new question" in the sidebar and Manual:How to debug Malyacko (talk) 06:31, 27 April 2022 (UTC)
I forgot to run update.php. Now solved. Thanks. Yahya (talk) 11:20, 27 April 2022 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

(Unwanted) automated text right below heading of every 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 a text phrase (formatted just as normal text) right below every wiki-page's heading/title then theres a line break or space and then below that the text of the wiki starts. It's automated and everytime I create a new page the text is there. It's really annoying and I don't remember enabling it. I have looked it up and not found a similar case and skimmed through LocalSettings.php and php.ini for the typical phrase without any luck.


How do I disable it? 193.11.104.21 (talk) 08:04, 27 April 2022 (UTC)

Can you paste that automated text here? Ciencia Al Poder (talk) 08:28, 27 April 2022 (UTC)
It just says "From [Name of Wiki, or what the tab name is]" in Swedish. 193.11.104.21 (talk) 09:08, 27 April 2022 (UTC)
This is the tagline. See Manual:Tagline (Site Subtitle)
I guess you can edit the interface message MediaWiki:Tagline and blank it, or replace it with a - Ciencia Al Poder (talk) 10:31, 27 April 2022 (UTC)
Thank you, so, very much! It turned out it was that. I'm surprised I couldn't google my way to that... 193.11.104.21 (talk) 11:52, 27 April 2022 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

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


Version 1.34.1 PHP 7.3.33 Spezial:Version

We at https://organindex.de suffer from that problem since a long time. If the categories exceed 9, at any edits some of them will disappear. But only in the desktop version, edits in the mobile one (where they show up as text lines) are fine. Any help? Thanks, Martin Subbass1 (talk) 09:40, 27 April 2022 (UTC)

@Subbass1 If you run 1.34.1 then you run an unsupported, outdated, insecure MediaWiki version. Please upgrade for your own safety. Malyacko (talk) 10:31, 27 April 2022 (UTC)
Thanks! I thought so, but I' m not an admin and they really don't care -outrageously. But I will try... Subbass1 (talk) 11:41, 27 April 2022 (UTC)
Do they disappear from the wikitext? Or only from the interface?
If the former, are you using an editor other than the wikitext editor? Ciencia Al Poder (talk) 10:33, 27 April 2022 (UTC)
they disappear completely (from the wikitext). Editing via Webbrowser... Thanks.. Subbass1 (talk) 11:42, 27 April 2022 (UTC)
You're saying that the source code content of the page is changing? But only on desktop? Bawolff (talk) 12:53, 27 April 2022 (UTC)
No, the categories (if 10 or more) dissapear (means: are not there anymore after saving) after any(!) edits in the "normal version". In the mobile version all is fine. Subbass1 (talk) 13:31, 27 April 2022 (UTC)
I guess this is one instance of this happening.
I notice your wiki has Extension:MsCatSelect, and on the extension page it says: The selected categories are received through the MediaWiki API
The api sets a default limit of 10 categories to retrieve from a given article. See: https://organindex.de/index.php?title=Spezial:ApiSandbox#action=query&format=json&prop=categories&titles=D%C3%BCsseldorf%2FOberkassel%2C%20Auferstehungskirche%2C%20Hauptorgel
The extension seems to have a bug that ignores the continuation parameters of the api to retrieve more categories if it has more, resulting in the deletion of categories exceeding 10.
I don't know if recent versions of the extension have fixed the bug or not, but that's a good reason to upgrade that MediaWiki installation. Ciencia Al Poder (talk) 13:06, 27 April 2022 (UTC)
correct, that's such a case.
I'll try to get this upgraded!
Thanks! Subbass1 (talk) 13:33, 27 April 2022 (UTC)
Well, looks like the bug may still be there... I reported it 3 years ago. Yikes. phab:T221442 Ciencia Al Poder (talk) 13:08, 27 April 2022 (UTC)
it's there also in the current version? Are there any other workaounds? -given that 10 categories is not that much... Subbass1 (talk) 13:35, 27 April 2022 (UTC)
Update to version 7.2 of the extension. Its not totally fixed but the limit was updated to 50. Bawolff (talk) 15:32, 30 April 2022 (UTC)
Thanks! Subbass1 (talk) 18:24, 4 May 2022 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

uploading a video

Hey,


We are tying to add videos to our page the issue we have is they need to be private and not unlisted due to NDA's. Is there a way to do this?

Thanks


Amanda 83.244.232.27 (talk) 10:18, 27 April 2022 (UTC)

==See "Post a new question" in the sidebar.== Malyacko (talk) 10:30, 27 April 2022 (UTC)

Editing Existing Reference

Hi, can I get instructions on how to edit an existing reference? 41.217.40.122 (talk) 11:01, 27 April 2022 (UTC)

Help:Editing. If you have a more specific question, please provide more info. Malyacko (talk) 12:47, 27 April 2022 (UTC)

Clearing whitespace

So if I'm working with templates that have a lot of #if: functions on separate lines that may not be used, is there any good way to collapse the whitespace that is left behind on each of those lines, or do I just have to deal with it because that is the cost of leaving out parameters? IAmChaos (talk) 12:27, 27 April 2022 (UTC)

There was a question about this recently. Basically you need to squash up all the {{#if...}} lines without any line returns between them. Jonathan3 (talk) 12:35, 27 April 2022 (UTC)
Thats what I was afraid of thanks. IAmChaos (talk) 12:48, 27 April 2022 (UTC)
Or wrap the newlines in html comments. Clump (talk) 12:38, 27 April 2022 (UTC)
I used to use <!---> between each {{#if...}} but saw in the previous topic that
{{#if...}}<!--
//-->{{#if...}}
looks much better. Jonathan3 (talk) 13:52, 27 April 2022 (UTC)

404 error on pages ending with .css and .js

Hi there, I recently switched to Nginx and running MediaWiki 1.37.2. The site is running fine till I notice that pages ending with .css .js or with any file extension e.g. png not opening and giving 404 Not Found error. I looked at the error log and got the following error that sound like it tried to open a physical file:


open() "/home/enwiki/public_html/wiki/MediaWiki:Common.css" failed (2: No such file or directory), request: "GET /wiki/MediaWiki:Common.css HTTP/1.1"


I can see the page and can even edit it if I visit as example.com/index.php?title=MediaWiki:Common.css but if I'm visiting it as example.com/wiki/MediaWiki:Common.css I'm getting 404 error. So can someone please explain if I'm missing something? or this is a bug? I looked online and found many complaints related to the same issue but can't find any solution.

Thank you 1.23.250.127 (talk) 13:06, 27 April 2022 (UTC)

Can you include your nginx config file? Bawolff (talk) 19:17, 27 April 2022 (UTC)
@Bawolff thank you for replying. I was trying to paste my config here changing my domain name to exmple dot com but for due to spam filter I'm not able to save my message so I have pasted my config at Dpaste at "https://dpaste.org/cvoDy" can you please take a look?
Thank you 113.193.44.134 (talk) 06:03, 28 April 2022 (UTC)

Usually the spam filter will ignore things in <pre> tags


Im not that good at nginx so this might be wrong, but i suspect that

location ~* \.(jpg|jpeg|png|gif|ico|css|js)$ {
  root	/home/mainwiki/public_html; expires 365d;​
 }

Might be overriding the try_files in the main location block. Bawolff (talk) 19:19, 28 April 2022 (UTC)

Problem to install extention "PDFEmbed"

Hi, I have a problem to install the extention "PDFEmbed". I've add this line " wfLoadExtension( 'PDFEmbed' );" in my LocalSetting.php file but after when i Want to load my wiki I have this error :

"Fatal error: Uncaught Exception: Unable to open file /volume1/web/mediawiki/extensions/PDFEmbed/extension.json: filemtime(): stat failed for /volume1/web/mediawiki/extensions/PDFEmbed/extension.json in /volume1/web/mediawiki/includes/registration/ExtensionRegistry.php on line 177 Exception: Unable to open file /volume1/web/mediawiki/extensions/PDFEmbed/extension.json: filemtime(): stat failed for /volume1/web/mediawiki/extensions/PDFEmbed/extension.json in /volume1/web/mediawiki/includes/registration/ExtensionRegistry.php on line 177 Call Stack: 0.0000 405416 1. {main}() /volume1/web/mediawiki/index.php:0 0.0002 406592 2. require('/volume1/web/mediawiki/includes/WebStart.php') /volume1/web/mediawiki/index.php:44 0.0002 418384 3. require_once('/volume1/web/mediawiki/includes/Setup.php') /volume1/web/mediawiki/includes/WebStart.php:89 0.0023 585088 4. require_once('/volume1/web/mediawiki/LocalSettings.php') /volume1/web/mediawiki/includes/Setup.php:143 0.0027 592040 5. wfLoadExtension() /volume1/web/mediawiki/LocalSettings.php:178 0.0027 592136 6. ExtensionRegistry->queue() /volume1/web/mediawiki/includes/GlobalFunctions.php:51 "

Someone Has an idea to fix my problem ? Jca31220 (talk) 13:12, 27 April 2022 (UTC)

php was unable or not allowed to open /volume1/web/mediawiki/extensions/PDFEmbed/extension.json
Make sure that it can. —TheDJ (Not WMF) (talkcontribs) 14:53, 27 April 2022 (UTC)
Thank you. It was very simple. The location of the folder "PDFEmbed" was wrong.
It's work now. Jca31220 (talk) 14:58, 28 April 2022 (UTC)

Error 500 when trying to view page with .svg file

I have had problem a while that random Error 500s appear now and then, often it just works out to refresh the page but when I try to upload and view a .svg file it doesn't let me. I've followed the Manual:How to Debug and enabled a logging file. When I view it I see 2 lines marked [http] right before "* There was a problem during the HTTP request: 0 Error".
First one says: "POST: https://www.mediawiki.org/beacon/event...and a long link I don't know if I can share ..."
Second line: "* Error fetching URL: SSL certificate problem: unable to get local issuer certificate"
Can I do something about this? Or is it to little information to help? 193.11.104.21 (talk) 14:11, 27 April 2022 (UTC)
The beacon thing is definitely unrelated to the svg issue (although it may indicate that the EventLogging extension is misconfigured, but probably not causing problems)
The SSL thing might be related if you are using instant commons and the image is from commons. Otherwise i think its probably not related. Bawolff (talk) 19:13, 27 April 2022 (UTC)
Hmm. I notice another error marked as [thumbnail] where it is trying to link some paths where the location is mixing / with \. Like "C:\Windows\TEMP\mwtmp-<Wiki name>/svg_81251bdcdf165a23178fc25b/Test_Template_Info-Icon.svg"
Is this really OK? Can this be the problem? 193.11.104.21 (talk) 16:20, 27 April 2022 (UTC)
That should be fine if you are on windows. Bawolff (talk) 19:09, 27 April 2022 (UTC)
I have also noticed, just now that it can't create symlinks.
[error] [---] /wiki/index.php?title=Fil:Test_Template_Info-Icon.svg   ErrorException: PHP Warning: symlink(): Cannot create symlink, error code(1314) 193.11.104.21 (talk) 16:59, 27 April 2022 (UTC)
The symlink think has a high chance of being related to your issue. Windows has weak support for symlinks so you might be hitting an edge case with windows which isnt tested as much.
Which page precisely is giving a 500 and what is the text of the page giving the 500. Bawolff (talk) 19:15, 27 April 2022 (UTC)
So you mean it's impossible to run mediawiki on Windows and expecting .svg files to work? 193.11.104.21 (talk) 22:51, 27 April 2022 (UTC)
Filepage. For example: ---/wiki/index.php?title=Fil:Test_Template_Info-Icon.svg
I don't get any additional text which I think is weird because I have written multiple lines in various *.php files to display errors detailed. It's the typical Error 500 page for IIS 8.You could google it and see the same. 193.11.104.21 (talk) 20:24, 27 April 2022 (UTC)
The error page is now resolved by the solution explained in this thread: Project:Support desk/Flow/2019/06#h-SVG_thumbnail_creation_Windows_Server_2012_R2_IIS_8.5-2019-06-29T23:40:00.000Z.
Now I can open the page but instead get the message: "Fel vid skapande av miniatyrbild: 'convert' is not recognized as an internal or external command, operable program or batch file."
First sentence is translated to "Error at creation of thumbnail."
When googling the problem someone is reference the "$wgImageMagickConvertCommand". I have that set to: "C:/Program Files/ImageMagick-7.0.10-Q16-HDRI/convert.exe";
Any suggestions? 193.11.104.21 (talk) 11:33, 28 April 2022 (UTC)
Try setting $wgSVGConverterPath = "C:/Program Files/ImageMagick-7.0.10-Q16-HDRI"; Bawolff (talk) 21:18, 28 April 2022 (UTC)
(Answering from another device therefore a different IP-adress! I should really create an account…)
That change causes the error to instead say:
”convert: invalid argument for option ‘-thumbnail’: 800x357\! @ error/convert.c/ConvertImageCommand/3028”
Can’t find any solution by googling… 2A00:801:750:44AB:8111:616C:C20C:AF13 (talk) 12:08, 29 April 2022 (UTC)
Huh. Maybe that is unix vs windows escaping or something like that. Im surprised the ! is escaped in the error message. Bawolff (talk) 18:59, 29 April 2022 (UTC)
(Please, if an admin could delete the previous post I would be eternally grateful!)
Im sorry, I don’t understand ”escaping”. What is that? Can I solve it? Escaped ’!’? 2A00:801:761:B3F2:BC59:D9CD:54CD:ADAB (talk) 23:03, 29 April 2022 (UTC)

database problems

Version 1.34.1 PHP 7.3.33, Spezial:Version, I try to get it updated ASAP (I'm not an admin there).

It seems we also have an overloaded database as email messages about changes regularly(!) have a delay of a few hours(!). Also after some changes the database is locked for special pages very long (minutes to 1h ore more). And there are "unmotivated" reallocations sometimes (moving hundreds of sites which last for hours). Is there an overload/defect in the database somewhere? How can it be tested/repaired? Perhaps it's possible to look into it remotely as normal user?

Thanks Subbass1 (talk) 14:50, 27 April 2022 (UTC)

Can you include exact error messages/descriptions of the problem? Bawolff (talk) 19:08, 27 April 2022 (UTC)
There are no (public) error messages afaics. But this huge delay in sending messages can't be normal. As for the problems after adding a category to a (new) page: it shows something like: "database is locked until all changes have been processed". And indeed you can't edit those pages then (sometimes for hours). Subbass1 (talk) 21:31, 27 April 2022 (UTC)
You should probably talk to an admin. They would have the needed info to debug, and also be able to implement any suggested solution.
I dont think db being overloaded is the issue here.
For delayed email - i would guess job queue misconfiguration. E.g. maybe its a cron job that runs not often enough.
For db locked - really need the exact message to tell you more (there are different types of "locks" i need to know which one). It sounds a bit like the replag error, but the wiki does not appear to be using replication so it shouldn't be that. Bawolff (talk) 21:11, 28 April 2022 (UTC)
Thanks! Talking to the admins there is difficult, they really don't care anything, I hope for new admins in the future. But the tips here I'll keep in mind. Subbass1 (talk) 14:08, 29 April 2022 (UTC)

Visual Editor : Error contacting the Parsoid/RESTBase server: (curl error: 60) SSL peer certificate or SSH remote key was not OK

Hi !

I'm using Mediawiki:

Product Version
MediaWiki 1.37.1
PHP 7.4.28 (apache2handler)

The installation was using an old Parsoid verison (0.10.0 nodejs) and I would like to use the integrated parsoid version. I removed the old parsoid version and removed the corresponding entries in the LocalSettings.php file, but the visual editor is not working (Error contacting the Parsoid/RESTBase server: (curl error: 60) SSL peer certificate or SSH remote key was not OK). The wiki is using https so I guess the error is related to that somehow.

I'm a bit lost regarding SSL, certifcates so any help would be appreciated 131.254.17.184 (talk) 13:53, 28 April 2022 (UTC)

Have you tried setting curl.cainfo in your php.ini?
If your not sure what to set it to, try downloading cacert.pem from https://curl.se/docs/caextract.html and pointing it to that. Bawolff (talk) 10:29, 29 April 2022 (UTC)
I've tried what you suggested but it doesn't solve the issue.
Can this be due to curl trying to contact localhost instead of the hostname ? 131.254.17.184 (talk) 08:53, 2 May 2022 (UTC)
Ok I found out what to set to resolve the issue (not sure why this is necessary for persoid only :
In apache2 website config file for https (/etc/apache2/sites-enabled/default-ssl.conf in my case), set SSLCertificateChainFile 131.254.17.184 (talk) 09:12, 2 May 2022 (UTC)

does anyone answer the tutanota email?

i asked to be added for english version almost 3 weeks ago and no response 174.208.169.119 (talk) 04:35, 29 April 2022 (UTC)

Welcome to the MediaWiki Support desk, where you can ask MediaWiki questions! It sounds like you are in the wrong place. Malyacko (talk) 09:58, 29 April 2022 (UTC)

Page read only for a group

Hi, is it possible to block the edit function on a page for a user group ? Jca31220 (talk) 09:40, 29 April 2022 (UTC)

Manual:$wgRevokePermissions or help:Protect/Manual:$wgRestrictionLevels
depending on what ypu want to do Bawolff (talk) 09:35, 30 April 2022 (UTC)

Is it considered acceptable to mirror wikipedia?

Hi,

I've been playing with mediawiki for a while now and I am considering mirroring wikipedia in English is this still an option. And also what sort of issues would I run into. perhaps there is a good thread you could recommend?


Regards AlgorithmGG (talk) 20:03, 29 April 2022 (UTC)

Yes of course. Please follow the license requirements (basically make sure to maintain credit, dont mislead people into thinking your site is the real wikipedia).
Mirroring english wikipedia is high effort due to the sheer size of it.
A good starting place is meta:Data dumps. The actual dumps are at
https://dumps.wikimedia.org/backup-index.html Bawolff (talk) 00:08, 30 April 2022 (UTC)
Thanks Bawolff, long time no speak. I didn't realise it is over 25tb I've got space but not that much. is having specific extensions going to be an issue if the wiki is running ok prior to the dump? AlgorithmGG (talk) 02:43, 30 April 2022 (UTC)
The bigger issue than space is cpu time. The default importDump.php parses pages to figure out categories, whatlinkshere, etc. This is quite slow at wikipedia scale might give incorrect results if the wrong extensions are installed.
There used to be scripts that imported without parsing (e.g. mwdumper) which were much faster, but i dont think they work anymore with most recent mediawiki. They used the .sql files for auxillary data you can download instead of parsing themselves. Bawolff (talk) 09:34, 30 April 2022 (UTC)
Cheers Bawolff, It is tempting although I haven't needed to upgrade from 1.34. I was hoping to use mwdumper! if I am to upgrade what wiki version do you recommended? AlgorithmGG (talk) 00:47, 1 May 2022 (UTC)
I mean, i generally reccomend the latest unless you have a reason to use an earlier version (mwdumper might be a very good reason to use an earlier version, unless someone fixed it) Bawolff (talk) 15:20, 1 May 2022 (UTC)
Thanks again, I am currently getting an error connecting to Elasticsearch on line 90 of the elastic search connection page:
public_html/extensions/Elastica/includes/ElasticaConnection.php.
line 90 error note ( client not found)
$this->client = new \Elastica\Client( [ 'servers' => $servers ],
/**
* Callback for \Elastica\Client on request failures.
* @param \Elastica\Connection $connection The current connection to elasticasearch
Do you recall this issue is it something that can be updated manually? AlgorithmGG (talk) 15:25, 6 May 2022 (UTC)
You should update extensions when you update mediawiki, so that the versions match.
Beyond that, what's the error message? Bawolff (talk) 02:23, 12 May 2022 (UTC)
Fatal error: Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 7.3.0". You are running 7.2.34. in /home/public_html/extensions/Elastica/vendor/composer/platform_check.php on line 24 AlgorithmGG (talk) 00:16, 13 May 2022 (UTC)
Its not running yet but has installed ok with a PHP update. cheers. AlgorithmGG (talk) 00:20, 13 May 2022 (UTC)
Hi,
i attempted to activate and bootstrap CirrusSearch but i get the following error when attempting to search:
An error has occurred while searching: We could not complete your search due to a temporary problem. Please try again later.
i also got this message in the terminal:
Elastica\Exception\Connection\HttpException from line 189 of public_html/extensions/Elastica/vendor/ruflin/elastica/lib/Elastica/Transport/Http.php: Couldn't resolve host
Do you recognise this issue at all? AlgorithmGG (talk) 00:00, 31 May 2022 (UTC)
Presumably what you have configured as the host name for your elastic search backend is incorrect Bawolff (talk) 02:01, 31 May 2022 (UTC)
Do you have any idea where this is configured? AlgorithmGG (talk) 04:13, 31 May 2022 (UTC)
$wgCirrusSearchServers or $wgCirrusSearchClusters Bawolff (talk) 14:59, 1 July 2022 (UTC)

How to do an image toggle

How do I work to make it so that I can have multiple images that I can toggle between like a tabber. Like what you can see in various infoboxes on Fandom. How would I program this? I tried using the tabber system I already have, but it takes up the entire X axis, so text can't wrap around it properly.

Can somebody help me with this?

And thank you to whoever deleted the previous one. Zoey The Edgedancer (talk) 22:02, 29 April 2022 (UTC)

Maybe the slideshow feature of gallery? Bawolff (talk) 23:54, 30 April 2022 (UTC)