Jump to content

Project:Support desk/Flow/2022/07

Add topic
From mediawiki.org
Latest comment: 3 years ago by 81.246.8.11 in topic PluggableAuth SimpleSAMLphp
This page is an archive.
Please ask questions on the current support desk.

Search not working for some words

Hello.

Mediawiki version: 1.36.1

When I type a word in the search, the article containing that word is shown in the dropdown menu, but if I type the whole word and press Enter, there are no results. Some words from the same article are searched without problems. I found that where is the searchindex table in the database that is used in full text search, but it is empty (select * from searchindex returning an empty set.). Tried to run the rebuildtextindex.php script, but it returns the following errors:

PHP Deprecated:  Premature access to service container [Called from EmbedVideoHooks::onExtension in /opt/mediawiki/extensions/EmbedVideo/EmbedVideo.hooks.php at line 77] in /opt/mediawiki/includes/debug/MWDebug.php on line 376

PHP Deprecated:  Premature access to service 'HookContainer' [Called from MediaWiki\MediaWikiServices::getInstance in /opt/mediawiki/includes/MediaWikiServices.php at line 252] in /opt/mediawiki/includes/debug/MWDebug.php on line 376

PHP Deprecated:  Premature access to service 'ObjectFactory' [Called from Wikimedia\Services\ServiceContainer::{closure} in /opt/mediawiki/includes/ServiceWiring.php at line 535] in /opt/mediawiki/includes/debug/MWDebug.php on line 376

PHP Deprecated:  Premature access to service 'ConfigFactory' [Called from EmbedVideoHooks::onExtension in /opt/mediawiki/extensions/EmbedVideo/EmbedVideo.hooks.php at line 77] in /opt/mediawiki/includes/debug/MWDebug.php on line 376

PHP Deprecated:  Premature access to service 'BootstrapConfig' [Called from Wikimedia\Services\ServiceContainer::{closure} in /opt/mediawiki/includes/ServiceWiring.php at line 277] in /opt/mediawiki/includes/debug/MWDebug.php on line 376

Dropping index...

Clearing searchindex table...Done

Rebuilding index fields for 670 pages...

500

Rebuild the index...

Done.


The table is still empty

Could you please suggest what should be done 195.66.78.20 (talk) 07:49, 1 July 2022 (UTC)

Are you sure you are looking at the right db? If searchindex was totally empty it shouldn't work for any words.
You might be encountering a stop word.
Generally spEaking, CirrusSearch works much better than builtin search. I would reccomend it if its an option. Bawolff (talk) 08:35, 1 July 2022 (UTC)
My bad. Indeed, searched in the wrong database. There are two identical databases with the word wiki in the names, I looked in the wrong one)))
How can I find these stop words or how does it work? Do these stop words exist for all languages?
For CirrusSearch, you need to deploy ElasticSearch, if I'm not mistaken 195.66.78.20 (talk) 09:11, 1 July 2022 (UTC)
I looked at the contents of the searchindex table and saw that the Russian text is stored in the uxxxx format, because of this, one word can go beyond the innodb_ft_max_token_size limit, which cannot be set to more than 84. Any advice on how to solve the problem? 195.66.78.20 (talk) 11:49, 7 July 2022 (UTC)

Request to expand the template limit of the reflist

main article: [1]


Hello.


There's some problem about the template of reflist in zhwiki, that it need to expend the template limit to fix the problem. Although the current problem is temporarily solved, it is difficult to guarantee that the same problem will not be encountered in the future, so...

if u can do it, I would really appreciate your help. The dude named godzilla (talk) 08:56, 1 July 2022 (UTC)

It is unlikely that the template limits will be expanded on wmf wikis. However the proper place to make the request is at https://phabricator.wikimedia.org Bawolff (talk) 14:43, 1 July 2022 (UTC)

Error: Class "LightnCandy\LightnCandy" not found

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.


This error when I move place

OS : CentOS7 DETABASE: Mariadb 10.8.3 PHP 8.1.7 MW 1.38.1

Original exception: [c6fa8b46598e6f2c92122646] /%E3%82%A4%E3%83%99%E3%83%B3%E3%83%88 Error: Class "LightnCandy\LightnCandy" not found

Backtrace:

from /usr/share/nginx/html/aswiki/includes/TemplateParser.php(62)

#0 /usr/share/nginx/html/aswiki/includes/skins/SkinMustache.php(40): TemplateParser->__construct()

#1 /usr/share/nginx/html/aswiki/includes/skins/SkinMustache.php(56): SkinMustache->getTemplateParser()

#2 /usr/share/nginx/html/aswiki/skins/Vector/includes/SkinVector.php(455): SkinMustache->generateHTML()

#3 /usr/share/nginx/html/aswiki/includes/skins/SkinTemplate.php(150): Vector\SkinVector->generateHTML()

#4 /usr/share/nginx/html/aswiki/includes/OutputPage.php(2807): SkinTemplate->outputPage()

#5 /usr/share/nginx/html/aswiki/includes/MediaWiki.php(924): OutputPage->output()

#6 /usr/share/nginx/html/aswiki/includes/MediaWiki.php(937): MediaWiki::{closure}()

#7 /usr/share/nginx/html/aswiki/includes/MediaWiki.php(564): MediaWiki->main()

#8 /usr/share/nginx/html/aswiki/index.php(53): MediaWiki->run()

#9 /usr/share/nginx/html/aswiki/index.php(46): wfIndexMain()

#10 {main} Tunglinwu (talk) 12:27, 1 July 2022 (UTC)

Usually means there is something wrong with your vendor directory.
You could try redownloading it, or use composer install to try and regenerate it. Bawolff (talk) 14:42, 1 July 2022 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Cannot Increase Size of Page Title

How can I increase size of page title?

I've been able to increase size of text in Sidebar (except for titles of menus) with this - #mw-panel .portal a, #mw-panel .portal a:visited {font-size: 1.2em !important;} and increase size of body text with this - p {font-size: 1.11em;}

But I can't find a way to increase size of page title. DStallTX (talk) 16:13, 1 July 2022 (UTC)

Try .mw-body h1, .mw-body-content h1 { font-size: 6em; } – Ammarpad (talk) 21:38, 3 July 2022 (UTC)
Is there a help article and diagram that shows the entire MediaWiki page layouts with CSS tags that can be used to control it?
What are tags for Visual Editor items? - Heading, Sub-heading 1, Sub-heading 2, Sub-heading 3, Sub-heading 4, Preformatted, Block quote
Is there a way to set tab(s) for Paragraph or body? DStallTX (talk) 16:51, 7 July 2022 (UTC)

How to group page list alphabetically with show/hide letters?

I've created an ALL Pages page with this code -Special:AllPages surrounded by double braces.

But I'd like to have pages grouped under alphabet letter with show/hide feature.

I think this was formerly built into Vector skin but has since been removed. I've found some info in help pages but nothing that works. DStallTX (talk) 16:17, 1 July 2022 (UTC)

Special:allpages never had per letter sections (it did have ranges many years ago).
I suppose you could build it yourself using Special:prefixindex for each letter. Bawolff (talk) 18:03, 1 July 2022 (UTC)
Is there a help file/tutorial for that? DStallTX (talk) 01:01, 2 July 2022 (UTC)

Hide tabs & sidebar menus except for logged in Admins?

1) The solution shown here - Project:Support desk/Flow/2012/04#h-[RESOLVED]_How_can_I_hide_tabs_for_users_not_logged_in?-2012-04-11T15:38:00.000Z - hides tabs for Edit, Edit source, and More menu, but not for Page, Discussion, Read, View Source, View History.

How can I hide those tabs as well?

2) Also, how can I hide Tools and Admin (custom) menus in sidebar?

The following yields white page of death - https://mediawiki-l.wikimedia.narkive.com/va1rr8eb/help-hiding-the-toolbox-for-unregistered-users

I've found the following but don't know it they help -

ResourceLoader/Core modules - https://www.mediawiki.org/wiki/ResourceLoader/Core_modules#mw.user.isAnon

Extension:UserFunctions - https://www.mediawiki.org/wiki/Extension:UserFunctions

How to hide Sidebar_Menu links for anonymous users - https://www.mediawiki.org/wiki/Project%3ASupport%20desk/Flow/2019/06#h-How_to_hide_Sidebar_Menu_links_for_anonymous_users%3F-2019-06-30T10%3A07%3A00.000Z

Modify Toolbox - https://www.mediawiki.org/wiki/User:Seb35/modifyToolbox#Code https://wiki.seb35.fr/MediaWiki:Sidebar

How do I remove stuff from the sidebar? - https://www.mediawiki.org/wiki/Project%3ASupport%20desk/Flow/2015/12#h-How_do_I_remove_stuff_from_the_sidebar%3F-2015-12-04T22%3A46%3A00.000Z DStallTX (talk) 01:13, 2 July 2022 (UTC)

2) Have you searched this website to find Manual:Interface/Sidebar? Malyacko (talk) 02:14, 2 July 2022 (UTC)
What I want isn't there.
I want to hide Tools menu from anonymous users (not logged in), and also hide a menu I create from them too. DStallTX (talk) 17:52, 7 July 2022 (UTC)
User:Subfader/Hide_page_tabs Malyacko (talk) 21:55, 7 July 2022 (UTC)
I've already found that info, used it and hid tabs!
I'm asking about hiding Tools menu and menu I create from sidebar for anonymous users (not logged in) - DStallTX (talk) 22:01, 7 July 2022 (UTC)

Error 1176: Key 'rev_page_timestamp' doesn't exist in table 'revision' (127.0.0.1)

HISTORY PAGE SHOWS:

[a087ee27fb00245a71ba39ca] /index.php?title=%E6%83%B3%E3%81%84%E4%BC%9D%E3%81%88%E3%82%8B%E3%82%A6%E3%82%A8%E3%83%87%E3%82%A3%E3%83%B3%E3%82%B0&action=history Wikimedia\Rdbms\DBQueryError: A database query error has occurred. Did you forget to run your application's database schema updater after upgrading or after adding a new extension?

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

Error 1176: Key 'rev_page_timestamp' doesn't exist in table 'revision' (127.0.0.1)

Function: IndexPager::buildQueryInfo (history page unfiltered)

Query: SELECT rev_id,rev_page,rev_timestamp,rev_minor_edit,rev_deleted,rev_len,rev_parent_id,rev_sha1,comment_rev_comment.comment_text AS `rev_comment_text`,comment_rev_comment.comment_data AS `rev_comment_data`,comment_rev_comment.comment_id AS `rev_comment_cid`,actor_rev_user.actor_user AS `rev_user`,actor_rev_user.actor_name AS `rev_user_text`,temp_rev_user.revactor_actor AS `rev_actor`,user_name,(SELECT GROUP_CONCAT(ctd_name SEPARATOR ',') FROM `change_tag` JOIN `change_tag_def` ON ((ct_tag_id=ctd_id)) WHERE ct_rev_id=rev_id ) AS `ts_tags` FROM `revision` FORCE INDEX (rev_page_timestamp) JOIN `revision_comment_temp` `temp_rev_comment` ON ((temp_rev_comment.revcomment_rev = rev_id)) JOIN `comment` `comment_rev_comment` ON ((comment_rev_comment.comment_id = temp_rev_comment.revcomment_comment_id)) JOIN `revision_actor_temp` `temp_rev_user` ON ((temp_rev_user.revactor_rev = rev_id)) JOIN `actor` `actor_rev_user` ON ((actor_rev_user.actor_id = temp_rev_user.revactor_actor)) LEFT JOIN `user` ON ((actor_rev_user.actor_user != 0) AND (user_id = actor_rev_user.actor_user)) WHERE rev_page = 5693 ORDER BY rev_timestamp DESC,rev_id DESC LIMIT 51

Backtrace:

from /usr/share/nginx/html/aswiki/includes/libs/rdbms/database/Database.php(1606)

#0 /usr/share/nginx/html/aswiki/includes/libs/rdbms/database/Database.php(1590): Wikimedia\Rdbms\Database->getQueryException()

#1 /usr/share/nginx/html/aswiki/includes/libs/rdbms/database/Database.php(1564): Wikimedia\Rdbms\Database->getQueryExceptionAndLog()

#2 /usr/share/nginx/html/aswiki/includes/libs/rdbms/database/Database.php(1173): Wikimedia\Rdbms\Database->reportQueryError()

#3 /usr/share/nginx/html/aswiki/includes/libs/rdbms/database/Database.php(1810): Wikimedia\Rdbms\Database->query()

#4 /usr/share/nginx/html/aswiki/includes/libs/rdbms/database/DBConnRef.php(69): Wikimedia\Rdbms\Database->select()

#5 /usr/share/nginx/html/aswiki/includes/libs/rdbms/database/DBConnRef.php(319): Wikimedia\Rdbms\DBConnRef->__call()

#6 /usr/share/nginx/html/aswiki/includes/pager/IndexPager.php(459): Wikimedia\Rdbms\DBConnRef->select()

#7 /usr/share/nginx/html/aswiki/includes/pager/IndexPager.php(281): IndexPager->reallyDoQuery()

#8 /usr/share/nginx/html/aswiki/includes/pager/IndexPager.php(778): IndexPager->doQuery()

#9 /usr/share/nginx/html/aswiki/includes/actions/pagers/HistoryPager.php(740): IndexPager->getNumRows()

#10 /usr/share/nginx/html/aswiki/includes/pager/ReverseChronologicalPager.php(153): HistoryPager->isNavigationBarShown()

#11 /usr/share/nginx/html/aswiki/includes/actions/HistoryAction.php(319): ReverseChronologicalPager->getNavigationBar()

#12 /usr/share/nginx/html/aswiki/includes/actions/FormlessAction.php(48): HistoryAction->onView()

#13 /usr/share/nginx/html/aswiki/includes/MediaWiki.php(543): FormlessAction->show()

#14 /usr/share/nginx/html/aswiki/includes/MediaWiki.php(321): MediaWiki->performAction()

#15 /usr/share/nginx/html/aswiki/includes/MediaWiki.php(912): MediaWiki->performRequest()

#16 /usr/share/nginx/html/aswiki/includes/MediaWiki.php(563): MediaWiki->main()

#17 /usr/share/nginx/html/aswiki/index.php(53): MediaWiki->run()

#18 /usr/share/nginx/html/aswiki/index.php(46): wfIndexMain()

#19 {main}


but other wiki don't have this key Tunglinwu (talk) 07:05, 2 July 2022 (UTC)

Run update.php Bawolff (talk) 23:24, 3 July 2022 (UTC)

Cannot sign in

cannot sign in to my project. I have been using the sam email and password for 12 years. it said check email address and password and try again. I also reset my password to a new one still does not let me sign it 2603:6010:E904:F3C2:8805:66D1:D2F5:C3BC (talk) 20:23, 2 July 2022 (UTC)

Please read "Post a new question" in the sidebar and be way more specific. Malyacko (talk) 14:05, 3 July 2022 (UTC)

New versions are published, but not linked on download page

The newsletter was sent, the message is shown on news: https://lists.wikimedia.org/hyperkitty/list/mediawiki-announce@lists.wikimedia.org/message/PIPYDRSHXOYW5DB7X755QDNUV5EZWPWB/

... but the download page still points to the old versions: Download 93.235.69.84 (talk) 02:01, 3 July 2022 (UTC)

Thanks for catching that, should be fixed by https://www.mediawiki.org/w/index.php?title=Module%3AVersion&type=revision&diff=5320271&oldid=5315607 Malyacko (talk) 14:11, 3 July 2022 (UTC)

1.37.3 update error: guzzle too old

MediaWiki 1.37.3 Updater

guzzlehttp/guzzle: 7.4.1 installed, 7.4.5 required.

Error: your composer.lock file is not up to date. Run "composer update --no-dev" to install newer dependencies 93.235.69.84 (talk) 02:10, 3 July 2022 (UTC)

Where did you download mediawiki from? Bawolff (talk) 02:41, 3 July 2022 (UTC)
Sorry being late, directly from the email list announcement: (have to quirk URLs because of filter warning here...)
https: //lists.wikimedia.org/hyperkitty/list/mediawiki-announce@lists.wikimedia.org/message/PIPYDRSHXOYW5DB7X755QDNUV5EZWPWB/
> Download:
> https: //releases.wikimedia.org/mediawiki/1.37/mediawiki-1.37.3.tar.gz
> https: //releases.wikimedia.org/mediawiki/1.37/mediawiki-1.37.3.zip 93.235.69.84 (talk) 15:29, 3 July 2022 (UTC)
btw: the main download over www . mediawiki . org / wiki / Download right now offers the same tar.gz file having identical checksums:
mediawiki-1.37.3.tar.gz
  CRC-32: 6bfd2060
    MD5: 3137900de33f767be2af2fd1e68b0ce5
  SHA-1: 248dcc9a2552554c1073a89dc78ccaa8551375b8
SHA-256: ece59664b2a76cc543d29e15bbed963ceabdc2cb51374ce8ba6d52f6deb3c9e2
SHA-512: 5c5e406a3ecf83136bb46606b4dd7288b99959a17b37c3b0b74426f47fee8b9b14f3b5106f99d41c07e4924b78bcc3cc61e0058ceb98a087d3ba5ab5a51402e3
SHA3-256: 2e9e7b2c406735792ba153dc0d88f3987e481c6e6adf8fde7f787e4b3901d286
SHA3-512: af0762f6bace284a0217e823fc5535c57346d3bf5ebabec5be5d75611a0bc6e6b8b48d4f7a75a72ee7bad716bf275a5696ed8fa42a693385ec8646337b5ae794 93.235.69.84 (talk) 15:38, 3 July 2022 (UTC)
This seems to be a bug in the release
In the short term, you can run composer update to have composer install the newer version.
Guzzle was updated for a security issue, but, it seems unlikely the security issue would affect mediawiki, so you could also just ignore it. Run update.php as update.php --skip-external-dependencies.
There will probably be a new release of the 1.37 branch to fix this, i imagine Bawolff (talk) 03:05, 5 July 2022 (UTC)
Filed this issue as https://phabricator.wikimedia.org/T312059 Bawolff (talk) 03:12, 5 July 2022 (UTC)
Thank you for the fast and perfect reaction. 1.37.4 fixes the issue: :-)
MediaWiki 1.37.4 Updater
Your composer.lock file is up to date with current dependencies!
(...)
Set the local repo temp zone container to be private.
Purging caches...done.
Done in 0.5 s. 93.235.93.198 (talk) 19:43, 10 July 2022 (UTC)

Exception caught: Call to undefined method User::isLoggedIn() after Moderation install when creating or modifying a page

Hi, I am running Mediawiki 1.38 on Ubuntu. The site works great. Tried to install the Moderation extension. Placed 'wfLoadExtension( 'Moderation' );' as well as '$wgModerationEnable = true;' at the end of LocalSettings.php as required. I can log in, view pages and everything but when trying to create or modify a page, I get either :

When clicking on 'Edit':

---

[ceac9d599398b93e152935cc] Exception caught: Call to undefined method User::isLoggedIn()

---

OR

When clicking on 'Edit Source':

---

[8c5d9c220b8eb65c11026040] /index.php?title=Arrma&action=edit Error: Call to undefined method User::isLoggedIn()

Backtrace:

from /var/www/html/mediawiki/extensions/Moderation/hooks/ModerationPreload.php(99)

#0 /var/www/html/mediawiki/extensions/Moderation/hooks/ModerationPreload.php(167): ModerationPreload->getId()

#1 /var/www/html/mediawiki/extensions/Moderation/hooks/ModerationPreload.php(190): ModerationPreload->findPendingEdit()

#2 /var/www/html/mediawiki/extensions/Moderation/hooks/ModerationPreload.php(242): ModerationPreload->showPendingEdit()

#3 /var/www/html/mediawiki/includes/HookContainer/HookContainer.php(338): ModerationPreload::onEditFormInitialText()

#4 /var/www/html/mediawiki/includes/HookContainer/HookContainer.php(137): MediaWiki\HookContainer\HookContainer->callLegacyHook()

#5 /var/www/html/mediawiki/includes/HookContainer/HookRunner.php(1475): MediaWiki\HookContainer\HookContainer->run()

#6 /var/www/html/mediawiki/includes/EditPage.php(687): MediaWiki\HookContainer\HookRunner->onEditFormInitialText()

#7 /var/www/html/mediawiki/includes/actions/EditAction.php(71): EditPage->edit()

#8 /var/www/html/mediawiki/includes/MediaWiki.php(544): EditAction->show()

#9 /var/www/html/mediawiki/includes/MediaWiki.php(321): MediaWiki->performAction()

#10 /var/www/html/mediawiki/includes/MediaWiki.php(910): MediaWiki->performRequest()

#11 /var/www/html/mediawiki/includes/MediaWiki.php(564): MediaWiki->main()

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

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

#14 {main}

---

I also get the following Debug info at the top of the page:

---

Deprecated: Use of ParserOutput::addModuleStyles with non-array argument was deprecated in MediaWiki 1.38. [Called from DisplayComments::getParserHandler in /var/www/html/mediawiki/extensions/Comments/includes/parser/DisplayComments.php at line 27] in /var/www/html/mediawiki/includes/debug/MWDebug.php on line 377

Deprecated: Use of ParserOutput::addModules with non-array argument was deprecated in MediaWiki 1.38. [Called from DisplayComments::getParserHandler in /var/www/html/mediawiki/extensions/Comments/includes/parser/DisplayComments.php at line 28] in /var/www/html/mediawiki/includes/debug/MWDebug.php on line 377

Deprecated: Use of wfGetMainCache was deprecated in MediaWiki 1.32. [Called from Wikimedia\Services\ServiceContainer::{closure} in /var/www/html/mediawiki/extensions/Moderation/hooks/ServiceWiring.php at line 86] in /var/www/html/mediawiki/includes/debug/MWDebug.php on line 377

---


Can anybody help? When I remove Moderation from LocalSettings, everything works great. Below is a copy of my configuration.

Thank

Nicolas


---

Installed software

Product Version
MediaWiki 1.38.1
PHP 7.4.30 (apache2handler)
MariaDB 10.3.34-MariaDB-0ubuntu0.20.04.1
ICU 66.1

Entry point URLs

Entry point URL
Article path /index.php/$1
Script path /
index.php /index.php
api.php /api.php
rest.php /rest.php

Installed skins

Skin Version License Description Authors
Vector 1.0.0 (ca069b1) 08:43, 23 June 2022 GPL-2.0-or-later Provides 2 Vector skins:
  • 2011 - The Modern version of MonoBook with fresh look and many usability improvements.
  • 2022 - The Vector built as part of the WMF mw:Desktop Improvements project.
Readers Web Team, Trevor Parscal, Roan Kattouw, Alex Hollender, Bernard Wang, Clare Ming, Jan Drewniak, Jon Robson, Nick Ray, Sam Smith, Stephen Niedzielski and Volker E.

Installed extensions

Editors
Extension Version License Description Authors
VisualEditor 0.1.2 (ad30691) 08:35, 23 June 2022 MIT Visual editor for MediaWiki Alex Monk, Bartosz Dziewoński, C. Scott Ananian, Christian Williams, David Lynch, Ed Sanders, Inez Korczyński, James D. Forrester, Moriel Schottlender, Roan Kattouw, Rob Moen, Subramanya Sastry, Thalia Chan, Timo Tijhof, Trevor Parscal and others
Parser hooks
Extension Version License Description Authors
Comments 5.0 (3b4726f) 07:13, 2 June 2022 GPL-2.0-or-later Adds <comments> parser hook that allows commenting on pages David Pean, Misza, Jack Phoenix, Adam Carter/UltrasonicNXT and Samantha Nguyen
Spam prevention
Extension Version License Description Authors
Moderation 1.5.36 GPL-3.0+ Sends all edits and uploads from new users to moderation Edward Chernenko
Other
Extension Version License Description Authors
SocialProfile 1.14 (48bcfe7) 07:27, 30 June 2022 A set of social tools for MediaWiki Aaron Wright, David Pean and Jack Phoenix
SystemGifts GPL-2.0-or-later Allows sending, receiving, creating, and removing system gifts Aaron Wright, David Pean and Jack Phoenix
UserActivity GPL-2.0-or-later Shows users' social activity Aaron Wright, David Pean and Jack Phoenix
UserBoard GPL-2.0-or-later Allows for sending board-to-board messages Aaron Wright, David Pean and Jack Phoenix
UserGifts GPL-2.0-or-later Allows sending, receiving, creating, and removing user gifts Aaron Wright, David Pean and Jack Phoenix
UserRelationship GPL-2.0-or-later Allows sending friend and foe requests Aaron Wright, David Pean and Jack Phoenix
UserStats GPL-2.0-or-later Allows for awarding points to users based on type of actions performed Aaron Wright, David Pean and Jack Phoenix

Installed libraries

Library Version License Description Authors
christian-riesen/base32 1.6.0 MIT Base32 encoder/decoder according to RFC 4648 Christian Riesen
composer/installers 2.1.1 MIT A multi-framework Composer library installer Kyle Robinson Young
composer/semver 3.2.6 MIT Semver library that offers utilities, version constraint parsing and validation. Nils Adermann, Jordi Boggiano and Rob Bast
cssjanus/cssjanus 2.1.0 Apache-2.0 Convert CSS stylesheets between left-to-right and right-to-left. Roan Kattouw, Trevor Parscal and Timo Tijhof
guzzlehttp/guzzle 7.4.1 MIT Guzzle is a PHP HTTP client library Graham Campbell, Michael Dowling, Jeremy Lindblom, George Mponos, Tobias Nyholm, Márk Sági-Kazár and Tobias Schultze
guzzlehttp/promises 1.5.1 MIT Guzzle promises library Graham Campbell, Michael Dowling, Tobias Nyholm and Tobias Schultze
guzzlehttp/psr7 2.1.2 MIT PSR-7 message implementation that also provides common utility methods Graham Campbell, Michael Dowling, George Mponos, Tobias Nyholm, Márk Sági-Kazár, Tobias Schultze and Márk Sági-Kazár
jakobo/hotp-php 2.0.0 BSD-3-Clause HOTP simplifies One Time Password systems for PHP Authentication Jakob Heuser
justinrainbow/json-schema 5.2.11 MIT A library to validate a json schema. Bruno Prieto Reis, Justin Rainbow, Igor Wiedler and Robert Schönthal
liuggio/statsd-php-client 1.0.18 MIT Statsd (Object Oriented) client library for PHP Giulio De Donato
monolog/monolog 2.2.0 MIT Sends your logs to files, sockets, inboxes, databases and various web services Jordi Boggiano
oojs/oojs-ui 0.43.2 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
opis/json-schema 1.1.0 Apache-2.0 Json Schema Validator Sorin Sarca and Marius Sarca
pear/console_getopt 1.4.3 BSD-2-Clause More info available on: http://pear.php.net/package/Console_Getopt Andrei Zmievski, Stig Bakken and Greg Beaver
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.11 BSD-3-Clause Mail_Mime provides classes to create MIME messages Cipriano Groenendal and Aleksander Machniak
pear/net_smtp 1.10.0 BSD-2-Clause An implementation of the SMTP protocol Jon Parise and Chuck Hagenbuch
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/net_url2 2.2.2 BSD-3-Clause Class for parsing and handling URL. Provides parsing of URLs into their constituent parts (scheme, host, path etc.), URL generation, and resolving of relative URLs. David Coallier, Tom Klingenberg and Christian Schmidt
pear/pear-core-minimal 1.10.11 BSD-3-Clause Minimal set of PEAR core files to be used as composer dependency Christian Weiske
pear/pear_exception 1.0.2 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.1.1 MIT Common Container Interface (PHP FIG PSR-11) PHP-FIG
psr/http-client 1.0.1 MIT Common interface for HTTP clients PHP-FIG
psr/http-factory 1.0.1 MIT Common interfaces for PSR-7 HTTP message factories PHP-FIG
psr/http-message 1.0.1 MIT Common interface for HTTP messages PHP-FIG
psr/log 1.1.4 MIT Common interface for logging libraries PHP-FIG
psr/simple-cache 1.0.1 MIT Common interfaces for simple caching PHP-FIG
ralouphie/getallheaders 3.0.3 MIT A polyfill for getallheaders. Ralph Khattar
symfony/deprecation-contracts 2.5.1 MIT A generic function and convention to trigger deprecation notices Nicolas Grekas and Symfony Community
symfony/polyfill-php80 1.25.0 MIT Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions Ion Bazan, Nicolas Grekas and Symfony Community
symfony/polyfill-php81 1.25.0 MIT Symfony polyfill backporting some PHP 8.1+ features to lower PHP versions Nicolas Grekas and Symfony Community
symfony/yaml 5.4.3 MIT Loads and dumps YAML files Fabien Potencier and Symfony Community
wikimedia/assert 0.5.1 MIT Provides runtime assertions Daniel Kinzler and Thiemo Kreuz
wikimedia/at-ease 2.1.0 GPL-2.0-or-later Safe replacement to @ for suppressing warnings. Tim Starling and MediaWiki developers
wikimedia/base-convert 2.0.1 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 2.0.0 GPL-2.0-or-later Constant Database (CDB) wrapper library for PHP. Provides pure-PHP fallback when dba_* functions are absent. Tim Starling, Chad Horohoe, Ori Livneh and Daniel Kinzler
wikimedia/cldr-plural-rule-parser 2.0.0 GPL-2.0-or-later Evaluates plural rules specified in the CLDR project notation. Tim Starling and Niklas Laxström
wikimedia/common-passwords 0.3.0 MIT List of the 100,000 most commonly used passwords Sam Reed
wikimedia/composer-merge-plugin 2.0.1 MIT Composer plugin to merge multiple composer.json files Bryan Davis
wikimedia/dodo 0.4.0 MIT DOm DOcument implementation Jason Linehan, C. Scott Ananian, Tim Abdullin and Wikimedia Parsing Team and the broader MediaWiki community
wikimedia/equivset 1.4.2 GPL-2.0-or-later Visually Equivalent Set of UTF-8 Characters Brion Vibber and David Barratt
wikimedia/html-formatter 3.0.1 GPL-2.0-or-later Performs transformations of HTML by wrapping around libxml2 and working around its countless bugs. MediaWiki contributors
wikimedia/idle-dom 0.10.0 MIT DOM interfaces automatically generated from WebIDL C. Scott Ananian
wikimedia/ip-set 3.0.0 GPL-2.0-or-later Efficiently match IP addresses against a set of CIDR specifications. Brandon Black
wikimedia/ip-utils 4.0.0 GPL-2.0-or-later Functions and constants to play with IP addresses and ranges MediaWiki developers
wikimedia/less.php 3.1.0 Apache-2.0 PHP port of the Javascript version of LESS http://lesscss.org (Originally maintained by Josh Schmidt) Josh Schmidt, Matt Agar and Martin Jantošovič
wikimedia/minify 2.2.6 Apache-2.0 Minification of JavaScript code and CSS stylesheets. Paul Copperman, Trevor Parscal, Timo Tijhof and Roan Kattouw
wikimedia/normalized-exception 1.0.1 MIT A helper for making exceptions play nice with PSR-3 logging Gergő Tisza
wikimedia/object-factory 4.0.0 GPL-2.0-or-later Construct objects from configuration instructions Bryan Davis
wikimedia/parsoid 0.15.0 GPL-2.0-or-later Parsoid, a bidirectional parser between wikitext and HTML5 Wikimedia Parsing Team and the broader MediaWiki community
wikimedia/php-session-serializer 2.0.0 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.8 GPL-2.0-or-later Fast streaming RDF serializer Daniel Kinzler, Stanislav Malyshev, Thiemo Kreuz and C. Scott Ananian
wikimedia/relpath 3.0.0 MIT Compute a relative filepath between two paths. Ori Livneh
wikimedia/remex-html 3.0.1 MIT Fast HTML 5 parser Tim Starling
wikimedia/request-timeout 1.2.0 MIT Request timeout library for Excimer with plain PHP fallback 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/services 2.0.1 GPL-2.0-or-later Generic service to manage named services using lazy instantiation based on instantiator callback functions Daniel Kinzler
wikimedia/shellbox 3.0.0 MIT Library and server for containerized shell execution Tim Starling, Kunal Mehta and Max Semenik
wikimedia/timestamp 3.0.0 GPL-2.0-or-later Creation, parsing, and conversion of timestamps Tyler Romeo
wikimedia/utfnormal 3.0.2 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 2.0.2 GPL-2.0-or-later Wait loop that reaches a condition or times out Aaron Schulz
wikimedia/wikipeg 2.0.6 MIT Parser generator for JavaScript and PHP
wikimedia/wrappedstring 4.0.1 MIT Automatically compact sequentially-outputted strings that share a common prefix / suffix pair. Timo Tijhof
wikimedia/xmp-reader 0.8.1 GPL-2.0-or-later Reader for XMP data containing properties relevant to images Brian Wolff
wikimedia/zest-css 2.0.2 MIT Fast, lightweight, extensible CSS selector engine for PHP Christopher Jeffrey and C. Scott Ananian
zordius/lightncandy 1.2.6 MIT An extremely fast PHP implementation of handlebars ( http://handlebarsjs.com/ ) and mustache ( http://mustache.github.io/ ). Zordius Chen

RCnico (talk) 18:34, 3 July 2022 (UTC)

Dont use that extension or ask its author to make a new version for newer mediawiki. Bawolff (talk) 23:22, 3 July 2022 (UTC)

can't create account without captcha

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.


  1. on the API account creation page: API:Account creation, the first option provided is a simple account creation, with no captcha.

the problem is, every time i try to run that (python), it fails with error: 'incorrect or missing captcha'.

is it not possible anymore to create account without captcha?


2. and if i use the second option, create with captcha, where do i have to put the html form on my machine in order for it to be found?

because i get this error:

TemplateNotFound

jinja2.exceptions.TemplateNotFound: create_account_form.html


3. in the create_account_form.html , this info is outdated:


  <link rel="stylesheet" href="static/bootstrap/css/bootstrap.min.css">

  <link rel="stylesheet" href="static/css/account_form.css">


CSS files can't be found on github anymore.


Basically, i am trying to create an account via API with python, and i can't do it in any way.


Thanks! 2A02:2F0D:B409:2300:503B:BFFB:DF3A:DBBD (talk) 19:30, 3 July 2022 (UTC)

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

Error after upgrading to 1.38.2: Error: Class "ResourceLoaderUserDefaultsModule" not found

I'm trying to update from 1.35.0 to the latest release, following the usual upgrade process.

Once that's complete I'm getting the following error on my Main Page:

/load.php?lang=en&modules=startup&only=scripts&raw=1&skin=timeless Error: Class "ResourceLoaderUserDefaultsModule" not found

This is (I think) causing a multitude of problems, not the least of which is, no drop down menus or tabs are actually clickable.

Here's the stacktrace:

Backtrace: from /var/www/html/aa-new/includes/resourceloader/ResourceLoader.php(495)

  1. 0 /var/www/html/aa-new/includes/resourceloader/ResourceLoader.php(129): ResourceLoader->getModule()
  2. 1 /var/www/html/aa-new/includes/resourceloader/ResourceLoaderStartUpModule.php(172): ResourceLoader->preloadModuleInfo()
  3. 2 /var/www/html/aa-new/includes/resourceloader/ResourceLoaderStartUpModule.php(421): ResourceLoaderStartUpModule->getModuleRegistrations()
  4. 3 /var/www/html/aa-new/includes/resourceloader/ResourceLoaderModule.php(796): ResourceLoaderStartUpModule->getScript()
  5. 4 /var/www/html/aa-new/includes/resourceloader/ResourceLoaderModule.php(765): ResourceLoaderModule->buildContent()
  6. 5 /var/www/html/aa-new/includes/resourceloader/ResourceLoaderModule.php(905): ResourceLoaderModule->getModuleContent()
  7. 6 /var/www/html/aa-new/includes/resourceloader/ResourceLoader.php(718): ResourceLoaderModule->getVersionHash()
  8. 7 [internal function]: ResourceLoader->{closure}()
  9. 8 /var/www/html/aa-new/includes/resourceloader/ResourceLoader.php(732): array_map()
  10. 9 /var/www/html/aa-new/includes/resourceloader/ResourceLoader.php(821): ResourceLoader->getCombinedVersion()
  11. 10 /var/www/html/aa-new/load.php(52): ResourceLoader->respond()
  12. 11 /var/www/html/aa-new/load.php(38): wfLoadMain()
  13. 12 {main}

Any help is appreciated! Blinkingline (talk) 18:14, 4 July 2022 (UTC)

Usually this means that you are missing php files.
Does includes/resourceloader/ResourceLoaderUserDefaultsModule.php exist? If yes, try making a trivial edit to it (like add a newline to the end) to force the modified time to be updated to force opcache to be cleared. If it doesnt exist, reinstall mediawiki. Bawolff (talk) 20:27, 4 July 2022 (UTC)
That's what I would have thought as well, but it's a clean install. So I re-downloaded MW and took at look and this file doesn't exist in source at all:
https://www.mediawiki.org/wiki/Manual:ResourceLoaderUserDefaultsModule.php
Now I'm even more confused.... Blinkingline (talk) 21:22, 4 July 2022 (UTC)
In MediaWiki 1.39 it gets renamed to includes/ResourceLoader/UserOptionsModule.php However, if you are using 1.38.2, that is before the rename.
Did you some how download an alpha version of 1.39? Bawolff (talk) 02:55, 5 July 2022 (UTC)
Nope, my version page shows I am on 1.38.2: https://new.archonarcana.com/Special:Version
If you look at the 1.38.2 branch from the link I posted previously, you'll see that file isn't there. (see here:
https://phabricator.wikimedia.org/source/mediawiki/browse/REL1_38/includes/resourceloader/ResourceLoaderUserDefaultsModule.php )
I DO have a file in /includes/resourceloader called ResourceLoaderUserOptionsModule.php Blinkingline (talk) 03:28, 5 July 2022 (UTC)
Weird, maybe its something with phab. Github shows it as being there in 1.38 https://github.com/wikimedia/mediawiki/blob/REL1_38/includes/resourceloader/ResourceLoaderUserOptionsModule.php . THe local copy of my git repo also shows it via git show origin/REL1_38:includes/resourceloader/ResourceLoaderUserOptionsModule.php Bawolff (talk) 03:57, 5 July 2022 (UTC)
The file that seems to be missing is ResourceLoaderUserDefaultsModule.php, not ResourceLoaderUserOptionsModule.php Blinkingline (talk) 04:07, 5 July 2022 (UTC)
My apologies, I totally misread that.
Looks like ResoureLoaderUserDefaultsModule got merged into the mediawiki.base modules in 1.38, so 1.37 is the last version that had that.
So this issue might happen if you have the wrong version of resources/Resources.php (e.g. if it still lists a user.defaults module, which should no longer exist) Bawolff (talk) 05:30, 5 July 2022 (UTC)
Hrm, I have zero idea how that happened, but that did the trick. Thanks! Blinkingline (talk) 12:48, 5 July 2022 (UTC)

PluggableAuth SimpleSAMLphp

Hi, i configured SimpleSAMLphp w/ PluggableAuth but the SAML auth through AzureAD does noet seem to work. Special:Version shows both PluggableAuth 6.1 and SImpleSAMLphp 5.0.0beta are loaded. The SimpleSAMLphp package is also installed and configured. I can do an auth test with default-sp and that redirects me to Azure for auth and shows all the claims.

I have added this to the LocalSettings.php:

```wfLoadExtension( 'PluggableAuth' );

wfLoadExtension( 'SimpleSAMLphp' );

$wgSimpleSAMLphp_InstallDir = '/var/simplesamlphp';

$wgPluggableAuth_EnableAutoLogin = false;

$wgPluggableAuth_EnableLocalLogin = false;

$wgPluggableAuth_EnableLocalProperties = false;

$wgPluggableAuth_Config['Log in using Azure AD'] = [

'plugin' => 'SimpleSAMLphp',

'data' => [

'authSourceId' => 'default-sp',

'usernameAttribute' => 'http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname',

'realNameAttribute' => 'http://schemas.microsoft.com/identity/claims/displayname',

'emailAttribute' => 'http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress'

]

];```


But whenever i click the "Log in using Azure AD" button i get an error "Could not load authentication plugin". The debug log throws an error that an instance of the Authentication plugin cannot be started.

How can i troubleshoot this? What am i missing? Thx! Dennmee (talk) 18:41, 4 July 2022 (UTC)

Are you able to solve the issue?
I'm also facing the same problem?
Not redirecting to login page. 81.246.8.11 (talk) 09:11, 27 October 2022 (UTC)

Is an XAMPP-hosted MediaWiki accessible over the web?

Bumping an old post:

• "https://www.mediawiki.org/wiki/Project%3ASupport%20desk/Flow/2017/03#h-%28Confused_beginner%29_Accessing_my_wiki_from_anywhere-2017-03-12T04%3A10%3A00.000Z"

Can a desktop MediaWiki installation hosted on an XAMPP server be securely accessed over the web? Of course, there's going to have to be some router configuration done.

My goal is to access it anywhere I want to edit its contents anywhere I am.

Thanks.

D. P., Henderson, NV, USA D0ugparker (talk) 18:59, 4 July 2022 (UTC)

Yes, provided your computer is globally routable (your router is configured)
I dont know that much about xampp, so you have to check what it binds to by default - you need it to bind to 0.0.0.0. That may be the default, i dont know.
If you want to do it securely (e.g. over https not http), you need to buy a domain name, have it point to your ip (your ip will need to be static for this to work, which is something you sort out with your isp). You then need to obtain a tls certificate for that domain, and configure xampp to use it (lets encrypt is a popular choice because it is free, although most of the automated tooling for lets encrypt probably isn't for windows)
You would also have to have your computer on 24/7.
So yes, definitely do-able. However it is probably easier to get a cheap cloud server (typically these cost $6/month e.g. digital ocean), as most of the tutorials are written for linux. Bawolff (talk) 20:24, 4 July 2022 (UTC)

Problem editing wikibase items

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.


Config mediawiki:

MediaWiki 1.38.0

PHP 7.4.19 (fpm-fcgi)

MariaDB 10.3.32-MariaDB

Apache config:

<VirtualHost *:80>

    ServerName profmus.fcsh.unl.pt

    DocumentRoot /var/www/rp-portfolio

    ErrorLog /etc/httpd/logs/error_profmus.log

    CustomLog /etc/httpd/logs/access_profmus.log combined

    Header set Access-Control-Allow-Origin "*"

    TimeOut 600

    KeepAlive On

    <Directory /var/www/rp-portfolio/static>

        Require all granted

    </Directory>

</VirtualHost>

LocalSettings.php:

...

$wgServer = 'https://profmus.fcsh.unl.pt';


My problem is related to editing an item on wikibase it is simply  not working and it shows an error on browser console that states "No 'Access-Control-Allow-Origin' header is present on the requested resource." I can't find where this error is coming from. Joaofalexandre (talk) 20:59, 4 July 2022 (UTC)

For starters, I would suggest not adding Header set Access-Control-Allow-Origin "*" to the apache config. Although its probably not hurting anything because the error would be different, it is not the correct value, and it could potentially override mediawiki's value (Although i suspect if that was happening, your error would be different).
What is the url of the page where you're editing wikibase from, and what is the url of the instance of the wikibase you are editing (Its a bit unclear from your message if this is using a cross-wiki edit feature, or if you are on the wikibase instant you are trying to edit)? When you do edit, in the network tab of your browser, what requests are there (particularly any that say blocked or cors error, or any that are going to api.php) Bawolff (talk) 02:50, 5 July 2022 (UTC)
I removed Header set Access-Control-Allow-Origin "*" and tested again.
The url of the instance that I am trying to edit is https://profmus.fcsh.unl.pt/static/wiki/index.php/Item:Q136 and i am on the wikibase instant I am trying to edit. The errors that are appearing are the following:
Ensure CORS response header values are valid:
api.php?action=wbparsevalue&format=json&parser=wikibase-entityid&values=%1FP10&errorformat=plaintext&uselang=pt&options=%7B%22lang%22%3A%22pt%22%7D blocked Access-Control-Allow-Origin Missing Header
api.php?action=wbformatvalue&format=json&datavalue=%7B%22value%22%3A%7B%22after%22%3A0%2C%22before%22%3A0%2C%22calendarmodel%22%3A%22http%3A%2F%2Fwww.wikidata.org%2Fentity%2FQ1985727%22%2C%22precision%22%3A11%2C%22time%22%3A%22%2B1882-09-02T00%3A00%3A00Z%22%2C%22timezone%22%3A0%7D%2C%22type%22%3A%22time%22%7D&generate=text%2Fplain&property=P10&errorformat=plaintext&uselang=pt&options=%7B%22lang%22%3A%22pt%22%7D blocked Access-Control-Allow-Origin Missing Header
api.php?action=wbformatvalue&format=json&datavalue=%7B%22value%22%3A%22AHISC%26MF%2F%20Montepio%20Filarm%C3%B3nico%2F%20Livro%20das%20entradas%20dos%20s%C3%B3cios%20(1834-)%22%2C%22type%22%3A%22string%22%7D&generate=text%2Fplain&property=P86&errorformat=plaintext&uselang=pt&options=%7B%22lang%22%3A%22pt%22%7D blocked Access-Control-Allow-Origin Missing Header Joaofalexandre (talk) 12:16, 5 July 2022 (UTC)
So i was able to edit your wiki without getting any errors https://profmus.fcsh.unl.pt/static/wiki/index.php?title=Item:Q136&diff=242&oldid=241 Bawolff (talk) 21:41, 5 July 2022 (UTC)
The problem only occurs when editing in the declarations section. Joaofalexandre (talk) 11:00, 7 July 2022 (UTC)
I was able to edit that section too https://profmus.fcsh.unl.pt/static/wiki/index.php?title=Item%3AQ136&type=revision&diff=247&oldid=245
I'm not sure what the cause of the difference could be. Have you tried using different computer in case its something weird with your web browser? Bawolff (talk) 01:21, 8 July 2022 (UTC)
It was something related with my firewall, i tried using a different network and I was able to edit. Joaofalexandre (talk) 14:14, 9 July 2022 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Rate limits of public MediaWiki API

Hello every one,

Actually playing with your public API, and i have severals questions about it.

I don't know if it is the best place for talking about it but it allows a first contact.


Are the differents chapter API are subject of the same rate limit ?

For example if i ask too much to https://en.wikipedia.org/w/api.php can i be limited on https://nl.wikipedia.org/w/api.php ?


About this rate limit how can i know with https://en.wikipedia.org/w/api.php?action=query&format=json&meta=userinfo&uiprop=ratelimits how many "query" and "parse" can i do ?


Finnaly about https://en.wikipedia.org/api/rest_v1/ have it the same limitation ? Is it better to use it for getting abstracts and full text of a bunch a wikipedia articles ? Datalogism (talk) 07:11, 5 July 2022 (UTC)

Its possible you can hit global rate limits. However they are generally hard to hit for read actions.
Anyways see https://www.mediawiki.org/wiki/API:Etiquette Bawolff (talk) 09:02, 5 July 2022 (UTC)
> For example if i ask too much to https://en.wikipedia.org/w/api.php can i be limited on https://nl.wikipedia.org/w/api.php?
Not entirely sure, but next to the per wiki limits there are definitely also overall limits.
> how many "query" and "parse" can i do?
These are not exactly defined, but if you start receiving 429s, it's too many per second ;)
> Finnaly about https://en.wikipedia.org/api/rest_v1/ have it the same limitation?
It should allow up to 200 req/s. See also [[mediawikiwiki:Wikimedia_REST_API#Terms_and_conditions|]].
> Is it better to use it for getting abstracts and full text of a bunch a wikipedia articles?
Yes, it's better optimised and applies more caching etc. —TheDJ (Not WMF) (talkcontribs) 09:03, 5 July 2022 (UTC)
Thank you for all ! Datalogism (talk) 08:50, 19 July 2022 (UTC)

Auto Login from Joomla User

I have a Joomla based website where users login and access Joomla pages, a phpbb forum and MediaWiki pages. I want to carry across the user login to MediaWiki and log them in automatically. I can't find a way to do this and would have thought it to be a common requirement? How would I go about doing this please.

Joomla 3.9.2

MediaWiki 1.34.2

php 7.4

Thanks

Robin Hair Robinhair2441 (talk) 09:56, 5 July 2022 (UTC)

SessionManager if you need to do something custom. If you are using some sort of standard, then an extension might already exist for your usecase. Bawolff (talk) 16:53, 5 July 2022 (UTC)

[[File:|link=]] causes wanted pages to show missing file articles

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.


Greetings,

I've got a weird behavior from my MediaWiki 1.35.0. My original template https://www.istaria-lexica.de/index.php?title=Template:InfoboxScreenshot&action=edit&oldid=22740 did show a template image (TitleTemplate.jpg)and was linking to the file upload page. This caused Special:WantedPages to show missing article pages, which are thousands of (https://www.istaria-lexica.de/index.php?title=Special:WantedPages&limit=500&offset=2000). Since this is expected behavior, I had the idea to change the template to use external links and images (wgAllowExternalImages=true), instead of the [[File:]] function (https://www.istaria-lexica.de/index.php?title=Template:InfoboxScreenshot&oldid=139684). I expected Special:WantedPages to not show them as missing anymore, but that didn't work.

I've done refreshLinks.php and updateSpecialPages.php with no effect. I've tried a null-edit which also had no effect. WhatLinksHere still links back to the page. Example: https://www.istaria-lexica.de/Special:WhatLinksHere/File:Beginner_Spell:_Ignore_Mysticism.jpg

What am I doing wrong here? Could that be a bug?

Thanks! Dominik Maus (talk) 10:53, 5 July 2022 (UTC)

I think its the #ifexist check not the actual file link that is triggering the wanted page list. Bawolff (talk) 18:16, 5 July 2022 (UTC)
This is a long standing known issue that is unlikely to change https://phabricator.wikimedia.org/T14019 Bawolff (talk) 18:18, 5 July 2022 (UTC)
Thank you for the heads up Bawolff, I didn't think of that possibility. That's kind of disappointing, I don't know how I could solve my problem beside changing the template to not use #ifexist or even disabling it. The template's use is based on the check for existence of the file. Sadly, it is used in about half of the articles in the wiki.
Does anyone have an idea of a workaround?
Thanks! Dominik Maus (talk) 19:33, 5 July 2022 (UTC)
I use this:
https://en.wikipedia.org/wiki/Template:Linkless_exists Jonathan3 (talk) 07:32, 6 July 2022 (UTC)
I didn't even know that was possible. Wikipedians never cease to amaze. Bawolff (talk) 05:31, 8 July 2022 (UTC)
Thanks Jonathan3, I didn't think it was THAT easy.
However, that template somehow did not work correctly for me, but I found a pretty much similar approach which did the job just fine: https://meta.wikimedia.org/wiki/Template:Exists
Problem solved!
Thanks everyone! Dominik Maus (talk) 13:51, 8 July 2022 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Easiest way to include (a few) auto-generated files (FAQ?)

Must be a FAQ but I simply can't find some relevant information.

In our MW I have to include a link to a few files that are generated from some software every day. Files are in PDF format and placed on the same server as MW is installed and are accessible via Anonymous ftp as well. Changing those files shall not be considered as change in MW contents.


What is the easiest way to create a functional link as in

"Please click here to see daily log".


Thank you very much

Goran GoranBe (talk) 12:56, 6 July 2022 (UTC)

Write code to use the API to upload files (if within MediaWiki), and to edit a page to add links to uploaded files. There are also frameworks like e.g. Pywikibot. Malyacko (talk) 13:57, 6 July 2022 (UTC)
Probably easiest to store outside mediawiki and just link to it Bawolff (talk) 19:42, 6 July 2022 (UTC)

Error when editing/creating pages with slash in its name at VisualEditor

Hi all,

I think it is a kind of bug, I haven't noticed that in previous versions of MW. Now I use:

Product Version
MediaWiki 1.38.2
PHP 7.3.32 (cgi-fcgi)
MySQL 5.7.34

So when I create a page or edited created previously pages with slash in its name like "New_article/Subpage" and when I switch view from source code to Visual Editor or when try to save page or when inserting any template I have following error:

Error loading data from server:
Error contacting the Parsoid/RESTBase server (HTTP 404)

When I make pages without slash in its name then all works fine. Is it a bug? Fokebox (talk) 07:49, 7 July 2022 (UTC)

Its a webserver configuration issue most likely. The / is somehow causing the request not to be sent to the right api. Bawolff (talk) 08:17, 7 July 2022 (UTC)
Shall I sent a request to my hosting provider with it? Or any other steps? Fokebox (talk) 08:27, 7 July 2022 (UTC)
@Bawolff the hosting company tried to resolve the problem as it is described here: Extension:VisualEditor#Allowing VisualEditor on page titles containing slashes
But in my case it doesn't make any effect. I have other MW website on other hosting and also faced with the problem saving page with slash in its title. I guess it is a bug somewhere in core?! Fokebox (talk) 10:01, 7 July 2022 (UTC)
It sounds like a problem with your web host, not core. Bawolff (talk) 18:43, 7 July 2022 (UTC)
And as far as I can see discussions at fabricator on this issue it is a bug at the core of VisualEditor )
https://phabricator.wikimedia.org/T265614 Fokebox (talk) 09:52, 8 July 2022 (UTC)
For me not ... as I has mentioned, I have two different Mediawiki 1.38.2 running at two different hosting providers and having the same issue. I also tried two set up configuration:
AllowEncodedSlashes NoDecode
But I it did not resolve the problem. Fokebox (talk) 07:26, 8 July 2022 (UTC)
I have found several topics on this issue, but as I can see there isn't solution of this so far. Fokebox (talk) 14:02, 7 July 2022 (UTC)

(Synology) When editing pages: Exception caught: Call to undefined function gzinflate()

I have intalled the latest Mediawiki package update (thats available in synology package center, 1.35.5-1056), but I'm now getting a "Call to undefined function gzinflate()" error if try to create/edit mediawiki pages. Also tried a new Installation on another NAS and get the same problem.

From my research it seems to be related to a data compression function and a missing zlib package in the new synology PHP package used (version 7.4.28-0117).

Any ideas on how to solve this, other than waiting Synology to maybe again update their packages? 87.156.222.236 (talk) 09:49, 7 July 2022 (UTC)

Found out how to fix it.
  • Go to "Web Station"
  • "Script Language Settings"
  • Under "Packaged Based Profile"
  • Select "MediaWiki"
  • Click "Edit" on the top of the page
  • Go to the "Extensions" tab
  • Scroll all the way to the bottom
  • Enable "zlib"
I had the same issue and doing this fixed it without even needing me to restart the server or anything. 71.17.202.141 (talk) 01:28, 8 July 2022 (UTC)
Yes, it works :)
Thank you very much for your help! :) 87.156.222.236 (talk) 16:26, 8 July 2022 (UTC)

Questions about setting headers

How do you set up a header like "From Wikipedia, the free encyclopedia" on the English Wikipedia?

MediaWiki version is 1.38.1. ナムコォッ! (talk) 10:01, 7 July 2022 (UTC)

I think that's MediaWiki:Tagline Jonathan3 (talk) 11:37, 7 July 2022 (UTC)
@Jonathan3 I was able to do it. Thank you very much. ナムコォッ! (talk) 00:35, 9 July 2022 (UTC)

visual editor error in 1.38 with (curl error: 28)

I tried many things to solve error 28 through googling, but nothing was solved, just calling out other errors. What I found out is that if you write Myip:8142 using curl, it says Access refused. And if you look at all the other signs, it doesn't seem like a parsoid is being called out at all. 219.250.0.19 (talk) 13:35, 7 July 2022 (UTC)

Revision Version 0 missing

Hi all,

a citywiki created in 2006 that was migrated across at least four servers over the years and from Version 1.dont.know to 1.35.7 has an inconsistecy for some images uploaded before 2010. Cannot understand when it happened, since I'm involved in this since 2017 only.

The images do exist and are shown in articles. But when trying to edit them (i.e. adding a category, that's how I found out) I get the error (translated from German) "Version 0 of page „File:xyz.jpg“ does not exist. This error is usually caused by an outdated link to a page's history that has since been deleted. Details can be viewed in the deletion log." (Die Version 0 der Seite „Datei:xyz.jpg“ ist nicht vorhanden. Dieser Fehler wird normalerweise von einem veralteten Link zur Versionsgeschichte einer Seite verursacht, die zwischenzeitlich gelöscht wurde. Einzelheiten sind im Lösch-Logbuch einsehbar.). The file does not appear in deletion log.

Trying to move the file to a new name shows this:

[YsbobfFZmHJ84Pd3YUUAuwAAA8Q] /index.php?title=Spezial:Verschieben&action=submit MWException from line 907 of /mnt/webxyz/zz/yy/xxx/htdocs/wiki1357/includes/MovePage.php: Failed to create null revision while moving page ID 7602 to Datei:xyz1.jpg

Backtrace:

#0 /mnt/.../htdocs/wiki1357/includes/MovePage.php(570): MovePage->moveToInternal()

#1 /mnt/.../htdocs/wiki1357/includes/MovePage.php(417): MovePage->moveUnsafe()

#2 /mnt/.../htdocs/wiki1357/includes/specials/SpecialMovepage.php(633): MovePage->moveIfAllowed()

#3 /mnt/.../htdocs/wiki1357/includes/specials/SpecialMovepage.php(138): MovePageForm->doSubmit()

#4 /mnt/.../htdocs/wiki1357/includes/specialpage/SpecialPage.php(600): MovePageForm->execute()

#5 /mnt/.../htdocs/wiki1357/includes/specialpage/SpecialPageFactory.php(635): SpecialPage->run()

#6 /mnt/.../htdocs/wiki1357/includes/MediaWiki.php(307): MediaWiki\SpecialPage\SpecialPageFactory->executePath()

#7 /mnt/.../htdocs/wiki1357/includes/MediaWiki.php(947): MediaWiki->performRequest()

#8 /mnt/.../htdocs/wiki1357/includes/MediaWiki.php(547): MediaWiki->main()

#9 /mnt/.../htdocs/wiki1357/index.php(53): MediaWiki->run()

#10 /mnt/.../htdocs/wiki1357/index.php(46): wfIndexMain()

#11 {main}


Since I'm a familiar with SQL databases, I tried to find out something in the DB directly, but did not get it.

Is there a (simple) way to create this revision version 0, or (as a workaround) do I have to upload these images newly?

Cheers Frank BonniHamm (talk) 14:46, 7 July 2022 (UTC)

Revision numbers start at 1. 0 means something is very messed up in your db.
What is page_latest field in the page table entry for this page? Bawolff (talk) 17:46, 7 July 2022 (UTC)
It's 37870, and page.page_latest = revision.rev_id for that file. And revision.rev_page = page.page_id for that file. Matches perfectly IMHO, so the issue must be somewhere else.
Meanwhile I found a quite easy workaround: delete such a file, restore it and the description can be edited as needed. Strange! BTW: Did not do this for the file mentioned. BonniHamm (talk) 18:32, 7 July 2022 (UTC)
Could be an issue with a missing row in the actor table or comment table (e.g. rev_comment or rev_actor does not line up) Bawolff (talk) 18:41, 7 July 2022 (UTC)
Actor makes sense. I had some issues with double NULL values in actor.actor_name when updating to 1.35.7.
I deleted one of the NULL value entries and ran migrateActor.php again. Both >200 times (automated that with an own php script). Maybe that caused the issue.
Thanks for you help, I'll run my workaround when needed. BonniHamm (talk) 19:33, 7 July 2022 (UTC)

Mysql image path help

I am really struggling trying to upgrade a very old wiki, started in 2004 and creaking at the seams, to the latest version. We need to extract the first image of some of the pages and thus the query below. But the DB schema has changed, rev_text_id column has been dropped and the query no longer works. Would some kind soul please help me to rewrite the query so it works on the current release.


SELECT il_to AS img_name,

CONCAT (SUBSTRING(MD5(il_to), 1, 1), '/', SUBSTRING(MD5(il_to), 1, 2), '/', il_to) AS image_path,

    LOCATE( LOWER (il_to), LOWER( REPLACE( REPLACE( text.old_text, ' ', '_'), '%2B', '+') ) ) AS position,

LEFT(text.old_text,500) AS content

FROM wikidb.page AS redir

JOIN wikidb.redirect ON rd_from = redir.page_id AND rd_namespace = 0

JOIN wikidb.page AS target ON rd_title = target.page_title AND target.page_namespace = 0

JOIN wikidb.revision ON rev_id = target.page_latest AND target.page_namespace = 0

JOIN wikidb.text on rev_text_id = text.old_id

JOIN wikidb.imagelinks ON il_from=target.page_id

JOIN wikidb.image ON il_to=img_name

WHERE 1

AND redir.page_title = 'Some Article or Other'

AND redir.page_namespace = 0

ORDER BY position ASC

LIMIT 1 Ticklehill (talk) 16:11, 7 July 2022 (UTC)

Have you considered just using extension:PageImages to get this info? Bawolff (talk) 17:44, 7 July 2022 (UTC)
Thanks Bawolff but there is additional query code to ensure it pulls the "correct" image. Ticklehill (talk) 17:46, 7 July 2022 (UTC)
I am getting the correct data the query below, if you are in a similar situation please don't rely on it, it's works but I am not confident it is "correct"
SELECT CONCAT (SUBSTRING(MD5(il_to), 1, 1), '/', SUBSTRING(MD5(il_to), 1, 2), '/', il_to) AS image_path, LOCATE( LOWER (il_to), LOWER( REPLACE( REPLACE( text.old_text, ' ', '_'), '%2B', '+') ) ) AS position
FROM page
JOIN imagelinks ON il_from = page_id
JOIN image ON il_to = img_name
JOIN slots ON slot_revision_id = page_latest
JOIN content ON slot_content_id = content_id
JOIN text ON old_id = SUBSTRING( content_address, 4)
WHERE 1
AND page_namespace = 0
AND page_title = 'Some Page or Other'
ORDER BY position ASC
LIMIT 1; Ticklehill (talk) 22:10, 7 July 2022 (UTC)

Help with Special:prefixindex

I want to group All Pages under alphabetical letter categories with show/hide feature.

It was suggested I try using Special:prefixindex, but I have no idea how to start.

Do I create a template? What code do I put in it? Do I have to do anything to my pages? DStallTX (talk) 17:55, 7 July 2022 (UTC)

Please provide a link / context what was suggested where. If you refer to Project:Support desk/Flow/2022/07#h-How_to_group_page_list_alphabetically_with_show/hide_letters?-2022-07-01T16:17:00.000Z, then why did you start another new topic? Malyacko (talk) 21:53, 7 July 2022 (UTC)
Because it's been 6 days and I'm getting no response at that link. DStallTX (talk) 21:59, 7 July 2022 (UTC)
That is not a good use of anyone's time. Malyacko (talk) 23:06, 7 July 2022 (UTC)
To answer the qustion: I'm afraid you have to edit the source code of some PHP files. Malyacko (talk) 23:07, 7 July 2022 (UTC)
That is not helpful. Point me to a tutorial or instructions pls. DStallTX (talk) 03:13, 8 July 2022 (UTC)
There is no such tutorial. You'll have to dig into the code and adjust it.
Please also do not create new discussion threads for no good reason. Thanks. Malyacko (talk) 09:51, 8 July 2022 (UTC)
Is there someone out there who can specifically tell me the code to add/subtract/modify in specifically which PHP files in specifically what way(s) so that MediaWiki groups the list of All Pages by alphabet letter? DStallTX (talk) 12:30, 8 July 2022 (UTC)
Professional development and consulting Malyacko (talk) 19:29, 8 July 2022 (UTC)

Old wiki not displaying any content

I have just looked at an old mediawiki based site that I haven't touched in nearly a decade (version 1.15). Every single page is completely blank, and shows no content. At first I thought the database was damaged or missing but i'm not sure that's true.


I first went to see all pages which shows everything there but each page is still blank.


Next I look at the history, which is also intact but each entry shows a blank screen again.


However - if I click on rollback (taking me to an edit screen) I can see the data.


Saving the page however does not change anything, still shows blank with no data.


Another thing i've tried is going into localsettings and disabling all extensions - no change.


Any ideas what could be causing this or what to try next? Thanks, 159.196.168.165 (talk) 18:52, 7 July 2022 (UTC)

Did some more digging and found a similar thread with solution - which is to upgrade.
Project:Support desk/Flow/2014/11#h-[RESOLVED]_Content_Not_Showing_In_Wiki-2014-11-21T15:01:00.000Z 159.196.168.165 (talk) 18:58, 7 July 2022 (UTC)
See How to debug.
Blank screen usually means php error when displaying php errors has been turned off. Check your php error log. Bawolff (talk) 19:57, 7 July 2022 (UTC)

Fix ShortURL Extension .htaccess Code

I have MediaWiki installed in subfolder - domain.com/subfolder/
ShortURL instructions at link below are coded for root directory.
How do I revise it for subfolder?-
Manual:Short URL/wiki/Page Title -- .htaccess DStallTX (talk) 19:14, 7 July 2022 (UTC)
Change all the references to wiki and w to be the correct directory. (w = directory mediawiki located in. wiki = fake directory that your short urls are served out of) Bawolff (talk) 01:11, 8 July 2022 (UTC)
See the very first sentence on Manual:Short_URL: That documentation has nothing to do with the ShortURL extension. Malyacko (talk) 20:06, 7 July 2022 (UTC)
That page states:
URL like - example.com/wiki/Page_title
Root access
These methods require that you have access to the server configuration. If you are on a shared host, you most likely don't. In this case you will be required to use a method that requires "no root access". You can jump directly to the MediaWiki ShortURL Builder tool and follow the on-screen instructions. Select "I don't have root access" after entering your wiki's URL.
I'm on SHARED HOST and can access my domain folder and public_html folder, so do I have access or not?
I enter my wiki URL in MediaWiki ShortURL Builder tool but there's no on-screen instructions, and no way to select "I don't have root access" after entering my wiki's URL.
When I enter URL and click Submit button, I get -
These instructions can be used to configure the wiki at https://dstall.com/MOD/index.php/Main_Page with the article path "/MOD/index.php/$1" giving you urls like https://dstall.com/MOD/index.php/Main_Page. If you want a different article path you can fill in a new one here.
It doesn't indicate any shortening of the URL. It's the same URL before and after with index.php in it. I want index.php removed from URL.
I know I've done all this before and it didn't work. That's why I went the Short URL extension route, and when I entered the code in .htaccess file I cited previsoulsy, the URL was shortened but to my root folder, NOT to my wiki folder. DStallTX (talk) 22:14, 7 July 2022 (UTC)
> It doesn't indicate any shortening of the URL. It's the same URL before and after with index.php in it. I want index.php removed from URL
That's because you have to fill out what you want the short url to be in the form. If you don't it will leave it as a long url. Bawolff (talk) 05:19, 8 July 2022 (UTC)
That last comment seems to ignore my previous comment. If you have a question about the extension, then the page is NOT about the extension at all. Malyacko (talk) 23:05, 7 July 2022 (UTC)
I don't think DStallTX intends to refer to the ShortURL extension at all. I think s/he just got a bit confused about what different things are named. Bawolff (talk) 01:13, 8 July 2022 (UTC)
Please just tell me the best way to create short URLs that works. I'm tired of trial and error and nothing works. DStallTX (talk) 03:12, 8 July 2022 (UTC)
There is no one way to do this. The appropriate way depends on your server configuration. That said, i'd suggest finding an example that is close to what you want, and modifying it to meet your specific needs. Bawolff (talk) 05:12, 8 July 2022 (UTC)
I've already stated that I use shared hosting. The MediaWiki ShortURL Builder that produces code for my site based on a URL from it does NOT appear to work. See above. There is no box to check for "I don't have root access".
What is root access? If I have shared hosting account and can access public_html folder in my domain folder, do I have root access or not? DStallTX (talk) 12:36, 8 July 2022 (UTC)
No you dont have root access. I tried the tool right now, and its not suggesting anything requiring root access. Bawolff (talk) 18:04, 8 July 2022 (UTC)
Got it to work.
Finally. DStallTX (talk) 22:56, 8 July 2022 (UTC)

Can Image Gallery (like link below) be created with external links? If so, how? I've tried all different kinds of configurations and none work.

Creating an Image Gallery in MediaWiki DStallTX (talk) 20:00, 7 July 2022 (UTC)

Yes, See help:Images Bawolff (talk) 21:14, 7 July 2022 (UTC)
There's no instructions there for GALLERY, only for inserting external image link into text. When I use that format with double brackets and File:URL in GALLERY it doesn't work - DStallTX (talk) 22:18, 7 July 2022 (UTC)
There is a section about galleries on that page. One of the examples is an image in a gallery linking to an external site. Bawolff (talk) 00:59, 8 July 2022 (UTC)
I want to use external URLs for links to gallery images, to know how to create gallery images from external links, such as - http://domain.com/images/image.jpg
Is the page saying that cannot be done, only link text will display?
"You can link to an external file available online using the same syntax used for linking to an external web page. With these syntaxes, the image will not be rendered, but only the text of the link to this image will be displayed.
Or with a different displayed text:"
It then goes on to describe embedding images. I can embed images, but I want to know how to use gallery tag and code WITH LINK TO EXTERNAL IMAGE so embedded images are arranged as gallery each in their own separate box like this - Image Gallery
Otherwise I have to create divs from scratch. DStallTX (talk) 03:21, 8 July 2022 (UTC)
If you are asking how to embed external images into a gallery (as opposed to linking the images in a gallery to an external website), the answer is it cannot be done with the gallery tag. Bawolff (talk) 05:10, 8 July 2022 (UTC)

タイトルを変更してもソートされない

タイトルを変更したにも関わらず、該当する並び順(アルファベット順など)に並び替えてくれないのですが、どうしたらいいですか? 118.103.9.17 (talk) 08:05, 8 July 2022 (UTC)

See "Post a new question" in the sidebar. Malyacko (talk) 09:49, 8 July 2022 (UTC)

[RESOLVED] Fresh MW1.35 install - revision.rev_actor always 0 (zero)

Howdy Support Desk.

I just installed a MediaWiki 1.35 instance via meza/enterprisemediawiki to update the WatchAnalytics extension and the revision.rev_actor column is always 0 (zero) instead of the actor.actor_id of the user making the edit.

MariaDB [wiki_demo]> select rev_id,rev_page,rev_actor,rev_timestamp from revision order by rev_id desc limit 10;
+--------+----------+-----------+----------------+
| rev_id | rev_page | rev_actor | rev_timestamp  |
+--------+----------+-----------+----------------+
|     55 |       51 |         0 | 20220708212127 |
|     54 |       50 |         0 | 20220708212108 |
|     53 |       49 |         0 | 20220708211851 |
|     52 |       49 |         0 | 20220708211558 |
|     51 |       49 |         0 | 20220708211434 |
|     50 |       49 |         0 | 20220708203535 |
|     49 |       48 |         0 | 20220707155027 |
|     48 |       47 |         0 | 20220707155027 |
|     47 |       46 |         0 | 20220707155027 |
|     46 |       45 |         0 | 20220707155027 |
+--------+----------+-----------+----------------+
10 rows in set (0.000 sec)

MariaDB [wiki_demo]> select * from actor;
+----------+------------+--------------------+
| actor_id | actor_user | actor_name         |
+----------+------------+--------------------+
|        1 |          1 | Maintenance script |
|        3 |          2 | Admin              |
|        4 |          3 | Djflux             |
+----------+------------+--------------------+

Am I missing something? Any ideas why if the Admin or Djflux user is editing the page that their actor_id isn't in the revision table? Thanks in advance.

Cheers,
Andy Djflux (talk) 21:38, 8 July 2022 (UTC)

Answered my own here. From: https://www.mediawiki.org/wiki/Manual:Revision_table:
If this field contains zero in each record, the actor id must be retrieved from the revision_actor_temp table. Djflux (talk) 21:42, 8 July 2022 (UTC)

Get page history with slash in page title

I am using the 'Get Page History' API API:REST API/Reference to retrieve revisions. When I search revisions for a page title with slashes, e.x., Abacavir/dolutegravir/lamivudine, there's 'NOT FOUND' error. Is there any change I need to make to the title? Yuzieie (talk) 23:39, 8 July 2022 (UTC)

You have to encode the / as %2F
e.g. https://en.wikipedia.org/api/rest_v1/page/title/Abacavir%2Fdolutegravir%2Flamivudine Bawolff (talk) 00:52, 9 July 2022 (UTC)
It works! Thanks! Yuzieie (talk) 17:46, 9 July 2022 (UTC)

Why I always got HTTP 400 error when I use vistual edite

Hi :

I met a problem, I has setup wiki server with the latest version, but when I use visualedit, it always reports “Error contacting the Parsoid/RESTBase server(HTTP 400)”error, did I miss somthing? Thanks so much in advance! Zhurg (talk) 02:17, 9 July 2022 (UTC)

Greetings from @Ebear422

At the bottom of the page

https://wiki.radioreference.com/index.php/FCC_Station_Class_Codes#Full_List_of_FCC_Station_Class_Codes

you have a link to APCO's list.

It's 404 2600:1011:B15D:353C:E13C:FB2C:205C:55B9 (talk) 07:28, 9 July 2022 (UTC)

We are not associated with that website. You should bring it up with them. Bawolff (talk) 08:23, 9 July 2022 (UTC)

Multiple problem on my Mediawiki

Hello,

Since yesterday I have encountered several problems on my Wiki,

The 1st problem is with the visual editor, as soon as I want to use it I have this error message which appears "Error contacting the Parsoid/RESTBase server (HTTP 500)". <br><br>

The 2nd problem is that the thumbnails (Like the flags) do not appear, I have this instead "Error while creating the thumbnail: Unable to save the thumbnail on the destination". I did put this in my Localsettings " $wgUseImageMagick = true; $wgImageMagickConvertCommand = "/usr/bin/convert"; $wgImageMagickConvertCommand = "/usr/local/bin/convert"; "<br><br>

And the 3rd problem occurs when I import pages or templates, after the import I have two messages that appear, the first in red with written "Import failed: Error creating directory shellbox-55abf45fdb0ded2c" and the second message appears at the top with this message "Warning: mkdir(): No such file or directory in E:\ProgramFiles\XAMPP\htdocs\*\vendor\wikimedia\shellbox\src\FileUtils.php on line 113" <br><br>

How come I have so many problems?

I didn't know if I should make a post for all my problems or a post per problem.

I'm on Localhost, MediaWiki 1.38.1, PHP 7.4.25 (apache2handler), MariaDB 10.4.21-MariaDB.

Thank you for your future response. 2A01:CB11:68E:7F00:3D10:881C:DC2E:1D4A (talk) 10:17, 9 July 2022 (UTC)

Sounds like a permission problem. Is the images subdirectory writable by mediawiki? Is the temp directory? Is SELinux maybe preventing things? Bawolff (talk) 18:46, 9 July 2022 (UTC)
How can I see if the image subfolder is accessible?
In my Localsetting, I just have this regarding the image part:
"$wgEnableUploads = true;
$wgUseImageMagick = true;
$wgImageMagickConvertCommand = '/usr/bin/convert';
$wgImageMagickConvertCommand = 'E:/ProgramFiles/ImageMagick/convert.exe';
$wgIgnoreImageErrors = true;
$wgTmpDirectory = "E:\ProgramFiles\XAMPP\htdocs\PurpleTown\images\temp";"
and I have this message which is displayed at the top of the page
"Warning: symlink(): Permission denied in E:\ProgramFiles\XAMPP\htdocs\PurpleTown\includes\media\SvgHandler.php on line 278"
I forgot to say that I was on Windows 10.
PS: I created an account, it's better than posting anonymously. MonsieurNash (talk) 10:21, 10 July 2022 (UTC)
Oh, windows might affect all this.
The symlink thing for svgs is a known issue on windows. I think its fixed in 1.39
For the rest of it, its possible it is maybe using the wrong temp directory or something like that. You could also have windows specific ACL issues but that would be unusual. The mediawiki debug log might have more info. Bawolff (talk) 20:10, 10 July 2022 (UTC)
Thank you for helping me.
I wanted to see in the debug log, but even by following what's on the page:Manual:How to debug/fr , I can't access it.
So I think I'll leave it like that for now, it's not really a big deal. I will see later with version 1.39
Regarding the problem with the visual editor, I saw that I was not the only one to have this problem (Project:Support desk/Flow/2020/10#h-Still_getting_Parsoid/RESTBase_server_(HTTP_500)_errors_when_enabling_visual_edi-2020-10-02T07:42:00.000Z) and what is unfortunate is that all the solutions they offer do not work for me. It's a shame because the tables to be edited with the code are quite "boring" if I may say so.
But the problem with importing page or template, is still present and I don't know where this problem can come from. MonsieurNash (talk) 22:32, 10 July 2022 (UTC)
For the shellbox issues, it could be that the temp directory doesnt exist or isnt writable. Are you sure you spelled everything correct in E:\ProgramFiles\XAMPP\htdocs\PurpleTown\images\temp and that that directory really exists? Bawolff (talk) 18:39, 21 July 2022 (UTC)

New design is just terrible…

Is it any possibility to return back to «good old» wikipedia-style design without that useless white bars on sides of screen? 37.214.61.67 (talk) 11:35, 9 July 2022 (UTC)

As the Miraheze team recently reminded their users/visitors: "Switch to old look" → "Appearance" tab in Special:Preferences → "Vector legacy (2010)" → "Save". --Slgrandson (talk) 13:45, 9 July 2022 (UTC)
If you want to send feedback you can comment at Talk:Reading/Web/Desktop Improvements Bawolff (talk) 23:35, 9 July 2022 (UTC)

list pages under a categoriy

hi

I want to list title of peges under a category

so when I add a category to page A it update list automatically in page B

how I can do this ? Sobhan 250 (talk) 10:11, 10 July 2022 (UTC)

Try extension:DynamicPageList Bawolff (talk) 18:34, 10 July 2022 (UTC)

Double Redirects Special Pages Suggestion

Is it possible to make the third page featured in DoubleRedirects for each double redirect listed also show the section the second page redirects to? MatthewCenance (talk) 15:22, 10 July 2022 (UTC)

I don't see why not, I'll file a bug.
https://phabricator.wikimedia.org/T312825 Bawolff (talk) 03:26, 12 July 2022 (UTC)
Should show up in wikipedia in about a week (And in MediaWiki 1.39) Bawolff (talk) 23:22, 12 July 2022 (UTC)

The temporary password you emailed me doesn't work!

I forgot my password and got a recovery password from you via email. I've used both the user name and password indicated in the email about ten times but it doesn't work. I should note that the first 3 or 4 times, I used my email address before noticing I was supposed to use my user name.

How do I resolve this problem? 210.23.163.124 (talk) 23:39, 10 July 2022 (UTC)

Make sure you are logging into the right site with the right username. The temp password will only work once.
Wait 24 hours, get a new password, try again. Bawolff (talk) 01:56, 11 July 2022 (UTC)

Comparing the given date to a set one

I'm using Memento Database to track my daughter's developmental milestones, and I want to be able to automatically calculate her age at accomplishing a milestone based on the date I recorded the accomplishment vs her date of birth. Any idea how I could do that? 142.165.85.193 (talk) 00:23, 11 July 2022 (UTC)

Hi, please elaborate how is this related to MediaWiki? See "Post a new question" in the sidebar. Malyacko (talk) 05:50, 11 July 2022 (UTC)
As always it's because the standard help page links to the mediawiki website (search for "memento database wiki" to see it). Jonathan3 (talk) 12:21, 11 July 2022 (UTC)

Defined usercontent

Hi, I have started a MediaWiki, but I would like to have userdefined content on the pages.

E.g a regular user can see lv.Green-information on the page. A regular user with special permission can see lv.1Green&Yellow-information on the same page, and so on..

I need Green+Yellow+Red-info on alle pages in the MediaWiki.

Is this possible? 194.255.164.20 (talk) 11:46, 11 July 2022 (UTC)

You might find @Bawolff's reply to me in Project:Support desk/Flow/2022/07#h-How_to_display_something_only_to_admin_user-20220720221500 useful. Jonathan3 (talk) 22:45, 21 July 2022 (UTC)
I want to emphasize that CSS is only aesthetic. You can hide stuff from certain users using CSS, but it is not secure, as users can disable CSS, so you should only use it when you're ok with the potential for it to be bypassed Bawolff (talk) 00:37, 22 July 2022 (UTC)

Review does not initiate review

Hello! My users are having trouble with routing reviews on documents.

Steps to Reproduce

  1. On several specific documents, my users attempt to start a review by:
    1. 1) Clicking the three dots, then 2) the checkbox on the right, then 3) the review side panel link: Screenshot of opening the Review panel on a document that should be reviewed
  2. On the new panel, assigning a user and clicking “Start Review”. Screenshot of adding a user and starting a review
  3. The system will indicate that the “Review started successfully”, but the process does not “stick” and there is no indication that a review is in progress. When revisiting the review page, it is empty. Screenshot of the confirmation, but no "Review initiated" banner
  4. Assigned users will get a notification to review the page, but the review section is empty.

Version info:

MediaWiki: 1.31.10 (dc1cb90)

PHP: 7.2.24-0ubuntu0.18.04.13

MySQL: 5.7.38-0ubuntu0.18.04.1-log

ICU: 60.2

Lua: 5.1.5

BlueSpice: 3.1.11

I'm afraid I cannot share the web address URL at this time.


Any ideas how to resolve this? Thank you in advance! Asa-Fluxergy (talk) 18:36, 11 July 2022 (UTC)

Error 1091: Can't DROP 'ar_content_model';

MediaWiki 1.38.1
PHP 7.3.33 (apache2handler)
MariaDB 5.5.68-MariaDB
ICU 69.1
Pygments 2.11.2
Lua 5.1.5


when i try php update.php

i got

Table archive contains ar_text_id field. Dropping...Wikimedia\Rdbms\DBQueryError from line 1606 of /var/www/html/wiki/includes/libs/rdbms/database/Database.php: Error 1091: Can't DROP 'ar_content_model'; check that column/key exists (localhost)

Function: Wikimedia\Rdbms\Database::sourceFile( /var/www/html/wiki/maintenance/archives/patch-archive-MCR.sql )

Query: ALTER TABLE `archive`

DROP COLUMN ar_text_id,

DROP COLUMN ar_content_model,

DROP COLUMN ar_content_format Zeteticl (talk) 20:35, 11 July 2022 (UTC)

Unable to create Ldap account on Media wiki.

Hello All,

I currently working on bring up new install of MediaWiki using postgres db. The problem that I am having is that my application is trying to use mysql command to create the data base. I made sure to update the driver and add the plugins for ldap as well. Does anyone have a suggestion.

Location config

    1. Database settings

$wgDBtype = "postgres"; $wgDBserver = "127.0.0.1"; $wgDBname = "wiki"; $wgDBuser = "wikiadmin"; $wgDBpassword = "wiki_password";

  1. Postgres specific settings

$wgDBport = "5432"; $wgDBmwschema = "wiki_schema";

$LDAPAuthentication2AllowLocalLogin = true; $LDAPAuthentication2UsernameNormalizer = 'strtolower';

wfLoadExtension( 'LDAPAuthentication2' ); wfLoadExtension( 'PluggableAuth' ); wfLoadExtension( 'LDAPProvider' );

Error Message

Error 42: ERROR: relation "ldap_domains" does not exist LINE 1: ...erDomainStore::getDomainForUser */ domain FROM "ldap_doma... ^

Function: MediaWiki\Extension\LDAPProvider\UserDomainStore::getDomainForUser Query: SELECT domain FROM "ldap_domains" WHERE user_id = 9 LIMIT 1

Server OS Centos 7, PHP 7.4.30, Apache/2.4.6 (CentOS) Postgres 11.13

Best Regards

Edwin Lunarman1 (talk) 22:43, 11 July 2022 (UTC)

Update fields automatically

I have a template(infobox) where a user keys in some coordinates of a place. I also have another Maps display parser function that uses the same coordinates as those in the infobox. See below;

{{Infobox KB Location Basic|Xcoord=2|Ycoord=20}}

{{#display_map:20 2|scrollwheelzoom=off}}

Is there a way to link the two such that when the coordinates are changed on either then the update reflects in the other. This is as opposed to manually editing both. Both are located in the same page. Gachangi (talk) 10:50, 12 July 2022 (UTC)

You could use the Cargo extension. Jonathan3 (talk) 07:26, 13 July 2022 (UTC)
Mind giving an example? @ Gachangi (talk) 14:12, 15 July 2022 (UTC)

https

I have a problem to change the wiki to https.


I have the following problem:

http://my.page.com/wiki/mainpage -> working

https://my.page.com/wiki/mainpage -> NOT working

https://my.page.com/wiki/index.php/mainpage -> working


How do I get the index.php out of the URL and how must the httacces for https look like ? 212.117.86.179 (talk) 12:22, 12 July 2022 (UTC)

Adjust $wgServer (controls https) $wgArticlePath and $wgScriptPath in LocalSettings.php'
See Manual:Short url for details about .htaccess in short urls Bawolff (talk) 23:24, 12 July 2022 (UTC)

I want to save space on a page of a FANDOM wiki (FANDOM uses MediaWiki) by making a collapsible gallery, so is it possible, and if so, how can I do this? Rc453632 (talk) 14:51, 12 July 2022 (UTC)

See Manual:Collapsible elements Bawolff (talk) 23:23, 12 July 2022 (UTC)

Want to move my website from one host to another

Hey everyone. Hope all is well.

My current host is giving me issues with their server so wanted to move my wikis to another host. However, they wanted some basic information regarding the wikipedia software.

They want to know:

1. What does this website get built with (maybe some detailed information regarding this), and

2. can I move the website?

I'd also like to know if i can move the website to another host without losing the data on the wikis.

I hope someone can assist me with these questions.

TIA Thepainking (talk) 17:51, 12 July 2022 (UTC)

  1. Not sure what "get built" means. Per Manual:Installation_requirements, MediaWiki requires a web server software, PHP, a database server software.
  2. Manual:Moving_a_wiki Malyacko (talk) 21:10, 12 July 2022 (UTC)

Make a template parameter appear in nowiki

Hi. Is there any way to make a parameter in a template appear in wikitext? If you do <nowiki>{{{1}}}</nowiki>, {{{1}}} will appear. Can I somehow make the value introduced in |1= appear in nowiki? SRuizR (talk) 04:00, 13 July 2022 (UTC)

I don't think so! Jonathan3 (talk) 07:25, 13 July 2022 (UTC)
It depends which aspects. {{#tag:nowiki|{{{1}}}}} will prevent some things but not all things from being parsed. Bawolff (talk) 08:23, 13 July 2022 (UTC)
Thanks! SRuizR (talk) 08:49, 13 July 2022 (UTC)
Sorry - I misunderstood your question. Jonathan3 (talk) 10:32, 13 July 2022 (UTC)

I need help with broken images on wikifarm

I created MediaWiki wikifarm using the approach for operating entirely independent wikis, but still sharing the same web server and MediaWiki source code shown here: Manual:Wiki family - MediaWiki (https://m.mediawiki.org/wiki/Manual:Wiki_family). My setup is based on this example:

<?php
$wikis = [
    'Example Domain' => 'examplewiki',
    'http://one.example.org' => 'onewiki',
];
if ( defined( 'MW_DB' ) ) {
    // Automatically set from --wiki option to maintenance scripts
    $wikiID = MW_DB;
} else {
    // Use MW_DB environment variable or map the domain name
    $wikiID = $_SERVER['MW_DB'] ?? $wikis[ $_SERVER['SERVER_NAME'] ?? '' ] ?? null;
}

if ( $wikiID ) {
    require_once "LocalSettings_$wikiID.php";
} else {
    die( 'Unknown wiki.' );
}

// Add any settings that should apply to all wikis below this line
// -------

For the subdomains I used a wildcard subdomains pointing to the public_html folder where MediaWiki is installed. Everything worked fine until when I decided to upload an image from one of the subdomains. It uploads well but then the image is broken and becomes a 404 link, but from main domain images are working fine. Can someone help me fix that? 197.221.253.15 (talk) 11:14, 13 July 2022 (UTC)

You probably want separate $wgUploadDirectory & $wgUploadPath if you want to keep uploads separate between wikis. Bawolff (talk) 03:23, 14 July 2022 (UTC)
After your suggestion, I tried to use:
$wgUploadDirectory = "$IP/images";
$wgUploadPath = "/images";
Now here is what happens. If I upload an image through domain.com, I can use the image well in that wiki (main wiki) but if upload an image to sub.domain.com, I cant use the image in the sub wiki. It shows the upload was successful but the thumbnail is broken and clicking on it returns a 403 forbidden resource error. 77.246.50.224 (talk) 01:42, 15 July 2022 (UTC)
I meant in the case you wanted separate images for each wiki, where you would have separate directories for each image. For example, you might make one wiki be $wgUploadDirectory = "$IP/images/wiki-one"; $wgUploadPath = "/images/wiki-one"; and the other wiki be $wgUploadDirectory = "$IP/images/wiki-two"; $wgUploadPath = "/images/wiki-two";
Which url specificly is giving the 403. Is it the example.com/wiki/File:MyImage.jpg url, or is the example.com/images/3/3f/MyImage.jpg url?
If its the former, might indicate an issue with mod_security or WAF software. If its the later, more likely a webserver configuration and not a mediawiki configuration issue. Either way check your webserver error logs. Bawolff (talk) 04:30, 15 July 2022 (UTC)
Its sub.domain/images/d/d8/Screenshot_20220714-120207.png that is returning the 403 and from what you said, then it must be the webserver configuration. The error log is showing something like:
[INFO] [2602810] [T0] [77.246.50.224:23789:HTTP2-15#APVH__wildcard_.mydomain:443] File not found [/path/to/public_html/403.shtml]
I don't understand a thing there, I will probably hire someone to configure it for me. Thanks very much for the help. 77.246.52.129 (talk) 05:07, 15 July 2022 (UTC)
I think that error is saying that the webserver determined it should return a 403 error, but it couldn't find the custom 403 error page. For your issue, that's probably more just a symptom and not really the cause of your issue. There may be other log entries that could be relavent.
Another common cause of 403 errors is something wrong with permissions where the webserver does not have permission to view the file. Bawolff (talk) 05:17, 15 July 2022 (UTC)
I have solved it. When you talked about 403 errors being caused by lack of server permissions I went through every server setting that has anything to do with permissions. When I disabled image hotlink protection everything worked. However, trying to exclude the subdomains from hotlink protection does seem to work so I have left it disabled . Thanks for the help. 77.246.55.162 (talk) 08:26, 15 July 2022 (UTC)
I wanted all wikis to use images from one directory, so I used the following settings:
$wgUseSharedUploads = true;
$wgSharedUploadPath = 'my_main_domain/images';
$wgSharedUploadDirectory = '$IP/images/';
$wgHashedSharedUploadDirectory = true;
This is what is not working. I don't know if I am doing anything wrong there. 77.246.53.47 (talk) 01:23, 15 July 2022 (UTC)
Shared uploads is for when you want one wiki to be the primary image wiki, and the other wiki to be secondary and be able to use the first wiki's images. In that type of setup, you would put the $wgUseSharedUploads config in the secondary wikis config, disable uploads on that wiki, and have the first wiki configured like normal. This setting does not allow bidirectional sharing. Bawolff (talk) 04:35, 15 July 2022 (UTC)

is there anyway contact mediawiki directly, log in not working

logins do not work on media wiki powered by media wiki.

it kept saying this. i exist and the password was correct. why am i not allowed to log in?

Log in

Login error

There is no user by the name "Ddyio". Check your spelling.

Username

Ddyio

Password

Forgot your password?

Enter your password

Keep me logged in

Help with logging in Ddyio (talk) 17:07, 13 July 2022 (UTC)

=Login required=
Please log in to view other pages.
Return to Main Page.
this is what i get, which does not work Ddyio (talk) 17:10, 13 July 2022 (UTC)
It sounds like you dont have an account on that wiki. Why do you think that you do? Bawolff (talk) 21:19, 13 July 2022 (UTC)

PHP Fatal error: Uncaught Error: SMW\\Setup::registerExtensionCheck():

Hello!

I'm moving my MediaWiki to another server, I made SQL Dump and full backup of my entire folder. When I'm starting this folder on the new server I'm getting following error:


PHP Fatal error:  Uncaught Error: SMW\\Setup::registerExtensionCheck(): Argument #1 ($vars) cannot be passed by reference in /var/lib/[foldername]/extensions/SemanticMediaWiki/SemanticMediaWiki.php:72\nStack trace:\n#0 /var/lib/[foldername]/extensions/SemanticMediaWiki/SemanticMediaWiki.php(18): SemanticMediaWiki::load()\n#1 /var/lib/[foldername]/vendor/composer/autoload_real.php(73): require('...')\n#2 /var/lib/[foldername]/vendor/composer/autoload_real.php(63): composerRequire_mediawiki_vendor()\n#3 /var/lib/[foldername]/vendor/autoload.php(7): ComposerAutoloaderInit_mediawiki_vendor::getLoader()\n#4 /var/lib/[foldername]/includes/Setup.php(107): require_once('...')\n#5 /var/lib/[foldername]/includes/WebStart.php(89): require_once('...')\n#6 /var/lib/[foldername]/index.php(44): require('...')\n#7 {main}\n  thrown in /var/lib/[foldername]/extensions/SemanticMediaWiki/SemanticMediaWiki.php on line 72


I hope somebody could help me. Mediawiki version is 1.35.1, SemanticMediaWiki 3.2.2 Dinar Karchevskii (talk) 19:40, 13 July 2022 (UTC)

1.35.1 is an ancient insecure version: Download. Please upgrade for your own safety: Manual:Upgrading. Malyacko (talk) 05:52, 14 July 2022 (UTC)
Maybe it's something to do with PHP versions being different? Jonathan3 (talk) 12:20, 15 July 2022 (UTC)

Visual Editor Broken - Parsoid/RESTBase Server Issue

How can I get a WYSIWYG editor that works with Short URL???

I followed instructions for MediaWiki ShortURL Builder tool and was able to get Short URL working, but then noticed that Visual Editor was broken.

"Cannot use Visual Editor; will not load. "Error contacting the Parsoid/RESTBase server (HTTP 400)"

Only Visual Editor extension is activated in LocalSettings. I have uninstalled all other extensions I added.

I removed shared server Short URL code from .htaccess and LocalSettings, and Visual Editor works again, but I've lost Short URL.

This appears to be an ongoing issue, Disappointing that I cannot find WYSIWYG editor that works consistently -https://wikipediocracy.com/forum/viewtopic.php?t=2616&start=1550 DStallTX (talk) 19:51, 13 July 2022 (UTC)

... OpenStreetMap Wiki als offener PROXY gelistet

Dein Benutzername oder deine IP-Adresse wurde von MediaWiki automatisch gesperrt. Der angegebene Grund ist:      Die IP-Adresse ist in der DNSBL von OpenStreetMap Wiki als offener PROXY gelistet.      Beginn der Sperre: 07:48, 14. Jul. 2022     Ablauf der Sperre: unbeschränkt     Sperre betrifft: 95.123.456.789  Deine aktuelle IP-Adresse ist 95.123.456.789.


Was kann nich nun tun? Obige IP ist natürlich nicht korrekt! ;-) 95.90.220.123 (talk) 07:54, 14 July 2022 (UTC)

If some website blocked certain IPs you need to contact that website. We do not maintain the user blocking rules on that website. :) Malyacko (talk) 10:25, 14 July 2022 (UTC)
Is your IP address on the list at http://www.sorbs.net/lookup.shtml ? if so, try following the sorbs process to get it delisted.
Ultimately, you should contact the open street map people, to perhaps get an exemption. Bawolff (talk) 18:50, 14 July 2022 (UTC)

unable to receive password reset mails

Hello Team,

Recently, I have migrated the mw from vm to kubernetes platform and the upgraded mw version to 1.38.1 and the application works fine with out any issues.

But when an user resets the password with email id, the mediawiki doesn't send an email to the user.

configured smtp in the localsettings.php:

$wgSMTP = [

  'host'  => ****

  'port'  => ****

  'auth'  => false

];


error from debug.log:


#26 /var/www/html/includes/MediaWiki.php(1123): DeferredUpdates::doUpdates()

#27 /var/www/html/includes/MediaWiki.php(845): MediaWiki->restInPeace()

#28 /var/www/html/includes/MediaWiki.php(588): MediaWiki->doPostOutputShutdown()

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

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

#31 {main}

[exception] [5c6daf5609c2020e642993ac] /index.php/Special:PasswordReset   PHP Fatal Error from line

48 of /var/www/html/vendor/pear/mail/Mail.php: require_once(): Failed opening required 'PEAR.php'

(include_path='/opt/www-scripts')

#0 [internal function]: MWExceptionHandler::handleFatalError()


Could you please let me know what can be wrong or any configuration i need to do on k8s level ?

Thanks

Sai Saibgs (talk) 12:27, 14 July 2022 (UTC)

I have a feeling it'll be some obsolete stuff in your LocalSettings.php. I had a similar problem when I moved server a while ago. It's nearly impossible to search this forum but I'll try...
Amazingly, I searched DuckDuckGo for "site:mediawiki.org pear Jonathan3" and it appeared as no.1: Project:Support desk/Flow/2020/11#h-$wgSMTP_and_PEAR-2020-11-20T11:25:00.000Z :-) Jonathan3 (talk) 13:47, 14 July 2022 (UTC)
Thank you Jonathan3 for your inputs, however when i try it is giving me the same error.
replaced the user details with X
UserMailer::send: sending mail to "xxx" <xxxxxxxxx>
[error] [010fc754c64d6394ce98d46f] /index.php/Special:PasswordReset   PHP Warning: require_once(PEA
R.php): failed to open stream: No such file or directory
#0 /var/www/html/vendor/pear/mail/Mail.php(48): MWExceptionHandler::handleError(integer, string, st
ring, integer, array)
#1 /var/www/html/vendor/pear/mail/Mail.php(48): require_once()
#2 /var/www/html/vendor/composer/ClassLoader.php(571): include(string)
#3 /var/www/html/vendor/composer/ClassLoader.php(428): Composer\Autoload\includeFile(string)
#4 [internal function]: Composer\Autoload\ClassLoader->loadClass(string)
#5 [internal function]: spl_autoload_call(string)
#6 /var/www/html/includes/mail/UserMailer.php(220): class_exists(string)
#7 /var/www/html/includes/mail/UserMailer.php(388): UserMailer::isMailUsable()
#8 /var/www/html/includes/mail/UserMailer.php(194): UserMailer::sendInternal(array, MailAddress, st
ring, string, array)
#9 /var/www/html/includes/user/User.php(3279): UserMailer::send(array, MailAddress, string, string,
array)
#10 /var/www/html/includes/auth/TemporaryPasswordPrimaryAuthenticationProvider.php(504): User->send
Mail(string, string)
#11 /var/www/html/includes/auth/TemporaryPasswordPrimaryAuthenticationProvider.php(338): MediaWiki\
Auth\TemporaryPasswordPrimaryAuthenticationProvider->sendPasswordResetEmail(MediaWiki\Auth\Temporar
yPasswordAuthenticationRequest)
#12 /var/www/html/includes/libs/rdbms/database/Database.php(4115): MediaWiki\Auth\TemporaryPassword
PrimaryAuthenticationProvider->MediaWiki\Auth\{closure}(integer, Wikimedia\Rdbms\DatabaseMysqli)
#13 /var/www/html/includes/libs/rdbms/loadbalancer/LoadBalancer.php(1838): Wikimedia\Rdbms\Database
->runOnTransactionIdleCallbacks(integer, array)
#14 /var/www/html/includes/libs/rdbms/loadbalancer/LoadBalancer.php(2223): Wikimedia\Rdbms\LoadBala
ncer::Wikimedia\Rdbms\{closure}(Wikimedia\Rdbms\DatabaseMysqli)
#15 /var/www/html/includes/libs/rdbms/loadbalancer/LoadBalancer.php(1839): Wikimedia\Rdbms\LoadBala
ncer->forEachOpenPrimaryConnection(Closure)
#16 /var/www/html/includes/libs/rdbms/lbfactory/LBFactory.php(348): Wikimedia\Rdbms\LoadBalancer->r
unPrimaryTransactionIdleCallbacks(string, integer)
#17 /var/www/html/includes/libs/rdbms/lbfactory/LBFactorySimple.php(145): Wikimedia\Rdbms\LBFactory
->Wikimedia\Rdbms\{closure}(Wikimedia\Rdbms\LoadBalancer)
#18 /var/www/html/includes/libs/rdbms/lbfactory/LBFactory.php(350): Wikimedia\Rdbms\LBFactorySimple
->forEachLB(Closure)
#19 /var/www/html/includes/libs/rdbms/lbfactory/LBFactory.php(317): Wikimedia\Rdbms\LBFactory->exec
utePostTransactionCallbacks()
#20 /var/www/html/includes/deferred/DeferredUpdates.php(538): Wikimedia\Rdbms\LBFactory->commitPrim
aryChanges(string)
#21 /var/www/html/includes/deferred/DeferredUpdates.php(419): DeferredUpdates::attemptUpdate(SendPa
sswordResetEmailUpdate, Wikimedia\Rdbms\LBFactorySimple)
#22 /var/www/html/includes/deferred/DeferredUpdates.php(229): DeferredUpdates::run(SendPasswordRese
tEmailUpdate, Wikimedia\Rdbms\LBFactorySimple, MediaWiki\Logger\LegacyLogger, BufferingStatsdDataFa
ctory, MediaWiki\JobQueue\JobQueueGroupFactory, string)
#23 /var/www/html/includes/deferred/DeferredUpdatesScope.php(267): DeferredUpdates::{closure}(SendP
asswordResetEmailUpdate, integer)
#24 /var/www/html/includes/deferred/DeferredUpdatesScope.php(196): DeferredUpdatesScope->processSta
geQueue(integer, integer, Closure)
#25 /var/www/html/includes/deferred/DeferredUpdates.php(250): DeferredUpdatesScope->processUpdates(
integer, Closure)
#26 /var/www/html/includes/MediaWiki.php(1123): DeferredUpdates::doUpdates()
#27 /var/www/html/includes/MediaWiki.php(845): MediaWiki->restInPeace()
#28 /var/www/html/includes/MediaWiki.php(588): MediaWiki->doPostOutputShutdown()
#29 /var/www/html/index.php(53): MediaWiki->run()
#30 /var/www/html/index.php(46): wfIndexMain()
#31 {main}
[exception] [010fc754c64d6394ce98d46f] /index.php/Special:PasswordReset   PHP Fatal Error from line
48 of /var/www/html/vendor/pear/mail/Mail.php: require_once(): Failed opening required 'PEAR.php'
(include_path='/opt/www-scripts')
#0 [internal function]: MWExceptionHandler::handleFatalError()
#1 {main} Saibgs (talk) 15:41, 14 July 2022 (UTC)
What did you try?
The error messages never mean anything to me, sorry :-) Jonathan3 (talk) 17:51, 14 July 2022 (UTC)
It sounds like you are missing vendor dependencies. Normally these (in particular /var/www/html/vendor/pear/mail/Mail.php) should be included with mediawiki.
You could try running composer install to redownload the dependency, or you could try redownloading the tarball to get the missing files. Bawolff (talk) 18:47, 14 July 2022 (UTC)
For me the files were there but LocalSettings was wrongly setting some path variable... Jonathan3 (talk) 22:10, 14 July 2022 (UTC)
Oh, you're right, i misread the error. It does not appear the vendor dependency is missing so much as PEAR.php is not in the php include_path. Bawolff (talk) 22:45, 14 July 2022 (UTC)
@Jonathan3
I have tried setting the config in Localsettings as below after reading from your old ticket.
$path = array( $IP, "$IP/includes", "$IP/languages", "$IP/vendor/pear/pear-core-minimal/src/", "$IP/vendor/pear/net_socket", "$IP/vendor/pear/mail");
I even added extra last bit (*/mail/). and tried to reset the password then i got the above pasted error.
@Bawolff, i can see the file exist in the path you mentioned:
root@mediawiki-77f5b85c66-hl4vd:/var/www/html/vendor/pear/mail# ls -ltr
total 36
-rw-rw-r--. 1 root root 3201 Jun 23  2020 package.xml
-rw-rw-r--. 1 root root 1163 Jun 23  2020 composer.json
-rw-rw-r--. 1 root root 1122 Jun 23  2020 README.rst
-rw-rw-r--. 1 root root 9878 Jun 23  2020 Mail.php
-rw-rw-r--. 1 root root 1506 Jun 23  2020 LICENSE
drwxrwxr-x. 1 root root 4096 Jul 13 03:31 tests
drwxrwxr-x. 1 root root 4096 Jul 13 03:31 Mail
root@mediawiki-77f5b85c66-hl4vd:/var/www/html/vendor/pear/mail#
what exactly i need to pass to include path ? Saibgs (talk) 07:30, 15 July 2022 (UTC)
Add the line set_include_path(get_include_path() . PATH_SEPARATOR . $path); immediately after the line with $path you mentioned last post.
I was wrong about the missing file comment. Please ignore that part of my post. Bawolff (talk) 07:37, 15 July 2022 (UTC)
below is config i have and added your suggested line and same error, am i giving it wrong:
$path = array( $IP, "$IP/includes", "$IP/languages", "$IP/vendor/pear/pear-core-minimal/src/", "$IP/vendor/pear/net_socket", "$IP/vendor/pear/mail");
set_include_path(get_include_path() . PATH_SEPARATOR . $path);
#26 /var/www/html/includes/MediaWiki.php(1123): DeferredUpdates::doUpdates()
#27 /var/www/html/includes/MediaWiki.php(845): MediaWiki->restInPeace()
#28 /var/www/html/includes/MediaWiki.php(588): MediaWiki->doPostOutputShutdown()
#29 /var/www/html/index.php(53): MediaWiki->run()
#30 /var/www/html/index.php(46): wfIndexMain()
#31 {main}
[exception] [b09f12ba326a0f49581fae4d] /index.php/Special:PasswordReset   PHP Fatal Error from line
48 of /var/www/html/vendor/pear/mail/Mail.php: require_once(): Failed opening required 'PEAR.php'
(include_path='/opt/www-scripts:Array')
#0 [internal function]: MWExceptionHandler::handleFatalError()
#1 {main} Saibgs (talk) 08:44, 15 July 2022 (UTC)
Read the whole of the other support ticket to the end AND the one linked from it.
The answer wasn't to add the $path= line.
It was to delete obsolete stuff from LocalSettings.php
When we upgrade Mwdiawiki there is no way of knowing what to remove or add to LocalSettings.php.
Sometimes old stuff breaks things. I think this is one of those times.
I guess the path is now set by DefaultSettings.php Jonathan3 (talk) 08:50, 15 July 2022 (UTC)
Whoops, im sorry, the line i gave you should have been
set_include_path(get_include_path() . PATH_SEPARATOR . implode(PATH_SEPERATOR, $path));
Since $path is an array in the example we are using, so it needs the implode.
Apologies that i keep being careless and saying the wrong thing.
I would add, that Johnathan is also right. Somewhere along the line the include path appears to have been changed from the default. One way to fix that is to reset it back to the way it should be,but an even better solution is to remove whatever is setting it to the wrong value in the first place, so if there is something calling set_include_path in localsettings it probably makes sense just to delete everything messing with include path. Bawolff (talk) 09:21, 15 July 2022 (UTC)
That's all okay , no need to apologise.
okay i will try that setting again and see how it goes.
Also, in the first place the Localsettings file doesn't have any $path and only set_include_path is there that for db config
set_include_path('/opt/www-scripts');
require_once "/opt/www-scripts/secure.php";
thanks @Jonathan3 Saibgs (talk) 09:50, 15 July 2022 (UTC)
Does your secure.php contain your database credentials?
If yes - I do it that way too. I don't think you need the set_include_path for that - the require_once line should be enough.
If no - ignore this :-) Jonathan3 (talk) 10:04, 15 July 2022 (UTC)
Yes, it has the db creds.
Sure, i updated that. Thanks.
@Bawolff, I have tried with the suggested change but no luck :-(
I get this warning over my MW UI.
Warning: implode(): Invalid arguments passed in /var/www/html/LocalSettings.php on line 242
Warning: session_name(): Cannot change session name when headers already sent in /var/www/html/includes/Setup.php on line 863
Warning: session_id(): Cannot change session id when headers already sent in /var/www/html/includes/session/SessionBackend.php on line 818
Warning: session_id(): Cannot change session id when headers already sent in /var/www/html/includes/Setup.php on line 911
Warning: session_start(): Cannot start session when headers already sent in /var/www/html/includes/Setup.php on line 912
Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/LocalSettings.php:242) in /var/www/html/includes/WebResponse.php on line 75
Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/LocalSettings.php:242) in /var/www/html/includes/WebResponse.php on line 75
Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/LocalSettings.php:242) in /var/www/html/includes/WebResponse.php on line 75 Saibgs (talk) 10:52, 15 July 2022 (UTC)
Don't add that line. Just delete the unnecessary stuff. What happens then? Jonathan3 (talk) 12:12, 15 July 2022 (UTC)
it works now, i think the issue is because of having this line from beginning :
set_include_path('/opt/www-scripts');
i removed that and by keeping smtp config and it fixed the issue.
Thank you @Jonathan3 and @Bawolff for your assistance throughout the issue. Saibgs (talk) 13:24, 15 July 2022 (UTC)

UNIQ--pre-00000003-QINU Error

Hey guys

I have the problem, that my {{File|path/to/file||<pre> text </pre>}} won't show correctly.

It only shows ?'"`UNIQ--pre-00000003-QINU`"'?instead of the the text..

Has anyone a idea what extension could be missing or what i could do to fix this.

I have Mediawiki 1.31 installed and can't upgrade.

Thanks for any help TheHunter52 (talk) 13:06, 14 July 2022 (UTC)

The Template:File is available.
But I could not paste those in here. TheHunter52 (talk) 13:14, 14 July 2022 (UTC)
Some people use https://pastebin.com/ - that might help. Jonathan3 (talk) 13:44, 14 July 2022 (UTC)
Hi @Jonathan3
Thanks for your answer, but im searching for an solution not an alternativ. Because there are hunderts of these errors, it appeard after a migration form 1.24 to 1.31.
The old 1.24 is gone, so I cant compare it to the new one. All extensions from the old wiki are on the new one. TheHunter52 (talk) 15:41, 14 July 2022 (UTC)
I meant you could put the contents of the template there. Jonathan3 (talk) 17:16, 14 July 2022 (UTC)
So sometimes this can happen if extensions have a bug and they double parse text.
In other cases, this can happen when using {{#tag: or lua when half-parsed wikitext is placed in a place where it isn't really supported.
It would help to know the contents of the template. Bawolff (talk) 18:42, 14 July 2022 (UTC)

Cannt get access to email

My email has changed, cannot recover password.


What to do? 199.47.252.225 (talk) 13:47, 14 July 2022 (UTC)

Can you prove beyond a shadow of a doubt that the account belongs to you (And what website is this account for? Is it a Wikimedia (not just mediawiki) site?) Bawolff (talk) 18:40, 14 July 2022 (UTC)

fieldset div in MediaWiki / templates with html

Hello,


I'm about to start a new website with MediaWiki soon, after 8 years of abstinence.

Using templates and semantic forms are essential for my concept.

I've made a prototype site which I was going to translate into a template now. It's this site: https://www.oddballwiki.com/index.php?title=Pisces_testivorus

While adding variables etc I quickly realized that I'd run into some major problems. The whole protype was inside an html tag. So, if I was adding variables via {{BlaBla}}" in there, they won't work, because they are all inside those html tag(s). I could've made a really ugly workaround by closing the html tag right before every variable and open it right after, but I think that's not the way to go and it led into new problems. Fist problem was, that changes in the template won't be overwritten within sites, using this template. Until I edit those sites and save them without changing anything. This was probably because of html tags...


So I think, there must be another way. And the best way to change this misery, is to translate this site in MediaWiki supportive code without any html tags. I think it will be no problem, except for the divs with fieldset. So if you look at the site - I mean those borders around "general information" or "water conditions". I really want that style (border, without closing near the title), but I didn't find any solution to do that inside MediaWiki without using html tags. Or I'm just too stupid to figure it out! ;-)

Is there any way to solve my problem and recreate those fieldset divs in MediaWiki only?

Thank you! Mike Raspuli (talk) 14:01, 14 July 2022 (UTC)

> Fist problem was, that changes in the template won't be overwritten within sites, using this template
I suspect this is unrelated to raw html tags (provided of course the template parameters are outside of them). Maybe something wrong with the job queue.
As to the more general question, i don't think you can add fieldset with native mediawiki (Although its possible there are extensions which might help). You might be able to emulate with div's and css, although that's not nice. Bawolff (talk) 18:39, 14 July 2022 (UTC)
It might be a sledgehammer to crack a nut but if you use the Widgets extension you could use the HTML fieldset tag. Jonathan3 (talk) 12:15, 15 July 2022 (UTC)

hitting 'Accept changes' greys out the page just hangs.

Hello Team,

After migrating mw from vm to k8s platform, content and db was restored from 1.33v to 1.38.1. one of user the was unable to "accept revision " under "review this session". it just page hangs and never responses back.

is there anything i need set in the configuration or i miss anything?

from logs: i can see there some 403 errors :

POST /rest.php/flaggedrevs/internal/review/Main_Page HTTP/1.1" 403 199 "https:/xxxxxxxxxxxx?title=Main_Page&curid=1&diff=56261&oldid=49083" " Saibgs (talk) 16:33, 14 July 2022 (UTC)

Can you look in browser network tab when reviewing a page to see what the response body is of the API response? Bawolff (talk) 18:36, 14 July 2022 (UTC)
this is fixed now, it looks like the problem is don't have comments extensions installed and passing empty string in comment field and accept revision doesn't get submitted and hangs in there.... after adding comments extensions, i was able to submit the accept revision. Saibgs (talk) 07:34, 15 July 2022 (UTC)

How to prevent Import and Version except for sysop?

I am getting this error in my v1.38: [14-Jul-2022 23:30:33 America/Chicago] PHP Deprecated: Use of $wgUser was deprecated in MediaWiki 1.35. [Called from MediaWiki\HookContainer\HookContainer::callLegacyHook in /includes/HookContainer/HookContainer.php at line 338] in /includes/debug/MWDebug.php on line 377 [14-Jul-2022 23:30:33 America/Chicago] PHP Deprecated: $wgUser reassignment detected [Called from MediaWiki\HookContainer\HookContainer::callLegacyHook in /includes/HookContainer/HookContainer.php at line 338] in /includes/debug/MWDebug.php on line 377

I guess this should be because of this code in my LocalSetting.php?

// Disable Export/Version SpecialPages and some Api.
function disableSomeSpecialPages(&$list)
{
  global $wgUser;
  if (!in_array('sysop', $wgUser->getGroups()))
  {
      unset( $list['Version'] );
      unset( $list['Export'] );
      unset( $list['Import'] );
      $wgAPIModules['delete'] = 'ApiDisabled';
      $wgAPIModules['edit'] = 'ApiDisabled';
      $wgAPIModules['unprotect'] = 'ApiDisabled';
  }
  return true;
}
$wgHooks['SpecialPage_initList'][] = 'disableSomeSpecialPages';
// End disable Export/Version SpecialPages.

I searched the manual and found the appropriate code to prevent export except for sysop here: https://www.mediawiki.org/wiki/Manual:Parameters_to_Special:Export

But how can I prevent Import and Version except for sysop too? Farvardyn (talk) 08:05, 15 July 2022 (UTC)

Two Menu Options Corrupt or Different Langauge

Hi,

When I am logged into MediaWiki and viewing a page, the options at the top:

main page : edit : history : delete : move : protect : watch

For some reason my options are:

main page : edit : history : twa mu : move : bo ho ban : watch

Any ideas as to why my options are displaying incorreclty? My intial thought is my site was hacked but I see no other problems. When you move the mouse over the option "twa mu" the tip does show "Delete this page [altr-shift-d]" Dklavo (talk) 12:11, 15 July 2022 (UTC)

What is your language set to? (Look in Special:preferences ) Bawolff (talk) 13:01, 15 July 2022 (UTC)
Language is set to "en-GB - British English"
Version 1.38.2 I don't recall seeing the menu options like this when I upgraded but I could be wrong just not noticing. Dklavo (talk) 00:12, 16 July 2022 (UTC)
Interesting. Changing to "en - English" fixed the problem and then changing back to en-GB brought the problem back. Must be a bug with the language en-GB. Dklavo (talk) 00:15, 16 July 2022 (UTC)
Its possible for translations to be changed on wiki. Are there edits to the mediawiki namespace (especially to /en-gb subpages) on the wiki you are using (i assume you are not talking about this wiki) Bawolff (talk) 06:28, 16 July 2022 (UTC)

Patching question

Hello,


I have a MW 1.35.6 install that I am looking to patch to the recent 1.35.7. I was able to run the patch file on a bare-bones test install without issue. However, attempting to install the patch on a 'production' MW site I am getting the below output from a dry-run.


I elipsized a bunch of the output of checks as it was quite long. There are a few failed HUNKs in the output. Seems to be related to the WikiEditor extension?


Just looking for another pair of eyes with experience if this is stuff that can be patched on a full run without concern? I'm not very experienced with this type of output from a 'patch' command

MW - 1.35.6

PHP - 7.4.3

DB - 5.5.68-MariaDB


patch -p1 --dry-run -i mediawiki-1.35.7.patch

checking file composer.json

checking file extensions/CategoryTree/composer.json

checking file extensions/CategoryTree/i18n/api/hi.json

checking file extensions/CategoryTree/i18n/api/id.json

checking file extensions/CategoryTree/i18n/api/ksh.json

checking file extensions/CategoryTree/i18n/*

...

checking file extensions/Cite/composer.json

checking file extensions/Cite/i18n/*

...

checking file extensions/Cite/modules/ve-cite/i18n/*

...

checking file extensions/CiteThisPage/composer.json

checking file extensions/CiteThisPage/i18n/*

...

checking file extensions/CodeEditor/composer.json

checking file extensions/CodeEditor/i18n/fr.json

checking file extensions/ConfirmEdit/composer.json

checking file extensions/ConfirmEdit/FancyCaptcha/i18n/*

...

checking file extensions/ConfirmEdit/hCaptcha/i18n/es.json

checking file extensions/ConfirmEdit/hCaptcha/i18n/fr.json

checking file extensions/ConfirmEdit/i18n/*

...

checking file extensions/ConfirmEdit/QuestyCaptcha/i18n/*

...

checking file extensions/ConfirmEdit/ReCaptchaNoCaptcha/i18n/fa.json

checking file extensions/ConfirmEdit/ReCaptchaNoCaptcha/i18n/fr.json

checking file extensions/ConfirmEdit/ReCaptchaNoCaptcha/i18n/fy.json

checking file extensions/Gadgets/composer.json

checking file extensions/Gadgets/i18n/*

...

checking file extensions/Gadgets/includes/MediaWikiGadgetsDefinitionRepo.php

checking file extensions/Gadgets/includes/SpecialGadgets.php

checking file extensions/ImageMap/composer.json

checking file extensions/ImageMap/i18n/*

...

checking file extensions/InputBox/composer.json

checking file extensions/InputBox/i18n/*

...

checking file extensions/Interwiki/composer.json

checking file extensions/Interwiki/i18n/*

...

checking file extensions/LocalisationUpdate/composer.json

checking file extensions/MultimediaViewer/composer.json

checking file extensions/MultimediaViewer/i18n/*

...

checking file extensions/Nuke/composer.json

checking file extensions/Nuke/extension.json

checking file extensions/Nuke/i18n/*

...

checking file extensions/OATHAuth/composer.json

checking file extensions/OATHAuth/i18n/api/*

...

checking file extensions/OATHAuth/src/Hook/HookHandler.php

checking file extensions/PageImages/composer.json

checking file extensions/ParserFunctions/composer.json

checking file extensions/ParserFunctions/i18n/*

...

checking file extensions/PdfHandler/composer.json

checking file extensions/PdfHandler/i18n/*

...

checking file extensions/Poem/composer.json

checking file extensions/Poem/i18n/be.json

checking file extensions/Poem/i18n/mt.json

checking file extensions/Renameuser/composer.json

checking file extensions/Renameuser/i18n/*

...

checking file extensions/ReplaceText/composer.json

checking file extensions/ReplaceText/i18n/fa.json

checking file extensions/ReplaceText/i18n/smn.json

checking file extensions/Scribunto/composer.json

checking file extensions/Scribunto/i18n/*

...

checking file extensions/SecureLinkFixer/composer.json

checking file extensions/SpamBlacklist/composer.json

checking file extensions/SpamBlacklist/i18n/be.json

checking file extensions/SpamBlacklist/i18n/sr-ec.json

checking file extensions/SyntaxHighlight_GeSHi/composer.json

checking file extensions/SyntaxHighlight_GeSHi/i18n/be.json

checking file extensions/SyntaxHighlight_GeSHi/i18n/sms.json

checking file extensions/SyntaxHighlight_GeSHi/i18n/sr-ec.json

checking file extensions/TemplateData/composer.json

checking file extensions/TemplateData/i18n/*

...

checking file extensions/TextExtracts/composer.json

checking file extensions/TitleBlacklist/composer.json

checking file extensions/VisualEditor/i18n/ve-mw/anp.json

checking file extensions/VisualEditor/i18n/ve-mw/*

...

checking file extensions/VisualEditor/includes/VisualEditorHooks.php

checking file extensions/WikiEditor/composer.json

Reversed (or previously applied) patch detected!  Assume -R? [n]

Apply anyway? [n]

Skipping patch.

2 out of 2 hunks ignored

checking file extensions/WikiEditor/i18n/aln.json

Reversed (or previously applied) patch detected!  Assume -R? [n]

Apply anyway? [n]

Skipping patch.

3 out of 3 hunks ignored

checking file extensions/WikiEditor/i18n/an.json

Reversed (or previously applied) patch detected!  Assume -R? [n]

Apply anyway? [n]

Skipping patch.

3 out of 3 hunks ignored

checking file extensions/WikiEditor/i18n/arz.json

Reversed (or previously applied) patch detected!  Assume -R? [n]

Apply anyway? [n]

Skipping patch.

2 out of 2 hunks ignored

checking file extensions/WikiEditor/i18n/as.json

Reversed (or previously applied) patch detected!  Assume -R? [n]

Apply anyway? [n]

Skipping patch.

2 out of 2 hunks ignored

The next patch would create the file extensions/WikiEditor/i18n/awa.json,

which already exists!  Assume -R? [n]

Apply anyway? [n]

Skipping patch.

1 out of 1 hunk ignored

checking file extensions/WikiEditor/i18n/azb.json

Reversed (or previously applied) patch detected!  Assume -R? [n]

Apply anyway? [n]

Skipping patch.

4 out of 4 hunks ignored

checking file extensions/WikiEditor/i18n/az.json

Reversed (or previously applied) patch detected!  Assume -R? [n]

Apply anyway? [n]

Skipping patch.

2 out of 2 hunks ignored

checking file extensions/WikiEditor/i18n/be.json

Hunk #1 FAILED at 7.

Hunk #2 FAILED at 50.

Hunk #3 FAILED at 103.

Hunk #4 FAILED at 113.

Hunk #5 FAILED at 153.

Hunk #6 FAILED at 178.

6 out of 6 hunks FAILED

checking file extensions/WikiEditor/i18n/bjn.json

Reversed (or previously applied) patch detected!  Assume -R? [n]

Apply anyway? [n]

Skipping patch.

2 out of 2 hunks ignored

checking file extensions/WikiEditor/i18n/bpy.json

Reversed (or previously applied) patch detected!  Assume -R? [n]

Apply anyway? [n]

Skipping patch.

2 out of 2 hunks ignored

checking file extensions/WikiEditor/i18n/br.json

Reversed (or previously applied) patch detected!  Assume -R? [n]

Apply anyway? [n]

Skipping patch.

3 out of 3 hunks ignored

checking file extensions/WikiEditor/i18n/ckb.json

Hunk #3 FAILED at 50.

Hunk #5 FAILED at 119.

2 out of 6 hunks FAILED

checking file extensions/WikiEditor/i18n/eo.json

Reversed (or previously applied) patch detected!  Assume -R? [n]

Apply anyway? [n]

Skipping patch.

2 out of 2 hunks ignored

checking file extensions/WikiEditor/i18n/fa.json

Reversed (or previously applied) patch detected!  Assume -R? [n]

Apply anyway? [n]

Skipping patch.

5 out of 5 hunks ignored

checking file extensions/WikiEditor/i18n/fr.json

Reversed (or previously applied) patch detected!  Assume -R? [n]

Apply anyway? [n]

Skipping patch.

6 out of 6 hunks ignored

checking file extensions/WikiEditor/i18n/frp.json

Reversed (or previously applied) patch detected!  Assume -R? [n]

Apply anyway? [n]

Skipping patch.

2 out of 2 hunks ignored

checking file extensions/WikiEditor/i18n/gv.json

Reversed (or previously applied) patch detected!  Assume -R? [n]

Apply anyway? [n]

Skipping patch.

2 out of 2 hunks ignored

checking file extensions/WikiEditor/i18n/he.json

Reversed (or previously applied) patch detected!  Assume -R? [n]

Apply anyway? [n]

Skipping patch.

2 out of 2 hunks ignored

checking file extensions/WikiEditor/i18n/hy.json

Reversed (or previously applied) patch detected!  Assume -R? [n]

Apply anyway? [n]

Skipping patch.

2 out of 2 hunks ignored

checking file extensions/WikiEditor/i18n/id.json

Reversed (or previously applied) patch detected!  Assume -R? [n]

Apply anyway? [n]

Skipping patch.

3 out of 3 hunks ignored

checking file extensions/WikiEditor/i18n/ka.json

Reversed (or previously applied) patch detected!  Assume -R? [n]

Apply anyway? [n]

Skipping patch.

5 out of 5 hunks ignored

checking file extensions/WikiEditor/i18n/krc.json

Reversed (or previously applied) patch detected!  Assume -R? [n]

Apply anyway? [n]

Skipping patch.

2 out of 2 hunks ignored

checking file extensions/WikiEditor/i18n/ks-arab.json

checking file extensions/WikiEditor/i18n/ksh.json

Reversed (or previously applied) patch detected!  Assume -R? [n]

Apply anyway? [n]

Skipping patch.

2 out of 2 hunks ignored

checking file extensions/WikiEditor/i18n/kw.json

Reversed (or previously applied) patch detected!  Assume -R? [n]

Apply anyway? [n]

Skipping patch.

2 out of 2 hunks ignored

checking file extensions/WikiEditor/i18n/ky.json

Reversed (or previously applied) patch detected!  Assume -R? [n]

Apply anyway? [n]

Skipping patch.

2 out of 2 hunks ignored

checking file extensions/WikiEditor/i18n/la.json

Reversed (or previously applied) patch detected!  Assume -R? [n]

Apply anyway? [n]

Skipping patch.

2 out of 2 hunks ignored

checking file extensions/WikiEditor/i18n/lv.json

Reversed (or previously applied) patch detected!  Assume -R? [n]

Apply anyway? [n]

Skipping patch.

2 out of 2 hunks ignored

The next patch would create the file extensions/WikiEditor/i18n/mni.json,

which already exists!  Assume -R? [n]

Apply anyway? [n]

Skipping patch.

1 out of 1 hunk ignored

The next patch would create the file extensions/WikiEditor/i18n/ms-arab.json,

which already exists!  Assume -R? [n]

Apply anyway? [n]

Skipping patch.

1 out of 1 hunk ignored

checking file extensions/WikiEditor/i18n/nah.json

Reversed (or previously applied) patch detected!  Assume -R? [n]

Apply anyway? [n]

Skipping patch.

5 out of 5 hunks ignored

The next patch would create the file extensions/WikiEditor/i18n/nqo.json,

which already exists!  Assume -R? [n]

Apply anyway? [n]

Skipping patch.

1 out of 1 hunk ignored

checking file extensions/WikiEditor/i18n/qqq.json

Reversed (or previously applied) patch detected!  Assume -R? [n]

Apply anyway? [n]

Skipping patch.

2 out of 2 hunks ignored

checking file extensions/WikiEditor/i18n/ru.json

Reversed (or previously applied) patch detected!  Assume -R? [n]

Apply anyway? [n]

Skipping patch.

2 out of 2 hunks ignored

checking file extensions/WikiEditor/i18n/sd.json

Reversed (or previously applied) patch detected!  Assume -R? [n]

Apply anyway? [n]

Skipping patch.

2 out of 2 hunks ignored

checking file extensions/WikiEditor/i18n/sms.json

Reversed (or previously applied) patch detected!  Assume -R? [n]

Apply anyway? [n]

Skipping patch.

1 out of 1 hunk ignored

checking file extensions/WikiEditor/i18n/ti.json

Reversed (or previously applied) patch detected!  Assume -R? [n]

Apply anyway? [n]

Skipping patch.

1 out of 1 hunk ignored

checking file extensions/WikiEditor/i18n/tr.json

Reversed (or previously applied) patch detected!  Assume -R? [n]

Apply anyway? [n]

Skipping patch.

2 out of 2 hunks ignored

checking file extensions/WikiEditor/i18n/uz.json

Reversed (or previously applied) patch detected!  Assume -R? [n]

Apply anyway? [n]

Skipping patch.

7 out of 7 hunks ignored

checking file extensions/WikiEditor/i18n/zh-hans.json

Reversed (or previously applied) patch detected!  Assume -R? [n]

Apply anyway? [n]

Skipping patch.

2 out of 2 hunks ignored

checking file extensions/WikiEditor/i18n/zh-hant.json

Reversed (or previously applied) patch detected!  Assume -R? [n]

Apply anyway? [n]

Skipping patch.

4 out of 4 hunks ignored

checking file includes/api/ApiBase.php

checking file includes/api/i18n/*

...

checking file includes/api/i18n/zh-hant.json

checking file includes/changetags/ChangeTags.php

checking file includes/debug/DeprecatablePropertyArray.php

checking file includes/Defines.php

checking file includes/FormOptions.php

checking file includes/import/WikiImporter.php

checking file includes/installer/i18n/*

...

checking file includes/libs/filebackend/FileBackend.php

checking file includes/libs/objectcache/APCUBagOStuff.php

checking file includes/libs/objectcache/WinCacheBagOStuff.php

checking file includes/libs/ParamValidator/i18n/en-gb.json

checking file includes/logging/LogPager.php

checking file includes/MediaWiki.php

checking file includes/Rest/i18n/it.json

checking file includes/Rest/i18n/pt.json

checking file includes/session/CookieSessionProvider.php

checking file includes/session/Session.php

checking file includes/skins/SkinTemplate.php

checking file includes/specialpage/ChangesListSpecialPage.php

checking file includes/specials/SpecialCreateAccount.php

checking file includes/specials/SpecialEditWatchlist.php

checking file includes/specials/SpecialRecentChangesLinked.php

checking file includes/specials/SpecialRecentChanges.php

checking file includes/specials/SpecialUserLogout.php

checking file includes/specials/SpecialWatchlist.php

checking file includes/TemplateParser.php

checking file languages/i18n/*

...

checking file maintenance/addSite.php

checking file RELEASE-NOTES-1.35

checking file resources/Resources.php

checking file skins/MonoBook/i18n/*

...

checking file skins/Timeless/composer.json

checking file skins/Timeless/i18n/*

...

checking file skins/Vector/composer.json

checking file skins/Vector/i18n/*

...

checking file tests/phpunit/includes/changetags/ChangeTagsTest.php

checking file tests/phpunit/includes/specials/SpecialUserLogoutTest.php

checking file vendor/composer/autoload_classmap.php

checking file vendor/composer/*

...

checking file vendor/composer/include_paths.php

checking file vendor/composer/installed.json

checking file vendor/composer/installed.php

checking file vendor/composer/InstalledVersions.php

checking file vendor/composer.json

checking file vendor/composer.lock

checking file vendor/guzzlehttp/guzzle/CHANGELOG.md

checking file vendor/guzzlehttp/guzzle/composer.json

checking file vendor/guzzlehttp/guzzle/LICENSE

checking file vendor/guzzlehttp/guzzle/README.md

checking file vendor/guzzlehttp/guzzle/src/Cookie/CookieJar.php

checking file vendor/guzzlehttp/guzzle/src/Cookie/SetCookie.php

checking file vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php

checking file vendor/guzzlehttp/psr7/CHANGELOG.md

checking file vendor/guzzlehttp/psr7/composer.json

checking file vendor/guzzlehttp/psr7/README.md

checking file vendor/guzzlehttp/psr7/src/UriComparator.php

checking file vendor/README.md Alongaks (talk) 14:34, 15 July 2022 (UTC)

Sounds like you had previously updated wikieditor, so you cant path it as you have a different starting version than the rest of mediawiki. Bawolff (talk) 20:58, 15 July 2022 (UTC)
Thanks, Bawolff. Appreciate the reply. That indeed was the issue. Not sure how/why but I fixed it by syncing the contents of the WikiEditor extension from the 1.35.6 that was fine with the patch. Then re-ran the failed dry-run and all good. Was able to get the remainder resolved with the same issue.
Thanks again. Alongaks (talk) 18:05, 18 July 2022 (UTC)

New Account Issues

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


I created a new account, my first account, and I got an error, Somehow my account was created anyway. I can login but I cannot confirm my email address. Trying it in two different browsers the button just takes me to a white screen or in Chrome it says HTTP ERROR 500. I cannot do much of anything without confirming my email address first and I can't. Any help would be much appreciated. My username is Andromos and the site is Bulbapedia. 2601:409:8502:6FA0:BD15:198C:8E77:671 (talk) 22:20, 15 July 2022 (UTC)

You'd have to talk to bulbapedia admins Bawolff (talk) 23:33, 15 July 2022 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Position of the table of contents in Vector 2022 skin

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


I've upgraded my MediaWiki version to 1.38.1 for a wiki site of my own. I also manually updated the Vector skin to the latest version. But it seems the layout, while changed a lot, is still a bit different from the one appears on this site.

One difference is that the "table of contents" still appears on the old position like the legacy Vector but not floating in the side bar like Mediawiki.org.

What am I missing? A-lú-mih (talk) 02:32, 16 July 2022 (UTC)

I just found out it is something under testing. Reading/Web/Desktop Improvements/Features A-lú-mih (talk) 03:38, 16 July 2022 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Make a wiki private - group only and how to stop all bots from indexing.

Make a wiki private - group only and how to stop all bots from indexing.


HI, we just downloaded and installed this, and would like to know how to make it private to our group only, and stop all bots from indexing it.


Your help would be greatly appreciated.


Thanks Wmh-2121 (talk) 12:50, 16 July 2022 (UTC)

To make your wiki private, select Ask me more questions in the installation and select Private wiki. If the wiki is already installed, see Manual:$wgGroupPermissions if useful. 105.105.150.76 (talk) 12:58, 16 July 2022 (UTC)

How do I change my phabricator username

I don't like my current phabricator username. How can I change it? Q28 (talk) 04:28, 17 July 2022 (UTC)

Hi, this is the MediaWiki Support desk for MediaWiki questions. For questions about Phabricator instead of MediaWiki, see Phabricator/Help instead (which is linked from the Phabricator frontpage at phabricator.wikimedia.org). Malyacko (talk) 06:28, 17 July 2022 (UTC)

New MediaWiki Install not using any template

I just installed MediaWiki to a subdomain and it loads without any page formatting. Doesn't appear that a template is being used. I chose MonoBook during the LocalSettings.php file creation. 49.186.81.208 (talk) 08:29, 17 July 2022 (UTC)

Usually this is a problem with load.php endpoint. Does your php error log say anything? Are there errors in browser developer console? Bawolff (talk) 09:26, 17 July 2022 (UTC)
You are right.
Dev Console says:
[Intervention] Images loaded lazily and replaced with placeholders. Load events are deferred. See bugs.chromium.org/p/chromium/issues/detail?id=846170
index.php :138
And:
Failed to load resource: the server responded with a status of 500 () 49.186.81.208 (talk) 09:32, 17 July 2022 (UTC)
For that last error, it referenced load.php:1 49.186.81.208 (talk) 09:33, 17 July 2022 (UTC)
error log has the following:
Premature end of script headers
Could it be a file/folder permission issue? 49.186.81.208 (talk) 10:46, 17 July 2022 (UTC)
unlikely to be a permission error. Do you have php error logging enabled? (See how to debug).
Also try visiting the url giving the 500 error directly in browser to see if any errors are output. Bawolff (talk) 11:55, 17 July 2022 (UTC)

Disabling copy and paste with jQuery

Hi, I am an absolute noob to programming. I am trying to figure out how to disable the copy function on my wiki so people visiting it cannot copy text. (Yes, this will not prevent stealing, but I want to at least make it a little harder.)


I understand that disabling copy and paste can be done with jQuery, but that's about where my knowledge of programming stops, though, as I have no idea how to actually do it.


If this is possible please let me know how (and explain it to me like I'm five). Domachroma (talk) 20:32, 17 July 2022 (UTC)

Hi, this seems to be unrelated to MediaWiki itself, so it is off-topic here. See pages like https://www.quora.com/How-do-I-protect-the-text-from-being-copied-and-pasted-from-my-website or https://stackoverflow.com/questions/3020715/disabling-copy-paste-in-a-web-page or https://codehasbug.com/tutorial/disable-enable-copy-and-paste-on-website/ or whatever other results your favorite internet search may provide. Thanks. Malyacko (talk) 11:53, 18 July 2022 (UTC)
You could add whatever you come up with to the page MediWiki:Common.js Jonathan3 (talk) 23:27, 18 July 2022 (UTC)

if page is in mainspace do

Dear ∀,

How can I set the condition within a template that command C should be executed iff the template is called within a mainspace page (without excluding each other possibility individually)

Thank you in advance.

Yours, Ciciban (talk) 12:57, 18 July 2022 (UTC)

Generally you would use extension:ParserFunctions and something like {{#ifeq:{{NAMESPACE}}||stuff to do if main namespace|other namespace}}
See also help:extension:ParserFunctions and help:magic Words Bawolff (talk) 14:58, 18 July 2022 (UTC)

How can I make an external image a clickable link to an external URL?

I have $wgAllowExternalImages = true so I can insert external image links inline.

But how can I then make the external image link clickable to an external URL?

I've tried surrounding external image link with single brackets and adding |link=https://externalURL.com after it, but then external image doesn't display, and a [1] shows up with expandable thumb image icon.

When I click on those, I get error message -

This XML file does not appear to have any style information associated with it. The document tree is shown below.

<Error>

<Code>NoSuchKey</Code>

<Message>The specified key does not exist.</Message>

<Key>

e/externalimage.jpg|link=https://www.externalURL.com/

</Key>

<RequestId>2W596RBQKY99WRRD</RequestId>

<HostId>

d4gZBiRa31yFj6paIUVcACJMUqmu/cTNsTARMku8ld6PsrNx5ByWrzr2N1rwbhFL0+M4QBdFTDc=

</HostId>

</Error> DStallTX (talk) 13:18, 18 July 2022 (UTC)

I think you just use
[http://link.url http://image.url] Jonathan3 (talk) 23:25, 18 July 2022 (UTC)

Allowing HTML Does Not Work

I'm the sole admin for my wiki and want to use HTML, but after adding $wgRawHtml = true; to LocalSettings I still can't use HTML.

I've tried using iframe and video tags and neither work.

All I get is a text link for the video URL and text for the rest of HTML code. DStallTX (talk) 15:28, 18 July 2022 (UTC)

it is safe as long as you trust everyone with edit access.
Assume that raw html allows anyone who edits the wiki to take over anyone else's account. Bawolff (talk) 15:30, 18 July 2022 (UTC)
I enabled HTML and it doesn't work. How do I troubleshoot that?
I've tried using iframe and video tags and neither work.
All I get is a text link for the video URL and text for the rest of HTML code. DStallTX (talk) 15:44, 18 July 2022 (UTC)
Never mind. Forgot to surround with HTML and body tags. Now it works. DStallTX (talk) 16:49, 18 July 2022 (UTC)

Formatting Collection PDF output tables

Hello,


I have setup the Collections extension in my mediawiki page but when I print as pdf it has no format for any of the tables I'm trying to output. Does anyone know where to go to make sure the format matches the wiki page? Cval4545 (talk) 19:23, 18 July 2022 (UTC)

How can I use VisualEditor in ver1.38.2?

I know many people have trouble using VisualEditor. I spent half a day doing google and couldn't figure it out, so I need your wisdom.


OS:Rocky Linux 8.4

MariaDB:10.3.32-MariaDB

PHP:7.4.19 (fpm-fcgi)

MediaWiki:1.38.2


The wiki is built on a VPS server using nginx and authenticated with Let's Encrypt. The file hierarchy is changed to /var/www/mediawiki instead of the initial /usr/share/nginx/html/ , and a subdomain (e.g. wiki.mydomain.com) is applied to the VPS IPv4 using a different service. The nginx conf file is shown below.

server {

      listen 443 ssl;
      ssl_certificate_key /etc/letsencrypt/live/wiki.mydomain.com/privkey.pem;
      ssl_certificate /etc/letsencrypt/live/wiki.mydomain.com/fullchain.pem;
      index index.php;
      root /var/www/mediawiki;
      error_log /var/log/nginx/mediawiki.error;
      access_log /var/log/nginx/mediawiki.access;
      location / {
              try_files $uri $uri/ /index.php;
      }
      location ~ /.ht {
        deny all;
       }
      location ~ .php$ {
          fastcgi_pass unix:/var/run/php-fpm/www.sock;
          fastcgi_split_path_info ^(.+\.php)(/.+)$;
          fastcgi_param PATH_INFO $fastcgi_path_info;
          fastcgi_index index.php;
          fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
          include fastcgi_params;
      }


}

Currently, I can edit using a normal editor, but when I try to use VisualEditor, I get "Error contacting the Parsoid/RESTBase server: (curl error: 7) Couldn't connect to server".

I suspect this is due to the fact that wiki.mydomain.com(/var/www/mediawiki) = xxx.xxx.xxx.xxx.xxx(/usr/share/nginx/html/) but I do not know how to solve it.

I tried the following, which I saw elsewhere, but they did not work.

location /rest.php {

 try_files $uri $uri/ /rest.php?$args;
}

Any help is appreciated. Glanheit (talk) 20:40, 18 July 2022 (UTC)

After trying various methods, I found a solution and share it here.
I could not run VisualEditor with ver1.38.2 until the end, at least in my environment. Therefore, I updated to the latest version in the development stage and was able to confirm the operation of VisualEditor with 1.39.
I hope to contribute to the solution of those who have the same problem. Glanheit (talk) 00:47, 28 July 2022 (UTC)

Interface d'authentification

Bonjour à tous !

J'ai une question concernant l'interface d'authentification du wiki: Comment puis-je mettre en place une interface d'authentification (Formulaire avec username et mot de passe) et après la confirmation j'aurai une redirection automatique vers ma page d'accueil. En d'autres termes, quand j'introduit le lien de mon wiki, j'obtiens l'interface d'authentification en premier lieu puis quand je m'authentifie j'accède à la page d'accueil de mon wiki. Je trouve des difficultés sur le code.   Famous-Hamza (talk) 10:55, 19 July 2022 (UTC)

Wanted template loops to suppress

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.


Greetings, I am using template https://www.istaria-lexica.de/Template:Exists inside this template: https://www.istaria-lexica.de/Template:AddResource. Now there are articles which do call the latter and link to other articles which call AddResource/Exists aswell (example:https://www.istaria-lexica.de/Noodles). It's obvious that this is a template loop but that is actually 'wanted'.

Now I am seeking a way to hinder it gets put into the 'Pages with template loops' category, or for a better way, so the loop isn't happening.

Any advice very welcome!

Thanks in advance Dominik Maus (talk) 14:21, 19 July 2022 (UTC)

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

unable to click anything in preferences

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.


good day all. i am migrating to newest version 1.38.2, and now no one can click anything in preferences. any help would be appreciated. Charkingfree (talk) 18:42, 19 July 2022 (UTC)

i have narrowed it down to our header page. if its in, doesnt work. take it out and its fine. Charkingfree (talk) 18:57, 19 July 2022 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

WikiLove extension limits

Hello! SqWiki makes heavy use of the WikiLove extension. It currently has more than 300 barnstar templates in it and the number is expected to rise as we add more barnstars for different subjects. What kind of technical limits should we be weary of, how far/close are we to those and what can be done once those limits approach? Klein Muçi (talk) 21:27, 19 July 2022 (UTC)

I think the primary issue would become that all the setup for those items (names, fields, image links) is in the initial JS delivered to every user talk page you visit. As this becomes bigger and bigger, you are shipping more and more to each user talk page.
After that, I think the problem is most likely that the UX for it is not really designed to have that many templates. Discovery without search at such numbers becomes a challenge.
This extension is in major need of a rewrite honestly, so if anyone is bored ;) —TheDJ (Not WMF) (talkcontribs) 10:52, 20 July 2022 (UTC)
I've tried to solve the UX part with alphabetic ordering and I'm thinking of adding some documentation somewhere but yes it is a problem. Anyway I was mos interested on the "JS per u-talk page" part. Any problems to be expected from that? Like slow performance or anything similar? And... Can there be an estimation of any kind about when should we start worrying for such effects? Like, asked in a naive way, would we be safe in doubling the aforementioned number of "templates" in it? It took more than 1 year to add ~50 so if 600 would be a safe number, it would mean that we wouldn't need to worry for a couple of years at least. Klein Muçi (talk) 11:20, 20 July 2022 (UTC)

Mediawiki developer

I would like a MediaWiki developer to write something for me.

Is anyone willing to make a patch for me? It is a medium sized patch that would add few user right and group additions. The changes have not been approved by consensus yet, but likely will be. If you are willing to help with this reply with "Accepted", if you would like more information before accepting reply with "Info". Also, how do I disable structured discussions? – Ilovemydoodle (talk) 13:11, 20 July 2022 (UTC)

Hi, please see "Post a new question" in the sidebar; please be specific in postings and save an unneeded roundtrip of communication (why should someone have to write "Info"?).
For the latter, see Talk:Structured_Discussions (but please ask a more specific question there and provide context). Thanks. Malyacko (talk) 13:58, 20 July 2022 (UTC)
See Professional development and consulting Bawolff (talk) 04:04, 21 July 2022 (UTC)
This is not for “my wiki”, this is for a WMF-wiki. – Ilovemydoodle2 (talk) 16:15, 21 July 2022 (UTC)
Ah ok. In that case, file a bug in https://phabricator.wikimedia.org with the details (in the tags section include Site Request). Generally speaking its unlikely anyone will write the patch until after consensus is achieved, so i would wait until that point before filing the task. Bawolff (talk) 18:32, 21 July 2022 (UTC)
I would to create the patch before consensus, because having the full technical implementation would help me get consensus. – Ilovemydoodle2 (talk) 19:08, 21 July 2022 (UTC)

How to display something only to admin user

This is just a cosmetic question. Just to hide some edit links.

All I can think of is to use MediaWiki:Common.css to set a class as hidden, and User:myusername/common.css (along with $wgAllowUserCss) to set it as visible again.

Is there a more straightforward way, e.g. using existing CSS classes? Jonathan3 (talk) 22:15, 20 July 2022 (UTC)

Instead of personal css you can use MediaWiki:group-sysop.css . See Manual:User group CSS and JavaScript. Although that doesnt change much. Bawolff (talk) 04:03, 21 July 2022 (UTC)
This works really well. I can put something like
.admin-only {
	display:none;
}
in MediaWiki:Common.css, and something like
.non-admin {
	display: none;
}
.admin-only {
	display: inherit;
}
in MediaWiki:Group-sysop.css
It seems to work anyway! :-) Jonathan3 (talk) 22:42, 21 July 2022 (UTC)

API query recentchanges not returning every change made

Hello, We're trying to use the API's query action to get recent changes for use in an automatic periodical Email-Newsletter.

Problem being, I can't get it to return me everything that's displayed on the Special:RecentChanges page. There's just a ton of entries on that page that aren't being returned by the "recentchanges" query.

I've been going through - what I belive to be - all of the main documentation on this, namely API:RecentChanges, as well as MediaWiki API help, but can't seem to figure out why this happens.

The following code snippet is for "changes during the past week". It is also not what we use for the actual Newsletter, but just me trying to get all entries that exist, i.e. getting as close as possible to the concept of an sql query along the lines of:

"SELECT * FROM table_name"

Our Code in Python:

S = requests.Session()
                             
PARAMS = {
  "action": "query",
  "list": "recentchanges",
  "format": "json",
  "rcnamespace": "*",
  "rcprop": "title|user|timestamp|flags",
  "rcshow": "",
  "rctype": "edit|new|log|categorize|external",
  "rctoponly": "false",
  "rclimit": "max",
  "rcstart": "now",
  "rcend": 7
}
                            
R = S.get(url="http://[OurDomain]/mediawiki/api.php", params=PARAMS)
WIKIDATA = R.json()

There's no problem at all with the GET request itself, we're recieving data just fine. The limit of return entries of 500 is no problem here, we are only in the ballpark of a few dozen entries here, so the "continue" functionality isn't required as of yet.

I would apprechiate any help or ideas regarding this. 89.144.222.26 (talk) 12:11, 21 July 2022 (UTC)

What is an example of a entry you think should be returned but is not by the api query? Bawolff (talk) 14:49, 21 July 2022 (UTC)
First of all, thanks for the reply!
An example would be a wiki page I'll be reffering to as "Solid". It's just a normal wiki page with some text and images.
If I go to Special:RecentChanges, it shows me that "Solid" was edited (amongst other edits to other pages). If I run the API request, it shows me some of the results I get on Special:RecentChanges, but not all of them. This occurs for roughly a fifth of results.
I've looked through a good amount of pages to try and determine a commonality of the ones that don't show up via the API request, but couldn't find anything. 89.144.222.26 (talk) 06:56, 22 July 2022 (UTC)
FYI I figured it out!
For some reason, there is no such thing as a boolean parameter with a value og true or a value of false. Instead, the VERY EXISTECE of a parameter that's considered boolean will be interpreted as true, ignoring its actual value (including no value).
This is reflected in the "Boolean parameters" section of
API:Data_formats
I am unaware whether this is a limitation of HTTP GET requests im general, but it seems like bad design to me personally, and caught me off guard.
In the end, removing the line
"rctoponly": "false",
fixed it.
One last thing that confuses me: If the existence of the rctoponly parameter was interpreted as "true", I would've expected that to show in the query results, namely via exactly one entry per changed page (the last change, of course). Instead, there were no entries of some pages ar all.
I don't fully understand it yet, but managed to solve my problem and wanted to share my solution in case it helps anyone. 89.144.222.216 (talk) 07:27, 26 July 2022 (UTC)

Error with thumbnails

Even if I have properly installed ImageMagick, I see this error: Error creating thumbnail: 'convert' is not recognized as an internal or external command, operable program or batch file.

I use MediaWiki 1.38.2, PHP 7.4, and ImageMagick 7.1.0.43. 105.106.3.55 (talk) 13:18, 21 July 2022 (UTC)

What is $wgImageMagickConvertCommand set to in LocalSettings.php ? Bawolff (talk) 14:47, 21 July 2022 (UTC)
Its set to the path to convert.exe. I speciefied C:\ImageMagick\convert.exe. 105.106.3.55 (talk) 16:30, 21 July 2022 (UTC)
Can you verify that is the correct path (e.g. type it into a command prompt and see what pops up)
Also, could you paste your LocalSettings.php (remove all passwords) Bawolff (talk) 18:29, 21 July 2022 (UTC)
I typed convert on a command line and works. Content of ImageMagick config in LocalSettings.php:
$wgEnableUploads = true;
$wgUseImageMagick = true;
$wgImageMagickConvertCommand = "C:\ImageMagick\convert.exe"; 105.106.39.156 (talk) 15:24, 22 July 2022 (UTC)
But did you type C:\ImageMagick\convert.exe on the command line of your server and have it work? Bawolff (talk) 18:29, 26 July 2022 (UTC)

Add watermark on mediawiki pages

Any specific coding available for watermark in mediawiki? 136.228.240.14 (talk) 14:10, 21 July 2022 (UTC)

What is watermark exactly? Which underlying problem do you want to solve, instead of asking for a "watermark" solution? Malyacko (talk) 19:39, 21 July 2022 (UTC)
Just to close this off (since IP is trying to add links to examples of watermarks in .pdf files), the answer is no. However, like any web page it is possible to add a background image or semi-transparent overlay through CSS to simulate the effect (keeping in mind that it is trivial to remove). Clump (talk) 11:28, 27 July 2022 (UTC)

Update hell, help wanted

[27035e83386cdb75dad2b1a2] /mediawiki/index.php?title=User:Admin&action=edit TypeError from line 3590 of /srv/http/mediawiki/includes/EditPage.php: implode(): Argument #2 ($array) must be of type ?array, string given

Backtrace:

#0 /srv/http/mediawiki/includes/EditPage.php(3590): implode()

#1 /srv/http/mediawiki/includes/EditPage.php(2797): EditPage->showStandardInputs()

#2 /srv/http/mediawiki/includes/EditPage.php(659): EditPage->showEditForm()

#3 /srv/http/mediawiki/includes/actions/EditAction.php(59): EditPage->edit()

#4 /srv/http/mediawiki/includes/MediaWiki.php(499): EditAction->show()

#5 /srv/http/mediawiki/includes/MediaWiki.php(293): MediaWiki->performAction()

#6 /srv/http/mediawiki/includes/MediaWiki.php(863): MediaWiki->performRequest()

#7 /srv/http/mediawiki/includes/MediaWiki.php(523): MediaWiki->main()

#8 /srv/http/mediawiki/index.php(43): MediaWiki->run()

#9 {main}


I think the backtrace speaks for itself. But for context:

I have an old MediaWiki instance of unknown version whose database I wanted to migrate over to a more recent instance on a new server (for eventual update to the latest version of MediaWiki). The most recent version I can migrate the old database over to (per update.php) is 1.29.x, so I intended to use that as a stepping stone to the most recent. I install the new instance, import the old database and change LocalSettings.php so its using the old database. Okay, after 8 hours of pain and suffering I finally have the old content displaying on 1.29.3.

So I want to mess around on a user page a bit before I inevitably have to update again. I go to create a user page for the Admin account and I get this. I tried disabling a bunch of extensions (just in case, though really they shouldn't be a problem because they all came with that version of MediaWiki) and obviously it did nothing to stop it. Further, attempting to edit any page causes this.


After all I've gone through just to get the old pages to show up I'm really at a loss. I doubt its database related because if it was that the old pages shouldn't even show up.

I also furiously googled around for a solution and found nothing even close to this, all of them say "try disabling extensions" but I tried that and it shouldn't even do anything anyway because the MediaWiki core is what's causing this. (At least I think EditPage.php belongs to the core? It gets called when I click Edit Page so...)

Given the age of the intermediate version (its unsupported but barely AFAIK) I don't expect help with that specifically (would be nice to understand more precisely what's going on here though), but if anyone can offer advice or even just a better method to get the old content into 1.38.x, preferably with edit history, I'd appreciate it. 98.122.37.94 (talk) 23:32, 21 July 2022 (UTC)

So EditPage is in core, but it is possible that that error can be triggered by an extension if the extension adds content to the editpage.
My general advice would be, dont worry about 1.29 fully working. Just do the bare min to get content to display, and update to the next version. Really all that is important is that update.php works without errors. Bawolff (talk) 01:17, 22 July 2022 (UTC)

How to make a local copy of a WMF site for testing

How would I go about creating a local clone of en.wq to test proposed changes to the code of the actual site? – Ilovemydoodle2 (talk) 03:58, 22 July 2022 (UTC)
Manual:FAQ#Wiki importing (Please use specific topics which summarize the question, otherwise every post here will be called "Question".) Malyacko (talk) 06:45, 22 July 2022 (UTC)
@Malyacko: Not just importing, cloning everything (e.g. configuration, extensions, etc.). – Ilovemydoodle2 (talk) 07:14, 22 July 2022 (UTC)
I don't think that easily possible. Maybe you want to explain the underlying problem to solve - see https://xyproblem.info/ Malyacko (talk) 08:45, 22 July 2022 (UTC)
I wanted to test out some feature additions. – Ilovemydoodle2 (talk) 08:53, 22 July 2022 (UTC)
You could locally install MediaWiki and test them. Malyacko (talk) 09:13, 22 July 2022 (UTC)
@Malyacko: But how do I set up the configuration and install all the correct extensions? – Ilovemydoodle2 (talk) 09:41, 22 July 2022 (UTC)
Entirely depends on the "feature additions" that you have in mind. For general info on how to install or configure stuff, see the links on the MediaWiki page. Malyacko (talk) 10:45, 22 July 2022 (UTC)
Its really hard to make an exact clone of wikiquote's setup. It is usually easier just to set up what you want to test.
That said all configs are in the mediawiki-config git repo. Bawolff (talk) 14:47, 22 July 2022 (UTC)
Why would it be so hard? – Ilovemydoodle2 (talk) 06:19, 26 July 2022 (UTC)
Because there's lots of local stuff (templates, modules, etc). Malyacko (talk) 06:41, 26 July 2022 (UTC)
What if I import a dump? Also, could you please send a link to a guide on how to do this? – Ilovemydoodle2 (talk) 06:59, 26 July 2022 (UTC)
Have you searched this very website? Manual:FAQ#Wiki_importing Malyacko (talk) 09:10, 26 July 2022 (UTC)
@Malyacko: I don’t think you understand what I want. Let me clarify:
I want to be able to make an exact clone of en.wq on my local computer, so I can test modifications to the php code.
Ilovemydoodle2 (talk) 09:28, 26 July 2022 (UTC)
I understand that. Bawolff answered that earlier in this thread, above. You'll have to import content, set up many extensions, and fiddle with settings. Malyacko (talk) 15:26, 26 July 2022 (UTC)
You can do it if you want to, however, there is no step by step guide, so you should be comfortable with experimenting.
  • Wikiquote is using a lot of customizations. You will have to copy all the customizations. There are a lot of them, and some of them can be difficult to understand how to copy at first glance.
  • Wikiquote is medium sized. That means if you make a mistake and have to start over, it can take a while to do steps because it has a lot of pages. Its not anywhere near as bad as wikipedia is for this, but if you're just learning, you might want to start smaller.
Anyways:
Its entirely possible to do what you want to do with some effort, but it will be some effort. Bawolff (talk) 18:27, 26 July 2022 (UTC)
Also, where do I find a dump of en.wq with full page history and deleted pages? – Ilovemydoodle2 (talk) 21:03, 26 July 2022 (UTC)
Did you read the previous message that you replied to? It links to https://dumps.wikimedia.org/backup-index.html Malyacko (talk) 21:41, 26 July 2022 (UTC)
I looked there, but I only saw current pages for en.wq, not full revhists. – Ilovemydoodle2 (talk) 19:41, 27 July 2022 (UTC)
Thanks for the advice. But I have never done anything like this before, so I don't even know where to start (other than downloading mediawiki). Do you think you could give any information on where to start and which pages I could read here? Thanks. – Ilovemydoodle2 (talk) 20:52, 26 July 2022 (UTC)
Manual:FAQ#Wiki_importing as pointed out before. Malyacko (talk) 21:42, 26 July 2022 (UTC)
I mean installing and configuring, not importing. Thanks. – Ilovemydoodle2 (talk) 22:09, 26 July 2022 (UTC)
@Malyacko: Ilovemydoodle2 (talk) 04:18, 27 July 2022 (UTC)
Please don't ping me Malyacko (talk) 09:18, 27 July 2022 (UTC)
Do the WMF servers use the latest version of MediaWiki? – Ilovemydoodle2 (talk) 20:22, 27 July 2022 (UTC)
See https://versions.toolforge.org/ - they use pretty much the latest development version from Git "main" or "master" branches Malyacko (talk) 16:44, 28 July 2022 (UTC)
Also, what is the difference between 'Group 0' and 'Group 1'? – Ilovemydoodle2 (talk) 19:40, 28 July 2022 (UTC)
wikitech:Deployments/Train#Groups Malyacko (talk) 20:45, 28 July 2022 (UTC)
"Did you read the previous message that you replied to? It links to https://dumps.wikimedia.org/backup-index.html" – Malyacko
I looked there, but I only saw current pages for en.wq, not full revhists. – Ilovemydoodle2 (talk) 19:38, 28 July 2022 (UTC)
Where can I find full dumps (all revisions*) of en.wq?
Edit: nevermind found them, but what is the difference between enwikiquote-20220701-pages-meta-history.xml.7z (1.1 GB) and enwikiquote-20220701-pages-meta-history.xml.bz2 (11.5 GB)?
Ilovemydoodle2 (talk) 21:10, 28 July 2022 (UTC)
The file format: 7z vs bz2. Malyacko (talk) 07:22, 29 July 2022 (UTC)
@Malyacko: So they are the same file format? And if so, why is the difference over ten-fold? – Ilovemydoodle2 (talk) 07:39, 29 July 2022 (UTC)
Again: Please don't ping me Malyacko (talk) 07:54, 29 July 2022 (UTC)
Understood, I won't ping you. But, what is reason for disliking pinging? – Ilovemydoodle2 (talk) 08:18, 29 July 2022 (UTC)
https://en.wikipedia.org/wiki/List_of_archive_formats , https://en.wikipedia.org/wiki/Data_compression Malyacko (talk) 07:56, 29 July 2022 (UTC)
According to that, 7z appears to be far more efficient for storing these dumps. So, why don't all dumps use 7z rather than bz2? – Ilovemydoodle2 (talk) 08:20, 29 July 2022 (UTC)
Also, how would I go about importing several wikis for cross-wiki (global) testing? – Ilovemydoodle2 (talk) 07:40, 29 July 2022 (UTC)
Not relevant at this stage. Start small. Malyacko (talk) 07:56, 29 July 2022 (UTC)
The test I need to do requires testing a global right. – Ilovemydoodle2 (talk) 08:16, 29 July 2022 (UTC)

Semantic Error

I installed Semantic according to the installation manual, but when I visit my site I get this error: Semantic MediaWiki was installed and enabled but is missing an appropriate upgrade key.


Semantic MediaWiki was installed and enabled but is missing an appropriate upgrade key.

Version

Semantic MediaWiki:

4.0.2 (smw:2020-04-18)

MediaWiki:

1.38.2

Code:

ERROR_SCHEMA_INVALID_KEY

Why do I see this page?

Semantic MediaWiki's internal database structure has changed and requires some adjustments to be fully functional. There can be several reasons including:

Changes to the list of fixed properties and may require additional table(s)

Changes to the overall table structure or indices requirements

Changes to the selected storage or query engine

Changes to the required entity collation

How can I fix this error?

An administrator (or any person with administrator rights) has to run either MediaWiki's update.php or Semantic MediaWiki's setupStore.php maintenance script.

You may also consult the following pages for further assistance:

Installation instructions

Troubleshooting help page


How can I solve it please? Linxixixi (talk) 10:28, 22 July 2022 (UTC)

You answered your question, see what you posted: "An administrator (or any person with administrator rights) has to run either MediaWiki's update.php or Semantic MediaWiki's setupStore.php maintenance script." See also https://www.semantic-mediawiki.org/wiki/Help:Getting_support Malyacko (talk) 11:10, 22 July 2022 (UTC)

Problem with saving articles

Hi, I've got a problem with doing any action on my articles.

When I'm trying to create a new article or edit/delete one, I can normally edit the content, type a reason of change, but when I'm trying to save it, after a ~30 seconds I'm getting "This site can't be reached. The connection was reset." error, shown by Google Chrome.

When I'm looking into logs, I don't see any post requests, made by an action.

What should I look for? Any suggestions what should I change in my local settings file? IceMeltt (talk) 11:40, 22 July 2022 (UTC)

Bump! IceMeltt (talk) 08:37, 26 July 2022 (UTC)
Please see "Post a new question" in the sidebar. Does this work with another web browser? Do the web server logs show anything when this happens? Malyacko (talk) 09:09, 26 July 2022 (UTC)

Why can't I create an account?

I am trying again and again to create an account on one of your Wikis, but it keeps rejecting my email address and password. WHY? It's a fantasy RPG wiki, I'm not trying to steal government secrets! HeneryVII (talk) 12:11, 22 July 2022 (UTC)

That is not "one of our wikis". It's some website that uses the MediaWiki software which we provide, but we have nothing to do with that website. Malyacko (talk) 13:47, 22 July 2022 (UTC)

New jpeg thumbnails blank after update to 1.38 (docker)

I updated my Mediwiki Docker instance to 1.38 a couple weeks ago and just noticed that thumbnails for newly uploaded jpegs are broken (showing as white rectangles). pdf and png thumbnails are working fine, and I verified that imagemagick convert tool that is targeted in the LocalSettings.php file has the correct permissions for the www-data user.


Anyone have any idea what could have caused this or how I can debug it? 173.197.68.130 (talk) 14:06, 22 July 2022 (UTC)

Any help is greatly appreciated. I've enabled mediawiki logs and I don't see anything obvious. I enabled php errors temporarily and nothing appeared. Jpeg thumbnail dimensions show as (0 x 0) and the thumbnail is a blank rectangle.
This issue seemed similar - Project:Support desk/Flow/2022/06#h-No_JPG_thumbnails_after_1.38_upgrade-2022-06-05T02:41:00.000Z 173.197.68.130 (talk) 15:55, 22 July 2022 (UTC)
Adding the following line to LocalSettings.php fixed the issue. An official fix has already been submitted, but this works for now.
$wgShowEXIF = function_exists( 'exif_read_data' );
Thanks for all the help... 173.197.68.130 (talk) 17:50, 22 July 2022 (UTC)
What is the exact version of mediawiki you are using? This issue should not be happening in 1.38.2 Bawolff (talk) 17:03, 24 July 2022 (UTC)

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

Trying to load the Extension: AbuseFilter, I get the above error. I searched this site for answers but the only one close said to re-run composer

composer.phar update —no-dev.

So, I did that. Other extensions load, but when I add

wfLoadExtension( 'AbuseFilter' );

to my localSetting.php file I get the above error. Does anyone have an idea of what might be happening? I’d like to run this extension to protect my site.


I’m running

MediaWiki 1.38.2

PHP 7.4.15

mysql  Ver 14.14 Distrib 5.7.38


Would updating to PHP 8.x solve my issue? Noivad (talk) 14:22, 22 July 2022 (UTC)

Solved: I forgot to run the update script. Noivad (talk) 14:31, 22 July 2022 (UTC)
Usually this error means you have to run composer update in the extensions/AbuseFilter directory, or install the merge plugin. Bawolff (talk) 14:44, 22 July 2022 (UTC)

Officializing stuff here?

I've been looking at Development guidelines, Development policy and the related templates, and I'm not sure I got this right. Is an RfC on this wiki the way to declare something as official (say, turning a page from Category:Essays into a guideline/policy)? Given that the software is developed collaboratively not just by WMF staff, who makes sure that rules are followed by devs? Thanks. (pinging @AKlapper (WMF) - @SSethi (WMF) who may have or point to an answer) Elitre (WMF) (talk) 16:55, 22 July 2022 (UTC)

Might be Technical Decision Forum (but hard to follow, indeed). AKlapper (WMF) (talk) 17:21, 22 July 2022 (UTC)
I mean, edits like https://www.mediawiki.org/w/index.php?title=Inclusive_language&type=revision&diff=4781353&oldid=4603169 seem to suggest anyone can just slap a template on a page (and the template wording itself seems to corroborate this idea...). Elitre (WMF) (talk) 17:26, 22 July 2022 (UTC)
All the template says is "This page documents a MediaWiki development guideline, crafted over time by developer consensus (or sometimes by proclamation from a lead developer)".
Given the people who have edited that page, the template seems like a fair description of it. Bawolff (talk) 20:48, 22 July 2022 (UTC)
If its supposed to be a binding policy on developers (and not just on wiki), i would suggest wikitech-l discussion. I dont think enough people pay attention to on wiki stuff that a pure on wiki discussion should count for anything.
I dont think there has been much "official policy" for the wiki in the past. Code of conduct is the only one that comes to mind. Bawolff (talk) 20:42, 22 July 2022 (UTC)
Thanks a lot, Bawolff. 151.57.61.15 (talk) 07:00, 23 July 2022 (UTC)

Potential bug in ReassignEdits.php

I used this today, in its basic format php reassignEdits.php "user1" "user2".

It worked all right except that it changed the "User creation log" line in recent changes. Now that says User creation log; 12:34 User account user2 talk contribs block was created. That's wrong, as it was user1 that was created then.

The actual user creation log at Special:Log/newusers still shows 12:34, 1 July 2022 User account user1 talk contribs block was created.

The full result was:

Checking current edits...found 2.
Checking deleted edits...found 0.
Checking recent changes...found 3.

Total entries to change: 5

Reassigning current edits...done.
Reassigning deleted edits...done.
Updating recent changes...done.

Is there any way to fix this? Thanks. Jonathan3 (talk) 20:57, 23 July 2022 (UTC)

I guess it's somewhere in the database... Jonathan3 (talk) 23:00, 28 July 2022 (UTC)

Moving TOC to very top of the page

Hello. I'm trying to get TOC to float to the right and show up at the very top of every page (as if __TOC__ magic word were the very first thing on the page).

Floating to the right I've solved with changes to common.css, but I cannot figure out how to make the TOC show up at the top, with the content flowing around it. Is there a way to do it without manually placing __TOC__ at the top of every page? Melmann (talk) 23:17, 23 July 2022 (UTC)

I think the Wikipedia mobile skin/extension does something like that for infoboxes (moving them down below the initial paragraph on mobile) but I'm not sure about that.
Could you maybe use Javascript in MediaWiki:Javascript.css to move the div with id & class "toc" further up the page?
Or maybe you could use a Mediawiki hook to actually add __TOC__ to the top of every page? Jonathan3 (talk) 23:15, 24 July 2022 (UTC)
I wonder whether you could download and change Extension:ForceTocOnEveryPage. "The ForceTocOnEveryPage extension forces a table of contents to be displayed on every page except on main page, in edit mode, and within special namespaces."
Check out this file: https://github.com/jmnote/ForceTocOnEveryPage/blob/master/hooks.php
At the end it appends __FORCETOC__ to the wiki page.
I wonder whether you could just prepend __TOC__ instead. So that line (with the awkwardly placed closing }) would read:
$text = "__TOC__" . $text;}
Jonathan3 (talk) 22:59, 28 July 2022 (UTC)

Search function

there was a search function after done the article. it can help me a lot to change all the same words to another with only one click but today this function was gone. pls help me asap Kunduziy (talk) 02:48, 24 July 2022 (UTC)

Maybe try ReplaceText extension. Jonathan3 (talk) 13:48, 24 July 2022 (UTC)
how can i use this ? Kunduziy (talk) 13:53, 24 July 2022 (UTC)
You can use it to change text across the wiki.
Extension:ReplaceText
If it's for one page you could copy and paste into a text editor and replace there.
Or maybe I've misunderstood your question :-) Jonathan3 (talk) 14:46, 24 July 2022 (UTC)

Robots.txt errors?

I'm having problems with search bots seemingly ignoring my robots.txt file (genuine bots, SEMrush, Bing that claim to respect robots.txt).

My wiki has short URLs (e.g. wikiurl.com/pagename) and I've tried all combinations of robots.txt content, currently the below:

User-agent: *

Disallow: /wiki/index.php

Disallow: /index.php

Disallow: /wiki/load.php

Disallow: /load.php

Disallow: /wiki/api.php

Disallow: /api.php


However my logs show: GET /wiki/index.php?title=Page_Name&action=history HTTP/1.0

I don't understand how this is possible if I've blocked index.php?

Thanks! PenguinBegins (talk) 08:47, 24 July 2022 (UTC)

I don't know if works actually works but I've got
Disallow: /index.php* Jonathan3 (talk) 13:48, 24 July 2022 (UTC)
just because the user-agent claims to be bing doesnt mean it really is. Does the ip address match a range used by bing?
P.s.
I dont think there is a difference between disallow: /index.php and disallow: /index.php* Bawolff (talk) 16:58, 24 July 2022 (UTC)
If you go to wikiurl.com/robots.txt does it appear in your browser? Jonathan3 (talk) 20:49, 24 July 2022 (UTC)
"I dont think there is a difference between disallow: /index.php and disallow: /index.php*"
I've checked using an online thing and can confirm this. It disallows /index.php and things like /index.php?title=ABC Jonathan3 (talk) 21:06, 25 July 2022 (UTC)
I bet the way you got the short URLs to work is redirecting /robots.txt to a wiki page called Robots.txt
It's easy to check. Just type wikiurl.com/robots.txt into the browser bar.
To fix it - if it is the problem! - you can change your .htaccess (or similar), either so it doesn't cause this problem, or to work around the problem specifically for robots.txt Jonathan3 (talk) 22:50, 28 July 2022 (UTC)

How to store category information in templates in Mediawiki? [RESOLVED]

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 created a form to allow users to input data about scientific topics, references and categories in an organized manner. Problem is, I am unable to store the category information within the template. Hence, I cannot automatically categorize the page when a user fills the form with the appropriate category information. Here is the template page from my Mediawiki site:


{{#template_params:Summary (label=Tip: summarize the topic in point form, as a numbered list. Include references between <ref></ref>[1] tags.))|Category (list)}}

Reference(s)

  1. Your references will automatically appear here


Here is the simple form I created to collect the data:


This is the "Summary Article" form. To create a page with this form, enter the page name below; if a page with that name already exists, you will be sent to a form to edit that page.

{{#forminput:form=Summary Article}}

114.73.149.245 (talk) 09:31, 24 July 2022 (UTC)
Try
[[Category:{{{Category|}}}]] Jonathan3 (talk) 13:45, 24 July 2022 (UTC)
Assuming "category" isn't something you can't call a field. Jonathan3 (talk) 13:45, 24 July 2022 (UTC)
Hey, thank you for answering! Unfortunately that doesn't help though... 114.73.149.245 (talk) 11:05, 25 July 2022 (UTC)
I even changed the variable to {{{User_Category|}}} 114.73.149.245 (talk) 11:06, 25 July 2022 (UTC)
Did you put it in the template?
It should work, I think.
Try asking on the page forms talk page. The author will likely reply. Jonathan3 (talk) 12:16, 25 July 2022 (UTC)
Looked at your code by "editing" it here.
I think {{{section|Category|level=2}}} is wrong for what you want.
Try field instead of section. Jonathan3 (talk) 12:19, 25 July 2022 (UTC)
On the phone so this is a pain to type. Please click edit to see it.
try
{{{field|User_Category|list}}}
in the form
then in the template
{{#arraymap:{{{User_Category|}}}|,|@@|[[Category:@@]]|}}
Jonathan3 (talk) 12:24, 25 July 2022 (UTC)
Yeah tried all that, but no hope! Here's my template code:
<noinclude>
{{#template_params:Summary (label=Topic Summary (In point form, as a numbered list. Include references between <ref></ref> tags.))|User_Category}}
</noinclude><includeonly>
{{#template_display:_format=sections}}
[[Category:Summary Article]]
[[Category:{{#arraymap:|,|@@||}}]]
</includeonly>
Here's my form code:
<noinclude>
This is the "Summary Article" form.
To create a page with this form, enter the page name below;
if a page with that name already exists, you will be sent to a form to edit that page.
{{#forminput:form=Summary Article}}
</noinclude><includeonly>
<div id="wikiPreview" style="display: none; padding-bottom: 25px; margin-bottom: 25px; border-bottom: 1px solid #AAAAAA;"></div>
=== Summary ===
{{{section|Summary|level=1}}}
==Category==
{{{field|User_Category|level=2}}}
</includeonly>
114.73.149.245 (talk) 12:42, 25 July 2022 (UTC)
You'll have to click edit on this page on my last answer to see what to use. Jonathan3 (talk) 13:07, 25 July 2022 (UTC)
It doesn't say edit, do I have to log in for that? 114.73.149.245 (talk) 13:35, 25 July 2022 (UTC)
My bad, just saw it 114.73.149.245 (talk) 13:37, 25 July 2022 (UTC)
Yeah, did all the changes but still not working though. But thank you for trying! I really appreciate it! 114.73.149.245 (talk) 13:40, 25 July 2022 (UTC)
No problem. It looks like you copied and pasted from the wrong place. My fault for not bothering with syntaxhighlight. When I'm on the computer I'll get back to this. Jonathan3 (talk) 13:44, 25 July 2022 (UTC)
Ok, thank you! 114.73.149.245 (talk) 14:55, 25 July 2022 (UTC)
Ok, here we go. I've not tested this.
In your original code it mentioned "type in categories separated by commas". So in the form you want to have the "field" tag with "list" parameter (see Extension:Page_Forms/Defining_forms#'field'_tag). The "level" parameter is only for the "section" tag.
==Category==
'''Tip: type in categories separated by commas.'''
{{{field|User_Category|list}}}
You'll end up with User_Category being a comma-separated list. So if you want to do anything with the individual members of the list you need to split them out somehow (see Extension:Page_Forms/Defining_forms#Multiple_values_for_the_same_field).
{{#arraymap:{{{User_Category|}}}|,|@@|[[Category:@@]]|}}
This basically splits User_Category where it finds commas, treats each item as @@ and replaces that with [[Category:@@]]. You can use other text instead of "@@" if you prefer. Jonathan3 (talk) 21:05, 25 July 2022 (UTC)
It's sill not working as the category information doesn't turn up on the page that is created at all... 114.73.149.245 (talk) 23:12, 25 July 2022 (UTC)
Maybe get rid of the _ Jonathan3 (talk) 00:32, 26 July 2022 (UTC)
Nope, doesn't work. I tried the PageForms discussion forum to no avail. Sure, someone must have tried to do something as simple as this in the past? 114.73.149.245 (talk) 01:32, 26 July 2022 (UTC)
I tried to include just a random new category to the template page, and even that did not work. Something is fundamentally wrong with what I'm doing and I don't know what. I followed the documentation to the letter... 114.73.149.245 (talk) 01:36, 26 July 2022 (UTC)
I do it on my wiki and it works fine. Could you share your URL? Jonathan3 (talk) 06:51, 26 July 2022 (UTC)
Hold on a minute - are you saying that categorisation via template doesn't work at all? Jonathan3 (talk) 06:52, 26 July 2022 (UTC)
That's right, categorisation via template does not work at all. I am unable to post the URL here as it keeps saying 'link spam' 114.73.149.245 (talk) 07:49, 26 July 2022 (UTC)
Just type it without the http part :-)
Does normal page categorisation work? Jonathan3 (talk) 07:56, 26 July 2022 (UTC)
Yes, normal categorisation works.
Here's the template: 35.232.89.39/wiki/Template:Summary_Article
And here's the form: 35.232.89.39/wiki/Form:Summary_Article 114.73.149.245 (talk) 08:36, 26 July 2022 (UTC)
Could you paste a copy of your template and form here. I'll paste them onto my wiki and see if it works (since you mentioned that it works for yourself) 114.73.149.245 (talk) 10:02, 26 July 2022 (UTC)
[[Category:{{#arraymap:{{{User_Category|}}}|,|@@|[[Category:@@]]|}}]]
is wrong. You just want the text from the first { to the last } -- see above.
Also you might want to remove the _ here and replace with a space. I can't remember. Try it. Jonathan3 (talk) 11:50, 26 July 2022 (UTC)
==Category==
{{{field|UserCategory}}}
is also wrong. You need the field name to be the same as in the template. Though I think the field name here does need the _. On the phone again so harder to check.
Also if you want to input a list you need the list parameter -- see above. Jonathan3 (talk) 11:52, 26 July 2022 (UTC)
Just checked. Space is fine. No need for _ on either page. Jonathan3 (talk) 11:57, 26 July 2022 (UTC)
I made the suggested corrections, but it still doesn't work. 114.73.149.245 (talk) 12:20, 26 July 2022 (UTC)
Does it work on your wiki? 114.73.149.245 (talk) 12:32, 26 July 2022 (UTC)
You were missing
{{{for template|Summary Article}}}
So when the page was saved via the form it didn't contain a template call, so the template wouldn't have known about what was typed into the category input box.
It's always best to create the templates and forms using the extension's special pages, so that you don't miss out on important things: Extension:Page_Forms/Special_pages.
Making minimal changes to your pages, the following should work:
Form:Summary Article
<noinclude>
This is the "Summary Article" form.
To create a page with this form, enter the page name below;
if a page with that name already exists, you will be sent to a form to edit that page.
{{#forminput:form=Summary Article}}
</noinclude><includeonly>
<div id="wikiPreview" style="display: none; padding-bottom: 25px; margin-bottom: 25px; border-bottom: 1px solid #AAAAAA;"></div>
{{{for template|Summary Article}}}
==Summary==
{{{section|Summary|level=1}}}
==Category==
{{{field|User Category|input type=tokens|list}}}
</includeonly>
Template:Summary Article
<noinclude>
{{#template_params:Summary (label=Test)|User Category}}
</noinclude><includeonly>
{{#template_display:_format=text}}
[[Category:Summary Article]]
{{#arraymap:{{{User Category|}}}|,|@@|[[Category:@@]]|}}
</includeonly>
I've tested it on an old version of Page Forms, before #template_display and #template_params existed, but hope that part of it is unproblematic. Jonathan3 (talk) 13:27, 26 July 2022 (UTC)
It nearly worked! Thank you. Here's an example page I created, but note that there is a disembodied "User category:" on top:
35.232.89.39/wiki/Example_page 114.73.149.245 (talk) 14:11, 26 July 2022 (UTC)
Also it now states "Summary Article" as the category, but does not state "Example Category" which I had input into the form... 114.73.149.245 (talk) 14:13, 26 July 2022 (UTC)
Maybe the tokens input type confused you and you ended up not entering anything in that box.
After typing in that box, hit tab or comma to "tokenise" what you've typed. Jonathan3 (talk) 15:59, 26 July 2022 (UTC)
As I stated above, I entered “Example category” in the category info box. But are you saying that I still need to put a coma at the end even if it’s just one category I entered? 114.73.149.245 (talk) 21:08, 26 July 2022 (UTC)
The tokens input type is a bit counter-intuitive. After typing in that box, hit tab or comma to "tokenise" what you've typed.
Alternatively, change the entire line:
{{{field|User Category|input type=tokens|list}}}
to:
{{{field|User Category|list}}}
I think then it would just be a plain HTML input box and you can't go wrong. Jonathan3 (talk) 21:37, 26 July 2022 (UTC)
So close! Now it keeps saying "User Category:" on top of the page. How do I get rid of that? 114.73.149.245 (talk) 10:43, 27 July 2022 (UTC)
NVM I figured it out. You can close this issue finally! 114.73.149.245 (talk) 11:23, 27 July 2022 (UTC)
Haha no problem!
Maybe you could add your solution here. Jonathan3 (talk) 11:27, 27 July 2022 (UTC)
Thank you for your help BTW! 114.73.149.245 (talk) 11:30, 27 July 2022 (UTC)
The solution is the template:
<noinclude>
{{#template_params:Summary|Categories}}
{{#template_display:_format=sections}}
</noinclude><includeonly>
[[Category:Summary Article]]
{{#arraymap:{{{Categories|}}}|,|x|[[Category:x]]|\s}}
</includeonly>
Which brings me to the next question - which I shall post as a new topic above. Thank you for your help BTW. 114.73.149.245 (talk) 14:01, 27 July 2022 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

I can't post any code without the editor changing it at all...

I can't post any code without the editor changing it at all... 114.73.149.245 (talk) 11:25, 24 July 2022 (UTC)

Visual editor is a nightmare.
Switch to source editing and put <syntaxhighlight> before and </syntaxhighlight> after your code. Jonathan3 (talk) 13:42, 24 July 2022 (UTC)

template that can be modified

Hello, is it possible to create a template that can then be modified on the page? E.g. we want to create a template for a meeting protocol. This is to ensure that new protocols always have the same structure. After the template is inserted on the new page, it should be filled in.

A normal template template:xyz I can not take for this, if I see that correctly.

Thanks for your help!

Oliver Oliver Fleidl (talk) 19:08, 24 July 2022 (UTC)

Extension:Page Forms would be good for this. Jonathan3 (talk) 23:08, 24 July 2022 (UTC)
do you want the subst: feature? See help:Subst.
If you want to be created new pages, see also extension:InputBox and Manual:Creating pages with preloaded text Bawolff (talk) 01:04, 25 July 2022 (UTC)
thank you so much! help:subst is perfect. Greetings! Oliver Fleidl (talk) 08:51, 25 July 2022 (UTC)

How do you create a category (or select an existing one) from a field value on a page form in MediaWiki?

I created a form to allow users to input data about scientific topics, references and categories in an organized manner. Problem is, I am unable to automatically categorize the page (by either creating a new category or using an existing one) when a user fills the form with the appropriate category information. 203.5.88.42 (talk) 23:52, 24 July 2022 (UTC)

Any help would be appreciated- I’ve been looking around for a solution to this for a while. I can provide more info if required. 203.5.88.42 (talk) 02:01, 25 July 2022 (UTC)
Is this the same as this: Project:Support desk/Flow/2022/07#h-Reference(s)-20220724093100? Jonathan3 (talk) 21:08, 25 July 2022 (UTC)
Yes, you can ignore this question. I haven't been able to delete it! Thank you! 114.73.149.245 (talk) 23:07, 25 July 2022 (UTC)

Some skins not rendering through reverse proxy

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


Hi All, I'm trying to set up MediaWiki to be accessed on my local network behind an nginx reverse proxy. When using some skins (like Timeless), my wiki loads with no styles, but other skins like Vector work fine. Looking at the developer tools in the browser, I do see some errors on load.php, but I can access wiki.mydomain.com/load.php just fine.

It's also worth noting that these themes do load fine if I access my wiki directly so it definitely seems to be an issue only present when routing through the proxy.

This is a fresh MediaWiki install which I am running using the official docker-compose image (mediawiki:1.38.2).

Here's some of the LocalSettings.php variables:

$wgScriptPath = "";
$wgServer = "http://wiki.mydomain.com";
$wgScript = "index.php";
$wgArticlePath = "/wiki/$1";
$wgUsePathInfo = false;

And here's my nginx config:

server {
  listen 80;
  server_name wiki.mydomain.com;
  return 301 https://$host$request_uri;
}

server {
  listen 443 ssl;

  server_name wiki.mydomain.com;

  ssl_certificate local_ca/local_CA.crt;
  ssl_certificate_key local_ca/ca.key;

  location / {
    proxy_pass http://192.168.55.101:8063;
    proxy_set_header Host $host;

    proxy_set_header  X-Real-IP $remote_addr;
    proxy_set_header  X-Forwarded-Proto https;
    proxy_set_header  X-Forwarded-For $remote_addr;
    proxy_set_header  X-Forwarded-Host $remote_addr;

  }
}
Any help resolving this would be very appreciated. Jreed509 (talk) 04:58, 25 July 2022 (UTC)
> Looking at the developer tools in the browser, I do see some errors on load.php
What kind ? can you open the link that is returning the error in a separate browser tab and does it show any error ? —TheDJ (Not WMF) (talkcontribs) 08:27, 25 July 2022 (UTC)
So the error is specifically with this url call: https://wiki.mydomain.com/load.php?lang=en&modules=ext.visualEditor.desktopArticleTarget.noscript%7Cskins.timeless&only=styles&skin=timeless
This link does not work if I paste it into my browser, however after some trial and error, it looks like the modules=modules=ext.visualEditor.desktopArticleTarget.noscript%7Cskins.timeless parameter of the url causes a 502 error. Stripping that from the url loads fine. Jreed509 (talk) 14:55, 25 July 2022 (UTC)
I also tried disabling visual editor in LocalSettings.php. Disabling that changes the url to https://wiki.mydomain.com/load.php?lang=en&modules=skins.timeless&only=styles&skin=timeless which still returns a 502 error code. In that case the offending parameter is modules=skins.timeless Jreed509 (talk) 14:58, 25 July 2022 (UTC)
502 = bad gateway.
So does your error logs have any information. Bawolff (talk) 15:33, 25 July 2022 (UTC)
None that I can find (although I may not be looking at the correct log files). The docker container logs don't show any errors and if I exec into the MediaWiki docker container itself, the apache error.log is empty.
I tried enabling the debug logs for MediaWiki as well, but the only lines that look close to an error in that log are the following:
Unstubbing $wgLang on call of $wgLang::commaList from MediaWiki\Permissions\PermissionManager->missingPermissionError
ContextSource::getContext (MediaWiki\Skin\Timeless\SkinTimeless): called and $context is null. Using RequestContext::getMain()
Is there anywhere else I should be looking for error logs? Jreed509 (talk) 16:27, 25 July 2022 (UTC)
Actually turns out I was able to resolve this. I ended up creating a site-specific log file in Nginx for my MediaWiki proxy and the issue was that a header was too large.
Adding the following to my nginx.conf solved the issue for me.
proxy_buffer_size 128k;
proxy_buffers 4 256k;
proxy_busy_buffers_size 256k;
Thanks for your help! Jreed509 (talk) 18:02, 25 July 2022 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

How to find recent changes by a specific user

I have my wiki setup with this software version.

MediaWiki 1.34.0 PHP 8.0.21 (litespeed) MySQL 5.6.51-cll-lve

I have 10k+ pages in this wiki. I am inviting multiple users to edit the contents of pages. To verify their edits I am going to use ‘patrolling’ feature of the wiki. However how do I find out changes by a particular user on recent pages so that it can be patrolled by a specific reviewer? I couldn’t figure out how this is possible on recent pages page to see this. I tried ‘tag’ but couldn’t get information on how I can add a tag manually each time a user makes an edit.

Please help out.

Thanks Vikasnd (talk) 12:12, 25 July 2022 (UTC)

@Vikasnd You are running an ancient, insecure, outdated MediaWiki version full of known security issues. Please upgrade for your own safety. Malyacko (talk) 14:24, 25 July 2022 (UTC)
You could use Special:Contributions Bawolff (talk) 15:32, 25 July 2022 (UTC)
It does give some help, but when the pages are shown in contributions page, it doesn't have 'mark as patrolled' option as this doesn't have 'DIFF' button as it shows in 'Recent changes'.
Recent changes have curid=14123&diff=90215&oldid=73111 which are missing in user contribution history page.
Is there any way I could use 'patrol' feature based on specific user only? Vikasnd (talk) 15:59, 25 July 2022 (UTC)
Interestingly 'mark as patrolled' comes on some pages while not on others when I am using 'Contributions' page. Not sure why this is working differently for some pages. Vikasnd (talk) 16:23, 25 July 2022 (UTC)
Some pages cannot be patrolled. Especially if they are older than 90 days (depending on $wgMaxRcAge) Bawolff (talk) 18:27, 26 July 2022 (UTC)
@Malyacko, Thanks. I"ll upgrade soon, but we need to enable editing first. Would appreciate your help in learning how I can solve that. Vikasnd (talk) 15:56, 25 July 2022 (UTC)

Mediawiki avec Active Directory

Bonjour,

J'ai installé mediawiki et je voudrais l'interfacer avec Active Directory de Microsoft mais je n'arrive pas. J'ai suivi à la lettre le tutoriel suivant :

Manual:Active Directory Integration — MediaWiki

Voici le contenu de mon ldap.json :

{

"domain.fr": {

"connection": {

"server": "server.domain.fr",

"port": "389",

"user": "CN=toto,DC=domain,DC=fr",

"pass": "*****",

"enctype": "clear",

"options": {

"LDAP_OPT_DEREF": 1

},

"basedn": "dc=domain,dc=fr",

"userbasedn": "ou=People,dc=domain,dc=fr",

"groupbasedn": "dc=domain,dc=fr",

"searchattribute": "samaccountname",

"usernameattribute": "samaccountname",

"realnameattribute": "cn",

"emailattribute": "mail",

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

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

},

"userinfo": [],

"authorization": [],

"groupsync": {

"mapping": {

"interface-admin": "CN=group1,DC=domain,DC=fr",

}

}

}

}

voici le contenu de LocalSettings :

// 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/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");

  }

}

// Activate Extension

if ( $ldapConfig ) {

  wfLoadExtension( 'PluggableAuth' );

  wfLoadExtension( 'LDAPProvider' );

  wfLoadExtension( 'LDAPAuthentication2' );

  wfLoadExtension( 'LDAPAuthorization' );

  wfLoadExtension( 'LDAPUserInfo' );

  wfLoadExtension( 'LDAPGroups' );

  $LDAPProviderDomainConfigs = $ldapJsonFile;

  $wgPluggableAuth_ButtonLabel = "Log In";

  // Force LDAPGroups to sync by choosing a domain (e.g. first JSON object in ldap.json)

  $LDAPProviderDefaultDomain = "domain.fr";

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

}

l'exécution de update.php se déroule avec succès.

Mais quand j'ouvre mon mediawiki, j'ai un message :

Les informations d’identification fournies n’ont pas pu être authentifiées.

Pourriez-vous svp m'aider ?

Version : 1.38

Cordialement Zahrdine05 (talk) 12:49, 25 July 2022 (UTC)

All pages - Namespace Option Not Working

Displays only pages in the main namespace. When a different namespace is selected, it defaults back to the main namespace. Mediawiki site at: http://foss2serve.org/index.php?title=Special%3AAllPages&from=&to=&namespace=0

MediaWiki 1.36.1
PHP 7.4.30 (apache2handler)
MySQL 5.7.38-41-log

Burdgedarci (talk) 16:07, 25 July 2022 (UTC)

works fine for me. Bawolff (talk) 16:20, 25 July 2022 (UTC)

About Extension:Display Title

Is there a way to have pages that use Extension:Display Title use the default page name for special:Recentchanges, etc.? ナムコォッ! (talk) 03:39, 26 July 2022 (UTC)

Please check that IP 176.234.131.136

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.


It seems he does not have nothing else to do this morning


Look here Project:Village Pump/Flow/2022/07#h-Help:Namespaces-20220727090400

Thanks GpieroMW (talk) 09:25, 27 July 2022 (UTC)

Reverted already Malyacko (talk) 09:52, 27 July 2022 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

How do you transclude user input from a form into a page without the section heading?

Duplicate of query on Extension talk:Page Forms.

I have a form that takes user input and creates a page. Unfortunately, the page that is created includes the section heading, which I wish to avoid. I only wish to keep the name of the page, user input and nothing else.


Here is the Template page from my Mediawiki site:

<noinclude>
{{#template_params:Summary|Categories}}
{{#template_display:_format=sections}}
</noinclude><includeonly>
[[Category:Summary Article]]
{{#arraymap:{{{Categories|}}}|,|x|[[Category:x]]|\s}}
</includeonly>

Here's my Form code:

<noinclude>
This is the "Summary Article" form.
To create a page with this form, enter the page name below;
if a page with that name already exists, you will be sent to a form to edit that page.

{{#forminput:form=Summary Article}}

</noinclude><includeonly>
<div id="wikiPreview" style="display: none; padding-bottom: 25px; margin-bottom: 25px; border-bottom: 1px solid #AAAAAA;"></div>
{{{for template|Summary Article}}}
==Summary==
{{{section|Summary|mandatory|rows=20}}}

==Category==
{{{field|Categories|input type=tokens|values from namespace=Category}}}

</includeonly>

The page that is created has it's name on top, then the label 'Summary' as the next heading, followed by the user input. I wish to remove the 'Summary' heading altogether. How do I accomplish that? 114.73.149.245 (talk) 14:27, 27 July 2022 (UTC)

Duplicate of Extension_talk:Page_Forms#How_do_you_transclude_user_input_from_a_form_into_a_page_without_the_section_heading? (that link will break when the page is archived). Jonathan3 (talk) 22:19, 28 July 2022 (UTC)

How to use hatnotes in Mediawiki?

http://horawiki.org/

MediaWiki 1.37.2, PHP 7.4.30 (litespeed), MySQL 5.6.51-cll-lve, Lua 5.1.5

Hi. I'd like to use hatnotes in my instantiation of MediaWiki but don't see how to install them. Template:hatnote is documented here but it's not present in my wiki and I can't find instructions on making it happen. Initial pointer needed. Thanks. Larrydberg (talk) 19:26, 27 July 2022 (UTC)

Manual:Importing Wikipedia infoboxes tutorial is about infoboxes, but most of it should apply to other templates. Bawolff (talk) 23:45, 27 July 2022 (UTC)
That template looks really simple to recreate from scratch, though horrendously difficult to copy :-)
You could create Template:Hatnote on your wiki containing just this:
<div role="note" class="hatnote {{{extraclasses|}}}">{{{1|{{{text}}}}}}</div>
Then copy and paste the contents of Template:Hatnote/styles.css to your wiki's MediaWiki:Common.css, i.e.
.hatnote {
	font-style: italic;
	padding-bottom: 0.4em;
	margin-bottom: 0.4em;
	color: #555;
	border-bottom: 1px solid #ccc;
}
.hatnote.no-border {
	border-bottom: none;
}
Jonathan3 (talk) 22:42, 28 July 2022 (UTC)

Special:UnwatchedPages never lists anything

Running the following versions:

MediaWiki 1.37.2
PHP 7.4.29 (apache2handler)
MariaDB 10.3.32-MariaDB
ICU 67.1
Lua 5.1.5
Pygments 2.10.0

My Special:UncategorisedPages page simply states:

"There are no results for this report."

Despite there being uncategorised pages. I've spent hours searching the wiki trying to understand why, but I'm out of ideas. 101.98.196.164 (talk) 03:54, 28 July 2022 (UTC)

Are the uncategorized pages in a content namespace? Bawolff (talk) 05:32, 28 July 2022 (UTC)
They are in the main namespace 101.98.196.164 (talk) 05:51, 28 July 2022 (UTC)
that by default is a content namespace, but depending on $wgContentNamespaces it might not be. Bawolff (talk) 00:21, 30 July 2022 (UTC)

Hello people,

I have now already searched everywhere, can not imagine that this does not exist. Is there an extension that sets wiki links automatically? I hope I express myself understandably:

For example, I want the [[Team]] page to be linked everywhere automatically. So everywhere where the word "Team" is written, a link to that page should be created.

Probably it is just called differently, who knows advice?

Thanks again to all of you! Oliver Fleidl (talk) 09:34, 28 July 2022 (UTC)

You may try Extension:TextReplace. So give a task to change "Team" to "[[Team]]". Fokebox (talk) 14:23, 28 July 2022 (UTC)
Or maybe Extension:LinkTitles. Jonathan3 (talk) 21:10, 28 July 2022 (UTC)

Have to login to see my edits in sidebar

I have been tasked with adding pages to an already established wiki. I am trying to add links to the pages I have created to the sidebar, but when I log out, just the items I have added vanish. I need the public to see these links. Is this due to configuration? My account? What needs to be changed? Michaelsalmons (talk) 14:21, 28 July 2022 (UTC)

Complete guess but maybe it's a language thing? Manual:Interface/Sidebar#Translations Jonathan3 (talk) 22:33, 28 July 2022 (UTC)
Are you using varnish (or other cdn ) caching?
Do the links appear after doing a hard refresh? Bawolff (talk) 00:20, 30 July 2022 (UTC)
They don't, no.
It requires that I log in. whereas other links have been added to the sidebar appear without login. Pages I've made in exactly the same way. Michaelsalmons (talk) 18:45, 1 August 2022 (UTC)

How do I fix error 1146?

MediaWiki Version: 1.36.2

PHP Version: 7.4.30 (cgi-fcgi)

MySql Version: 5.6.51-cll-lve

Wiki: http://spare.penguinicewikis.com/mw19/

Hello. I have created another wiki, and when I set up a database for it, the wiki does not seem to be loading. Anyone know how to fix the database query error? What should I do to fix it? How do I configure the database? Thank you for reading. Newman2 (talk) 15:35, 28 July 2022 (UTC)

The database stuff is all here: Manual:Installing_MediaWiki#Set_up_the_database.
Are you using a database from an old wiki? Jonathan3 (talk) 22:35, 28 July 2022 (UTC)
No, I haven't used a database from one of my old wikis. Newman2 (talk) 00:36, 29 July 2022 (UTC)
^Has anyone read the post above? Newman2 (talk) 18:33, 29 July 2022 (UTC)
Yes I have, but I don't know enough about what you've done to know what you've done wrong. I hope somebody else will be able to help. Jonathan3 (talk) 00:06, 30 July 2022 (UTC)
Sounds like your db does not exist. Either you didn't run the installer, or your config for $wgDBName (or other db config vars) is pointing somewhere different then the DB the installer created. Bawolff (talk) 00:18, 30 July 2022 (UTC)
Is this the same as the newer topic "Wiki cannot access database" at Project:Support desk/Flow/2022/07#h-Wiki_cannot_access_database-20220731131300? Jonathan3 (talk) 23:04, 31 July 2022 (UTC)

Can different projects in same language have different translations of *_talk namespaces?

Believe, this really affects one African language: Igbo. On meta request for Wikiquote Igbo, an user pointed that the *_talk namespaces have translated wrongly based on grammar issues, and that user suggested to change it to Ńkàtá_*, but on another Wiktionary request, another user suggested to use kwuookwu_* instead, someone asked me to gain an answer on this conflict of translation changing suggestions here. Liuxinyu970226 (talk) 23:10, 28 July 2022 (UTC)

This sounds more like the Igbo translators need to discuss which one is best.
that said, the answer is yes, namespace names can be overriden on a per project basis and several wikis do (e.g. cswiki jawiki) Bawolff (talk) 00:00, 29 July 2022 (UTC)

Background image based on namespace.

I've been unable to find anything that allows me to do this. The closest I've encountered are the two extensions "SkinPerNamespace", and "SkinPerPage".


https://mysterydungeonwiki.com/wiki/Mystery_Dungeon_Franchise_Wiki


My wiki uses a lot of custom namespaces and namespace themes. I'd like to be able to use series-specific background images for the respective namespaces.


I'd like the Etrian Mystery Dungeon pages to use some official Etrian Mystery Dungeon media, same with Pokémon Mystery Dungeon, etc. Each of the major series features multiple namespaces, from a lore namespace, to individual game namespaces. Ideally, I'd need to be able to do it on an individual basis. SungHerSong (talk) 01:21, 29 July 2022 (UTC)

Each namespace has a different css class (ns-<namespace number>) on the body tag. You can use that to target the css in mediawiki:common.css per namespace Bawolff (talk) 17:15, 29 July 2022 (UTC)

deletebatch.php not adding files to filearchive database table?

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


version: 1.38.1

php: 7.4

database: mariadb v10.6.7

link: https://robloxgalaxy.wiki

I recently tried purging unused images from my wiki using the maintenance script deletebatch.php, but noticed that deletebatch didn't put the deleted files into the filearchive. meaning that while the revisions are deleted, the file itself isnt. how would i go about fixing this?


example: you can see that the script deleted this page: https://robloxgalaxy.wiki/index.php?title=Special:Log&logid=99434 however the file itself is clearly visible and the file does not exist in the filearchive table where it should be after deletion. running the deletebatch.php script on the page again gives: Skipping nonexistent page 'File:KneallMechs1.png' but the file is still clearly there for the public to see, and i cant delete it from the backend using DeleteArchivedFiles.php as its not in the filearchive database table. however i can see the files in the archive database table, which further establishes that the revisions were deleted but not the file itself Smallketchup82 (talk) 04:30, 29 July 2022 (UTC)

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

How can I collapse all headers?

How can I make all headers collapse on page load and expand with down arrow in MediaWiki 1.38?

I found this article - Create Collapsible Content By Heading - jqHeaderSlider and example which is what I want.

How can I get example scripts to work?

I've downloaded them and copied them to my Common.js file but they don't work.

Do I have them in the right order? Or what am I doing wrong or not doing? DStallTX (talk) 16:38, 29 July 2022 (UTC)

I believe during page load the last option to collapse sections is to look for. Tory John (talk) 16:04, 4 August 2022 (UTC)
And how is that supposed to help me fix this issue?
Did you look at my JS code?
Is there anything wrong with it???? DStallTX (talk) 21:07, 10 August 2022 (UTC)

How to collaborate via wikis?

How to collaborate via wikis? KLNPC (talk) 07:51, 30 July 2022 (UTC)

Unwanted default skin fallback for logged out users

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


I've set "vector" (2022) as default skin for my new wiki. When I'm logged in, everything is working as expected. I've tried other skins as well and everything works for a logged in user. But when I'm logged out, the current new vector default skin isn't set. Instead the wiki seems to load the vector legacy fallback skin.


I tried google research but didn't find anything about this problem. Can you help me with this? I'm running my wiki with an https:// ssl setup via Cloudflare. The Wiki works fine, I've also read some documentation about a MediaWiki / Cloudflare setup. But I didn't find my problem or solutions for my problem there.


I hope someone here can help me. I could work with the legacy skin, but I'd really like to use the new one. Especially because I'd like to understand what's the actual problem here. Graufeder (talk) 16:17, 30 July 2022 (UTC)

Ok, I found it out myself after trying a wiki installation on a server without Cloudflare. Had nothing to do with that. All I had to change was setting
$wgDefaultSkin = "vector-2022";
instead of "vector"
Hope this helps anyone with the same problem. Graufeder (talk) 19:44, 30 July 2022 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Wiki cannot access database

MediaWiki Version: 1.36.2

PHP: 7.4.30 (cgi-fcgi)

MySQL Version: 5.6.51-cll-lve

Website: https://spare.penguinicewikis.com/mw19/


Hello. I have started working on my wiki family again, and I created a spare wiki. However, I am still experiencing difficulties.

After running some programs, my new wiki cannot access the database that it is running on.

Does anyone have a solution? Thanks for reading. Newman2 (talk) 13:13, 31 July 2022 (UTC)

What programs?
Is the mysql process running? Is your db host, port etc config correct? Bawolff (talk) 16:51, 31 July 2022 (UTC)
I copied my database on phpMyAdmin and used the copy as the database for my new wiki. Newman2 (talk) 22:12, 31 July 2022 (UTC)
Is this the same as the older topic "How do I fix error 1146?" at Project:Support desk/Flow/2022/07#h-How_do_I_fix_error_1146?-20220728153500? Jonathan3 (talk) 23:04, 31 July 2022 (UTC)
No, it is not the same as the older topic. Newman2 (talk) 23:05, 31 July 2022 (UTC)
Are you intending to replicate your existing wiki? Jonathan3 (talk) 10:10, 1 August 2022 (UTC)
I am not intending to replicate an existing wiki. I am using it for creating future wikis in my wiki family; in this case, using a spare wiki with less data and then transferring it to wikis in other languages. Newman2 (talk) 18:16, 1 August 2022 (UTC)
Maybe create a new database from scratch (or ask your hosting company to do this) and follow the normal installation instructions (rather than copying the database from your existing wiki). Jonathan3 (talk) 19:26, 1 August 2022 (UTC)
It would be better to create a new wiki (hint: maintenance/install.php), but a database copy should work. How have you set up your wiki family? How are you choosing the database? Seems it ends up with a database name which is not the one to which you copied the data Platonides (talk) 23:13, 1 August 2022 (UTC)
If you do want to replicate the old database there's a page "moving a wiki" here that covers that. Jonathan3 (talk) 07:41, 2 August 2022 (UTC)
Is there anything here that helps? Manual:Wiki family
If you already have more than two wikis - what have you done differently this time?
What's in your LocalSettings.php? I don't know much about databases but have you got the grants and database name/username/password right? Jonathan3 (talk) 07:54, 2 August 2022 (UTC)
It's hard to explain that since I haven't been creating wikis or used SSH/phpMyAdmin in awhile. But here is the code for my wiki family:
if ($wikiId === 'main') {
    $wgSitename = "Penguin Ice Wiki";
    $wgServer = "(private)";
    $wgLanguageCode = 'en';
    $wgDBtype = "mysql";
    $wgDBserver = "localhost";
    $wgDBname = "gjlxrtap_mw19758";
    $wgDBuser = "gjlxrtap_mw19758";
    $wgDBpassword = "(private)";
];
}
if ($wikiId === 'en') {
    $wgSitename = "Penguingame Studio";
    $wgServer = "(private)";
    $wgLanguageCode = 'en';
    $wgDBtype = "mysql";
    $wgDBserver = "localhost";
    $wgDBprefix = "mwd50q_";
    $wgDBname = "gjlxrtap_mw33334";
    $wgDBuser = "gjlxrtap_mw33334";
    $wgDBpassword = "(private)";
    $wgDBTableOptions = "ENGINE=InnoDB, DEFAULT CHARSET=binary";
];
}
if ($wikiId === 'en2') {
    $wgSitename = "Penguiconverter";
    $wgServer = "(private)";
    $wgLanguageCode = 'en';
    $wgDBtype = "mysql";
    $wgDBserver = "localhost";
    $wgDBprefix = "mwd50q_";
    $wgDBname = "gjlxrtap_mw34555";
    $wgDBuser = "gjlxrtap_mw34555";
    $wgDBpassword = "(private)";
    $wgDBTableOptions = "ENGINE=InnoDB, DEFAULT CHARSET=binary";
];
}
if ($wikiId === 'eo') {
    $wgSitename = "Penguingame Studio";
    $wgServer = "(private)";
    $wgLanguageCode = 'eo';
    $wgDBtype = "mysql";
    $wgDBserver = "localhost";
    $wgDBprefix = "mwd50q_";
    $wgDBname = "gjlxrtap_mw3333";
    $wgDBuser = "gjlxrtap_mw3333";
    $wgDBpassword = "(private)";
    $wgDBTableOptions = "ENGINE=InnoDB, DEFAULT CHARSET=binary";
];
}
if ($wikiId === 'spare') {
    $wgSitename = "Spare";
    $wgServer = (private);
    $wgLanguageCode = 'en';
    $wgDBtype = "mysql";
    $wgDBserver = "localhost";
    $wgDBprefix = "mwd50q_";
    $wgDBname = "gjlxrtap_mw34556";
    $wgDBuser = "gjlxrtap_mw34556";
    $wgDBpassword = "(private)";
    $wgDBTableOptions = "ENGINE=InnoDB, DEFAULT CHARSET=binary";
]; Newman2 (talk) 18:56, 3 August 2022 (UTC)
Most of your wikis use $wgDBprefix = "mwd50q_"; but main. If you copied the main database, did you rename all tables to add that prefix? That seems the easiest mistake you could have made.
(since you are using separate database you don't need to use table prefixes at all, but in that case they should not be configured) Platonides (talk) 01:33, 4 August 2022 (UTC)