Project:Support desk/Flow/2020/05

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

refreshLinks.php and "MassMessageListContent"

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 installed mediawiki 1.32 and made a dump import (from wikipedia: "20200420-pages-meta-current.xml.bz2"). Then I run refreshLinks.php. After 4-5 hours, I got an error:

MWUnknownContentModelException from line 310 of /var/www/html/includes/content/ContentHandler.php: The content model 'MassMessageListContent' is not registered on this wiki.

How to fix this? 5.143.24.173 (talk) 04:08, 1 May 2020 (UTC)

You should install Extension:MassMessage. – Ammarpad (talk) 04:50, 1 May 2020 (UTC)
Thank you! Works. 77.35.133.23 (talk) 17:19, 3 May 2020 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

How I can replace this code?

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 am in a project (MediaWiki 1.33.1) and I want to know how I can replace this code that was in the Template:Advertising

<addhtml>

<script type="text/javascript">

</script>

<script type="text/javascript"

src="http://pagead2.googlesyndication.com/pagead/show_ads.js">

</script>

</addhtml>

because AddHTML has been unmaintained for years and I am rebuilding an old wiki.

(I can't speak english i use google translate) Goku D (talk) 04:24, 1 May 2020 (UTC)

Extension:AddHTML which adds <addhtml>...</addhtml> has been unmaintained for years and was archived in 2016. Taavi (talk!) 07:34, 1 May 2020 (UTC)
@Majavah
Exactly the question is, with what can I replace the code? Goku D (talk) 07:58, 1 May 2020 (UTC)
@Goku D You have not mentioned what you have tried so far? When I enter "custom javascript mediawiki" into an internet search engine, I get Adding JavaScript to Wiki Pages, Project:Support desk/Flow/2018/03#h-How_do_I_add_a_custom_script_at_the_opening_of_the_<head>_tag_on_all_pages?-2018-03-20T13:30:00.000Z Malyacko (talk) 10:37, 1 May 2020 (UTC)
the most direct replacement is manual:$wgRawHtml, however for security reasons i suggest using MediaWiki:Common.js. if that doesnt work extension:Widgets Bawolff (talk) 17:58, 1 May 2020 (UTC)
Solved using extension:Widgets Goku D (talk) 00:18, 2 May 2020 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Backup

Hello,

So I recently had an issue where I couidn't get an older installation to update to the most recent version. I accidentally deleted my wiki in the process, and then restored from backups. However, on doing so, I got a 403 error. I downloaded a copy of my backup, is there any way to get my actual pages out of the backup and transferred to a new installation or have I just lost several years of work?


Thanks. 108.52.123.104 (talk) 06:05, 1 May 2020 (UTC)

Addendum: SOMEHOW! Somehow my backup does not include the Htacess file. How can I fix this? 108.52.123.104 (talk) 06:29, 1 May 2020 (UTC)
How did you take the backup and how did you restore it? 403 suggests that the web server does not have access to read necessary files. Taavi (talk!) 07:30, 1 May 2020 (UTC)
Softolocous (sp?) installer made an auto-backup, plus I used a manual backup. Both resulted in the same error. Clean installations not from backup did not give me the 403 error. That said, it also spat back the cannot access htacess file and I went digging and discovered my mediawiki installation didn't have one, somehow. 108.52.123.104 (talk) 08:03, 1 May 2020 (UTC)
I've previously restored from backups without a problem. 108.52.123.104 (talk) 08:03, 1 May 2020 (UTC)

I want to focus on fixing red links (wanted pages) within articles within a particular category, but can't find a way of listing them. Special/Wanted Pages is for the site as a whole, and while there is an extension, it only allows you to select by namespace. DPL does not have suitable options. Export by category would export the text before rending the red-link part.

Is there any other way of doing it? Vicarage (talk) 09:41, 1 May 2020 (UTC)

I came up with this incredibly ugly solution
python pwb.py listpages -cat:UK -cat:Convention -cat:Filk -intersect -format:"{page.title}" > uk-filk-convention.txt
while read -r LINE; do
echo $LINE: $(wget -q -O - http://fancyclopedia.org/"$LINE" | grep -v '=Talk' | grep 'does not exist' | sed -Ee 's`(.*)title="([^\(]*)\(page does not exist.*`\2`')
done < uk-filk-convention.txt
But I'm ashamed to post it here! Vicarage (talk) 08:53, 2 May 2020 (UTC)

Skin:Minerva Neue - no Icon on the Mainmenue

Hi all, I have just installed a MediaWiki at my server at home. If I now activate the skin Minerva New, the icons are not available in the main menu. What could be the problem ? DImmenhau (talk) 11:37, 1 May 2020 (UTC)

Have you installed the MobileFrontend extension? Are there any errors in the browser developer console or web server logs? Taavi (talk!) 11:42, 1 May 2020 (UTC)
Yes i have installed the MobileFrontend and i haven't error in the Server-Log and on the developer console. I have now warnings from load.php.
we:
This page is using the deprecated ResourceLoader module "jquery.ui.resizable". Please use the main `jquery.ui` module, not this alias.
Your skin is incompatible with VisualEditor. See <https://www.mediawiki.org/wiki/VisualEditor/Skin_requirements> for the requirements.

DImmenhau (talk) 11:52, 1 May 2020 (UTC)
What versions of MediaWiki and any extensions/skins are you using? Taavi (talk!) 12:20, 1 May 2020 (UTC)
MediaWiki 1.34.1
PHP 7.3.16
MinervaNeue– (d0be74a) 13:41, 1 October 2019
MobileFrontend 2.1.0 (383273b) 18:42, 7 January 2020 DImmenhau (talk) 12:44, 1 May 2020 (UTC)

Bureaucrat admin gone

We have a wiki page started by an bureaucrat and administrator that was let go, she was the only one.  How can i change my read right to administrator.  Thanks 65.121.207.155 (talk) 18:38, 1 May 2020 (UTC)

If you have access to the server, use Manual:CreateAndPromote.php DannyS712 (talk) 18:54, 1 May 2020 (UTC)
Hi, you can use the createAndPromote.php maintenance script to add nay user groups to any account. Taavi (talk!) 18:55, 1 May 2020 (UTC)

Collapsible p-personal in Vector

Hey there! :)

I'm using the Vector skin on my wiki - I would use the Timeless skin (I like it more), but it doesn't have the collapsible sidebar which I also want to have. I think I can edit most of the layout with CSS to make it look like I want it to be.

But there's one thing I really can't stand on Vector and I don't know how to edit that: The p-personal in the top right corner of the page. I would love it if it's possible to have it look like on Timeless (where it's called user-tools, I think). Is there some way to make the p-personal collapsible? So that everything in the top right corner is in a dropdown menu. If so, how do I accomplish it?


Thank for the help in advance! :) 2001:16B8:6006:4300:5978:3FA8:1621:D3E7 (talk) 19:36, 1 May 2020 (UTC)

Sometimes I can change direction with CTRL+Shift and sometimes I cannot. Why?

In an Hebrew 1.34.0 MediaWiki website I often need to edit webpages LTR instead RTL (common with template pages); in that case I click Ctrl+⇧ Shift to change the direction of all text (at edit mode, of course) from right to left.

Most often clicking Ctrl+⇧ Shift works fine, but sometimes it doesn't, and I don't know why.

I usually use Google Chrome (latest, automatically updated) to do my edit.

Why sometimes the RTL to LTR "flipping" (in edit mode) works and sometimes it doesn't? 49.230.0.242 (talk) 03:45, 2 May 2020 (UTC)

I'm assuming you meant Ctrl+⇧ Shift+X and not just Ctrl+⇧ Shift.
If so, then it looks like a bug in MediaWiki. See How to report a bug. AhmadF.Cheema (talk) 04:35, 2 May 2020 (UTC)
Both didn't work for me, this is most likely a bug;
I overcome it by editing in a plain-text editor and copy-pasting back to MediaWiki.
Because I understood reporting bugs requires registering and ideologically I abstain from registering to websites, I abstain to report this problem as a bug,
Kindly, 49.230.0.242 (talk) 09:56, 2 May 2020 (UTC)

Error 403 / Htacess / Weird Editing Errors

While trying to update an outdated installation that wouldn't automatically update, my mediawiki began throwing back this error


Forbidden

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

Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.


I then attempted to restore from backups. It repeatedly threw up the aforementioned error.

When I restored my whole website from a backup, it returned to working order yet I began getting the following error when I attempted to edit pages (I'd been getting the error before trying the update too). The error that began displaying was after I hit submit on any edit and was [Xq0KYja5Y9pvbbDdFIqrFQAAANY] 2020-05-02 05:51:30: Fatal exception of type "Error" 108.52.123.104 (talk) 05:52, 2 May 2020 (UTC)

The error message suggests that your web server can't read any files. Can the web server user (usually www-data) access the MediaWiki files? Taavi (talk!) 05:59, 2 May 2020 (UTC)
Yes, I previously have had no problems with it until I attempted to do updates. And I restored from backups (slowly worked my way backwards to a backup from December 2019) at which point all error messages ceased. Between December and this week there were zero changes. 108.52.123.104 (talk) 06:03, 2 May 2020 (UTC)
Are there any errors on the web server logs (usually /var/log/apache2/error.log for apache or /var/log/nginx/error.log for nginx)? Taavi (talk!) 07:14, 2 May 2020 (UTC)

Is this possible, or is it only possible as an external link like [http://www.mywiki.com/pdfname.pdf#page=2]? Thanks. Jonathan3 (talk) 15:32, 2 May 2020 (UTC)

[[Media:Example.pdf#page=2]] should work if you have $wgFragmentMode set to html5 (not the default) Bawolff (talk) 00:55, 3 May 2020 (UTC)

Dublicated pages on google.

I all ready setup mediawiki 1.34 added some changes for /index.php to /wiki and http to https and also I download MobileFrontEnd extension. I just realized that all of my urls has 2 idential versions of them in GOOGLE and even those pages dont redirect to main page. Basicly those pages are desktop and mobile versions of the pages!!! How can I fix this?


Here is the example;

My main page is; https://lastoasis.wikitent.com/Palm_Leaves

Dublicated pages are;

https://lastoasis.wikitent.com/index.php?title=Palm_Leaves&mobileaction=toggle_view_mobile

https://lastoasis.wikitent.com/index.php?title=Palm_Leaves&mobileaction=toggle_view_desktop

.htacces file code;

RewriteEngine On

RewriteCond %{SERVER_PORT} 80

RewriteRule ^(.*)$ https://lastoasis.wikitent.com/$1 [R,L]

RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f

RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d

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

RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f

RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d

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

RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f

RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d

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


LocalSettings code;

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

$wgScriptPath = "";

$wgScriptExtension = ".php";

$wgArticlePath = "/$1";

$wgUsePathInfo = true; Uzunkaymak (talk) 02:07, 3 May 2020 (UTC)

weird. There is no <link rel="canonical"... tag, which would prevent this issue. I thought mediawiki added a canonical link automatically Bawolff (talk) 02:58, 3 May 2020 (UTC)

Major Spam, now my File Usage 294,523 / 300,000 - how to I delete those new files?

hello, happy quarantine day from Moscow Russia! 🌞

QUESTION: I had problems with major spam on several of my sites because I didn't immediately restrict access. Now my File Usage is 294,523 / 300,000.

  • There were 26,000 messages sent out on the main page of my website.
  • There were emails send from my account.

1. Where are these emails stored?

    • Are they in the domain mediawiki folder itself? /home/sashttt/dishonestliars.com For example
    • Or are they located somewhere else?

2. how can I delete these emails?

ANY HELP PLEASE? 🙏 thanks!

.************* EMAILS LIKE THIS ************ .-----one of two emails ---- Hello,

We are writing from Namecheap Legal and Abuse team.

It has come to our attention that there is a high number of similar emails queued on the server by the hosting account with the username "****".

In order to cease the abuse, the PHP function has been disabled.

The emails were sent from the account automatically per each automated request. In order to avoid the issue from being repeated in future, it is suggested to protect your website from automated requests using anti-spam software (e.g. Captcha).

Please note that in case the issue reoccurs, we may be forced to suspend the subject account to stop the outbreak.

Thank you for understanding. Please let us know if you have any questions.

. [ Please find the additional information below / attached ]

Bounced Queue - 1061 emails

.------------------------------------2 of 2 emails ----------------

Warning: Your Hosting Account "sashtmaj" is Reaching its Backup Disk Space Limit.

Hello,

This is an automatic notification to inform you that your hosting account has reached 90% of its backup disk space limit. According to point 10.3 of our AUP http://www.namecheap.com/legal/hosting/aup.aspx#10c when a hosting account's disk space usage reaches 25 GB, the hosting account is automatically excluded from our backup system.

cPanel Account: sasht** Server: premium11.web-hosting.com Size of account: 23310, MB

Please monitor the performance of your account and make sure you do not get over 25 GB limit if you want us to continue keeping a reserved copy of your account on our storage servers.

If disk space usage can't be kept within the specified limit we recommend you to setup regular backups for your hosting account using Backups option in cPanel or create an account with CodeGuard to have a reserved copy of your data.These articles will guide you through the process of manual backup setup:

https://www.namecheap.com/support/knowledgebase/article.aspx/915 http://www.namecheap.com/support/knowledgebase/article.aspx/1413/2184/how-to-make-backups-using-codeguard

If you have any questions or need any assistance please submit a ticket to Hosting - Support department at support.namecheap.com

Regards, Namecheap Hosting Team Moscowdreams (talk) 09:35, 3 May 2020 (UTC)

@Moscowdreams What is "File Usage"? Where does that number come from exactly? Why do you think it is related to emails? Malyacko (talk) 10:40, 3 May 2020 (UTC)
It is related to spam.
When there are new webpages with mediawiki created, there is not automatic filters to stop bots from creating new emails. Infinitepeace (talk) 05:12, 3 November 2020 (UTC)
emails arent stored on disk.
I guess check the images folder. Thats where mw would generate files if it did so. If file cache is enabled (not default) check cache directory.
Mediawiki mostly stores stuff in db, not filesystem Bawolff (talk) 21:16, 3 May 2020 (UTC)
the '''images folder''' for each website? Infinitepeace (talk) 05:10, 3 November 2020 (UTC)

Editing Template:Taxobox

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 recently discovered and imported all the templates about taxonomy in my wiki but i need to modify them. This because i want to display the infobox on the right of the page and because i want to add others taxa like Subgenus, Group and Complex. Also i'd like to change the sinoptic background colors.

Because i want that all the infoboxes of my wiki share the same aspect i tried to edit the Common.css page but i can't call the template. I tried with writing the class of the table of the template or the class of a specify part of it but nothing happen.

Do you have any suggestions?


Thank you very much


Michele Cible30 (talk) 09:52, 3 May 2020 (UTC)

@Cible30 Hi, defining CSS rules for the template class in MediaWiki:Common.css should work. Could you elaborate which templates this is about, and what exactly you added to MediaWiki:Common.css? Is the wiki public? Malyacko (talk) 10:36, 3 May 2020 (UTC)
I added Template:Tassobox and his doc.
In MediaWiki:Common.css i write for example: <table class="sinottico" style="width:230px"; float: "right";></table> if i want to move the box on the right
(my wiki is in italian)
No, my wiki is now on a local server Cible30 (talk) 11:19, 3 May 2020 (UTC)
What you wrote is not CSS, but HTML, hence it cannot work. MediaWiki:Common.css needs to include CSS. Malyacko (talk) 13:11, 3 May 2020 (UTC)
Acc, my fault, now it works!
Thank you Cible30 (talk) 13:34, 3 May 2020 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Problems with update.php'

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


My media version: 1.31

I installed scribunto, wikibase, templatestyles, cite, citethispage, gadgets, imagemap, inputbox, interwiki, localizationupdate, nuke, parserfunctions, pdfhandler, syntaxhighlight_GeSHi, titleblacklist, massmessage.

When i start "update.php" i get an error:

RuntimeException from line 132 of /var/www/html/extensions/Wikibase/repo/includes/Store/Sql/PropertyInfoTableBuilder.php: Wikibase\PropertyInfoTableBuilder::rebuildPropertyInfo can not run with no Property namespace defined.

Backtrace:

#0 /var/www/html/extensions/Wikibase/repo/includes/Store/Sql/DatabaseSchemaUpdater.php(215): Wikibase\PropertyInfoTableBuilder->rebuildPropertyInfo()

#1 /var/www/html/includes/installer/DatabaseUpdater.php(482): Wikibase\Repo\Store\Sql\DatabaseSchemaUpdater::rebuildPropertyInfo(MysqlUpdater)

#2 /var/www/html/includes/installer/DatabaseUpdater.php(450): DatabaseUpdater->runUpdates(array, boolean)

#3 /var/www/html/maintenance/update.php(203): DatabaseUpdater->doUpdates(array)

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

#5 /var/www/html/maintenance/update.php(248): require_once(string)

#6 {main} 77.35.133.23 (talk) 17:18, 3 May 2020 (UTC)

mediawiki version* 77.35.133.23 (talk) 17:20, 3 May 2020 (UTC)
As the error says, you need to follow the installation instructions for Wikibase and define the namespaces. If you have, please share your configuartion for this. RhinosF1 (talk) 17:28, 3 May 2020 (UTC)
Hello, RhinosF1,
"you need to follow the installation instructions for Wikibase and define the namespaces"
I installed wikibase according to the instructions (Wikibase/Installation)
Wikibase works well.
How to define the namespaces? 77.35.133.23 (talk) 17:42, 3 May 2020 (UTC)
Solved! I forgot to do:
cd /var/www/html/extensions/Wikibase
php repo/maintenance/rebuildItemsPerSite.php
php client/maintenance/populateInterwiki.php

77.35.133.23 (talk) 18:22, 3 May 2020 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

I can not edit the post / page.

When I try to edit a post, I get an error:

[2f8892cbf6940ed21d214a6a] /index.php?title=%E3%83%A2%E3%82%B8%E3%83%A5%E3%83%BC%E3%83%AB:Citation/CS1/styles.css&action=submit MWException from line 1722 of /var/www/html/includes/page/WikiPage.php: Could not find text for current revision 76153452.

Backtrace:

#0 /var/www/html/includes/page/WikiPage.php(1674): WikiPage->doModify(TemplateStylesContent, integer, User, string, array)

#1 /var/www/html/includes/EditPage.php(2214): WikiPage->doEditContent(TemplateStylesContent, string, integer, boolean, User, string, array, integer)

#2 /var/www/html/includes/EditPage.php(1506): EditPage->internalAttemptSave(array, boolean)

#3 /var/www/html/includes/EditPage.php(652): EditPage->attemptSave(array)

#4 /var/www/html/includes/actions/EditAction.php(60): EditPage->edit()

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

#6 /var/www/html/includes/MediaWiki.php(500): SubmitAction->show()

#7 /var/www/html/includes/MediaWiki.php(294): MediaWiki->performAction(Article, Title)

#8 /var/www/html/includes/MediaWiki.php(861): MediaWiki->performRequest()

#9 /var/www/html/includes/MediaWiki.php(524): MediaWiki->main()

#10 /var/www/html/index.php(42): MediaWiki->run()

#11 {main} 77.35.133.23 (talk) 19:42, 3 May 2020 (UTC)

Which exact version of MediaWiki and which exact version and branch of the TemplateStyles extension is this about? Malyacko (talk) 19:55, 3 May 2020 (UTC)
Mediawiki 1.31, TemplateStyles 1.31

77.35.133.23 (talk) 19:59, 3 May 2020 (UTC)
Update:
This error appears when I try to edit a module (module page). I tried editing the article, editing works there.
But it does not work here: localhost/index.php/Module:Citation/CS1/styles.css 77.35.133.23 (talk) 20:50, 3 May 2020 (UTC)
its probably a bad import or something gone wrong with an upgrade. As the error says, you seem to be missing old versions of the page. Bawolff (talk) 21:13, 3 May 2020 (UTC)

Does MediaWiki allow scheduled notifications?

A wiki could be what I want for a personal project of mine, but one thing I'd need is to create alerts that fire on preset dates. A bit like calendar apps, to-do apps etc. can. Is there such a feature, or can I adapt existing functionality to make it do this? Thanks, Johann.

Or if MediaWiki isn't suitable, can anyone suggest something else? Essentially I need to input large numbers of items, create hyperlinks between them, categorise them, some with alerts. J.

Johann van Triangle (talk) 02:31, 4 May 2020 (UTC)

Do you just mean alerts that appear on a particular wiki page? You can have text which only appears before/between/after certain date(s)/time(s) using a combination of #ifexpr and #time: Help:Extension:ParserFunctions.
I've not used it but there is also Extension:Echo. Jonathan3 (talk) 08:48, 4 May 2020 (UTC)
Re "alerts that appear on a particular wiki page": that could work as I could keep the alerts on one "dashboard" type of page. I am making assumptions here, as I don't know what MediaWiki is like to configure and I'm not good at web things. Johann van Triangle (talk) 09:03, 4 May 2020 (UTC)
To get details from multiple pages onto a single dashboard page, I'd go for Cargo. If you just want the alert on the individual pages you could use ParserFunctions. Jonathan3 (talk) 15:38, 4 May 2020 (UTC)
Or if you use Extension:Cargo you could save the relevant dates etc to the database, and then a query could determine whether your "alert" is displayed, e.g. if the item was meant to be completed yesterday, then when you get a list of the items from the database the overdue item could be marked "OVERDUE" or whatever. Jonathan3 (talk) 08:50, 4 May 2020 (UTC)
Maybe. I'd hope that the mechanisms for querying and displaying the results are easy. Although I'm very comfortable with SQL and databases in general, I've been having difficulties using PHP to do this sort of thing on my homemade website, so I don't want to have to learn another technology (I'm in my sixties) with its own set of hassles. Johann van Triangle (talk) 09:11, 4 May 2020 (UTC)
. Johann van Triangle (talk) 09:10, 4 May 2020 (UTC)
If you are happy with SQL then you'd be happy with Cargo, as its queries (which you put into your wiki page) are pretty much the same. Basically, each template is associated with one SQL table, and each page using that template is associated with a row in the table. You can use [Extension:Page Forms]] to help create each page (one input type per column in the relevant table). You don't need to know any PHP. Jonathan3 (talk) 15:37, 4 May 2020 (UTC)

Mediawiki templates and modules

Special:Export > Add pages from namespace.

Hi All,

I would like to know, if there is any way to download templates and modules dump all at once to local mediawiki,instead of exporting and importing one by one. As i had setup mediawiki and parsoid for wikitext to html conversion, But while conversion i dont get expanded templates.


I am trying to convert "{{Convert|907|hp|kW PS|0|abbr=on}}" --> "907 hp (676 kW; 920 PS)" but i get output as "Template:Convert"

Like wise i have multiple templates, and downloading each template ony by ony is cumbersome.

So i would like to know , how to go with it all at once.



111.125.208.58 (talk) 04:58, 4 May 2020 (UTC)

Have you already seen Special:Export, especially the "Add pages from namespace" part? AhmadF.Cheema (talk) 09:30, 4 May 2020 (UTC)
No , i will check, does it contains all the entire mediawiki templates ? 111.125.208.58 (talk) 11:38, 4 May 2020 (UTC)
The Template namespace would. AhmadF.Cheema (talk) 13:38, 4 May 2020 (UTC)
Hey @AhmadF.Cheema , Thank you so much . I was able to download all the templates. 111.125.208.58 (talk) 07:17, 5 May 2020 (UTC)
I found lot of templates missing from Special:Export like Template:Birth date and age and many more, how and where can i get this missing templates, i have entire wikipedia dump offline and i want to convert wikitext to HTML in local. so i will need almost all templates for that downloaded wikitext dump. Vickyatwal (talk) 05:33, 7 May 2020 (UTC)
Did you use Special:Export of mediawiki.org or the one for en.wikipedia.org?
Wikipedia templates are to be exported through Wikipedia's Special:Export. AhmadF.Cheema (talk) 13:42, 7 May 2020 (UTC)

How to flush all caches via CLI?

I edit a very complex (and annoying to edit) footnotes creation template which currently looks like:

<includeonly>{{#תנאי:{{{שם|}}}
|  <!-- הערת שוליים בלי שם -->
  {{#tag:ref
    | 1 = {{{תוכן|}}}
  }}
|  <!-- הערת שוליים עם שם -->
  <includeonly>{{#tag:ref
    | 1 = {{{תוכן|}}}
    | name = {{{שם|}}}
  }}
}}  <!-- סגירת ה #תנאי --></includeonly><noinclude>
[[קטגוריה:תבניות]]
</noinclude>

There are some mistakes I try to find by "trial and error" in that template and each time I change it a bit,

But even if I change it and I go to effected webpages and click in Chrome <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>R</kbd>

I still have the problem that I have to click this two or three or four times to actually get the change due to changing the template.

How to flush all caches of my website from CLI so the change in browser would be immediate? 182.232.9.183 (talk) 09:28, 4 May 2020 (UTC)

Please, is there a Wiki-CLI expert to tag here? 182.232.3.127 (talk) 06:31, 5 May 2020 (UTC)
And BTW, here is the discussion about that template itself, if you want to contribute:
Project:Support desk/Flow/2020/05#h-Do_you_recognize_any_code_problem_with_this_Cite-only_named_references_template?-2020-05-05T03:37:00.000Z 182.232.3.127 (talk) 06:32, 5 May 2020 (UTC)
You should set $wgCacheEpoch to the current time. See the documentation for details. – Ammarpad (talk) 14:35, 5 May 2020 (UTC)
@Ammarpad I didn't understand from that documentation page if what I need is to put at LocalSettings.php:
$wgCacheEpoch = mktime()
And I further misunderstood if this would be a minimalist substitute to the also LocalSettings.php data of:
$wgMainCacheType = CACHE_NONE;
$wgMemCachedServers = [];
$wgParserCacheType = CACHE_NONE;
$wgMainCacheType = CACHE_NONE;
182.232.3.127 (talk) 15:39, 5 May 2020 (UTC)
If there is a PHP developer to tag here to opinion about this, it would be very helpful.
Related: Project:Support desk/Flow/2020/05#h-How_to_work_in_development_mode?-2020-05-05T07:18:00.000Z 182.232.3.127 (talk) 15:40, 5 May 2020 (UTC)
Perhaps @Bawolff would like to opinion about this, as on $wgCacheEpoch = mktime() approach (I am not a PHP programmer). 182.232.163.254 (talk) 07:28, 6 May 2020 (UTC)
Keep in mind, disabling all the caches will make things slower.
An alternative solution might be doing $wgJobRunRate = 10; it will make page saves slower, but it should cause the pages to update when you hit save on the template (or at least the first 10-ish usages of the template). I would suggest maybe trying that first before disabling all cache.
I believe php mktime() is the wrong format for wgCacheEpoch (although for all i know maybe it takes both). you would want to use $wgCacheEpoch = gmdate( 'YmdHis' ) instead to set the cache epoch time to right now.
However to answer the original question (in default config) you can flush most caches by editing or touching LocalSettings.php. So from cli you should be able tl just use the unix touch command to clear most caches.
To clarify, there are two separate caches that are relavent here - the browser 304 cache, and the parser cache. Refreshing the page (via ctrl+shift+r) bypasses the browser cache but not the parser cache, so it sounds like you are primarily hitting the parser cache. Anyways, setting wgParserCacheType = CACHE_NONE will disable parser cache, but browser 304 caching will still be in place (until either job queue refreshes the page or you do ctrl+shift+r in browser). wgCacheEpoch or touching LocalSettings.php will clear both parser cache and 304 cache. Bawolff (talk) 08:58, 6 May 2020 (UTC)
@Bawolff thank you dearly !
Yes, It's only for the period I extensively test the above template and similar.
So for now I stay with the following commands at LocalSettings,php and keep hitting CTRL+Shift+R when needed;
$wgMainCacheType = CACHE_NONE;
$wgMemCachedServers = [];
$wgParserCacheType = CACHE_NONE;
$wgMainCacheType = CACHE_NONE;
182.232.163.254 (talk) 13:27, 6 May 2020 (UTC)
@Bawolff I do think I didn't understand one thing:
AFAIK, touch creates a new empty file, so what did you mean by using touch on LocalSettings.php? Perhaps you meant:
touch -m LocalSettings.php
While the -m flag means "change only the modification time" so the inner content of the file stays the same. 182.232.163.254 (talk) 14:25, 6 May 2020 (UTC)
file content will always stay the same with touch (if it already exists). I think -m means to not update access time instead of updating both modification and access time. Bawolff (talk) 15:03, 6 May 2020 (UTC)

Confused why a page shows on Double Redirects

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.


https://publictestwiki.com/wiki/Special:DoubleRedirects shows User:RhinosF1 but I can't see why.

Can anyone explain why?

It's not a redirect and is a global user page from another wiki. RhinosF1 (talk) 09:47, 4 May 2020 (UTC)

i think you have a page in database that has an interwiki as part of its title, which isnt supposed to happen, which is confusing mediawiki.
https://publictestwiki.com/w/api.php?action=query&list=querypage&qppage=DoubleRedirects
https://publictestwiki.com/wiki/Main_Page?curid=2604&redirect=no
Try running cleanupTitles.php.
Although it is weird redirect table sees it as a double redirect and not an interwiki redirect. Probably the linkstable just hasnt been updated since that became a valid interwiki Bawolff (talk) 09:13, 6 May 2020 (UTC)
@Bawolff 0 of 2225 rows updated by cleanupTitles.php RhinosF1 (talk) 11:02, 6 May 2020 (UTC)
well your mystery row is gone now Bawolff (talk) 15:00, 6 May 2020 (UTC)
@Bawolff We found a way to delete the page
on the wiki.
That’s what got rid of it. RhinosF1 (talk) 17:57, 6 May 2020 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Mediawiki Import Error in Import Pages

While trying to import xml using Special:import, I get Below error


"""Import failed: * Loss of session data. You might have been logged out. Please verify that you're still logged in and try again. If it still does not work, try logging out and logging back in, and check that your browser allows cookies from this site. * No interwiki prefix was supplied"""


I tried importing after allowing cookies, logging in and other things mentioned in error. I still get the same error.


can someone assis with the same


111.125.208.58 (talk) 11:47, 4 May 2020 (UTC)

Which MediaWiki version? Where is that XML file from / how big is it, etc? Malyacko (talk) 13:37, 4 May 2020 (UTC)
Mediawiki version is 1.34 and i have downloaded xml file from Special:Export , size of xml file is 17 mb 111.125.208.58 (talk) 07:14, 5 May 2020 (UTC)
See if this helps.
Two similar questions at almost the same time. AhmadF.Cheema (talk) 12:21, 5 May 2020 (UTC)
Hey thanks, i was not able to import through UI so i tried with command line and its working well 111.125.208.58 (talk) 05:18, 7 May 2020 (UTC)

Citation/CS1/styles.css

I have some problems with the module "citation/cs1".

I exported module (Citation/CS1) from the official wiki. Then I import this module into my wiki. And I get an error.

Capture failed: * Lost session data. Your account may be logged out. Please make sure you are logged in to your account and try again . If that doesn't work, please log out and log back in to make sure that your browser allows cookies from this site.

(^ error text translated from japanese ^)

No problem with my browser (i checked on another browser with an admin account). This error occurs when the weight of the module (.xml) is about 10 mb or more. No problem with small files.


77.35.133.23 (talk) 12:44, 4 May 2020 (UTC)

What is an "official wiki"? Where to see that error? Where is that error message displayed? Which MediaWiki version are you running? Malyacko (talk) 13:36, 4 May 2020 (UTC)
See if this helps. AhmadF.Cheema (talk) 13:37, 4 May 2020 (UTC)
Thank you, works. 77.35.133.23 (talk) 16:35, 4 May 2020 (UTC)

Lockdown Extension: Lockdown before Login

Hi all,


I use the lockdown extension for some of my namespaces and it works really well.

Two namespaces are completly locked behind a group and if a user is not in that group, he should not be able to do anything there:


```

$wgNamespacePermissionLockdown[NS1]['read'] = [ 'viewer', 'editor', 'sysop' ];

$wgNamespacePermissionLockdown[NS1]['create'] = [ 'editor', 'sysop' ];

$wgNamespacePermissionLockdown[NS1]['edit'] = [ 'editor', 'sysop' ];

$wgNamespacePermissionLockdown[NS1]['delete'] = [ 'editor', 'sysop' ];

```


If a user is not in those groups tries to read it, he gets the "You don't have the permission" page which is great.


The problem now is that if you're not logged in at all, you still get the "You don't have the permission" page. Of course I don't, since I'm anonymous that time. But I'd expect the login dialog instead. So it appears that the lockdown check comes before the login of a user.


Can I achieve this somehow? Or is this the only possible way and the alternative would be to not lockdown the namespace.


Thanks in advance


Best regards,

Thraze 2003:ED:8F21:9753:2D77:D4F9:B46C:4F78 (talk) 13:01, 4 May 2020 (UTC)

Imported templates not working

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


A beginner question: Imported a bunch of templates; they are not working as intended.

For example Template:Composition histogram from wikipedia after importing becomes this , and using { { Composition histogram|red|2}} produces this.

Updating / importing common.css didn't help.

What did I miss? Thanks in advance.

MediaWiki 1.34.1
PHP 7.3.17 (fpm-fcgi)
MariaDB 10.1.37-MariaDB-0+deb9u1
ICU 57.1
Lua 5.1.5
Luceatx (talk) 15:12, 4 May 2020 (UTC)
You should install Extension:ParserFunctions. – Ammarpad (talk) 17:50, 4 May 2020 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Template:Main_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.


Hello, how can I add this template https://www.mediawiki.org/wiki/Template:Main_page to a mediawiki that is hosted on an external server to mediawiki, thank you very much.


Geryescalier (talk) 18:59, 4 May 2020 (UTC)

Use Special:Export to export the template in an XML file format and then Special:Import in your Wiki to import the downloaded XML file.
Note that you'll probably have to copy some CSS rules too in order to make a complete duplicate of the Main page template. Also, you can remove the <translate></translate> tags in the template as you probably won't need them. AhmadF.Cheema (talk) 20:07, 4 May 2020 (UTC)
Hello @AhmadF.Cheema thank you very much for your kind and prompt help, I will carry out the steps that you suggest, I reiterate my best thanks. Geryescalier (talk) 03:46, 5 May 2020 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Import a page and I get errors NEED TO KNOW ASAP

The Error I get is

[e4c87f7190dd7029d0a1f8fe] 2020-05-04 18:43:39: Fatal exception of type "Error"

Why dose this happen? And How do I fix it.

I need to know this ASAP

My website is Sturtz Wiki

The backtrace is

root@sturtz:/var/www/wiki/maintenance# php importDump.php < computer.xml

[f7759dde8c4386bc90fb90a2] [no req]   Error from line 78 of /var/www/wiki/extensions/TemplateStyles/includes/TemplateStylesContent.php: Class 'Wikimedia\CSS\Parser\Parser' not found

Backtrace:

#0 /var/www/wiki/extensions/TemplateStyles/includes/TemplateStylesHooks.php(367): TemplateStylesContent->sanitize(array)

#1 /var/www/wiki/includes/parser/Parser.php(4293): TemplateStylesHooks::handleTag(NULL, array, Parser, PPTemplateFrame_Hash)

#2 /var/www/wiki/includes/parser/PPFrame_Hash.php(328): Parser->extensionSubstitution(array, PPTemplateFrame_Hash)

#3 /var/www/wiki/includes/parser/PPTemplateFrame_Hash.php(89): PPFrame_Hash->expand(PPNode_Hash_Tree, integer)

#4 /var/www/wiki/includes/parser/Parser.php(3694): PPTemplateFrame_Hash->cachedExpand(string, PPNode_Hash_Tree)

#5 /var/www/wiki/includes/parser/PPFrame_Hash.php(254): Parser->braceSubstitution(array, PPFrame_Hash)

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

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

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

#9 /var/www/wiki/includes/StubObject.php(112): Parser->parse(string, Title, ParserOptions, boolean, boolean, integer)

#10 /var/www/wiki/includes/StubObject.php(138): StubObject->_call(string, array)

#11 /var/www/wiki/extensions/SyntaxHighlight_GeSHi/includes/SyntaxHighlight.php(456): StubObject->__call(string, array)

#12 /var/www/wiki/includes/Hooks.php(174): SyntaxHighlight::onContentGetParserOutput(TemplateStylesContent, Title, integer, ParserOptions, boolean, ParserOutput)

#13 /var/www/wiki/includes/Hooks.php(202): Hooks::callHook(string, array, array, NULL)

#14 /var/www/wiki/includes/content/AbstractContent.php(549): Hooks::run(string, array)

#15 /var/www/wiki/extensions/TemplateStyles/includes/TemplateStylesContent.php(134): AbstractContent->getParserOutput(Title, integer, ParserOptions, boolean)

#16 /var/www/wiki/includes/Revision/RenderedRevision.php(264): TemplateStylesContent->getParserOutput(Title, integer, ParserOptions, boolean)

#17 /var/www/wiki/includes/Revision/RenderedRevision.php(236): MediaWiki\Revision\RenderedRevision->getSlotParserOutputUncached(TemplateStylesContent, boolean)

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

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

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

#21 /var/www/wiki/includes/Revision/RenderedRevision.php(198): call_user_func(Closure, MediaWiki\Revision\RenderedRevision, array)

#22 /var/www/wiki/includes/Storage/DerivedPageDataUpdater.php(1290): MediaWiki\Revision\RenderedRevision->getRevisionParserOutput()

#23 /var/www/wiki/includes/Storage/DerivedPageDataUpdater.php(1649): MediaWiki\Storage\DerivedPageDataUpdater->getCanonicalParserOutput()

#24 /var/www/wiki/includes/Storage/DerivedPageDataUpdater.php(1430): MediaWiki\Storage\DerivedPageDataUpdater->doParserCacheUpdate()

#25 /var/www/wiki/includes/page/WikiPage.php(2072): MediaWiki\Storage\DerivedPageDataUpdater->doUpdates()

#26 /var/www/wiki/includes/import/ImportableOldRevisionImporter.php(143): WikiPage->doEditUpdates(MediaWiki\Revision\RevisionStoreRecord, User, array)

#27 /var/www/wiki/includes/import/WikiRevision.php(616): ImportableOldRevisionImporter->import(WikiRevision)

#28 /var/www/wiki/includes/import/WikiImporter.php(366): WikiRevision->importOldRevision()

#29 /var/www/wiki/maintenance/importDump.php(209): WikiImporter->importRevision(WikiRevision)

#30 /var/www/wiki/includes/import/WikiImporter.php(501): BackupReader->handleRevision(WikiRevision, WikiImporter)

#31 /var/www/wiki/includes/import/WikiImporter.php(941): WikiImporter->revisionCallback(WikiRevision)

#32 /var/www/wiki/includes/import/WikiImporter.php(860): WikiImporter->processRevision(array, array)

#33 /var/www/wiki/includes/import/WikiImporter.php(802): WikiImporter->handleRevision(array)

#34 /var/www/wiki/includes/import/WikiImporter.php(606): WikiImporter->handlePage()

#35 /var/www/wiki/maintenance/importDump.php(359): WikiImporter->doImport()

#36 /var/www/wiki/maintenance/importDump.php(301): BackupReader->importFromHandle(resource)

#37 /var/www/wiki/maintenance/importDump.php(129): BackupReader->importFromStdin()

#38 /var/www/wiki/maintenance/doMaintenance.php(99): BackupReader->execute()

#39 /var/www/wiki/maintenance/importDump.php(364): require_once(string)

#40 {main} Nsturtz2 (talk) 19:44, 4 May 2020 (UTC)

See Manual:How to debug. AhmadF.Cheema (talk) 20:03, 4 May 2020 (UTC)
See Manual:How to debug, and provide stack trace of the exception. – Ammarpad (talk) 20:06, 4 May 2020 (UTC)
I just get [e4c87f7190dd7029d0a1f8fe] 2020-05-04 18:43:39: Fatal exception of type "Error" when I am on special:import Nsturtz2 (talk) 20:10, 4 May 2020 (UTC)
I just ran the command php importDump.php < computer.xml and I get Nsturtz2 (talk) 20:21, 4 May 2020 (UTC)
It seems you're missing some dependencies. You should run composer install --no-dev to install them. – Ammarpad (talk) 05:52, 5 May 2020 (UTC)
you need to run the composer install in the TemplateStyles extension directory Bawolff (talk) 15:39, 5 May 2020 (UTC)

Database Issues with Translations Since 1.34

I've brought up an issue on https://phabricator.wikimedia.org/T249988 that has yet to receive any possible solutions. Ever since I updated to 1.34 and applied the patch:

git pull "https://gerrit.wikimedia.org/r/mediawiki/extensions/Translate" refs/changes/81/560081/2

I've had issues on several translations. For example Tagalog is showing an internal server error that appears to have something to do with the l10n_cache table (full error available under the phabricator link). And Brazilian Portuguese articles are unable to show the latest revision after being updated (blank page is shown instead).

Could the patch have messed up something in my database? Or what could be causing these errors? I'd really appreciate a solution. (I've tried truncating the l10n_cache table, that didn't do anything). 84.50.133.41 (talk) 21:17, 4 May 2020 (UTC)

Hello,
Was this missed? 195.80.103.225 (talk) 19:25, 10 May 2020 (UTC)

Extension:YouTube where is earlier version for 1.27?

Extension:YouTube where can I find an earlier version for 1.27? Thank you in advance! Moscowdreams (talk) 22:10, 4 May 2020 (UTC)

@Moscowdreams There is no good reason why to find an earlier version, except for if you run an ancient insecure MediaWiki version that you should upgrade, instead of adding more extensions to it. Malyacko (talk) 10:23, 5 May 2020 (UTC)
you can usually find earlier versions at github Bawolff (talk) 15:38, 5 May 2020 (UTC)
to wit: https://github.com/wikimedia/mediawiki-extensions-YouTube/archive/REL1_27.zip Bawolff (talk) 09:03, 6 May 2020 (UTC)

Do you recognize any code problem with this Cite-only named references template?

The following template was suggested by a community member of Hebrew Wikipedia which I understand to be an expert in Wiki templates development.

Its purpose is to allow people to create, RTL (Hebrew), unnamed, or named, footnotes, by a template call (the data is pushed into a references / tag).

<includeonly>{{#תנאי:{{{שם|}}}
|  <!-- הערת שוליים בלי שם -->
  {{#tag:ref
    | 1 = {{{תוכן|}}}
  }}
|  <!-- הערת שוליים עם שם -->
  <includeonly>{{#tag:ref
    | 1 = {{{תוכן|}}}
    | name = {{{שם|}}}
  }}
}}  <!-- סגירת ה #תנאי --></includeonly><noinclude>
[[קטגוריה:תבניות]]
</noinclude>

תנאי means "condition". I have tested that template with this call:

הערה|תוכן|שם="שם"

But didn't get any footnotes in a references / tag.

Do you recognize any code problem with this Cite-only named references template? 182.232.3.127 (talk) 03:37, 5 May 2020 (UTC)

By the way, here is a testing webpage if you want to try to debug at your own RTL (Hebrew) MediaWiki 1.34.0:

==תבנית הערה ללא שיום==
* קריאה בלי שם (ראשונה){{הערה|בדיקה ראשונה}}
* קריאה בלי שם (שנייה){{הערה|בדיקה שנייה}}

==תבנית הערה עם שיום באנגלית==

===ללא גרשיים בשם===
* קריאה בלי שם{{הערה|בדיקה ראשונה}}
* קריאה עם שם{{הערה|בדיקה שנייה|name=שם}}
* קריאה כפי שם{{הערה|name=שם}}

===עם גרשיים בשם===
* קריאה בלי שם{{הערה|בדיקה ראשונה}}
* קריאה עם שם{{הערה|בדיקה שנייה|name="שם"}}
* קריאה כפי שם{{הערה|name="שם"}}

==תבנית הערה עם שיום בעברית==

===ללא גרשיים בשם===
* קריאה בלי שם{{הערה|בדיקה ראשונה}}
* קריאה עם שם{{הערה|בדיקה שנייה|שם=שם}}
* קריאה כפי שם{{הערה|שם=שם}}

===עם גרשיים בשם===
* קריאה בלי שם{{הערה|בדיקה}}
* קריאה עם שם{{הערה|בדיקה|שם="שם"}}
* קריאה כפי שם{{הערה|שם="שם"}}

==הערות שוליים==
<references />

@Ciencia Al Poder perhaps you can help by tagging an RTL expert of this community? 182.232.3.127 (talk) 04:45, 5 May 2020 (UTC)

@Amire80 please share with us an helping comment or at least tag someone who could if you cannot at the moment, 182.232.3.127 (talk) 07:13, 5 May 2020 (UTC)
Also, the call I used was:
{[הערה|תוכן|שם="שם"}}
Not:
הערה|תוכן|שם="שם"
@Bawolff 182.232.3.127 (talk) 07:30, 5 May 2020 (UTC)
The immediate thing I can think of: Do you have ParserFunctions and Cite extensions installed? Amir E. Aharoni {{🌎🌍🌏}} 08:00, 5 May 2020 (UTC)
@Amire80 I have both extensions installed and loaded at LocalSettings.php via:
wfLoadExtension( 'Cite' );
wfLoadExtension( 'ParserFunctions' );
I use them "as is" (no special configurations). 182.232.3.127 (talk) 08:14, 5 May 2020 (UTC)
Two more questions:
If you use just <ref>שלום</ref>, not as a template, does it appear as expected?
Is Hebrew defined as the content language of your wiki ($wgLanguageCode)? Amir E. Aharoni {{🌎🌍🌏}} 08:20, 5 May 2020 (UTC)
@Amire80
About question one: Yes; for example, this works fine when I execute the creation of a MediaWiki webpage:
* בדיקה פשוטה ראשונה<ref>בדיקת תגית רף פשוטה בלי שם</ref>
* בדיקה פשוטה שנייה<ref name="my_new_name">בדיקת תגית רף פשוטה עם שם</ref>
* בדיקה פשוטה שלישית<ref name="my_new_name"></ref>
  • בדיקה פשוטה ראשונה[1]
  • בדיקה פשוטה שנייה[2]
  • בדיקה פשוטה שלישית[2]
About question two: Yes; Hebrew is the main content language of my 1.34.0 (principally all-core) MediaWiki website.
  1. בדיקת תגית רף פשוטה בלי שם
  2. 1 2 בדיקת תגית רף פשוטה עם שם
182.232.3.127 (talk) 11:20, 5 May 2020 (UTC)
Hmm, I'm not sure then... Have you seen asked @ערן or @IKhitron?
I don't think that RTL is the problem. There must be some bug with the usage of parser functions or template parameters, but I cannot see it myself. Perhaps I'd see it if I could log in myself to the wiki. Amir E. Aharoni {{🌎🌍🌏}} 11:54, 5 May 2020 (UTC)
From my first sight, I can see two opening includeonly and only one closing. IKhitron (talk) 11:57, 5 May 2020 (UTC)
I did ask Ikhitron.
Well, am,
Even if I totally remove the includeonly and noninclude tags and the category, sorted, clickable footnote numbers do seem to be created but their content is basically only 1 = so I get this output (FYI dear @IKhitron):
==הערות שוליים[עריכה]==
  1. ^ לקפוץ מעלה אל:1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 1 =
  2. ^ 1 =
  3. ^ 1 =
  4. ^ 1 =
  5. ^ 1 = 182.232.3.127 (talk) 12:17, 5 May 2020 (UTC)
@AhmadF.Cheema I invite you to try to translate the template to your own mother tongue (Farsi? Urdu? I recall I thought it's Arabic but was wrong) and perhaps come with your own version, for the sake of all future RTL MediaWiki users who don't want Lua/Scribunto for footnotes. 182.232.3.127 (talk) 13:08, 5 May 2020 (UTC)
@קיפודנחש you might want to further contribute here (instead only at Hebrew Wikipedia) for the production of a Lua-free/Scribunto-free RTL supporting template for as much people as possible and not just for Hebrew-MediaWiki users. 182.232.3.127 (talk) 14:47, 5 May 2020 (UTC)

your template and the template usage in the examples above do not match.

the template expects a parameter named תוכן' while the usage just use unnamed parameter #1.

IOW, instead of

==תבנית הערה ללא שיום==
* קריאה בלי שם (ראשונה){{הערה|בדיקה ראשונה}}
* קריאה בלי שם (שנייה){{הערה|בדיקה שנייה}}

==תבנית הערה עם שיום באנגלית==

===ללא גרשיים בשם===
* קריאה בלי שם{{הערה|בדיקה ראשונה}}
* קריאה עם שם{{הערה|בדיקה שנייה|name=שם}}
* קריאה כפי שם{{הערה|name=שם}}

===עם גרשיים בשם===
* קריאה בלי שם{{הערה|בדיקה ראשונה}}
* קריאה עם שם{{הערה|בדיקה שנייה|name="שם"}}
* קריאה כפי שם{{הערה|name="שם"}}

==תבנית הערה עם שיום בעברית==

===ללא גרשיים בשם===
* קריאה בלי שם{{הערה|בדיקה ראשונה}}
* קריאה עם שם{{הערה|בדיקה שנייה|שם=שם}}
* קריאה כפי שם{{הערה|שם=שם}}

===עם גרשיים בשם===
* קריאה בלי שם{{הערה|בדיקה}}
* קריאה עם שם{{הערה|בדיקה|שם="שם"}}
* קריאה כפי שם{{הערה|שם="שם"}}

==הערות שוליים==
<references />

you want

==תבנית הערה ללא שיום==
* קריאה בלי שם (ראשונה){{הערה|תוכן = בדיקה ראשונה}}
* קריאה בלי שם (שנייה){{הערה|תוכן = בדיקה שנייה}}

==תבנית הערה עם שיום באנגלית==

===ללא גרשיים בשם===
* קריאה בלי שם{{הערה|תוכן = בדיקה ראשונה}}
* קריאה עם שם{{הערה|תוכן = בדיקה שנייה|שם = שם ההערה}}
* קריאה כפי שם{{הערה|שם = שם ההערה}}

===עם גרשיים בשם===
* קריאה בלי שם{{הערה|תוכן = בדיקה ראשונה}}
* קריאה עם שם{{הערה|תוכן = בדיקה שנייה|שם = הערה שנייה}}
* קריאה כפי שם{{הערה|שם = הערה שנייה}}

==תבנית הערה עם שיום בעברית==

===ללא גרשיים בשם===
* קריאה בלי שם{{הערה|תוכן = בדיקה ראשונה}}
* קריאה עם שם{{הערה|תוכן = בדיקה שנייה|שם=שם שלישי}}
* קריאה כפי שם{{הערה|שם=שם שלישי}}

===עם גרשיים בשם===
* קריאה בלי שם{{הערה|תוכן = בדיקה}}
* קריאה עם שם{{הערה|תוכן = בדיקה|שם="שם רביעי"}}
* קריאה כפי שם{{הערה|שם="שם רביעי"}}

==הערות שוליים==
<references />

i did not test my snippet, but in principle it's correct, modulo typos, while "your" snippet can't work - you pass unnamed parameters, while the template code expects named parameters.

peace. קיפודנחש (talk) 16:07, 5 May 2020 (UTC)

que es esto? necesito hablar con alguien, que no entiendo nada, tampoco quiero que vean mi ip y exijo que me den informacion rapida y eficaz 190.11.78.146 (talk) 18:20, 5 May 2020 (UTC)
@קיפודנחש
But what if a user doesn't want to write תוכן = תוכן each time --- must that user than use Lua/Scribunto?
peace, 49.230.98.142 (talk) 03:02, 6 May 2020 (UTC)

To clarify: Say the user only wants

* קריאה בלי שם{{הערה|בדיקה}}
* קריאה עם שם{{הערה|בדיקה|שם="שם רביעי"}}
* קריאה כפי שם{{הערה|שם="שם רביעי"}}

Such as in Hebrew Wikipedia where no תוכן = is used for a footnote's inner content and quote marks does indeed get used. 182.232.163.254 (talk) 05:28, 6 May 2020 (UTC)

i started writing a long and detailed answer, but it's like falling into the rabbit hole.
i'll tell you what i should have probably told you from the start: hewiki did not _always_ use lua. i tried to explain why it does now - it's done this way to save the users the need to add 1= in front of the content, in cases where the content itself contains =.
assuming this is no concern, my advice is to dig a bit in the history of the template on hewiki, find some version before lua, and use it. practically "by definition" this is what you want - a behavior as identical as possible to hewiki - you lose this small advantage of not having to worry about = in the cite content (this character tends to appear in URLs, which tend to appear in references, so the issue is not completely esoteric.
using a named parameter, תוכן= in my illustration, solve this problem in the standard/canonic way, without using scribunto, simple by using a named parameter. if you prefer hewiki compatibility, the best advice i can give you is to use hewiki template, and since you rather not depend on scribuntu, pick the latest historical version before scribuntu got involved, so this version (page was moved, soit's not exactly same name now, but this is it - at the time it was the template itself).
peace קיפודנחש (talk) 06:20, 6 May 2020 (UTC)
@קיפודנחש thanks; to prevent rabbit holes:
  1. I don't copy anything from Hebrew Wikipedia (not anything I didn't wrote myself at least and if so I recreate the footnotes) and I assume that no other user who seeks a similar solution would copy anything from either Hebrew Wikipedia or any other RTL WIkipedia.
  2. I understood that using 1= or תוכן = (or Lua/Scribunto) in case a footnote's content includes = , is not necessarily the only way to go and instead one could {{=}} template call which its template includes only = were that call is used inside footnote template calls which includes = signs (say in URLs), or at least thus I understood from the Stackoverflow topic "Passing an equal sign ('=') to a parameter in a MediaWiki template".
  3. At Hebrew Wikipedia's "תבנית:הערה" page I found a very short-lived history which starts with a reference to "תבנית:הערה/קוד".
In "תבנית:הערה/קוד" I found only first two versions by @Effib and @המתעתק and than I found @Yonidebest 's versions which include lots of advanced Wiki syntax (I wish I had a good book for that syntax near me because I most often find the documentation undidactic).
In my own MediaWiki website I currently have about 65 footnotes without תוכן = to which I would have to manually add תוכן = because I don't know to develop Wiki bots --- your opinion on how it is best to handle with this situation would be helpful to the masses. 182.232.163.254 (talk) 07:10, 6 May 2020 (UTC)

@קיפודנחש hello again; sadly, after caprice testing, I understand the template doesn't work; I have detailed everything for you below.

Template

{{#תנאי:{{{שם|}}}
|
  {{#tag:ref
    | 1 = {{{תוכן|}}}
  }}
|
  {{#tag:ref
    | 1 = {{{תוכן|}}}
    | name = {{{שם|}}}
  }}
}}

Template calls (nameless and named) are demonstrated in the tests below.

Tests

Testing page 1

בדיקה:הערה ללא שיום בעברית עם הקדמות לפרמטרים

* בדיקה ראשונה{{הערה|תוכן="בדיקה ראשונה"}}
* בדיקה שנייה{{הערה|תוכן="בדיקה שנייה"}}

==הערות שוליים==
{{הערות שוליים}}

Problems

  • Footnote numbers (links and list children) are all just [1] and 1, respectively.
  • Output (as much as I could copy):
1 = "בדיקה ראשונה" שגיאת ציטוט: תג <ref> בלתי־תקין; השם "" הוגדר מספר פעמים עם תוכן שונה

Testing page 2

בדיקה:הערה עם שיום בעברית עם הקדמות לפרמטרים

* קריאה בלי שם{{הערה|תוכן="בדיקה ראשונה"}}
* קריאה עם שם{{הערה|תוכן="בדיקה שנייה"|שם="שם"}}
* קריאה כפי שם{{הערה|שם="שם"}}

==הערות שוליים==
{{הערות שוליים}}

Problems

  • Footnote numbers aren't rendered correctly ([1], [2], [3] instead [1]. [2]. [2]).
  • In the list, appears a footnote number 3 although this one should not exist; rather, a reference to footnote number 2 should appear in superscript.

My humble request

Please opinion about what might cause the described problematic behavior in both cases. 182.232.32.46 (talk) 17:03, 10 May 2020 (UTC) i didn't analyze it too deeply, but the very first part is back assword.

you test for {{{שם}}}, and when exists, you don't use it, and when it does not exist, you do. it should look more like so:

{{#תנאי:{{{שם|}}}
|
  {{#tag:ref
    | 1 = {{{תוכן|}}}
    | name = {{{שם|}}}
  }}
|
  {{#tag:ref
    | 1 = {{{תוכן|}}}
  }}
}}


peace קיפודנחש (talk) 20:15, 10 May 2020 (UTC)

@קיפודנחש
I understand what went there now (man that syntax is sugary); thanks.
Now, in the context of clickable footnote numbers the code works fine.
But,
In the context of <ol> output there are the problems that everything starts with 1 = and is wrapped with double quote marks (") AND there is also an error in the second testing page:
Testing page 1
בדיקה:הערה ללא שיום בעברית עם הקדמות לפרמטרים
<ol> output:
  1. 1 = "בדיקה ראשונה"
  2. ^ 1 = "בדיקה שנייה"
Testing page 2
בדיקה:הערה עם שיום בעברית עם הקדמות לפרמטרים
<ol> output:
  1. 1 = "בדיקה ראשונה"
  2. ^ לקפוץ מעלה אל:2.0 2.1 1 = "בדיקה שנייה" שגיאת ציטוט: תג <ref>
In great plea, please kindly opinion what's going on there. 49.230.3.185 (talk) 07:03, 11 May 2020 (UTC)
The calls are the same as before 49.230.3.185 (talk) 07:08, 11 May 2020 (UTC)
Actually this is the full error I get in the second testing page:
שגיאת ציטוט: תג <ref> בלתי־תקין; השם "שם" הוגדר מספר פעמים עם תוכן שונה
49.230.3.185 (talk) 09:18, 11 May 2020 (UTC)
Okay, I have managed to remove the 1 = preliminaries by tags so to not include them in webpages where the template is called and the above error, disappeared.
But;
  • I still have double quotes around everything
  • I encounter the problem of [1].[2].[3] and 1,2,3 instead [1],[2] and 1,2 (in the second testing page) again 49.230.3.185 (talk) 09:27, 11 May 2020 (UTC)
For newcomers; I removed the 1 = preliminaries by <noinclude> tags (which have made them not to be included in all webpages besides the templates very webpage). 182.232.191.243 (talk) 15:18, 11 May 2020 (UTC)
@Bawolff in the comment above I tried to write
<noinclude>
Inside a single line code but got an empty computer code ( ) occurrence.
This might be a bug because I didn't have that problem with other HTML tags. 182.232.44.61 (talk) 06:37, 12 May 2020 (UTC)
Fixed that, those have to be included inside <nowiki></nowiki> tags. AhmadF.Cheema (talk) 09:15, 12 May 2020 (UTC)
To a large extent this discussion continues here and here:

Change font on some text

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.


Some friends of mine just started a new MediaWiki and we're getting things settled. I'm editing the main page but I want to change the font of a certain section and not the entire page. Is there any way I can do that? ENunn (talk) 03:53, 5 May 2020 (UTC)

Use HTML markup to define that section as a class, then set some CSS for that class. Malyacko (talk) 10:21, 5 May 2020 (UTC)
thanks ENunn (talk) 23:38, 5 May 2020 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

How to work in development mode?

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.34.0 I want to work in development mode so that ?action=purge query string would be automatically appended to ALL webpage, How could I achieve this? 182.232.3.127 (talk) 07:18, 5 May 2020 (UTC)

What is "development mode" and what makes you think that a "development mode" exists? Malyacko (talk) 10:20, 5 May 2020 (UTC)
Development mode for that matter is working with no caching at all.
My experience with other CMSs (in a vague recalling) brought me that term to mind.
This post further explain why I have ask this question.

182.232.3.127 (talk) 12:08, 5 May 2020 (UTC)
Perhaps it's best to change the headline of the current topic to:
How to automatically append ?action=purge query string to all URLs in my website?
And put the terminology "development mode" away. 182.232.3.127 (talk) 12:09, 5 May 2020 (UTC)
@Malyacko 182.232.3.127 (talk) 13:09, 5 May 2020 (UTC)
See is one of the solutions at this Topic work for you. AhmadF.Cheema (talk) 14:20, 5 May 2020 (UTC)
Instead of that, what you should do is to disable the caching in the first place. So you'd not even bother to purge it. You should start by setting the values of $wgMessageCacheType, $wgParserCacheType and $wgMainCacheType to CACHE_NONE. I am not sure whether that'll disable all caching completely, since there are many of them, but at least it may suffice for your case. – Ammarpad (talk) 14:30, 5 May 2020 (UTC)
Thank you both
@Ammarpad
I took a look at LocalSettings.php and found the following was already there:
## Shared memory settings
$wgMainCacheType = CACHE_NONE;
$wgMemCachedServers = [];
Although I have added the other two variables you mentioned to another chapter there, I just want to ask you,
Isn't it strange that the aforementioned code was already prevalent at LocalSettings.php? 182.232.3.127 (talk) 15:26, 5 May 2020 (UTC)
no, its the default for main cache type depending on what you choose during the installer. Bawolff (talk) 15:37, 5 May 2020 (UTC)
Thanks, can be marked as solved I guess. 49.230.98.142 (talk) 03:03, 6 May 2020 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Inline Query Datatables - Troubles with SMW 3.1.6?

I am running MediaWiki 1.34.1 and Semantic MediaWiki 3.1.6.

Running even simple inline queries with format=datatables is hit and miss, depending on the query, I will just get the busy indicator (the moving three dots).

I tried to replicate my situation here https://sandbox.semantic-mediawiki.org/wiki/Query_Datatable/Main, and it is worse (most times giving the busy indicator, occasionally the query works).

Is this just me or are other experiencing this as well? Sparkau (talk) 11:47, 5 May 2020 (UTC)

User Page

Can i make a personal private page that wont get removed Cfinch22 (talk) 21:32, 5 May 2020 (UTC)

There are no private pages; all is public. Content here should related to mediawiki development; see Project:About. Clump (talk) 22:03, 5 May 2020 (UTC)

Interactive query

Hello,

i'd like to display an interactive query for non logged users. I have some problems writing it and i'd like to know if you have any suggestion.

What i thought is to use Page Forms. The result that i'm looking for is like this one: http://discoursedb.org/wiki/Special:RunQuery/Item_query but it is written with Cargo syntax and i can't traslate it on a SMW syntax. If i have a property for each field that i want to ask, and each page below to the same category can i do it?

Thank you 95.249.157.132 (talk) 21:57, 5 May 2020 (UTC)

The only thing that i cannot traslate in SMW synthax is the condition of the template i guess. How can i write that when the field is equal to a property he must plot another property?
I tried as follows but didn't work: {#ask: [[Category:A]] [[Property A::{{{field A input}}}]] [[Property B::{{{field B input}}}]] |?Property C}
Any ideas? 95.249.157.132 (talk) 08:01, 7 May 2020 (UTC)

Why CommentStreams has conflict with File: ?

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


As I provided screenshot here: https://i.stack.imgur.com/Fkdr6.jpg Why CommentStreams appears next to the pdf thumbnail rather than below it? Isn't it a bug? Here is my usage:

<nowiki>

== Guide ==

[[File:TerraformingMars.pdf|page=1|thumb|right|راهنمای فارسی - سایت: بازی نوین، مترجم: نیما مسقدی]]

== Comments ==

<comment-streams/>

</nowiki>


Farvardyn (talk) 18:24, 6 May 2020 (UTC)

This seems to be a common issue with text floating around an image. Try to add an element that restores the text flow. This can be done by using visualClear-CSS-class that comes with MediaWiki. You can add it like this:
&lt;div class="visualClear"&gt;&lt;/div&gt;
== Comments ==
&lt;comment-streams/&gt;
You might want to put this into a wikitext template so it can easily be reused on different pages. Osnard (talk) 19:00, 6 May 2020 (UTC)
@Osnard: We have several hundreds pages. Is there an easy way to add this at the end of all main namespace pages by some feature like `replace text` or whatever?
Also as an admin I am not getting Comment notifications for pages I didn't watch. How is possible to get comment notification even for pages I am not watching as I am admin?

Farvardyn (talk) 19:45, 6 May 2020 (UTC)
You can probably use Extension:Replace Text to do this. Regarding the notification: I don't know CommentStreams very well. maybe @Cindy.cicalese can help. Osnard (talk) 14:29, 7 May 2020 (UTC)
I have responded to the questions at Extension talk:CommentStreams. There is not currently functionality in the extension for admins to be notified of all comments. Cindy.cicalese (talk) 14:43, 7 May 2020 (UTC)
@Cindy.cicalese @Osnard Thanks guys. As I am not good in regexp to use `Replace Text` extension, would you please give me the full `Replace Text` command to do so as you know my source code above? I highly appreciate it. Farvardyn (talk) 17:01, 7 May 2020 (UTC)
You do not need a regular expression. If all of your pages look as above, you could use Extension:Replace Text to replace
]]
== Comments ==
<comment-streams/>
with
]]
<div class="visualClear"></div>
== Comments ==
<comment-streams/>
Cindy.cicalese (talk) 17:52, 7 May 2020 (UTC)
@Cindy.cicalese As CommentStream is added to each page automatically, I did not use this!

]]
== Comments ==
<comment-streams/>
It seems I have to add it with css manually! :-( Farvardyn (talk) 18:28, 7 May 2020 (UTC)
As long as you insert the div in the web page before the place where CommentStreams puts its content, this will work, even though the CommentStreams content is generated dynamically. Cindy.cicalese (talk) 19:03, 8 May 2020 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Upgrade to 1.33/1.34/1.35 = missing pages

Site: https://www.lurkmore.com/view/Main_page

A huge amount of articles just give me "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." after upgrading. Hit "Random page" and you'll likely end up on an article that's fine.

If you had an account and hit "Edit" while logged in, you'd see "The revision #0 of the page named "Main page" does not exist.

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

Of course, the page hasn't been deleted so there's nothing there. View "History" and you get it telling you that there are "x pages" of revisions but they will not display. I have since used pretty much every maintenance script and nothing works.

Inside the DB, broken articles and working articles are all seemingly formatted in the same way. The text exists in the DB for broken ones just as it does in working ones. The maintenance script to check for pages tells me the pages exist. They just won't show up on the wiki itself.

I can revert to 1.32 with a backed up DB just fine, but attempting to upgrade fails every time in the same way.

I will note that I'm pretty sure all of the articles that don't work were modified more recently than the ones that do work. I'm pretty sure I narrowed the broken articles down to a certain point, in that articles from before that point are all fine. Like I said, though, the article structure seems to be the same in the DB for ones that do and don't work. 168.235.111.245 (talk) 19:50, 6 May 2020 (UTC)

try running cleanupUsersWithNoId.php (may have to run it before the upgrade step) Bawolff (talk) 15:50, 7 May 2020 (UTC)
I already said I've run every maintenance script. It doesn't matter at what step I run them. 168.235.111.245 (talk) 17:43, 7 May 2020 (UTC)
You said, "I have since used pretty much every maintenance script"... Jonathan3 (talk) 20:52, 7 May 2020 (UTC)
well update.php, migrateComments.php, migrateActors.php and cleanupUsersWithNoId.php are the relavent ones. When you ran them did they run siccesfully, was error messages or warnings outputted? Bawolff (talk) 01:19, 8 May 2020 (UTC)
They ran and did the things they do. They added some prefixed users and completed. The affected articles have nothing to do with those user accounts. 168.235.111.245 (talk) 12:30, 8 May 2020 (UTC)
Dumping pages using the maintenance script does not dump the "missing" pages. I can view the text content of the pages in the database. Whatever the software does to display the pages is also the method the maintenance script is using to dump them. At this point, I'm going to have to go through the DB to get the text and "create" the missing pages one by one. 168.235.111.245 (talk) 01:55, 10 May 2020 (UTC)
Doing it again and ensuring it's running properly with the old DB, the revisions are there in the dump, and MediaWiki 1.35 even recognizes it, yet it refuses to import the revisions with a result along the lines of "content already exists or errors during import". 168.235.111.245 (talk) 04:04, 10 May 2020 (UTC)
Would it be possible to install MediaWiki again, and write a script taking the latest revision of each page directly from the old database and create pages in the new wiki using the MediaWiki API?
In the past I had a malfunctioning extension that prevented the job queue from categorising any pages saved while the extension was present. I had to upgrade the extension to a non-buggy version and then run the relevant maintenance scripts. I wonder if something similar happened to you to cause your problem for the recent pages. Maybe an extension or customisation is using a function that’s been removed in MW1.33 or something like that. Jonathan3 (talk) 07:59, 12 May 2020 (UTC)
can you check that referential integrity is correct for the pages in question (i.e. find the entry in page table, check that page_latest points to a valid rev_id in revision table. For that row, verify that rev_actor points to a valid actor_id row in actor table and rev_comment_id points to a valid row in comment table) Bawolff (talk) 20:40, 14 May 2020 (UTC)
Are there any fixes for this issue? I've just encountered the exact same problem. 131.215.251.79 (talk) 19:24, 15 January 2021 (UTC)
i am also seeing the same issue. i have run the maintenance scripts and the upgrade shows no error. i see that the revid seems to be somehow mis-assigned by the upgrade process. 1.32 works fine. 1.33 does not work - lot of pages show this behavior. 2601:86:300:833:5B3:540D:9424:F93D (talk) 18:07, 7 February 2021 (UTC)
Additional diagnostics -
  1. In 1.32, ran cleanupUsersWithNoId.php : fixed the errors by reassigning edits.
  2. In Localsettings.php, set $wgActorTableSchemaMigrationStage=SCHEMA_COMPAT_WRITE_BOTH | SCHEMA_COMPAT_READ_NEW;
  3. Reran update.php . Wiki and all pages continue to work fine.
  4. Updated to 1.33, but get the error as described in Project:Support desk/Flow/2019/03#h-Mediawiki_RevisionAccessException-2019-03-12T20:59:00.000Z
  5. Restore database and files to 1.32
  6. Rerun 2 and 3 but with $wgActorTableSchemaMigrationStage=SCHEMA_COMPAT_WRITE_BOTH | SCHEMA_COMPAT_READ_OLD;
  7. update to 1.33 . Get the issue described in this thread.
  8. Repeating the multiple times seems to move the error around to different pages. not sure why. 2601:86:300:833:5B3:540D:9424:F93D (talk) 20:26, 7 February 2021 (UTC)

Accessing LocalSettings.php on MediaWiki Ubuntu 18.04 by Symetricore

I trying to edit the LocalSettings.php file on MediaWiki Ubuntu 18.04 by Symetricore.


Specifically, I need to update the $wgServer


thanks

Zach 173.79.11.186 (talk) 20:31, 6 May 2020 (UTC)

It is unclear what your question is. You don't know how to edit the file? How to download the file to edit? How to put the file back up? Do you have FTP access to download the LocalSettings.php file? Before editing it, know that it's a good idea to always keep a copy of the last working version to restore in case anything goes wrong after your edit. TiltedCerebellum (talk) 03:02, 7 May 2020 (UTC)

Export/Import User Preferences

I have set some preferences across the Wikimedia MediaWiki suite, but e.g. the OpenStreetMap Wiki also uses MediaWiki. Can I somehow export my preferences and import them there? I don't fancy manually configuring everything on all the MediaWikis I am registered in... Xerus2000 (talk) 23:35, 6 May 2020 (UTC)

Where can I fix the skin?

Where can I fix the skin? I need to remove one link in the skin, but I don’t know in which file this can be done.

Skin: Minerva

Thanks. 77.35.133.23 (talk) 01:32, 7 May 2020 (UTC)

*The link below on the main page (where the footer is usually located).
*Mediawiki: 1.31 77.35.133.23 (talk) 01:34, 7 May 2020 (UTC)
no more questions (not solved but i found another way) 5.143.24.205 (talk) 02:53, 7 May 2020 (UTC)
It is probably best not to edit theme files directly as these changes will get wiped out on update.
Would hiding it with CSS achieve what you want? If so you can use your browser's web inspector to find the closest element class or id and adding a css rule for it with display:none in the Mediawiki:Minerva.css file. Much easier than editing theme files. Each skin gets its own css override file located in the Mediawiki Namespace, if it doesn't exist it can be created. TiltedCerebellum (talk) 02:58, 7 May 2020 (UTC)

1.34.1 JS in template used in 2nd template won't work

Strange issue, was fine in MW 1.33, just upgraded a test site to 1.34. I have a simple javascript countdown in the mediawiki namespace with days, minutes, hours, seconds displayed, it is used in template1 and it displays fine when that template is embedded into pages, but and when template1 is used in template 2 (displays fine in the template) and then template 2 is used in a page, the countdown no longer works. I don't quite understand why it would be the case, has something changed in 1.34 that affects how templates work with javascript?

The javascript is from https://dev.fandom.com/wiki/Countdown TiltedCerebellum (talk) 04:42, 7 May 2020 (UTC)

How to properly Install MediaWiki on Fedora 32 (Or Fedora 3x)

Good day,

I have tried to install Wikimedia on Fedora 32 (and 31 too) with MariaDB. , always to stumble on something not working. (close to the end).

Many posted here and there the same difficulties. Fedora/RedHat is a very popular Linux distro, usually very good.

The issue is probably some level of permissions.


The ideal (most simple) way should be # dnf install mediawiki

Or a similar dnf command using "group install" etc...

Could you look at this and at least document a valid manual install, then an properly working package install? (using Fedora package installer dnf).


Thanks for the attention.

Andre Gompel Agompel (talk) 15:57, 7 May 2020 (UTC)

@Agompel Hi, it is impossible to improve something if there is zero information about what is not working. Hence statements like "many posted here" make no sense (yet)... If there are problems then please explain what the problems are.
Also, for packages for random Linux distributions, please talk to the packagers of those Linux distributions. Thanks! Malyacko (talk) 10:13, 8 May 2020 (UTC)
  1. install media-wiki, httpd and mariadb
" sudo dnf install -y httpd mariadb-server php php-pear php-xml php-intl php-pecl-zendopcache php-gd php-mbstring ImageMagick-perl media-wiki "
2. start httpd and mariadb services
"sudo systemctl enable --now httpd"
"sudo systemctl enable --noew mariadb"
3. copy basic wiki template to /var/www/html folder ( fix the permissions and selinux if needed )
"cp -a /var/www/wiki/ /var/www/html" 201.17.156.193 (talk) 00:32, 25 May 2020 (UTC)
after that access in your browser:
localhost
here u can see if your apache server is running
localhost/wiki
your wikimedia basic setup 201.17.156.193 (talk) 00:33, 25 May 2020 (UTC)
Please feel free to improve Manual:Running MediaWiki on Fedora. Malyacko (talk) 11:16, 5 June 2020 (UTC)
Hi, I am new to mediawiki and perhaps I am missing something but there seems to be a gap between where you `dnf install mediawiki` and actually have an instance running.
Do I need to symlink files installed by dnf into /var/www/html/? Or do I need to do some other steps? This is unclear to me and every readme I've read so far seems to speak about downloading a separate tar (then what's the point of the mediawiki package?) or neglects to mention it. I'd be happy to update the provided wiki page if I can figure out how to stand up a mediawiki instance on fedora :) Nolski federation (talk) 16:39, 2 July 2020 (UTC)

DB Index at startup of mediawiki

I am running wikibase on a k8s cluster. I am experiencing long startup times of mediawiki due to database indexing. Currently I have about 20k items in the db and startup times are around 15 minutes. As more is added to the db startup times are only get longer. Is there a way to speed up the indexing process or some other alternative? Headingtona (talk) 17:12, 7 May 2020 (UTC)

what do you mean by db indexing here? Are you recreating the database on every startup? Why? Bawolff (talk) 15:53, 8 May 2020 (UTC)
We found the source of the issue. Its in entrypoint.sh. Lines 42 to 44 run the script extra-install.sh. In this script are 3 php commands that are doing the indexing for the elastic search.
These are the commands that were causing the issue.
php /var/www/html/extensions/CirrusSearch/maintenance/updateSearchIndexConfig.php && php /var/www/html/extensions/CirrusSearch/maintenance/forceSearchIndex.php --skipParse && php /var/www/html/extensions/CirrusSearch/maintenance/forceSearchIndex.php --skipLinks --indexOnSkip Headingtona (talk) 13:42, 18 May 2020 (UTC)

Section 508 Compliance

Does MediaWiki produce sites that are compliant with Section 508 of the Rehabilitation Act (United States)? (Basically, are sites compliant to users with disabilities that use screen readers and other adaptive tools?)

Is there additional editing that a user has to do in order to make pages compliant? 156.75.252.6 (talk) 17:32, 7 May 2020 (UTC)

we generally try and make mediawiki accessible, however you will have to assess yourself if mediawiki complies with relavent regulations. Bawolff (talk) 01:17, 8 May 2020 (UTC)
I have tried to work on that sort of thing, to help get MediaWiki more easily certified for use in US federal government agencies. It's not complete or good but I did start. See VPAT for MediaWiki and follow up with me if you wish. It should be possible to get a work group together to get it done. Econterms (talk) 17:56, 21 May 2020 (UTC)

Getting multiple (3 times) authentication requests by .htaccess

Hi,

when entering the URL of the wiki, it asks three times for the login data by my .htaccess and .htpasswd, it should only once.

I first thought because of the logo file, but editing the LocalSettings.php Manual:$wgLogo nothing changed.

What other reasons could cause it? Or what to do, to find it out? Thank you. Easterevening (talk) 22:03, 7 May 2020 (UTC)

When deleting the image file under /resources/assets/wiki.png the multiple (3 times) login requests by .htaccess is solved. Now logo. in my LocalSettings.php is working. Thank you. Easterevening (talk) 09:19, 8 May 2020 (UTC)
It seems not completely solved. Now the authentication window appeared two times. It looks connected with loading the logo.png file? What else to do? Thanks. Easterevening (talk) 13:34, 8 May 2020 (UTC)
this is more a question for an apache support form. Are you using different realms or something gor different resources, or are they on different domains? Bawolff (talk) 15:52, 8 May 2020 (UTC)
MediaWiki 1.34.1
Everything is under mydomain.com/wiki/
After first authentication window the wiki site appears, but without the logo. Than it needs to confirm a second authentication window and than also the logo appears in left upper corner..
I us in LocalSettings.php this:
$wgLogo = $wgScriptPath . '/images/mylogo.png';
as mentioned "below the definition of $wgScriptPath!"
Now, I was putting the original mediawiki logo under /resources/assets/wiki.png
Than the authentication window appears again three times. Even when I rename it to wiki.png_not
Only when I rename also the logo under '/images/mylogo.png_not, so no logo is showing in left upper corner, the authentication window appears only two times. I wonder, still two times Thanks. Easterevening (talk) 21:30, 9 May 2020 (UTC)
I did ask - as suggested - in Apache forum too: https://www.apachelounge.com/viewtopic.php?t=8485 Easterevening (talk) 13:57, 11 May 2020 (UTC)

APL Error

I am attempting to upload an image to my page, but keep receiving this error. All of the images in question are .pngs.


This is the error that I keep receiving. 167.96.136.165 (talk) 03:40, 8 May 2020 (UTC)

You need to have the writeapi to do this Taavi (talk!) 08:37, 8 May 2020 (UTC)

fork failed - Resource temporarily unavailable in LuaStandaloneEngine.php on line 269

PHP Warning: proc_open(): fork failed - Resource temporarily unavailable in xxxxx/extensions/Scribunto/includes/engines/LuaStandalone/LuaStandaloneEngine.php on line 269


any help pls 2001:8F8:1E23:F77E:10C6:8350:CCF7:8BB8 (talk) 06:43, 8 May 2020 (UTC)

Any context, steps to reproduce, version information please? Malyacko (talk) 10:05, 8 May 2020 (UTC)
please visit here: 3rabica.com, debug toolbar is enabled 2001:8F8:1E23:F77E:4DC9:2784:6279:F623 (talk) 10:49, 8 May 2020 (UTC)
@Malyacko please visit here: 3rabica.com, debug toolbar is enabled 2001:8F8:1E23:F77E:4DC9:2784:6279:F623 (talk) 10:57, 8 May 2020 (UTC)
thank you, i solved the issue 2001:8F8:1E23:F77E:4DC9:2784:6279:F623 (talk) 13:04, 8 May 2020 (UTC)
Then please share with other people HOW you solved the issue Malyacko (talk) 22:59, 8 May 2020 (UTC)

Indexing Wrong Name

Hello Team

I have a concern regarding wikipedia profile which is not showing accurate at Google results. Can you explain why it is happening and what I have to do. My wikipedia search term is Muneeb M. Mushtaq.


Above shared search term when we search then a place name showing in the search engine results. 2409:4055:61C:E4AA:181D:7B64:82EE:BB1D (talk) 06:54, 8 May 2020 (UTC)

You're at the wrong place, see Project:MediaWiki is not Wikipedia. If this is about the English Wikipedia, the correct place would be w:en:Wikipedia:Contact us. Taavi (talk!) 08:34, 8 May 2020 (UTC)

Reset mail!

I try to reset my password. Have only my e-mail adress. No username. I don't resev reset mail.

What's happening?

SaK 88.91.244.113 (talk) 08:01, 8 May 2020 (UTC)

If you don't receive an email then you have to contact whoever is running that website that you are talking about (and have not mentioned yet). Malyacko (talk) 09:59, 8 May 2020 (UTC)

Cannot bind to LDAP

Hi,


i have a problem setting up MediaWiki with LDAP Support. Whatever i tried, LDAP doesn't "talk" to my MediaWiki.

I don't know, if i did something wrong or if i forgot something. Is there anybody who can help?


This ist my localsettings.php:


// Safe IP or not (for bypassing external login via AD)

$safeIPs = array('127.0.0.1','localhost');

$ipsVars = array('HTTP_X_FORWARDED_FOR','HTTP_X_REAL_IP','REMOTE_ADDR');

foreach ($ipsVars as $ipsVar) {

if (isset($_SERVER[$ipsVar]) && mb_strlen($_SERVER[$ipsVar]) > 3 ) { $wikiRequestIP = $_SERVER[$ipsVar]; break; }

}

$wikiRequestSafe = (isset($wikiRequestIP) && ( in_array($wikiRequestIP,$safeIPs) ));

// Create Wiki-Group 'engineering' from default user group

$wgGroupPermissions['engineering'] = $wgGroupPermissions['user'];

// Private Wiki. External LDAP login. Default NS requires login.

$wgEmailConfirmToEdit = false;

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

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

$wgGroupPermissions['*']['createaccount'] = false;

$wgGroupPermissions['sysop']['createaccount'] = false;

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

$wgBlockDisablesLogin = true;

// Load LDAP Config from JSON

$ldapJsonFile = "$IP/ldapprovider.json";

$ldapConfig = false;

if (is_file($ldapJsonFile) && is_dir("$IP/extensions/LDAPProvider")) {

  $testJson = @json_decode(file_get_contents($ldapJsonFile),true);

  if (is_array($testJson)) {

   $ldapConfig = true;

  } else {

   error_log("Found invalid JSON in file: $IP/ldap.json");

  }

}

// Activate Extension

if ( $ldapConfig ) {

  wfLoadExtension( 'PluggableAuth' );

  wfLoadExtension( 'LDAPProvider' );

  wfLoadExtension( 'LDAPAuthentication2' );

  wfLoadExtension( 'LDAPAuthorization' );

  wfLoadExtension( 'LDAPUserInfo' );

  wfLoadExtension( 'LDAPGroups' );

  $LDAPProviderDomainConfigs = $ldapJsonFile;

  $wgPluggableAuth_ButtonLabel = "Log In";

  if ($wikiRequestSafe) { $LDAPAuthentication2AllowLocalLogin = true; }

}

error_reporting( -1 );

ini_set( 'display_errors', 1 );

$wgShowExceptionDetails = true;


And my ldapprovider.json looks like this:

{

   "XXX.XX": {

       "connection": {

           "server": "xxx.xxx.xx",

           "user": "CN= xxxx Ldap,OU=No GPO,OU=Spz,OU=Usr,OU=Auth,DC=xxx,DC=xx",

           "pass": "xxxxxxx",

           "port":"389",

           "enctype":"clear",

           "basedn": "dc=xxx,dc=xx",

           "groupbasedn": "dc=xxx,dc=xx",

           "userbasedn": "dc=xxx,dc=xx",

           "searchattribute": "samaccountname",

           "searchstring": "USER-NAME",

           "usernameattribute": "samaccountname",

           "realnameattribute": "cn",

           "emailattribute": "mail"        

       }

   }

}


Thanks for Help! BCaemmerer (talk) 08:51, 8 May 2020 (UTC)

@BCaemmerer Which MediaWiki version is this about? Is an LDAP MediaWiki extension being used? Malyacko (talk) 09:58, 8 May 2020 (UTC)
Version Mediawiki 1.34.1
PHP 7.2.11
MariaDB 10.3.17
CentOS 8
Installed Extensions
LDAPAutehntication2
LDAPAuthorization
LDAPGroups
LDAPProvider
LDAPUserInfo
PlugableAuth
Every Plugin in the current Version.

BCaemmerer (talk) 11:52, 8 May 2020 (UTC)
Hey! I still have the same trouble with my configuration. I deleted everything and started with a new attemp. I strictly did the things in the manual to configure everything right, but still with no success.
I hope someone can help me! I'm trying to configure. I installed the necessary Plugins:
MediaWiki 1.34.1
PHP 7.2.11 (fpm-fcgi)
MariaDB 10.3.17-MariaDB
LDAPAuthentication2 1.0.1
LDAPAuthorization 1.1.0
LDAPProvider 1.0.4
PluggableAuth 5.7
I configured it with this json-File:
{
"test.de": {
"connection": {
"server": "server.test.de",
"port" : "389",
"user": "cn=******,ou=no gpo,ou=spz,ou=usr,ou=auth,dc=test,dc=de",
"pass": "******",
"enctype": "clear",
"options": {
"LDAP_OPT_DEREF": 1
},
"basedn": "DC=test,DC=de",
"binddn": "DC=test,DC=de",
"groupbasedn": "DC=test,DC=de",
"userbasedn": "DC=test,DC=de",
"searchattribute": "sAMAccountName",
"searchstring": "TEST\\USER-NAME",
"usernameattribute": "sAMAccountName",
"realnameattribute": "cn",
"emailattribute": "mail"
},
"userinfo": [],
"groupsync": []
}
}
My localSettings looks like this:
# Berechtingung zum Einloggen über exterene Authentifizierung
$wgGroupPermissions['*']['autocreateaccount'] = true;
# als erstes wird PlugableAuth angebunden
wfLoadExtension( 'PluggableAuth' );
# $wgPluggableAuth_EnableAutoLogin = true;
# $wgPluggableAuth_EnableLocalLogin = true;
# LDAPProvider
$LDAPProviderDomainConfigs = "/etc/mediawiki/ldapprovider.json";
wfLoadExtension( 'LDAPProvider' );
wfLoadExtension( 'LDAPAuthorization' );
wfLoadExtension( 'LDAPAuthentication2' );
$LDAPAuthentication2AllowLocalLogin = true;
# $LDAPAuthentication2UsernameNormalizer = true;
$wgShowExceptionDetails = true;
$wgShowSQLErrors = true;
$wgShowDBErrorBacktrace = true;
When i try to connect to LDAP via the maintenace-Tools from LDAPProvider "CheckLogin" and "ShowUserInfo" everything seems to be fine. When i go to the Loginpage of my MediaWiki, the first look is good. There is a login-Form with a Dropdown to choose my Domain or Locallogin. Locallogin works fine. But the login with my Domain credentials gives this Error:
[Xw8bEmunzqHDU7iHR4WlBgAAAEk] /mediawiki/index.php?title=Spezial:PluggableAuthLogin MWException from line 168 of /var/www/html/mediawiki/extensions/LDAPProvider/src/Client.php: Could not bind to LDAP: (-1) Can't contact LDAP server
Backtrace:
#0 /var/www/html/mediawiki/extensions/LDAPProvider/src/Client.php(91): MediaWiki\Extension\LDAPProvider\Client->establishBinding()
#1 /var/www/html/mediawiki/extensions/LDAPProvider/src/Client.php(328): MediaWiki\Extension\LDAPProvider\Client->init()
#2 /var/www/html/mediawiki/extensions/LDAPAuthentication2/src/PluggableAuth.php(81): MediaWiki\Extension\LDAPProvider\Client->canBindAs(string, string)
#3 /var/www/html/mediawiki/extensions/PluggableAuth/includes/PluggableAuthLogin.php(31): MediaWiki\Extension\LDAPAuthentication2\PluggableAuth->authenticate(NULL, string, NULL, NULL, NULL)
#4 /var/www/html/mediawiki/includes/specialpage/SpecialPage.php(575): PluggableAuthLogin->execute(NULL)
#5 /var/www/html/mediawiki/includes/specialpage/SpecialPageFactory.php(611): SpecialPage->run(NULL)
#6 /var/www/html/mediawiki/includes/MediaWiki.php(296): MediaWiki\Special\SpecialPageFactory->executePath(Title, RequestContext)
#7 /var/www/html/mediawiki/includes/MediaWiki.php(900): MediaWiki->performRequest()
#8 /var/www/html/mediawiki/includes/MediaWiki.php(527): MediaWiki->main()
#9 /var/www/html/mediawiki/index.php(44): MediaWiki->run()
#10 {main}
I absolutely have no further idea, what could be wrong and what i could try. I hope there is someone out there, who could help!
Thank you and greetings
Björn BCaemmerer (talk) 10:35, 16 July 2020 (UTC)

Translate on Chrome

Hi, I have added MediaWiki Language Extension Bundle to my Wiki, If I open it on Internet Explorer it works,

If I open in Chrome I get "This tool does not work without JavaScript. JavaScript is disabled, failed to work, or this browser is unsupported."

But I can see on the mediawiki.org site that it has translation. Is there something I am doing wrong or am missing?

Kind Regards

Ben BensDBN (talk) 08:54, 8 May 2020 (UTC)

@BensDBN What is "it" in "if I open it"? How do you open a complete bundle in some browser? Clearer steps to reproduce welcome. Also, which MediaWiki version is this about? Malyacko (talk) 09:57, 8 May 2020 (UTC)
@Malyacko I downloaded MediaWiki Language Extension Bundle and followed the installation steps provided.
MediaWiki Language Extension Bundle
My intention is to translate our English Wiki into French, we have a private wiki and we only have English and French users.
I have done a test page and wrapped my content with <translate></translate>.
On Chrome I am able to mark the page for Translation but when I go to translate the page I get the error: "This tool does not work without JavaScript. JavaScript is disabled, failed to work, or this browser is unsupported."
However if I click translate translate the page in Internet Exporer, it works.
On Chrome I get the same error when i browse to "index.php?title=Special:Translate"
The interesting thing though is that on Internet Exporer I can see the language name and language symbol at the top right of the screen (next to log in) Yet on chrome I dont see that.
In the page settings on Chrome Javascript is enabled.
I hope this helps. BensDBN (talk) 11:58, 8 May 2020 (UTC)
MediaWiki version 1.34.1 BensDBN (talk) 12:52, 8 May 2020 (UTC)
check browser javascript console for errors.
Also, do you mean edge? Because internet explorer is really old and may just be too old for this extension Bawolff (talk) 15:48, 8 May 2020 (UTC)
There is only one error repeated in the console:
load.php?lang=en&modules=startup&only=scripts&raw=1&skin=vector:12 Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'self' 'unsafe-eval'". Either the 'unsafe-inline' keyword, a hash ('sha256-...='), or a nonce ('nonce-...') is required to enable inline execution.
domEval @ load.php?lang=en&modules=startup&only=scripts&raw=1&skin=vector:12
No I havent tried Edge, We only use Chrome but on Internet Explorer it works fine. Its just Chrome that it isnt working. BensDBN (talk) 06:34, 12 May 2020 (UTC)
An update on this. I still havent found a resolution. But something i have noticed is i get the prompt to switch on visual editor on internet explorer. Whereas i havent been able to get that to work on Chrome. There is definetly something blocking extensions from running in Chrome. BensDBN (talk) 13:50, 1 June 2020 (UTC)

How to escape vertical lines (|) in templates?

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 an RTL (Hebrew) 1.34.0 MediaWiki website in which I present single-line code (inside-passage code) via the following template:
<includeonly><code>{{{1}}}</code></includeonly><noinclude>

To that template I call with:
{{קחש|CONTENT}}
קחש means "קוד חד שורתי" which means "single-lined-code" and that single lined code has its own special default CSS (per <code> tag). Here is something I have tried and failed:
{{קחש||}}
I basically tried to print a vertical line styled in code formatting (via <code> tag available from the template).

And yet what I got was an empty call output.

What is the best way to solve it (without Lua/Scribunto)?

A plausible question might be: How to escape vertical lines (|) in templates? 49.230.109.64 (talk) 09:18, 8 May 2020 (UTC)

What was helpful for me was to use {{!}} inside my template call and it was parsed as a vertical line (|).
I don't know if it does with that but I use ParserFunctions extension (after loading it "as is" in LocalSettings.php). 49.230.109.64 (talk) 11:17, 8 May 2020 (UTC)
That's the normal way to do it and it's part of the core. So it'll work on any wiki by default. It has no relation with ParserFunctions extension. – Ammarpad (talk) 15:59, 8 May 2020 (UTC)
Thanks; I think it's good to soon mark as solved. 49.230.109.64 (talk) 03:30, 9 May 2020 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Why ContactPage isn't part of core?

As far as I understand, being able to contact a site owner via a minimal contact form (name, email, and maybe also phone as optional) is part of international accessibility guidelines (for example, to report accessibility problems).

So,

Why ContactPage isn't part of core? 49.230.109.64 (talk) 10:35, 8 May 2020 (UTC)

Is there some accessibility authority in the community to tag here? 49.230.109.64 (talk) 15:23, 8 May 2020 (UTC)
Special:emailuser is part of core and allows contact if you have a valid email. ContactPage can be a spam magnet so we dont want it setup unless the system administrator knows what they are doung and is prepared for that. Bawolff (talk) 15:45, 8 May 2020 (UTC)
@Bawolff AFAIK Special:emailuser requires registration but as we both know, not all users want to register; I personally avoid registering almost any website if I can (and avoid "log in with" maximally also).
So, I think Special:emailuser is not an accessible solution as long it doesn't allow anonymous users to send (dignified) emails.
I humbly opinion that that uniting both projects and strengthening anti spam mechanisms in ContactPage might be the best way to solve that problem. 49.230.109.64 (talk) 03:22, 9 May 2020 (UTC)
its very unlikey we will do that. Bawolff (talk) 03:43, 9 May 2020 (UTC)
@Bawolff without intention to be annoying I ask; even if the current state violates a possible international standard for web accessibility by W3C? 49.230.109.64 (talk) 07:34, 9 May 2020 (UTC)
If you're not happy with how MediaWiki is packaged, you're free to not use it. You can also fork it and add/remove whatever you like. You question has already been answered. – Ammarpad (talk) 10:39, 9 May 2020 (UTC)
@Ammarpad You are free for that too and you can also do that too (here, I have exampled why writing this was rude and redundant). I disagree with the opinion that my question was already answered and I urge other community members not to be biased in any way from what you wrote. 49.230.109.64 (talk) 11:21, 9 May 2020 (UTC)
i believe most of users are more concerned with the spam potential, then complying with that particular standard, and there are other more common methods for getting feedback such as talk pages or providing a contact email.
If we noticed like 90% of mediawiki sites using that extension we might consider merging into core, but as of right now its not super popular. The extension exists and is easy to install for anyone who wants it. Bawolff (talk) 17:10, 9 May 2020 (UTC)
@Bawolff this data was helpful and insightful for me. Thank you for this ! 49.230.109.64 (talk) 18:03, 9 May 2020 (UTC)

Templatestyle Extension missing /vendor directory

I was trying to import a template when an internal error occurred saying this:

"....extensions/TemplateStyles/includes/TemplateStylesContent.php: Class 'Wikimedia\CSS\Parser\Parser' not found."

I looked up this error and find Extension talk:TemplateStyles/2018#h-How_to_do-2018-09-16T19:44:00.000Z to describe almost the exact issue of mine. However, the solution it suggested (to manually add a directory called 'vendor' ) does not work. I downloaded several past versions of template styles extension from extension distributor, but I found no /vendor directory. Could anyone share that catalog? Luceatx (talk) 10:45, 8 May 2020 (UTC)

Version info: Mediawiki 1.34.1; Templatestyles Extension 1.0 Luceatx (talk) 10:52, 8 May 2020 (UTC)
can you just run composer install from the commandline in the TemplateStyles directory? Bawolff (talk) 15:42, 8 May 2020 (UTC)
@Bawolff Can't, in a shared hosting. Tried to install PHP shell for a local environment, still doesn't work somehow, because the permission to root is somewhat restricted. Thus copying and pasting the files is only way to install missing dependencies for me. Luceatx (talk) 00:33, 9 May 2020 (UTC)
you should be able to get a vendor directory from https://github.com/wikimedia/mediawiki-vendor/ (that's meant to replace the vendor directory in mediawiki core. It should fix it for templateStyles too. Be sure to use the branch that corresponds to your version of mediawiki) Bawolff (talk) 01:07, 9 May 2020 (UTC)
@Bawolff Thanks, but unfortunately it still doesn't work. What I did was I downloaded the entire folder from the given link (chose the v.1.34 branch), and replace the original /vendor directory under my wiki folder with the new one. However, the exact same error recurred.
Probably it does not include the necessary dependencies for TemplateStyles? There is though a difference between the size of original /vendor and the /vendor from github, but was minor, only 0.6mb. Luceatx (talk) 09:39, 9 May 2020 (UTC)
Oh weird. Its not included in REL1_34. Try adding just the Wikimedia/css-sanitizer folder from the master branch
https://github.com/wikimedia/mediawiki-vendor/tree/master/wikimedia/css-sanitizer (ensuring to put it in vendor/wikimedia/css-sanitizer )
You can also check in special:version which vendor libraries are succesfully installed. Bawolff (talk) 17:18, 9 May 2020 (UTC)
@Bawolff Looks like you cannot add an external library manually like that. After doing what you said, mediawiki/css-canitizer still doesn't show up in my Special:Version. Or is it that libraries from master branch is not compatible with my v.1.34 Mediawiki?
Library Version License Description Authors
christian-riesen/base32 1.3.2 MIT Base32 encoder/decoder according to RFC 4648 Christian Riesen
composer/semver 1.5.0 MIT Semver library that offers utilities, version constraint parsing and validation. Nils Adermann, Jordi Boggiano and Rob Bast
cssjanus/cssjanus 1.3.0 Apache-2.0 Convert CSS stylesheets between left-to-right and right-to-left. Trevor Parscal, Roan Kattouw and Timo Tijhof
guzzlehttp/guzzle 6.3.3 MIT Guzzle is a PHP HTTP client library Michael Dowling
guzzlehttp/promises 1.3.1 MIT Guzzle promises library Michael Dowling
guzzlehttp/psr7 1.5.2 MIT PSR-7 message implementation that also provides common utility methods Michael Dowling and Tobias Schultze
jakobo/hotp-php 1.0.1 BSD-3-Clause HOTP simplifies One Time Password systems for PHP Authentication Jakob Heuser
liuggio/statsd-php-client 1.0.18 MIT Statsd (Object Oriented) client library for PHP Giulio De Donato
oojs/oojs-ui 0.34.1 MIT Provides library of common widgets, layouts, and windows. Bartosz Dziewoński, Ed Sanders, James D. Forrester, Kirsten Menger-Anderson, Kunal Mehta, Prateek Saxena, Roan Kattouw, Rob Moen, Timo Tijhof and Trevor Parscal
pear/console_getopt 1.4.2 BSD-2-Clause More info available on: http://pear.php.net/package/Console_Getopt Greg Beaver, Andrei Zmievski and Stig Bakken
pear/mail 1.4.1 BSD-2-Clause Class that provides multiple interfaces for sending emails. Chuck Hagenbuch, Richard Heyes and Aleksander Machniak
pear/mail_mime 1.10.2 BSD-3-clause Mail_Mime provides classes to create MIME messages Cipriano Groenendal and Aleksander Machniak
pear/net_smtp 1.8.1 BSD-2-Clause An implementation of the SMTP protocol Chuck Hagenbuch and Jon Parise
pear/net_socket 1.2.2 PHP License More info available on: http://pear.php.net/package/Net_Socket Chuck Hagenbuch, Aleksander Machniak and Stig Bakken
pear/pear-core-minimal 1.10.9 BSD-3-Clause Minimal set of PEAR core files to be used as composer dependency Christian Weiske
pear/pear_exception 1.0.0 BSD-2-Clause The PEAR Exception base class. Helgi Thormar and Greg Beaver
pleonasm/bloom-filter 1.0.2 BSD-2-Clause A pure PHP implementation of a Bloom Filter Matthew Nagi
psr/container 1.0.0 MIT Common Container Interface (PHP FIG PSR-11) PHP-FIG
psr/http-message 1.0.1 MIT Common interface for HTTP messages PHP-FIG
psr/log 1.0.2 MIT Common interface for logging libraries PHP-FIG
ralouphie/getallheaders 2.0.5 MIT A polyfill for getallheaders. Ralph Khattar
wikimedia/assert 0.2.2 MIT Provides runtime assertions Daniel Kinzler
wikimedia/at-ease 2.0.0 GPL-2.0-or-later Safe replacement to @ for suppressing warnings. Tim Starling and MediaWiki developers
wikimedia/avro 1.9.0 Apache-2.0 A library for using Apache Avro with PHP. Michael Glaesemann, Andy Wick, Saleem Shafi, A B, Doug Cutting and Tom White
wikimedia/base-convert 2.0.0 GPL-2.0-or-later Convert an arbitrarily-long string from one numeric base to another, optionally zero-padding to a minimum column width. Brion Vibber and Tyler Romeo
wikimedia/cdb 1.4.1 GPL-2.0+ Constant Database (CDB) wrapper library for PHP. Provides pure-PHP fallback when dba_* functions are absent. Daniel Kinzler, Tim Starling, Chad Horohoe and Ori Livneh
wikimedia/cldr-plural-rule-parser 1.0.0 GPL-2.0+ Evaluates plural rules specified in the CLDR project notation. Tim Starling and Niklas Laxström
wikimedia/composer-merge-plugin 1.4.1 MIT Composer plugin to merge multiple composer.json files Bryan Davis
wikimedia/html-formatter 1.0.2 GPL-2.0-or-later Performs transformations of HTML by wrapping around libxml2 and working around its countless bugs. MediaWiki contributors
wikimedia/ip-set 2.1.0 GPL-2.0-or-later Efficiently match IP addresses against a set of CIDR specifications. Brandon Black
wikimedia/ip-utils 1.0.0 GPL-2.0-or-later Functions and constants to play with IP addresses and ranges MediaWiki developers
wikimedia/less.php 1.8.0 Apache-2.0 PHP port of the Javascript version of LESS http://lesscss.org (Originally maintained by Josh Schmidt) Matt Agar, Martin Jantošovič and Josh Schmidt
wikimedia/object-factory 2.1.0 GPL-2.0-or-later Construct objects from configuration instructions Bryan Davis
wikimedia/password-blacklist 0.1.4 MIT PasswordBlacklist for the 100,000 most used passwords Sam Reed
wikimedia/php-session-serializer 1.0.7 GPL-2.0-or-later Provides methods like PHP's session_encode and session_decode that don't mess with $_SESSION Brad Jorsch
wikimedia/purtle 1.0.7 GPL-2.0-or-later Fast streaming RDF serializer Daniel Kinzler, Stanislav Malyshev, C. Scott Ananian and Thiemo Kreuz
wikimedia/relpath 2.1.1 MIT Compute a relative filepath between two paths. Ori Livneh
wikimedia/remex-html 2.1.0 MIT Fast HTML 5 parser Tim Starling
wikimedia/running-stat 1.2.1 GPL-2.0+ PHP implementations of online statistical algorithms Ori Livneh
wikimedia/scoped-callback 3.0.0 GPL-2.0-or-later Class for asserting that a callback happens when a dummy object leaves scope Aaron Schulz
wikimedia/timestamp 3.0.0 GPL-2.0-or-later Creation, parsing, and conversion of timestamps Tyler Romeo
wikimedia/utfnormal 2.0.0 GPL-2.0-or-later Contains Unicode normalization routines, including both pure PHP implementations and automatic use of the 'intl' PHP extension when present Brion Vibber
wikimedia/wait-condition-loop 1.0.1 GPL-2.0+ Wait loop that reaches a condition or times out Aaron Schulz
wikimedia/wrappedstring 3.0.1 MIT Automatically compact sequentially-outputted strings that share a common prefix / suffix pair. Timo Tijhof
wikimedia/xmp-reader 0.6.3 GPL-2.0-or-later Reader for XMP data containing properties relevant to images Brian Wolff
zordius/lightncandy 0.23 MIT An extremely fast PHP implementation of handlebars ( http://handlebarsjs.com/ ) and mustache ( http://mustache.github.io/ ). Zordius Chen

Luceatx (talk) 08:14, 14 May 2020 (UTC)

oh hmm. You are probably right. You would have to regenerate the autoload files (or manually add to them) in order for mediawiki to pick it up.
https://github.com/wikimedia/mediawiki-vendor/blob/master/composer/autoload_classmap.php#L2681-L2741 and https://github.com/wikimedia/mediawiki-vendor/blob/master/composer/autoload_psr4.php#L21 Bawolff (talk) 16:00, 14 May 2020 (UTC)
Really appreciated!! Unfortunately, the problem persists after I manually add codes into those two php files.
I then tried to replace the two files with the ones in the link, but mediawiki/css-canitizer still doesn't show up in my Special:Version.
Can you check for me if I need to also add some other codes? Thanks so much! Luceatx (talk) 16:58, 14 May 2020 (UTC)
im kind of just guessing here, but maybe vendor/composer/installed.json Bawolff (talk) 20:42, 14 May 2020 (UTC)

csv file multiple row to new article

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


Hi,


I have a CSV file with a few hundred lines - each line has Title - Number - Date - Text


I would like each line to be its own article on my wiki,


Any idea how to accomplish this? 183.77.237.114 (talk) 12:07, 8 May 2020 (UTC)

i guess write a python bot using pywikipedia Bawolff (talk) 15:42, 8 May 2020 (UTC)
Have a look at Extension:Data Transfer Osnard (talk) 19:06, 8 May 2020 (UTC)
Thank you, I used Data Transfer and it worked perfectly! Much appreciated 183.77.237.114 (talk) 01:57, 9 May 2020 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

fixing dates in large wiki

Hi,

I have a lot of wanted pages due to miss match (1990) and 1990 (on all dates)

So a lot of links are going to x v x 1990 but the page that exists is x v x (1990)


How can I regex all dates without brackets 183.77.237.114 (talk) 02:49, 9 May 2020 (UTC)

Extension:Replace Text. AhmadF.Cheema (talk) 03:27, 9 May 2020 (UTC)
Thank you for the reply,
I do not know how to formulate to accomplish this. 183.77.237.114 (talk) 04:41, 9 May 2020 (UTC)
As the date ranges are all over the place. I need to leave alone all **** (4 digit) combo within brackets
And add brackets to any 4 number comb starting with 16** 17** 18** 19** 20** Mike Lawiki (talk) 05:01, 9 May 2020 (UTC)

Stop supporting harassment of non-public people. I'm reporting this website.

You have a page up of person with their personal information that should not be public and you do not have their permission. I'm reporting this website to the IAA.

This threatens their safety and wellbeing. Your site is dangerous and harmful.


I've reported you directly to wiki and will go to law enforcement if this page is not taken down. Ladyw87 (talk) 03:16, 9 May 2020 (UTC)

you can use Template:Speedy or Template:Delete for such pages Cronolio (talk) 03:31, 9 May 2020 (UTC)
@Ladyw87: this website is for help with mediawiki software, which is used by a lot of different websites. Are you sure it is *this* website that has the page in question. If so, and if you are correct it has inappropriate personal information, i can have the page deleted. But i would need to know what page it is to delete it.
If you would prefer to have the matter dealt with confidentially, you can contact the stewards (as this wiki has no oversighters) https://meta.wikimedia.org/wiki/Special:EmailUser/Wikimedia_Stewards (you can use this form for any wikimedia foundation project, but not for websites using mediawiki that aren't associated with the Wikimedia Foundation)
If the complaint is about a website that is using MediaWiki but not run by the Wikimedia Foundation, you have to contact the operator of the website as we have no control over them. Bawolff (talk) 05:50, 9 May 2020 (UTC)

Extension:Graph

how to get this to work on my own wiki,

i believe that i have done something wrong with settings:


here are my settings:

# Start of Graph Settings.

wfLoadExtension( 'Graph' );

$wgGraphIsTrusted= true;

$wgGraphImgServiceUrl = "//graphoid.wikimedia.org/%1\$s/v1/png/%2\$s/%3\$s/%4\$s.png";

# End of Graph Settings.


Any help will appreciated, thank you Abdulaziz Alwafaee (talk) 08:56, 9 May 2020 (UTC)

How is it best to create a system message available in the top part of all pages?

My 1.34.0 MediaWiki website is under construction and I want to make it clear that it is (and that it is beta) for anyone who might arrive there by whatever way.

How is it best to create a system message available in the top part of all pages? 49.230.109.64 (talk) 14:03, 9 May 2020 (UTC)

I should later edit the CSS to give it some "dramatic" style such as red background, etc. 49.230.109.64 (talk) 14:13, 9 May 2020 (UTC)
Manual:Interface/Sitenotice. AhmadF.Cheema (talk) 14:22, 9 May 2020 (UTC)
@AhmadF.Cheema thanks;
I admit I got lost very fast with this manual page. For example:
  1. The very beginning of this manual page includes a link to MediaWiki:Sitenotice which appeared to me twice as an empty webpage
  2. It was written there: The message is displayed if it is defined, that means the sitenotice page is not empty and its contents is different from the single character "-" ; but, it wasn't written where it is defined.
A clarification on these points is most welcome, 49.230.109.64 (talk) 15:50, 9 May 2020 (UTC)
Okay, I got it --- the "empty" page includes source code such as "-" for no message or another for message (in principle).
Strange, when I navigate to view source, I, as an anonymous user, is blocked from viewing the source. 49.230.109.64 (talk) 15:52, 9 May 2020 (UTC)
Well, although my site is is in Hebrew (generally all system and namespaces are Hebrew) I navigated to MediaWiki:Sitenotice where the content was - and have edited it to a message.
Indeed, after that, a message appeared.
Thanks, 49.230.109.64 (talk) 16:20, 9 May 2020 (UTC)

Page deletion request

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 admin(s), please delete User:Gabrielchl so that the meta one can be auto-copied over. Thanks. Gabrielchl (talk) 00:22, 10 May 2020 (UTC)

Done DannyS712 (talk) 00:35, 10 May 2020 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

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 noticed that a link like [[comparison]]s will display the whole word like this: comparisons; whereas a similar link in Greek [[ἁμαρτία]]ς will exclude the last letter ἁμαρτίας. How can this behaviour be modified so that the same happens to Greek? Spiros71 (talk) 07:33, 10 May 2020 (UTC)

@Spiros71 By changing the $linkTrail value in the file languages/messages/MessagesEl.php in your MediaWiki installation. Malyacko (talk) 09:24, 10 May 2020 (UTC)
keep in mind the behaviour will vary depending on what language code is set in your LocalSettings.php file Bawolff (talk) 10:10, 10 May 2020 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

chrome incapable of support for visual edit

Request from - via cp3062.esams.wmnet, ATS/8.0.7

Error: 502, Next Hop Connection Failed at 2020-05-10 11:57:07 GMT Imanauditore2 (talk) 12:00, 10 May 2020 (UTC)

On what wiki was this, Can you give us your chrome & OS version + the link you used? RhinosF1 (talk) 18:04, 11 May 2020 (UTC)

Unable to get EmailPage extension running - problem with autoload of PHPMailer

I am trying to get the newest version of the EmailPage extension running on Mediawiki 1.34

I am using https://gitlab.com/organicdesign/EmailPage

It looks like the extension requires an instance of PHPMailer. An older version of the extension included a version of the mailer which later was found to contain a CVE). The current version does not contain such an instance and seems to rely on the vendor/autoload.php mechanism. (See line 14 in https://gitlab.com/organicdesign/EmailPage/-/blob/master/EmailPage_body.php)

However I fail to understand how this autoload stuff has to be configured. So I always get "PHPMailer class not found!" and that is it.


Tigelriegel (talk) 13:44, 10 May 2020 (UTC)

did you run composer install in the extension directory? Bawolff (talk) 18:32, 10 May 2020 (UTC)

Change the history and language to the desired default

Hello

1. How can I set the default date and time, not registered for all people, to Persian?

2. How can I set the default language, not registered for all people, to Persian?

Thanks Sokote zaman (talk) 19:23, 10 May 2020 (UTC)

Is this what you're looking for? (Assuming it is your wiki you are referring to)
Manual:Timezone
Manual:$wgLanguageCode TiltedCerebellum (talk) 19:42, 10 May 2020 (UTC)
if you mean date display preferences, not timezone, you can use manual:$wgDefaultUserOptions Bawolff (talk) 20:01, 10 May 2020 (UTC)
I have already made the following changes:
$wgLanguageCode = "fa";
#Set Default Timezone
$wgLocaltimezone = 'Asia/Tehran';
date_default_timezone_set( $wgLocaltimezone );
//$wgDefaultUserOptions['timecorrection'] = 'persian';
$wgHiddenPrefs[] = 'timecorrection';
But it does not apply changes by default
For example, in countries where the language is from right to left, the site is right-handed, and in countries where the language is left-right, the language of the site is english.

Sokote zaman (talk) 20:07, 10 May 2020 (UTC)
Have you tried browsing as a non-logged in user? Your user prefs for the account you are browsing in may already be set to English. TiltedCerebellum (talk) 21:50, 10 May 2020 (UTC)
Bye
I tried
I did all the ways and did all the tests, but to no avail... Sokote zaman (talk) 22:47, 10 May 2020 (UTC)
timecorrection is the timezone, not the date display. The date display preference is named "date"
So you want
$wgDefaultUserOptions['date'] = 'persian'; Bawolff (talk) 00:59, 11 May 2020 (UTC)
# Date and Time default
$wgDefaultUserOptions['date'] = 'persian';
$wgDefaultUserOptions['language'] = 'fa';
// disable language selection
$wgHiddenPrefs[] = 'language';
## if you want to disable variants as well
$wgHiddenPrefs[] = 'variant';
$wgHiddenPrefs[] = 'noconvertlink';
# Site language code, should be one of the list in ./languages/data/Names.php
$wgLanguageCode = "fa";
I have made these settings, but it still shows from left to right !!! Sokote zaman (talk) 01:05, 11 May 2020 (UTC)
that's weird, fa should definitely be rtl. Are the special pages (e.g. Special:blankpage etc) in farsi and right to left, when viewing logged out? Bawolff (talk) 07:22, 11 May 2020 (UTC)
With Iran IP right-to-left
With the IP of other countries left to right
To fix this going I had to disable language selection settings in user settings Sokote zaman (talk) 20:01, 11 May 2020 (UTC)
do you have universal language selector (ULS) extension installed? It has a feature which tries to autodetect language.
Other than that, mediawiki normally does not adjust language based on ip or browser. Bawolff (talk) 20:17, 11 May 2020 (UTC)
Good on your accuracy
Yes, I have installed the universal language selector plugin
And its settings are as follows:
wfLoadExtension( 'UniversalLanguageSelector' );
$wgULSEnable = false;
$wgULSAnonCanChangeLanguage = false;
$wgULSNoImeSelectors = array( '#wpCaptchaWord' ); Sokote zaman (talk) 20:20, 11 May 2020 (UTC)
If
$wgULSEnable = false;
To
$wgULSEnable = true;
The tenth change is still left-handed and non-Persian Sokote zaman (talk) 20:22, 11 May 2020 (UTC)
$wgULSLanguageDetection = false; should prevent the auto change language behaviour.
Maybe some pages were cached or something (although editing LocalSettings.php should clear the cache) Bawolff (talk) 05:00, 12 May 2020 (UTC)

very slow loading speed!

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.


Abdulaziz Alwafaee (talk) 11:24, 11 May 2020 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

upload photo float button

i noticed that some wikis are using a quick floating button to upload photos,

for instance, if you opened an article that needs some photos to be uploaded, this button can automatically search on commons and upload it to the server,


Do you know how can I achieve the same.

example: https://www.marefa.org/%D9%82%D8%A7%D9%84%D8%A8:Football_kit

a button will appear at the top asking user to upload photos


thank you Abdulaziz Alwafaee (talk) 13:38, 11 May 2020 (UTC)

Everybody Wikis

Why is Everybody Wikis and Bios reverting to MediaWiki today?~ Cdg1072 (talk) 15:24, 11 May 2020 (UTC)

@Cdg1072: What is "Everybody Wikis" and "Bios" and why do you think we would know? Malyacko (talk) 18:06, 11 May 2020 (UTC)

Hello!

Hi, I can't log in because it's been ages since I've been here and I don't have access to the email I used when I created my account. Can anyone help me? 2001:1284:F01C:DD22:7435:54A4:DA87:AE94 (talk) 18:18, 11 May 2020 (UTC)

How to verify that you owned that email address at some point in the past? Malyacko (talk) 22:26, 11 May 2020 (UTC)

specific read/write access rights

Hello,

I would like to grant read/write access only to users with an account and a confirmed email. I followed the procedure indicated here.

Manual:User rights#Examples

But the problem is that the special page ConfirmEmail/xxxxxxxx (as indicated in the confirmation email) cannot be accessed... therefore users cannot confirm their email...

Is there any other way to do that?

Many thanks

PS: I am using version 1.31 Anon6018 (talk) 19:16, 11 May 2020 (UTC)

manual:$wgWhitelistRead Bawolff (talk) 20:13, 11 May 2020 (UTC)
Thank you. I know this $wgWhitelistRead. But the thing is that the confirmation email will direct to a page which is always different, for instance Special:ConfirmEmail/360c5bdca9f4f43fa6e0c253d8f63
The first part Special:ConfirmEmail can bet set in the white list, but how to deal with the second part which is always different? Anon6018 (talk) 21:53, 11 May 2020 (UTC)
Actually we need to use $wgWhitelistReadRegexp = [ "/ConfirmEmail/" ];
It is like a wild card Anon6018 (talk) 22:12, 11 May 2020 (UTC)

help

Can you help me? Every time I ask for help I am treated badly, threatened and offended by the Italian administrators. But is there anyone who controls these people? I need help getting back to normal. Regards Antoni Answer here antolepore@gmail.com 93.43.180.54 (talk) 23:22, 11 May 2020 (UTC)

if you believe italian wikipedia admins are harassing you, you could try making a complaint to wikimedia's trust and safety team. Email ca@wikimedia.org Bawolff (talk) 04:55, 12 May 2020 (UTC)

user page

How can I see my user page with all the blocks inserted? The user is antolepore Reply here antolepore@gmail.com otherwise I won't read it 93.43.180.54 (talk) 23:45, 11 May 2020 (UTC)

blocks don't prevent you from reading your user page.
Its unlikely people will reply anywhere but here. Bawolff (talk) 04:51, 12 May 2020 (UTC)

How to remove quote marks from template output?

I try to use this template to create unnamed or named footnotes:

<includeonly>{{#תנאי:{{{שם|}}}
  |
    {{#tag:ref
      |<noinclude>1=</noinclude>{{{תוכן|}}}
      |<noinclude>name=</noinclude>{{{שם|}}}
    }}
  |
    {{#tag:ref
      |<noinclude>1=</noinclude>{{{תוכן|}}}
    }}
  }}</includeonly>

I call it this way (unnamed and named respectively):

{{הערה|תוכן="תוכן_פנימי"}}
{{הערה|תוכן="תוכן_פנימי"|שם="שם_ההערה"}}
{{הערה|שם="שם_ההערה"}}

My problem is that the quote marks appear in all webpages in which the template is called.

How to remove quote marks from template output?

Thanks in advance, 182.232.44.61 (talk) 05:46, 12 May 2020 (UTC)

@IKhitron might be able to teach the masses how to remove the quote marks from all the webpages in which the template get's called. 182.232.44.61 (talk) 06:02, 12 May 2020 (UTC)
why are you including the quote marks if you don't want them Bawolff (talk) 06:31, 12 May 2020 (UTC)
@Bawolff I put quote marks in call just to better organize the text --- to better distinct between a parameter calls to parameter values. 182.232.44.61 (talk) 06:38, 12 May 2020 (UTC)
Well, I can just not put them there and this will allow me to easily put quote marks inside parameter values without escaping often (if at all) or alternatively remove these by JavaScript and regex somehow, but I wonder if there is a way to spare that. 182.232.44.61 (talk) 07:25, 12 May 2020 (UTC)
You could use Help:Extension:ParserFunctions#StringFunctions in the template to get rid of the first and last characters. Jonathan3 (talk) 20:32, 12 May 2020 (UTC)
Hello @Jonathan3
I have read there and understood that I should use both pos and rpos parser(string)functions
But I didn't understand how to replace the string " with nothing;
perhaps with {{subst:#tag:ref|}} somehow but should all this code come inside the above template?
I would prefer code which I could execute at LocalSettings.php;
I am not asking from anyone to develop PHP for me, I just want to know if there is an easy ready solution to implement or I'll just delete these double quotes from all my template calls and be done with it. 182.232.3.186 (talk) 05:01, 13 May 2020 (UTC)
If you are always using the unnecessary quotation marks then you could get rid of the first and last characters within the template by the following (which I've not tested out):
{{#sub:{{{1|}}} | 1 | {{#expr:{{#len:{{{1|}}}-2}} }} }}
Overall though, yes I would just delete the quotation marks! You could set out your template calls in multiple lines, which would achieve your aim ("to better organize the text --- to better distinct between a parameter calls to parameter values"). Jonathan3 (talk) 16:14, 13 May 2020 (UTC)
Thanks @Jonathan3
About multiple lines: I often use it with templates but I don't recall ever (since about 2008) using it with calls or maybe I did so only for pseudocode; it might be problematic to split a long passage into two parts because a large, multiple-lined footnote is coming in the middle (or maybe several).
I think I will just remove the quote marks and perhaps use spaces between vertical lines (|). 182.232.143.75 (talk) 17:30, 13 May 2020 (UTC)

Purge as a user right

Using Mediawiki 1.34.1, PHP 7.4.5, and MySQL 8.0.20.


I'd like for any user to be able to purge a page without confirmation.


Reading here it says we can do so by setting a user right: Manual:Purge#Purge as a user right

And here it lists 'purge' as the specific user right.Manual:User rights

And in MediaWiki's DefaultSettings.php it has the following:

$wgGroupPermissions['user' ]['purge'] = true; // can use ?action=purge without clicking "ok"


However it continually prompts for confirmation.

I've added the same permission statement to LocalSettings.php, but the behavior didn't change.


Does this user right still work?


Or more to the point, how can I avoid the confirmation of the purge? Lorenmaxwell (talk) 10:29, 12 May 2020 (UTC)

Just to confirm, are you testing with anonymous non logged-in users or with logged-in user accounts? AhmadF.Cheema (talk) 13:58, 12 May 2020 (UTC)
Logged in user accounts. Lorenmaxwell (talk) 15:23, 12 May 2020 (UTC)
i think the behaviour was changed to make all GET tequests idempotent. Bawolff (talk) 19:24, 12 May 2020 (UTC)

importdump.php

Hello,

i want to upload to a local media wiki installation with importDump.php pages.

Where do I have to insert the .xml file then?


MediaWiki Version 1.34.1

PHP Version 7.2.30 TheImaCow (talk) 12:24, 12 May 2020 (UTC)

On a folder on the same server where you are going to run the command. Ciencia Al Poder (talk) 21:09, 12 May 2020 (UTC)

$wgAntivirusSetup: Error Code (2)

Hello,


I try to use ClamAv with my MediaWiki.

On my server (Ubuntu), clamav work fine.

"clamscan --no-summary /home/" work fine and return no error.


For my wiki, in my locolsettings.php, i use this:

$wgAntivirus = "clamav";

$wgAntivirusSetup = [

# setup for clamav

'clamav' => [

'command' => 'clamscan --no-summary',

'codemap' => [

"0" => AV_NO_VIRUS, # no virus

"1" => AV_VIRUS_FOUND, # virus found

"52" => AV_SCAN_ABORTED, # unsupported file format (probably immune)

"*" => AV_SCAN_FAILED, # else scan failed

],

'messagepattern' => '/.*?:(.*)/sim',

],

];


And when i upload a file, i have always this message:

"Ce fichier contient un virus ! Pour plus de détails, consultez : échec de l’analyse (code 2)"

With a simple little image or with a eicar test file.


I try to modify the value #$wgMaxShellMemory, but it's the same...


Can you help me ?

Thanks ! Vincent74000 (talk) 15:11, 12 May 2020 (UTC)

What is the exact exit code/return code from Clamav after passing that file to Clamav? Malyacko (talk) 10:40, 13 May 2020 (UTC)

Map markers

Hello,

i'm triing to display a map with markers of different colours so i decised to upload on my wiki new markers with different colours. Is possible to specify the size of the marker on the map once it is uploaded on the wiki?


Thanks Cible30 (talk) 17:05, 12 May 2020 (UTC)

@Cible30 You do not mention which extension you are using. If this is about Kartographer, then see the Help for Kartographer? Malyacko (talk) 10:37, 13 May 2020 (UTC)
You are right sorry, i'm using Maps 95.249.157.132 (talk) 16:10, 13 May 2020 (UTC)

Change namespace ID

Hello

I have had these instructions before

define("NS_HTML", 3010);
define("NS_HTML_TALK", 3011);

// Add namespaces.
$wgExtraNamespaces[NS_HTML] = "HTML";
$wgExtraNamespaces[NS_HTML_TALK] = "بحث_HTML";

// Additional flow for other NameSpaces
$wgNamespaceContentModels[NS_HTML_TALK] = 'flow-board';

// Additional Subpages
$wgNamespacesWithSubpages[NS_HTML] = true;

// Moving NamespaceProtection
$wgNamespaceProtection[NS_HTML] = array( 'editHTML' ); // permission "editfoo" required to edit the foo namespace
$wgGroupPermissions['sysop']['editHTML'] = true;      // permission "editfoo" granted to users in the "sysop" group

// permission "editfoo" required to edit the foo namespace
$wgNamespaceProtection[NS_HTML] = array( 'write' );
$wgNamespaceProtection[NS_HTML] = ['write-edit'];
$wgNamespaceProtection[NS_HTML_TALK] = ['write-talk-edit'];

Because of the changes, I had to change the ID from 3010 to 3,000

define("NS_HTML", 3000);

define("NS_HTML_TALK", 3001);


php maintenance/updateArticleCount.php --update

php maintenance/namespaceDupes.php --fix

php maintenance/refreshLinks.php 0


And because of this change, I had a problem and my information was corrupted...


Please advise

Thanks Sokote zaman (talk) 17:11, 12 May 2020 (UTC)

i strongly reccomend that you do not change namespace ids. Ever. (Its very difficult to do)
Why did you have to change it? I would reccomend just changing it back. Bawolff (talk) 19:22, 12 May 2020 (UTC)
Thank you for your answer
Is there no way to solve this problem?
What if I reinstall and configure Wiki?... Sokote zaman (talk) 20:36, 12 May 2020 (UTC)
@Sokote zaman Please explain the underlying problem you want to solve, instead of only asking how to perform your "solution". Malyacko (talk) 10:35, 13 May 2020 (UTC)
If you have to change namespace IDs, you'll need to manually update the namespace ID on the database, on the page table at least, and run rebuildall.php. Even then, there may be some leftovers that will be pointing to the old IDs Ciencia Al Poder (talk) 21:05, 12 May 2020 (UTC)
its not just the page table, its on like half of the tables, some would be fixed by rebuildall.php but definitely not all.
I would probably use dumpBackup.php, reinstall, and then importDump.php.
The ids are meant to be arbitrary numbers. There is no reason to choose one number over another, so it really doesnt make sense to need to change them Bawolff (talk) 00:14, 13 May 2020 (UTC)
@Bawolff in my case of curiosity it seems namespace IDs are the ordering system for namespaces in search forms etc 84.66.86.49 (talk) 21:52, 30 July 2021 (UTC)
that's why i'm doing this and i'll explain more
In the search field, each namespace is id and tandem, respectively.
For example, html is 3000.
JavaScript is 3002.
Now if I want to move the display order of these two namespaces in the search page، I have two ways.
  1. Change id
  2. Or change the name of the namespace together without changing the id.
If I do this correctly, javaScript will be displayed first on the header page, followed by the html name. Sokote zaman (talk) 22:29, 30 July 2021 (UTC)
You are bringing a sledgehammer to deal with an annoying fly... Don't do this, u'll get hurt. —TheDJ (Not WMF) (talkcontribs) 10:13, 3 August 2021 (UTC)
What is your right solution?
Thank you, you can say. Sokote zaman (talk) 10:24, 3 August 2021 (UTC)

how do i delete my account

how do i delete my account Brashcat (talk) 18:11, 12 May 2020 (UTC)

https://meta.wikimedia.org/wiki/Right_to_vanish Bawolff (talk) 00:11, 13 May 2020 (UTC)

How do I access my website administration without any login details ? I am not in contact with the person that built the site through Joomla!

I am trying to get access to my website so I can edit some details, but I not in contact with the person that built it and I do not have the login details for the admin.


Heathparkin (talk) 18:28, 12 May 2020 (UTC)

@Heathparkin Welcome to the MediaWiki support desk. MediaWiki is not Joomla, so you are wrong here. (Generally speaking, if you lost the key to your door then you cannot open the door.) Malyacko (talk) 10:34, 13 May 2020 (UTC)

File Transfer speed using S3 protocol is extremely slow

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


Hi,

I am trying to transfer large files[400 GB+] to my S3 bucket using Filezilla Pro S3 protocol. Observed that the transfer speed is extremely slow. I am getting something between 130 - 170 Kbps transfer speed, whereas with other clients i am able to transfer files in excess of 25 mbps.

I am using accelerated transfer for S3 to get better transfer speeds and Internet speed is more than 150 mbps.

I am located in Bangalore[India] and the S3 region is us-east-1[N.Virginia].

Please help us understand why the transfer speed is so low and also let us know if any additional settings needs to be done to fix this issue.

Thanks,

Avirup. 106.51.109.16 (talk) 23:11, 12 May 2020 (UTC)

you are in the wrong place. We are not associated with FileZilla. You need to ask them. Bawolff (talk) 00:10, 13 May 2020 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

how to auto name pages

Hello, I am wondring if there is an extension that auto names the pages, I am thinking like a wikidata setup (Q#####) Nsturtz2 (talk) 01:03, 13 May 2020 (UTC)
@Nsturtz2 Name when, based on what? If you want to mass-create pages via a numbering scheme, use the API? Malyacko (talk) 10:32, 13 May 2020 (UTC)
dose anyone know?

2600:1014:B10B:485C:25CB:C0BA:68DF:A5A9 (talk) 01:16, 13 May 2020 (UTC)
Extension:Page Forms has something like this. Jonathan3 (talk) 16:16, 13 May 2020 (UTC)

Error on generating localsettings.php

Website :abhiprayavedi.org

upgrading from Ver 1.31 to 1.34

"database": "mysql",

    "MediaWiki": "1.34.0",

    "PHP": "7.3.3",

    "OS": "Linux 4.14.121-197.ELK.el6.x86_64",

    "arch": 64,

    "machine": "x86_64",

    "serverSoftware": "Apache/2.4.39 (cPanel) OpenSSL/1.0.2r mod_bwlimited/1.4 Phusion_Passenger/5.3.7",

    "memoryLimit": "256M"

On trying to generate localsettings.php - getting the following error message. Can someone help please?


Xrv@eOm@CEyS0v7TgrkO3gAAAKU] /mw-config/?page=Name TypeError from line 32 of /home/abhip6c6/public_html/vendor/pleonasm/bloom-filter/src/BloomFilter.php: Argument 1 passed to Pleo\BloomFilter\BloomFilter::initFromJson() must be of the type array, null given, called in /home/abhip6c6/public_html/vendor/wikimedia/password-blacklist/src/PasswordBlacklist.php on line 20

Backtrace:

#0 /home/abhip6c6/public_html/vendor/wikimedia/password-blacklist/src/PasswordBlacklist.php(20): Pleo\BloomFilter\BloomFilter::initFromJson(NULL)

#1 /home/abhip6c6/public_html/vendor/wikimedia/password-blacklist/src/PasswordBlacklist.php(32): Wikimedia\PasswordBlacklist\PasswordBlacklist::getFilter()

#2 /home/abhip6c6/public_html/includes/password/PasswordPolicyChecks.php(203): Wikimedia\PasswordBlacklist\PasswordBlacklist::isBlacklisted(string)

#3 /home/abhip6c6/public_html/includes/password/UserPasswordPolicy.php(141): PasswordPolicyChecks::checkPasswordNotInLargeBlacklist(boolean, User, string)

#4 /home/abhip6c6/public_html/includes/password/UserPasswordPolicy.php(109): UserPasswordPolicy->checkPolicies(User, string, array, array)

#5 /home/abhip6c6/public_html/includes/installer/WebInstallerName.php(225): UserPasswordPolicy->checkUserPasswordForGroups(User, string, array)

#6 /home/abhip6c6/public_html/includes/installer/WebInstallerName.php(31): WebInstallerName->submit()

#7 /home/abhip6c6/public_html/includes/installer/WebInstaller.php(270): WebInstallerName->execute()

#8 /home/abhip6c6/public_html/mw-config/index.php(80): WebInstaller->execute(array)

#9 /home/abhip6c6/public_html/mw-config/index.php(38): wfInstallerMain()

#10 {main} PNVijayan (talk) 14:09, 13 May 2020 (UTC)

If you're upgrading you shouldn't need to generate LocalSettings.php again. You can reuse the one from the previous install.
There are more errors, however, since the installer appears with no styles: The styles URL crashes with this error:
.../includes/resourceloader/ResourceLoader.php: MediaWiki requires the less.php parser
Download MediaWiki again from here. Ciencia Al Poder (talk) 21:15, 13 May 2020 (UTC)
the error you describe might be composer dependency mismatch - try running composer update Bawolff (talk) 03:38, 14 May 2020 (UTC)

Getting uniformly distributed random pages

Hello experts,

I would like to write a script that retrieves a random page from my wiki. The problem is that the distribution of pages served by Manual:Random page and API:Random is absolutely not uniformly distributed, it somehow penalizes short or less "popular" pages, which is undesirable for my usecase (see e.g. the histogram here https://ibb.co/JzXvvYc).


Is there a way to retrieve uniformly distributed random pages from a wiki?

Thanks! Moremeta (talk) 14:14, 13 May 2020 (UTC)

You'll have to resort to external tools. For example, download the list of pages, get a true random number generator, and use it to choose the page from the list Ciencia Al Poder (talk) 21:12, 13 May 2020 (UTC)
if you have sql access (including sql.php maintensnce script): SELECT page_namespace, page_title WHERE page_is_redirect = 0 ORDER BY rand() LIMIT 1; Bawolff (talk) 03:37, 14 May 2020 (UTC)

Calling a footnote by name doesn't work in a designated RTL template

I have an all-core RTL (Hebrew) MediaWiki 1.34.0 website with Cite and ParserFunctions loaded in LocalSettings.php.

To create article footnotes in that website in an RTL manner I try to use the following template:

<includeonly>{{#תנאי:{{{שם|}}}
    |
        {{#tag:ref
            |<noinclude>1=</noinclude>{{{תוכן|}}}
            |<noinclude>name=</noinclude>{{{שם|}}}
        }}
    |
      {{#tag:ref
          |<noinclude>1=</noinclude>{{{תוכן|}}}
      }}
  }}</includeonly>

To which I call in articles by this pattern:

* בדיקה ראשונה{{הערה|תוכן=בדיקה ראשונה}}
* בדיקה שנייה{{הערה|תוכן=בדיקה שנייה|שם=שם_ראשון}}
* בדיקה שלישית{{הערה|שם=שם_ראשון}}
  • The first call describes an unnamed call.
  • The second call describes a call with creating a name (as a second parameter call)
  • The third call described calling the second call by name (as a first parameter call)


The first call works fine: [1] clickable footnote number and <ol><li> 1 under <references /> are both created.

The second call works fine: [2] clickable footnote number and <ol><li> 2 under <references /> are both created.

My problem is with the third call: The clickable footnote number is [3] instead [2] and <ol><li> 3 was wrongly created under <references /> (it should not have been created in the first place because 2.0 and 2.1 should have been created instead).


Please share with the MediaWiki community how would you solve that problem. 182.232.151.77 (talk) 14:25, 13 May 2020 (UTC)

With much respect for all his contributions in this context so far (including developing the core of the above template): @קיפודנחש 182.232.151.77 (talk) 14:27, 13 May 2020 (UTC)
@IKhitron if the above single problem is solved - finally there would be a Lua/Scribunto-free RTL template out there. 182.232.143.75 (talk) 08:16, 14 May 2020 (UTC)
@AhmadF.Cheema maybe you are already able to suffice a solution for this community. 182.232.143.75 (talk) 08:18, 14 May 2020 (UTC)
@Ciencia Al Poder I tag your profile here only because in that post you said:
MediaWiki supports RTL natively. See Directionality support. Just set up $wgContLang correctly.
Mixing RTL and LTR content may be hacky, though.
Well, here is an opportunity to make it very not hacky. 182.232.143.75 (talk) 10:19, 14 May 2020 (UTC)
@Amire80 if the single problem described in that post is solved than I really don't recognize any other possible derivative problem for people who start their own Lua/Scribunto-free MediaWiki RTL projects and do not copy anything (or at least not anything they didn't wrote and will rewrite) from a given Wikipedia.
Humbly, 182.232.143.75 (talk) 10:23, 14 May 2020 (UTC)
Bumping after more than 24 hours
Next bump should be after 48 hours - I guess. 182.232.166.132 (talk) 17:05, 15 May 2020 (UTC)
Bumping 182.232.166.132 (talk) 08:43, 17 May 2020 (UTC)
Well, because none of the gentlemen replied,
Is there another Lua/Scribunto-free RTL cite alternative template from some community?
@Bawolff do you know of any plausible alternative?... 182.232.3.128 (talk) 04:41, 18 May 2020 (UTC)
@Malyacko every time I create a new thread it's (at least by hope) in a "Unix philosophy" manner of a very narrow defined context;
I did a ***** job in the start but I slowly do it better; 182.232.3.128 (talk) 17:52, 18 May 2020 (UTC)
I think you're trying to use a template just so that you can use Hebrew words (in the template name, and "name" parameter), instead of having to use the English "ref" tag and its "name" parameter - is that right? Jonathan3 (talk) 20:48, 18 May 2020 (UTC)
@Jonathan3 I am not sure I understood you but if so than yes - I do want to use Hebrew terms (הערה for ref and שם for name) Instead the English one to preserve an RTL flow in typing. 182.232.3.128 (talk) 07:14, 19 May 2020 (UTC)
@Jonathan3 I am not sure I understood you but if so than yes - I do want to use Hebrew terms (הערה for <ref> tag and שם for name attribute) Instead the English one, to preserve an RTL flow in writing. 182.232.3.128 (talk) 10:18, 19 May 2020 (UTC)
Ok. Would you be willing to give a name to the “reference detail” (non-“name”) parameter of your template, instead of using {{{1}}}? I’ve not thought it through but imagine it would be possible to replicate the ref tag using a template. Jonathan3 (talk) 00:57, 20 May 2020 (UTC)
@Jonathan3
Well,
If giving a name to a “reference detail” (non-“name”) parameter requires installing Lua/Scribunto than I guess I do mind :)
I want this website to stay all core;
Sorry if I misunderstood anything ! 49.230.71.93 (talk) 06:32, 20 May 2020 (UTC)
@Jonathan3 please tell me if I seriously misunderstood you somewhere along the lines;
I am stuck with this issue perhaps a few months now. 49.230.71.93 (talk) 09:36, 20 May 2020 (UTC)
And if I may add;
I hope for a broader communal support because as of May 2020 this community doesn't have any Cite-RTL (let along Cite-RTL-Lua) documentation, as described here:
Project:Support desk/Flow/2020/05#h-Is_there_a_formal_guide_recommending_how_to_use_Cite_for_RTL_projects?-2020-05-18T09:16:00.000Z 49.230.71.93 (talk) 13:02, 20 May 2020 (UTC)
did not dig too deep, but it seems as if #tag or <ref> causes problems when given empty content, which the template listed above does when it finds name w/o content.
in the #if hunk where parameter name is not empty, you may want to test for תוכן, and if this is empty, use {{#tag:ref | name = whatever }}, i.e., drop the | 1= , and only use it when content is not empty.
something like so:
{{#תנאי:{{{שם|}}}
    |
      {{#תנאי:{{{תוכן|}}}
        | 
        {{#tag:ref
            |1={{{תוכן}}}
            |name={{{שם}}}
        }}
        |
        {{#tag:ref | name = {{{שם}}} }}
      }}
    |
      {{#tag:ref | 1={{{תוכן|}}} }}
}}
(untested outline. btw, i do not understand all the "noinclude" in your outline - they may be harmless, but they are useless, and maybe harmful too)
peace קיפודנחש (talk) 20:54, 20 May 2020 (UTC)
Can you try out the code suggested above and let us know how it went? From memory, your logic didn't cover the third case (i.e. when only "name" supplied) so maybe the suggestion will work for you.
I agree that the noinclude parts need to be removed. Jonathan3 (talk) 21:10, 20 May 2020 (UTC)

@קיפודנחש


About the code: I have tested the code; sadly it didn't work;

Input

* בדיקה ראשונה{{הערה|תוכן=בדיקה ראשונה}}
* בדיקה שנייה{{הערה|תוכן=בדיקה שנייה|שם=שם_ראשון}}
* בדיקה שלישית{{הערה|שם=שם_ראשון}}

==הערות שוליים==
{{הערות שוליים}}

Output

ללא גרשיים בקריאה לפרמטרים

  • בדיקה ראשונה[1]
  • בדיקה שנייה[2]
  • בדיקה שלישית[3]

הערות שוליים

  1. ^ 1=בדיקה ראשונה
  2. ^ 1=בדיקה שנייה
  3. ^ name = שם_ראשון

About the noinclude tags: They help me get rid of the 1= and name= preliminaries in the <ol> which appear above due to testing the new version without them. 49.230.71.93 (talk) 03:11, 21 May 2020 (UTC)

@Jonathan3 My report is ready above. 49.230.71.93 (talk) 03:12, 21 May 2020 (UTC)
Please ensure to horizontally scroll to read the <ol><li> 1. 2. 3. as these can be elusive. 49.230.71.93 (talk) 04:25, 21 May 2020 (UTC)
@קיפודנחש
הייתי נותן לך פרס יקיר הקהילה על כל הפיתוחים האלה כי ברור לי שכוונתך טובה מאד ותרומתך עצומה למרות התנאים הצרים של דו כיווניות כיום
אנא לתשומת ליבך - המספרים לפני שלושת הערות השוליים נעלמים למעלה משום מה
#flow-post-vmr6ivvg99pmsfqg > div.flow-post-main > article > section:nth-child(2) > div > section:nth-child(2) {
    position: absolute
}
מסדר את זה
אבל בכל מקרה הינם:
1.
2.
3.
ככה שלצערי עדיין אין התחלקות ל2.1 ול2.2
שלום 49.230.71.93 (talk) 04:50, 22 May 2020 (UTC)
What is
w/o content
? 49.230.71.93 (talk) 12:01, 22 May 2020 (UTC)
without תוכן
peace קיפודנחש (talk) 14:42, 22 May 2020 (UTC)
@קיפודנחש I guess your last comment was an answer to my question
without תוכן
If you meant to suggest to remove a תוכן= in parameter calls then the above describe problem remain in testing pages without this parameter calls and another problem is added; references become empty. 49.230.71.93 (talk) 15:03, 22 May 2020 (UTC)
i meant that w/o === without, content === תוכן קיפודנחש (talk) 15:05, 22 May 2020 (UTC)
i gave your output a 2nd look, and this looks strange:
^ 1=בדיקה ראשונה
^ 1=בדיקה שנייה
^ name = שם_ראשון
clearly, this is not what was meant - first footnote supposed to be "בדיקה ראשונה", not "1=בדיקה ראשונה".
what it tells me is that the #tag believes parameter #1 of first ref is 1=בדיקה ראשונה. (which would happen, e.g., if the template had something like 1=1={{{תוכן}}}
i doubt that the template literally contains something like that. my first guess is that it's an artifact of the "noinclude" you generously pepper all over the place. i doubt you really understand the noinclude tag. i suggest get rid of it - if you found that it's magically solves some display problem you encounter, it's an illusion. make it work first, then deal with straightening the display ("horizontal display" usually means that somewhere in your CSS chain you defined some explicit behavior for either ol, li, or both - methinks "list-type". you don't necessarily have to change this globally: usually reflist has a "reflist" class, so it should suffice to define .reflist ol and/or .reflist li).
if you wiki is public (with no-nonsense registration, a-la wikimedia wikis), maybe post a link to it, i'll try to see if i can put there something that works.
peace קיפודנחש (talk) 15:15, 22 May 2020 (UTC)
Man, sometimes I cannot understand you; not only this is an extremely confusing field in an extremely unintuitive coding language and you intentionally add more confusion by w/o.
לבלבל את האויב?
הייתי חייב
Thank you for the clarification. 49.230.71.93 (talk) 15:15, 22 May 2020 (UTC)
@קיפודנחש
I understand that noinclude tags makes their contained content to not be included in output; would you say it's incorrect?
Anyway, I no longer use them; the current output is what I got directly with the template you last pasted above:
  1. ^ 1=בדיקה ראשונה
  2. ^ 1=בדיקה שנייה
  3. ^ name = שם_ראשון
This output is wrong because number <li> 3 (or link [3]) shouldn't exist. 49.230.71.93 (talk) 15:20, 22 May 2020 (UTC)
And yes, I agree about "first make it work" and that's way I no longer use noinclude tags or includeonly tags at all, until having a template that creates correct output. 49.230.71.93 (talk) 15:22, 22 May 2020 (UTC)
regarding "noinclude": this tags means something like "whatever is inside, affects the template page only, but is not transcluded when using the template". it is meant for adding stuff like documentation and categories to the template page, which is not part of the template itself, and have no effect on its usage.
enclosing internal pieces of the templates code, especially when those parts contain "template syntax", such as |, =, or even {{ and }}, makes it too convoluted for my little brain to comprehend, and i either avoid it, or say "i do not understand what's going on there". i can't think of a sane reason for doing so, though i'm aware it's done.
so if the outlined i posted above does not work as expected, it means it's prolly incorrect. i will write it again here, avoiding bidi, so it will read clearer, sidestepping the bidi junk. it will also allow others, esp. ppl who do not read hebrew, to point out any mistake or misconception i had.
so use #if instead of #תנאי, and ditto for param names - call them "refname" (to distinguish from "name" passed to the tag), and "content":
{{#if:{{{refname|}}}
    |
      {{#if:{{{content|}}}
        | 
        {{#tag:ref
            | name = {{{refname}}}
            | 1 = {{{content}}}
        }}
        |
        {{#tag:ref | name = {{{refname}}} }}
      }}
    |
      {{#tag:ref | 1 = {{{content|}}} }}
}}
imagine this template is called "cite", so use it like so:
  • {{cite | content = how are you}} ; {{cite| refname = greetings | content = how do you do }} ; {{cite | refname = greetings }}
if your wiki is public and has no-nonsense registration, maybe the simplest thing is for you to post a link to it, and i'll try to hack something that works there.
peace קיפודנחש (talk) 16:43, 22 May 2020 (UTC)
Save this to Template:Cite...
<includeonly>{{#tag:ref|{{{content|}}}|name={{{refname|}}}}}</includeonly>
... and use it as suggested above :-)
Incidentally, the comment above "it seems as if #tag or <ref> causes problems when given empty content, which the template listed above does when it finds name w/o content" seems correct. See the warning on Help:Magic_words:
Warning: You must write {{#tag:tagname||attribute1=value1|attribute2=value2}} to pass an empty content. No leading or trailing space of the text content are permitted between the pipe characters || before attribute1.

Jonathan3 (talk) 20:03, 22 May 2020 (UTC)

@Jonathan3 please a bit more detailing,
I don't have a Template:Cite preexisting webpage in my website (nor do I have the Hebrew parallel תבנית:Cite.
Furthermore, I misunderstand if you suggest this code block as an alternative to something that another user suggested.

182.232.158.148 (talk) 03:19, 23 May 2020 (UTC)
Perhaps I should also add @Jonathan3 that my MediaWiki 1.34.0 is principally all-core if there was such a template I didn't delete it.
Perhaps you meant I should create it...? 182.232.158.148 (talk) 12:19, 23 May 2020 (UTC)
"Perhaps you meant I should create it...?"
Yes, create a new page called Template:Cite with content as set out above.
Once you have got it to work I suppose you can convert it into whatever language you like. Jonathan3 (talk) 20:39, 23 May 2020 (UTC)
@Jonathan3
Creating a page named Template:Cite automatically gets translated to תבנית:Cite (not that it's a problem, just saying).
I have created such a page with:
<includeonly>{{#tag:ref|{{{content|}}}|name={{{שם|}}}}}</includeonly>
שם means name
---
With that template alone, or alongside תבנית:הערה (which is Template:Footnote) I still don't get footnotes created properly (same problems as before or just empty <li> children.
---
I feel lost with this problem. 49.230.87.239 (talk) 03:32, 24 May 2020 (UTC)
@Jonathan3
Even if I stay with:
{{#if:{{{refname|}}}
    |
      {{#if:{{{content|}}}
        | 
        {{#tag:ref
            | name = {{{refname}}}
            | 1 = {{{content}}}
        }}
        |
        {{#tag:ref | name = {{{refname}}} }}
      }}
    |
      {{#tag:ref | 1 = {{{content|}}} }}
}}
In which there is only one parameter,
Than,
Per the warning at Help:Magic_words and according to your understanding, the only problem in this template is the lack of
{#tag:tagname||attribute1=value1}}
Somewhere,
? 49.230.87.239 (talk) 03:38, 24 May 2020 (UTC)
I think I gave too much time trying to create named footnotes in an RTL MediaWiki without success.
If MediaWiki doesn't have an efficient all-core built-in solution for creating named footnotes and creating them is so complicated and requires such deep knowledge in wikisyntax than perhaps I should just not use them at all.
It is interesting to note that @Amire80 wrote in Hebrew Wikipedia:
אילו היה אפשר לתרגם לעברית את תג ref, לא היינו נזקקים כל־כך הרבה לתבנית {{הערה}}, שהרי הסיבה העיקרית לזה שהיא קיימת היא שהאותיות הלטיניות ref מתערבבות עם כתובות URL ועם שמות לועזיים שנמצאים בתוכן של המון הערות שוליים.
בוויקיפדיה העברית {{הערה}} היא אחת התבניות הכי נפוצות, אבל ברוב השפות האחרות היא נדירה.
Which I would translate as:
We wouldn't need so much of template {{הערה}} because the main reason for its existence is that the Latin letters <ref> gets jumbled up with URLs and with non-Hebrew-originated names prevalent in the content of many footnotes;
In Hebrew WIkipedia, template {{footnote}} is one of the most common templates, but in most other languages, it's rare.
Because no built in {[הערה}} exists and maybe would no never exist, than, I think I it's time for me to try to look for an alternative, which is developing a front-end alternative with JavaScript; I need this JavaScript practice anyway. 49.230.87.239 (talk) 04:07, 24 May 2020 (UTC)
Or to just move to write in English.
My particular Hebrew content could be published, I don't know, at
eco-wiki dot org dot il
I guess. 49.230.87.239 (talk) 04:29, 24 May 2020 (UTC)
did not see site named https://eco-wiki.org.il
incidentally, there is https://ecowiki.org.il (i.e., same as the name you mentioned, sans dash), and, strangely enough, this is a mediawiki wiki, which has תבנית:הערה, which seem to do exactly what you are asking, without scribuntu/lua.
maybe you want to try copying the template from this site - i expect it to work on your site just as well.
peace. קיפודנחש (talk) 21:10, 24 May 2020 (UTC)
@קיפודנחש
Yes; thanks for fixing the domain;
Yes, they have - but I didn't understand anything of that "Spaghetti" if to be metaphoric for a second:
<includeonly>{{כ}}{{#if:{{{שם|}}}|{{#tag:ref|{{#שווה:{{{שמאל|}}}|כן|<div style="direction: ltr;">}}{{{1|}}}{{#שווה:{{{שמאל|}}}|כן|</div>}}|name={{{שם|}}}}}|{{#tag:ref|{{#שווה:{{{שמאל|}}}|כן|<div style="direction: ltr;">}}{{#ifeq:{{{1|}}}||<div style="border: 2px solid red;">הוספת הערת שוליים נעשית באופן הבא:
:<nowiki>{{הערה|יש להזין הערת שוליים כאן}}</nowiki>
'''<span style="color: red;">שימו לב</span>''': אם הערת השוליים כוללת סימן שווה (<nowiki>=</nowiki>), יש להגדיר את הערת השוליים באופן הבא:
:<nowiki>{{הערה|1=יש להזין הערת שוליים שכוללת סימן שווה כאן}}</nowiki>
שימו לב לתוספת <nowiki>"1="</nowiki>.</div>|{{{1}}}}}{{#שווה:{{{שמאל|}}}|כן|</div>}}}}}}</includeonly><noinclude>
תבנית זו מהווה תחליף עברי לתגי ref.
I am having a hard time to even separate the Hebrew from the non-Hebrew there but I should take the time and try to do so in a .html file for some good syntax highlight (any tip how to separate the straw from the fresh wheat in such mess would be helpful). 49.230.87.239 (talk) 16:01, 25 May 2020 (UTC)
Okay I sat on an HTML file with that,
That's what I've isolated (I still don't understand what is going there)
How did I do?
<includeonly>
    {{כ}}
    {{#if:{{{שם|}}}
        |
        {{#tag:ref|{{#שווה:{{{שמאל|}}}|כן|<div style="direction: ltr;">}}
        {{{1|}}}{{#שווה:{{{שמאל|}}}|כן|</div>}}
        |name={{{שם|}}}}}|{{#tag:ref|{{#שווה:{{{שמאל|}}}|כן|<div style="direction: ltr;">}}
        {{#ifeq:{{{1|}}}
            ||
        }}</includeonly>
<noinclude>
49.230.87.239 (talk) 10:23, 26 May 2020 (UTC)
I would translate what Amire80 said as this (sorry, I had a mistake above):
If we could translate tag <ref> to Hebrew, We wouldn't need so much of template {{הערה}} because the main reason for its existence is that the Latin letters <ref> gets jumbled up with URLs and with non-Hebrew-originated names prevalent in the content of many footnotes;
In Hebrew WIkipedia, template {{footnote}} is one of the most common templates, but in most other languages, it's rare.
---
@AhmadF.Cheema 49.230.87.239 (talk) 07:31, 24 May 2020 (UTC)
Don't know enough to comment. I guess you can try looking at the other Wiki applications such as Tiki Wiki. AhmadF.Cheema (talk) 14:50, 24 May 2020 (UTC)
@AhmadF.Cheema please copy-paste what I wrote one post above two posts above.
I will most likely not ask anything similar because I am going to leave this topic soon; I stay with MediaWiki if a front-end alternative is not a problem:
Project:Support desk/Flow/2020/05#h-Is_it_SEO_problematic_to_create_footnotes_with_JavaScript?-2020-05-24T04:18:00.000Z 49.230.87.239 (talk) 15:31, 24 May 2020 (UTC)
You said my (short) cite template doesn’t work. How are you calling it? Jonathan3 (talk) 21:28, 24 May 2020 (UTC)

@Jonathan3

In the same way I called the other Cite templates; for example:

* בדיקה ראשונה{{הערה|תוכן=בדיקה ראשונה}}
* בדיקה שנייה{{הערה|תוכן=בדיקה שנייה|שם=שם_ראשון}}
* בדיקה שלישית{{הערה|שם=שם_ראשון}}

==הערות שוליים==
{{הערות שוליים}}

49.230.87.239 (talk) 02:38, 25 May 2020 (UTC)

I see you're using Hebrew already. Did you get it to work in English first? Anyway, can you cut and paste here the current version of your Hebrew Template:Cite so that we can check whether you are using the right parameter names. They have to correspond. If you are still using <includeonly>{{#tag:ref|{{{content|}}}|name={{{שם|}}}}}</includeonly> then maybe that is the problem: the template expects "content" as a parameter and it is getting "תוכן". Jonathan3 (talk) 10:53, 25 May 2020 (UTC)

@Jonathan3

This is my current Template:Cite (which I actually name תבנית:הערה ):

It is the latest development one from @קיפודנחש:

{{#תנאי:{{{שם|}}}
    |
      {{#תנאי:{{{תוכן|}}}
        | 
        {{#tag:ref
            |1={{{תוכן}}}
            |name={{{שם}}}
        }}
        |
        {{#tag:ref | name = {{{שם}}} }}
      }}
    |
      {{#tag:ref | 1={{{תוכן|}}} }}
}}

To which I call as in this example:

* בדיקה ראשונה{{הערה|תוכן=בדיקה ראשונה}}
* בדיקה שנייה{{הערה|תוכן=בדיקה שנייה|שם=שם_ראשון}}
* בדיקה שלישית{{הערה|שם=שם_ראשון}}

==הערות שוליים==
{{הערות שוליים}}

The output I get after execution isn't what I expect:

I get 1,2,3 footnotes and [1],[2].[3] footnote-links instead the expected 1, 2.1,2.2 footnotes and [1],[2] footnote-links. 49.230.87.239 (talk) 13:31, 25 May 2020 (UTC)

Let’s go back a few steps...
1. Create a template in English as above (the one-line one).
2. Call that template in the way suggested above, ie naming both parameters (and for each parameter using the same name within the template as when calling the template).
At this stage, don’t use any Hebrew or conditional statements.
Does it work? Jonathan3 (talk) 14:23, 25 May 2020 (UTC)
@Jonathan3 Sadly I think it doesn't work
I have created a webpage named Template:Cite where I have putted:
<includeonly>{{#tag:ref|{{{content|}}}|name={{{refname|}}}}}</includeonly>
I than created a test webpage with the content:
First check{{Cite|content=First check}}
Second check{{Cite|content=Second check|name=First_name}}
Third check {{Cite|name=First_name}}
<references />
The output I got is:
First check Second check Third check שגיאת ציטוט: תג <ref> לא תקין; להערות שוליים ללא שם חייב להיות תוכן
  1. ^ לקפוץ מעלה אל:1.0 1.1 First check שגיאת ציטוט: תג <ref>
Which indicated that:
Only 1 footnote was created and only [1] footnote-link was created, alongside errors. 49.230.87.239 (talk) 16:12, 25 May 2020 (UTC)
You need either to change the template parameter from refname to name, or change it in the template call from name to refname. They have to match.
Once you get it working in English you could start trying to make it work in your language. Jonathan3 (talk) 18:45, 25 May 2020 (UTC)
@Jonathan3 I am sorry - my bad;
Now it does work !
==Output:==
First check[1] Second check[2] Third check[2]
  1. ^ First check
  2. ^ לקפוץ מעלה אל:2.0 2.1 Second check 49.230.87.239 (talk) 01:42, 26 May 2020 (UTC)
And yet, I don't know how to translate it to Hebrew correctly. 49.230.87.239 (talk) 03:57, 26 May 2020 (UTC)
@Jonathan3 an even more detailed feedback based on more testing:
==Test:Cite with parameter calls WITH English naming==
Template
<includeonly>{{#tag:ref|{{{content|}}}|name={{{refname|}}}}}</includeonly>
Call input
First check{{Cite|content=First check}}
Second check{{Cite|content=Second check|refname=First_name}}
Third check {{Cite|refname=First_name}}
<references />
Call output
First check[1] Second check[2] Third check[2]
  1. ^ First check
  2. ^ לקפוץ מעלה אל:2.0 2.1 Second check
Conclusion
Calling a named-reference template allegedly succeeded.
==Test:Cite with parameter calls WITHOUT English naming==
Template
<includeonly>{{#tag:ref|{{{content|}}}|name={{{refname|}}}}}</includeonly>
Call input
First check{{Cite|content=First check}}
Second check{{Cite|content=Second check}}
Third check{{Cite|content=Third check}}
<references />
Call output
First check Second check Third check
  1. ^ לקפוץ מעלה אל:1.0 1.1 1.2 First check שגיאת ציטוט: תג <ref> בלתי־תקין; השם "" הוגדר מספר פעמים עם תוכן שונה שגיאת ציטוט: תג <ref>
Conclusion
Calling a named-reference template allegedly did not succeed
==My problem==
My problem is having one template that will allow both unnamed and named footnotes
When I have this,
I can try to translate to Hebrew. 49.230.87.239 (talk) 12:28, 26 May 2020 (UTC)
Try this:
<includeonly>{{#if:{{{refname|}}}
| {{#tag:ref|{{{content|}}}|name={{{refname}}}}}
| {{#tag:ref|{{{content|}}}}}
}}</includeonly>
Jonathan3 (talk) 20:51, 26 May 2020 (UTC)
Well @Jonathan3
I think it works essentially good in English;
Are here my testing outputs (corresponding to my previous post above your comment):
=בדיקה:Cite with parameter calls without English naming=
First check]1[ Second check]2[ Third check]3[
  1. ^ First check
  2. ^ Second check
  3. ^ Third check
=בדיקה:Cite with parameter calls with English naming=
First check]1[ Second check]2[ Third check]2[
  1. ^ First check
  2. ^ לקפוץ מעלה אל:2.0 2.1 Second check
==Interim summary==
As can be read, now I finally get reasonable numbering in both main testing pages
==My first problem==
One problem that was risen is the the brackets of the footnote-links being flipped, so as can be read above, they appear as ][ instead [];
I have no idea why that happens and I couldn't fix it even with this radical test:
document.querySelectorAll("*").forEach(
    (element)=>{
        element.setAttribute('dir', 'ltr')
    }
)
==My second problem==
My second problem is of course, translating this wonderful template to Hebrew correctly. 49.230.87.239 (talk) 23:41, 26 May 2020 (UTC)
@Jonathan3
[[Project:Support desk/Flow/2020/05#h-Why_brackets_([])_are_flipped_(][)_in_an_RTL_website?-2020-05-27T10:48:00.000Z]] 49.230.87.239 (talk) 02:23, 28 May 2020 (UTC)
@Jonathan3
Problem 1 is minor and I will gladly further discuss it in the linked discussion I have dedicated to it (and I seem to have misinterpreted something along the way and have explained there).
But,
Problem 2 is major and also requires a dedicated post I should open soon. 49.230.87.239 (talk) 04:10, 28 May 2020 (UTC)

All of the gallery formatting seems to work, you can change between nolines and packed, etc. but when you click an image, it's going to the file description page, not bringing up the gallery navigation where you can click through the photos.


I am not the owner of the page, I'm just trying to find out if the formatting is wrong


Example: https://vagrants.dreamhosters.com/chicagowiki/index.php?title=Critias Tomsawyerv (talk) 18:04, 13 May 2020 (UTC)

What you describe is expected and default behavior (if the MultimediaViewer extension is not installed). Malyacko (talk) 19:29, 13 May 2020 (UTC)
Okay, all of the examples of the gallery tag show images going to a gallery frame with a back and forth navigation. So in order for it to display that way, the MultimediaViewer extension needs to be installed? Tomsawyerv (talk) 03:30, 14 May 2020 (UTC)
yes Bawolff (talk) 03:35, 14 May 2020 (UTC)

Why won't you guys allow editing by IP address matching to fix possible minor problems in posts already published in Support desk?

@MarkAHershberger about this post:

Project:Support desk/Flow/2020/05#h-Calling_a_footnote_by_name_doesn't_work_in_a_designated_RTL_template-2020-05-13T14:25:00.000Z

About the code-template's last two lines:

  • In the first I have two redundant whitespace characters (before the closing tag {{)
  • In the second last line I have a redundant empty line

These problems aren't major but please delete these because I can't edit that post (nor can I edit any other post as an anonymous user); I hope you guys would finally allow editing by IP matching (for anonymous users).


I find this inability to edit by IP matching not a minor UI problem but a major accessibility problem - my mother language isn't English and thus more prone to cognitive bias in creating and editing complicated English posts in such a confusing topic such as RTL and thus in great need of being edit by IP matching (and kindly - no, I don't want to register to any website if I don't have to).


Why won't you guys allow editing by IP address matching to fix possible minor problems in posts already published in Support desk? 182.232.143.75 (talk) 08:42, 14 May 2020 (UTC)

There are no "you guys" here; especially not "guys" only. IP addresses are not necessarily static. Why should someone be allowed to manipulate someone else's posts just because they got the same IP address at some point in time? Malyacko (talk) 10:36, 14 May 2020 (UTC)
@Malyacko hello !
You people with the authority.
For the time they are static
About the last thing you wrote --- good point; because I don't know enough about cookies, I am not an authority to strictly determine if detecting for a certain cookie (or a group of two or more cookies) alongside matching the IP, is the way to go. 182.232.143.75 (talk) 10:48, 14 May 2020 (UTC)
we had issues with people editing other users posts and this was easiest quick fix. Bawolff (talk) 20:45, 14 May 2020 (UTC)
Because I think that no option for editing (even for say, five minutes) is a serious accessibility issue, than for what it's worth, I think it can be helpful to describe what was the main problem or what were the main problems:
Perhaps then, some community members could suggest an approach to deal with these without totally disabling editing.
I agree that if editing is enabled for anonymous users, it should be monitored and very limited. 182.232.166.132 (talk) 13:37, 15 May 2020 (UTC)

wgHooks Issue with Logout

Hello,


I'm currently working on a skin and for some reason, the Logout button does not seem to work. I believe there's an issue with $wgHooks. The actual anchor has Special:UserLogout set as a href, but for some reason, a REST request seems to be made, since I get the error "Cannot log out now. http."


Does anyone have an idea how to handle this? 188.193.173.81 (talk) 10:05, 14 May 2020 (UTC)

why do you suspect $wgHooks. I dont see any reason to suspect that.
Where does this error message come from? Is this potentially a csrf token issue? Bawolff (talk) 05:46, 15 May 2020 (UTC)

I have a private wiki that requires login to view/edit, yet I am getting weird messages when I do database schema updates

Hello,

I upgraded from 1.27 to 1.33 yesterday and when upgrading the schema, I saw a bunch of entries like this:

User name "Patrick" is usable, cannot create an anonymous actor for it. Run maintenance/cleanupUsersWithNoId.php to fix this situation.

User name "CBM" is usable, cannot create an anonymous actor for it. Run maintenance/cleanupUsersWithNoId.php to fix this situation.

User name "Gurch" is usable, cannot create an anonymous actor for it. Run maintenance/cleanupUsersWithNoId.php to fix this situation.

...etc.

My Wiki is private, requiring a login to even view. How did these entries get in there, and how do I clean them out so that they are gone?

Thanks. Drewsaur (talk) 14:16, 14 May 2020 (UTC)

some old extensions can cause that issues. Run the script to fix Bawolff (talk) 20:43, 14 May 2020 (UTC)
@Bawolff - thanks, but the usernames are not valid; I don't know how they got there as I am the only person who has ever used, or uses, the Wiki. I want the usernames to be deleted, and the php script doesn't seem to do that.
Could these have come from some weird hack since my site is exposed to the Internet?
I did import some stuff a while ago - that might be it. But I never used what was imported. It was stuff from a mapping extension.
Is there a script that I can use to remove these users altogether?

Drewsaur (talk) 22:39, 14 May 2020 (UTC)
imports will cause these types of entries. Its not something to really worry about - they are not real accounts and cannot login Bawolff (talk) 23:51, 14 May 2020 (UTC)

Restoring an old version to a new version

We were using an old version of mediawiki and our server died but we have a backup of the data. Do we have to install the old version before we upgrade the new version, or can we simply just install the new version of mediawiki? JordenD (talk) 18:24, 14 May 2020 (UTC)

I think if you have the old database and files then you can just get the new MediaWiki version and run update.php as usual. See Manual:Upgrading. Jonathan3 (talk) 18:29, 14 May 2020 (UTC)
So I went looking through everything, and I can't determine which SQL server is being used on the old server. Is there a way to find this out? JordenD (talk) 14:51, 19 May 2020 (UTC)

Error: 1091 Can't DROP 'change_tag_rc_tag_nonuniq'; check that column/key exists

Hi guys!


I'm trying to update my mediawiki, but I'm getting an error that is driving me crazy! I really don't know how to solve it.


When I try to do the upgrade, it fails. Below, the error highlighited:


Running maintenance/populateChangeTagDef.php...

...Update 'PopulateChangeTagDef' already logged as completed.

done.

...index change_tag_rc_tag_id already set on change_tag table.

...have ipb_sitewide field in ipblocks table.

...ipblocks_restrictions table already exists.

Table change_tag contains ct_tag field. Dropping ...

An error occurred:

A database query error has occurred. Did you forget to run your application's database schema updater after upgrading?

Query: DROP INDEX change_tag_rc_tag_nonuniq ON `change_tag`

Function: Wikimedia\Rdbms\Database::sourceFile( /home/carlinhos/public_html/maintenance/archives/patch-drop-ct_tag.sql )

Error: 1091 Can't DROP 'change_tag_rc_tag_nonuniq'; check that column/key exists


For more information, I pasted all log information below.


Turning off Content Handler DB fields for this part of upgrade.

...have ipb_id field in ipblocks table.

...have ipb_expiry field in ipblocks table.

...already have interwiki table

...indexes seem up to 20031107 standards.

...have rc_type field in recentchanges table.

...index new_name_timestamp already set on recentchanges table.

...have user_real_name field in user table.

...querycache table already exists.

...objectcache table already exists.

...categorylinks table already exists.

...have pagelinks; skipping old links table updates

...il_from OK

...have rc_ip field in recentchanges table.

...index PRIMARY already set on image table.

...have rc_id field in recentchanges table.

...have rc_patrolled field in recentchanges table.

...logging table already exists.

...have user_token field in user table.

...have wl_notificationtimestamp field in watchlist table.

...watchlist talk page rows already present.

...user table does not contain user_emailauthenticationtimestamp field.

...page table already exists.

...have log_params field in logging table.

...logging table has correct log_title encoding.

...have ar_rev_id field in archive table.

...have page_len field in page table.

...revision table does not contain inverse_timestamp field.

...have rev_text_id field in revision table.

...have rev_deleted field in revision table.

...have img_width field in image table.

...have img_metadata field in image table.

...have user_email_token field in user table.

...have ar_text_id field in archive table.

...page_namespace is already a full int (int(11)).

...ar_namespace is already a full int (int(11)).

...rc_namespace is already a full int (int(11)).

...wl_namespace is already a full int (int(11)).

...qc_namespace is already a full int (int(11)).

...log_namespace is already a full int (int(11)).

...have img_media_type field in image table.

...already have pagelinks table.

...image table does not contain img_type field.

...already have unique user_name index.

...user_groups table exists and is in current format.

...have ss_total_pages field in site_stats table.

...user_newtalk table already exists.

...have iw_trans field in interwiki table.

...wl_notificationtimestamp is already nullable.

...index times already set on logging table.

...have ipb_range_start field in ipblocks table.

...no page_random rows needed to be set

...have user_registration field in user table.

...templatelinks table already exists

...externallinks table already exists.

...job table already exists.

...have ss_images field in site_stats table.

...langlinks table already exists.

...querycache_info table already exists.

...filearchive table already exists.

...have ipb_anon_only field in ipblocks table.

...index rc_ns_usertext already set on recentchanges table.

...index rc_user_text already set on recentchanges table.

...have user_newpass_time field in user table.

...redirect table already exists.

...querycachetwo table already exists.

...have ipb_enable_autoblock field in ipblocks table.

...index pl_namespace on table pagelinks includes field pl_from.

...index tl_namespace on table templatelinks includes field tl_from.

...index il_to on table imagelinks includes field il_from.

...have rc_old_len field in recentchanges table.

...have user_editcount field in user table.

...page_restrictions table already exists.

...have log_id field in logging table.

...have rev_parent_id field in revision table.

...have pr_id field in page_restrictions table.

...have rev_len field in revision table.

...have rc_deleted field in recentchanges table.

...have log_deleted field in logging table.

...have ar_deleted field in archive table.

...have ipb_deleted field in ipblocks table.

...have fa_deleted field in filearchive table.

...have ar_len field in archive table.

...have ipb_block_email field in ipblocks table.

...index cl_sortkey on table categorylinks includes field cl_from.

...have oi_metadata field in oldimage table.

...index usertext_timestamp already set on archive table.

...index img_usertext_timestamp already set on image table.

...index oi_usertext_timestamp already set on oldimage table.

...have ar_page_id field in archive table.

...have img_sha1 field in image table.

...protected_titles table already exists.

...have ipb_by_text field in ipblocks table.

...page_props table already exists.

...updatelog table already exists.

...category table already exists.

...category table already populated.

...have ar_parent_id field in archive table.

...have user_last_timestamp field in user_newtalk table.

...protected_titles table has correct pt_title encoding.

...have ss_active_users field in site_stats table.

...ss_active_users user count set...

...have ipb_allow_usertalk field in ipblocks table.

...change_tag table already exists.

...user_properties table already exists.

...log_search table already exists.

...have log_user_text field in logging table.

...l10n_cache table already exists.

...ct_rc_id key doesn't exist.

...have rd_interwiki field in redirect table.

...*_mime_minor fields are already long enough.

...iwlinks table already exists.

...index iwl_prefix_title_from already set on iwlinks table.

...have ul_value field in updatelog table.

...have iw_api field in interwiki table.

...iwl_prefix key doesn't exist.

...have cl_collation field in categorylinks table.

...categorylinks up-to-date.

...module_deps table already exists.

...ar_page_revid key doesn't exist.

...skipping index ar_revid because index ar_revid_uniq already set on archive table.

...ll_lang is up-to-date.

...user_last_timestamp is already nullable.

...index user_email already set on user table.

...up_property in table user_properties already modified by patch patch-up_property.sql.

...uploadstash table already exists.

...user_former_groups table already exists.

...have rev_sha1 field in revision table.

...batch conversion of user_options: nothing to migrate. done.

...user table does not contain user_options field.

...have ar_sha1 field in archive table.

...index page_redirect_namespace_len already set on page table.

...have us_chunk_inx field in uploadstash table.

...have job_timestamp field in job table.

...index page_user_timestamp already set on revision table.

...have ipb_parent_block_id field in ipblocks table.

...index ipb_parent_block_id already set on ipblocks table.

...category table does not contain cat_hidden field.

...have rev_content_format field in revision table.

...have rev_content_model field in revision table.

...have ar_content_format field in archive table.

...have ar_content_model field in archive table.

...have page_content_model field in page table.

Content Handler DB fields should be usable now.

...site_stats table does not contain ss_admins field.

...recentchanges table does not contain rc_moved_to_title field.

...sites table already exists.

...have fa_sha1 field in filearchive table.

...have job_token field in job table.

...have job_attempts field in job table.

...have us_props field in uploadstash table.

...ug_group in table user_groups already modified by patch patch-ug_group-length-increase-255.sql.

...ufg_group in table user_former_groups already modified by patch patch-ufg_group-length-increase-255.sql.

...index pp_propname_page already set on page_props table.

...index img_media_mime already set on image table.

...iwl_prefix_title_from index is already non-UNIQUE.

...index iwl_prefix_from_title already set on iwlinks table.

...have ar_id field in archive table.

...have el_id field in externallinks table.

...have rc_source field in recentchanges table.

...index log_user_text_type_time already set on logging table.

...index log_user_text_time already set on logging table.

...have page_links_updated field in page table.

...have user_password_expires field in user table.

...have pp_sortkey field in page_props table.

...recentchanges table does not contain rc_cur_time field.

...index wl_user_notificationtimestamp already set on watchlist table.

...have page_lang field in page table.

...have pl_from_namespace field in pagelinks table.

...have tl_from_namespace field in templatelinks table.

...have il_from_namespace field in imagelinks table.

...img_major_mime in table image already modified by patch patch-img_major_mime-chemical.sql.

...oi_major_mime in table oldimage already modified by patch patch-oi_major_mime-chemical.sql.

...fa_major_mime in table filearchive already modified by patch patch-fa_major_mime-chemical.sql.

...comment fields are up to date.

...hitcounter doesn't exist.

...site_stats table does not contain ss_total_views field.

...page table does not contain page_counter field.

...msg_resource_links doesn't exist.

...msg_resource doesn't exist.

...bot_passwords table already exists.

...have wl_id field in watchlist table.

...cl_collation key doesn't exist.

...index cl_collation_ext already set on categorylinks table.

...collations up-to-date.

...index rc_name_type_patrolled_timestamp already set on recentchanges table.

...rev_page_id index already non-unique.

...pl_namespace, tl_namespace, il_to indices are already non-UNIQUE.

...have ct_id field in change_tag table.

...rc_ip in table recentchanges already modified by patch patch-rc_ip_modify.sql.

...index usertext_timestamp already set on archive table.

...have el_index_60 field in externallinks table.

...ug_user_group key doesn't exist.

...have ug_expiry field in user_groups table.

...index img_user_timestamp already set on image table.

...img_media_type in table image already modified by patch patch-add-3d.sql.

...ip_changes table already exists.

...index PRIMARY already set on categorylinks table.

...index PRIMARY already set on templatelinks table.

...index PRIMARY already set on pagelinks table.

...index PRIMARY already set on text table.

...index PRIMARY already set on imagelinks table.

...index PRIMARY already set on iwlinks table.

...index PRIMARY already set on langlinks table.

...index PRIMARY already set on log_search table.

...index PRIMARY already set on module_deps table.

...index PRIMARY already set on objectcache table.

...index PRIMARY already set on querycache_info table.

...index PRIMARY already set on site_stats table.

...index PRIMARY already set on user_former_groups table.

...index PRIMARY already set on user_properties table.

...comment table already exists.

...have img_description_id field in image table.

...index PRIMARY already set on l10n_cache table.

...bot_passwords.bp_user is already unsigned int.

...change_tag.ct_log_id is already unsigned int.

...change_tag.ct_rev_id is already unsigned int.

...page_restrictions.pr_user is already unsigned int.

...user_newtalk.user_id is already unsigned int.

...user_properties.up_user is already unsigned int.

...slots table already exists.

...have slot_origin field in slots table.

...content table already exists.

...slot_roles table already exists.

...content_models table already exists.

...actor table already exists.

...rev_text_id in table revision already modified by patch patch-rev_text_id-default.sql.

...table site_stats already modified by patch patch-site_stats-modify.sql.

...index rc_namespace_title_timestamp already set on recentchanges table.

...change_tag_def table already exists.

...el_index_60 in table externallinks already modified by patch patch-externallinks-el_index_60-drop-default.sql.

Running maintenance/deduplicateArchiveRevId.php...

...Update 'DeduplicateArchiveRevId' already logged as completed.

done.

...have ct_tag_id field in change_tag table.

...index ar_revid_uniq already set on archive table.

...index log_type_action already set on logging table.

...type_action key doesn't exist.

...index PRIMARY already set on interwiki table.

...index PRIMARY already set on page_props table.

...index PRIMARY already set on protected_titles table.

...index PRIMARY already set on site_identifiers table.

...index rc_this_oldid already set on recentchanges table.

...transcache doesn't exist.

Running maintenance/populateChangeTagDef.php...

...Update 'PopulateChangeTagDef' already logged as completed.

done.

...index change_tag_rc_tag_id already set on change_tag table.

...have ipb_sitewide field in ipblocks table.

...ipblocks_restrictions table already exists.

Table change_tag contains ct_tag field. Dropping ...

An error occurred:

A database query error has occurred. Did you forget to run your application's database schema updater after upgrading?

Query: DROP INDEX change_tag_rc_tag_nonuniq ON `change_tag`

Function: Wikimedia\Rdbms\Database::sourceFile( /home/carlinhos/public_html/maintenance/archives/patch-drop-ct_tag.sql )

Error: 1091 Can't DROP 'change_tag_rc_tag_nonuniq'; check that column/key exists


Thanks for your help! Tonynando (talk) 00:04, 15 May 2020 (UTC)

MediaWiki 1.33.0
PHP 7.3.17 (litespeed)
MySQL 5.6.47-cll-lve
ICU 4.2.1

Tonynando (talk) 00:33, 15 May 2020 (UTC)

open the maintenance script Sql.php and copy and paste the following:
ALTER TABLE /*_*/change_tag MODIFY ct_tag_id int unsigned NOT NULL;
DROP INDEX if exists /*i*/change_tag_rc_tag_nonuniq ON /*_*/change_tag;
DROP INDEX /*i*/chan ge_tag_log_tag_nonuniq ON /*_*/change_tag;
DROP INDEX  /*i*/change_tag_rev_tag_nonuniq ON /*_*/change_tag;
DROP INDEX  /*i*/change_tag_tag_id ON /*_*/change_tag;
ALTER TABLE /*_*/change_tag DROP COLUMN ct_tag;
(If one of the lines cause an error just skip it). Then rerun update.php Bawolff (talk) 05:43, 15 May 2020 (UTC)
Hi Bawolff!
Initially, thanks for your fast reply.
I put it at the end of Sql.php. Once I use a shared host without direct access to SSH via PuTTY, I just can run update.php through MaintenanceShell extension. When I reran it, the only message that appeared was "#!/usr/bin/env php" - in other words, nothing that can help. So, I tried to update through mw-config, and the log file was exactly the same.
Should I put it directly in patch-drop-ct_tag.sql? (Edit: I just realized that it's already the content of patch-drop-ct_tag.sql file) Tonynando (talk) 13:58, 15 May 2020 (UTC)
its basically the contents of that file with IF EXISTS added after the drop index. I think the problrm is that the file is half-completed which is confusing mediawiki. You could try and modify that sql file to add IF EXISTS and see what happens. Bawolff (talk) 15:37, 15 May 2020 (UTC)
I tried as you wrote, but an error occured, related to the SQL syntax:
Table change_tag contains ct_tag field. Dropping ...
An error occurred:
A database query error has occurred. Did you forget to run your application's database schema updater after upgrading?
Query: DROP INDEX IF EXISTS change_tag_rc_tag_nonuniq ON `change_tag`
Function: Wikimedia\Rdbms\Database::sourceFile( /home/carlinhos/public_html/maintenance/archives/patch-drop-ct_tag.sql )
Error: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IF EXISTS change_tag_rc_tag_nonuniq ON `change_tag`' at line 1
Maybe it's something related to my MySQL version (5.6.47-cll-lve)? Tonynando (talk) 16:50, 15 May 2020 (UTC)
I tried to remove "DROP INDEX if exists /*i*/change_tag_rc_tag_nonuniq ON /*_*/change_tag;" from this query, but I got the same error for "change_tag_log_tag_nonuniq". So I tried to remove all queries "DROP INDEX (...)", keeping only:
ALTER TABLE /*_*/change_tag MODIFY ct_tag_id int unsigned NOT NULL;
ALTER TABLE /*_*/change_tag DROP COLUMN ct_tag;
But then I got this error:
Table change_tag contains ct_tag field. Dropping ...
An error occurred:
A database query error has occurred. Did you forget to run your application's database schema updater after upgrading?
Query: ALTER TABLE `change_tag` DROP COLUMN ct_tag
Function: Wikimedia\Rdbms\Database::sourceFile( /home/carlinhos/public_html/maintenance/archives/patch-drop-ct_tag.sql )
Error: 1062 Duplicate entry '1723' for key 'change_tag_rc_tag' Tonynando (talk) 18:41, 15 May 2020 (UTC)
I removed all lines, keeping only:
ALTER TABLE /*_*/change_tag MODIFY ct_tag_id int unsigned NOT NULL;
And now it works, the update was finished without issues. But I really don't know how healthly it is, or if I'm causing some damage to my database... Tonynando (talk) 18:50, 15 May 2020 (UTC)
its fine, tbh. There may be an extra field, but it will be ignored. Bawolff (talk) 20:31, 15 May 2020 (UTC)
@Bawolff, thanks for your support! You really helped me to fix this issue. 189.114.233.58 (talk) 20:39, 15 May 2020 (UTC)
It was me unlogged lol Tonynando (talk) 20:39, 15 May 2020 (UTC)

updateSearchIndex.php gives error

I am getting this error Project:Support desk/Flow/2019/11#h-Search_error_creating_custom_namespaces-2019-11-24T17:40:00.000Z

It seems this is not fixed after some years. How can I fix it and what should I do?


Farvardyn (talk) 05:28, 15 May 2020 (UTC)

sounds like the script was not updated to support the new table. Please file a bug report at https://phabricator.wikimedia.org . Include the full error message in the report. Bawolff (talk) 05:36, 15 May 2020 (UTC)
Thanks, I posted here:
https://phabricator.wikimedia.org/T252853 Farvardyn (talk) 07:40, 15 May 2020 (UTC)

Special:BotPasswords: 500 error

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


I need to access this page to use the API in order to login and post via a Perl script. However, when I try to access that page I get "This page isn’t working ... is currently unable to handle this request. HTTP ERROR 500"

Using MW 1.31

In my error log I see

Fatal error:  Cannot redeclare BotPassword::isInvalid() in ...includes/user/BotPassword.php on line 278

Checking the BotPassword.php file I found that this was repeated (I guess from a patch update that went bad?):

public function isInvalid() {
return $this->getPassword() instanceof InvalidPassword;
}

Deleting this gave me access again. Spiros71 (talk) 06:21, 15 May 2020 (UTC)

@Spiros71 Is there a question? If you wanted to report a bug, please see How to report a bug - thanks! Malyacko (talk) 15:23, 16 May 2020 (UTC)
No, I found the solution myself shortly after posting this, thank you (I guess it is self-explanatory). Spiros71 (talk) 17:39, 16 May 2020 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

SVG image not showing

Hello,
I have a problem, I created a logo in SVG with Inkscape. I have put the right code in LocalHost
$wgFileExtensions[] = 'svg';
$wgAllowTitlesInSVG = true;
$wgSVGConverter = 'Inkscape';
But my logo does not appear, it marks me "File: OneLogo.svg" instead of putting the logo, and when I click on it I have a other logo instead of my file.
It's a Local Wiki, I'm using XAMPP and MediaWiki 1.31.0
My problem image : https://zupimages.net/viewer.php?id=20/20/fjda.png
How is it possible ?
Thank You Sebunian (talk) 12:18, 15 May 2020 (UTC)
@Sebunian 1.31.0 is an old, insecure version with security vulnerabilities. Please upgrade and fix your outdated system. Malyacko (talk) 15:22, 16 May 2020 (UTC)
those settings control svg uploads, not the logo.
Logo is controlled by $wgLogo Bawolff (talk) 15:51, 15 May 2020 (UTC)
@Bawolff I misspoke, this is not a logo, but an SVG image that I want to put in an Infobox (The image in question is the logo of a team) Sebunian (talk) 19:20, 15 May 2020 (UTC)
inkscape isnt well tested, and even less so on windows. Its possible support for it is out of date.
Make sure inkscape is installed and mediawiki can find the binary. Try converting a file via commandline as a debugging step, and look through mediawiki debug log for any errors (you canalso use to find command line used)
You may have to set $wgSVGConverterPath .in extreme cases you may have to adjust $wgSVGConverters Bawolff (talk) 15:52, 16 May 2020 (UTC)
also, $wgSVGConverter is case sensitive, use inkscape lowercase i. Bawolff (talk) 15:55, 16 May 2020 (UTC)
@Malyacko @Bawolff
Thank you for your reply. I made a backup of my database, as well as my Mediawiki files. Then I did an update using the web browser method
 http://localhost/Monwiki2/w/mw-config/
, but the problem is that after the update, when I go to Special:Version my Wiki is still in 1.31.0.
How does this happen?
Thank you Sebunian (talk) 11:59, 17 May 2020 (UTC)
Hard to say without knowing how you made an update, which instructions you followed, to which version you updated, which exact steps you performed... Malyacko (talk) 15:11, 17 May 2020 (UTC)
did you replace all the mediawiki files with the new version? Bawolff (talk) 19:22, 17 May 2020 (UTC)
@Bawolff
What do you mean ? Download the new version and put the files of the new version in my MonWiki2 folder? But if I do that I won't risk losing my images and my extensions ?
PS: I made a copy of my MonWiki2 file Sebunian (talk) 10:56, 18 May 2020 (UTC)
See Manual:Upgrading specifically the #Unpack the new files part. AhmadF.Cheema (talk) 15:40, 18 May 2020 (UTC)
@AhmadF.Cheema Thank you for answering me, I followed what was written there, but here is what it marks me when I want to go to the wiki:
 '''Fatal error''': Uncaught UnexpectedValueException: Dependency type platform unknown in SyntaxHighlight in C:\xampp\htdocs\MonWiki20\includes\registration\VersionChecker.php:131 Stack trace: #0 C:\xampp\htdocs\MonWiki20\includes\registration\ExtensionRegistry.php(274): VersionChecker->checkArray(Array) #1 C:\xampp\htdocs\MonWiki20\includes\registration\ExtensionRegistry.php(158): ExtensionRegistry->readFromQueue(Array) #2 C:\xampp\htdocs\MonWiki20\includes\Setup.php(116): ExtensionRegistry->loadFromQueue() #3 C:\xampp\htdocs\MonWiki20\includes\WebStart.php(88): require_once('C:\\xampp\\htdocs...') #4 C:\xampp\htdocs\MonWiki20\index.php(39): require('C:\\xampp\\htdocs...') #5 {main} thrown in '''C:\xampp\htdocs\MonWiki20\includes\registration\VersionChecker.php''' on line '''131''' 
Where does the problem come from?
Thank you Sebunian (talk) 18:18, 19 May 2020 (UTC)
Along with MediaWiki core, the extensions will also have to be updated. Not sure, but maybe Extension:SyntaxHighlight had not been updated? AhmadF.Cheema (talk) 23:04, 19 May 2020 (UTC)
@AhmadF.Cheema @Bawolff @Malyacko
I finally managed to update my wiki (I deleted everything and started from scratch), but I have a new problem. Despite the fact that I reimport the infobox templates, they do not display correctly (It takes all the width) and I get this error message which appears in the color frame of the infobox,
"La page Modèle:Infobox/Pictogramme/cinema.css doit avoir un modèle de contenu « CSS nettoyé » pour TemplateStyles (le modèle actuel est « wikitexte »)."
(Translate: "The Template page: Infobox/Pictogram/cinema.css must have a "cleaned CSS" content template for TemplateStyles (the current template is "wikitext").").
Why ?
Thank you Sebunian (talk) 12:18, 20 May 2020 (UTC)
@Sebunian This thread is called "SVG image not showing". Other problems have to be discussed in other threads. Malyacko (talk) 12:30, 21 May 2020 (UTC)

How to put 1= in a code template correctly?

In my RTL (Hebrew) 1.34.0 MediaWiki website I have this template with which I create single-line (inside-passage) code:

<includeonly><code>{{{1}}}</code></includeonly>

I call it by this RTLized call:

{{קריאה|SOME_CODE}}

Usually it works fine but If SOME_CODE is ONE_EQUALS (1=), than I get an output of a single empty white space character styled AS code.

How to put 1= in a code template correctly?

If it matters, Parser Functions extension is indeed loaded inside LocalSettings.php. 182.232.166.132 (talk) 13:40, 15 May 2020 (UTC)

you put it as 1=1= Bawolff (talk) 15:50, 15 May 2020 (UTC)

I can log on this page but another wikki page keeps telling me incorrect Password

I can log into this page but another page will not let me log in says incorrect Password but it is the one I used to log in the first page


383sb (talk) 15:42, 15 May 2020 (UTC)

Which exactly are "this page" and "another page"? AhmadF.Cheema (talk) 19:11, 15 May 2020 (UTC)

IF Statement in a Nav Box.

Hello all, So, I'm in a bit of an odd spot with a bit of story behind it. I have two wikis that are nearly identical with the only difference being one is a couple versions behind (and the fact the newer one doesn't have all the same pages ported over yet). Same extensions. Reason for this is the installation of one is butchered and it won't update, and it won't let me move it around as needed. So I can either delete it or live with it.

Anyway, not the point. I'm using if statements on some collapsible navigation templates (copied in the code below being used for both). Everything is working on the older version, the If statements are hiding things as they're supposed to, yada yada yada. However, on the newer versions, it is not going so well.

{|align="center" id="NavShips" class="mw-collapsible mw-collapsed"
!colspan="2" class="misc"|'''[[{{{classname}}}|{{{classdisplay}}}]]'''
|-
{{#if: {{{precededby|}}}|
{{!}}class="datahead"{{!}}'''''Preceded By:''''' {{{precededby}}}}}
{{#if: {{{succeededby|}}}|
{{!}}class="datahead"{{!}}'''''Succeeded By:''''' {{{succeededby}}}}}
|-
|style="text-align:center"|{{{vessels}}}
|}


The frustrating part is I got it working for the older wiki at 1am years ago (according to the history log), but... 5 years later at a reasonable hour, I have no idea. 108.52.123.104 (talk) 20:46, 16 May 2020 (UTC)

...And of course the help desk then instantly messes up my formatting.
It wasn't all scrunched like that. 108.52.123.104 (talk) 20:46, 16 May 2020 (UTC)
i find the page Special:ExpandTemplates helpful for debugging these types of things Bawolff (talk) 00:17, 17 May 2020 (UTC)
its hard to suggest improvements without knowing what you want the template to look like, and what its actually showing up as on your wiki Bawolff (talk) 00:24, 17 May 2020 (UTC)
What it's supposed to be doing is hiding the precededby and succeededby sections until they're filled in. However ,instead on the newer version it's showing them and the if statements outside of the navbox, on the newer version. On the older version it's working as intended. 108.52.123.104 (talk) 16:13, 17 May 2020 (UTC)
it seems like it worked when i tested. Can you link to your wiki? Bawolff (talk) 19:28, 17 May 2020 (UTC)

How do I change the directory of $wgTmpDirectory

Hello.

I keep getting this error when trying to upload an image.

Could not store upload in the stash (UploadStashFileException): "Could not create directory ‘mwstore://local-backend/local-temp/8/85’.".

How do I change the directory of $wgTmpDirectory to fix this issue? 173.75.237.68 (talk) 21:03, 16 May 2020 (UTC)

Bump....would like to actually get help. 173.75.237.68 (talk) 00:25, 17 May 2020 (UTC)
its unclear what you are asking.
To adjust a $wg config variable, add it to the end of your LocalSettings.php file Bawolff (talk) 01:26, 17 May 2020 (UTC)
How so?
I can't upload images. It always gives the same error like the one in the original post, but it changes the numbers at the end every time, and I don't know how to fix it.
I keep getting mixed answers, and I don't know what to actually do. I have tried setting $wgTmpDirectory to an actual folder I made (added in LocalSettings), but i get the same error. I can't find an ACTUAL clear answer anywhere. 173.75.237.68 (talk) 01:35, 17 May 2020 (UTC)
i'm not sure but i don't think $wgTmpDirectory is the same as local-temp, i think local-temp is the temp subdirectory of the images directory.
Make sure that the images directory has apropriate permissions (e.g. is owned by the webserver user (often www-data) and has read write execute rights).
Also if using uploadwizard, check if special:upload has the same error Bawolff (talk) 03:28, 17 May 2020 (UTC)
I have tried both 777 and 775 for the images directory, and it still gives the error. Do you have a discord? I feel like this would be easier so i can get this fixed fast and i can also show images better.
El Epico#0206 173.75.237.68 (talk) 03:48, 17 May 2020 (UTC)
I don't provide free support via discord (or any other channel other then this forum, mediawiki-l mailing list or #mediawiki irc channel). Of course its possible other people on this forum might, but i wouldn't bet on it.
There are people who provide very hands on support, but they generally charge a lot of money. There is a list here Bawolff (talk) 07:22, 17 May 2020 (UTC)
....You charge money for support? What.
Look man, I just want to have images fixed. Everything else on my wiki works fine BUT images. Please understand my troubles here. I can link them externally, but i can't format them to be on the left side of the page or give them captions. I have been trying to get images fixed for days and I don't know what the problem is. I get that same error every time, saying it can't store the upload in the stash. What "images" folder am I not looking at correctly? What images folder are you referring to? The one in root?
That image folder has been set to 755 and 777, and I get to the same error. I have heard that I need to have the $wgTmpDirectory set to another writable folder, but I have TRIED that, and i get the same error (i don't know if i am doing it right though). Please. 173.75.237.68 (talk) 20:06, 17 May 2020 (UTC)
i don't charge money, other people who provide 1:1 support do. Bawolff (talk) 21:28, 17 May 2020 (UTC)
Cool. Can we get back to discussing the issue though? 173.75.237.68 (talk) 21:31, 17 May 2020 (UTC)
Amazing. I can't even get support for fixing god damn images, which should be a standard. 173.75.237.68 (talk) 00:43, 18 May 2020 (UTC)
Bump. 173.75.237.68 (talk) 19:27, 18 May 2020 (UTC)

Is it possible to update an IP Address contributors contribution to their username?

I have a person who has contributed to several pages anonymously, so his contributions show his IP instead of his username. He messaged me and told me he signed up and asked if I'd modify his IP address contributions so they reflected his username instead of his IP address. Is this possible? Exosvs (talk) 21:43, 16 May 2020 (UTC)

See Manual:ReassignEdits.php. AhmadF.Cheema (talk) 22:51, 16 May 2020 (UTC)
I've tried this several times bu have been unable to get it to work.
My syntax is: "php reassignEdits from 192.xxx.xx.xxx to DesiredUser" and i receive an error that such a user doesnt exist. I've checked the number a dozen times and it is correct.
Any suggestions on how to get this to work? Exosvs (talk) 01:18, 17 May 2020 (UTC)
well the docs say the syntax is php reassignEdits.php 192.xxx.xxx.xxx DesiredUser so i would start by trying that. Bawolff (talk) 01:23, 17 May 2020 (UTC)
I tried this and was also unsuccessful. It says there it found 0 edits. They're shown in the "Recent Changes" page but the code doesnt seem to be able to identify anything. Am i doing something incorrectly? Exosvs (talk) 01:28, 17 May 2020 (UTC)
there was recently a change to how user accounts are stored. Its possible something broke with the script and it doesnt work properly anymore. Bawolff (talk) 01:30, 17 May 2020 (UTC)
is it possible to manually update in the File Manager and assign a name to the anonymous user? Exosvs (talk) 01:31, 17 May 2020 (UTC)
no, its stored in the database. You would have to change all the fields ending in _actor to point to the right actor id Bawolff (talk) 01:33, 17 May 2020 (UTC)
although extension:UserMerge might be an alternative solution, not sure Bawolff (talk) 01:34, 17 May 2020 (UTC)
Exosvs (talk) 01:16, 17 May 2020 (UTC)

My game crashes all the time. I have a gen 4 iPad Pro. Did it on my gen 2 iPad Pro as well. I have lost hundreds of hours of fligh time. Just lost over 8 hour just now. I’m not to happy. I give y’all money every month for this game.

My game crashes all the time. I have a gen 4 iPad Pro. Did it on my gen 2 iPad Pro as well. I have lost hundreds of hours of fligh time. Just lost over 8 hour just now. I’m not to happy. I give y’all money every month for this game. 173.217.101.225 (talk) 04:22, 17 May 2020 (UTC)

you are in the wrong place, we have no idea what you are talking about but we are not assocated with your game. Bawolff (talk) 07:24, 17 May 2020 (UTC)

<templatedata>

i have an issue with <templatedata>.

the tag is not detected

MediaWiki: 1.34.1

PHP: 7.3.18-1

i have the Extension:TemplateData, installed. what should i do, did i missed something? Abdulaziz Alwafaee (talk) 11:14, 17 May 2020 (UTC)

What is the code in your LocalSettings.php which you have used for enabling Extension:TemplateData?
Does <templatedata> show up in your Wiki's Special:Version page? AhmadF.Cheema (talk) 11:28, 17 May 2020 (UTC)
@AhmadF.Cheema wfLoadExtension( 'TemplateData' ); Abdulaziz Alwafaee (talk) 11:33, 17 May 2020 (UTC)
@AhmadF.Cheema <templatedata> show up at Special:Version Abdulaziz Alwafaee (talk) 11:35, 17 May 2020 (UTC)
Right.
What exactly do you mean by "the tag is not detected"? What's the expected behaviour which is not happening? AhmadF.Cheema (talk) 03:40, 18 May 2020 (UTC)
This issue happens under templates ns, whenever its mentioned, I'm assuming that it is not being detected by parser. Abdulaziz Alwafaee (talk) 05:40, 18 May 2020 (UTC)
using lua Abdulaziz Alwafaee (talk) 05:40, 18 May 2020 (UTC)
i dont know why or how:
but adding this line helped me
$wgTemplateStylesNamespaces     = [ 10 => true ];
Plus changing the order of loading extensions, so load TemplateData First, then TemplateStyles,
# Start of TemplateData Settings.
wfLoadExtension( 'TemplateData' );
# End of TemplateData Settings. 
                                                                                       
# Start of TemplateStyles Settings.
wfLoadExtension( 'TemplateStyles' );
$wgTemplateStylesNamespaces     = [ 10 => true ];
# End of TemplateStyles Settings.
Again, I'm not sure why it happened before, but now its fine. Abdulaziz Alwafaee (talk) 05:46, 18 May 2020 (UTC)

Extension:PageImages

I have a wiki website and I use Extension:PageImages.

When I check the source code : <meta property="og:image" content="http://example.website.com/images/4/47/image.png"/> but my website uses HTTP to HTTPS redirect so the meta uses HTTP. How can I change the HTTP to HTTPS ??

it should be like;

<meta property="og:image" content="https://example.website.com/images/4/47/image.png"/>

My mage images are not shown if I share a link in discord because of HTTP.


Uzunkaymak (talk) 12:52, 17 May 2020 (UTC)

what is $wgServer, $wgUploadPath, (and $wgCanonicalServer if set) set to in LocalSettings.php Bawolff (talk) 19:26, 17 May 2020 (UTC)

Customized CSS

Hello,

I would like to customize the CSS for all users and not just for me.

I could customize the code of common.css as an administrator.

But I'd rather do it in an article in the mediawiki.

Can we do that ?

For instance, I would like to customize the "pre" style.

Thank you for your support.

Kind regards. Anon6018 (talk) 13:11, 17 May 2020 (UTC)

@Anon6018 MediaWiki:Common.css *is* a page ("article") hence to me the question does not make sense, but maybe I misunderstand? Malyacko (talk) 15:10, 17 May 2020 (UTC)
Thank you. My understanding was that Common.css was valid only per user and not for the whole site.
I don't have a Common.css page right now in my mediawiki. I created one and I inserted the following customization:
pre { color: green; }
But it does not work. Is there any specificity to create this Common.css page and make it work ?
I know there is $wgAllowUserCss but this is supposed to be for user css.
Thanks Anon6018 (talk) 17:07, 17 May 2020 (UTC)
@Anon6018 Please see Manual:CSS Malyacko (talk) 19:37, 17 May 2020 (UTC)
the page is named MediaWiki:Common.css . The mediawiki: prefix is important. Bawolff (talk) 19:25, 17 May 2020 (UTC)
Many thanks. That's what I was missing. Is this page already existing or should we create it like any article? Then content is exactly like a CSS? Kind regards Anon6018 (talk) 17:14, 18 May 2020 (UTC)
it should have some dummy content prepopulated, but basically yes, create like any other article. Bawolff (talk) 18:45, 18 May 2020 (UTC)
You can create it, like it is done in Wikipedia and content is CSS. AhmadF.Cheema (talk) 17:36, 18 May 2020 (UTC)
Thank you. This was helpful. I had to create the page MediaWiki:Common.css, because it was not yet there (I wonder if this is normal). But apparently, my CSS code is not taken into account.
I set up this pre { color: green; } and it does not work.
Is there anything special to do to make sure CSS is applied?

Anon6018 (talk) 00:50, 19 May 2020 (UTC)
$wgUseSiteCss has to be true, but its true by default.
Its possible some other css is overriding yours, try something like
* {color: red !important;}
Just to verify it works. If it doesnt work, double check the page name is exactly right, and i guess check browser console for errors (if its still not working, link to your site if public would be helpful) Bawolff (talk) 04:01, 19 May 2020 (UTC)
Thanks for being so supportive.

  1. Page name is MediaWiki:Common.css (I just copied and pasted it): so I think it is ok
  2. I added the flag $wgUseSiteCss and set it to true in Localsettings.php.
  3. I added the code you suggested to put all text in Red as you mentioned.
  4. Web console is ok
--> And it still does not work :(

I don't see any place where common.css is loaded so that would explain why it does not work. Question is: why is it not loaded
I created specific user rights where only logged users can read and write pages. But the home page and MediaWiki:Common.css page is in the whitelist
$wgWhitelistRead = [
   "Main Page", "Accueil", "Page_d'accueil", "Thème_2020", "Explication", "Exemple_de_page",   "Spécial:Créer_un_compte", "MediaWiki:Common.css", "MediaWiki:Common.js"
   ];
I don't get it :( Anon6018 (talk) 14:14, 19 May 2020 (UTC)
hmm, https://neau.ch/mediawiki/load.php?debug=false&lang=fr&modules=site.styles&only=styles&skin=timeless seems empty. Can you check the php error log for any exceptions/fatal errors.
Also, i think you can only use plain css here, not Less/Scss/etc. So you probably cant use syntax like @green or &:hover. Bawolff (talk) 15:10, 19 May 2020 (UTC)
Thank you but I don't even know how to check php error log. I checked web console in Firefox and I don't see any error.
What is this URL https://neau.ch/mediawiki/load.php?debug=false&lang=fr&modules=site.styles&only=styles&skin=timeless  ?
Anon6018 (talk) 15:55, 19 May 2020 (UTC)
that url is where the css you put in Mediawiki:common.css should show up.
See How to debug for how to check php/Apache error log. Bawolff (talk) 19:13, 19 May 2020 (UTC)
weirdly Mediawiki:common.css has the wrong content model. Try using Special:ChangeContentModel to change its content model to CSS. Not sure if that will do anything but couldnt hurt to try. Bawolff (talk) 19:31, 19 May 2020 (UTC)
Many thanks: that was the issue. Now it works all fine Special:ChangeContentModel. Anon6018 (talk) 19:49, 19 May 2020 (UTC)

Templates

Which templates can one use here?. See few links to templates in Wikidata from here. BoldLuis (talk) 14:22, 17 May 2020 (UTC)

@BoldLuis Whatever templates exist here. Where to "see few links"? (Not sure I understand the question correctly.) Malyacko (talk) 15:09, 17 May 2020 (UTC)
In Wikidata. If you see the templates in Wikidata items, there are less template links in Mediawiki.org website than in any other Wikimedia sister project (as Wikipedia, Wiktionary and so on). I think this is not good, because Mediawiki.org is a reference for other Mediawiki sister projects using its sofware and templates. Also, good working modules could be imported from other sister projects (in Wiktionary there are a pair of good modules, that could be used and shiped with Mediawiki, althoug for reference). BoldLuis (talk) 15:30, 17 May 2020 (UTC)
@BoldLuis Where "in Wikidata"? Is this about wikidata.org? Something else? Please provide links so we don't have to guess what you are talking about. Thanks! Malyacko (talk) 19:36, 17 May 2020 (UTC)
Wikidata.org that links to all the WikiMedia sisters, including Mediawiki.org (in someway, as Commons).BoldLuis (talk) 20:10, 17 May 2020 (UTC)
(1) This should be on Project:Current issues, not here. (2) What makes you think MediaWiki.org is not intended to be a repository of templates for use on other wikis? * Pppery * it has begun 21:18, 17 May 2020 (UTC)
All templates are deleted just when created, without a word. Although they are consolidated templates in the miriad of Wikimedia sister wikisystem. And not only templates, also modules. I think a clear policy about it would be good (by the way, thank Ppery by asking and make my think). BoldLuis (talk) 23:36, 17 May 2020 (UTC)

Help pages

I clicked in a help page icon and this default icon goes to Category:Help. It would be better to Help: Contents. And include in Help:Contents a link to meta:Help:Help. BoldLuis (talk) 15:47, 17 May 2020 (UTC)

which help icon? Bawolff (talk) 19:24, 17 May 2020 (UTC)
An interrogation, in the right corner of the help page.BoldLuis (talk) 19:26, 17 May 2020 (UTC)
@BoldLuis Please be way more specific and provide links and clear instructions. We cannot look over your shoulder but only read your text here and then have to guess and interpret. Thanks! :) Malyacko (talk) 19:36, 17 May 2020 (UTC)
can you use a link to link to the page this help icon is on? There are lots of help icons. Bawolff (talk) 19:29, 17 May 2020 (UTC)
Sorry, cannot find the page now. As soon as I can refind, I am going to put it here (I though was in more help pages, sorry). BoldLuis (talk) 20:09, 17 May 2020 (UTC)

Selecting for public domain recognized sites by Commons

I suggest the user can select a file from a recognized public domain site by Wikimedia / Wikimedia Commons and upload it with all the data fulfilled by the engine. Only mark in the page you are looking it and goes to Wikimedia Commons. No download, upload, put the license (when the engine perfectly know if precoded) and so on. A feature idea.--BoldLuis (talk) 16:03, 17 May 2020 (UTC)

@BoldLuis If you find any bigger website with a machine-readable license in a standard format and the website is not supported already (for example, upload from Flickr to Wikimedia Commons is already supported) then please feel free to file a specific feature request with sufficient information: How to report a bug Malyacko (talk) 19:35, 17 May 2020 (UTC)
Thanks for the orientation (this is OK to put in the bug). Best wishes.BoldLuis (talk) 20:14, 17 May 2020 (UTC)

mediawiki account registration

Is there any way to check if the email is already registered, so mediawiki wont allow creation of new account with already registered email.? Abdulaziz Alwafaee (talk) 17:19, 17 May 2020 (UTC)

by default mw allows multiple people have the same email. Im not aware of anything preexisting but it would be possible to write an AuthManager extension to do this. Bawolff (talk) 19:23, 17 May 2020 (UTC)

Can I use a visualeditor and a mobilefrontend together?

I used a mobilefrontend and a visualeditor, but the visualeditor does not work.


I do not know the reason 119.194.22.26 (talk) 01:01, 18 May 2020 (UTC)

We don't know either without way more basic information (exact versions and branches of the extensions and MediaWiki, what "does not work" means exactly, which steps you followed where to install things, which steps you perform and what you see or what happens that makes you think that it does not work, etc). :) Malyacko (talk) 09:54, 18 May 2020 (UTC)

Ask for confirmation to new pages

I would like to control the way the users/specific groups publish a new page asking for a confirmation of a moderator to publish a new page for the public. I tried with FlaggedRevs but this extension does not control the new pages, only the modifications of the existent ones. Any ideas? 187.189.102.251 (talk) 01:28, 18 May 2020 (UTC)

im not aware of anything off the shelf for this. What Wikipedia does is have a Draft: namespace, make it so new users can only create pages in that namespace, and have moderators move the page when they think its good. Bawolff (talk) 02:50, 18 May 2020 (UTC)

What is the latest-created RTL Wikipedia?

What is the latest-created RTL Wikipedia?

I mean, which Wikipedia is RTL and was the most latest in the history of Wikipedia sites of different languages?

The purpose of this question is to find the latest most, perhaps Lua/Scribunto-free RTL Cite template to work with in my own MediaWiki website. 182.232.3.128 (talk) 04:43, 18 May 2020 (UTC)

I don't see why "latest" is relevant at all. I guess you'll have to check templates on the existing RTL languages Wikipedias. Malyacko (talk) 09:52, 18 May 2020 (UTC)
@Malyacko
Is there a database centering links to each "footnote" template page in any of the Wikipedias?
If not, than I don't imagine any easy way to find such templates because I speak only one RTL language fluent enough.
I don't imagine how Google Translate or a similar tool could be handy because there are no direct links to such template and often one name space can have very similar and confusing names, take for example the mess (no pun intended) that goes in Hebrew Wikipedia, in this context:
  1. תבנית:הערה
  2. תבנית:הערה/קוד
  3. תבנית:הערות שוליים
  4. תבנית:תיעוד
  5. תבנית:הערות שוליים/תיעוד
  6. תבנית:ניהול פרמטרים
  7. תבנית:ניהול פרמטרים/תוכן
  8. יחידה:פרמטרים 182.232.3.128 (talk) 11:00, 18 May 2020 (UTC)
Shouldn't it's time that this community will have such database?
If I would have any idea how to gather such a list I would create it myself.
Any hint would be most welcome. 182.232.3.128 (talk) 11:37, 18 May 2020 (UTC)
"footnote" template pages in any of the Wikipedias: Go to that template page and look at the "Languages" list in the sidebar. Malyacko (talk) 12:33, 18 May 2020 (UTC)

@Malyacko thank you; this is helpful,

But I have one problem:

I have googled each one of the seven "relevant" webpages from Hebrew Wikipedia

I have generally found code parallels only for:

  1. תבנית:הערה (ref)
  2. תבנית:הערות שוליים (reflist)

I might have just found two non Lua/Scribunto templates;

The "simple" one from Urdu Wikipedia:

<includeonly>{{#if:{{{name|}}}|{{#tag:ref|{{{1|{{{refn|}}}}}}|name={{{name|}}}|group={{{group|}}}}}|{{#tag:ref|{{{1|{{{refn|}}}}}}|group={{{group|}}}}}}}</includeonly><noinclude>{{documentation}}</noinclude>

The "complicated" one from Arabic Wikipedia:

<includeonly>{{#if:{{{name|}}}|{{#tag:ref|{{{1|{{{refn|}}}}}}|name={{{name|}}}|group={{{group|}}}}}|{{#tag:ref|{{{1|{{{refn|}}}}}}|group={{{group|}}}}}}}</includeonly><noinclude>
[[تصنيف:قوالب تولد مراجع مسماة]]
{{توثيق}}</noinclude><noinclude>
[[تصنيف:قوالب بأسماء أجنبية]]
</noinclude>

I don't know if these contain Lua.

#invoke (a Lua command) and #tag (a Wiki syntax command) seem to me quite similar to be confusing.

If the above templates do indeed contain Lua, than I know of no ref Lua-free Cite RTL template which works.
182.232.3.128 (talk) 08:16, 19 May 2020 (UTC)

I guess you can find by using these templates while not having Lua installed. Malyacko (talk) 09:12, 19 May 2020 (UTC)

@Malyacko I am not sure that's a good way to go; for example, I just tried to replace my own תבנית:הערה (<ref> template) with either of the two (Urdu and Arabic ref templates content);

The only error I got in the relevant testing pages is:

שגיאת ציטוט: תג <ref> לא תקין;

Which I understand to be a Wiki syntax error and not a Lua error.

Because #tag:ref isn't a Lua command I ask, is #if:X is?

If it is, than both templates aren't a good substitute for me. 182.232.3.128 (talk) 09:37, 19 May 2020 (UTC)

I didn't find any other RTL templates (some might be elusive to find). 182.232.3.128 (talk) 10:16, 19 May 2020 (UTC)
As I undersood here #if:X is indeed a wikisyntax command and yet I don't know why these templates didn't work as expected. 49.230.71.93 (talk) 07:15, 20 May 2020 (UTC)

Hebrew page titles via API titles "contain invalid or non-normalized data"

I am using the API (MW 1.31) to import some titles in Hebrew and I get this error:

Processing row 2 (יוֹם)
Attempting to edit "יוֹם"
Error: PHP returned "The value passed for "title" contains invalid or non-normalized data. Textual data should be valid, NFC-normalized Unicode without C0 control characters other than HT (\t), LF (\n), and CR (\r).
The value passed for "text" contains invalid or non-normalized data. Textual data should be valid, NFC-normalized Unicode without C0 control characters other than HT (\t), LF (\n), and CR (\r)."

Spiros71 (talk) 06:37, 18 May 2020 (UTC)

Hi, we don't know exactly how you import data and from where the data comes from and in which format. Also that's a PHP error, not a MediaWiki error. Malyacko (talk) 09:52, 18 May 2020 (UTC)
are you sure the title is normalized? There should be various tools around the internet that allow you to convert things to utf-8 NFC. If you are sure it is in UTF-8 NFC, please provide a link to a minimal file that reproduces the issue (note everything pasted into this forum is automatically converted to NFC so pasting here wont work) Bawolff (talk) 19:28, 18 May 2020 (UTC)

where should i test my bot?

My bot generates articles up to million . Is there any private space where I can generate articles in order to test working of my bot? Does test.wikipedia.org support million articles to write into it ? if not is there any playground or sandbox to test my bot with unlimited articles? Ramu ummadishetty (talk) 08:28, 18 May 2020 (UTC)

@Ramu ummadishetty You should use https://test.wikipedia.org and I don't see why you need to edit millions of articles to find out if a bot actually works. Malyacko (talk) 09:51, 18 May 2020 (UTC)
can i get any private space ? Ramu ummadishetty (talk) 09:56, 18 May 2020 (UTC)
@Ramu ummadishetty I don't know what "private" means and what "space" means in terms of MediaWiki. You could set up your own MediaWiki installation if you need something to be really private. Malyacko (talk) 12:31, 18 May 2020 (UTC)
@Malyacko Thank you for replying to us.
Actually we need a workspace where we can generate articles through bot. The bot generated articles may not be good/featured articles. so without disturbing the main wikipedia can we generate all such articles at some place and in future after enhancing the articles we could just export them to our language specific wikipedia. HarshithaNallani (talk) 15:51, 19 May 2020 (UTC)
I see. See my answers above. Malyacko (talk) 20:55, 19 May 2020 (UTC)
@Malyacko So, you are saying that either we can use test.wikipedia.org or should setup our own mediawiki? HarshithaNallani (talk) 05:18, 20 May 2020 (UTC)
Yes, I think that's what I wrote above. Malyacko (talk) 12:16, 20 May 2020 (UTC)

Is there a formal guide recommending how to use Cite for RTL projects?

Hello to the community members;

I have googled:

Cite RTL MediaWiki

In the first page I only found several Support Desk posts I myself created;

Such as this one which I mistakenly suggested to mark as solved (and it was) because the following proves it wasn't really solved:

Project:Support desk/Flow/2020/05#h-Calling_a_footnote_by_name_doesn't_work_in_a_designated_RTL_template-2020-05-13T14:25:00.000Z

Is there a formal guide recommending how to use Cite for RTL projects?

Especially in a Lua/Scribunto-free way (no Lua, no Scribunto, no non core programming language and not anything like that - just templates). 182.232.3.128 (talk) 09:16, 18 May 2020 (UTC)

I went after pages two and three associated with the same search keyword and didn't find anything as well; just similar posts with one or two replies which doesn't feature any template (let along template and explanation). 182.232.3.128 (talk) 10:41, 19 May 2020 (UTC)
@Amire80 perhaps you had the honor to take part in some book writing which includes a chapter about this?
I will gladly buy this book from Amazon/Ebay/You name it. 182.232.3.128 (talk) 10:42, 19 May 2020 (UTC)
No, I didn't write a book about it. I hope that a book about it is not needed :)
In practice, the most detailed page I know about this is probably the footnotes guide in the Hebrew Wikipedia, and something tells me that you can read Hebrew: ויקיפדיה:הערות שוליים
It's not the best and the most comprehensive page, and there probably should be a page about it in English, that would be translatable to Hebrew, Arabic, Persian, Pashto, etc., but I'm not aware of such a page that already exists. Perhaps I should do it Some Day™. Amir E. Aharoni {{🌎🌍🌏}} 11:10, 19 May 2020 (UTC)
Amire80, I share your hope that such a book isn't needed.
I have just read:
  • ויקיפדיה:הערות שוליים
  • עזרה:הערת שוליים - מדריך מקוצר
  • תבנית:הערה
In either have I found any reminding of the terms Cite, RTL or Lua.
I humbly admit that I am surprised that no RTL documentation is available in 2020 in English, allegedly anywhere.
I hope for more RTL content from the gentlewomen and gentlemen developing multilingual support in WikiMedia foundation. 182.232.3.128 (talk) 12:51, 19 May 2020 (UTC)
Well, the title of bug #1 in the MediaWiki bug tracker is "Documentation is out of date, incomplete", and it's not really resolved. There are exceptions to this rule, but unfortunately the MediaWiki world often operates in the "make it work and then forget about it" mode and not in the "engineer and document it properly" mode. I'm guilty of it myself. Amir E. Aharoni {{🌎🌍🌏}} 12:59, 19 May 2020 (UTC)

Please unmark as solved:

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 unmark this as solved: Project:Support desk/Flow/2020/04#h-How_to_use_Cite_extension_in_RTL_projects?-2020-04-21T04:19:00.000Z

I sadly got the conclusion that this is far from being solved;

Evidence: Project:Support desk/Flow/2020/05#h-Calling_a_footnote_by_name_doesn't_work_in_a_designated_RTL_template-2020-05-13T14:25:00.000Z 182.232.3.128 (talk) 11:05, 18 May 2020 (UTC)

Please comment in https://www.mediawiki.org/wiki/Project%3ASupport%20desk/Flow/2020/05#h-Calling_a_footnote_by_name_doesn%27t_work_in_a_designated_RTL_template-2020-05-13T14%3A25%3A00.000Z instead of creating more and more threads. Malyacko (talk) 12:29, 18 May 2020 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

MediaWiki slow + MIME type ('text/html') is not executable

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 MediaWiki on Windows Server 2016 and IIS 10.0 and it works but is really slow. I am using Chrome and LDAP auth. The pages load but it takes ages.


I get the error:

Refused to execute script from 'https://myserver.com/load.php?lang=en-gb&modules=startup&only=scripts&raw=1&skin=vector' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.


If I browse to /load.php?lang=en-gb&modules=startup&only=scripts&raw=1&skin=vector I get the error:

Fatal error: Maximum execution time of 30 seconds exceeded in C:\path\mediawiki\includes\debug\logger\LegacyLogger.php on line 493


Logging is enabled:

$wgShowExceptionDetails = true;

$wgShowDBErrorBacktrace = true;

$wgDebugComments = true;

$wgDebugLogFile = 'C:\Windows\Temp\MediaWiki\debug-{$wgDBname}.log';


I am not sure where else to check? Kittencorn (talk) 14:50, 18 May 2020 (UTC)

For slowness, try installing XCache (and after install set $wgMainCacheType = CACHE_ACCEL; )
Generally we do performance testing on apache with apcu, you might consider trying that instead.
For the other error - open the page in question, does it start with an error? It should be just javascript code. Also enable php error logging (different from mediawiki logging) check for any errors, especially headers already sent errors Bawolff (talk) 19:25, 18 May 2020 (UTC)
Thanks - I followed instructions to install WinCache, but I cant find any example config for it. I will look at php logging asap. Kittencorn (talk) 16:20, 19 May 2020 (UTC)
I have enabled php logging, but I am not getting any errors:
[PHP]
error_reporting = E_ALL
display_errors = On
log_errors = On
error_log = C:\Windows\Temp\MediaWiki\php.log Kittencorn (talk) 16:24, 20 May 2020 (UTC)
so the "Fatal error: Maximum execution time of 30 seconds exceeded in C:\path\mediawiki\includes\debug\logger\LegacyLogger.php on line 493" is the problem here.
Maybe that is something that wincache can help with a bit, but in the meantime, set max_execution_time in php.ini to a higher value.
For wincache config - the main thing is to set $wgMainCacheType = CACHE_ACCEL; in LocalSettings.php. for other config, you may have to load the extension in your php.ini. for best results, you may want to increase wincache.ucachesize. 32 (mb) might be a good value. But generally the defaults will be fine. See https://www.php.net/manual/en/wincache.configuration.php for more info. Bawolff (talk) 00:37, 21 May 2020 (UTC)
30 seconds is a really long time, I can increase it but surely it would be really slow?
I have:
## Shared memory settings
$wgMainCacheType = CACHE_ACCEL;
$wgMemCachedServers = [];
Using:
wfLoadExtension( 'WikiEditor' );
wfLoadExtension( 'PluggableAuth' );
wfLoadExtension( 'Auth_remoteuser' );
wfLoadExtension( 'LDAPAuthentication2' );
wfLoadExtension( 'LDAPAuthorization' );
wfLoadExtension( 'LDAPProvider' );
wfLoadExtension( 'LDAPUserInfo' );
wfLoadExtension( 'LDAPGroups' );
php.ini:
display_errors = On
log_errors = On
error_log = C:\Windows\Temp\MediaWiki\php.log
[wincache]
extension = php_wincache.dll
I cant get it to generate errors at all - it is just slow and eventually times out. I am on an internal high-speed network, so I don't know what else could be causing it. Kittencorn (talk) 09:07, 26 May 2020 (UTC)
I am using php 7.3 and the WinCache dll from https://sourceforge.net/projects/wincache/files/wincache-2.0.0/. The web server doesn't have internet access so I cant use the web platform installer. Kittencorn (talk) 09:20, 26 May 2020 (UTC)
Check the server resources. If when a page loads it takes a significant amount of CPU, the problem is that the server is too slow or there are other heavy processes running.
If the CPU is mostly idle, the problem would be I/O contention: network or disk latency. If the database is on a different server, be sure to also check it.
On windows there's a known issue when connecting to MySql when the database server is set as localhost. Try 127.0.0.1 instead. See Manual:$wgDBserver Ciencia Al Poder (talk) 14:12, 26 May 2020 (UTC)
I opened a new topic because it was really a whole new error: Project:Support desk/Flow/2020/05#h-WinCache_not_working_-_IIS-2020-05-26T13:54:00.000Z. Its seems I just cant get the cache to work. Kittencorn (talk) 14:31, 26 May 2020 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

How can i get first created 100 articles list with titles and author names ?

I was trying to get first 100 pages created in any Wikipedia project with their author names. Is there any way that i can use tool or query the list?

I want with there timestamp created and deleted as well? Ramu ummadishetty (talk) 16:28, 18 May 2020 (UTC)

See API:Query. If you have specific questions, please share what exactly you have tried already (commands). Malyacko (talk) 19:32, 18 May 2020 (UTC)
It may be easier to use https://quarry.wmflabs.org for this type of question Bawolff (talk) 04:10, 19 May 2020 (UTC)
https://quarry.wmflabs.org/query/44970 I am using this query but don't know that is right or wrong . First what i tried is to fetch page titles with timestamp i.e date wise from starting of Wikipedia . Here i need page title with created date and if it is deleted that date and user name written by it . I know that i am not near to it but trying to figure it out . Ramu ummadishetty (talk) 07:58, 19 May 2020 (UTC)
Your query does not query created pages but only queries deleted pages as you are querying Manual:Archive table. Malyacko (talk) 13:55, 19 May 2020 (UTC)

mw-config blank

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.


Fatal error: Uncaught Error: Call to undefined function MediaWiki\Session\session_id() in /var/www/mediawiki/includes/session/SessionBackend.php:245 Stack trace: #0 /var/www/mediawiki/includes/session/Session.php(98): MediaWiki\Session\SessionBackend->resetId() #1 /var/www/mediawiki/includes/session/SessionManager.php(861): MediaWiki\Session\Session->resetId() #2 /var/www/mediawiki/includes/session/SessionManager.php(196): MediaWiki\Session\SessionManager->getSessionFromInfo(Object(MediaWiki\Session\SessionInfo), Object(WebRequest)) #3 /var/www/mediawiki/includes/WebRequest.php(806): MediaWiki\Session\SessionManager->getSessionForRequest(Object(WebRequest)) #4 /var/www/mediawiki/includes/user/User.php(1246): WebRequest->getSession() #5 /var/www/mediawiki/includes/user/User.php(324): User->loadDefaults() #6 /var/www/mediawiki/includes/user/User.php(5130): User->load() #7 /var/www/mediawiki/includes/user/User.php(2966): User->loadOptions() #8 /var/www/mediawiki/includes/context/RequestContext.php(344): User->getOption('lang in /var/www/mediawiki/includes/session/SessionBackend.php on line 245

running on alpine linux with all the php dependencies installed Erentar2002 (talk) 17:27, 18 May 2020 (UTC)

Did you recently perform a MediaWiki update? If so, did you extract the new files into a separate folder or did you overwrote them into the old one? AhmadF.Cheema (talk) 17:34, 18 May 2020 (UTC)
This is a fresh install of mediawiki 1.34.1 from the tar archive Erentar2002 (talk) 17:36, 18 May 2020 (UTC)
Maybe the sessions PHP extension is not installed? AhmadF.Cheema (talk) 07:29, 19 May 2020 (UTC)
It worked! thanks! i was missing php7-session and php7-dom Erentar2002 (talk) 08:32, 19 May 2020 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

TranslateWiki

https://translatewiki.net/wiki/MediaWiki:Wikibasemediainfo-time-precision-year1k/en says "millenium" which should be "millennium", but it isn't possible to edit and FuzzyBot imported it from an external source. What is the URL of that external source? I would have asked at TranslateWiki but the support page is closed. Peter James (talk) 18:15, 18 May 2020 (UTC)

@Peter James Extension:WikibaseMediaInfo. See the "Report a bug" link on that page. Malyacko (talk) 19:31, 18 May 2020 (UTC)
Thank you. I think I've found the source; reported at phab:T253060. Peter James (talk) 20:22, 18 May 2020 (UTC)

How does version control work for Mediawiki

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


I'm a new user of mediawiki and am worried about how much space old page versions take up. When you make a contribution, are only the changes saved on the disk, or a whole copy of a page? YousufSSyed (talk) 02:18, 19 May 2020 (UTC)

whole copy.
See also manual:$wgCompressRevisions. There are also special compression methods you can use that take into account similarities between page versions. See docs for manual:compressOld.php. There are also systems for sharding page storage manual:External Storage.
Generally speaking, size of page text is not a limitting factor for most users, and is probably less than you think. Bawolff (talk) 04:07, 19 May 2020 (UTC)
I didn't understand the page manual:compressOld.php, can you explain how I could make revisions only save the changes made to them rather than the whole page, and if that could be compressed? YousufSSyed (talk) 05:52, 19 May 2020 (UTC)
If something specific is unclear about that page, please point out that specific sentence or section and why it is unclear. Thanks! Malyacko (talk) 09:10, 19 May 2020 (UTC)
I got it after some re reading, but still, how can I make mediawiki save only differences between pages? YousufSSyed (talk) 19:50, 19 May 2020 (UTC)
@YousufSSyed See Project:Support desk/Flow/2020/05#h-How_can_I_make_Mediawiki_save_only_differences_between_revisions,_Instead_of_cop-2020-05-19T19:49:00.000Z instead, where you ask the very same question. Please don't double-post so volunteers might spend double their time answering in several places. Thanks! Malyacko (talk) 09:53, 20 May 2020 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Change the Root Password

we need to change the phpMy Admin password from the default value . This basically means changing MySQL root password but I can only get so far without breaking the Mediawiki software.

We have done so far but basically we were running with “skip-table-grants” and to force the use of the non-default password I have had to remove that option from my.ini.   This fixes the phyMyAdmin issue identified by audit (default password) but breaks the Mediawiki . Amitkumar202020 (talk) 05:52, 19 May 2020 (UTC)

Your changes to database credentials will also have to be reflected for $wgDBuser and $wgDBpassword variables which are defined in your Wiki's LocalSettings.php file. AhmadF.Cheema (talk) 07:21, 19 May 2020 (UTC)

How to know if a command is a Wiki syntax command or a Lua command isntead?

I don't know basically anything about Lua;

Some Lua commands utilized in different Wikipedias have the same pattern of Wiki syntax commands;

For example:

  • #tag:ref is a Wiki syntax command
  • #invoke:VALUE is a Lua command

Given I am not a Lua programmer (nor am I a big specialist in Wiki syntax) how could I know, for example, if:

#if:X is a Wiki syntax command or a Lua command (or both)?

How to know if a command is a Wiki syntax command or a Lua command isntead? 182.232.3.128 (talk) 11:54, 19 May 2020 (UTC)

A better question might be:
How to differentiate between Wiki syntax commands and Lua commands? 182.232.3.128 (talk) 12:11, 19 May 2020 (UTC)
Under Tools, look at the Page information. If it says Page content model: wikitext, it's Wiki syntax. If it says Scribunto, it's Lua. FriedhelmW (talk) 13:46, 19 May 2020 (UTC)
"#invoke:" is a wikisyntax command to use a lua syntax command from wikitext, if you want to get technical. Bawolff (talk) 19:36, 19 May 2020 (UTC)
@Bawolff thanks
About the term "lua syntax command"
Didn't you mean just "Lua" or "Lua syntax" (inside wikisyntax)? 182.232.187.77 (talk) 00:32, 20 May 2020 (UTC)
Depends how you define those terms.
"#invoke:" is wiki-syntax that calls or invokes a foreign procedure written in lua. Bawolff (talk) 00:49, 20 May 2020 (UTC)
@FriedhelmW I understand your point but perhaps there could be bias if someone copies Lua code without even knowing that it's Lua code and then checks "Page information".
I personally don't do that (I avoid coping and/or executing codes I don't properly understand) but I just wanted to present this possible mode. 49.230.71.93 (talk) 05:52, 20 May 2020 (UTC)
Also, from the answers and a personal test for this template:
https://ur.wikipedia.org/wiki/%D8%B3%D8%A7%D9%86%DA%86%DB%81:Refn
I understand that this template (which includes #if:X) is a wikisyntax page, as "text style" in its page information is "Wiki Text" (or thus appears from a Google translate translation) and therefore that #if:X is wikisyntax. 49.230.71.93 (talk) 05:56, 20 May 2020 (UTC)
@FriedhelmW I meant "copying Lua without having Scribunto installed"* 49.230.71.93 (talk) 05:57, 20 May 2020 (UTC)

Api.php Error: Could not open mw-UIDGenerator-UUID-128

I have two mediawiki's installed on my server.

On my first mediawiki the api.php works just fine.

On my second mediawiki I get the following error:

/view/api.php RuntimeException from line 450 of /home/wiki/domains/wiki.mydomain.com/public_html/view/includes/utils/UIDGenerator.php: Could not open '/domains/wiki.mydomain.com/tmp/mw-UIDGenerator-UUID-128'.

Backtrace:

#0 /home/wiki/domains/wiki.mydomain.com/public_html/view/includes/utils/UIDGenerator.php(224): UIDGenerator->getTimeAndDelay(string, integer, integer, integer)

#1 /home/wiki/domains/wiki.mydomain.com/public_html/view/includes/api/ApiMain.php(1645): UIDGenerator::newUUIDv1()

#2 /home/wiki/domains/wiki.mydomain.com/public_html/view/includes/api/ApiMain.php(539): ApiMain->logRequest(double, RuntimeException)

#3 /home/wiki/domains/wiki.mydomain.com/public_html/view/includes/api/ApiMain.php(502): ApiMain->executeActionWithErrorHandling()

#4 /home/wiki/domains/wiki.mydomain.com/public_html/view/api.php(87): ApiMain->execute()

#5 {main}


So I created a second /tmp/ folder and set it in the localsettings.php:

$wgTmpDirectory = "/domains/wiki.mydomain.com/tmp";


The folder itself:

drwxr-xr-x 2 wiki wiki 4096 May 19 14:40 tmp

Chmod 755


Any ideas? :( Utini (talk) 12:58, 19 May 2020 (UTC)

check permissions of stuff inside tmp directory. Bawolff (talk) 15:12, 19 May 2020 (UTC)
tmp is empty Utini (talk) 16:40, 19 May 2020 (UTC)
No one? :( Utini (talk) 19:00, 20 May 2020 (UTC)
are you sure you have $wgTmpDirectory set right. Perhaps you meant to do $wgTmpDirectory = "/home/wiki/domains/wiki.mydomain.com/tmp";
Instead. Bawolff (talk) 00:39, 21 May 2020 (UTC)
I was sure I tried that before as well... but I probably did a typo or something. Your solution fixed it. Thanks! Utini (talk) 09:57, 21 May 2020 (UTC)

LDAPAuthentication2 Setup

I've been following the instructions (posted with the LDAP Stack extensions) on how to setup the LDAP authentication with some difficulty. I'm currently at a loss, and have tried for a few hours to get this right. Any help would be really appreciated!

I think all of the extensions are installed and setup properly. I've made sure to chown -R apache:apache for all of the installed extensions.


But when I run the update.php system, I receive this message:

[administrator@ubsa-web wiki]$ php maintenance/update.php

Found invalid JSON in file: /var/www/html/wiki/ldap.json

[38e932627974f1bcc47e1156] [no req]   MWException from line 42 of /var/www/html/wiki/extensions/LDAPProvider/src/DomainConfigProvider/LocalJSONFile.php:

Could not access configuration file '/etc/mediawiki/ldapprovider.json'!

Please set up a domain configuration file for the LDAPProvider extension.

Backtrace:

#0 /var/www/html/wiki/extensions/LDAPProvider/src/DomainConfigProvider/LocalJSONFile.php(73): MediaWiki\Extension\LDAPProvider\DomainConfigProvider\LocalJSONFile->__construct(string)

#1 [internal function]: MediaWiki\Extension\LDAPProvider\DomainConfigProvider\LocalJSONFile::newInstance(MediaWiki\Extension\LDAPProvider\Config)

#2 /var/www/html/wiki/extensions/LDAPProvider/src/DomainConfigFactory.php(106): call_user_func_array(string, array)

#3 /var/www/html/wiki/extensions/LDAPAuthentication2/src/Setup.php(12): MediaWiki\Extension\LDAPProvider\DomainConfigFactory::getInstance()

#4 /var/www/html/wiki/includes/Setup.php(906): MediaWiki\Extension\LDAPAuthentication2\Setup::init()

#5 /var/www/html/wiki/maintenance/doMaintenance.php(83): require_once(string)

#6 /var/www/html/wiki/maintenance/update.php(277): require_once(string)

#7 {main}

I'm running on CentOS7 apache php7.2. I can connect to our LDAP system using this web server for other packages like OwnCloud.

When I go to the login screen, it gives me the option of local or the domain authentication.


But when trying to login using LDAP/AD, I get the following:

[XsP8CcWSnGSXTwj7yKISUgAABM4] 2020-05-19 15:32:25: Fatal exception of type MWException


ldap.json file:

{

  "itorg.ad.buffalo.edu": {

     "connection": {

        "server": "itorg.ad.buffalo.edu",

        "port": "636",

        "user": "CN=BLANKED-FOR-THIS-POST,OU=Groups,OU=UBSA,OU=StudentAssociation,OU=ITORGS,DC=itorg,DC=ad,D$

        "pass": "BLANKED-FOR-THIS-POST",

        "enctype": "clear",

        "options": {

                "LDAP_OPT_DEREF": 1

        },

        "basedn": "DC=itorg,DC=ad,DC=buffalo,DC=edu",

        "userbasedn": "DC=itorg,DC=ad,DC=buffalo,DC=edu",

        "groupbasedn": "DC=itorg,DC=ad,DC=buffalo,DC=edu",

        "searchattribute": "samaccountname",

        "usernameattribute": "samaccountname",

        "realnameattribute": "cn",

        "emailattribute": "mail",

        "grouprequest": "MediaWiki\\Extension\\LDAPProvider\\UserGroupsRequest\\UserMemberOf::f$

        "presearchusernamemodifiers": [ "spacestounderscores", "lowercase" ]

     },

     "userinfo": [],

     "authorization": [],

     "groupsync": {

        "mapping": {

           "sysop": "CN=UBSA_Pro_Staff,DC=itorg,DC=ad,DC=buffalo,DC=edu"

        }

     }

   }

}


LDAP Setting in LocalSettings.php:

//LDAP Authentication Config

$wgMinimalPasswordLength = 6;

$wgPasswordPolicy['policies']['sysop']['MinimalPasswordLength'] = 6;

$wgPasswordPolicy['policies']['Administrators']['MinimalPasswordLength'] = 6;

$wgPasswordPolicy['policies']['interface-admin']['MinimalPasswordLength'] = 6;

$wgPasswordPolicy['policies']['bureaucrat']['MinimalPasswordLength'] = 6;

wfLoadExtension( 'LDAPProvider' );

wfLoadExtension( 'PluggableAuth' );

wfLoadExtension( 'LDAPAuthentication2' );

$LDAPAuthentication2AllowLocalLogin = true;

// Create Wiki-Group 'engineering' from default user group

$wgGroupPermissions['UBSA_Pro_Staff'] = $wgGroupPermissions['sysop'];

// Private Wiki. External LDAP login. Default NS requires login.

$wgEmailConfirmToEdit = false;

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

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

$wgGroupPermissions['*']['createaccount'] = false;

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

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

$wgBlockDisablesLogin = true;

// Load LDAP Config from JSON

$ldapJsonFile = "$IP/ldap.json";

$ldapConfig = false;

if (is_file($ldapJsonFile) && is_dir("$IP/extensions/LDAPProvider")) {

  $testJson = @json_decode(file_get_contents($ldapJsonFile),true);

  if (is_array($testJson)) {

    $ldapConfig = true;

  } else {

    error_log("Found invalid JSON in file: $IP/ldap.json");

  }

}

$wikiRequestSafe  = true;

// Activate Extension

if ( $ldapConfig ) {

  wfLoadExtension( 'PluggableAuth' );

  wfLoadExtension( 'LDAPProvider' );

  wfLoadExtension( 'LDAPAuthentication2' );

  wfLoadExtension( 'LDAPAuthorization' );

  wfLoadExtension( 'LDAPUserInfo' );

  wfLoadExtension( 'LDAPGroups' );

  $LDAPProviderDomainConfigs = $ldapJsonFile;

  $wgPluggableAuth_ButtonLabel = "Log In";

  if ($wikiRequestSafe) { $LDAPAuthentication2AllowLocalLogin = true; }

} Rosenblitt (talk) 15:45, 19 May 2020 (UTC)

Looks like "$IP/ldap.json" is not accessible then running the CLI script "maintenance/update.php".
Strange thing is, that it obviously is accessible when using the web interface. Otherwise the login form would not display the Domain name.
To get a better error message than "Fatal exception of type MWException", please add the following lines to your "LocalSettings.php" file:
$wgShowExceptionDetails = true;
$wgShowSQLErrors = true;
$wgShowDBErrorBacktrace = true; Osnard (talk) 16:18, 19 May 2020 (UTC)
Thanks for the reply!!! This is what I got after trying to login:
[XsQUTLZuY8gaqJ-QEWcbjQAABoQ] /index.php?title=Special:PluggableAuthLogin MWException from line 168 of /var/www/html/wiki/extensions/LDAPProvider/src/Client.php: Could not bind to LDAP: (-1) Can't contact LDAP server
Backtrace:
#0 /var/www/html/wiki/extensions/LDAPProvider/src/Client.php(91): MediaWiki\Extension\LDAPProvider\Client->establishBinding()
#1 /var/www/html/wiki/extensions/LDAPProvider/src/Client.php(328): MediaWiki\Extension\LDAPProvider\Client->init()
#2 /var/www/html/wiki/extensions/LDAPAuthentication2/src/PluggableAuth.php(77): MediaWiki\Extension\LDAPProvider\Client->canBindAs(string, string)
#3 /var/www/html/wiki/extensions/PluggableAuth/includes/PluggableAuthLogin.php(31): MediaWiki\Extension\LDAPAuthentication2\PluggableAuth->authenticate(NULL, string, NULL, NULL, NULL)
#4 /var/www/html/wiki/includes/specialpage/SpecialPage.php(575): PluggableAuthLogin->execute(NULL)
#5 /var/www/html/wiki/includes/specialpage/SpecialPageFactory.php(611): SpecialPage->run(NULL)
#6 /var/www/html/wiki/includes/MediaWiki.php(296): MediaWiki\Special\SpecialPageFactory->executePath(Title, RequestContext)
#7 /var/www/html/wiki/includes/MediaWiki.php(900): MediaWiki->performRequest()
#8 /var/www/html/wiki/includes/MediaWiki.php(527): MediaWiki->main()
#9 /var/www/html/wiki/index.php(44): MediaWiki->run()
#10 {main}
Seems like its not talking to the LDAP server? But would this be connected to the Update.php issue? I see in the instructions, until I can run update.php successfully some stuff needed for LDAP wont be written to the SQL DB.
Should I try running update.php as apache using sudo? Currently running it as the local user account. Rosenblitt (talk) 17:19, 19 May 2020 (UTC)
So I ran update.php using sudo -u apache and it completed without error. However, I'm still getting the error I posted just above this. Rosenblitt (talk) 18:40, 19 May 2020 (UTC)
Ok, so the connection issue was the encryption type. I'm using SSL connections, and it was set to "clear". Now its set to SSL, and the error is
[XsRZdLZuY8gaqJ-QEWcfHQAABpQ] /index.php?title=Special:PluggableAuthLogin MWException from line 168 of /var/www/html/wiki/extensions/LDAPProvider/src/Client.php: Could not bind to LDAP: (49) Invalid credentials
I know the credentials I'm using are correct. I'm using the same username/PW for LDAP connections on Joomla, OwnCloud, and a few other systems. I even double checked and logged into Apache Directory Studio using the same credentials.
I also double checked, php-ldap is installed and enabled.
I'll keep working on this, but any ideas/help wold be greatly appreciated.

Rosenblitt (talk) 22:29, 19 May 2020 (UTC)
Got it all figured out. It was OU related. Thanks for the help @Osnard, your nudge is what got me moving again. Rosenblitt (talk) 01:42, 20 May 2020 (UTC)
what was the exact solution on OU?
For example on my company there's no specifics OU Ctorrestesam (talk) 15:49, 28 March 2022 (UTC)
Good to hear! Have fun with your wiki :) Osnard (talk) 09:11, 20 May 2020 (UTC)
Hi all,
I am a newbie in mediawiki. I do not have any knowledge about webserver (because i am a embedded programmer). But now i need to deploy a website which saved all document of our project.
Recently, I run a local mediawiki successfull. And now, i want to integrate LDAP feature for another colleagues who can authen and author through existing data from our company data.
I setup my LDAP as the following steps, please help me to check this:
  1. Download LDAPAuthentication2 and extract to \extensions folder. Add wfLoadExtension( 'LDAPAuthentication2' ); to LocalSettings.php.
  2. Download LDAPProvider and extract to \extensions folder. Add wfLoadExtension( 'LDAPProvider' ); to LocalSettings.php.
  3. Download PluggableAuth and extract to \extensions folder. Add wfLoadExtension( 'PluggableAuth' ); to LocalSettings.php.
  4. Add more to LocalSettings.php:
$wgPluggableAuth_EnableAutoLogin = false;
$wgPluggableAuth_EnableLocalLogin = false;
$wgPluggableAuth_EnableLocalProperties = false;
$wgPluggableAuth_ExtraLoginFields = [];
$wgShowExceptionDetails = true;
$wgShowSQLErrors = true;
$wgShowDBErrorBacktrace = true;
5. That's it. I do not add anything more.
6. I run: php maintenance\update.php and get the following error:
C:\xampp\htdocs\w\maintenance>php update.php
[17efe3e1264caa9b02bf0038] [no req]   MWException from line 42 of C:\xampp\htdocs\w\extensions\LDAPProvider\src\DomainConfigProvider\LocalJSONFile.php:
Could not access configuration file '/etc/mediawiki/ldapprovider.json'!
Please set up a domain configuration file for the LDAPProvider extension.
Backtrace:
#0 C:\xampp\htdocs\w\extensions\LDAPProvider\src\DomainConfigProvider\LocalJSONFile.php(73): MediaWiki\Extension\LDAPProvider\DomainConfigProvider\LocalJSONFile->__construct(string)
#1 [internal function]: MediaWiki\Extension\LDAPProvider\DomainConfigProvider\LocalJSONFile::newInstance(MediaWiki\Extension\LDAPProvider\Config)
#2 C:\xampp\htdocs\w\extensions\LDAPProvider\src\DomainConfigFactory.php(106): call_user_func_array(string, array)
#3 C:\xampp\htdocs\w\extensions\LDAPAuthentication2\src\Setup.php(12): MediaWiki\Extension\LDAPProvider\DomainConfigFactory::getInstance()
#4 C:\xampp\htdocs\w\includes\Setup.php(906): MediaWiki\Extension\LDAPAuthentication2\Setup::init()
#5 C:\xampp\htdocs\w\maintenance\doMaintenance.php(83): require_once(string)
#6 C:\xampp\htdocs\w\maintenance\update.php(277): require_once(string)
#7 {main}
7. And i reload the main page and get the same errors message.
Please help me to install LDAP completely (as detailed as possible). Please please and please.
Thank you so much. Uocptit 0905 (talk) 11:13, 29 May 2020 (UTC)
Did you create the ldap.json file containing the LDAP connection information? Rosenblitt (talk) 15:34, 29 May 2020 (UTC)
No I don't. Do you have guideline for create the ldap.json @Rosenblitt?
Thank you. Uocptit 0905 (talk) 04:23, 1 June 2020 (UTC)
Have a look at LDAP_hub/Migration_from_extension_LDAPAuthentication#Example_1. Not JSON, but PHP. Should also work. Osnard (talk) 13:10, 2 June 2020 (UTC)
What would need to be added to the ldapprovider.json file for automatic creation of a wiki account if all that is required would be a valid AD user? Nlazarow (talk) 22:30, 27 September 2021 (UTC)
Nothing. Extension:PluggableAuth, which is the base of Extension:LDAPAuthentication2, will automatically create an user on login, as long as the * group has the autocreateaccount permission assigned. Osnard (talk) 12:18, 28 September 2021 (UTC)
Not sure if this should go to a new topic or not, but I have been beating my head against a wall for a while.
I have a mediawiki (v 1.31) page, and want to auto-create accounts based on a successful LDAP search.
Having tested both CheckLogin.php and ShowUserInfo.php on my own credentials I get successful results.
How can I get the username information from a registration page into the $wgAuthRemoteuserUserName variable? Nlazarow (talk) 19:28, 29 September 2021 (UTC)
Here's my relevant configuration information:
### LDAP Extension Loads:
wfLoadExtension ( 'PluggableAuth' );
wfLoadExtension ( 'LDAPProvider' );
wfLoadExtension ( 'LDAPAuthentication2' );
wfLoadExtension ( 'LDAPAuthorization' );
wfLoadExtension ( 'LDAPGroups' );
wfLoadExtension ( 'LDAPUserInfo' );
wfLoadExtension ( 'Auth_remoteuser' );
### LDAPProvider / LDAPAuthentication2 Config:
$LDAPProviderDomainConfigs = "/etc/mediawiki/ldapprovider.json";
$LDAPProviderDomainConfigProvider = "\\MediaWiki\\Extension\\LDAPProvider\\DomainConfigProvider\\LocalJSONFile::newInstance";
$LDAPProviderCacheType            = "CACHE_ANYTHING" ;
$LDAPProviderCacheTime            = 500 ;
$wgGroupPermissions['*']['createaccount'] = true;
$wgGroupPermissions['*']['autocreateaccount'] = true;
$LDAPAuthentication2UsernameNormalizer = 'strtolower';
$LDAPAuthentication2AllowLocalLogin = true;
$wgAuthRemoteuserAllowUserSwitch = true;
$wgPluggableAuth_EnableLocalLogin = false;
LDAP JSON file (/etc/mediawiki/ldapprovider.json):
#------------------------------------------------------------------------#
{
        "DOMAIN": {
                "connection": {
                        "server": "<REDACTED>",
                        "user": "<REDACTED>",
                        "port": "3269",
                        "pass": "<REDACTED>",
                        "enctype": "ssl",
                        "options": {
                                "LDAP_OPT_DEREF": 1
                        },
                        "basedn": "<REDACTED>",
                        "groupbasedn": "<REDACTED>",
                        "userbasedn": "<REDACTED>",
                        "searchattribute": "samaccountname",
                        "searchstring": "domain\\USER-NAME",
                        "usernameattribute": "samaccountname",
                        "realnameattribute": "cn",
                        "emailattribute": "mail",
                        "domain-backslash-username": "MediaWiki\\Extension\\LDAPAuthorization\\AutoAuth\\RemoteUserStringParser\\DomainBackslashUsername::factory",
                        "grouprequest": "MediaWiki\\Extension\\LDAPProvider\\UserGroupsRequest\\UserMemberOf::factory",
                        "presearchusernamemodifiers": [ "spacestounderscores", "lowercase" ]
                },
         "userinfo": [],
         "authorization": {
                     "rules": {
                           "groups": {
                                "required": [ "CN=Domain Users,CN=Users,<REDACTED>" ]
                           }
                     }
          }
        }
}
#------------------------------------------------------------------------#
Since I have run successful tests on the ShowUserInfo.php and CheckLogin.php, I believe that there is nothing wrong with
my ldapprovider.json file, and the trouble is with how $wgAuthRemoteuserUserName should be assigned. The method I have
currently always returns null, apparently because $_SERVER[ 'REMOTE_USER' ] does not appear to be set.
$wgAuthRemoteuserUserName = function() {
        $user = '';
        if( isset( $_SERVER[ 'REMOTE_USER' ] ) ) {
                $user = strtolower( $_SERVER[ 'REMOTE_USER' ] );
        }
        return $user;
}; Nlazarow (talk) 19:57, 29 September 2021 (UTC)
Extension:LDAPAuthorization will transform a remote user name into one that is actually required by the other extensions. E.g. assume that $_SERVER['REMOTE_USER'] === 'DOMAIN\\JaneDoe', you can use
$LDAPAuthorizationAutoAuthRemoteUserStringParser = "domain-backslash-username";
to have Extension:LDAPAuthorization extract "DOMAIN" (careful: case sensitive!) and load the proper domain config from LDAPProvider. It will also rewrite the username to "Janedoe" implicitly, so you don't need to modify $wgAuthRemoteuserUserName on your own.
If you have $_SERVER['REMOTE_USER'] === 'JaneDoe@DOMAIN', you can use
$LDAPAuthorizationAutoAuthRemoteUserStringParser = "username-at-domain";
instead.
Be aware that for using Extension:Auth_remoteuser you need to have a network based authentication like Kerberos or NTLM be set up in the webserver. This is a completely different authentication method than using the Special:Userlogin form in the wiki. Osnard (talk) 07:58, 30 September 2021 (UTC)
Thanks for that information. As a follow-up question, I saw that there is a ConfirmAccount extension for the mediawiki software. Has anybody updated this for implementation with the current LDAP Stack extensions? Nlazarow (talk) 03:39, 1 October 2021 (UTC)
I don't think so. Unfortunately I do not know Extension:ConfirmAccount well enough to give an estimation of whether it is compatible or not. Osnard (talk) 14:50, 1 October 2021 (UTC)
I got LDAP authentication working on the directory containing the wiki through the Apache web server. Now I am still running into
trouble automatically creating accounts on the mediawiki. While using an phpinfo page on the directory, I found that the
authentication information is present in the $_SERVER['REMOTE_USER'] and $_SERVER['PHP_AUTH_PW'] variables.
How can I feed that information into the wiki database to automatically create the user account? Nlazarow (talk) 22:38, 1 November 2021 (UTC)
Using Extension:Auth_remoteuser the existence of $_SERVER['REMOTE_USER'] will be sufficient. Just set up the extension as described on the linked page. Osnard (talk) 09:31, 4 November 2021 (UTC)
so I took a suggestion from one of your answers to another user in a similar situation to export the value of the $_SERVER['REMOTE_USER'] into a log file, and it simply came back as 'username', with no domain suffix or prefix (not username@domain.com or domain\username) attached.
I also am receiving this message in the wiki debug:
[session] Can't login remote user 'username' automatically. Blocked this user when applying filter to ''.
I'm not sure how to get around this. Do the single quotes need to get stripped before the username
can get passed in? Nlazarow (talk) 19:33, 12 November 2021 (UTC)
LDAPAuthorization binds into Auth_remoteuser and expects the username to have a certain pattern. Try
$wgAuthRemoteuserUserName = function() {
	if( isset( $_SERVER[ 'REMOTE_USER' ] ) ) {
		$user = 'DOMAIN\\' . $_SERVER[ 'REMOTE_USER' ];
	}
	return $user;
};
in your LocalSetting.php (given you have the value DOMAIN as a key in your domain config). Osnard (talk) 07:36, 19 November 2021 (UTC)
Osnard,
I have a function similar to what you have in your previous response for the assignent of the $wgAuthRemoteuserUserName parameter, and it seems to be working to generate a correct value.
#=====================================
$wgAuthRemoteuserUserName = function() {
        $user = "";
        if( isset( $_SERVER['REMOTE_USER'] ) ) {
          $user = "dnanico1\\".$_SERVER['REMOTE_USER'];
          error_log( var_export( $user, true ),3,"/var/log/mediawiki/remote_username_output.txt" );
        }
        return $user;
};
#======================================
However, I still get a failure when attempting to log in to the wiki itself. Below is a capture of the attempted
login session. What am I missing?
IP: 10.61.202.6
Start request POST /ANPAC/wiki/index.php?title=Special:UserLogin&returnto=Main+Page
HTTP HEADERS:
HOST: svpx-anp02.dnanico1.aniconet.com
CONNECTION: keep-alive
CONTENT-LENGTH: 200
CACHE-CONTROL: max-age=0
AUTHORIZATION: Basic Y2Q5NDMyOlA0ckFuMDFh
SEC-CH-UA: " Not A;Brand";v="99", "Chromium";v="96", "Google Chrome";v="96"
SEC-CH-UA-MOBILE: ?0
SEC-CH-UA-PLATFORM: "Windows"
UPGRADE-INSECURE-REQUESTS: 1
ORIGIN: https://svpx-anp02.dnanico1.aniconet.com
CONTENT-TYPE: application/x-www-form-urlencoded
USER-AGENT: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.110 Safari/537.36
ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchan
ge;v=b3;q=0.9
SEC-FETCH-SITE: same-origin
SEC-FETCH-MODE: navigate
SEC-FETCH-USER: ?1
SEC-FETCH-DEST: document
REFERER: https://svpx-anp02.dnanico1.aniconet.com/ANPAC/wiki/index.php?title=Special:UserLogin&returnto=Main+Page
ACCEPT-ENCODING: gzip, deflate, br
ACCEPT-LANGUAGE: en-US,en;q=0.9
COOKIE: wikidb51a2e67c_session=bc0qn9df7ucjpv9csjtmha288g3ptuuq
[caches] cluster: EmptyBagOStuff, WAN: mediawiki-main-default, stash: db-replicated, message: SqlBagOStuff, session: SqlBagOStuff
[caches] LocalisationCache: using store LCStoreDB
[session] Can't login remote user 'dnanico1\cd9432' automatically. Blocked this user when applying filter to ''.
[CryptRand] 0 bytes of randomness leftover in the buffer.
[DBConnection] Wikimedia\Rdbms\LoadBalancer::openConnection: calling initLB() before first connection.
[DBReplication] Cannot use ChronologyProtector with EmptyBagOStuff.
[DBReplication] Wikimedia\Rdbms\LBFactory::getChronologyProtector: using request info {
    "IPAddress": "10.61.202.6",
    "UserAgent": "Mozilla\/5.0 (Windows NT 10.0; WOW64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/96.0.4664.110 Safari\/537.
36",
    "ChronologyProtection": false,
    "ChronologyPositionIndex": 0
}
[DBConnection] Wikimedia\Rdbms\LoadBalancer::openConnection: connected to database 0 at 'localhost'.
[SQLBagOStuff] Connection 951 will be used for SqlBagOStuff
[CryptRand] 0 bytes of randomness leftover in the buffer.
[session] SessionBackend "8s61qdm3ha4r3vskh2rmc9782mtkicu0" is unsaved, marking dirty in constructor
[session] SessionBackend "8s61qdm3ha4r3vskh2rmc9782mtkicu0" save: dataDirty=1 metaDirty=1 forcePersist=0
[cookie] setcookie: "wikidb51a2e67c_session", "", "1609275216", "/", "", "1", "1"
[cookie] already deleted setcookie: "wikidb51a2e67cUserID", "", "1609275216", "/", "", "1", "1"
[cookie] already deleted setcookie: "wikidb51a2e67cToken", "", "1609275216", "/", "", "1", "1"
[cookie] already deleted setcookie: "forceHTTPS", "", "1609275216", "/", "", "", "1"
Unstubbing $wgParser on call of $wgParser::setHook from require_once
Parser: using preprocessor: Preprocessor_DOM
[DBConnection] Wikimedia\Rdbms\LoadBalancer::openConnection: connected to database 0 at 'localhost'.
[session] SessionBackend "8s61qdm3ha4r3vskh2rmc9782mtkicu0" force-persist due to persist()
[session] SessionBackend "8s61qdm3ha4r3vskh2rmc9782mtkicu0" save: dataDirty=0 metaDirty=1 forcePersist=1
[cookie] setcookie: "wikidb51a2e67c_session", "8s61qdm3ha4r3vskh2rmc9782mtkicu0", "0", "/", "", "1", "1"
[cookie] already deleted setcookie: "wikidb51a2e67cRemoteToken", "", "1643403216", "/", "", "1", "1"
[cookie] already deleted setcookie: "wikidb51a2e67cUserID", "", "1609275216", "/", "", "1", "1"
[cookie] already deleted setcookie: "wikidb51a2e67cToken", "", "1609275216", "/", "", "1", "1"
[cookie] already deleted setcookie: "forceHTTPS", "", "1609275216", "/", "", "", "1"
[session] SessionBackend "8s61qdm3ha4r3vskh2rmc9782mtkicu0" Taking over PHP session
[session] SessionBackend "8s61qdm3ha4r3vskh2rmc9782mtkicu0" save: dataDirty=0 metaDirty=1 forcePersist=1
[cookie] already set setcookie: "wikidb51a2e67c_session", "8s61qdm3ha4r3vskh2rmc9782mtkicu0", "0", "/", "", "1", "1"
[cookie] already deleted setcookie: "wikidb51a2e67cRemoteToken", "", "1643403216", "/", "", "1", "1"
[cookie] already deleted setcookie: "wikidb51a2e67cUserID", "", "1609275216", "/", "", "1", "1"
[cookie] already deleted setcookie: "wikidb51a2e67cToken", "", "1609275216", "/", "", "1", "1"
[cookie] already deleted setcookie: "forceHTTPS", "", "1609275216", "/", "", "", "1"
[MessageCache] MessageCache::load: Loading en... local cache is empty, global cache is expired/volatile, loading from database
Unstubbing $wgLang on call of $wgLang::_unstub from ParserOptions->__construct
QuickTemplate::__construct was called with no Config instance passed to it
[CryptRand] 0 bytes of randomness leftover in the buffer.
[CryptRand] 0 bytes of randomness leftover in the buffer.
[session] SessionBackend "8s61qdm3ha4r3vskh2rmc9782mtkicu0" data dirty due to dirty(): LoginSignupSpecialPage->getFakeTemplate/Spe
cialUserLogin->getToken/MediaWiki\Session\Session->getToken/MediaWiki\Session\Session->set/MediaWiki\Session\SessionBackend->dirty
[GlobalTitleFail] MessageCache::parse called by array_map/AuthManagerSpecialPage::{closure}/Message->parse/Message->toString/Messa
ge->parseText/MessageCache->parse with no title set.
[GlobalTitleFail] MessageCache::parse called by array_map/AuthManagerSpecialPage::{closure}/Message->parse/Message->toString/Messa
ge->parseText/MessageCache->parse with no title set.
[session] SessionBackend "8s61qdm3ha4r3vskh2rmc9782mtkicu0" save: dataDirty=1 metaDirty=0 forcePersist=0
User::getBlockedStatus: checking...
MediaWiki::preOutputCommit: primary transaction round committed
MediaWiki::preOutputCommit: pre-send deferred updates completed
MediaWiki::preOutputCommit: LBFactory shutdown completed
[cookie] setcookie: "UseDC", "master", "1640811226", "/", "", "1", "1"
[cookie] setcookie: "UseCDNCache", "false", "1640811226", "/", "", "1", "1"
OutputPage::sendCacheControl: private caching;  **
Request ended normally
[session] Saving all sessions on shutdown
[DBConnection] Wikimedia\Rdbms\{closure}: closing connection to database 'localhost'.
[DBConnection] Wikimedia\Rdbms\{closure}: closing connection to database 'localhost'. Nlazarow (talk) 21:18, 29 December 2021 (UTC)
Apparently Extension:LDAPAuthorization does not allow this user to log in. But the logs should show this. Can you confirm the user hat the required groups as configured? You can use "LDAPProvider/maintenance/ShowUserGroups.php" to see the groups like the extension does. Osnard (talk) 15:16, 11 January 2022 (UTC)
Hello!
I'm having this error when trying to log into the mediawiki page
[9b6ee6bb3cd60a614c7387a5] /index.php/Especial:PluggableAuthLogin MWException: Could not bind to LDAP: (49) Invalid credentials
Backtrace:
from /var/www/docs.tesacom.net/extensions/LDAPProvider/src/Client.php(195)
#0 /var/www/docs.tesacom.net/extensions/LDAPProvider/src/Client.php(118): MediaWiki\Extension\LDAPProvider\Client->establishBinding()
#1 /var/www/docs.tesacom.net/extensions/LDAPProvider/src/Client.php(355): MediaWiki\Extension\LDAPProvider\Client->init()
#2 /var/www/docs.tesacom.net/extensions/LDAPAuthentication2/src/PluggableAuth.php(184): MediaWiki\Extension\LDAPProvider\Client->canBindAs()
#3 /var/www/docs.tesacom.net/extensions/LDAPAuthentication2/src/PluggableAuth.php(55): MediaWiki\Extension\LDAPAuthentication2\PluggableAuth->checkLDAPLogin()
#4 /var/www/docs.tesacom.net/extensions/PluggableAuth/includes/PluggableAuthLogin.php(36): MediaWiki\Extension\LDAPAuthentication2\PluggableAuth->authenticate()
#5 /var/www/docs.tesacom.net/includes/specialpage/SpecialPage.php(646): PluggableAuthLogin->execute()
#6 /var/www/docs.tesacom.net/includes/specialpage/SpecialPageFactory.php(1386): SpecialPage->run()
#7 /var/www/docs.tesacom.net/includes/MediaWiki.php(309): MediaWiki\SpecialPage\SpecialPageFactory->executePath()
#8 /var/www/docs.tesacom.net/includes/MediaWiki.php(913): MediaWiki->performRequest()
#9 /var/www/docs.tesacom.net/includes/MediaWiki.php(546): MediaWiki->main()
#10 /var/www/docs.tesacom.net/index.php(53): MediaWiki->run()
#11 /var/www/docs.tesacom.net/index.php(46): wfIndexMain()
#12 {main) Ctorrestesam (talk) 15:46, 28 March 2022 (UTC)

How to change user groups settings on sc.wiki

Hi, I'm an admin and interface admin on sc.wiki, and I'm having some problems with the user rights groups. I’m trying to set up a filter because of some intense vandalism that’s been happening in the last few weeks, but it seems like the “autoconfirmed” and “extendedconfirmed” categories are missing or their rights are given differently on sc.wiki if compared to what happens on, for example, en.wiki. While I can see a list of "extendedconfirmed" users there, that category doesn’t even appear in the list of groups in the equivalent page on sc.wiki. Also it looks like there are no “confirmed” users at all, and I don’t know how the “autoconfirmed” rights are given. How can I see and fix the setting for the user groups? I would like to copy the English settings, if possible.

I tried to read Manual:User rights but I still couldn’t understand exactly what I should do. Where can I find and how can I change LocalSettings.php or any other file I need? L2212 (talk) 17:14, 19 May 2020 (UTC)

@L2212 You cannot change code on servers directly. See https://meta.wikimedia.org/wiki/Requesting_wiki_configuration_changes Malyacko (talk) 19:26, 19 May 2020 (UTC)
to request right changes on wikimedia wikis, file a task in https://phabricator.wikimedia.org , tag it as a Wikimedia-Site-Request. You will need to link to on wiki discussion showing community agreement for the change Bawolff (talk) 19:34, 19 May 2020 (UTC)
Ok @Malyacko and @Bawolff, thank you very much for your answers! L2212 (talk) 23:00, 22 May 2020 (UTC)

Infobox Questions

I've been having trouble getting the area and population density boxes working in a country infobox. Here are the things i've been doing:


For population density, which is 45/km squared:

|population_density_km2   = ''45/km²''

|population_density_sq_mi = ''(17.34)''


For area, which is 1,349,008:

|area_km2 = ''1,349,008''

|area_sq_mi = ''520854.900691''


I'm really confused, so thanks in advance to anyone who helps! 64.228.69.36 (talk) 19:04, 19 May 2020 (UTC)

And what exactly is not working? Where to find such a "Country infobox" template exactly? Hard to say which parameters are expected without knowing anything. :) Malyacko (talk) 19:25, 19 May 2020 (UTC)

How can I make Mediawiki save only differences between revisions, Instead of copies of whole pages as revisions?

I make a revision to a page, it saves only the changes made. YousufSSyed (talk) 19:49, 19 May 2020 (UTC)

@YousufSSyed What makes you think that MediaWiki does not save only differences between revisions in the database backend? Please explain how you come to your statement. Malyacko (talk) 20:54, 19 May 2020 (UTC)
this
"When you make a contribution, are only the changes saved on the disk, or a whole copy of a page?"
"whole copy." YousufSSyed (talk) 21:00, 19 May 2020 (UTC)
@YousufSSyed Please explain where to find "this". Malyacko (talk) 21:33, 19 May 2020 (UTC)
it's a link YousufSSyed (talk) 22:01, 19 May 2020 (UTC)
please don't make duplicate posts.
Delta based text storage is not an option included in mediawiki. If you use the concat method of revision compression that was linked from your previous thread, you should achieve a similar amount of disk space savings. Bawolff (talk) 00:54, 20 May 2020 (UTC)

There is not 'edit tap' at the top of the page.

As suggested by the MediaWiki help pages, I should find the 'edit tap' at the right top corner of the page but the only options I can see is: 'read', 'view source' and 'view history'. The 'edit tap' is not there. Is there any other place I could find it? IreneM22 (talk) 19:49, 19 May 2020 (UTC)

@IreneM22 No, there is no other place. Your user account does not have sufficient permissions to edit that page, hence there is no link displayed to edit that page. Malyacko (talk) 20:55, 19 May 2020 (UTC)
@Malyacko does this mean that that the editor of that page needs to give me access? I am not understanding very well how to create a page and edit. I do not see any of these options. IreneM22 (talk) 20:58, 19 May 2020 (UTC)
@IreneM22 That depends on the settings of that website. It is not related to whoever previously edited a page. Malyacko (talk) 21:33, 19 May 2020 (UTC)

LDAP Group Restrictions instructions?

I want to limit access to our wiki install using LDAP groups. I just got my LDAPAuthentication2 extension working. All I can find is information on how to setup the LDAP group restrictions based on the older LDAP Authentication system.

Is there a good guide out there on the newer LDAPAuthenication2 group restrictions?

I've been looking for a few hours with no real luck. Thanks in advance, loving this system! Rosenblitt (talk) 03:17, 20 May 2020 (UTC)

So I didn't understand that the Group Restrictions happen as part of the LDAPAuthorization extension... @Osnard was able to help me out:
Extension talk:LDAPAuthorization/Archive 2/Flow export#h-Screwing_up_my_ldap.json_file_with_authorization_section-2020-05-28T21:30:00.000Z Rosenblitt (talk) 15:40, 29 May 2020 (UTC)

editing common.css

1 I want to change a style (font size, etc.) of title of each section of the article, and content of those.

is there any class name or id for the title or section starting with '==' or '==='

if there are examples, I'd really appreciate it.


2 If I want to make the superscript (<sup>) or subscript (<sub>) smaller, how I can do it? 220.121.235.23 (talk) 05:04, 20 May 2020 (UTC)

1. Yes there are. Use your web browser's developer tools to find the corresponding class.
2. By defining CSS for these HTML tags. Malyacko (talk) 12:16, 20 May 2020 (UTC)

Is there any problem combining Lua inside a wikisyntax template?

Say I have an all core MediaWiki website with Scribunto installed (I don't);

Instead doing what most people do - putting Lua code blocks (parameters/functions) inside designated Lua webpage/s and "invoke" them with #invoke:x I thought combining them directly in my wikisyntax page some how.


But if I have just one Lua parameter or just one Lua function and I don't want to create a special page for these; is there any problem putting them directly inside wikisyntax pages (perhaps in a similar manner to how JavaScript is combined in HTML)? 49.230.71.93 (talk) 06:06, 20 May 2020 (UTC)

Hallo, ich habe den Text im angemeldetem Zustand von Deutsch auf Tschechisch geändert. Auch die Sidebar erscheint angemeldet in Tschechisch. Nach dem Abmelden ist der Text der Sidebar jedoch wieder in Deutsch, Wie kann ich die Sidebar auch abgemeldet in Tschechisch darstellen? Gruß Klaus 91.52.215.89 (talk) 10:22, 20 May 2020 (UTC)
Hello, I have changed the text in the registered state from German to Czech. The sidebar also appears registered in Czech. After unsubscribing, the text of the sidebar is back in German. How can I also display the sidebar unsubscribed in Czech? Greetings Klaus 91.52.215.89 (talk) 12:30, 20 May 2020 (UTC)
You cannot. Interface language per user can only be altered when logged in. —TheDJ (Not WMF) (talkcontribs) 11:22, 20 May 2020 (UTC)
Can I subsequently change the wiki installed in German entirely to Czech? 91.52.215.89 (talk) 12:21, 20 May 2020 (UTC)
Can I change the wiki installed in German entirely to Czech? 91.52.215.89 (talk) 12:46, 20 May 2020 (UTC)
See Manual:$wgLanguageCode Malyacko (talk) 13:30, 20 May 2020 (UTC)
Thank you for help! Bye 91.52.215.89 (talk) 15:42, 20 May 2020 (UTC)

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


Hello, I have changed the text in the registered state from German to Czech. The sidebar also appears registered in Czech. After unsubscribing, the text of the sidebar is back in German. How can I also display the sidebar unsubscribed in Czech? Greetings Klaus 91.52.215.89 (talk) 11:23, 20 May 2020 (UTC)

See the reply in Project:Support desk/Flow/2020/05#h-Sidebar-2020-05-20T10:22:00.000Z Malyacko (talk) 12:14, 20 May 2020 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

CANNOT EDIT

Version: 1.35.0-wmf.32 (7325c34)

Suddenly do not have an edit tab on any of my Wikis. Other users in USACE are also reporting the same. One of the pages is at https://wiki.usace.army.mil/MVD:_Review_Plans 140.194.40.35 (talk) 12:50, 20 May 2020 (UTC)

URL cannot be reached. Feel free to contact "USACE" (whatever that is). Malyacko (talk) 13:30, 20 May 2020 (UTC)

Why does Lua utilized as a programming language for Wikipedia projects (and is there a plan to replace it with something else)?

Why does Lua utilized as a programming language for Wikipedia projects instead only PHP (why is the behavior programming stack is PHP-Lua-JavaScript and not just PHP-JavaScript)

And,

Is there a plan to replace Lua with something else such as EcmaScript 10 (2019) so to have a less complex PHP-JavaScript? 49.230.71.93 (talk) 13:10, 20 May 2020 (UTC)

a less complex behavior stack* 49.230.71.93 (talk) 13:13, 20 May 2020 (UTC)
See links on Lua. Malyacko (talk) 13:29, 20 May 2020 (UTC)

I can't log in.

Did my username get cancelled?


Username: bulrush

I tried to reset my password, then went to the login page to use the temporary password and I still get this error:


> There seems to be a problem with your login session; this action has been canceled as a precaution against session hijacking. Please resubmit the form.


Can I get my old username back? I own a wiki here called Rawdata. 23.125.8.144 (talk) 14:35, 20 May 2020 (UTC)

Me here again. I'm using Firefox v76 on Windows 10 this time. 23.125.8.144 (talk) 14:35, 20 May 2020 (UTC)
There is an account named Bulrush created in 2013.
Is that your account? Tegel (talk) 14:37, 20 May 2020 (UTC)
Yes that's me. 23.125.8.144 (talk) 15:25, 20 May 2020 (UTC)
Do user accounts get deactivated if I don't log in soon enough? I"ve been very sick this year for 7 weeks, then had to catch up on work. 23.125.8.144 (talk) 15:26, 20 May 2020 (UTC)
No, accounts don't get deactivated it not used. If you have forgot the password then that is a big problem. It doesn't look like you added an email-address when you created the account. Then you can't reset the password and get the account back. My recommendation is that you create a new account. After that there is the possibility to use https://meta.wikimedia.org/wiki/Steward_requests/Username_changes to rename the account. Tegel (talk) 15:39, 20 May 2020 (UTC)

how do I search for all paintings by an artist?

how do I search for all paintings by an artist?


2601:643:8880:160:4561:1BB6:B2D4:2AD2 (talk) 16:09, 20 May 2020 (UTC)

https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples/de#Paintings_by_Gustav_Klimt FriedhelmW (talk) 16:44, 20 May 2020 (UTC)

User Rights

I have noticed that anyone that can access our log in page can also create a new user. I want to ensure that this is not possible on the log in screen when they go to our server. How do I do this? 146.198.170.43 (talk) 17:22, 20 May 2020 (UTC)

See Manual:User rights Malyacko (talk) 19:05, 20 May 2020 (UTC)
Is this the code to use $wgGroupPermissions['*']['createaccount'] = false; on the LocalSettings.php page? Ketanvaria (talk) 19:54, 20 May 2020 (UTC)
yes, in the LocalSettings.php file (not page) Bawolff (talk) 00:41, 21 May 2020 (UTC)
and this will stop creating a new user account from the main log in page right? Ketanvaria (talk) 20:14, 21 May 2020 (UTC)
yes, unless the currebt user is logged in as an admin, in which case they can create accounts for other people.
Also i would suggest just trying it and testing, instead of asking if its going to work. Bawolff (talk) 00:15, 22 May 2020 (UTC)

Extensons extensions.json filemtime(): stat failed

Hi, Recently I installed my own Mediawiki-Server with Docker for some teamprojects, so I'm pretty new on this. I've installed some extensions like VisualStudio, MobileFrontend, Lockdown, etc. But when I try to install CodeMirror or UserMerge extension and restart the docker container I get the following exception:


Fatal error: Uncaught Exception: Unable to open file /var/www/html/extensions/CodeMirror/extension.json: filemtime(): stat failed for /var/www/html/extensions/CodeMirror/extension.json in /var/www/html/includes/registration/ExtensionRegistry.php:136 Stack trace: #0 /var/www/html/includes/GlobalFunctions.php(52): ExtensionRegistry->queue('/var/www/html/e...') #1 /var/www/html/LocalSettings.php(248): wfLoadExtension('CodeMirror') #2 /var/www/html/includes/Setup.php(124): require_once('/var/www/html/L...') #3 /var/www/html/includes/WebStart.php(81): require_once('/var/www/html/i...') #4 /var/www/html/index.php(41): require('/var/www/html/i...') #5 {main} thrown in /var/www/html/includes/registration/ExtensionRegistry.php on line 136


I've googled for some solutions but did not find anything, even here. So can someone tell me where the problem is and how to fix suche things? I would be very thankful.

I installed MediaWiki 1.34, just if it is a necessary information. Dylanh50 (talk) 21:33, 20 May 2020 (UTC)

did you install the extension files (does extensions/CodeMirror directory exist with proper files)? Bawolff (talk) 00:40, 21 May 2020 (UTC)
Has this issue been solved? 2003:C9:5F30:7500:8DD:B801:1E1D:6CD (talk) 21:44, 15 December 2024 (UTC)

Please fix the RTL CSS issue

As my computing ideology includes not registering to websites as much as possible I will not report a bug in Phabricator.


As you could read here:

Project:Support desk/Flow/2020/05#h-Calling_a_footnote_by_name_doesn't_work_in_a_designated_RTL_template-2020-05-13T14:25:00.000Z

#flow-post-vmr6ivvg99pmsfqg


The RTL <ol> <li> requires horizontal scrolling; without it - one could not notice their numbers.

In Google Chrome the horizontal scrolling bar sometimes appear and sometimes it doesn't - I don't know why.


Please fix this CSS issue. 49.230.71.93 (talk) 05:41, 21 May 2020 (UTC)

A better title might be "Please fix the RTL CSS issue causing <ol> children to be elusive or absent".
@Ciencia Al Poder 49.230.71.93 (talk) 07:44, 21 May 2020 (UTC)
#flow-post-vmr6ivvg99pmsfqg > div.flow-post-main > article > section:nth-child(2) > div > section:nth-child(2) {
position: absolute
}
Manually makes the <li> children appear if they didn't "naturally".
I don't suggest to use it as a solution; it's just to demonstrate the problem. 49.230.71.93 (talk) 07:47, 21 May 2020 (UTC)
@Bawolff in great plea share your opinion about this situation. 49.230.71.93 (talk) 16:53, 21 May 2020 (UTC)

Special:WantedPages

I have recently installed an ifexist function at http://wiki.apterous.org/Template:Game to provide a link if we have a recap for that episode. However articles we don't have are still clogging up our WantedPages. Is there any way of telling that special page that games without articles are not wanted? From our Special:Version:

MediaWiki 1.16.0
PHP 5.6.40 (fpm-fcgi)
MySQL 5.5.5-10.3.18-MariaDB

Launchballer (talk) 12:11, 21 May 2020 (UTC)

@Launchballer Version 1.16 has been unsupported since 2011 so it has many, many unfixed security vulnerabilities. That might be a way bigger problem for your website than some special page. Malyacko (talk) 12:28, 21 May 2020 (UTC)
pages checked by #ifexist still count as a wanted page.
And another +1 to consider upgrqding. Bawolff (talk) 15:02, 21 May 2020 (UTC)

Wiki working EXCEPT from Edit page, which is blank

MediaWiki Version - 1.34.1

PHP Version - 7.3.18

MariaDB Version - 10.4.13


Wiki URL: https://drugdealersimulator.wiki/w/index.php?title=Main_Page

Running using the Docker image on CentOS.


I'm trying to migrate a MediaWiki installation from a shared web hosting server to a dedicated server. I've taken a backup of the database (mariadb) and of the files in the wiki folder, and I've restored them to the destination and almost everything is working flawlessly.

I have two little issues, the biggest one being that I can't edit pages at all, if you click on the "edit" link then the result is just a blank page.

I've turned on the logging as was suggested on the troubleshooting page but I've not seen any errors, the page just remains blank.

Any suggestions are appreciated! Thank you. Alastair B. Campbell (talk) 13:28, 21 May 2020 (UTC)

@Alastair B. Campbell Manual:Errors and symptoms#You see a Blank Page Malyacko (talk) 14:51, 21 May 2020 (UTC)
Hi @Malyacko Thanks, I should have mentioned I already tried that - enabling the error reporting still doesn't show any errors, and I checked the other things mentioned for that, such as the PHP memory setting - it's set to 128mb. Alastair B. Campbell (talk) 14:53, 21 May 2020 (UTC)
apache/web server error log? Bawolff (talk) 14:58, 21 May 2020 (UTC)
Hi @Bawolff - It's running with Docker, so the logs are being redirected to Docker. I've looked over the Docker logs and I haven't seen any errors, though. But thank you for the tip. Alastair B. Campbell (talk) 15:58, 21 May 2020 (UTC)
i dont get a blank page when i go to https://drugdealersimulator.wiki/w/index.php?title=foo&action=edit
95% of time, blank page is php fatal error, which should be in pho error log, 4.5% of time its php segfaulting which would be in webserver error logs. Maybe .5% of time its custom js/gadget that does document.write(). I cant think of any other causes (not to say there isnt others).
If you open the web browser developer console on the page that is blank, are there any errors? In particular does the network tab say its a 500 status or a 200 status (or something else)? [Note either way that doesnt help figure out whats wrong very much] Bawolff (talk) 00:12, 22 May 2020 (UTC)

Is it possible to install Mathoid without a RESTbase?

If so, how? Erentar2002 (talk) 18:09, 21 May 2020 (UTC)

wikipedia being cloned?

This is an ugly job:

https://pt.qwe.wiki/wiki/Devanampiya_Tissa_of_Anuradhapura

and don't know how to stop it. Jpedroav (talk) 20:58, 21 May 2020 (UTC)

what exactly is the concern? They seem to be complying with the copyright license and not violsting any Wikimedia trademarks, so what they are doing seems ok at first glance. Bawolff (talk) 00:25, 22 May 2020 (UTC)

New URL → Issues with VisualEditor on a shared host - "apierror-visualeditor-docserver-http: HTTP 404"

Hi there!


Initially, I wonder whether I should write this doubt in "VisualEditor/Installation on a shared host" discussion page or if in "Manual:Moving a wiki" discussion page, so I decided to post it here.

I'm having trouble in recreating the Parsoid app, to make the VisualEditor extension in my shared host works, and I really need your help to solve the issues.

Let me share more details: I have to change completely the domain of my wiki. In other words, if the url was www.a.com, now the url is www.b.com. Once the VisualEditor used to work regularly before this web address replacement, and as the parsoid setup needs to specify exactly the URL of api.php, I needed to recreate it on Heroku.

But, unfortunately, I tried to redid it several times, but no one works. In all cases I got this error: "apierror-visualeditor-docserver-http: HTTP 404"

Below, I'll redo in all the steps described in VisualEditor/Installation on a shared host (in real time, as I'm describing it here):


Part 1: Heroku.com

* Sign up with Heroku.com  (ok)

* Create a new app (ok, in US region)

* Go to your app settings (ok)

* Scroll to the Buildpack section (ok)

* Add a new buildpack (ok)

* Select Node.js (ok and changes saved: "Your new buildpack configuration will be used when this app is next deployed.")


Part 2: Your local computer

* Install the Heroku Command Line Interface and log in (ok)

* Clone Parsoid with git clone https://gerrit.wikimedia.org/r/mediawiki/services/parsoid (ok)

* Enter the Parsoid directory you just created, for example with cd parsoid (ok)

* Edit the hidden file .gitignore and remove the lines config.yaml and composer.lock (ok)

* Create your config file by copying config.example.yaml and renaming it to config.yaml (ok)

* Edit the config.yaml file you just created by changing the example URI for the URL of your API, for example uri: 'http://www.mywiki.com/w/api.php' (ok - I tried with "http://" and without it too)

* If your wiki uses https, then uncomment the line strictSSL: false (my wiki has https, but it's not default - if you type "https" manually, it works, but if you consider only the regular rule, the website works only with http, so I didn't uncommented it)

* If the domain: 'localhost' line is uncommented, comment it (helps to avoid the "Invalid domain" error) (ok)

* Save the changes (ok)

* Add the Heroku remote to your git repo with heroku git:remote -a APPNAME (ok, and the message was "set git remote heroku to https://git.heroku.com/xxxxx.git" - xxxxx as the real appname.)

* Stage the edited config files for committing with git add . (ok, with no system reply)

* Commit your changes with git commit -am "Initial commit" (ok, and the message was "2 files changed, 111 insertions (+), 2 deletions (-) /// create mode 100644 config.yaml")

* Push and deploy your changes with git push heroku master (ok - below, all system messages)

Enumerating objects: 71991, done.

Counting objects: 100x (71991/71991), done.

Delta compression using up to 4 threads

Compressing objects: 100x (12548/12548), done.

Writing objects: 100x (71991/71991), 28.58 MiB : 121.00 KiB/s, done.

Total 71991 (delta 59004), reused 71813 (delta 58887), pack-reused 0

remote: Compressing source files... done.

remote: Building source:

remote:

remote:  -----> Node.js app detected

remote:

remote:  -----> Creating runtime environment

remote:

remote: NPM_CONFIG_LOGLEUEL=error

remote: NODE_ENV=production

remote: NODE_MODULES_CACHE=true

remote: NODE_VERBOSE=false

remote:

remote:  -----> Installing binaries

remote: engines.node (package.json): unspecified

remote: engines.npm (package.json): unspecified (use default)

remote:

remote: Resolving node version 12.x...

remote: Downloading and installing node 12.16.3...

remote: Using default npm version: 6.14.4

remote:

remote:  -----> Installing dependencies

remote: Installing node modules

remote:

remote: > unix-dgram@2.0.4 install /tmp/build_0609a9aSccfc940SS7b4f848139 b128/node_modules/unix-dgram

remote: > node-gyp rebuild

remote:

remote: make: Entering directory '/tmp/build_0609a9a5ccfc940557b418481398 128/node_modules/unix-dgram/build'

remote: CXX(target> Release/obj.target/unix_dgram/src/unix_dgram.o

remote: SOLINH_MODULatarget) Release/obj.target/unix_dgram.node

remote: COPY Release/unix_dgram.node

remote: make: Leaving directory '/tmp/build_0609a9a5ccfc940557b418481398b 28/node_modules/unix-dgram/build'

remote:

remote: > heapdum00.3.15 install /tmp/build_0609a9aSccfc940SS7b4f8481398 128/node_modules/heapdump

remote: > node-gyp rebuild

remote:

remote: make: Entering directory '/tmp/build_0609a9a5ccfc940557b418481398 128/node_modules/heapdump/build'

remote: CXX(target) Release/obj.target/addon/src/heapdump.o

remote: SOLINK_MODULE(target) Release/obj.target/addon.node

remote: COPY Release/addon.node

remote: make: Leaving directory '/tmp/build_0609a9a5ccfc940557b418481398b 28/node_modules/heapdump/build'

remote:

remote: > gc-statsG1.4.0 install /tmp/build_0609a9a5ccfc940557b4f8481398b 28/node_modules/gc-stats

remote: > node-pre-gyp install --fallback-to-build

remote:

remote: [gc-stats1] Success: "/tmp/build_0609a9a5ccfc940557b4f8481398b128/ ode_modules/gc-stats/build/gcstats/v1.4.0/Release/node-v72-linux-x64/gcstats.no e" is installed via remote

remote:

remote: > dtrace-provider80.8.8 install /tmp/build_0609a9aSccfc940SS7b4f8 81398b128/node_modules/dtrace-provider

remote: > node-gyp rebuild :: node suppress-error.js

remote:

remote: make: Entering directory '/tmp/build_0609a9a5ccfc940557b418481398 128/node_modules/dtrace-provider/build'

remote: TOUCH Release/obj.target/DTraceProviderStub.stamp

remote: make: Leaving directory '/tmp/build_0609a9a5ccfc940557b418481398b 28/node_modules/dtrace-provider/build'

remote:

remote: > core-jsG2.6.11 post install /tmp/build_0609a9a5ccfc940557b4f8481 98b128/node_modules/core-js

remote: > node -e "try(require('1'./postinstall')>catch(e){}"

remote:

remote: added 418 packages in 21.712s

remote:

remote:  -----> Build

remote:

remote:  -----> Caching build

remote: — node_modules

remote:

remote:  -----> Pruning devDependencies

remote: removed 193 packages, updated 3 packages and audited 294 packages in 4.82s

remote:

remote: 3 packages are looking for funding

remote: run 'npm fund' for details

remote:

remote: found 3 low severity vulnerabilities

remote: run 'npm audit fix' to fix them, or 'npm audit' for details

remote:

remote:  -----> Build succeeded!

remote:  -----> Discovering process types

remote: Procfile declares types —> (none)

remote: Default types for buildpack —> web

remote:

remote:  -----> Compressing...

remote: Done: 84.7M

remote:  -----> Launching...

remote: Released v3

remote: https://xxxxx.herokuapp.com/ deployed to Heroku

remote:

remote: Verifying deploy... done.

To https://git.heroku.com/xxxxx.git

* [new branch] master —> master

* Visit https://APPNAME.herokuapp.com to verify that your Parsoid service works (it works! I got the message "Welcome to the Parsoid web service. See the API documentation on mediawiki.org.")


Part 3: Your wiki

* Download VisualEditor (don't forget to run git submodule update --init as explained in the link) (I have already VisualEditor installed, once I had modified the URL only, I didn't reinstall it)

* Add to your LocalSettings.php (I tried with the code below and the older code that I used earlier, but both without success):

wfLoadExtension( 'VisualEditor' );

$wgVisualEditorEnableWikitext = true;

$wgDefaultUserOptions['visualeditor-newwikitext'] = 1;

$wgDefaultUserOptions['visualeditor-enable'] = 1;

$wgDefaultUserOptions['visualeditor-editor'] = 'visualeditor';

$wgVirtualRestConfig['modules']['parsoid'] = [

'forwardCookies' => true,

'url' => 'https://xxxxx.herokuapp.com/'

];

(older code):

wfLoadExtension( 'VisualEditor' );

//Enable VisualEditor by default for everybody

$wgDefaultUserOptions['visualeditor-enable'] = 1;

// Optional: Set VisualEditor as the default for anonymous users

// otherwise they will have to switch to VE

// $wgDefaultUserOptions['visualeditor-editor'] = "visualeditor";

// Don't allow users to disable it

$wgHiddenPrefs[] = 'visualeditor-enable';

// OPTIONAL: Enable VisualEditor's experimental code features

#$wgDefaultUserOptions['visualeditor-enable-experimental'] = 1;

// Parsoid configuration

$wgVirtualRestConfig['modules']['parsoid'] = array(

// URL to the Parsoid instance

// Use port 8142 if you use the Debian package

// url must not end in a slash, otherwise it might give a 404 error

'url' => 'xxxxx.herokuapp.com',

// Parsoid "domain", see below (optional)

'domain' => 'localhost',

// Parsoid "prefix", see below (optional)

'prefix' => 'your prefix here', //no site fala pra por "localhost" também

//If you run a private wiki then you have to set the following variable to true:

'forwardCookies' => true

);

* Done! Visit your wiki, edit any page and save the changes to test it out! (unfortunately, it didnt works :( Again, I'm receiving the error "apierror-visualeditor-docserver-http: HTTP 404." )


Does anyone know what could be happening?

It's important to say that I use MW 1.33.0.


Thank you in advance for your help. Tonynando (talk) 21:19, 21 May 2020 (UTC)

not sure if this it it, but you have listed in the LocalSettings.php part
'url' => 'xxxxx.herokuapp.com',
It should probably be
'url' => 'https://xxxxx.herokuapp.com',
Replacing xxxxx with your subdomain of course. Bawolff (talk) 00:23, 22 May 2020 (UTC)
Hi @Bawolff!
Thanks for your reply!
I tried in both ways, with https and without it, and in the two setups that I described in my comment. "xxxxx" is just an example, I'm putting the right appname in Heroku.
Do you have any other idea? I recreated the Heroku app so many times that I'm out of moves.
Best regards! Tonynando (talk) 03:59, 22 May 2020 (UTC)
can you post the config.yaml file you are using? Bawolff (talk) 04:19, 22 May 2020 (UTC)
Hi @Bawolff
Please see below. I bolded the lines that I effectively changed, as the step-by-step detailed on VisualEditor/Installation on a shared host. The URL listed is just a sample, the original config.yaml contains the right address.
# This is a sample configuration file
#
# Copy this file to config.yaml and edit that file to fit your needs.
#
# Also see:
# - `npm start -- -h` for more information about passing config files via
#   the commandline.
# - lib/config/ParsoidConfig.js for all the properties that you can configure
#   here. Not all properties are documented here.
# The number of http workers (as opposed to `cpu_workers` below)
#num_workers: 1
worker_heartbeat_timeout: 300000
logging:
   level: info
#metrics:
#    type: log
services:
  - module: lib/index.js
   entrypoint: apiServiceWorker
   conf:
       # For backwards compatibility, and to continue to support non-static
       # configs for the time being, optionally provide a path to a
       # localsettings.js file.  See localsettings.example.js
       #localsettings: ./localsettings.js
       # Set your own user-agent string
       # Otherwise, defaults to:
       #   'Parsoid/<current-version-defined-in-package.json>'
       #userAgent: 'My-User-Agent-String'
       # Configure Parsoid to point to your MediaWiki instances.
       mwApis:
       - # This is the only required parameter,
         # the URL of you MediaWiki API endpoint.
         uri: 'http://www.mywiki.com/api.php'
         # The "domain" is used for communication with Visual Editor
         # and RESTBase.  It defaults to the hostname portion of
         # the `uri` property above, but you can manually set it
         # to an arbitrary string. It must match the "domain" set
         # in $wgVirtualRestConfig.
         # domain: 'localhost'  # optional
         # To specify a proxy (or proxy headers) specific to this prefix
         # (which overrides defaultAPIProxyURI). Alternatively, set `proxy`
         # to `null` to override and force no proxying when a default proxy
         # has been set.
         #proxy:
         #    uri: 'http://my.proxy:1234/'
         #    headers:  # optional
         #        'X-Forwarded-Proto': 'https'
         # See below, defaults to true.
         #strictSSL: false
       # Enable using compute workers to parse requests.
       #useWorker: true
       # The number of workers in the pool spawned by each http worker to
       # call out for parsing.  Defaults to:
       #   ceil(number of cpus / `num_workers`) + 1
       #cpu_workers: 1
       # We pre-define wikipedias as 'enwiki', 'dewiki' etc. Similarly
       # for other projects: 'enwiktionary', 'enwikiquote', 'enwikibooks',
       # 'enwikivoyage' etc.
       # The default for this is false. Uncomment the line below if you want
       # to load WMF's config for wikipedias, etc.
       #loadWMF: true
       # A default proxy to connect to the API endpoints.
       # Default: undefined (no proxying).
       # Overridden by per-wiki proxy config in setMwApi.
       #defaultAPIProxyURI: 'http://proxy.example.org:8080'
       # Enable debug mode (prints extra debugging messages)
       #debug: true
       # Use the PHP preprocessor to expand templates via the MW API (default true)
       #usePHPPreProcessor: false
       # Use selective serialization (default false)
       #useSelser: true
       # Allow cross-domain requests to the API (default '*')
       # Sets Access-Control-Allow-Origin header
       # disable:
       #allowCORS: false
       # restrict:
       #allowCORS: 'some.domain.org'
       # Allow override of port/interface:
       #serverPort: 8000
       #serverInterface: '127.0.0.1'
       # Enable linting of some wikitext errors to the log
       #linting: true
       #linter:
       #  sendAPI: false # Send lint errors to MW API instead of to the log
       #  apiSampling: 10 # Sampling rate (1 / 10)
       # Require SSL certificates to be valid (default true)
       # Set to false when using self-signed SSL certificates
       # Note that this can also be applied per wiki in the mwApis above
       #strictSSL: false
       # Use a different server for CSS style modules.
       # Leaving it undefined (the default) will use the same URI as the MW API,
       # changing api.php for load.php.
       #modulesLoadURI: 'http://example.org/load.php'
Thanks for your help, @Bawolff! Tonynando (talk) 13:42, 22 May 2020 (UTC)
Hi guys! I think I solved the issue. I was able to fix my SSL/HTTPS problem, so I appoint in config.yaml to https://www.mywiki.com, and now it seems that everything is ok. Thanks for your help, @Bawolff! Tonynando (talk) 01:38, 25 May 2020 (UTC)

Can't create a Simple English Wikipedia page for "A Talking Cat!?!"

I'm trying to make a Simple English Wikipedia article for "A Talking Cat!?!", but it gives me the following error when I try to start making it, either using the visual editor or the source editor:

You do not have permission to create this page, for the following reason:

The title "A Talking Cat!?!" has been banned from creation. It matches the following blacklist entry: .*[!?‽¿]{3}(?<!!!!).* Childishbeat (talk) 01:27, 22 May 2020 (UTC)

You have to ask a simple english admin to create it for you. Basically people were creating a bunch of spam, so pages that contain 3 ?,! Etc symbols in a row, as long as all 3 are not !, have been restricted.
There is a list of admins at
simple:special:listadmins
. If simple has a help desk or village pump, that may be a good place to ask. Bawolff (talk) 02:29, 22 May 2020 (UTC)
That would be
simple:Wikipedia:Simple talk * Pppery * it has begun 02:32, 22 May 2020 (UTC)

Got Error "nosuchrevid"

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


Hi everyone,

I am trying to have a local mediawiki for DBpedia extraction framework. I have installed mediawiki version 1.34.0 and also already imported the wikipedia dump to my local database (MySQL) successfully. I also have already set up LocalSettings.php and can access http://localhost/mediawiki/api.php?uselang=en. But when I tried to access http://localhost/mediawiki/api.php?uselang=en&format=xml&action=parse&prop=text&pageid=1, this is what I got:

<api>

<error code="nosuchrevid" info="There is no revision with ID 16579045." xml:space="preserve">

See http://localhost/mediawiki/api.php for API usage. Subscribe to the mediawiki-api-announce mailing list at &lt;https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce&gt; for notice of API deprecations and breaking changes.

</error>

</api>

But when I tried to check the revision ID in revision table on my local database, it returned a result. I'm confused as why the result said there is no such revision ID when it's clearly there. I'm a newbie and I hope someone could help me with this problem. Thank you! Regensa18 (talk) 05:31, 22 May 2020 (UTC)

some sort of referential integrity error. If the revision is present, then the revision row might be referencing tows drom the actor or comment table that are missing. Bawolff (talk) 23:54, 22 May 2020 (UTC)
Hi @Bawolff,
If that's the case should I redo the import of my wikipedia dump again? Or is there a way that I can fix the referential integrity error without redoing the dump? Regensa18 (talk) 16:54, 23 May 2020 (UTC)
you would need to determine the cause in the first place, in order to say shat can be done to prevent it.
Depending on why, running update.php (or migrateActors.php and migrateComments.php, possibly with the --force argument) might help. Bawolff (talk) 18:06, 23 May 2020 (UTC)
Hi @Bawolff,
It seems that you're right. I ran update.php and now the API call works like a charm. Thanks a lot! Regensa18 (talk) 06:43, 26 May 2020 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Which guides should I read to understand what is going on with this code?

{{#תנאי:{{{שם|}}}
    |
        {{#תנאי:{{{תוכן|}}}
            | 
                {{#תג:ref
                    |1={{{תוכן}}}
                    |name={{{שם}}}
                }}
            |
                {{#תג:ref
                    | name={{{שם}}}
                }}
        }}
            |
                {{#תג:ref | 1={{{תוכן|}}} }}
}}
  • I understand that תנאי ("condition") means a wikisyntax if.
  • I understand tag תג means "tag" (such as a <ref> tag).
  • I understand that תוכן means content (an inner content of a footnote).
  • I understand that שם means name, which is the name attribute of a footnote.

And yet, I don't understand how to understand this code as a whole; please kindly opinion how to; for example,w hat guides should be read. 49.230.71.93 (talk) 12:39, 22 May 2020 (UTC)

BTW @Amire80 I don't have a Phabricator account so I don't know what's going on there, but;
Is it like GitHub where you make a "pull request" for a change (your desired change for תג instead תגית) so it would be included in say MediaWiki 1.35.0?
With appreciation, 49.230.71.93 (talk) 12:41, 22 May 2020 (UTC)
Phabricator is the place to report bugs.
The place for submitting code changes is Gerrit. I already sent the change for תג, and it's waiting for review. Amir E. Aharoni {{🌎🌍🌏}} 13:04, 22 May 2020 (UTC)
@Amire80 I went through the changes there just out of curiosity:
I read that the Hebrew version doesn't contain "תג" but the Yiddish version does;
Perhaps other will wonder such as myself; why? I mean, why aren't both contain "תג"? 49.230.71.93 (talk) 15:06, 22 May 2020 (UTC)
others* 49.230.71.93 (talk) 15:23, 22 May 2020 (UTC)
I'm not sure what do you mean. Both will contain תג as a result of this change. Amir E. Aharoni {{🌎🌍🌏}} 03:41, 23 May 2020 (UTC)
It seems like some horizontal scrolling bias because if I mark with the mouse the serialization block at MessagesHe.php at patch set 1 than I suddenly do see תג.
[ '0', 'תג', 'תגית', 'tag' ],
But at MessagesYi.php at patch set 1 I needed not marking anything with the mouse to read תג. 182.232.158.148 (talk) 08:14, 23 May 2020 (UTC)
Probably an RTL problem with how Gerrit shows diffs. That's why we almost never write translations manually in code files. This is a rare exception. Amir E. Aharoni {{🌎🌍🌏}} 09:27, 23 May 2020 (UTC)

How to create two different templates for Cite footnotes correctly → one for a named footnote and another for a non named footnote?

I have an RTL (Hebrew) MediaWiki 1.34.0 website and I have a very down to earth question:

How to create two different templates for Cite footnotes correctly → one for a named footnote and another for a non named footnote?

The purpose of this question

I ask this after a total failure finding any working single template for both named and non-named Cite footnotes or an up-to-date documentation about creating such a single template, in these topics:

So the purpose is to find an alternative solution.

Notes

1. I thought about two templates with these names:

  • המ which stands for "הערה משוימת" (named footnote)
  • הלמ which stands for "הערה לא משוימת" (non named footnote)

2. I expect templates which are Lua/Scribunto-free

3. @קיפודנחש shouldn't it be a much simpler approach at least for people who generally doesn't copy anything from a given Wikipedia? 49.230.71.93 (talk) 14:48, 22 May 2020 (UTC)

Try using Help:Cite#Grouped_references. Jonathan3 (talk) 20:09, 22 May 2020 (UTC)

Wikibase and Templates/Modules

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


Hi, I have two wikis that use Wikibase Repository and Wikibase Client. For example in the Hispanodata wiki is my global repository of items and properties and in the HispanoWiki after doing the main steps, I have noticed that when I use an infobox (imported from eswikipedia) that calls a module that uses Wikibase/Wikidata, it does not detect the existence of an item and does not make the connection in the left sidebar). How could I fix this?

Here are some templates and modules that present this problem:

I thought the reason was that in my wiki, the items and properties are in the 860 and 862 namespaces while in Wikidata it is in the main space for example. Hispano76 (talk) 20:56, 22 May 2020 (UTC)

Um, I'm not sure. How could I fix this? Hispano76 (talk) 00:14, 3 June 2020 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Can temporary images files be dropped without any risk?

Currently I’m optimizing a backup script of a MediWiki system.

Prior of the file system backup, files at images/temp might be candidates to be dropped.

It’s unlikely any user might upload a file at the moment of the backup.

Are temporary files at images/temp only used at the moment of a file upload or are they referenced later?

Should they be kept or can they be removed without any risk? Hasenläufer (talk) 22:50, 22 May 2020 (UTC)

Installing Extension:TemplateStyles without Composer?

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


Hi. How do I install the TemplateStyles extension without composer? I don't have root access on my server and the server doesn't have composer. If I just download the extension from here and upload it to my server, it doesn't work. I've seen in another topic (linked from the extension page) that the download is missing a "vendor" folder, but I can't seem to find out where to get said "vendor" folder. Newbiepedian (talk) 23:34, 22 May 2020 (UTC)

You don't need root access to install composer, you just need (non-root) shell access - https://getcomposer.org/
If all else fails, you can run it on your own computer, and then upload the resulting files. Bawolff (talk) 04:53, 23 May 2020 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Why community members (which are programmers) in some Wikipedias translate wikisyntax commands to their own mother language?

Take for example this template in English:

{{#if:{{{refname|}}}
    |
      {{#if:{{{content|}}}
        | 
        {{#tag:ref
            | name = {{{refname}}}
            | 1 = {{{content}}}
        }}
        |
        {{#tag:ref | name = {{{refname}}} }}
      }}
    |
      {{#tag:ref | 1 = {{{content|}}} }}
}}

We can even an almost identical template in which wikisyntax commands are translated to another language:

{{#תנאי:{{{שם|}}}
    |
      {{#תנאי:{{{תוכן|}}}
        | 
        {{#תג:ref
            |1={{{תוכן}}}
            |name={{{שם}}}
        }}
        |
        {{#תג:ref | name = {{{שם}}} }}
      }}
    |
      {{#תג:ref | 1={{{תוכן|}}} }}
}}

As you could read

  • if became תנאי
  • refname became שם
  • tag became תג
  • content became תוכן


The phenomenon of translating wikisyntax keywords is something I came across only in Hebrew WIkipedia (it might exist in other Wikipedias as well) but a general question about this situation could be:

Why community members (which are programmers) in some Wikipedias translate wikisyntax commands to their own mother language?

Why not use the command "as is" as demonstrated in the first example? The only requirement I could think think of is perhaps to prevent bi-directionality problems in template calls. 182.232.158.148 (talk) 03:13, 23 May 2020 (UTC)

We can have an almost identical template in which wikisyntax commands are translated to another language (Hebrew):*** 182.232.158.148 (talk) 03:20, 23 May 2020 (UTC)
> The only requirement I could think think of is perhaps to prevent bi-directionality problems in template calls
Seems like you answered your own question. Bawolff (talk) 04:51, 23 May 2020 (UTC)

I can't upload any image.

When I upload image to my wiki,mediawiki says:Error from line 160 of /includes/libs/mime/XmlTypeCheck.php: Class 'XMLReader' not found

phpinfo says --enable-xmlreader=shared

I use shared hosting.

How can I resolve this problem? Sadajun916 (talk) 04:28, 23 May 2020 (UTC)

You need to contact your hosting provider. If your hosting provider refuses to fix it, you will need to find a different hosting provider.
XMLReader is enabled by default in PHP, so its odd your hosting provider wouldn't have it enabled. Bawolff (talk) 04:50, 23 May 2020 (UTC)
I contacted my hosting provider and they say XMLReader can't use in php 7.3,so I'll find different hosting provider. Thank you for your help. Sadajun916 (talk) 05:23, 25 May 2020 (UTC)

What is wikisyntax refname in comparison to an HTML name-attribute of a <ref> tag?

I misunderstand what is the refname available in this wikisyntax template:

{{#if:{{{refname|}}}
    |
      {{#if:{{{content|}}}
        | 
        {{#tag:ref
            | name = {{{refname}}}
            | 1 = {{{content}}}
        }}
        |
        {{#tag:ref | name = {{{refname}}} }}
      }}
    |
      {{#tag:ref | 1 = {{{content|}}} }}
}}

I find it different than "ref name" (with a whitespace character in between the two words) mentioned here in Help:Cite.

What is wikisyntax refname in comparison to an HTML name-attribute of a <ref> tag?

---

This post is a derivative of the following post and section:

refname in that template is just a parameter name---the template is (presumably) invoked specifying a value for that parameter. "ref name" in the linked page refers to the name field of a ref tag. The template you show is constructing a ref tag, and in doing so it is setting <ref name="{{{refname}}}">. Clump (talk) 12:03, 23 May 2020 (UTC)

Issues with the API when logging in with a bot

I am trying to make a bot for a non-WMF wiki. When I send a POST request to log in, I always get a "NeedToken" error even though I do provide a token after querying for it, via https://.../api.php?action=query&meta=tokens&type=login&format=json. I then respond with the body:

{
 "action": "login",
 "lgname": username,
 "lgpassword": password,
 "lgtoken": token,
 "format": "json"
}

Where token is the token from response.query.tokens.logintoken and username and password are the username and password from my bot passwords.

I am aware that I need to manage and maintain cookies which I do by storing the Set-Cookie header from the response and then putting that back into the Cookie header of the request. That might have something to do with the issues I'm having. I did set the lgdomain but that didn't do anything.

I also think it is worth nothing that occasionally when editing when I click "Save Edit" the edit fails and tells me the edit couldn't be placed because of missing session data. If I click "Save Edit" again then the edit saves properly.

The wiki is running on MW 1.34.0. I am using Deno and the Fetch API.

(This was copied from a post in WP:VPT) VeryGoodDog (talk) 11:40, 23 May 2020 (UTC)

if your cookie handling code is wrong, it will cause the error you are seeing. Bawolff (talk) 10:02, 24 May 2020 (UTC)
YES, in the time time since I posted this, I have done a considerable amount of reading on CORS and cookies. As far as I can tell, the response I get does not include the proper Access-Control-Allow-Origin or Access-Control-Expose-Headers. Further, even though I set credentials to "include" I still do not receive the appropriate headers. VeryGoodDog (talk) 20:13, 24 May 2020 (UTC)
is your bot working cross domain? If so, you need to include the origin parameter to the api request, and ensure that the $wgCrossSiteAJAXdomains setting in LocalSettings.php includes the domain your script is running on.
Note: if using the experimental new oauth2 stuff (you are almost certainly not), the instructions are different. Bawolff (talk) 20:35, 24 May 2020 (UTC)
In case you haven't solved this yet, I was able to get it working with Deno fetch using content-type <code>application/x-www-form-urlencoded</code> and passing an instance of <code>URLSearchParams</code> to body. MW won't read a JSON body, and I couldn't get multipart/form-data + FormData to work (if you want to look into that further I think it has something to do with the "boundary" parameter).
If you see that your POST request is trying to set a different session cookie than your query, then you need to look at your cookie handling. Once I read the specs and parsed <code>set-cookie</code> correctly and provided the right format for <code>cookie</code> my session persisted. I did not have to include any CORS headers, <code>origin</code>, <code>credentials</code>, <code>lgdomain</code>, etc. 73.140.3.58 (talk) 01:51, 21 August 2020 (UTC)

Need help installing TemplateStyles / Besoin d'aide pour installer TemplateStyles

In English

Hello,

I would need your help for the installation of TemplateStyles, which I installed badly, I followed the tuto but i don't know where to put the code

composer install --no-dev

I installed Composer, but I don't know in which folder to put "composer-merge-plugin" and where I have to put the following code

{
"extra": {
"merge-plugin": {
"include": [
"extensions/*/composer.json",
"skins/*/composer.json"
]
}
}
}

and should i change, in the code, the part

"extensions/*/composer.json",
"skins/*/composer.json"

Can you help me ?
Thank you

PS: I'm on windows 10, Mediawiki 1.34.1 and I'm local


__________


En Français

Bonjour,

J'aurais besoin de votre aide pour l'installation de TemplateStyles, que j'ai mal installer, j'ai suivi le tuto mais je ne sais pas où mettre le code

composer install --no-dev

J'ai installer Composer, mais je ne sais pas dans quel dossier mettre "composer-merge-plugin" et où je dois mettre le code suivant

{
"extra": {
"merge-plugin": {
"include": [
"extensions/*/composer.json",
"skins/*/composer.json"
]
}
}
}

et est-ce que je dois changer, dans le code, la partie

"extensions/*/composer.json",
"skins/*/composer.json"

Pouvez vous me venir en aide ?

Merci

PS: Je suis sous windows 10, Mediawiki 1.34.1 et je suis en local Sebunian (talk) 11:47, 23 May 2020 (UTC)

For the records, I replied (from my work account) in https://phabricator.wikimedia.org/T253444#6160351.
1. You need to run the command "composer install --no-dev". It's not to "add" somewhere.
2. $IP stands for your installation path.
3. No, you should not change that.
Hope that helps. Malyacko (talk) 16:52, 23 May 2020 (UTC)
also, composer merge plugin is optional and not really needed sfaik Bawolff (talk) 18:07, 23 May 2020 (UTC)
@Malyacko
Thank you for answering me
1. I start the order with the "cmd"?
2. So the code I have to put in the composer.local.json-sample, which is in the folder of my Wiki? (Example: c:\ xampp\htdocs\monwiki20\composer.local.json-sample)
3. Okay
Sorry if i take a long time to understand
Thank you Sebunian (talk) 18:49, 23 May 2020 (UTC)
@Sebunian Hi,
1. I don't know what "I start the order with the "cmd"" means. You should follow the steps. If one step is unclear, please tell us which exact step on which website (link).
2. No, because Composer/fr#Utilisation du plugin composer-merge does not mention any file with the name "composer.local.json-sample". Please follow the steps... I don't know why you are thinking of "composer.local.json-sample", because the steps do not mention "composer.local.json-sample". Malyacko (talk) 19:43, 23 May 2020 (UTC)
@Malyacko Hi,
1. In fact, I don't understand this passage "When installing from Git run Composer to install PHP dependencies, by issuing composer install --no-dev in the extension directory.". With what I run the command ?
2. Concerning the composer.local.json-sample, is an error on my part. I rushed too quickly while writing
Thank You Sebunian (talk) 15:12, 24 May 2020 (UTC)
@Sebunian: You enter the command "composer install --no-dev" in the command line / terminal / console where you already are anyway. That is the command itself. Could you explain how you mean "with what"? Malyacko (talk) 17:04, 24 May 2020 (UTC)
I think I'm trying a manipulation that I don't need since I didn't download the extension via Git, but via this link (since I don't have a server and my Wiki is only on my computer).
So how do I get the code executed?
Thank You Sebunian (talk) 20:39, 24 May 2020 (UTC)
Hi, just to let you know, we are looking into why the download doesn't come with the dependencies pre-installed . Anyways, we're hoping this will be fixed by next week, so if we do indeed fix it, you could potentially just re-download the extension, once the problem is fixed.
> I think I'm trying a manipulation that I don't need since I didn't download the extension via Git, but via this link (since I don't have a server and my Wiki is only on my computer).
For the moment you do have to do the manipulation, due to an issue on our end (Which will hopefully be eventually fixed).
Anyways, the short windows specific version of the instructions is basically:
  1. Install composer via https://getcomposer.org/Composer-Setup.exe
  2. Open command prompt
  3. Change to the directory you have installed TemplateStyles in. You can do this by typing:
    cd \xampp\htdocs\monwiki20\extensions\TemplateStyles
    Followed by enter
  4. Type the following (followed by enter):
    composer install --no-dev
(If that doesn't work, you may need to adjust paths so that composer can find the PHP cli binary, or so that the composer binary is in your path). Bawolff (talk) 22:47, 24 May 2020 (UTC)
@Bawolff Thank you for your help. It's all good to install, at least I think, that's what it marked me
Loading composer repositories with package information
Updating dependencies
Package operations: 3 installs, 0 updates, 0 removals
  - Installing wikimedia/utfnormal (v2.0.0): Downloading (100%)
  - Installing wikimedia/at-ease (v2.0.0): Downloading (100%)
  - Installing wikimedia/css-sanitizer (v2.0.1): Downloading (100%)
Writing lock file
Generating autoload files
But now I have a new problem, when I want to modify the model via Special:ChangeContentModel, here is what it writes to me and in red,
 
Nouvelle ligne non valide dans la chaîne à la ligne 5, caractère 85.
Nouvelle ligne non valide dans la chaîne à la ligne 8, caractère 38.
Nouvelle ligne non valide dans la chaîne à la ligne 28, caractère 80.
Nouvelle ligne non valide dans la chaîne à la ligne 29, caractère 986.
Nouvelle ligne non valide dans la chaîne à la ligne 65, caractère 33.
Fin de la feuille de style non attendue dans le bloc à la ligne 85, caractère 15.
Fin de la feuille de style non attendue dans le bloc à la ligne 85, caractère 15.
Fin de la feuille de style non attendue dans le bloc à la ligne 85, caractère 15.
Fin de la feuille de style non attendue dans le bloc à la ligne 85, caractère 15.
Fin de la feuille de style non attendue dans le bloc à la ligne 85, caractère 15.
Fin de la feuille de style non attendue dans la règle à la ligne 85, caractère 15.
Liste de sélecteurs manquante à la ligne 1, caractère 1.
But as I doubt that this does not come from the installation problem. I think i'm going to created a new topic.
Thank you Sebunian (talk) 09:28, 25 May 2020 (UTC)

/maintenance/purgeList.php doesn't do anything

I'm currently setting up templates on my wiki resulting in lots of dependency chains, and I can't be bothered purging each of them individually. So I tried running php7.3-cli /maintenance/purgeList.php --all which returns "Done", but if I refresh the pages (while making sure to empty the browser cache!), they're not actually purged.

Adding --verbose makes it dutifully spit out a list of all pages on my wiki, so it seems like the script THINKS it's doing something, but it clearly isn't.

Could this be a permissions issue? Newbiepedian (talk) 22:09, 23 May 2020 (UTC)

Generally you would be better off just running runJobs.php or setting up your job queue better.
purgeList purges varnish/squid cache, which you don't have set up, so it does nothing. You can try using the --db-touch option which will do more of what you want, but again i would suggest just runJobs.php Bawolff (talk) 10:00, 24 May 2020 (UTC)

Question about BlueSpice - Is it overkill?

Hi,


I need to migrate my mediawiki to a new server and upgrade it from 1.23 to 1.34. I was going to use this time as an opportunity to update all the extensions, and maybe add some new ones: (VisualEditor, WikiSEO, WSOAuth, etc.)

In doing some research, I discovered BlueSpice, which at first glance seems like an all-in-one solution.....


So my questions are:


  • Would it be more practical to install BlueSpice during this process, or just add each extension I need individually?
  • Is BlueSpice overkill for a small website? (low traffic, 3 or 4 editors)
  • If my goal is to make Mediawiki more user friendly when editing, should I use BlueSpice or just a couple extensions?
  • And if so, which extensions make mediawiki the most user friendly?
  • And if I need to customize the theme, would BlueSpice interfere and make it more difficult, or would it not have an effect at all on customized themes?
  • Do I need to consider anything above when migrating my pages, images, and users?


Thanks. As you can see, I'm trying to understand if BlueSpice is a simple answer to modernizing my wiki and making it more user friendly for editors, or if it is just overkill since sometimes I tend to overestimate what I really need. And I don't really want to make things more complicated than necessary.


Thanks!


hi, you should probably ask the bluespice people about that. They're kind of their own separate thing. They are a bundle of extensions that many people like, especially when making a wiki for use inside a corporation.
In general,i believe that extension:VisualEditor makes the wiki much more friendly. Beyond that it depends on what you are trying to do and what your needs are. Lots of people like extension:InputBox. Bawolff (talk) 09:56, 24 May 2020 (UTC)

Is it SEO problematic to create footnotes with JavaScript?

I have an RTL (Hebrew) MediaWiki 1.34.0 website in which I am having a serious problem creating footnotes for articles with the core Extension:Cite because its de-facto lack of support in Hebrew, as described in great depth here:

Therefore, I thought of the following alternative approach;


Creating a JavaScript front end alternative to created footnotes in a similar way to that of MediaWiki Cite

It should run after enabling support in raw HTML (and after heeding associated warnings):

Manual:$wgRawHtml


The code should look approximately like this (unfinished code):


Template:Footnote

תבנית:הערה

<includeonly><span dir="rtl" class="footnote"><sup class="footnote_inner">{{{1}}}</sup></span></includeonly><noinclude>

[[קטגוריה:תבניות]]
</noinclude>


JavaScript

document.querySelectorAll(".footnote>sup").forEach((element, i) => {
    const li = document.createElement("li");
    li.append(...element.childNodes);
    element.textContent = i + 1;
    const footnotes_list = document.querySelector(".footnotes_list"); 
    footnotes_list.appendChild(li); 
});

const numbers = Array.from(Array(100)).map((e,i)=>i+1)
document.querySelectorAll(".footnote").forEach( (element, i)=>{
    element.setAttribute("href", `#footnote_${numbers[i]}`)
    element.setAttribute("id", "fn_"+numbers[i]);
});
document.querySelectorAll(".footnotes_list>li").forEach( (element, i)=>{
    element.setAttribute("id", "footnote_"+numbers[i]);
    element.setAttribute("href", `#fn_${numbers[i]}`)
});

Lets say I do create a 100% working code,

A question remains:

Is it SEO problematic to create footnotes with JavaScript (in MediaWiki websites)? 49.230.87.239 (talk) 04:18, 24 May 2020 (UTC)

A WebMasters StackExchange topic was created:
Is it SEO problematic to create footnotes with frontend JavaScript?
I can't link but Googling the above name should lead to it. 49.230.87.239 (talk) 15:34, 24 May 2020 (UTC)
A link was created by user:bawolff 49.230.87.239 (talk) 02:24, 26 May 2020 (UTC)

How do I change my username

How do I change my username Sarah Pechenik (talk) 05:32, 24 May 2020 (UTC)

If you want to change your username on MediaWiki.org you can use Special:GlobalRenameRequest. If you want to change usernames on your own wiki you need Extension:Renameuser Taavi (talk!) 07:29, 24 May 2020 (UTC)

Favicon

I post in LocalSettings: # $wgFavicon = "$wgScriptPath/resources/assets/favicon.ico"; After restart is big Trouble in browser. Why? What is my mistake? Peter 91.52.215.89 (talk) 12:45, 24 May 2020 (UTC)

LocalSettings does not exist. Maybe you meant LocalSettings.php? What does "big trouble" mean? https://www.php.net/manual/en/language.basic-syntax.comments.php might provide some hints. Malyacko (talk) 16:54, 24 May 2020 (UTC)

How to call a named reference from one page --- to another?

In an all-core MediaWIki 1.34.0, say I have a named reference created with Extension:Cite at one article.

Is it possible to call that very reference in another article (without creating a template containing it)?

I guess such (special) named reference would best be called "a pseudo-template" because it something that comes between a reference and a template.


How to call a named reference from one page --- to another? 49.230.87.239 (talk) 16:06, 24 May 2020 (UTC)

I don't think that's possible.
Transcluding the content of another page (your suggestion) sounds like a good way to do it.
If you are doing it lots in your wiki, maybe you could use Extension:Cargo to keep track of all the references.
You could probably write code to parse a page and return the content of whichever named ref tag you need. Jonathan3 (talk) 11:01, 25 May 2020 (UTC)

Unwanted external images displayed

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


I have Mediawiki version 1.34.1 . In some pages, members create link to pictures they didn't upload yet, which is fine. Sometimes the software will find pictures with the same name in external sources and display them instead of the usual link in red. For example in this page:

http://www.worldofcoins.eu/wiki/Amels

If you click on the image at the bottom :

http://www.worldofcoins.eu/wiki/File:MAM1.jpg

You can read :

"This image was originally posted to Flickr by rosergoula at https://www.flickr.com/photos/29958810@N08/6363610973. It was reviewed on 23 November 2011 by FlickreviewR and was confirmed to be licensed under the terms of the cc-by-2.0."

I wonder if I could avoid this, and not display this kind of unwanted external images, which are completely unrelated. Izotz314 (talk) 18:47, 24 May 2020 (UTC)

in your LocalSettings.php, there should be a line $wgUseInstantCommons = true; . Delete that line. Bawolff (talk) 19:07, 24 May 2020 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

suspencion

la suspencion ya paso y no me dejan estrar que hago 186.109.4.165 (talk) 06:06, 25 May 2020 (UTC)

porfabor respondad estoy muyyyy enojada no se que hacer hice varias cosas y no puedo dejen me entraaaaaaaarrrrrrrrrrrrrr 186.109.4.165 (talk) 06:07, 25 May 2020 (UTC)
Which wiki and what username? generally you will have to contact the administrators of whatever wiki you were blocked at.
[Google translated]:
¿Qué wiki y qué nombre de usuario? generalmente tendrá que contactar a los administradores de cualquier wiki en el que haya sido bloqueado. Bawolff (talk) 07:17, 25 May 2020 (UTC)

my mediawiki don't display hyphens in textes

hello there,

when i edit textes with hyphens (e. g. wood-chair) in my mediawiki, the mediawiki don't display the hyphen - (e. g. wood chair). can you help me to fix this? 2003:C3:FF20:C200:25B4:D5C3:3786:D04A (talk) 07:59, 25 May 2020 (UTC)

Which MediaWiki version and which web browsers (plural) have you tested this with? Malyacko (talk) 11:40, 25 May 2020 (UTC)
hi Malyacko, i have mediawiki 1.34.1 and firefox 76.0.1 and chromium 83.0.4103.61
... i see, chromium display my hyphens ... but i don't know why firefox doesn't 2clu (talk) 15:01, 25 May 2020 (UTC)
maybe a font issue, hard to say. I think its more likely an issue with that specific instance of firefox than mediawiki in general. Bawolff (talk) 17:01, 25 May 2020 (UTC)

error in document

how to report it


Install Mobile-Security-Framework-MobSF


maintainer is user epotetz


Rexioderum (talk) 11:10, 25 May 2020 (UTC)

@Rexioderum Please provide sufficient context plus links. We don't know what "it" is, we don't know what "Mobile-Security-Framework-MobSF" is, we don't know who "epotetz" is, and we don't know why this was posted here. Malyacko (talk) 11:40, 25 May 2020 (UTC)

Some CSS for Vector has been simplified

Hello!

I'd like to make a double-check about a change that was announced in Tech/News/2020/21.

Over-qualified CSS selectors have been changed. div#p-personal, div#p-navigation, div#p-interaction, div#p-tb, div#p-lang, div#p-namespaces or div#p-variants are now all removed of the div qualifier, as in for example it is #p-personal, #p-navigation …. This is so the skins can use HTML5 elements. If your gadgets or user styles used them you will have to update them. This only impacts the Vector skin.

On this wiki, this impacted or still impacts the following pages:

How to proceed now? Just visit all these pages and remove div# before these CSS selectors if it hasn't been removed so far.

Thank you! SGrabarczuk (WMF) (talk) 11:47, 25 May 2020 (UTC)

Help!

I Keep Trying To Log In And Create An Account On Awful Movies Wiki, But Everytime I Do, It Just Says: “ There seems to be a problem with your login session; this action has been canceled as a precaution against session hijacking. Please resubmit the form.” Someone please Help Me! 2601:248:5480:79D0:CCB6:F1DA:6998:87DD (talk) 16:09, 25 May 2020 (UTC)

Hi IP, you should seek for assistance at Awful Movies Wiki's help desk. – Ammarpad (talk) 16:25, 25 May 2020 (UTC)

How to edit multiple articles by the same way?

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


Hi,

I have to wiki sites. Let's say wiki#1 and wiki#2.

I have prepared many articles at wiki#1, and now I want to export them to wiki#2.

So far I understand what to do.

But now I want not to delete the articles from wiki#1, but to leave external redirects to the same articles on wiki#2.

How can I do that?

I have hundreds of articles, I don't like to edit every single manually. 2A02:908:3111:7DA0:5412:338A:BD55:14F9 (talk) 20:06, 25 May 2020 (UTC)

Consider Pywikibot Bawolff (talk) 20:42, 25 May 2020 (UTC)
Isn't there any command like
#redirect [wiki#2 $NameOfArticle]
? 2A02:908:3111:7DA0:F5BA:9466:A806:79DC (talk) 10:06, 26 May 2020 (UTC)
maybe manual:$wgDisableHardRedirects.
See also help:interwiki and manual:$wgRedirectSources Bawolff (talk) 15:32, 26 May 2020 (UTC)
I had another idea.
Is it possible to take many articles and edit them with the same text?
So that the written text will be saved as the content or many chosen articles at the same time.
Thanks either way. 2A02:908:3111:7DA0:580:5B55:1EF8:481E (talk) 11:00, 29 May 2020 (UTC)
If you have command line access to the wiki, it may be easier to use the edit.php maintenance script Ciencia Al Poder (talk) 17:35, 29 May 2020 (UTC)
it sounds like you are describing templates Bawolff (talk) 01:30, 30 May 2020 (UTC)
Ha ha thanks Bawolff. Yes it's kind of a way.
Thank you guys anyway, I will look for a way. 2A02:908:3111:7DA0:CCF9:36B7:CFCE:F7AD (talk) 20:44, 2 June 2020 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

How could I permanently delete an individual page contribution?

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.


Permanent to save storage space. YousufSSyed (talk) 22:34, 25 May 2020 (UTC)

if the page is "deleted" by mediawiki, run deleteArchivedRevisions.php
Note, your db may not automatically release disk space after things are deleted. You may have to run OPTIMIZE TABLE text, archive;
See also manual:$wgCompressRevisions and manual:compressOld.php Bawolff (talk) 00:05, 26 May 2020 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Maintenance update without shell (ssh) access?

Is it possible to run the maintenance/update.php file without shell (ssh) access? BubbaUsesWiki (talk) 01:57, 26 May 2020 (UTC)

See Manual:Upgrading#Web browser * Pppery * it has begun 02:18, 26 May 2020 (UTC)

i can no longer upload images

hello, i have a mediawiki that i am no longer able to upload images to. i added error_reporting to my LocalSettings.php and get the following error:


[234bdfb5] /index.php?title=Special:Upload Exception from line 219 of /home4/bqopdcom/public_html/includes/upload/UploadStash.php: key '17i161z078qk.5dib92.1.jpg' is not in a proper format

Backtrace:

#0 /home4/bqopdcom/public_html/includes/upload/UploadBase.php(853): UploadStash->stashFile(string, string)

#1 /home4/bqopdcom/public_html/includes/upload/UploadBase.php(866): UploadBase->stashFile()

#2 /home4/bqopdcom/public_html/includes/upload/UploadBase.php(875): UploadBase->stashFileGetKey()

#3 /home4/bqopdcom/public_html/includes/specials/SpecialUpload.php(347): UploadBase->stashSession()

#4 /home4/bqopdcom/public_html/includes/specials/SpecialUpload.php(448): SpecialUpload->showUploadWarning(array)

#5 /home4/bqopdcom/public_html/includes/specials/SpecialUpload.php(185): SpecialUpload->processUpload()

#6 /home4/bqopdcom/public_html/includes/specialpage/SpecialPage.php(379): SpecialUpload->execute(NULL)

#7 /home4/bqopdcom/public_html/includes/specialpage/SpecialPageFactory.php(503): SpecialPage->run(NULL)

#8 /home4/bqopdcom/public_html/includes/Wiki.php(285): SpecialPageFactory::executePath(Title, RequestContext)

#9 /home4/bqopdcom/public_html/includes/Wiki.php(588): MediaWiki->performRequest()

#10 /home4/bqopdcom/public_html/includes/Wiki.php(447): MediaWiki->main()

#11 /home4/bqopdcom/public_html/index.php(46): MediaWiki->run()

#12 {main}


any help would be great, thank you! Kevlar (talk) 03:10, 26 May 2020 (UTC)

Import .xdxf dictionary to MediaWiki - error: Expected <mediawiki> tag, got xdxf

====

Editing and changing the initial request and now need the following help:

will appreciate any help on this matter on transferring (importing) dictionary file format of .xdxf into MediaWiki.

The initial topic bellow not actual due to impossibility to import .xdxf format with ImportDump.php

====

Hi all,

new to MediaWiki and having some issues with a really simple steps.

Just installed fresh MediaWiki and need to upload a database to it, a simple dictionary in the file .xdxf


Using the option of importdump.php

uploaded my file to the maintenance folder under MediaWiki installation on the hosting

Connected with ssh:

php importDump.php < dict.xdxf


And received the following error:


-bash-4.2$ php importDump.php < dict.xdxf

MWException from line 574 of /public_html/m/includes/import/WikiImporter.php: Expected <mediawiki> tag, got xdxf

#0 //public_html/m/maintenance/importDump.php(359): WikiImporter->doImport()

#1 /public_html/m/maintenance/importDump.php(301): BackupReader->importFromHandle(Resource id #160)

#2 /public_html/m/maintenance/importDump.php(129): BackupReader->importFromStdin()

#3 /public_html/m/maintenance/doMaintenance.php(99): BackupReader->execute()

#4 /public_html/m/maintenance/importDump.php(364): require_once('/home/u26813284...')

#5 {main}


---

Tried another command:

-bash-4.2$ php importDump.php --conf dict.xdxf --user-prefix=""

Parse error: syntax error, unexpected 'version' (T_STRING) in /public_html/m/maintenance/dict.xdxf on line 1

-bash-4.2$


Here is the line 1 inside my .xdxf file:

<?xml version="1.0" encoding="UTF-8" ?>


So what could be the problem?

And what could be suggested in order to import simple dictionary file .xdxf to fresh installation of MediaWiki?


Thank you! Agoqwert (talk) 04:31, 26 May 2020 (UTC)

importDump is for importing mediawiki backup files. It doesn't understand xdxf files. Bawolff (talk) 04:52, 26 May 2020 (UTC)
What are my options than?
How could I import .xdxf dictionary into MediaWiki?
Thank you! Agoqwert (talk) 05:45, 26 May 2020 (UTC)
you would have to write an importer yourself or find an already prewritten one. I hadn't even heard of xdxf before, so i'm doubtful an importer already exists. Bawolff (talk) 06:53, 26 May 2020 (UTC)
@Bawolff, thank you for your answers!
But it is still sound very strange. Especially for CMS that exists for decades. And especially that MediaWiki is often used as encyclopedia or simple dictionary resource..
What I need is to upload a simple dictionary with word definitions to MediaWiki. There are hundreds, or even thousands of projects like this over the web. But strangely I didnt found any simple How-to in order to import a known dictionary format file of .xdxf to MediaWiki, what is sound as something really bizzard to me...
...and..I`m not a developer or a programmer, but do have some experience with Drupal, WordPress, SharePoint and similar configurations..
--
Anyway, will appreciate any help on this matter on transfering dictionary file format of .xdxf into MediaWiki.
Thanks!

Agoqwert (talk) 17:33, 26 May 2020 (UTC)
there just simply hasn't been demand for that particular format. Unless you can find someone who has already done it, you're probably going to have to figure out how to make an importer yourself, or pay someone to do so Bawolff (talk) 19:14, 26 May 2020 (UTC)

Password

I don't have the phone number anymore. I can't. Get text to get new password so I can get into account 184.205.253.64 (talk) 06:28, 26 May 2020 (UTC)

I think you are asking in the wrong place. Ask at whatever website you are referring to. Bawolff (talk) 06:54, 26 May 2020 (UTC)

install separate wikis in to different subfolders?

I just installed bluespice in to url.com/bluespice/wiki

Is it possible to install another instance of mediawiki (just the regular basic version) in to url.com/mediawiki/wiki ?

So that I can test, configure, and experiment with the two installations?

Thanks. BubbaUsesWiki (talk) 07:52, 26 May 2020 (UTC)

I don't see why not, if you configure your webserver software correctly and if the installations use different local paths and databases. Malyacko (talk) 08:09, 26 May 2020 (UTC)
as long as they use different db names,it should be fine. Bawolff (talk) 15:13, 26 May 2020 (UTC)

WinCache not working - IIS

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 created a new WikiMedia, but every page takes about 20 seconds to load. I have the error:


[MessageCache] MessageCache using store WinCacheBagOStuff

[objectcache] MediumSpecificBagOStuff::lock failed due to timeout for my_wiki:messages:en-gb.

[MessageCacheError] MessageCache::load: Failed to load en-gb

[MessageCache] MessageCache::load: Loading en-gb... local cache is empty, global cache is empty, loading from database, could not acquire main lock, waited for other thread to complete, global cache is empty, loading from database, could not acquire main lock, could not acquire status key., loading FAILED - cache is disabled

[DBQuery] Wikimedia\Rdbms\DatabaseMysqlBase::open [0s] 10.10.2.2: SET group_concat_max_len = 262144, sql_mode = ''

[DBReplication] Cannot use ChronologyProtector with EmptyBagOStuff


php.ini:


[PHP]

display_errors = On

log_errors = On error_log = C:\Windows\Temp\php.log

[WinCache] extension = php_wincache.dll

wincache.fcenabled = 1

wincache.ucenabled = 0

wincache.fcachesize = 64

wincache.fcndetect = 1

wincache.maxfilesize = 256

wincache.chkinterval = 10

wincache.enablecli = 1

wincache.ucachesize = 8

wincache.scachesize = 8


Local Settings:


$wgShowExceptionDetails = true;

$wgShowDBErrorBacktrace = true;

$wgDebugComments = true; $wgDebugLogFile = 'C:\Windows\Temp\mediawiki.log';

$wgCacheDirectory = "d:\cache";

$wgFileCacheDirectory = "d:\cache ";

$wgEnableSidebarCache = true;

$wgUseFileCache = true;

$wgShowIPinHeader = false;

$wgEnableParserCache = true;

$wgCachePages = true;

$wgMainCacheType = CACHE_ACCEL;

$wgMessageCacheType = CACHE_ACCEL;

$wgParserCacheType = CACHE_ACCEL;

$wgMemCachedServers = array();


Using:

MediaWiki 1.34 (latest as of two weeks ago)

PHP 7.3

Windows Server 2016 with IIS 10.0


Any ideas? Cache files are being generated under D:\cache and IIS_IUSRS has modify permissions. Kittencorn (talk) 13:54, 26 May 2020 (UTC)

I have move the cache to "$IP\cache". It is creating files but I am getting the same error. Kittencorn (talk) 14:32, 26 May 2020 (UTC)
there are several different types of cache. $wgCacheDirectory is file cache and localization cache only. Bawolff (talk) 15:12, 26 May 2020 (UTC)
In php.ini wincache.ucenabled has to be 1.
For best results i would suggest wincache.ucachesize be at least 20, although you might want to even make it 64. Bawolff (talk) 15:11, 26 May 2020 (UTC)
btw, $wgUseFileCache only affects logged out users. It also makes debugging things a bit more complicated. If logged out users are going to visit your site its worth it, but if its just you and you'll always be logged in, its probably more trouble than its worth. Bawolff (talk) 15:36, 26 May 2020 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

$wgLDAPRequiredGroups & LDAPAuthentication2???

I'm trying to get my LDAPAuthentication2 setup squared away. The documentation on this vs. the original LDAPAuthentication is kind of lacking. I need to setup group restrictions, and I'm trying to follow the examples on Extension:LDAP Authentication/Examples#Group configuration, but I'm pretty sure its not working because its written for the older LDAPAuthentication not v.2?

Here is what I have for my LocalSettings.php in relation to the LDAP connection. I'm trying to limit login to the group named "UBSA_Student_Staff".


//LDAP Authentication Config

$wgMinimalPasswordLength = 6;

$wgPasswordPolicy['policies']['sysop']['MinimalPasswordLength'] = 6;

$wgPasswordPolicy['policies']['Administrators']['MinimalPasswordLength'] = 6;

$wgPasswordPolicy['policies']['interface-admin']['MinimalPasswordLength'] = 6;

$wgPasswordPolicy['policies']['bureaucrat']['MinimalPasswordLength'] = 6;

wfLoadExtension( 'LDAPProvider' );

wfLoadExtension( 'PluggableAuth' );

wfLoadExtension( 'LDAPAuthentication2' );

$LDAPAuthentication2AllowLocalLogin = true;


// Create Wiki-Group 'engineering' from default user group

$wgGroupPermissions['UBSA_Pro_Staff'] = $wgGroupPermissions['sysop'];


// Private Wiki. External LDAP login. Default NS requires login.

$wgEmailConfirmToEdit = false;

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

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

$wgGroupPermissions['*']['createaccount'] = false;

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

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

$wgBlockDisablesLogin = true;


// Load LDAP Config from JSON

$ldapJsonFile = "$IP/ldap.json";

$ldapConfig = false;

if (is_file($ldapJsonFile) && is_dir("$IP/extensions/LDAPProvider")) {

  $testJson = @json_decode(file_get_contents($ldapJsonFile),true);

  if (is_array($testJson)) {

    $ldapConfig = true;

  } else {

    error_log("Found invalid JSON in file: $IP/ldap.json");

  }

}

$wikiRequestSafe  = true;


// Activate Extension

if ( $ldapConfig ) {

  wfLoadExtension( 'PluggableAuth' );

  wfLoadExtension( 'LDAPProvider' );

  wfLoadExtension( 'LDAPAuthentication2' );

  wfLoadExtension( 'LDAPAuthorization' );

  wfLoadExtension( 'LDAPUserInfo' );

  wfLoadExtension( 'LDAPGroups' );

  $LDAPProviderDomainConfigs = $ldapJsonFile;

  $wgPluggableAuth_ButtonLabel = "Log In";

  if ($wikiRequestSafe) { $LDAPAuthentication2AllowLocalLogin = true; }

}

$wgShowExceptionDetails = true;

$wgShowSQLErrors = true;

$wgShowDBErrorBacktrace = true;


//LDAP / AD Group Restrictions

$wgLDAPRequiredGroups = array( "itorg_ad_buffalo_edu"=>array("CN=UBSA_Student_Staff,OU=Groups,OU=UBSA,OU=StudentAssociation,OU=ITORGS,DC=itorg,DC=ad,DC=buffalo,DC=edu"));


I asked about this last week and it got buried so far that I couldn't find it to bump.

I would love it if someone can point me to the right documentation for the new LDAPAuth 2 group restrictions info! Thanks!


Rosenblitt (talk) 17:18, 26 May 2020 (UTC)

So I didn't understand that the Group Restrictions happen as part of the LDAPAuthorization extension... @Osnard was able to help me out:
Extension talk:LDAPAuthorization/Archive 2/Flow export#h-Screwing_up_my_ldap.json_file_with_authorization_section-2020-05-28T21:30:00.000Z Rosenblitt (talk) 15:39, 29 May 2020 (UTC)

Importing the Wikipedia Template:Flag into my wiki

Hi,

i was wondering if there is an easy way to use Wikipedia's Template:Flag in my Mediawiki instalation without much work?

The only way i could find till now was copy the code and all the images and upload it one by one into my wiki. That would be to much work. Is there an easier way?

Thanks in advance 2003:DE:7F29:7800:6D0A:E433:249C:1954 (talk) 17:33, 26 May 2020 (UTC)

$wgUseInstantCommons = true; would mean you dont have to import all images.
You could try enabling scary interwiki transclude, ymmv with that though Bawolff (talk) 19:17, 26 May 2020 (UTC)

Request language in template

Hi all,

How do I request the language (chosen by the user) in a template so I can act on that?

Thanks for the help.

Regard, Jethro Waanders (talk) 17:33, 26 May 2020 (UTC)

Talk:Multilingual Templates and Modules/Flow export#h-Change_the_behavior_of_the_languages_provided-2019-06-22T19:37:00.000Z Malyacko (talk) 06:56, 27 May 2020 (UTC)

Install Mediawiki using settings from LocalSettings.php

Hi!


I would like to know if it's possible to setup Mediawiki with an already defined LocalSettings.php file, instead of following the manual steps to generate one (basic setup), or running install.php to generate the file and prepare the database.


I tried running update.php but it gave me an error (probably because the setup is required before the update can be done).


What I want is to do what the basic setup does, but using the parameters already defined in the LocalSettings.php file (similar to what is done when running install.php. but without defining the parameters in the command line and generating a new file, but using the parameters already defined in the file).


Thanks in advance! Lucasbasquerotto (talk) 18:08, 26 May 2020 (UTC)

i dont think that already exists, but you could probably write a really simple maintenance script wrapper around install.php to do so. Bawolff (talk) 19:16, 26 May 2020 (UTC)
@Bawolff Thanks for the reply. I ended up creating 2 files to do that, maintenance/upgrade.php and includes/installer/CustomCliInstaller.php.
The upgrade.php file is very similar to install.php, except that it gets the parameters defined in the LocalSettings.php file (instead of getting them from the command line arguments) and calls CustomCliInstaller.php (while install.php calls CliInstaller.php).
The CustomCliInstaller.php extends CliInstaller.php and the main difference is that it overrides the execute method, because CliInstaller.php gives an error at the execute method if the file LocalSettings.php already exists.
Bellow are the code of the 2 files (when I pasted the code, the indentation and empty lines were removed, I don't know if this is normal).
upgrade.php:
<?php
/**
* CLI-based MediaWiki installation and configuration.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* http://www.gnu.org/copyleft/gpl.html
*
* @file
* @ingroup Maintenance
*/
require_once __DIR__ . '/Maintenance.php';
require_once __DIR__ . '/../includes/AutoLoader.php';
require_once __DIR__ . '/../includes/installer/CustomCliInstaller.php';
define( 'MW_CONFIG_CALLBACK', 'Installer::overrideConfig' );
define( 'MEDIAWIKI_INSTALL', true );
/**
* Maintenance script to upgrade MediaWiki
*
* Default values for the options are defined in DefaultSettings.php
* (see the mapping in CliInstaller.php)
*
* @ingroup Maintenance
*/
class CommandLineUpgrader extends Maintenance {
public function __construct() {
parent::__construct();
global $IP;
$this->addDescription( "CLI-based MediaWiki installation and configuration.\n" .
"Will install based on the settings at LocalSettings.php or update (if it's already installed)." );
}
public function execute() {
    global $IP;
$vars = Installer::getExistingLocalSettings();
if ( !$vars ) {
$status = Status::newFatal( "config-download-localsettings" );
$this->showStatusMessage( $status );
return $status;
}
$sitename = $vars['wgSitename'];
$admin = $vars['wgDBuser'];
$options = [
'dbtype' => $vars['wgDBtype'],
'dbserver' => $vars['wgDBserver'],
'dbname' => $vars['wgDBname'],
'dbuser' => $vars['wgDBuser'],
'dbpass' => $vars['wgDBpassword'],
'dbprefix' => $vars['wgDBprefix'],
'dbtableoptions' => $vars['wgDBTableOptions'],
'dbport' => $vars['wgDBport'],
'dbschema' => $vars['wgDBmwschema'],
'dbpath' => $vars['wgSQLiteDataDir'],
'server' => $vars['wgServer'],
'scriptpath' => $vars['wgScriptPath'],
'lang' => $vars['wgLanguageCode'],
'pass' => $vars['wgDBpassword'],
];
try {
$installer = new CustomCliInstaller( $siteName, $admin, $options );
} catch ( \MediaWiki\Installer\InstallException $e ) {
$this->output( $e->getStatus()->getMessage( false, false, 'en' )->text() . "\n" );
return false;
}
$status = $installer->doEnvironmentChecks();
if ( $status->isGood() ) {
$installer->showMessage( 'config-env-good' );
} else {
$installer->showStatusMessage( $status );
return false;
}
$status = $installer->execute();
if ( !$status->isGood() ) {
$installer->showStatusMessage( $status );
return false;
}
$installer->showMessage(
'config-install-success',
$installer->getVar( 'wgServer' ),
$installer->getVar( 'wgScriptPath' )
);
return true;
}
}
$maintClass = CommandLineUpgrader::class;
require_once RUN_MAINTENANCE_IF_MAIN;
CustomCliInstaller.php:
<?php
/**
* Core installer command line interface.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* http://www.gnu.org/copyleft/gpl.html
*
* @file
* @ingroup Installer
*/
/**
* Class for the custom installer command line interface.
*
* @ingroup Installer
* @since 1.17
*/
class CustomCliInstaller extends CliInstaller {
/**
* @param string $siteName
* @param string|null $admin
* @param array $options
* @throws InstallException
*/
public function __construct( $siteName, $admin = null, array $options = [] ) {
parent::__construct( $siteName, $admin, $options );
}
/**
* Main entry point.
* @return Status
*/
public function execute() {
// If APC is available, use that as the MainCacheType, instead of nothing.
// This is hacky and should be consolidated with WebInstallerOptions.
// This is here instead of in __construct(), because it should run run after
// doEnvironmentChecks(), which populates '_Caches'.
if ( count( $this->getVar( '_Caches' ) ) ) {
// We detected a CACHE_ACCEL implementation, use it.
$this->setVar( '_MainCacheType', 'accel' );
}
$result = $this->performInstallation(
[ $this, 'startStage' ],
[ $this, 'endStage' ]
);
// PerformInstallation bails on a fatal, so make sure the last item
// completed before giving 'next.' Likewise, only provide back on failure
$lastStepStatus = end( $result );
if ( $lastStepStatus->isOK() ) {
return Status::newGood();
} else {
return $lastStepStatus;
}
}
}
Any possibilities of this being added (or adapted) to the mediawiki code? Lucasbasquerotto (talk) 12:44, 1 June 2020 (UTC)
Took a bit of googling but this is exactly what I need! Thanks!
Something like this should absolutely be included!
I'm using Terraform to deploy my environment in AWS. Having to manually run the stock installer cli tool every time I teardown and deploy is quite the pain. It'd be extra nice if MysqlInstaller respected the $wgDBssl setting. SeriouslyThat'sTaken? (talk) 23:18, 1 March 2023 (UTC)
Is this still the only way to do this? I'm looking into automating a media-wiki "stack" but the LocalSettings.php/install process is being the most annoying thing to deal with on new setups. JoeMGomes99 (talk) 09:46, 8 January 2025 (UTC)

Organizing Pages In Hierarchy

Hi Everyone,

I'm new to MediaWiki and I like it quite a bit. It is astonishing to be able to setup a so advanced and customizable environment without having to spend thousand of euros, so I'm trying to learn how to use it hoping it can suit my needs.

I'd like to know if there is a way of organizing content in a hierarchy rather than as flat content. I need it for two reasons: (1) I need to be able to setup which user has access to which "group" of pages (like Confluence Spaces), (2) I need to be able to navigeate the hierarchy of pages (of a given "space") easily.

It would be nice if this process of creating the hierarchy tree could happen in an automatic or semi-automatic way, since I need even not-skilled user to create new pages.

I've seen something like this can be achieved by means of subpages, but I don't think permissions management can be applied when working with subpages...

Is there some extension of MediaWiki feature you feel like suggesting me?

Thank you for your time!

Alessandro AlessandroMartinelli159 (talk) 18:40, 26 May 2020 (UTC)

so support for fine grained read permissions in mediawiki is very weak. You can generally do it if users arent allowed to edit, but if they are allowed to edit then usually they can get access to pages they are not supposed to see.
Generally the most secure way is to have a separate wiki for each group. Some extensions also claim to allow locking down per group, but ymmv as to how fully tested they are.
Some pages that might be interesting
  • Manual:$wgWhitelistReadRegexp
  • extension:Lockdown (probably the most mature and best tested of the extensions for access control. Still no garuntees)
  • BlueSpice (its kind of a customized version of mediawiki for bizz environments. i think it has support for access control, but i dont know that much about it, ymmv)
  • help:Categories (for hierarichal organization generally, unrelated to access control) Bawolff (talk) 20:04, 26 May 2020 (UTC)
Thanks! AlessandroMartinelli159 (talk) 20:37, 26 May 2020 (UTC)

Why Can’t I Log In?

Hi. I seem to be having trouble logging into my Miraheze account. Every time I enter my username and password, I keep getting a notice that says "There seems to be a problem with your login session; this action has been canceled as a precaution against session hijacking. Please resubmit the form." I keep resubmitting my username and password, but nothing works. Can you please help me? I would appreciate it a lot. 208.107.110.23 (talk) 20:50, 26 May 2020 (UTC)

sometimes this can happen if you have cookies disabled.
Beyond that, try asking at miraheze support - maybe they are having a server issue. Bawolff (talk) 00:41, 27 May 2020 (UTC)

Art

Help my account 2605:A000:1128:49FE:1C62:7914:DD93:8A60 (talk) 04:29, 27 May 2020 (UTC)

Where? How? Why? Malyacko (talk) 06:54, 27 May 2020 (UTC)

Remove comma from citations over 1000

I noticed here that, when references in WP articles go over 1000, they take up quite a lot of space in a way that makes text harder to read. Part of the reason for this is that they include the optional thousands comma. At VPT, others pointed out that this is inconsistent with the references section list itself, which does not use commas. So there seems to be consensus to get rid of them. Could that be done? Sdkbtalk 09:12, 27 May 2020 (UTC)

I've created a Phabricator task for this: T253743. Rchard2scout (talk) 10:52, 27 May 2020 (UTC)

Why brackets ([]) are flipped (][) in an RTL website?

I have an RTL (Hebrew) 1.34.0, principally all-core MediaWiki website with the following Template:Cite:

<includeonly>{{#if:{{{refname|}}}
| {{#tag:ref|{{{content|}}}|name={{{refname}}}}}
| {{#tag:ref|{{{content|}}}}}
}}</includeonly>

It works fine both for unnamed calls and named calls (calls that don't have an HTML name attribute, or, calls that do have it) and it also works well for calls by name.


And yet I have the problem that brackets ([]) appear flipped (][);

Output examples:

בדיקה:Cite with parameter calls WITHOUT English naming

First check]1[ Second check]2[ Third check]3[

  1. ^ First check
  2. ^ Second check
  3. ^ Third check

בדיקה:Cite with parameter calls WITH English naming

First check]1[ Second check]2[ Third check]2[

  1. ^ First check
  2. ^ לקפוץ מעלה אל:2.0 2.1 Second check


This front-end problem persists even with the radical JavaScript executed in browser console:

document.querySelectorAll("*").forEach(
    (element)=>{
        element.setAttribute('dir', 'ltr')
    }
)

Why brackets ([]) are flipped (][) in an RTL website? 49.230.87.239 (talk) 10:48, 27 May 2020 (UTC)

Brackets are a weak entity when it comes to directionality. See https://www.w3.org/International/articles/strings-and-bidi/
Plus behavior also depends on how much your web browser has implemented the Unicode Bidirectional Algorithm. Malyacko (talk) 11:22, 27 May 2020 (UTC)
you dont include any examples of input here. For template questions, we need to know the template, its input, and the corresponding output.
Most likely answer is the input has brackets flipped, perhsps accidentally, due to bidi. Bawolff (talk) 14:53, 27 May 2020 (UTC)
@Malyacko The term "brackets" isn't mentioned in the linked article; there are brackets there, yes, but they are brought in a specific code example and not about any specific problem with brackets.
My browser is latest Chrome: Version 83.0.4103.61 (Official Build) (64-bit) 49.230.87.239 (talk) 02:18, 28 May 2020 (UTC)
Per Bawolff's comment, this is the input:
Cite with parameter calls without English naming
First check{{Cite|content=First check}}
Second check{{Cite|content=Second check}}
Third check{{Cite|content=Third check}}
<references />
Cite with parameter calls with English naming
First check{{Cite|content=First check}}
Second check{{Cite|content=Second check|refname=First_name}}
Third check {{Cite|refname=First_name}}
<references />
As can be read; there are no brackets in the input at all; the flipping is not from input. 49.230.87.239 (talk) 02:21, 28 May 2020 (UTC)
@Amire80
In all your years as a bidi developer (if that's an accurate term to describe your work at Wikimedia foundation) you might came across this "RTL-English" problem and perhaps could suffice an insight. 49.230.87.239 (talk) 02:22, 28 May 2020 (UTC)
@קיפודנחש 49.230.87.239 (talk) 02:23, 28 May 2020 (UTC)
Works totoally fine for me: https://he.wikipedia.org/wiki/%D7%9E%D7%A9%D7%AA%D7%9E%D7%A9:Bawolff/sandbox (I also tested on my own computer with a fresh version of MediaWiki, to make sure that hebrew wikipedia did not have any customizations). Only issue is the [3] is slightly in wrong place (Which could be solved by ending with a &lrm; or putting the whole thing in a <div dir="auto">...</div>.
So it seems very likely this issue is due to some customization you made to your wiki. Bawolff (talk) 03:27, 28 May 2020 (UTC)
@Bawolff I think I was confused myself but I still encounter a similar problem even in the test page you created in Hebrew Wikipedia
משתמש:Bawolff/sandbox
In RTL-English state I do get [] but in LTR-English state (which I get with the following JS) I get ][:
document.querySelectorAll("*").forEach(
    (element)=>{
        element.setAttribute('dir', 'ltr')
    }
)
In other words; I can have an RTL-English state just fine but I can't have LTR-English state for English pages just fine. 49.230.87.239 (talk) 04:08, 28 May 2020 (UTC)
I don't think that's a good way to set LTR mode. It would probably be better to just enable $wgPageLanguageUseDB and use Special:PageLanguage to set a specific page to english, or just wrap the whole page in <div dir="ltr">...content here</div> (or maybe dir=auto).
That said, your JS snippet does not cause the behaviour you describe when i tested it. Bawolff (talk) 04:37, 28 May 2020 (UTC)
@Bawolff
  • If I understood the first solution correctly than personally wouldn't want to create an array at LocalSettings.php in which I will manually refer to every webpage which is primarily in English
  • Wrapping everything inside a <div> with dir=ltr actually solved the problem but it doesn't flip the heading, let along, generally all other ("boilerplate") structures of the webpage as a whole.
I tested the JS snippet several times and I just double checked it in משתמש:Bawolff/sandbox and I still got the same behavior; it might do with Operating system or configuration. I agree it's not a good way to go; I just wanted to describe this wired behavior here in the posts to perhaps get an insight on why it happened (I guess it might do with operating system as well as browsers).
Anyway, for me personally this is no longer a problem; my main problem was and is creating a template working for Hebrew and I have created a hopefully last post about it:
How to translate this Cite template to Hebrew? 49.230.87.239 (talk) 04:53, 28 May 2020 (UTC)
> If I understood the first solution correctly than personally wouldn't want to create an array at LocalSettings.php in which I will manually refer to every webpage which is primarily in English
No, you can just set $wgPageLanguageUseDB = true; and then You can visit the page Special:PageLanguage to adjust the language of individual pages. You don't have to list each page individually in LocalSettings.php
> Wrapping everything inside a <div> with dir=ltr actually solved the problem but it doesn't flip the heading, let along, generally all other ("boilerplate") structures of the webpage as a whole.
Yes that true. I think lots of people do use JS when they want that. You can also add ?uselang=en (or &uselang=en depending on the url) to force the interface into english (e.g. ), or set that in Special:Preferences. However that does a bit more than just changing the directionality of the interface Bawolff (talk) 05:08, 28 May 2020 (UTC)
I thank you for this detailing @Bawolff 49.230.87.239 (talk) 07:50, 28 May 2020 (UTC)

Sort order of pages with accented characters

Hi all,


I have a MediaWiki (v1.34 + SMW) with pages with titles in french that have accented characters.

When the pages are listed in their category page or in a semantic query, the alphabetical order is not correct.


For instance I get:

1. Dumas

2. Dumont

3. Duméril

but it should be:

1. Dumas

2. Duméril

3. Dumont

because Duméril = Dumeril < Dumont as é = e < o


Is there a way to tell Mediawiki to ignore accented characters when sorting alphabetically?


2A01:E35:2FBC:87D0:2982:8936:C576:E4B0 (talk) 11:55, 27 May 2020 (UTC)

You could probably adjust the collation for "fr" in the file "includes/collation/IcuCollation.php" Malyacko (talk) 12:29, 27 May 2020 (UTC)
Turns out that simply setting $wgCategoryCollation to 'uca-fr' does the trick.
Thank you @Malyacko for putting me on the right track ! 2A01:E35:2FBC:87D0:2982:8936:C576:E4B0 (talk) 13:03, 27 May 2020 (UTC)

New Mediawiki install slow

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 Mediawiki on an internal IIS server, but the original page loads can easily be 10-15 seconds.


LocalSettings:

$wgCacheDirectory = "$IP\cache";

$wgFileCacheDirectory = "$IP\cache ";

$wgEnableSidebarCache = true;

$wgUseFileCache = true;

$wgShowIPinHeader = false;

$wgEnableParserCache = true;

$wgCachePages = true;

$wgMainCacheType = CACHE_ACCEL;

$wgMessageCacheType = CACHE_ACCEL;

$wgParserCacheType = CACHE_ACCEL;

$wgMemCachedServers = array();


$wgShowExceptionDetails = true;

$wgShowDBErrorBacktrace = true;

$wgDebugComments = true;

$wgDebugLogFile = 'C:\Windows\Temp\MediaWiki\debug-{$wgDBname}.log';

wfLoadExtension( 'WikiEditor' );

wfLoadExtension( 'PluggableAuth' );

wfLoadExtension( 'Auth_remoteuser' );

wfLoadExtension( 'LDAPAuthentication2' );

wfLoadExtension( 'LDAPAuthorization' );

wfLoadExtension( 'LDAPProvider' );

wfLoadExtension( 'LDAPUserInfo' );

wfLoadExtension( 'LDAPGroups' );


php.ini:


[PHP]

display_errors = On

log_errors = On

error_log = C:\Windows\Temp\MediaWiki\php.log

[WinCache]

extension = php_wincache.dll

wincache.fcenabled = 1

wincache.ucenabled = 1

wincache.fcachesize = 64

wincache.fcndetect = 1

wincache.maxfilesize = 256

wincache.chkinterval = 10

wincache.enablecli = 1

wincache.ucachesize = 8

wincache.scachesize = 8


[opcache]

zend_extension=php_opcache.dll

opcache.enable=1


Once the page is loaded first time, it can take less than a second to reload, but 'new' pages still take anywhere between 6-20 seconds to load.


Any ideas as to how I can improve this or what to look for?


Windows Server 2016

IIS 10.0

PHP 7.3

WinCache 2.0.0.8 7.3


Kittencorn (talk) 16:39, 27 May 2020 (UTC)

so beyond caching, the next step would be to look at a profile of a page taking a long time to load. See Profiling for help on how to generate one. Post the profile here or in a pastebin. You could also try increasing wincache.ucachesize to 16 which might help or might do nothing.
Note: the majority of performance testing is done on apache+mysql+linux. Performance may be better on that platform (of course switching is not an option for most people) Bawolff (talk) 19:47, 27 May 2020 (UTC)
For the second time I have left it over night and come back to 500 Internal Error in the morning. I have every kind of logging on but there are no errors. I think I am going to need to move it to Linux. Kittencorn (talk) 08:37, 28 May 2020 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

redirect

Hello

Is the redirect indexed by search engines, especially Google?

I saw on Wikipedia that most articles have a lot of redirect! For example

https://en.wikipedia.org/w/index.php?title=Special:WhatLinksHere/Iran&hidelinks=1&hidetrans=1

Does this high number have a positive effect on SEO or does it have no effect at all? Sokote zaman (talk) 01:06, 28 May 2020 (UTC)

probably none. Rel=canonical should make google see them as the same article, and links only really boost rank when they come from other websites, not when they come from you own Bawolff (talk) 01:08, 28 May 2020 (UTC)
Thanks
Are they only indexed by Google Redirect? Sokote zaman (talk) 01:10, 28 May 2020 (UTC)

I'd like to add tabindex=-1 to an item in MediaWiki:Sidebar

Is it possible without using javascript? or even adding a anchor # to the item Eduemoni (talk) 03:12, 28 May 2020 (UTC)

It would require javascript or a php extension.
The MediaWiki:sidebar page generally doesn't let you set attributes, and even if it did, MediaWiki only lets you set a tabindex of 0 (and that only in new versions). Bawolff (talk) 03:33, 28 May 2020 (UTC)

How to translate this Cite template to Hebrew?

I have an RTL (Hebrew) 1.34.0 principally all-core MediaWiki website with Cite extension and ParserFunctions extension loaded in LocalSettings.php.

In this website I have Template:Cite with the following content, which I use to create English footnotes in English-only pages:

<includeonly>{{#if:{{{refname|}}}
| {{#tag:ref|{{{content|}}}|name={{{refname}}}}}
| {{#tag:ref|{{{content|}}}}}
}}</includeonly>

Credit for @Jonathan3 for developing this template.

Call input examples:


1) Cite with parameter calls WITHOUT English naming (by name attribute)

First check{{Cite|content=First check}}
Second check{{Cite|content=Second check}}
Third check{{Cite|content=Third check}}

<references />

2) Cite with parameter calls WITH English naming (by name attribute)

First check{{Cite|content=First check}}
Second check{{Cite|content=Second check|refname=First_name}}
Third check {{Cite|refname=First_name}}

<references />


Call output examples (appear fine in dir="rtl" modes):


1) Cite with parameter calls WITHOUT English naming

First check[1] Second check[2] Third check[3]

  1. ^ First check
  2. ^ Second check
  3. ^ Third check

2) Cite with parameter calls WITH English naming

First check Second check Third check

  1. ^ First check
  2. ^ לקפוץ מעלה אל:2.0 2.1 Second check

---

Note: Brackets appear flipped (][) in dir="ltr" modes

---

My problem

I want to use this template in an Hebrew project, that is, in an RTL && Right-align writing mode but if I write for example:

{{Cite|Content=non_messy_content}}

and my footnote happens to start with English after the first pipeline and also including Hebrew (say, as with links) than everything becomes jumbled up:

{{Cite|Content=תוכן_שהתבלגן}}

The first example shows non messy content and the second shows messy content (תוכן שהתבלגן); in the second example the "Content" part is situated wrongly.

My question

The only solution which comes to my mind to solve this problem is having an Hebrew call to the template such as

{{הערה|תוכן=תוכן_שלא_התבלגן}}

Which means Content=content which didn't go messy.

If there were ready to use RTL&&RA Hebrew (or any other RTL) <ref> tags than I wouldn't need such a Hebrew call but HTML is all English so I do need a template and an all-Hebrew one.


Hence I ask,

How to translate my template from English to Hebrew in a successful manner?

How to translate this Cite template to Hebrew? 49.230.87.239 (talk) 04:38, 28 May 2020 (UTC)

I give you my word of honor that this is generally and most likely the last time I will tag your profiles here with this RTL&&RA issue:
@Amire80 49.230.87.239 (talk) 04:39, 28 May 2020 (UTC)
I give you my word of honor that this is generally and most likely the last time I will tag your profiles here with this RTL&&RA issue:
@קיפודנחש 49.230.87.239 (talk) 04:39, 28 May 2020 (UTC)
I give you my word of honor that this is generally and most likely the last time I will tag your profiles here with this RTL&&RA issue
@IKhitron 49.230.87.239 (talk) 04:40, 28 May 2020 (UTC)
So this is a bit harder. Some possible solutions:
  • If you switch the page language via Special:PageLanguage (After enabling $wgUseDBPageLanguage), the edit box will be the directionality of the page language. (You can see an example of this by comparing the edit box for the page named MediaWiki:Translateinterface/en and MediaWiki:Translateinterface/he )
  • The following js might help: $( function() {box = document.getElementById( 'wpTextbox1' ); if (box) box.dir = 'auto';});
  • If you don't want to specify an overall override, or are authoring a mix of directionality in one page, you can directly insert RLM (right-to-left mark), LRM (Left-to-right mark) or FSI (first-strong-isolate) characters (You would have to directly insert the character, not the entity, for it to affect the edit box. However it may also have an effect on the output, in most cases it should probably be fine, and the isolate characters are probably less likely to have a negative effect than the other characters). This is kind of hard to do, and how to do it varries by operating system. In windows, you can insert an LRM using the key combination Alt+0253. This is what it looks like if you put an LRM character before and after the hebrew part:
{{Cite|content=‎תוכן_שהתבלגן‎}}
Bawolff (talk) 05:31, 28 May 2020 (UTC)
@Bawolff
example.com/MediaWiki:Translateinterface/en
example.com/MediaWiki:Translateinterface/he
Brought me a 404 in my own website.
---
Running the JS
$( function() {box = document.getElementById( 'wpTextbox1' ); if (box) box.dir = 'auto';});
in an edit page juxtaposed all English content left and all Hebrew content right; so I still have a problem calling {{Cite|Content=CONTENT}} in the middle of two Hebrew structures, if the content of the footnote is not solely in English.
---
About using either RLM/LRM; I don't know these
About FSI; If I understand correctly it is still experimental
---
Is there a way to tell the backend, for example
Where "הערה" put "Cite" AND where "שם" put "name"?
This way I write everything in Hebrew but the output will always be based on a preexisting English translation of the output, just one step before parsing and rendering everything else? 49.230.87.239 (talk) 10:25, 28 May 2020 (UTC)
you can use redirects for alternate template names. Template parameters can have multiple names in a fallback pattern. Bawolff (talk) 15:08, 28 May 2020 (UTC)
@Bawolff I have read in that page and what I understood is that a redirect does with transferring a human or a bot from one webpage to another.
Perhaps you meant something like that the page
תבנית:הערה
Should contain:
#REDIRECT [[Template:Cite]]
About fallback patterns for template parameters: I want to read about it, but I don't know where exactly,
Did you mean to: Help:Templates#Exceptions to the order of evaluation
I mostly misunderstand how is it essentially different than redirections and how does a template gets directed to do the "fallback",
Kindly, 49.230.87.239 (talk) 02:10, 29 May 2020 (UTC)
you can do {{{parametername|{{{alternativeparamname}}}}}} Bawolff (talk) 02:17, 29 May 2020 (UTC)
@Bawolff
I want to better understand that code
I went to Help:Templates and searched:
|{{{
I didn't match any data.
Please tell us the name of the concept or refer to a man page.
At least a bit more detailing would be helpful. 49.230.87.239 (talk) 02:57, 29 May 2020 (UTC)
its https://www.mediawiki.org/wiki/Help:Templates#Default_values - it is a parameter that has as its default value a different parameter Bawolff (talk) 05:39, 29 May 2020 (UTC)
So,
parameter תוכן has the default value of content
AND
parameter שם has the default value of refname (a name attribute)
? 49.230.87.239 (talk) 07:27, 29 May 2020 (UTC)
@Jonathan3 now after the English phase was dealt with in depth (and success), you might have an approach to recommend about translating the template to Hebrew. 49.230.87.239 (talk) 09:28, 29 May 2020 (UTC)
I don't have any experience of foreign languages but will have a look next week. I'd start by changing "refname" to "name", just to simplify things in finding a translation. I just kept it as "refname" as it had been suggested by someone else. They say a camel is a horse designed by a committee. Apologies if it turns out that the distinction is necessary! Jonathan3 (talk) 21:15, 29 May 2020 (UTC)
I agree that in the content of parameter names, name is better than refname (as long as there is no conflict between name as a mere parameter name and name as a special value representing HTML name attribute).
I preferred it all along without knowing if its a problem or not and seemingly it isn't (smile of happiness). 49.230.17.183 (talk) 02:37, 30 May 2020 (UTC)
@Bawolff
Okay, I have redirected תבנית:הערה to Template:Cite
Perhaps it would be redundant to say that English tests go fine
All Hebrew tests fail with the exact two errors:
  • שגיאת ציטוט: תג <ref> לא תקין;
  • להערות שוליים ללא שם חייב להיות תוכן
If you translate this to Hebrew you could understand that the parameters content and refname aren't applicable by through the תבנית:הערה TO Template:Cite redirect.
Why?
Because I got lost with Help:Templates#Exceptions to the order of evaluation
Please consider to give an example to how one should implement it in the (confusing and much-background-knowledge requiring context of LTR-to-RTL default parameters). 49.230.17.183 (talk) 02:51, 30 May 2020 (UTC)
by through = through
(confusing and much-background-knowledge requiring
=
(confusing and much-background-knowledge requiring) 49.230.17.183 (talk) 04:23, 30 May 2020 (UTC)
> Because I got lost with Help:Templates#Exceptions to the order of evaluation
I dont see anything in that section relavent to what you are doing. You don't have to worry about order of evaluation here.
What do you currently have as your template? Bawolff (talk) 05:19, 30 May 2020 (UTC)

@Bawolff

My template is the same one Jonathan3 created:

<includeonly>{{#if:{{{refname|}}}
| {{#tag:ref|{{{content|}}}|name={{{refname}}}}}
| {{#tag:ref|{{{content|}}}}}
}}</includeonly>

Currently I also have a redirect from תבנית:הערה to it (Template:Cite)


Although this template (Template:Cite) is in English, I want to call it in Hebrew, as with, say;

בדיקה_ראשונה{{הערה|תוכן=בדיקה_ראשונה}}

בדיקה_שנייה{{הערה|תוכן=בדיקה_שנייה|שם=שם_ראשון}}
בדיקה שלישית{{הערה|שם=שם_ראשון}}

But; I don't know how I might be able be able to do that. 49.230.17.183 (talk) 12:49, 30 May 2020 (UTC)

@Bawolff do you know a way to do that or would you say it's even possible with the current release?
If it's not possible with the current release than maybe I should indeed migrate, somehow, from MediaWiki to TikiWiki or some other MediaWiki derivative. 49.230.17.183 (talk) 12:32, 31 May 2020 (UTC)
As i already said above, you can use default values of parameters to have template parameters that have more than one name and you can have redirects to make the template have more than one name. Bawolff (talk) 12:51, 31 May 2020 (UTC)
@Bawolff
You said:
"you can use default values of parameters to have template parameters that have more than one name"
So, I tried to read Help:Templates#Default_values on which you said:
"It is a parameter that has as its default value a different parameter"
But I said I got lost with it and you said:
"I dont see anything in that section relavent to what you are doing"
So is it relevant or irrelevant? 49.230.17.183 (talk) 14:12, 31 May 2020 (UTC)
Use default values of parameters
To have template parameters
That have more than one name
---
So,
Should the default value of the parameter content be תוכן and should the default value of the parameter refname be שם?
Please share with us if I misunderstood. 49.230.17.183 (talk) 14:16, 31 May 2020 (UTC)
@Bawolff
For the sake of creating better documentation you might want to answer on these SEO-dedicated posts:
@Jonathan3 I start to think that translating this template into Hebrew is impossible. 182.232.57.75 (talk) 07:38, 2 June 2020 (UTC)

@Jonathan3 I take back what I wrote one post above (which was anyway humorous);

I think I found a way to translate that template;

This version passed my tests below:

<includeonly>{{#תנאי:{{{שם|}}}
    | {{#תגית:ref|{{{תוכן|}}}|name={{{שם}}}}}
    | {{#תגית:ref|{{{תוכן|}}}}}
}}</includeonly>
  • Instead if I wrote תנאי
  • Instead tag I wrote תגית
  • Instead refname I wrote שם
  • Instead content I wrote תוכן

Tests passed successfully


1) Cite with parameter calls WITHOUT English naming (by name attribute)

* בדיקה ראשונה{{הערה|תוכן=בדיקה ראשונה}}
* בדיקה שנייה{{הערה|תוכן=בדיקה שנייה}}
* בדיקה שלישית{{הערה|תוכן=בדיקה שלישית}}
* בדיקה רביעית{{הערה|תוכן=בדיקה רביעית}}

Output:

  • [1]בדיקה ראשונה
  • [2]בדיקה שנייה
  • [3]בדיקה שלישית
  • [4]בדיקה רביעית
  1. ^ בדיקה ראשונה
  2. ^ בדיקה שנייה
  3. ^ בדיקה שלישית
  4. ^ בדיקה רביעית

2) Cite with parameter calls WITH English naming (by name attribute)

* בדיקה ראשונה{{הערה|תוכן=בדיקה ראשונה}}
* בדיקה שנייה{{הערה|תוכן=בדיקה שנייה|שם=שם_ראשון}}
* בדיקה שלישית{{הערה|שם=שם_ראשון}}

Output:

  • [1]בדיקה ראשונה
  • [2]בדיקה שנייה
  • [2]בדיקה שלישית
  1. בדיקה ראשונה
  2. ^ לקפוץ מעלה אל:2.0 2.1 בדיקה שנייה

Notes


Note 1)

Instead ref it was written תגית but in version 1.35.0 or 1.36.0 one could write תג instead תגית and the credit for that goes to @Amire80 for commiting the source code change.

תג is a "male" manner for tag in Hebrew instead the longer "female" manner of תגית.


Note 2)

I haven't tested the template with regards to links. I should do that ASAP and publish my progress here.


Note 3)

Any constructive comment about my translation of Jonathan3's template is most welcome. 182.232.57.75 (talk) 08:30, 2 June 2020 (UTC)

If it works it works! Well done.
It looks like the references/footnotes part is a mixture of LTR and RTL (e.g. the number 1 and its full stop are LTR on the left, then the text itself is RTL). Is that a problem? Jonathan3 (talk) 15:52, 2 June 2020 (UTC)
@Jonathan3 thanks !
Actually in practice (in the Hebrew site) everything is RTL for me but here in mediawiki.org the output appears aligned-left for some reason but I cannot edit to try HTMLize the output chapters to give them dir="rtl" and style="text-align: right" or something similar I guess. 182.232.7.125 (talk) 03:26, 3 June 2020 (UTC)
Further discussion about the working template is available here:
Is it a best practice to explicitly call all parameters in template-calls in MediaWiki templates? 182.232.7.53 (talk) 06:32, 5 June 2020 (UTC)

"Languages" feature simply vanished

Hi. Normally, on the left side of a Wikipedia article, you have access to a "language" feature that allows you to, directly, link articles to other WPs (without needing to go Wikidata) or even start the translation of an article to another language. Well, this feature simply "vanished" two days ago. I'm noticing this issue on En.WP and Pt.Wp in, which, I'm active. On Pt.WP, I can confirm that other editors are experiencing the same issue. Do someone knows what is going on? Do someone knows how to fix it? Regards. Kacamata (talk) 05:03, 28 May 2020 (UTC)

This is a known issue: T252800. The fix will be deployed with the next Mediawiki version. This normally happens on Thursdays, but this week's release has been blocked by an unrelated issue (see T253022). Rchard2scout (talk) 07:29, 28 May 2020 (UTC)
Rchard2scout thanks for answering. Kacamata (talk) 07:35, 28 May 2020 (UTC)

How to make font smaller in specific subcontent?

I want to make the font size smaller of title and content in subcontent (which start with '=='). Can anybody tell me how to do it? 220.121.235.23 (talk) 06:09, 28 May 2020 (UTC)

I mean, for example, in my wiki, every article has subcontent with title of 'references'.
and I want to make the title (references) and content smaller in font size in every articles. 220.121.235.23 (talk) 06:11, 28 May 2020 (UTC)
Define custom CSS for specific classes or IDs: Manual:CSS Malyacko (talk) 13:34, 28 May 2020 (UTC)
The problem is that one subcontent doesn't have class nor id. isn't is true? 220.121.235.23 (talk) 00:17, 29 May 2020 (UTC)
you can wrap the entire section in a div:
<div style="font-size: 60%">
==References==
* foo
</div>
Bawolff (talk) 00:33, 29 May 2020 (UTC)
I know this works, but it's really troublesome to type that in every article.
isn't there any way to make it automatically when the subcontent start with specific title (like '==References=='? 114.203.88.149 (talk) 15:23, 29 May 2020 (UTC)
The easiest way would be define the CSS style rules inside a template, and use that template whenever the ==References== section is to be included. See Help:Templates. AhmadF.Cheema (talk) 16:47, 29 May 2020 (UTC)
I wonder if you could use jQuery to change everything from the "References" heading to whatever comes next (eg another h2). Something similar is discussed on this Stack Overflow page. Jonathan3 (talk) 11:27, 30 May 2020 (UTC)

What are some essential plugins/extensions you like?

What are some of the more useful or essential plugins/extensions I should look at or consider?

I'm thinking about:

  • Extension:VisualEditor
  • Extension:WikiSEO 2.4.1

And maybe:

  • Extension:PermissionManager
  • Extension:GroupManager

Are those the most useful, essential, or up to date? Or does someone else have some favourites and must-haves?

Thanks for your input. BubbaUsesWiki (talk) 07:42, 28 May 2020 (UTC)

There is a list on the the "Professional Wiki" website:
AdminLinks
Beta Features
CategoryTree
CharInsert
Cite
CiteThisPage
ConfirmEdit
CookieWarning
Data Transfer
DateDiff
DismissableSiteNotice
Echo
External Data
HitCounters
HostStats
ImageMap
InputBox
Interwiki
JSBreadCrumbs
LoginNotify
Maps
MobileFrontend
Modern Timeline
MultimediaViewer
Nuke
OATHAuth
Page Forms
ParserFunctions
PdfHandler
Poem
RenameUser
ReplaceText
SandboxLink
Semantic Compound Queries
Semantic Extra Special Properties
Semantic MediaWiki
Semantic Meta Tags
Semantic Result Formats
SpamBlacklist
TemplateData
TemplateStyles
Thanks
TitleBlacklist
UploadWizard
UploadsLink
Visual Editor
Arrays
Babel
CLDR
CodeMirror
DeleteBatch
Display Title
Gadgets
Lingo
Lockdown
Loops
MagicNoCache
Mpdf
MyVariables
NewUserMessage
NumberFormat
NumerAlpha
Page Icons
PagedTiffHandler
PipeEscape
Rotten Links
Scribunto
Semantic Breadcrumb Links
Semantic Cite
Semantic Drilldown
Semantic Glossary
Semantic Rating
Semantic Scribunto
SimpleBatchUpload
SyntaxHighlight
TimedMediaHandler
Title Icon
UniversalLanguageSelector
UrlGetParameters
UserFunctions
Variables
VariablesLua
Widgets
AbuseFilter
Approved Revs
AutoCreatePage
CirrusSearch
CodeEditor
CommentStreams
ConfirmAccount
ContactPage
Elastica
Hover Cards
ImportUsers
Labeled Section Transclusion
Math
Mermaid
RevisionSlider
Semantic Interlanguage Links
Semantic Notifications
Semantic Tasks
Summary Cards
Translate Jonathan3 (talk) 15:49, 28 May 2020 (UTC)
Thanks. That doesn't help. BubbaUsesWiki (talk) 07:15, 29 May 2020 (UTC)
I am reluctant to criticise any question as being too vague to elicit a helpful answer, but you may find it helpful to go through the list (long as it is) to see which extensions meet your undisclosed needs. I have no connection with the author of the list, who I think authored only one of the extensions listed, so your characterisation of it as "spam" when hiding my post is inaccurate.
My favourite extensions are Cargo and Page Forms, but whether they would help you would depend on your requirements. Jonathan3 (talk) 21:11, 29 May 2020 (UTC)

LDAP query works with script but not on MediaWiki.

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 migrate from IIS to CentOS apache, but I am having issues with LDAP. My original config worked with Remote Auth, but this seems more complicated in Linux.

If I run ' php extensions/LDAPProvider/maintenance/ShowUserInfo.php --domain mydomain --username 1234567' I get results back fine. But if I try and sign in with pluggable auth I get the error 'Could not fetch required user info to complete login' and no LDAP logs are generated.


wfLoadExtension( 'PluggableAuth' );

wfLoadExtension( 'LDAPAuthentication2' );

wfLoadExtension( 'LDAPAuthorization' );

wfLoadExtension( 'LDAPProvider' );

wfLoadExtension( 'LDAPUserInfo' );

wfLoadExtension( 'LDAPGroups' );

$LDAPAuthorizationAutoAuthRemoteUserStringParser = 'domain-backslash-username';

$LDAPAuthentication2UsernameNormalizer = 'strtolower';

$LDAPAuthentication2AllowLocalLogin = false;

# $wgAuthRemoteuserAllowUserSwitch = false;

$wgPluggableAuth_EnableLocalLogin = false;

$wgDebugLogGroups['LDAPUserInfo'] = "/var/www/mydomain.my.com/log/DAPUserInfo.log";

$wgDebugLogGroups['LDAPGroups'] = "/var/www/mydomain.my.com/log/LDAPGroups.log";

$LDAPProviderDomainConfigProvider = function() {

        $config = [

                'mydomain' => [

                        'connection' => [

                                "server" => "dc.mydomain.my.com",

                                "user" => "CN=Media Wiki,CN=Managed Service Accounts,DC=mydomain,DC=my,DC=com",

                                "pass" => "xxxxxxxxxxx",

                                "options" => [

                                        "LDAP_OPT_DEREF" => 1

                                ],

                                "basedn" => "DC=mydomain,DC=my,DC=com",

                                "groupbasedn" => "DC=mydomain,DC=my,DC=com",

                                "userbasedn" => "DC=mydomain,DC=my,DC=com",

                                "searchattribute" => "samaccountname",

                                "usernameattribute" => "samaccountname",

                                "realnameattribute" => "displayname",

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

                        ],

                                'authorization' => [

                                'rules' => [

                                        'groups' => [

                                                'required' => [

                                                        "CN=My Grup,DC=mydomain,DC=my,DC=com"

                                                ]

                                        ]

                                ]

                        ],

                        'userinfo' => [

                                'attributes-map' => [

                                        'realname' => 'fullname'

                                ]

                        ],

           'groupsync' => [

               "mechanism" => "mappedgroups",

               "mapping" => [

                                        "sysop" => "CN=My Grup,DC=mydomain,DC=my,DC=com"

                                ]

                        ]

                ]

        ];

        return new \MediaWiki\Extension\LDAPProvider\DomainConfigProvider\InlinePHPArray( $config );

};

Any ideas?


Kittencorn (talk) 15:54, 28 May 2020 (UTC)

You config looks fine and it is a good sign that the ShowUserInfo.php script works. If this particular error message occurs there must be an entry in the "LDAPAuthentication2" log. Please add $wgDebugLogGroups['LDAPAuthentication2'] = "/var/www/mydomain.my.com/log/LDAPAuthentication2.log"; to your LocalSettings.php. Please also see LDAP_hub#Debugging (entry for "LDAPAuthentication2" was missing there, sorry). Osnard (talk) 18:26, 28 May 2020 (UTC)
Thanks - I have added them but for some reason I only get any logs if I run the script.
I also tried logging in with MYDOMAIN\1234567 and get the error 'Could not authenticate against domain 'mydomain'. Kittencorn (talk) 08:30, 29 May 2020 (UTC)
check permissions on your log file - the cli usually runs as a different user than the webserver.
Not specific to this, but generally when the cli behaves differently than web its due to: different versions of php, different php extensions installed or different selinux rules applied. Bawolff (talk) 06:27, 30 May 2020 (UTC)
Ive checked every permissions that I could find, they all look correct. I changed to using kerberos and remote_auth and I am now getting logs.
Changes above: $LDAPAuthorizationAutoAuthRemoteUserStringParser = 'username-at-domain';
error.log:
'php notice 1234567@MY.DOMAIN.COM'
client.log:
2020-06-01 09:19:25 mysite.my.domain.com my_wiki: Setting LDAP_OPT_PROTOCOL_VERSION to 3
2020-06-01 09:19:25 mysite.my.domain.com my_wiki: Setting LDAP_OPT_REFERRALS to 0
2020-06-01 09:19:25 mysite.my.domain.com my_wiki: Setting LDAP_OPT_DEREF to 1
LDAP.log
2020-06-01 09:26:00 mysite.my.domain.com my_wiki: ldap_connect( $hostname = 'ldap://mydc.my.domain.com,:389', $port = 389 );
2020-06-01 09:26:00 mysite.my.domain.com my_wiki: # __METHOD__ returns Resource id #195
2020-06-01 09:26:00 mysite.my.domain.com my_wiki: ldap_set_option( $linkID, $option = 17, $newval = 3 );
2020-06-01 09:26:00 mysite.my.domain.com my_wiki: # returns 1
2020-06-01 09:26:00 mysite.my.domain.com my_wiki: ldap_set_option( $linkID, $option = 8, $newval = 0 );
2020-06-01 09:26:00 mysite.my.domain.com my_wiki: # returns 1
2020-06-01 09:26:00 mysite.my.domain.com my_wiki: ldap_set_option( $linkID, $option = 2, $newval = 1 );
2020-06-01 09:26:00 mysite.my.domain.com my_wiki: # returns 1
2020-06-01 09:26:00 mysite.my.domain.com my_wiki: ldap_bind( $linkID, $bindRDN = 'CN=ServiceAccount,DC=my,DC=domain,DC=com’, $bindPassword = 'XXXX' );
2020-06-01 09:26:00 mysite.my.domain.com my_wiki: # returns 1
+ the ldap search itself returning all my info
But it doesn't create me an account for the wiki and log me in. Kittencorn (talk) 09:34, 1 June 2020 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Upgrade Error: includes/MagicWord.php: Error: invalid magic word 'ev'

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.


searched for a while and cannot get it to work after Upgrade from 1.30 to 1.34.

the System didn't worked with 1.30 anymore (blank pages) and i wanted to upgrade to 1.34 to see if this helps. Now I only get the magic word error. Independant of the PHP-Version 7.2 - 7.4


#0 /wiki/includes/MagicWordFactory.php(222): MagicWord->load(string)

#1 /wiki/includes/parser/Parser.php(5288): MagicWordFactory->get(string)

#2 /wiki/includes/StubObject.php(112): Parser->setFunctionHook(string, string)

#3 /wiki/includes/StubObject.php(138): StubObject->_call(string, array)

#4 /wiki/extensions/EmbedVideo/EmbedVideo.hooks.php(24): StubObject->__call(string, array)

#5 /wiki/extensions/EmbedVideo/EmbedVideo.hooks.php(17): EmbedVideo::addMagicWord(string, string, string)

#6 /wiki/includes/Hooks.php(174): EmbedVideo::setup(Parser)

#7 /wiki/includes/Hooks.php(202): Hooks::callHook(string, array, array, NULL)

#8 /wiki/includes/parser/Parser.php(476): Hooks::run(string, array)

#9 /wiki/includes/cache/MessageCache.php(1189): Parser->firstCallInit()

#10 /wiki/includes/cache/MessageCache.php(1165): MessageCache->getParser()

#11 /wiki/includes/language/Message.php(1280): MessageCache->transform(string, boolean, Language, Title)

#12 /wiki/includes/language/Message.php(884): Message->transformText(string)

#13 /wiki/includes/language/Message.php(944): Message->toString(string)

#14 /wiki/includes/OutputPage.php(888): Message->text()

#15 /wiki/includes/OutputPage.php(937): OutputPage->setHTMLTitle(Message)

#16 /wiki/includes/page/Article.php(638): OutputPage->setPageTitle(string)

#17 /wiki/includes/actions/ViewAction.php(63): Article->view()

#18 /wiki/includes/MediaWiki.php(511): ViewAction->show()

#19 /wiki/includes/MediaWiki.php(302): MediaWiki->performAction(Article, Title)

#20 /wiki/includes/MediaWiki.php(900): MediaWiki->performRequest()

#21 /wiki/includes/MediaWiki.php(527): MediaWiki->main()

#22 /wiki/index.php(44): MediaWiki->run()

#23 {main} Balloonhead666 (talk) 17:54, 28 May 2020 (UTC)

Have you also updated the "EmbedVideo" extension to REL1_34? Osnard (talk) 18:27, 28 May 2020 (UTC)
Thanks for the hint. Upgraded that now. Error has gone but like before the upgrade I only get empty pages and dont know why. No error appears. https://balloonhead.de/wiki Hmm, could that be something with the database? Balloonhead666 (talk) 13:53, 30 May 2020 (UTC)
wait had to update the WIDGETS Extension too. Sorry for this. Now it seems to work somehow. Thanks Balloonhead666 (talk) 14:03, 30 May 2020 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Can't login to wiki

I had set the wiki and all works with the $wgServer = the server ip. (http://xxx.xxx.xxx.xxx) the server worked as expected. I moved the wiki from an old server to a new server and everything worked. This is a windows server with IIS. I installed a cert for SSL traffic and that part is working. If I change the $wgServer = https://wiki.mysite.net the site will come up and I can see all pages, but when I login it will not let me. Invalid username or password. If I switch back I can login again.

I have restarted the IIS server, I have tried from other browsers, tried in incognito mode thinking it was a cache problem. This did not help. Found several places where it talkes about having the wgServer variable wrong. Not sure what could be wrong here.

Any help would be great.

MediaWiki 1.34.1
PHP 7.4.5 (cgi-fcgi)
MySQL 8.0.20

Thanks

John Jcburris (talk) 19:20, 28 May 2020 (UTC)

thats very odd. Usually server name has nothing to do with ability to login. Bawolff (talk) 20:07, 28 May 2020 (UTC)
I've already done that. How much time do you believe that is required to login, this is the 21st century. 1.132.107.226 (talk) 23:51, 28 May 2020 (UTC)
> I've already done that. How much time do you believe that is required to login, this is the 21st century.
This seems unrelated to this thread. Please start a new thread with appropriate details. Bawolff (talk) 00:29, 29 May 2020 (UTC)

How to apply a document.cookie theme globally?

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 been trying to apply darkmode to the site, however it seems that when applied on action-view it is not reflected to action-edit pages. They seem to work on separate states, is there any way to apply a global cookie to the wiki? Eduemoni (talk) 20:43, 28 May 2020 (UTC)

you'll need to be more specific as to what precisely you are doing to add darkmode. Bawolff (talk) 00:30, 29 May 2020 (UTC)
in WikiMedia:Common.js I have this following script
document.cookie = 'theme=darkmode'
However, this cookie is only applied to non-editor pages.
When I go to &action=edit page and type document.cookie in the console the theme attribute is not present Eduemoni (talk) 01:19, 29 May 2020 (UTC)
you mean MediaWiki:Common.js ?
Cookies generally get saved for all pages once you set for one, until you close the browser. Are your edit pages somehow on a different domain? Check for javascript errors in developer console. Bawolff (talk) 06:22, 30 May 2020 (UTC)
I have circumvented the issue by using localStorage instead of document.cookie Eduemoni (talk) 07:23, 1 June 2020 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

I would like to modify the generated links to move the namespaces as subdomains.

Is there a option to force the kink generation to {{Namespace}}.DOMAIN.TLD/{{Article}} instead of DOMAIN.TLD/{{Namespace}}:{{Article}}? Gunnar.offel (talk) 09:03, 29 May 2020 (UTC)

not really, closest is $wgActionPaths.
Its possible to probably use some hook to override link generation totally, like what extension:SplitPrivateWiki tries to do. Bawolff (talk) 20:21, 29 May 2020 (UTC)
ActionPaths looks interesting, but sadly not exactly i'm looking for. Gunnar.offel (talk) 11:20, 31 May 2020 (UTC)

image not found

dear people,

after googling and reading some articles and still did not find an answer, I have to ask a question.

I only started writing a wiki for my company the day before yesterday. I've only been dealing with php since then. Yesterday I wrote a lot of articles and uploaded pictures, which worked without any problems. With <figure-inline class="mw-default-size">[./Special:FilePath/...._jpg File:.... jpg]</figure-inline> it showed me everything correctly. Now I wanted to continue working today and it only shows me the link of the image and when clicking "could not load image". Today I only changed something in the localsettings file to create users. I made an update yesterday and read that it crashed a patch. I don't know what that means. Can someone help me or should I show any php files?


Hjerteblod (talk) 12:56, 29 May 2020 (UTC)

I don't know either what "crashing a patch" means - if you read that somewhere it would be helpful to know where and context.
If there are problems with loading image files, then please check the "network" tab in developer tools of your browser, and check the error log of the web server software that you are using. Malyacko (talk) 13:38, 29 May 2020 (UTC)
You are right, sorry! I can not find it, because I had so many tabs open. I understand if this are too less information, maybe I have to ask some people in my office. I want to make it by my own.
These are the errors I found in the tab:
1590759839404 Toolkit.Telemetry ERROR TelemetrySend::sendPersistedPings - failed to send ping 07be47c3-bce4-4a75-85bd-7a5b41401d1e: {"isTrusted":true} Log.jsm:723
Structured Ingestion ping failure with error: error 3 PingCentre.jsm:202
this.window.gBrowserInit is undefined Hjerteblod (talk) 13:52, 29 May 2020 (UTC)
I can explain it in some other way. Yesterday, the image was shown. Today there is just the link. And when I click the link, it tells me, that the image could not found. Hjerteblod (talk) 13:55, 29 May 2020 (UTC)
See Help:Locating broken scripts (though the first two items are not from MediaWiki, for the last one I am not sure), and, again, check your web server software error logs. You may also want to check with another browser if it's the same behavior, and name your browsers. Malyacko (talk) 14:21, 29 May 2020 (UTC)
those scripts do not sound like part of mediawiki. I do not thing those errors are causing your image issue, although its possible they are causing other issues.
Check the network tab instead for network errors related to those images. Bawolff (talk) 20:18, 29 May 2020 (UTC)

cannot log in to webcore

trying to reset password, but I do not receive an email to reset after it says it will send one. Cannot find a way back in. What do i need to do?


74.196.53.127 (talk) 17:47, 29 May 2020 (UTC)

You could start explaining what "webcore" is. And how this is related to MediaWiki. Malyacko (talk) 20:04, 29 May 2020 (UTC)

Create a wiki farm with a shared hosting

Hi, I would like to know whether it is possible to create a wiki farm with a shared hosting, instead of a VPS or dedicated server. If so, how could I do it?

Thanks. 190.140.178.88 (talk) 01:46, 30 May 2020 (UTC)

its possible but annoying. Steps are pretty much the same as with a vps. Bawolff (talk) 06:20, 30 May 2020 (UTC)

empty pages but previous versions are shown

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


On my wiki i mostly see empty pages. this was before and after the upgrade from 1.30 to 1.34. When I click on the version history and choose an older version its displayed normally.

http://balloonhead.de/wiki Balloonhead666 (talk) 14:14, 30 May 2020 (UTC)

Have you tried purging the affected pages? Taavi (talk!) 14:33, 30 May 2020 (UTC)
I'm not sure why, but it seems that the cached version of the page is incorrect. Once you purge the page (append &action=purge to the URL: http://balloonhead.de/wiki/index.php?title=Lazy_Liquid&action=purge), things show up properly.
I browsed a few pages on http://balloonhead.de/wiki/index.php?title=Spezial:Alle_Seiten, and they all seem to render now. Mainframe98 talk 14:36, 30 May 2020 (UTC)
Thanks @Mainframe98 this also would have been the solution before upgrading. Will go through all the pages now. Balloonhead666 (talk) 08:09, 31 May 2020 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

recover username and password

I forgot all my login information. How can I recover it? Please help. 2605:E000:151D:47AE:BCEE:A5AC:3FAA:1123 (talk) 15:57, 30 May 2020 (UTC)

If you registered an email address when the account was created you could use Special:PasswordReset to get a password reset. If you didn't registered an email, I'm afraid you're out of luck. MarcoAurelio (talk) 16:14, 30 May 2020 (UTC)

Per-group File Upload Size Limit

Hello,

The title is pretty self-explanatory: I want to set a specific file upload size limit depending on the group the user is in.

For example, I want the user group to have 2 MB limit, bureaucrat should have 5 MB limit, and sysop should have 25 MB limit.

The value in my php.ini file is the higher one (25 MB).

I already tried using a hook in LocalSettings.php, but I didn't find any hook that runs so early that I can still change already defined properties.

How can I do that? Is there an extension to do that if I can't using LocalSettings.php? How do I write an extension doing that if there's no other solution?

Regards. Starscouts (talk) 18:24, 30 May 2020 (UTC)

you could try using $wgExtensionFunctions. Not sure if that would work. Bawolff (talk) 18:25, 30 May 2020 (UTC)
Thanks for your fast answer.
I tried using $wgExtensionFunctions, but I can't edit $wgMaxUploadSize and I can't access (from any way) the user info.
Here's the code I tried:
$wgMaxUploadSize = 0;
$wgExtensionFunctions[] = "Test";
function Test() {
   $wgMaxUploadSize = 2048 * (1024 * 1024);
}
It still shows 0 bytes limit. Starscouts (talk) 18:36, 30 May 2020 (UTC)
you need a global keyword
$wgMaxUploadSize = 0;
$wgExtensionFunctions[] = "Test";
function Test() {
   global $wgMaxUploadSize;
   $wgMaxUploadSize = 2048 * (1024 * 1024);
}
Bawolff (talk) 18:46, 30 May 2020 (UTC)
Okay so now I can change the max upload size, but I can't still access the user info. The least I want is the group array... Starscouts (talk) 20:18, 30 May 2020 (UTC)
Try RequestContext::getMain()->getUser()
(This might not be best practise, im not fully up to date) Bawolff (talk) 21:31, 30 May 2020 (UTC)
It doesn't work, everything is null, 0, or false:
object(User)#280 (35) {
  ["mId"]=>
  NULL
  ["mName"]=>
  NULL
  ["mActorId":protected]=>
  NULL
  ["mRealName"]=>
  NULL
  ["mEmail"]=>
  NULL
  ["mTouched"]=>
  NULL
  ["mQuickTouched":protected]=>
  NULL
  ["mToken":protected]=>
  NULL
  ["mEmailAuthenticated"]=>
  NULL
  ["mEmailToken":protected]=>
  NULL
  ["mEmailTokenExpires":protected]=>
  NULL
  ["mRegistration":protected]=>
  NULL
  ["mEditCount":protected]=>
  NULL
  ["mGroupMemberships":protected]=>
  NULL
  ["mOptionOverrides":protected]=>
  NULL
  ["mOptionsLoaded"]=>
  bool(false)
  ["mLoadedItems":protected]=>
  array(0) {
  }
  ["mFrom"]=>
  string(7) "session"
  ["mNewtalk":protected]=>
  int(-1)
  ["mDatePreference":protected]=>
  NULL
  ["mBlockedby"]=>
  int(-1)
  ["mHash":protected]=>
  bool(false)
  ["mBlockreason":protected]=>
  NULL
  ["mEffectiveGroups":protected]=>
  NULL
  ["mImplicitGroups":protected]=>
  NULL
  ["mFormerGroups":protected]=>
  NULL
  ["mGlobalBlock":protected]=>
  NULL
  ["mLocked":protected]=>
  NULL
  ["mHideName"]=>
  NULL
  ["mOptions"]=>
  NULL
  ["mRequest":"User":private]=>
  object(WebRequest)#21 (10) {
    ["data":protected]=>
    array(0) {
    }
    ["queryAndPathParams":protected]=>
    array(0) {
    }
    ["queryParams":protected]=>
    array(0) {
    }
    ["headers":protected]=>
    array(12) {
      ["HOST"]=>
      string(17) "192.168.1.51:9000"
      ["USER-AGENT"]=>
      string(68) "Mozilla/5.0 (X11; Linux x86_64; rv:77.0) Gecko/20100101 Firefox/77.0"
      ["ACCEPT"]=>
      string(74) "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8"
      ["ACCEPT-LANGUAGE"]=>
      string(56) "en,en-US;q=0.8,fr;q=0.7,fr-FR;q=0.5,es-ES;q=0.3,es;q=0.2"
      ["ACCEPT-ENCODING"]=>
      string(13) "gzip, deflate"
      ["DNT"]=>
      string(1) "1"
      ["COOKIE"]=>
      string(444) "# Private, this is manually removed #"
      ["UPGRADE-INSECURE-REQUESTS"]=>
      string(1) "1"
      ["X-FORWARDED-FOR"]=>
      string(13) "192.168.1.122"
      ["X-FORWARDED-HOST"]=>
      string(17) "# Private, this is manually removed #"
      ["X-FORWARDED-SERVER"]=>
      string(22) "# Private, this is manually removed #"
      ["CONNECTION"]=>
      string(10) "Keep-Alive"
    }
    ["response":"WebRequest":private]=>
    object(WebResponse)#287 (0) {
    }
    ["ip":"WebRequest":private]=>
    string(12) "192.168.1.30"
    ["requestTime":protected]=>
    float(1590879115.444)
    ["protocol":protected]=>
    NULL
    ["sessionId":protected]=>
    object(MediaWiki\Session\SessionId)#336 (1) {
      ["id":"MediaWiki\Session\SessionId":private]=>
      string(32) "# Private, this is manually removed #"
    }
    ["markedAsSafe":protected]=>
    bool(false)
  }
  ["mBlock"]=>
  NULL
  ["mAllowUsertalk":protected]=>
  NULL
  ["mBlockedFromCreateAccount":"User":private]=>
  bool(false)
  ["queryFlagsUsed":protected]=>
  int(0)
}
Starscouts (talk) 22:53, 30 May 2020 (UTC)
Hmm, you're right, $wgExtensionFunctions is too early.
I'm not sure if this is the "right" way, but try something like
$wgHooks['UserLoadAfterLoadFromSession'][] = function () {
        var_dump(RequestContext::getMain()->getUser()->isAllowed( 'highuploadlimit' )); 
};
Note, that this tests for rights, not groups, so you would have to also add an entry to $wgGroupPermissions for your new fake right. Bawolff (talk) 05:34, 31 May 2020 (UTC)
A huge thanks to you! It works the way I want now... Starscouts (talk) 17:47, 31 May 2020 (UTC)
You'd normally use UploadVerifyFile to reject file upload on certain conditions. But its limitation is that, it doesn't have the user object, so you can't check user groups. We have UploadVerifyUpload which does have the user object but it is not run for uploads to stash, per its documentation. I think it may accomplish what you want though. Here's an example User:Ammarpad/sandbox, but note that I did not test it, but it may work. – Ammarpad (talk) 17:12, 31 May 2020 (UTC)

Deletion of my account

I want to delete my account. How do I do this? 2605:E000:160D:8A65:5C78:233B:965A:16F (talk) 08:53, 31 May 2020 (UTC)

I do not know which website you are referring to. If you are referring to this website (Or a different website run by the Wikimedia foundation) see meta:Right_to_vanish Bawolff (talk) 08:59, 31 May 2020 (UTC)

socialprofile extension refers to only one profile

Hey, I implemented the socialprofile extension on my mediawiki version 1.31.

I installed it and I can open it properly. But when I want to make changes in one of the profiles, it changes the information in all profiles. Furthermore if I want to add another user as a friend, an error occurs, which says that I cannot add myself as a friend.

So apparently, every user profile refers to the same profile information.

Does anyone know, how I could possibly fix this problem? Thanks in advance for any kind of help! 2A02:810D:8CC0:36C:F15A:9E7:27D5:2AA7 (talk) 09:58, 31 May 2020 (UTC)

@Jack Phoenix: ping Bawolff (talk) 11:26, 31 May 2020 (UTC)
Let's start by upgrading your MediaWiki, for 1.31 is not supported (by SocialProfile; it's the LTS version so it has some support); as per Social tools/MediaWiki compatibility, the only MediaWiki version supported by social tools as of right now is 1.34. Jack Phoenix (Contact) 11:38, 31 May 2020 (UTC)
could some problems with other extensions (f.e. visualeditor) occur if we update the mediawiki? 2A02:810D:8CC0:36C:4543:27BF:50D9:43D9 (talk) 09:21, 1 June 2020 (UTC)
Of course, everything is possible; that being said, VisualEditor is maintained by a dedicated team at the Wikimedia Foundation so I doubt that extension will give you much headache if you already have managed to set it up in the first place. (As I understand it, setting up VE is the hardest part and upgrading should be a breeze, relatively speaking.) Jack Phoenix (Contact) 18:59, 1 June 2020 (UTC)

Is it possible to translate a custom namespace to different language?

Hello!

I add a custom namespace in my wiki by adding there to LocalSettings.php:


define("NS_STUDENTS", 9000);

define("NS_STUDENTS_TALK", 9001);

$wgExtraNamespaces[NS_STUDENT] = "Student";

$wgExtraNamespaces[NS_STUDENT_TALK] = "Student_talk";


and I can't find a way to translate the custom namespace to other language, such as Zh_hans by editing:


$namespaceNames = [

NS_MEDIA            => '媒体文件',

NS_SPECIAL          => '特殊',

NS_TALK             => '讨论',

NS_USER             => '用户',

NS_USER_TALK        => '用户讨论',

NS_PROJECT_TALK     => '$1讨论',

NS_FILE             => '文件',

NS_FILE_TALK        => '文件讨论',

NS_MEDIAWIKI        => 'MediaWiki',

NS_MEDIAWIKI_TALK   => 'MediaWiki讨论',

NS_TEMPLATE         => '模板',

NS_TEMPLATE_TALK    => '模板讨论',

NS_HELP             => '帮助',

NS_HELP_TALK        => '帮助讨论',

NS_CATEGORY         => '分类',

NS_CATEGORY_TALK    => '分类讨论',

//added here

NS_STUDENTS => '学生',

NS_STUDENTS_TALK => '学生讨论',

];


like this, and I tried use a alias, but this 学生:Bob can only work when using a keyword to creating and searching pages, in the page editing form, it shows Student:Bob not 学生:Bob.

So is there a way to translate a custom namespace to other language? Xin344 (talk) 13:10, 31 May 2020 (UTC)

namespace names are always in the content language of the wiki, so im not sure what you're asking since namespaces do not get different translations per user but use the same version for all users. Bawolff (talk) 23:57, 31 May 2020 (UTC)
e.g. why not just $wgExtraNamespaces[NS_STUDENT] = "学生"; Bawolff (talk) 23:58, 31 May 2020 (UTC)
The way I'm using is this way, but I just want it to be translated to other language. Xin344 (talk) 14:50, 1 June 2020 (UTC)
you can create a mini extension, but that is a lot of work for very little gain.
Im not sure where its documented, but as an example see the namespaces key in https://github.com/wikimedia/mediawiki-extensions-Flow/blob/master/extension.json along with ExtensionMessageFiles key, and https://github.com/wikimedia/mediawiki-extensions-Flow/blob/master/Flow.namespaces.php Bawolff (talk) 15:57, 1 June 2020 (UTC)

Sharing parameters between templates

I would like to share parameters between two templates, without recopying the data in 2.


For example, let's say I have a first template with a first formatting in table that I call through {Template1|arg1=ex1|arg2=ex2}, and another template, with a different formatting in list, but called with the same parameters {Template2|arg1=ex1|arg2=ex2}.


Is there a way to share the parameters between the two calls to template, without manually copying it ? I tried to find a solution with Scribunto and lua, but I did not find a mean to get args from another call elsewhere in the wiki.

Another solution could be to store the parameters elsewhere, and then call the two templates with the same reference to parameters, but I do not know if it possible. 2A01:CB22:194:C700:C1F1:55E9:596B:77DA (talk) 14:31, 31 May 2020 (UTC)

not really.
Each invocation to a template is separate they dont share state.
Sometimes people try to work around this by parsing the original page in lua, or using extension:Variables Bawolff (talk) 23:55, 31 May 2020 (UTC)
Do you just want to display the data in a table with the same data below the table as a list? You could have Template:Table_and_List taking arguments arg1 and arg2, and passing them to Template:Table (your Template1) and Template:List (your Template2).
Probably not as I've just noticed you say "elsewhere in the wiki"... as well as the two suggestions above you could maybe store your data using Extension:Cargo. Jonathan3 (talk) 16:03, 2 June 2020 (UTC)

What are default parameter values, in templates?

I understand that one can create default value/s for any template parameter.

A default value for a template parameter will make that template parameter to have more than one parameter name, so, for example, a template parameter named X

  • Could have the default value of Y which will act as a second name for it
  • Could have the default value of Z which will act as a third name for it
  • Could have the default value of ס which will act as a fourth name for it
  • Could have the default value of ט which will act as a fifth name for it


Maybe I understood correctly and maybe I didn't, so I stay with the general question:

What are default parameter values, in templates? 49.230.17.183 (talk) 14:37, 31 May 2020 (UTC)

https://meta.wikimedia.org/wiki/Help:Template#Declaring_a_default_value Malyacko (talk) 15:25, 31 May 2020 (UTC)
@Malyacko
I got lost there with
Calling the template named t with a parameter value of "a"
If the default value is pqr, why the calling is done with a? 182.232.57.75 (talk) 02:14, 1 June 2020 (UTC)
The meta page looks great. But my understanding is that the default is a default value (for when the parameter is undefined) and not an alternative parameter name.
(If I were you I'd write a separate Hebrew template.) Jonathan3 (talk) 22:52, 1 June 2020 (UTC)
Category:Support desk archives Category:Support desk archives with syntax highlighting errors