Jump to content

Project:Support desk/Flow/2023/03

Add topic
From mediawiki.org
Latest comment: 1 year ago by 2001:4C4C:1ECA:DB02:B62E:99FF:FEE6:B53F in topic File(/gitinfo/info.json) is not within the allowed path(s)
This page is an archive.
Please ask questions on the current support desk.

Depreciation of getParentRevisionId () is causing an error in Scripto 3.0

We have a website using MediaWiki along with a Scripto module in Omeka that we use to transcribe pages. A recent upgrade to MediaWiki version 1.39.2 caused an error when a user tries to save a page after transcribing and it's because it was looking for getParentRevisionID() which has been depreciated since version 1.38.


Are the developers aware of this error and this inability to use it with Scripto version 1.3.0? Is this resolved when using the latest version of Scripto, which is 1.4.0?


MediaWiki\Content\ValidationParams::getParentRevisionId ()

depreciated since 1.38. 2603:7081:4101:A301:AD03:889B:B5AF:FE14 (talk) 02:52, 1 March 2023 (UTC)

By Scripto, do you mean this? https://github.com/chnm/Scripto
Because it looks like that hasn't been updated since 2017, so it wouldn't surprise me if it's not compatible with newer versions of MediaWiki. I suggest you report the error to the Scripto developers. Sam Wilson 05:37, 1 March 2023 (UTC)
Close, it's the same developer, but it's under Omeka S /omeka-s-modules/Scripto/. You bring up a good point though about reporting the error there. I will do that. Thanks! 2603:7081:4101:A301:AD03:889B:B5AF:FE14 (talk) 14:43, 1 March 2023 (UTC)

Notice: Uncommitted DB writes (transaction from Wikimedia\Rdbms\Database::beginIfImplied

Just downloaded MediaWiki and generated a LocalSettings.php file, and when I went to my index.php, I get greeted with a "Fatal exception of type "InvalidArgumentException"", which I added the code to get the full stack trace and I get this.


Notice: Uncommitted DB writes (transaction from Wikimedia\Rdbms\Database::beginIfImplied (MessageCache::loadFromDB(en)-big)) in C:\xampp\htdocs\wikiDatabase\includes\libs\rdbms\database\TransactionManager.php on line 584

Notice: DB transaction writes or callbacks still pending (LCStoreDB::finishWrite, LCStoreDB::finishWrite, LCStoreDB::finishWrite, LCStoreDB::finishWrite, LCStoreDB::finishWrite, LCStoreDB::finishWrite, LCStoreDB::finishWrite, LCStoreDB::finishWrite, LCStoreDB::finishWrite, LCStoreDB::finishWrite, LCStoreDB::finishWrite, LCStoreDB::finishWrite, LCStoreDB::finishWrite, LCStoreDB::finishWrite, LCStoreDB::finishWrite) in C:\xampp\htdocs\wikiDatabase\includes\libs\rdbms\database\Database.php on line 3757


Tried searching everywhere, even Google or Bing doesn't know and give me 3 results when trying to search certain details of me error that is important.


MediaWiki Version: 1.39.1

PHP Version: 8.1.6

Database Type: MariaDB

Database Version: 10.4.2


I have downloaded MediaWiki and never had this problem before, although it had different specs like different PHP version and such. Jonathanpecany (talk) 06:14, 1 March 2023 (UTC)

Those warnings are probably caused by the error, but are not the error itself. The stacktrace should appear by where it says invalidargumentexception.
Did you place $wgShowExceptionDetails=true; ? Is there a more detailed stack trace? Bawolff (talk) 11:03, 1 March 2023 (UTC)
from C:\xampp\htdocs\wikiDatabase\includes\session\SessionManager.php(255)
#0 C:\xampp\htdocs\wikiDatabase\includes\session\SessionManager.php(169): MediaWiki\Session\SessionManager->getSessionById(string, boolean, WebRequest)
#1 C:\xampp\htdocs\wikiDatabase\includes\Setup.php(448): MediaWiki\Session\SessionManager::getGlobalSession()
#2 C:\xampp\htdocs\wikiDatabase\includes\WebStart.php(86): require_once(string)
#3 C:\xampp\htdocs\wikiDatabase\index.php(44): require(string)
#4 {main}
Here is my stackstrace. Jonathanpecany (talk) 17:11, 1 March 2023 (UTC)
Does the error still persist of you clear all cookies?
Do you have any authentication extensions installed? Bawolff (talk) 17:49, 1 March 2023 (UTC)
I only have 2 cookies and those 2 cookies belongs to other web projects I am making and clearing them would be an inconvenience.
I do have the OATHAuth extension installed. However, to see if my extension is the problem, I disabled all my extensions. Spoiler, none of my extensions are the cause. Jonathanpecany (talk) 18:27, 1 March 2023 (UTC)
Forgot one part, There is an Invalid session ID to that error. Jonathanpecany (talk) 18:32, 1 March 2023 (UTC)
I managed to fix it now. I had my Session.auto start set on. Going to have to optimize it to only disable for the wiki now. Jonathanpecany (talk) 18:35, 1 March 2023 (UTC)

What replaced $this->html( 'headelement' ); in mediawiki skins?

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


I have a mediawiki skin I set up some years ago. It is a simple fixed-width skin. I recently updated mediawiki...

MediaWiki 1.39.2
PHP 8.1.9 (cgi-fcgi)
MySQL 8.0.28-0ubuntu0.20.04.3

...and now the skin does not work. I get the error below, which I understand -- that function is deprecated. What I have not been able to find is what replaced this deprecated call.

Deprecated: Use of QuickTemplate::(get/html/text/haveData) with parameter `headelement` was deprecated in MediaWiki 1.39. [Called from QuickTemplate::html in /home/kaloscomics/wiki.kaloscomics.com/includes/skins/QuickTemplate.php at line 168] in /home/kaloscomics/wiki.kaloscomics.com/includes/debug/MWDebug.php on line 381

The code which generates that error is:

    public function execute() {
        global $wgSitename;

        $this->data['pageLanguage'] = $this->getSkin()->getTitle()->getPageViewLanguage()->getHtmlCode();

        $this->html( 'headelement' );

I have looked at other skins for similar code. I have searched for every combination of "headelement" "mediawiki" and "deprecated" I can think of. I have been searching for days for a clue to this. I have not found a single reference anywhere on what to replace that call with.

I would really rather not completely rebuild the skin from scratch. Is that what I am faced with? Bblackmoor (talk) 19:30, 1 March 2023 (UTC)

There's no exact replacement, because how the logic works has changed. What you should do now is to add the skin option bodyOnly: true to your skin.json file, and avoid calling the deprecated method. The element will be generated for you. – Ammarpad (talk) 22:26, 1 March 2023 (UTC)
Thank you. I have done that, and it eliminated the errors, but now the skin does not have the header section, the footer section, the side menu... so my question remains: what replaced the deprecated calls? How can I display those parts of the layout? Bblackmoor (talk) 22:55, 1 March 2023 (UTC)
On further consideration, I think I will rebuild the theme. At this point, I think that will be simpler. Thank you, though. Bblackmoor (talk) 23:14, 1 March 2023 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

How to Create an Account in the "A Wiki of Ice and Fire" Realm

Hello, and thanks in advance for your time! :

I've been able to create an account here on MediaWiki, but I see no place where I can make one for "A Wiki of Ice and Fire."

Any suggestions would be greatly appreciated. Thanks again! 2eelShmeal (talk) 05:31, 2 March 2023 (UTC)

I'd really like to help out with editing, most especially with spelling, grammar, punctuation, capitalization, and the like. Cheers. 2eelShmeal (talk) 05:33, 2 March 2023 (UTC)
@2eelShmeal: It looks like they have a help page about how to register: https://awoiaf.westeros.org/index.php/Help:Registration Sam Wilson 07:27, 2 March 2023 (UTC)

Error: The file for "file" could not be stored for processing due to a server misconfiguration (no temporary directory).

I am getting this error when I try to upload a file to my CentOS8 server. I have tried setting the path in LocalSettings as below and on both instances it does not work. All other images are rendering properly as intended, only uploads not working.


User apache has read and write rights to the temp folder

$wgEnableUploads = true;

$wgFileExtensions = array('png','gif','jpg','jpeg','ogg','mp3','svg','bmp');

$wgUseImageMagick = true;

$wgImageMagickConvertCommand = "/usr/bin/convert";

$wgTmpDirectory = false;

-------Second configuration tried-------

$wgEnableUploads = true;

$wgFileExtensions = array('png','gif','jpg','jpeg','ogg','mp3','svg','bmp');

$wgUseImageMagick = true;

$wgImageMagickConvertCommand = "/usr/bin/convert";

$wgTmpDirectory ="/var/www/html/w/images/temp";

Product Version
MediaWiki 1.37.1
PHP 7.4.33 (fpm-fcgi)
MariaDB 10.3.28-MariaDB

Gachangi (talk) 11:07, 2 March 2023 (UTC)

For the second config, does /var/www/html/w/images/temp actually exist and is writable by webserver (and selinux is not preventing writing?)? Bawolff (talk) 12:34, 2 March 2023 (UTC)
Yes apache has full read and write and even execute, see below;
drwxrwxrwx.  2 apache apache  41 Mar  2 10:34 Gachangi (talk) 14:54, 2 March 2023 (UTC)
A reboot for me solved this issue Gachangi (talk) 10:19, 3 March 2023 (UTC)

Problem after upgrade from 1.34.1 to 1.39.2

Hi,

I've just upgraded from 1.34.1 to 1.39.2. Followed the instructions on first replacing the files and then upgrading existing installation from the web page. It said the installation was complete, but I'm getting an error now when I tried to load the front page. Apologies for the absolute noob question but I've googled it and looked at the FAQ and I'm not sure what to do.

MediaWiki internal error.

Original exception: [ZACOZI-wwffpN8ZGFLgX1QAAAAI] /wiki/index.php Error: Class 'Revision' not found

Backtrace:

from /opt/lampp/htdocs/mediawiki-1.39.2/extensions/Gadgets/includes/MediaWikiGadgetsDefinitionRepo.php(139)

#0 /opt/lampp/htdocs/mediawiki-1.39.2/extensions/Gadgets/includes/MediaWikiGadgetsDefinitionRepo.php(108): MediaWikiGadgetsDefinitionRepo->fetchStructuredList()

#1 /opt/lampp/htdocs/mediawiki-1.39.2/includes/libs/objectcache/wancache/WANObjectCache.php(1689): MediaWikiGadgetsDefinitionRepo->{closure}(boolean, integer, array, NULL, array)

#2 /opt/lampp/htdocs/mediawiki-1.39.2/includes/libs/objectcache/wancache/WANObjectCache.php(1522): WANObjectCache->fetchOrRegenerate(string, integer, Closure, array, array)

#3 /opt/lampp/htdocs/mediawiki-1.39.2/extensions/Gadgets/includes/MediaWikiGadgetsDefinitionRepo.php(115): WANObjectCache->getWithSetCallback(string, integer, Closure, array)

#4 /opt/lampp/htdocs/mediawiki-1.39.2/extensions/Gadgets/includes/MediaWikiGadgetsDefinitionRepo.php(31): MediaWikiGadgetsDefinitionRepo->loadGadgets()

#5 /opt/lampp/htdocs/mediawiki-1.39.2/extensions/Gadgets/includes/GadgetRepo.php(71): MediaWikiGadgetsDefinitionRepo->getGadgetIds()

#6 /opt/lampp/htdocs/mediawiki-1.39.2/extensions/Gadgets/includes/GadgetHooks.php(44): GadgetRepo->getStructuredList()

#7 /opt/lampp/htdocs/mediawiki-1.39.2/includes/HookContainer/HookContainer.php(338): GadgetHooks::userGetDefaultOptions(array)

#8 /opt/lampp/htdocs/mediawiki-1.39.2/includes/HookContainer/HookContainer.php(137): MediaWiki\HookContainer\HookContainer->callLegacyHook(string, array, array, array)

#9 /opt/lampp/htdocs/mediawiki-1.39.2/includes/HookContainer/HookRunner.php(4158): MediaWiki\HookContainer\HookContainer->run(string, array)

#10 /opt/lampp/htdocs/mediawiki-1.39.2/includes/user/DefaultOptionsLookup.php(110): MediaWiki\HookContainer\HookRunner->onUserGetDefaultOptions(array)

#11 /opt/lampp/htdocs/mediawiki-1.39.2/includes/user/UserOptionsManager.php(596): MediaWiki\User\DefaultOptionsLookup->getDefaultOptions()

#12 /opt/lampp/htdocs/mediawiki-1.39.2/includes/user/UserOptionsManager.php(498): MediaWiki\User\UserOptionsManager->loadOriginalOptions(User, integer, NULL)

#13 /opt/lampp/htdocs/mediawiki-1.39.2/includes/user/UserOptionsManager.php(148): MediaWiki\User\UserOptionsManager->loadUserOptions(User, integer)

#14 /opt/lampp/htdocs/mediawiki-1.39.2/includes/context/RequestContext.php(460): MediaWiki\User\UserOptionsManager->getOption(User, string)

#15 /opt/lampp/htdocs/mediawiki-1.39.2/includes/StubUserLang.php(34): RequestContext->getLanguage()

#16 /opt/lampp/htdocs/mediawiki-1.39.2/includes/StubObject.php(223): StubUserLang->_newObject()

#17 /opt/lampp/htdocs/mediawiki-1.39.2/includes/StubObject.php(103): StubObject->_unstub(string, integer)

#18 /opt/lampp/htdocs/mediawiki-1.39.2/includes/content/ContentHandler.php(727): StubObject::unstub(StubUserLang)

#19 /opt/lampp/htdocs/mediawiki-1.39.2/includes/Title.php(3944): ContentHandler->getPageLanguage(Title)

#20 /opt/lampp/htdocs/mediawiki-1.39.2/includes/OutputPage.php(2555): Title->getPageLanguage()

#21 /opt/lampp/htdocs/mediawiki-1.39.2/includes/OutputPage.php(2687): OutputPage->addAcceptLanguage()

#22 /opt/lampp/htdocs/mediawiki-1.39.2/includes/OutputPage.php(2798): OutputPage->sendCacheControl()

#23 /opt/lampp/htdocs/mediawiki-1.39.2/includes/MediaWiki.php(922): OutputPage->output(boolean)

#24 /opt/lampp/htdocs/mediawiki-1.39.2/includes/MediaWiki.php(562): MediaWiki->main()

#25 /opt/lampp/htdocs/mediawiki-1.39.2/index.php(50): MediaWiki->run()

#26 /opt/lampp/htdocs/mediawiki-1.39.2/index.php(46): wfIndexMain()

#27 {main}


Exception caught inside exception handler: [ZACOZI-wwffpN8ZGFLgX1QAAAAI] /wiki/index.php Error: Class 'Revision' not found

Backtrace:

from /opt/lampp/htdocs/mediawiki-1.39.2/extensions/Gadgets/includes/MediaWikiGadgetsDefinitionRepo.php(139)

#0 /opt/lampp/htdocs/mediawiki-1.39.2/extensions/Gadgets/includes/MediaWikiGadgetsDefinitionRepo.php(108): MediaWikiGadgetsDefinitionRepo->fetchStructuredList()

#1 /opt/lampp/htdocs/mediawiki-1.39.2/includes/libs/objectcache/wancache/WANObjectCache.php(1689): MediaWikiGadgetsDefinitionRepo->{closure}(boolean, integer, array, NULL, array)

#2 /opt/lampp/htdocs/mediawiki-1.39.2/includes/libs/objectcache/wancache/WANObjectCache.php(1522): WANObjectCache->fetchOrRegenerate(string, integer, Closure, array, array)

#3 /opt/lampp/htdocs/mediawiki-1.39.2/extensions/Gadgets/includes/MediaWikiGadgetsDefinitionRepo.php(115): WANObjectCache->getWithSetCallback(string, integer, Closure, array)

#4 /opt/lampp/htdocs/mediawiki-1.39.2/extensions/Gadgets/includes/MediaWikiGadgetsDefinitionRepo.php(31): MediaWikiGadgetsDefinitionRepo->loadGadgets()

#5 /opt/lampp/htdocs/mediawiki-1.39.2/extensions/Gadgets/includes/GadgetHooks.php(150): MediaWikiGadgetsDefinitionRepo->getGadgetIds()

#6 /opt/lampp/htdocs/mediawiki-1.39.2/includes/HookContainer/HookContainer.php(338): GadgetHooks::beforePageDisplay(OutputPage, MediaWiki\Skins\Vector\SkinVectorLegacy)

#7 /opt/lampp/htdocs/mediawiki-1.39.2/includes/HookContainer/HookContainer.php(137): MediaWiki\HookContainer\HookContainer->callLegacyHook(string, array, array, array)

#8 /opt/lampp/htdocs/mediawiki-1.39.2/includes/HookContainer/HookRunner.php(945): MediaWiki\HookContainer\HookContainer->run(string, array, array)

#9 /opt/lampp/htdocs/mediawiki-1.39.2/includes/OutputPage.php(2871): MediaWiki\HookContainer\HookRunner->onBeforePageDisplay(OutputPage, MediaWiki\Skins\Vector\SkinVectorLegacy)

#10 /opt/lampp/htdocs/mediawiki-1.39.2/includes/exception/MWExceptionRenderer.php(183): OutputPage->output()

#11 /opt/lampp/htdocs/mediawiki-1.39.2/includes/exception/MWExceptionRenderer.php(102): MWExceptionRenderer::reportHTML(Error)

#12 /opt/lampp/htdocs/mediawiki-1.39.2/includes/exception/MWExceptionHandler.php(131): MWExceptionRenderer::output(Error, integer)

#13 /opt/lampp/htdocs/mediawiki-1.39.2/includes/exception/MWExceptionHandler.php(248): MWExceptionHandler::report(Error)

#14 /opt/lampp/htdocs/mediawiki-1.39.2/includes/MediaWiki.php(584): MWExceptionHandler::handleException(Error, string)

#15 /opt/lampp/htdocs/mediawiki-1.39.2/index.php(50): MediaWiki->run()

#16 /opt/lampp/htdocs/mediawiki-1.39.2/index.php(46): wfIndexMain()

#17 {main} Mcaque (talk) 12:07, 2 March 2023 (UTC)

probably indicates php files are corrupted or you have a mix of two different versions of mediawiki.
Try redownloading the files for the new version of mediawiki. Bawolff (talk) 12:33, 2 March 2023 (UTC)

mediawiki1.18.6 upgrade issue

I ran the upgrade from 1.17.5 to 1.18.6 and now the website gives a 501 error.

the upgrade was run in the command line and it seemed to run to fast with no screen messages. I can't test the site if it worked. do i carry on to 1.19....? Gwilmot (talk) 12:37, 2 March 2023 (UTC)

Did you really upgrade from an 11 year old version to a 10 year old version? Why? :)
How did you run the upgrade exactly? Where did you get these old versions from?
Please check the webserver log of your webserver software for errors. Malyacko (talk) 13:20, 2 March 2023 (UTC)
Thanks for the response, You are as shocked as me! I started the upgrade from 1.15.1 to 1.16.5 all seems ok.
Then ran the upgrade to 1.17.5 and I got it to " Populating rev_id Column ... doing rev_id from 1 to 200 " then repeated waiting for localhost ( Lagged ... )
control C and tested mediawiki seemed ok. so moved on to 1.18.6 I am guessing I haven't completed the 1.17.5 update hence the next version increase is failing. I then ran the populateRevisionLength.php manually then the update.php and the upgrade completed ok. now the upgrade to 1.18.6 runs though with out any screen messages, i am assuming it is not working so need to find the error log. any assistance would be greatly appreciated. Gwilmot (talk) 13:47, 2 March 2023 (UTC)
You shouldn't need to go through every version. I think it's only the really old versions (maybe 1.6 and below?) that you can't upgrade directly from, and only the really new versions (maybe 1.36 and later?) that insist you are only two LTS versions behind. Anyway, I think you should start again from your backup, and go straight to something like 1.27, then 1.35.
Or maybe you could just export the pages, install a new version from scratch, and import the pages. Jonathan3 (talk) 22:23, 2 March 2023 (UTC)
Thank you Jonathan3 I shall try that. Gwilmot (talk) 09:27, 3 March 2023 (UTC)

Regular run to the bot

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 run a bot through paws. How can I set it to run automatically every day or every week? Thanks! Neriah (talk) 16:41, 2 March 2023 (UTC)

You should use Toolforge. Read Toolforge quickstartAmmarpad (talk) 19:09, 2 March 2023 (UTC)
@Ammarpad Can this be done using paws? I don't like using Toolforge... Neriah (talk) 11:53, 3 March 2023 (UTC)
In you original post you said you're already using PAWS to run a bot. So what are you asking now? – Ammarpad (talk) 15:28, 3 March 2023 (UTC)
PAWS does not currently provide cron or other scheduling engines, so your only option there is manual execution. As Ammarpad has suggested, Toolforge would allow scheduled jobs using wikitech:Help:Toolforge/Jobs framework. BDavis (WMF) (talk) 21:47, 3 March 2023 (UTC)
@Ammarpad@BDavis (WMF) OK, Thank you! Neriah (talk) 09:04, 6 March 2023 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

css-sanitizer - where does it go, how do you turn it on?

I've tried using modules like TemplateStyles (and others) that seem to require the css-sanitizer library. Presumably you git clone this into resources/lib ? What do you have to fiddle with to get it recognized? Does something need to be added to LocalSettings.php? 68.160.173.53 (talk) 19:14, 2 March 2023 (UTC)

You need to run composer install in the TemplateStyles extension directory.
If you dont want to fiddle with that, download from Special:ExtensionDistributor/TemplateStyles which comes with css-sanitizer included. Bawolff (talk) 22:22, 2 March 2023 (UTC)

How to get usernames of visitors on a page through Pwik API?

Is there anyway to get the users/usernames of who visits a specific page through Pwik, using the API? Once I am signed in as the admin I can see the usernames in the visits logs in the UI, but I'd like to do it programmatically and haven't found how to do it using the API.


Alternatively, is there a way to query the database for the same information? I'm not very sql savvy and haven't found the right tables to query (if it's possible).


I am currently getting the visits metrics using the Pwik Actions.getPageURL method but have users who are wanting a lthe users as well. Currently using Matomo/Pwik 4.7.1


Thank you and appreciate any advice! DrpepperUser (talk) 23:31, 2 March 2023 (UTC)

Global usage of files not shown on file pages

I have a group of wikis hosted on a server. After I installed Extension:GlobalUsage on all these wikis and specified the central one, Special:GlobalUsage worked, but global usage of files is not shown at the bottom of file pages. What could be the reason? HyperNervie (talk) 04:24, 3 March 2023 (UTC)

PersonalUrls Hook deprecated. Alternatives?

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 use single-sign-on (SSO) to tie all areas of my site together. The SSO uses PersonalUrls hook to disable the login & anonlogin (special:login) functionality. It worked flawlessly in MediaWiki (MW) 1.38, but Upgrading to MW 1.39 now gives a PHP Deprecated: Use of PersonalUrls hook ... was deprecated in MediaWiki 1.39. message. Is there another hook or feature that can be used to control/override/disable the login page in MW 1.39+? I mean without taking a meat cleaver to the MW core code?
Thank you for taking the time to read my question. Medicinestorm (talk) 04:43, 3 March 2023 (UTC)
See Manual:Hooks/PersonalUrlsTheDJ (Not WMF) (talkcontribs) 09:52, 6 March 2023 (UTC)
Thanks. I'm sure I seem pretty dense, but I did see the note at the top of that page before I asked here. The problem was, I looked at Manual:Hooks/SkinTemplateNavigation, gave it a try, and got a deprecated error for that as well. Didn't realize it wasn't the same as Manual:Hooks/SkinTemplateNavigation::Universal Medicinestorm (talk) 03:34, 14 March 2023 (UTC)
See also the hint in Release notes/1.39 Malyacko (talk) 08:56, 3 March 2023 (UTC)
Thanks. I'm sure I seem pretty dense, but I did see the hint in the release notes before I asked here. The problem was, I looked at Manual:Hooks/SkinTemplateNavigation, gave it a try, and got a deprecated error for that as well. Didn't realize it wasn't the same as Manual:Hooks/SkinTemplateNavigation::Universal Medicinestorm (talk) 03:35, 14 March 2023 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

dpl3 lists update automatically ?

according to the manual : "DPL lists are automatically updated whenever said data changes." but I have to edit and save a page with DPL pattern to force all DPL lists to update.

In the DPL3 page on this wiki : "by default all output is cached for a period of one hour to reduce the need to rerun the query every page load"


Is it possible to force DPL3 to refresh lists when users add or edit pages ?

I see this question in this support desk, in the DPL3 talk page and in other forums from almost 7 years without seeing an answer. I don't see any counter-indications on a small wiki that doesn't allow public editing Marcellinjobard (talk) 12:50, 4 March 2023 (UTC)

Depth of templates?

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


I seem to run into an issue where templates nested to a certain depth don't display... what is that number, and can I change it? (i.e. if its default is set to 3, can I go to 4?)

ex:

Page>All Items for sale > each item > each item details Celyn Kendrick (talk) 19:32, 4 March 2023 (UTC)

Manual:$wgMaxTemplateDepth. Default is 100 so maybe your issue is something else? If you view html source there should be a comment saying all the limits. Bawolff (talk) 21:14, 4 March 2023 (UTC)
Thanks. It was all the onlyinclude/includeonly tags messing things up. I think I've got it sorted out now. Celyn Kendrick (talk) 06:54, 5 March 2023 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Unable to log into any mediawiki site other than this one

Whenever I try to log into any mediawiki hosted wiki, I receive an "incorrect username or password" error. I have verified that I am using the correct username and password, it persists across browsers, it persists in incognito mode, it persists across devices.

Any assistance is welcome. Entropy2 (talk) 20:31, 4 March 2023 (UTC)

How did you verify that you have "correct username and password" in the first place. – Ammarpad (talk) 20:38, 4 March 2023 (UTC)
Typed to separate notepad, pasted both here and the wikis in question. Worked here, did not work at the wikis. Entropy2 (talk) 21:25, 4 March 2023 (UTC)
What is the wiki in question? Bawolff (talk) 01:36, 5 March 2023 (UTC)
Note that, in general, each wiki has its own login information. While on all WMF wikis you use the same username and password to login, this is not true for external wikis. There's no "unified login" system across all MediaWiki wikis on the Internet. Ciencia Al Poder (talk) 17:28, 6 March 2023 (UTC)

Template inside of template parameter

I have a template that includes a 'citation' parameter. That parameter might contain {{cite web|title=website}} or {{cite book|title=book}}.


I would like to use this parameter two different ways in the template. First, I want to display the text exactly as it is: {{cite book|title=book}}. Secondly, I would like to actually invoke the cite template to format the citation as a citation.


I can't figure out how to get it to display exactly as entered in the parameter: {{cite book|title=book}}. Ideally, I would prefer it to display as code using the <code> tag. Redheadkelly (talk) 01:57, 5 March 2023 (UTC)

Its not possible. At best you could (with scribunto) load the wikitext of the original page and try to find the template invocation (i dont reccomend this).
You could of course make the parameter be not a template and just the template name.
See also phab:T322513 Bawolff (talk) 02:08, 5 March 2023 (UTC)
Thanks for the response. I did work around it that way in some situations. Was trying to prevent creating a ton of templates, but may have to. Thanks again. Redheadkelly (talk) 01:29, 17 March 2023 (UTC)

New article I can’t get it written for Drug Adicts Anonymous Uk

Would I be able to ask someone to write an article for our group we just don’t have the know how and it’s a very good potential article I just need help to write it Jamieparrie (talk) 13:19, 5 March 2023 (UTC)

This is not the place to ask. You could try asking at w:WP:Teahouse or somewhere like that, but its unlikely someone will just write an article for you.
Please also be aware of w:WP:COI Bawolff (talk) 13:25, 5 March 2023 (UTC)

Error contacting the Parsoid/RESTBase server: http-request-error

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


Bug (Error) on FreeBSD install. Never been able to use the VisualEditor, instructions for FreeBSD is sparse or outdated. Is there a simple solution to get this to work?

Product Version
MediaWiki 1.39.2
PHP 8.2.0 (fpm-fcgi)
MySQL 5.7.40-log
ICU 72.1
Pygments 2.11.2
VisualEditor 0.1.2

$wgServer = "https://wikidev.company.com";

$wgScriptPath = "";

wfLoadExtension( 'VisualEditor' );

wfLoadExtension( 'Parsoid', 'vendor/wikimedia/parsoid/extension.json' );

$wgVirtualRestConfig['modules']['parsoid'] = array(

    // URL to the Parsoid instance.

    // You should change $wgServer to match the non-local host running Parsoid.

    // Note! This is a server to server URL (it must be valid within your network).

    // For a VM or docker this will probably be correct:

//    'url' => "https://wikidev.company.com/rest.php",

'url' => $wgServer . $wgScriptPath . '/rest.php',

    //'url' => $wgServer . '/rest.php',

    // Parsoid "domain", see below (optional, rarely needed)

    //'domain' => 'localhost',

);


Inside the Jail running Mediawiki:

❯ hostname

wikidev.company.com


USER     COMMAND    PID   FD PROTO  LOCAL ADDRESS         FOREIGN ADDRESS

www      php-fpm    84685 6  tcp4   10.10.10.75:9000    *:*

www      php-fpm    83622 6  tcp4   10.10.10.75:9000    *:*

root     php-fpm    83000 8  tcp4   10.10.10.75:9000    *:*

www      nginx      80166 8  tcp4   10.10.10.75:80      *:*

www      nginx      80166 9  tcp4   10.10.10.75:443     *:*

root     nginx      79220 8  tcp4   10.10.10.75:80      *:*

root     nginx      79220 9  tcp4   10.10.10.75:443     *:*

mysql    mysqld     72241 34 tcp4   10.10.10.75:3306    *:*

root@wikidev ~ ❯


VM hosting the jail:


em0: 192.168.1.245

bastille0:10.10.10.75

hostname

server2.company.com


rdr 80 80

rdr 443 443

rdr 9000 Kroulingor (talk) 04:02, 6 March 2023 (UTC)

$wgGroupPermissions['*']['writeapi'] = true; Kroulingor (talk) 04:15, 6 March 2023 (UTC)
anyone?? Kroulingor (talk) 14:07, 6 March 2023 (UTC)
{"messageTranslations":{"en":"The requested relative path () did not match any known handler"},"httpCode":404,"httpReason":"Not Found"} Kroulingor (talk) 15:19, 6 March 2023 (UTC)
Is there an authoritative current manual for this anywhere? is there a workaround? can I run my own Parsoid server? if so how? I can't find any current documentation for this. Kroulingor (talk) 15:21, 6 March 2023 (UTC)
🦗 Kroulingor (talk) 17:38, 6 March 2023 (UTC)
Any ideas where to start troubleshooting this Kroulingor (talk) 02:30, 7 March 2023 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Cannot edit and save Main_Page

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


Hi all,

I wonder if someone can help, I have suddenly lost the ability to edit the Main_Page ( I have previously) When I edit it and click "save changes" I get a 403.

I havent needed to make an edit for a while so I cannot tell when it stopped working.


I have also noticed if I go to "Active users" in special pages and click a username I also get a 403.

I did have to revert to a backup last year so I am wondering if some of the file/folder permissions are wrong?


However I can edit other pages without any issues and can also create new pages and save them without any issues.


I cant get my head around it, any advice would be very much appreciated.


Running version 1.39.2 on Linux.

PHP Version 7.4.33

MariaDB 10.5.19-MariaDB-cll-lve


Kind Regards

J Jaylam1313 (talk) 14:45, 6 March 2023 (UTC)

Please ignore this, after adding:
SecRuleEngine Off
to my .htaccess file it worked.
This setting was there before but looks like when I rolled back to a backup it removed it. Jaylam1313 (talk) 16:15, 6 March 2023 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Empty Pages After Backup Restore

During a test upgrade from 1.35.5 to 1.35.7, after restoring a production backup on a test Mediawiki server as part of my team's usual regression tests, I noticed that the main page of one of my organization's wikis had no content. Further investigation showed that most pages still had links on the Special:AllPages page, but all of their content was missing.


The situation described in Project:Support desk/Flow/2022/12#h-Pages_seem_to_be_gone-20221203122000 seems to be very similar to my situation, with one key difference. I first confirmed that revision.rev_actor is zero in the DB for an existing page as stated in the linked topic. The below is from the test server, after the production backup was restored on it.


[root@wiki-test wiki] # mysql TESTWIKI_wiki MariaDB [TESTWIKI_wiki]> select * from page where page_title = "TITLE" -> ; +---------+----------------+------------+-------------------+------------------+-------------+----------------+----------------+--------------------+-------------+----------+--------------------+-----------+ | page_id | page_namespace | page_title | page_restrictions | page_is_redirect | page_is_new | page_random | page_touched | page_links_updated | page_latest | page_len | page_content_model | page_lang | +---------+----------------+------------+-------------------+------------------+-------------+----------------+----------------+--------------------+-------------+----------+--------------------+-----------+ | 372 | 0 | TITLE | | 0 | 0 | 0.338258093396 | 20221216145154 | 20221216145154 | 1783 | 2868 | wikitext | NULL | +---------+----------------+------------+-------------------+------------------+-------------+----------------+----------------+--------------------+-------------+----------+--------------------+-----------+ 1 row in set (0.00 sec)

MariaDB [TESTWIKI_wiki]> select * from revision where rev_id = 1783; +--------+----------+----------------+-----------+----------------+----------------+-------------+---------+---------------+---------------------------------+ | rev_id | rev_page | rev_comment_id | rev_actor | rev_timestamp | rev_minor_edit | rev_deleted | rev_len | rev_parent_id | rev_sha1 | +--------+----------+----------------+-----------+----------------+----------------+-------------+---------+---------------+---------------------------------+ | 1783 | 372 | 0 | 0 | 20221216145154 | 0 | 0 | 2868 | 1770 | k3ozgk0xr80lk5wkxdy7h0qlqud5xig | +--------+----------+----------------+-----------+----------------+----------------+-------------+---------+---------------+---------------------------------+ 1 row in set (0.00 sec)


I then confirmed the same situation in the live DB of the production wiki that the backup was created from, just in case this specific field wasn't being recorded in the backup for some reason. This is when I noticed the key difference from the topic linked above: revision.rev_actor is indeed empty in the live production DB, but the wiki UI is still keeping track of edits correctly. The Revision History of this page on the production wiki shows the correct usernames and timestamps for edits as of 2023-02-09. This suggests that this information is being tracked somewhere, but isn't being recorded in the database (correctly or at all).


In summary: The production wiki is correctly keeping track of revision history in the interface. When a backup of the wiki is restored on a different server, however, revision history of most pages is lost because revision.rev_actor is zero in its database.


The maintenance scripts referenced in the linked topic were ran but did not make any noticeable changes, even when forced. I cannot revert to an earlier backup as suggested as I am unsure when this problem was introduced and significant changes to wiki pages have certainly been made since then.


I am unsure how to proceed from this point. I would like to preserve as much revision history as possible. Please assist with finding a solution to this problem. Please note that this is a private wiki setup, so I may not be able to share detailed information and may need to obfuscate some data.


Versions & Environment

MediaWiki = 1.35.5

PHP = 7.3.33 (apache2handler)

MariaDB = 5.5.68-MariaDB

Two servers: wiki (production) and wiki-test (test)

Each hosts multiple independent wikis using the giant switch statement CrimsonKeyboard (talk) 20:01, 6 March 2023 (UTC)

Does anyone have any suggestions? CrimsonKeyboard (talk) 19:02, 9 March 2023 (UTC)
Can someone provide a suggestion please? CrimsonKeyboard (talk) 19:57, 17 March 2023 (UTC)
You may be viewing a cached history page or something,or there may be some entries in the objectcache. Regardless the problem is the same as the other people having this issue. Bawolff (talk) 22:06, 17 March 2023 (UTC)
Thank you for replying. I apologize for the delayed response; I was not notified of your message.
Based on the information I have, I don't think the accurate revision history is due to a cache, as several pages of the affected wiki have been edited and have continued to retain accurate history since I created this post. The server as well as my workstation have been rebooted a few times, if that clears any caches.
Since the problem has already been reported, do you suggest the best path forward is to test solutions provided in posts such as Project:Support desk/Flow/2022/12#h-Pages_seem_to_be_gone-20221203122000? CrimsonKeyboard (talk) 12:49, 23 March 2023 (UTC)
I have determined the situation I'm facing is more like the one mentioned in Project:Support desk/Flow/2020/11#h-Missing_pages,_but_data_appear_to_be_intact-2020-11-21T01:37:00.000Z. It appears the page revision history of at least the wiki I'm focusing on now is being tracked in the revision_actor_temp and revision_comment_temp tables; these tables contain accurate revision history as of yesterday. If I'm understanding things correctly, these tables are supposed to be joined to the actor and comment tables, respectively, but the fact that revision.rev_actor is zero means that something has gone wrong during a previous upgrade.
I'm currently getting the test system cleaned up and more reflective of the production system. After that, I'll start testing the various solutions proposed in the two mentioned forum posts. If any are successful, I plan to return and share.
If anyone has any known solutions or additional suggestions, please feel free to state them. CrimsonKeyboard (talk) 19:42, 23 March 2023 (UTC)
This happens when going from 1.35.5 to 1.35.7? That's an update without schema changes. Wow, MediaWiki really starts to freak out as of late. My recent experience described in this post worked when going from pre 1.31 to 1.35 and beyond. [[kgh]] (talk) 20:05, 23 March 2023 (UTC)
Yes, from the testing I've done so far, the problem with the empty pages appears to be due to something introduced after 1.35.5. Restoring a 1.35.5 production wiki backup on a 1.35.5 test wiki server results in pages with all expected content; restoring the same backup on a 1.35.7 test wiki server results in pages with no content. When I continue testing next week, I'm planning to see if I can narrow the affected version to 1.35.6 or 1.35.7 in case it's useful, then start testing proposed solutions for the all-zero revision.rev_actor column (using a 1.35.5 wiki). Hopefully fixing that will fix the empty pages, or at least narrow the problem down further.
Thanks for the link. I'll review it in more detail when I get back to testing. CrimsonKeyboard (talk) 18:01, 24 March 2023 (UTC)
I have completed testing and investigation and have determined the original problem (existing but empty pages after a backup was restored) was due to one of my team's regression tests. The tests are scripted, and one of them involved intentionally deleting a specified user account from a certain wiki's database to test required functionality. I now know that deleting an account from the database is not recommended and have deactivated the test until a better one can be identified. This was just now noticed because the admin whose account was used for the test hadn't done many page edits until recently; now that they've edited several pages, the most obvious being the wiki's main page, the revision history of these pages gets messed up when the user account is removed from the wiki database.
Troubleshooting this issue did reveal the previously-unknown (by me) problem with revision.rev_actor. I plan to attempt solutions proposed in the forum topics that have been referenced in this topic on our test system in the coming days. I will create a new post if I need further assistance.
Thanks to everyone who helped with this matter. CrimsonKeyboard (talk) 18:32, 13 April 2023 (UTC)

Special character conversion

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


Is there an extension or way of converting characters like ü to u, é to e, etc.?

My pagename: Siân, and how an extension converts it into an id="text-Sian-234280". I'm using a css to search for ids containing "Siân" but I need to convert it to "Sian" first. PAGENAME type converters just turn it into hexcode... which doesn't work. Celyn Kendrick (talk) 00:25, 7 March 2023 (UTC)

I dont know why one would want to convert an id like that. Ids are allowed to have fany characters.
But anyways, i would first say look at what the extension generating the id is doing and copy that. Since you want it to be exactly the same.
Beyond that, i guess my go to would be to convert to unicode NFKD, and then regex out any bytes in range [\x80-\xff]. It should be possible to do this with scribunto.
There are also probably fancier accent-folding algorithms, although there probably aren't ready made extensions for them. Bawolff (talk) 07:07, 7 March 2023 (UTC)
I suspect the extension does it through backend code, and I'm trying to just feed things in through the template without having to create my own extensions or dig too deep. (I mean, I *could* dig into the backend, but it seems like a messy solution for a seemingly simple problem). I'm new to mediaWiki, and while I accept I need to do a fair amount of coding on templates to get things to display how I want, I'm trying to approach it like a n00b web-facing "user" and not rely on my background as a coder. Maybe that's the wrong way to look at it, but I thought the wiki idea was so laypeople could configure/edit pages? Celyn Kendrick (talk) 17:02, 7 March 2023 (UTC)
What extension is this? FWIW, this is the first time I've heard of an extension doing something like this. The closest thing I'm aware of is old mediawiki would use ids like "Si.C3.A2n", but that's different then the syntax you presented. The syntax you mentioned is also different from punycode ("xn--sin-jla"). Anyways, knowing which extension is making these ids, would help to know what exactly the transformation it is doing is, which might help in finding a MediaWiki functionality to emulate it. Bawolff (talk) 20:00, 7 March 2023 (UTC)
I think it's Mermaid that's the issue... I'm using Genealogy to render a mermaid tree, and am trying to highlight the PAGENAME person's name in the tree, as it's not always centered or obvious. To do this, I have to do a css partial match on the id, which uses a munged version of PAGENAME. Got it to work... with a really clunky ASCII template. Celyn Kendrick (talk) 20:40, 7 March 2023 (UTC)
Well, apparently I don't even need to get the id... it's always the first node, which makes it easier... :-/ Couldn't figure this out until I had some extensive trees though. Celyn Kendrick (talk) 21:09, 7 March 2023 (UTC)
Ok.
So i think the translation comes from https://github.com/wikimedia/mediawiki-extensions-Genealogy/blob/master/src/TreeFormatter.php#L74 - where its primarily meant for compatibility with graphviz, but the code is reused.
It is using iconv library followed by the ICU library, neither are particularly available in the wiki. The closest is definitely Scribunto's mw.ustring.toNFD [1] (toNFKD would be better, but what can you do) followed by stripping any non-ascii characters.
Perhaps User:samwilson has some thoughts. Bawolff (talk) 21:30, 7 March 2023 (UTC)
Ok. I grudgingly put on my coder's hat and took a look at the backend because I was trying to strip my new namespace from the mermaid labels. But I saw this in my journeys. It appears to be in the Extension:Genealogy Treeformatter.php
protected function varId( $str ) {
$strTrans = transliterator_transliterate( 'Any-Latin; Latin-ASCII', $str );
==>$strTransConv = iconv( 'UTF-8', 'ASCII//TRANSLIT//IGNORE', $strTrans );
==>$var = preg_replace( '/[^a-zA-Z0-9_]/', , str_replace( ' ', '_', $strTransConv ) );
// Add a unique three-character suffix in case multiple input strings
// normalize to the same output string above.
$suffix = '_' . substr( md5( $str ), 0, 3 );
return $var . $suffix;
} Celyn Kendrick (talk) 00:37, 9 March 2023 (UTC)
@Celyn Kendrick and Bawolff: It sounds like there are a couple of improvements possible here: one, to expose the TreeFormatter::varId() via Scribunto; and two, to add a class to the tree node that represents the current page (or perhaps to pass a new |highlight=foo parameter to the tree parser function, which takes a list of page names, to make it more generic). Sam Wilson 02:18, 11 March 2023 (UTC)
{{#css:
  div.ext-mermaid svg {width:100%!important; height:100%!important}
  .ext-mermaid .nodes .node:first-child rect.label-container { fill:#cde7f4!important }
  .ext-mermaid .nodes .node:only-child {display:none}
}}
  1. What I did here: shrink the tree to the width of the page so it doesn't trail off to the right (where that top-down option would be handy)
  2. highlight the starting person's node
  3. suppress any trees with only a single node Celyn Kendrick (talk) 05:58, 11 March 2023 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Vector 2022/Minerva fails generating images

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


I have upgraded my Mediawiki to 1.39 and I'd like to start using new Vector skin (and Minerva for mobile). Using those skins however fails on generating images from SVG and therefore there are menus missing and I am not sure why. I'd be happy to investigate it further, but so far I am lost

I have checked CSS but found out nothing. There is no 403/404/500 request made by the browser (well, there is one, but for favicon.ico, which I deem it is not relevant)

You can visit the wiki directly (with skin enabled)ː https://www.gewiki.cz/Speci%C3%A1ln%C3%AD:Verze?useskin=vector-2022


Mediawiki version:

Název Verze
MediaWiki 1.39.1
PHP 7.4.33 (fpm-fcgi)
MySQL 8.0.31-23
ICU 71.1

There is no rsvg, but I have installed php-imagick and have set

$wgSVGConverter = 'ImagickExt'; 195.113.180.82 (talk) 08:22, 7 March 2023 (UTC)

https://www.gewiki.cz//load.php?modules=skins.minerva.icons.wikimedia&image=menu&format=original&skin=minerva&version=1rjyr
error on line 2 at column 6: XML declaration allowed only at the start of the document
It seems that something has added a line break character before the start of the SVG files, making them invalid SVG files. Either your web server, or the tool you used to unpack or transfer the files to the server has likely caused this. —TheDJ (Not WMF) (talkcontribs) 09:35, 7 March 2023 (UTC)
@TheDJ Thanks. I tried to find that image you link to but I can't find it neither in the filesystem nor in the Minerva repository... How can I check it? 195.113.180.82 (talk) 10:16, 7 March 2023 (UTC)
I have probably resolved it. Apparently, due to some edits in LocalSettings.php there was trailing newline (file ended with ?>\n) which was inserted into all generated files (including generated PNGs), resulting in errorneous files. 195.113.180.82 (talk) 10:58, 7 March 2023 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Cite Function for Mon Wikipedia

We would like to ask some help to install Cite Fuction in the edit toolbar in Mon Wikipedia (mnw.wikipedia.org) in an edit window, where we can click the cite button, which brings down a bar of extra options which the template pulldown menu where can can choose such as cite web, cite news, cite book, cite interview and cite journal ets. Htawmonzel (talk) 09:12, 7 March 2023 (UTC)

@Htawmonzel Hi, this page is about MediaWiki. For changing settings on Wikimedia websites, please follow https://meta.wikimedia.org/wiki/Requesting_wiki_configuration_changes instead. For general technical questions about Wikimedia websites, please refer to https://meta.wikimedia.org/wiki/Tech . Thanks. Malyacko (talk) 09:21, 7 March 2023 (UTC)
This can be done by the local wiki community, by following the steps here Citoid/Enabling Citoid on your wiki
If your wiki doesn't have people available with the correct permissions, then prepare the work and ask for assitance at https://meta.wikimedia.org/wiki/TechTheDJ (Not WMF) (talkcontribs) 12:09, 7 March 2023 (UTC)
@TheDJ Mon Wikipedia doesn't have people available with the correct permissions. I have asked at https://meta.wikimedia.org/wiki/Tech. But there are no one reply to me. We are really need it. Htawmonzel (talk) 14:24, 7 March 2023 (UTC)
Note Citoid only works with Visual editor. By your question, you may as well be looking for the 'cite' tool you see on English Wikipedia's source editor toolbar. That one is a local gadget
en:Wikipedia:RefToolbar
. If that's what you're looking for, you need someone with interface admin rights to copy the
en:Wikipedia:RefToolbar#Related_scripts
to your wiki and make adjustment as necessary. – Ammarpad (talk) 18:18, 7 March 2023 (UTC)
Thank @Ammarpad, Yes I mean cite tool that I see on English Wikipedia. Htawmonzel (talk) 07:26, 8 March 2023 (UTC)
See https://meta.wikimedia.org/wiki/Small_wiki_toolkits/Starter_kit#Popular_gadgets_and_guidelines Malyacko (talk) 13:18, 8 March 2023 (UTC)

Bluehost and MediaWiki

Hello everybody,

Has anyone had experience using the individual Symantec MediaWiki on Bluehost hosting. If so, please advise how best to install MediaWiki for individual use?

Yesterday, I asked Bluehost's help desk if it was possible to download MediaWiki. I was told that MediaWiki is not available for public use on Bluehost.

Does anyone have experience using individual MediaWiki on Bluehost?

Thanks in advance for your help. Euroexp (talk) 09:42, 7 March 2023 (UTC)

Hi, there are general installation instructions linked from the mediawiki.org main page. What have you tried already, and were any parts unclear? Malyacko (talk) 09:52, 7 March 2023 (UTC)
Thanks for the answer.
I tried to install MediaWiki according to the recommendations:
Help:Using Composer
But I do not have access to the command line. Bluehost doesn't let me do it. Therefore, I took advantage of the opportunity, which is described as follows:
If due to some configuration restrictions on part of the hosting company or missing command line access, it is suggested to run a local copy and upload the generated files together with the directory to the target destination: /vendor
1. Copy the following file to you local computer: "IndividualFileRelease.sh"
2. Change permissions of the file with:..
3. Run the script with:...
But I have an installed Windows, not Linux. And I can't do it.
Therefore, I asked if someone had experience of installing a MediaWiki on Bluehost.
What do I need to do? Euroexp (talk) 10:14, 7 March 2023 (UTC)
Help:Using Composer does not exist. If you followed some instructions somewhere, please link to them. Malyacko (talk) 15:10, 12 March 2023 (UTC)
SMW is a pain to install. They also have some of their own help forum which might have people specifically knowlegable about it.
As an aside, it is possible to use composer from the command line on windows, but just a lot more annoying. Bawolff (talk) 17:33, 12 March 2023 (UTC)

SPARQL editor in LinkedWiki Extension Interface is not working properly

SPARQL editor interface is not coming as expected.

I am expecting an interface like this --https://data.escr.fr/wiki/Sp%C3%A9cial:SparqlQuery

But not getting the expected response should i need to add any template for SPARQL editor. Harshitdev (talk) 11:08, 7 March 2023 (UTC)

What is not working about it? Bawolff (talk) 20:12, 7 March 2023 (UTC)

LDAP with SSL does not work

Hello everybody,

I tried to make ldaps work. Mediawiki is version 1.35 lts. The loaded extensions in the LocalSettings.php are:

  wfLoadExtension( 'LDAPProvider' );
  wfLoadExtension( 'PluggableAuth' );
  wfLoadExtension( 'LDAPAuthentication2' );
  wfLoadExtension( 'LDAPAuthorization' );
  wfLoadExtension( 'LDAPUserInfo' );
  wfLoadExtension( 'LDAPGroups' );

The "/etc/mediawiki/ldapprovider.json" contains:

           "port": "636",
           "enctype": "ssl",

With

           "port": "389",
           "enctype": "clear",

the login is working as expected.

The error message after trying to login:

  [3711c917c1ef370183b3690d] /index.php/Spezial:PluggableAuthLogin MWException from line 169 of /var/www/html/extensions/LDAPProvider/src/Client.php: Could not bind to LDAP: (-1) Can't contact LDAP server

A test with ldapsearch is working for both protocols.

What can I do to get a secure communication between client an ldap server.

Thanks in advance Helmut Helmutguttenberg (talk) 15:30, 7 March 2023 (UTC)

FLOW (Structured Discussions)

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.


When I try to create a structured discussion, I get this error:

[ZAe6LQQIIrYtQYk3VqYo5gAClgY] /index.php/Special:EnableStructuredDiscussions ArgumentCountError: Too few arguments to function ParserOptions::__construct(), 0 passed in /home4/rabidpan/public_html/fascipedia/extensions/Flow/includes/SpamFilter/SpamBlacklist.php on line 60 and at least 1 expected

Backtrace:

from /home4/rabidpan/public_html/fascipedia/includes/parser/ParserOptions.php(1057)

#0 /home4/rabidpan/public_html/fascipedia/extensions/Flow/includes/SpamFilter/SpamBlacklist.php(60): ParserOptions->__construct()

#1 /home4/rabidpan/public_html/fascipedia/extensions/Flow/includes/SpamFilter/SpamBlacklist.php(38): Flow\SpamFilter\SpamBlacklist->getLinks(Flow\Model\Header, Title)

#2 /home4/rabidpan/public_html/fascipedia/extensions/Flow/includes/SpamFilter/Controller.php(55): Flow\SpamFilter\SpamBlacklist->validate(RequestContext, Flow\Model\Header, NULL, Title, Title)

#3 /home4/rabidpan/public_html/fascipedia/extensions/Flow/includes/Block/AbstractBlock.php(251): Flow\SpamFilter\Controller->validate(RequestContext, Flow\Model\Header, NULL, Title, Title)

#4 /home4/rabidpan/public_html/fascipedia/extensions/Flow/includes/Block/HeaderBlock.php(166): Flow\Block\AbstractBlock->checkSpamFilters(NULL, Flow\Model\Header)

#5 /home4/rabidpan/public_html/fascipedia/extensions/Flow/includes/Block/HeaderBlock.php(93): Flow\Block\HeaderBlock->validateFirstRevision()

#6 /home4/rabidpan/public_html/fascipedia/extensions/Flow/includes/Block/AbstractBlock.php(144): Flow\Block\HeaderBlock->validate()

#7 /home4/rabidpan/public_html/fascipedia/extensions/Flow/includes/SubmissionHandler.php(121): Flow\Block\AbstractBlock->onSubmit(array)

#8 /home4/rabidpan/public_html/fascipedia/extensions/Flow/includes/WorkflowLoader.php(62): Flow\SubmissionHandler->handleSubmit(Flow\Model\Workflow, RequestContext, array, string, array)

#9 /home4/rabidpan/public_html/fascipedia/extensions/Flow/includes/Specials/SpecialEnableStructuredDiscussions.php(147): Flow\WorkflowLoader->handleSubmit(RequestContext, string, array)

#10 /home4/rabidpan/public_html/fascipedia/includes/htmlform/HTMLForm.php(718): Flow\Specials\SpecialEnableStructuredDiscussions->onSubmit(array, OOUIHTMLForm)

#11 /home4/rabidpan/public_html/fascipedia/includes/htmlform/HTMLForm.php(608): HTMLForm->trySubmit()

#12 /home4/rabidpan/public_html/fascipedia/includes/htmlform/HTMLForm.php(624): HTMLForm->tryAuthorizedSubmit()

#13 /home4/rabidpan/public_html/fascipedia/includes/specialpage/FormSpecialPage.php(187): HTMLForm->show()

#14 /home4/rabidpan/public_html/fascipedia/extensions/Flow/includes/Specials/SpecialEnableStructuredDiscussions.php(52): FormSpecialPage->execute(NULL)

#15 /home4/rabidpan/public_html/fascipedia/includes/specialpage/SpecialPage.php(647): Flow\Specials\SpecialEnableStructuredDiscussions->execute(NULL)

#16 /home4/rabidpan/public_html/fascipedia/includes/specialpage/SpecialPageFactory.php(1366): SpecialPage->run(NULL)

#17 /home4/rabidpan/public_html/fascipedia/includes/MediaWiki.php(314): MediaWiki\SpecialPage\SpecialPageFactory->executePath(string, RequestContext)

#18 /home4/rabidpan/public_html/fascipedia/includes/MediaWiki.php(930): MediaWiki->performRequest()

#19 /home4/rabidpan/public_html/fascipedia/includes/MediaWiki.php(564): MediaWiki->main()

#20 /home4/rabidpan/public_html/fascipedia/index.php(53): MediaWiki->run()

#21 /home4/rabidpan/public_html/fascipedia/index.php(46): wfIndexMain()

#22 {main}


______________________________

Version and Installed software:

ProductVersion: MediaWiki1.37.1

PHP8.0.27 (litespeed)

MySQL5.7.23-23

ICU69.1

Pygments2.10.0

Article path: /index.php/$1

Script path: /

index.php: /index.php

api.php: /api.php

rest.php: /rest.php

Flow 1.2.0 (ba88353) -𝘼𝙧𝙘𝙝𝙖𝙣𝙜𝙚𝙡💀 22:41, 7 March 2023 (UTC)

Its sounds like a version issue. Either you need a different version of Flow or a different version of SpamBlacklist. Bawolff (talk) 00:33, 8 March 2023 (UTC)
Ok, will do! -𝘼𝙧𝙘𝙝𝙖𝙣𝙜𝙚𝙡💀 00:37, 8 March 2023 (UTC)
Xx
Removing the offending extension produced a new error:
[ZAfaqLQda_X0zQcp_4q_tAAAwQU] /index.php/Special:EnableStructuredDiscussions TypeError: Flow\TalkpageManager::safeAllowCreation(): Argument #2 ($user) must be of type User, StubGlobalUser given, called in /home4/rabidpan/public_html/fascipedia/extensions/Flow/includes/TalkpageManager.php on line 162
Backtrace:
from /home4/rabidpan/public_html/fascipedia/extensions/Flow/includes/TalkpageManager.php(119)
#0 /home4/rabidpan/public_html/fascipedia/extensions/Flow/includes/TalkpageManager.php(162): Flow\TalkpageManager->safeAllowCreation(Title, StubGlobalUser, boolean)
#1 /home4/rabidpan/public_html/fascipedia/extensions/Flow/includes/Content/BoardContentHandler.php(114): Flow\TalkpageManager->canBeUsedOn(Title)
#2 /home4/rabidpan/public_html/fascipedia/includes/Revision/MainSlotRoleHandler.php(96): Flow\Content\BoardContentHandler->canBeUsedOn(Title)
#3 /home4/rabidpan/public_html/fascipedia/includes/Storage/PageUpdater.php(760): MediaWiki\Revision\MainSlotRoleHandler->isAllowedModel(string, WikiPage)
#4 /home4/rabidpan/public_html/fascipedia/includes/page/WikiPage.php(1994): MediaWiki\Storage\PageUpdater->saveRevision(CommentStoreComment, integer)
#5 /home4/rabidpan/public_html/fascipedia/includes/page/WikiPage.php(1850): WikiPage->doUserEditContent(Flow\Content\BoardContent, User, CommentStoreComment, integer, boolean, array, integer)
#6 /home4/rabidpan/public_html/fascipedia/extensions/Flow/includes/TalkpageManager.php(73): WikiPage->doEditContent(Flow\Content\BoardContent, string, integer, boolean, User)
#7 /home4/rabidpan/public_html/fascipedia/extensions/Flow/includes/SubmissionHandler.php(158): Flow\TalkpageManager->ensureFlowRevision(WikiPage, Flow\Model\Workflow)
#8 /home4/rabidpan/public_html/fascipedia/extensions/Flow/includes/WorkflowLoader.php(66): Flow\SubmissionHandler->commit(Flow\Model\Workflow, array)
#9 /home4/rabidpan/public_html/fascipedia/extensions/Flow/includes/Specials/SpecialEnableStructuredDiscussions.php(163): Flow\WorkflowLoader->commit(array)
#10 /home4/rabidpan/public_html/fascipedia/includes/htmlform/HTMLForm.php(718): Flow\Specials\SpecialEnableStructuredDiscussions->onSubmit(array, OOUIHTMLForm)
#11 /home4/rabidpan/public_html/fascipedia/includes/htmlform/HTMLForm.php(608): HTMLForm->trySubmit()
#12 /home4/rabidpan/public_html/fascipedia/includes/htmlform/HTMLForm.php(624): HTMLForm->tryAuthorizedSubmit()
#13 /home4/rabidpan/public_html/fascipedia/includes/specialpage/FormSpecialPage.php(187): HTMLForm->show()
#14 /home4/rabidpan/public_html/fascipedia/extensions/Flow/includes/Specials/SpecialEnableStructuredDiscussions.php(52): FormSpecialPage->execute(NULL)
#15 /home4/rabidpan/public_html/fascipedia/includes/specialpage/SpecialPage.php(647): Flow\Specials\SpecialEnableStructuredDiscussions->execute(NULL)
#16 /home4/rabidpan/public_html/fascipedia/includes/specialpage/SpecialPageFactory.php(1366): SpecialPage->run(NULL)
#17 /home4/rabidpan/public_html/fascipedia/includes/MediaWiki.php(314): MediaWiki\SpecialPage\SpecialPageFactory->executePath(string, RequestContext)
#18 /home4/rabidpan/public_html/fascipedia/includes/MediaWiki.php(930): MediaWiki->performRequest()
#19 /home4/rabidpan/public_html/fascipedia/includes/MediaWiki.php(564): MediaWiki->main()
#20 /home4/rabidpan/public_html/fascipedia/index.php(53): MediaWiki->run()
#21 /home4/rabidpan/public_html/fascipedia/index.php(46): wfIndexMain()
#22 {main} -𝘼𝙧𝙘𝙝𝙖𝙣𝙜𝙚𝙡💀 01:26, 8 March 2023 (UTC)
Are you using the REL1_37 version of Flow? This still sounds like using the wrong version of flow for your version of mediawiki.
As an aside, 1.37 series of mediawiki is no longer being supported. I strongly encourage you to upgrade to MediaWiki 1.39 series, as that is a long term support release which will be supported for a long time.
Because 1.37 is no longer a supported release, there are no longer official downloads of flow for 1.37. You could use this unofficial version however it does not come with composer dependencies (The vendor subdirectory), so you would also have to run the command composer install in the extension's directory for it to work. Bawolff (talk) 02:39, 8 March 2023 (UTC)
Ok, I will consider upgrading to 1.39, but I just installed this less than a year ago. I am not excited about constant endless upgrades. Will 1.39 be around for a while? I'm also worried that an upgrade will break my wiki. But ok, I guess we can mark this resolved for now. Thank you.
'''Update'''
Upgrading to 1.39.2 has destroyed my wiki.
There are no buttons, no sidbar, no tabs. Just garbage. i cannot log in even with wikisysop. Using another account I was able to *look* at a former article, now a destroyed ness, with these three overlapping error messages on it:
Internal error
[ZAk1M-j_Mi6OoBz5RjRuLgAAEzU] /index.php/Ursula_Haverbeck Error: Call to a member function getComponent() on null
Backtrace:
from /home4/rabidpan/public_html/fascipedia/includes/skins/Skin.php(103)
#0 /home4/rabidpan/public_html/fascipedia/includes/skins/SkinTemplate.php(1793): Skin->getComponent(string)
#1 /home4/rabidpan/public_html/fascipedia/includes/skins/BaseTemplate.php(233): SkinTemplate->makeSearchInput(array)
#2 /home4/rabidpan/public_html/fascipedia/skins/DarkVector/DarkVectorTemplate.php(547): BaseTemplate->makeSearchInput(array)
#3 /home4/rabidpan/public_html/fascipedia/skins/DarkVector/DarkVectorTemplate.php(199): DarkVectorTemplate->renderNavigation(array)
#4 /home4/rabidpan/public_html/fascipedia/includes/skins/SkinTemplate.php(151): DarkVectorTemplate->execute()
#5 /home4/rabidpan/public_html/fascipedia/includes/skins/SkinTemplate.php(177): SkinTemplate->generateHTML()
#6 /home4/rabidpan/public_html/fascipedia/includes/OutputPage.php(2876): SkinTemplate->outputPage()
#7 /home4/rabidpan/public_html/fascipedia/includes/MediaWiki.php(922): OutputPage->output(boolean)
#8 /home4/rabidpan/public_html/fascipedia/includes/MediaWiki.php(562): MediaWiki->main()
#9 /home4/rabidpan/public_html/fascipedia/index.php(50): MediaWiki->run()
#10 /home4/rabidpan/public_html/fascipedia/index.php(46): wfIndexMain()
#11 {main}
MediaWiki internal error.
Original exception: [ZAk1M-j_Mi6OoBz5RjRuLgAAEzU] /index.php/Ursula_Haverbeck Error: Call to a member function getComponent() on null
Backtrace:
from /home4/rabidpan/public_html/fascipedia/includes/skins/Skin.php(103)
#0 /home4/rabidpan/public_html/fascipedia/includes/skins/SkinTemplate.php(1793): Skin->getComponent(string)
#1 /home4/rabidpan/public_html/fascipedia/includes/skins/BaseTemplate.php(233): SkinTemplate->makeSearchInput(array)
#2 /home4/rabidpan/public_html/fascipedia/skins/DarkVector/DarkVectorTemplate.php(547): BaseTemplate->makeSearchInput(array)
#3 /home4/rabidpan/public_html/fascipedia/skins/DarkVector/DarkVectorTemplate.php(199): DarkVectorTemplate->renderNavigation(array)
#4 /home4/rabidpan/public_html/fascipedia/includes/skins/SkinTemplate.php(151): DarkVectorTemplate->execute()
#5 /home4/rabidpan/public_html/fascipedia/includes/skins/SkinTemplate.php(177): SkinTemplate->generateHTML()
#6 /home4/rabidpan/public_html/fascipedia/includes/OutputPage.php(2876): SkinTemplate->outputPage()
#7 /home4/rabidpan/public_html/fascipedia/includes/MediaWiki.php(922): OutputPage->output(boolean)
#8 /home4/rabidpan/public_html/fascipedia/includes/MediaWiki.php(562): MediaWiki->main()
#9 /home4/rabidpan/public_html/fascipedia/index.php(50): MediaWiki->run()
#10 /home4/rabidpan/public_html/fascipedia/index.php(46): wfIndexMain()
#11 {main}
Exception caught inside exception handler: [ZAk1M-j_Mi6OoBz5RjRuLgAAEzU] /index.php/Ursula_Haverbeck Error: Call to a member function getComponent() on null
Backtrace:
from /home4/rabidpan/public_html/fascipedia/includes/skins/Skin.php(103)
#0 /home4/rabidpan/public_html/fascipedia/includes/skins/SkinTemplate.php(1793): Skin->getComponent(string)
#1 /home4/rabidpan/public_html/fascipedia/includes/skins/BaseTemplate.php(233): SkinTemplate->makeSearchInput(array)
#2 /home4/rabidpan/public_html/fascipedia/skins/DarkVector/DarkVectorTemplate.php(547): BaseTemplate->makeSearchInput(array)
#3 /home4/rabidpan/public_html/fascipedia/skins/DarkVector/DarkVectorTemplate.php(199): DarkVectorTemplate->renderNavigation(array)
#4 /home4/rabidpan/public_html/fascipedia/includes/skins/SkinTemplate.php(151): DarkVectorTemplate->execute()
#5 /home4/rabidpan/public_html/fascipedia/includes/skins/SkinTemplate.php(177): SkinTemplate->generateHTML()
#6 /home4/rabidpan/public_html/fascipedia/includes/OutputPage.php(2876): SkinTemplate->outputPage()
#7 /home4/rabidpan/public_html/fascipedia/includes/exception/MWExceptionRenderer.php(183): OutputPage->output()
#8 /home4/rabidpan/public_html/fascipedia/includes/exception/MWExceptionRenderer.php(102): MWExceptionRenderer::reportHTML(Error)
#9 /home4/rabidpan/public_html/fascipedia/includes/exception/MWExceptionHandler.php(131): MWExceptionRenderer::output(Error, integer)
#10 /home4/rabidpan/public_html/fascipedia/includes/exception/MWExceptionHandler.php(248): MWExceptionHandler::report(Error)
#11 /home4/rabidpan/public_html/fascipedia/includes/MediaWiki.php(584): MWExceptionHandler::handleException(Error, string)
#12 /home4/rabidpan/public_html/fascipedia/index.php(50): MediaWiki->run()
#13 /home4/rabidpan/public_html/fascipedia/index.php(46): wfIndexMain()
#14 {main}
[ZAk82zvhixNRzp9Qd_PKgwABlAE] /index.php/Special:SpecialPages Error: Call to undefined method User::getEffectiveGroups()
Backtrace:
from /home4/rabidpan/public_html/fascipedia/extensions/EditAccount/includes/specials/SpecialCloseAccount.php(55)
#0 /home4/rabidpan/public_html/fascipedia/includes/specialpage/SpecialPageFactory.php(1317): CloseAccount->isListed()
#1 /home4/rabidpan/public_html/fascipedia/includes/specials/SpecialSpecialpages.php(53): MediaWiki\SpecialPage\SpecialPageFactory->getUsablePages(User)
#2 /home4/rabidpan/public_html/fascipedia/includes/specials/SpecialSpecialpages.php(42): SpecialSpecialpages->getPageGroups()
#3 /home4/rabidpan/public_html/fascipedia/includes/specialpage/SpecialPage.php(701): SpecialSpecialpages->execute(NULL)
#4 /home4/rabidpan/public_html/fascipedia/includes/specialpage/SpecialPageFactory.php(1428): SpecialPage->run(NULL)
#5 /home4/rabidpan/public_html/fascipedia/includes/MediaWiki.php(316): MediaWiki\SpecialPage\SpecialPageFactory->executePath(string, RequestContext)
#6 /home4/rabidpan/public_html/fascipedia/includes/MediaWiki.php(904): MediaWiki->performRequest()
#7 /home4/rabidpan/public_html/fascipedia/includes/MediaWiki.php(562): MediaWiki->main()
#8 /home4/rabidpan/public_html/fascipedia/index.php(50): MediaWiki->run()
#9 /home4/rabidpan/public_html/fascipedia/index.php(46): wfIndexMain()
#10 {main}
(This last error is what comes up when I attempt to see the special pages. I am able to see about half of my sidebar if I switch to vector skin) -𝘼𝙧𝙘𝙝𝙖𝙣𝙜𝙚𝙡💀 00:52, 9 March 2023 (UTC)
Its a mess.
In Firefox, there is no funcionality whatsoever. With my duckduckgo browser (a Brave variant) I can see trashed articles with error codes all over the place. -𝘼𝙧𝙘𝙝𝙖𝙣𝙜𝙚𝙡💀 01:36, 9 March 2023 (UTC)
I thought it might be a skin issue. So I deactivated all skins but Vector and that helped a *LOT*. However, search and special pages still crash and bring up error codes. -𝘼𝙧𝙘𝙝𝙖𝙣𝙜𝙚𝙡💀 02:57, 9 March 2023 (UTC)
Ok, install now appears to be working. I deactivated all extensions, and reactivated them one at a time until I found two that were breaking the wiki. I'm rather proud of myself. Now I just need to find a dark skin. Thank you, but I got this. -𝘼𝙧𝙘𝙝𝙖𝙣𝙜𝙚𝙡💀 08:18, 9 March 2023 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Mediawiki without certain php commands?

Hello,

I hope this is the right place to ask this. Our research group is using a mediawiki with procedures and experimental info on a university-owned server. Recently, university IT administration decided to disable the following php commands for safety reasons: exec, passthru, shell_exec, system, proc_open, popen,curl, exec,curl, multi_exec,show_source.

Ever since our wiki has been down. Is it possible to run a wiki without these commands or is this a lost battle? University IT is not able to give further support.

Mediawiki version is 1.36, php version is 7, database is MySQL. extensions are standard (?): 'CategoryTree' 'Cite' 'CodeEditor', 'Gadgets', 'ImageMap' ,'InputBox','LocalisationUpdate' , 'MultimediaViewer' ,'OATHAuth' , 'PageImages', 'ParserFunctions' ,'PdfHandler' , 'Poem' , 'Renameuser' , 'ReplaceText' , 'Scribunto', 'SecureLinkFixer', 'SyntaxHighlight_GeSHi' ,'TemplateData' , 'TextExtracts', 'VisualEditor', 'WikiEditor' , 'PDFEmbed'

Thank you! And.Werb (talk) 23:09, 7 March 2023 (UTC)

Scribunto (and maybe SyntaxHighlight_GeSHi and VisualEditor but I'm less sure) won't like that.
For scribunto, you could maybe convince your university to install php-luasandbox which might allow it to work without those php commands, however if they are disabling random commands, they probably aren't amenable to installing random php extensions.
Otherwise mediawiki will be fine. Some features might not be compatible.
Can you describe what "down" means? If you are getting an error, setting $wgShowExceptionDetails = true; can help see which extension or configuration is causing the problem. Bawolff (talk) 00:31, 8 March 2023 (UTC)
This is great, I disabled these extensions, and I'm able to login again. I will try enabling them one by one.
I also added the $wgShowExceptionDetails = true;
Thank you so much for the suggestions! And.Werb (talk) 19:28, 8 March 2023 (UTC)

How to make action=raw show hidden categories?

Manual talk:Parameters to index.php's "raw" doesn't show hidden categories. How to get them too? Jidanni (talk) 23:30, 7 March 2023 (UTC)

That's not true. ?action=raw will so all categories included in the wikitext (Which might not be all categories a page is in). Whether or not a category is hidden makes no difference. Bawolff (talk) 00:27, 8 March 2023 (UTC)

API tokens

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


I'm trying to use the media wiki api to fetch wiki pages for a site I'm building for a class project. I've been able to locale the api urls, but I'm at a loss on how to get an actual key or token. Any help would be appreciated! Isaacsto (talk) 00:29, 8 March 2023 (UTC)

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

Bot edit but no bot flag

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 bot to do some automatic work in my wiki and assigned bot user group to this bot account. I added bot=1 to my API call but edits made by this bot are not marked with bot flag in recent changes page. Is any further setting needed to make those edits be marked with bot flag? Teetrition (talk) 02:11, 8 March 2023 (UTC)

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

Edit page on MinervaNeue

There's no "edit page" link on MinervaNeue skin after fresh install Marcis20X (talk) 12:00, 8 March 2023 (UTC)

Malformed UTF-8 characters, possibly incorrectly encoded

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.


Got stuck on Connect Database;


[92c66aff7b86e27481dece49] /mywiki/mw-config/index.php?page=DBConnect Exception: preg_match_all error 4: Malformed UTF-8 characters, possibly incorrectly encoded

Backtrace:

from C:\xampp\htdocs\mywiki\includes\MagicWordArray.php(319)

#0 C:\xampp\htdocs\mywiki\includes\parser\Parser.php(4116): MagicWordArray->matchAndRemove(string)

#1 C:\xampp\htdocs\mywiki\includes\parser\Parser.php(1636): Parser->handleDoubleUnderscore(string)

#2 C:\xampp\htdocs\mywiki\includes\parser\Parser.php(724): Parser->internalParse(string)

#3 C:\xampp\htdocs\mywiki\includes\language\MessageCache.php(1374): Parser->parse(string, MediaWiki\Page\PageReferenceValue, ParserOptions, boolean)

#4 C:\xampp\htdocs\mywiki\includes\Status.php(331): MessageCache->parse(string, MediaWiki\Page\PageReferenceValue, boolean, boolean, NULL)

#5 C:\xampp\htdocs\mywiki\includes\installer\WebInstaller.php(1044): Status->getHTML()

#6 C:\xampp\htdocs\mywiki\includes\installer\WebInstallerDBConnect.php(41): WebInstaller->showStatusBox(Status)

#7 C:\xampp\htdocs\mywiki\includes\installer\WebInstaller.php(271): WebInstallerDBConnect->execute()

#8 C:\xampp\htdocs\mywiki\mw-config\index.php(82): WebInstaller->execute(array)

#9 C:\xampp\htdocs\mywiki\mw-config\index.php(40): wfInstallerMain()

#10 {main} Delta5768 (talk) 14:15, 8 March 2023 (UTC)

Certainly weird. Maybe could be caused if the database returned an error that was not encoded as valid utf-8. Bawolff (talk) 16:57, 8 March 2023 (UTC)
I don't know. I followed everything exactly step by step from the xampp manual for mediawiki. Delta5768 (talk) 17:05, 8 March 2023 (UTC)
As a hack, you could try in includes/installer/WebInstaller.php on around line 4042 replace the line
$html = $status->getHTML();
with:
$html = UtfNormal\Validator::cleanUp( $status->getHTML() );
If that actually fixes it, you should get a more descriptive message. Please let me know if that works, and what the more descriptive error message is. Bawolff (talk) 20:58, 9 March 2023 (UTC)
There's only ~1200 lines in WebInstaller.php, but I found the line of code and replaced it; it didn't do anything. Delta5768 (talk) 08:44, 10 March 2023 (UTC)
Oh, i guess it should be line 1042.
I suppose you could try doing:
$html = htmlspecialchars( UtfNormal\Validator::cleanUp( print_r( $status->getErrorsArray(), true ) ) );
instead. Not sure if that will work. Bawolff (talk) 21:34, 10 March 2023 (UTC)
Array ( [0] => Array ( [0] => config-connection-error [1] => Cannot access the database: :real_connect(): (HY000/2002): php_network_getaddresses: getaddrinfo for local/localhost failed: ���� ���� ����������. ) ) Delta5768 (talk) 22:19, 12 March 2023 (UTC)
Super weird. Some sort of locale issue in the error i guess.
But for actual cause, what did you use as your db server? Bawolff (talk) 00:49, 13 March 2023 (UTC)
MySQL Delta5768 (talk) 09:41, 13 March 2023 (UTC)
The error message "getaddrinfo for local/localhost failed" is concerning... Are you using "local/localhost" (with a literal /) as the hostname for the database connection? Ciencia Al Poder (talk) 10:04, 13 March 2023 (UTC)
Yes? That's how it was done in Manual:Installing MediaWiki on XAMPP Delta5768 (talk) 10:17, 13 March 2023 (UTC)
The server name outside of PhpMyAdmin should be "localhost", or even better, "127.0.0.1" on Windows. See Manual:$wgDBserver Ciencia Al Poder (talk) 16:35, 13 March 2023 (UTC)
I set it to 127.0.0.1....
Array ( [0] => Array ( [0] => config-connection-error [1] => Cannot access the database: :real_connect(): (HY000/1045): Access denied for user 'admin'@'localhost' (using password: YES) ) ) Delta5768 (talk) 18:56, 13 March 2023 (UTC)
Well, that means you didn't provide the correct database credentials for user admin Ciencia Al Poder (talk) 21:09, 13 March 2023 (UTC)
I verified everything thrice and it should be corrected
EDIT: Solved it by changing MySQL port in XAMPP to "3307" and adding port to hostname (127.0.0.1 --> 127.0.0.1:3307) Delta5768 (talk) 10:12, 14 March 2023 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Is the boxed note at Help:Cite out of date?

The boxed Note at Help:Cite says:

> Note that identifiers used in the name attribute require alphabetic characters...

but Visual Editor auto-generates numeric reference names like ":0", ":1", etc. which lack any alphabetic characters. Is this boxed note at Help:Cite out of date? Mathglot (talk) 19:56, 8 March 2023 (UTC)

Category:Top Level — (reverse) sort, sortable table, or latest-n?

I'm helping to maintain the wiki at noisebridge.net. I would like for our Meeting Notes category to be more quickly accessible. I'm looking for ways to improve that usability.


At present, I'm wondering about sortable categories, or category pages that link "(first) (previous) (next) (last)" instead of just "(previous) (next)", for traversing 720 pages, approximately 7 linkes forward in the category to get to current pages.


It occurs to me that sub-namespacing, by year, might also be a workable solution, instead of our current (text-sorted) title format of "Meeting Notes 2023_03_07" we could use years within the Meeting Notes category, and month-days within years, "Meeting Notes/2023/03_07" allowing us a reasonable index fanout, and much better practical usage. Before I go implement this, is my assumption about this correct? Can I use Category pages mixed with hierarchy in this way?


[https://www.noisebridge.net/wiki/Special:Version Version]

Product Version

MediaWiki 1.35.8

PHP 7.4.33 (fpm-fcgi)

MySQL 8.0.30-22 Mcint (talk) 21:51, 8 March 2023 (UTC)

You can manually make paging links. For example wikipedia uses https://en.wikipedia.org/wiki/Template:Category_TOC you can get a last link by using a url parameter &pageuntil=%ff
Categories are a linear list. They are not neccesarily sorted by title but sortkey (the part after the | in the category link). The order is controlled by manual:$wgCategoryCollation.
If you are doing a hierarchy you may be interested in extension:CategoryTree.
Extension:CategorySortHeaders may also be of interest.
if you need more control than categories offer, there is also extension:DPL, extension:SemanticMediaWiki or extension:Cargo Bawolff (talk) 23:27, 8 March 2023 (UTC)
Thank you. My trouble is that Meeting Notes entails a new page every week, but users with any/no level of experience should be able to use the system seamlessly (and I don't want to manually update one more index in addition to the content) each week.
On built-in features,  mentions (more of an elucidating footnote, than a "reference") that collating might entail reverse sorting, but there's no other mention of reverse sorting, for syntax or other relevant keys. I can try putting "-" or "!" in front of a sorting key category/name, but #wikipedia-en-help wasn't familiar with this either. Directed me to Village Pump, but I thought here would be better. Mcint (talk) 00:36, 10 March 2023 (UTC)
There is no reverse sorting other than the prev page links Bawolff (talk) 01:58, 10 March 2023 (UTC)

add additional data in a skin

Hello !

I'm trying to add additional data in a skin forked from the example skin (https://github.com/wikimedia/mediawiki-skins-Example) following the manual : Manual:How to make a MediaWiki skin#Extending data

But the example skin has no "skinExample.php" and I didn't manage to make the the "hello world" example by myself.

So I tried to copy the process from the Vector skin with "namespace MediaWiki\Skin\Example;" and "use SkinMustache;" lines and some "AutoloadClasses" and "AutoloadNamespaces" in skin.json...

but my php file does not seem to be used.

MediaWiki 1.39.1
PHP 8.2.0 (apache2handler)
MariaDB 10.4.27-MariaDB
ICU 66.1

Marcellinjobard (talk) 15:23, 9 March 2023 (UTC)

After I updated mediawiki to the latest version, the templatlinks table is missing. This causes the forum to be unable to edit any page with a template, unless I delete it and create the page over again.


Doing this, though, caused the server load to be too high, and my site provider disabled my site until I can fix it.


Is there any way to create a templatelinks table or another workaround that would not be too heavy of a load? JenniBee (talk) 15:58, 9 March 2023 (UTC)

I don't understand what circumstances lead to your templatelinks table being deleted.
You could try reducing $wgJobRunRate if server load is too high (E.g. set it to 0.1 ). Bawolff (talk) 20:53, 9 March 2023 (UTC)

Malformed UTF-8 characters, possibly incorrectly encoded (again)

Got no help in previous post, so i'll just try again.


[92c66aff7b86e27481dece49] /mywiki/mw-config/index.php?page=DBConnect Exception: preg_match_all error 4: Malformed UTF-8 characters, possibly incorrectly encoded

Backtrace:

from C:\xampp\htdocs\mywiki\includes\MagicWordArray.php(319)

#0 C:\xampp\htdocs\mywiki\includes\parser\Parser.php(4116): MagicWordArray->matchAndRemove(string)

#1 C:\xampp\htdocs\mywiki\includes\parser\Parser.php(1636): Parser->handleDoubleUnderscore(string)

#2 C:\xampp\htdocs\mywiki\includes\parser\Parser.php(724): Parser->internalParse(string)

#3 C:\xampp\htdocs\mywiki\includes\language\MessageCache.php(1374): Parser->parse(string, MediaWiki\Page\PageReferenceValue, ParserOptions, boolean)

#4 C:\xampp\htdocs\mywiki\includes\Status.php(331): MessageCache->parse(string, MediaWiki\Page\PageReferenceValue, boolean, boolean, NULL)

#5 C:\xampp\htdocs\mywiki\includes\installer\WebInstaller.php(1044): Status->getHTML()

#6 C:\xampp\htdocs\mywiki\includes\installer\WebInstallerDBConnect.php(41): WebInstaller->showStatusBox(Status)

#7 C:\xampp\htdocs\mywiki\includes\installer\WebInstaller.php(271): WebInstallerDBConnect->execute()

#8 C:\xampp\htdocs\mywiki\mw-config\index.php(82): WebInstaller->execute(array)

#9 C:\xampp\htdocs\mywiki\mw-config\index.php(40): wfInstallerMain()

#10 {main} 31.41.71.86 (talk) 16:13, 9 March 2023 (UTC)

Where to place 'ads.txt' file in Bitnami Mediawiki on Google Cloud?

I'm running Bitnami Mediawiki on Google Cloud. As stated in the title, where do I place the 'ads.txt' file? In the '/root' folder or in the main directory '/'? The.machine.preacher (talk) 21:01, 9 March 2023 (UTC)

Hi. This question seems unrelated to MediaWiki. You may have better luck in a different support forum. Bawolff (talk) 21:38, 10 March 2023 (UTC)
Why is it unrelated to MediaWiki, all I wished to know was where the root directory was? 2001:8003:269F:4D00:C80D:F5DE:E15C:995F (talk) 10:48, 11 March 2023 (UTC)
Because we don't know anything about things specific to Bitnami on Google Cloud. —TheDJ (Not WMF) (talkcontribs) 15:11, 13 March 2023 (UTC)

Adding CSRF token

I know this might be a bit of a basic question but I'm not really a developer, just trying to adapt something. I'm trying to connect to an API endpoint (which I'm sure works) but I'm a bit confused about how I'm supposed to get a valid CSRF token for the user executing it. Here is the part of the code so far but I can't seem to figure out the token part public function updateServer ( string $data ) { if ( $this->getStatus() === 'complete' ) { $data = [ 'action' => 'modifyserver', 'format' => 'json', 'mwaction' => 'modifyserver', 'wiki' => $this->getTarget(), 'server' => $this->getCustomDomain(), 'token' => ??, ];

$httpRequestFactory = MediaWikiServices::getInstance()->getHttpRequestFactory(); $httpRequestFactory->post( 'https://example.org/w/api.php', [ 'postData' => $data ] ); } } Reception123 (talk) 17:05, 10 March 2023 (UTC)

You need to include cookies or the csrf token wont be valid.
e.g. First you have to get a token via api.php?action=query&meta=tokens request. You need to use the ->create() method so you have a MWHttpRequest object. After the request goes through, you call ->getCookieJar() on the Request object. Before sending the second request, you call ->setCookieJar to set the cookies for that request. Bawolff (talk) 17:41, 10 March 2023 (UTC)
Thanks! I'll give that a try Reception123 (talk) 06:28, 12 March 2023 (UTC)

Composer problem while upgrading to 1.39 Upgrade

Can't finish the 1.39 upgrade.

MediaWiki 1.39.2 Updater

composer/semver: 3.2.6 installed, 3.3.2 required.

cssjanus/cssjanus: 2.1.0 installed, 2.1.1 required.

oojs/oojs-ui: 0.43.2 installed, 0.44.5 required.

pear/mail: 1.4.1 installed, 1.5.0 required.

symfony/polyfill-php80: 1.25.0 installed, 1.26.0 required.

symfony/yaml: 5.4.3 installed, 5.4.10 required.

wikimedia/base-convert: 2.0.1 installed, 2.0.2 required.

wikimedia/ip-set: 3.0.0 installed, 3.1.0 required.

wikimedia/minify: 2.2.6 installed, 2.3.0 required.

wikimedia/parsoid: 0.15.1 installed, 0.16.1 required.

wikimedia/php-session-serializer: 2.0.0 installed, 2.0.1 required.

wikimedia/remex-html: 3.0.2 installed, 3.0.3 required.

wikimedia/running-stat: 1.2.1 installed, 2.1.0 required.

wikimedia/scoped-callback: 3.0.0 installed, 4.0.0 required.

wikimedia/services: 2.0.1 installed, 3.0.0 required.

wikimedia/timestamp: 3.0.0 installed, 4.0.0 required.

wikimedia/xmp-reader: 0.8.1 installed, ^0.8.6 required.

Error: your composer.lock file is not up to date. Run "composer update --no-dev" to install newer dependencies


Here's composer output:

Your requirements could not be resolved to an installable set of packages.

  Problem 1

    - Root composer.json requires wikimedia/timestamp ^4.0.0, ^3.0.0, found wikimedia/timestamp[dev-master, v1.0.0, v2.0.0, v2.1.0, v2.1.1, v2.2.0, v3.0.0, v4.0.0, v4.1.0] but it does not match the constraint.

  Problem 2

    - Root composer.json requires wikimedia/xmp-reader ^0.8.6 -> satisfiable by wikimedia/xmp-reader[0.8.6].

    - wikimedia/xmp-reader 0.8.6 requires wikimedia/timestamp ^1.0 || ^2.0 || ^3.0 || ^4.0 -> found wikimedia/timestamp[v1.0.0, v2.0.0, v2.1.0, v2.1.1, v2.2.0, v3.0.0, v4.0.0, v4.1.0] but it conflicts with your root composer.json require (^4.0.0, ^3.0.0).

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions. Aolko (talk) 19:17, 10 March 2023 (UTC)

Have you modified composer.json or composer.local.json from what they are in normal MW 1.39 Bawolff (talk) 21:26, 10 March 2023 (UTC)
I didn't, at least before running the update script Aolko (talk) 13:54, 11 March 2023 (UTC)

"Clear your watchlist" results in "unable to handle this request"

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


I have a watchlist of 100,000 items and I want to clear it. Clicking on it results in "This page isn’t working [SITE NAME] is currently unable to handle this request. HTTP ERROR 500". Is there any other way to go about it?

I get the same error with any of these options: View and remove titles on your watchlist | Edit raw watchlist | Clear your watchlist. Spiros71 (talk) 19:53, 10 March 2023 (UTC)

You're probably hitting php timeouts. Potentially you could try increasing those.
Newer versions of MediaWiki are better for this i think, so you can also try updating.
You could also try editing the raw watchlist to see if that works better (unlikely).
You can manually clear the watchlist with direct database access (figure out your user id number, and run DELETE from watchlist where wl_user = USERIDNUMBERHERE; (Keep backups if you do any manual db modification) Bawolff (talk) 21:25, 10 March 2023 (UTC)
Thanks! Worked like a charm. Spiros71 (talk) 22:51, 10 March 2023 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

visual editor

since i ve release 1.38.4 to 1.39.2 the Edit button doesn't work

the blue progress bar stop at 2/3


Something wrong with the release? Schub srx (talk) 19:40, 11 March 2023 (UTC)

[6a785946e8b9a0d3c66e6782] 2023-03-11 20:32:26: Fatal exception of type "RuntimeException"

Hello there

I've been trying to use MediaWiki, and I have the VisualEditor extension installed using docker. When I try to edit a page via VisualEditor, it fails to load the gui. I checked in the console and it outputs:

[6a785946e8b9a0d3c66e6782] 2023-03-11 20:32:26: Fatal exception of type "RuntimeException"


I tried using the $wgShowExceptionDetails flag in LocalSettings.php, but nothing appears.


Thank you ApricotFarmer11 (talk) 21:21, 11 March 2023 (UTC)

Additionally, I am using the official docker image. ApricotFarmer11 (talk) 21:22, 11 March 2023 (UTC)
Hi, please see "Post a new question" in the sidebar. Please provide a link to "the official docker image", and please post the exact full line for $wgShowExceptionDetails in LocalSettings.php. Thanks a lot! Malyacko (talk) 23:38, 11 March 2023 (UTC)
Hey @Malyacko, I cannot see the "Post a new question" in the sidebar.
I am using the Docker Image from https://hub.docker.com/_/mediawiki - and the exact full line for $wgShowExceptionDetails is as follows:
$wgShowExceptionDetails = true; ApricotFarmer11 (talk) 19:44, 13 March 2023 (UTC)

Strange formatting on MediaWiki site

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


Hello there, I am trying to set up another MediaWiki website. I am calling it "SkyeWiki" because, that's a fancy name. After many attempts, and for some reason using wordpress, then attempting to write my own, I finally learned what the heck a docker container was and here we are, I finally got passed the first stage of making a wiki...


However, I would be remissed if I didn't say I was struggling a little bit. I got through everything from the start, however I am having one strange issue, and I don't know what to do about it. You see, I'm not getting an error message, nor am I getting warning messages or anything.


I am for some reason just getting really strange formatting issues. I tried to install the Infobox template, who doesn't, am I right? However when I compare it to the Wikipedia version, I find it to be a lot more messy, and a lot of the code is not formatted, I don't know if this is the wiki, a configuration problem, plugin maybe, but, this concerns me because I'm unsure if the infobox is going to work.


I have what they mention, For the infobox specifically I believe it was only one thing; I have "wgUseInstantCommons" set to true, "Scribunto" enabled, and "Luastandalone" in the configs. However this doesn't seem to help with my issue.


Here is my infobox documentation: https://wiki.timewisely.net/index.php/Template:Infobox my version is 1.39.2, and everything else is stock, I did make a few changes, for example, I created a volume for Extensions, to my knowledge, it shouldn't affect anything, but if I don't do that, it'll delete the plugin for "Sanitized CSS" when it restarts. It's not mounted to a directory, so that shouldn't be a problem.


If anyone would mind to take a look at it, and maybe be able to deliver some expert opinions my way, I would be very grateful for the help, thank you. TimeWisely (talk) 03:43, 12 March 2023 (UTC)

I fixed it, I downloaded all of the dependencies that I didn't have, as well as all associated templates. I had to enable a toggle in the LocalSettings.php "$wgJsonConfigEnableLuaSupport = true"
I installed the JsonConfig extension, and dumped the settings into my LocalSettings.php file (the ones listed in the common settings.php file.)
None of which fixed my issues yet. I then took the following exported from Wikipedia:
MediaWiki:Common.css
MediaWiki:Common.js
and imported it into my wiki. That seemed to have fixed my problems.
If I had to guess, all of these fixed it, so if you forgot to do any of these, please feel free to do so.
I found another user talking about this same problems I had. I hadn't realized that I was doing it wrong, and I was forgetting a lot of essentials.
Please see this link: Manual:Importing Wikipedia infoboxes tutorial for a full comprehensive tutorial.
Thanks. TimeWisely (talk) 00:42, 13 March 2023 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Migrating from 1.25.2 to 1.39.2

I need to upgrade from MediaWiki 1.25.2 to 1.39.2. I understand I need to upgrade from 1.25.2 to 1.35.9, and then upgrade to 1.39.2. I also need to migrate the application server from Windows Server 2012 R2 to Windows Server 2019. My question is how much of the upgrade should be done on the Windows 2012 server before moving to the Windows 2019 server? I am guessing since I can't get 1.25.2 I should upgrade to 1.35.9, move to the Windows 2019 server and then upgrade to 1.39.2. Thoughts? MattRobl (talk) 04:34, 12 March 2023 (UTC)

I've never used a Windows server but imagine as far as MediaWiki is concerned, it's still the PHP and database versions that matter. As long as you can transfer the files and database to a server on which the update.php script will run, you'll be all right, I think. Jonathan3 (talk) 13:19, 13 March 2023 (UTC)
Thanks MattRobl (talk) 21:09, 18 March 2023 (UTC)

how can i set multiples wiki under only one dns name by example https://mediawikis.domain.com/wiki1 https://mediawikis.domain.com/wiki2

Hello,


i search the solution that how can i install mediawiki with only one folder source of master mediawiki :


/var/www/mediawikis.domain.com/htdocs/

and the folder of the wikis are :

/var/www/mediawikis.domain.com/wikis

by example wiki1 is this folder :

/var/www/mediawikis.domain.com/wikis/wiki1


Thanks for your help


Mathieu Mhetru (talk) 12:48, 12 March 2023 (UTC)

Hi, see Manual:FAQ#Can I install more than one wiki on a server using MediaWiki? Malyacko (talk) 14:06, 12 March 2023 (UTC)

Extracting user lists

Hi,


Very new to this, but can't find a way to export the user lists? 82.8.224.56 (talk) 10:35, 13 March 2023 (UTC)

You could cut and paste from your wiki's Special:ListUsers, or query the user table (see Manual:User_table). Jonathan3 (talk) 13:21, 13 March 2023 (UTC)

Error 504 when trying to submit CI Form data and no Email Notifications

Hi,

Just to give you some context before I lay out the issues, our organisation has enabled the extension CIForms for users to submit feedback data as a feedback form. Composer updates are run on all folders within the extensions/ folder before the site is deployed. This MediaWiki site uses MySQL for its database. The composer.local.json file even contains the latest phpmailer version (^6.5) and a few other dependencies. The way I run composer is I download composer-2 in a shell script, self-update, update --no-dev -o, install --no-dev -o and then remove the composer instance. Every extension uses the REL1_39 package because this site's MediaWiki version is 1.39.2 and uses PhP 8.1. The site is even setup to send emails when users request accounts to the admin, and it works. It even sends back a temp password to the user to sign up, once the admin approves the user. So SMTP is setup properly as well.

1. Issue 1

Currently, when testing out the feedback form as admin, I fill out the form and hit submit. The page takes a long time to load and then times out with a "504 Error". When I check the Special:CIFormsManage page, I can see that the form has been submitted. I'm able to view and download the PDF as well. But I'm not sure why the page times out when Submit is clicked. I've done a Network inspect, but Special:CIFormsSubmit just seems to be in a pending state before throwing a 504 Gateway Timeout Nginx error. I've checked the Nginx logs and the error on Timeout is as follows: [error] 35#35: *226301113 upstream timed out (110: Operation timed out) while reading response header from upstream, client: <Masked_IP_Address>, server: <Masked_DNS_Address>, request: "POST /index.php/Special:CIFormsSubmit HTTP/1.1".

2. Issue 2

Although the feedback form data seems to be present on the Special:CIFormsManage page and can be downloaded, an email doesn't seem to be sent to the admin. As stated above, emails for account requests work, so SMTP is configured correctly in LocalSettings.php and $wgEnableEmail = true as well as $wgEnableUserEmail = true. Even under the wfLoadExtension( 'CIForms' ) line, $wgCIFormsSenderEmail is set to the admin's email as well as $wgCIFormsEmailTo. Even PhPMailer is set to its latest version. Not sure why the admin nor I receive emails on submission of these feedback forms. Any help will do please! Thanks in advance! Tarunjoseph93 (talk) 15:49, 13 March 2023 (UTC)

I need yalls help. I am being Doxed, harassed And Bullied by a website that is Powered by MediaWiki

how do I get this website <redacted> also known as <redacted> to remove my personal info. they're doxing me and posting information I do not want up. I see they're using media wiki and is powered by you guys website. they're powered by mediaWiki and using their website <redacted> to dox Pornstars real names and leak peoples real social medias and adresses and putting our lives in danger with bullying and harrassing. is there someone I can contact on media wiki to have this website take this page down with my personal info. and if so please let me know and thank you. AwardsOc (talk) 16:23, 13 March 2023 (UTC)

No. The issue you bring up is totally out of scope. Svartava (talk) 16:30, 13 March 2023 (UTC)
Hi.
We don't control other mediawiki websites. We make some of the software, but once the software is released, we have no control over how it is used.
The best i can suggest, is depending on where you are located, contact law enforcement. In particular, the EU has some pretty strong laws if you are an EU citizen (look up GDPR).
In some cases you can try complaining to the hosting provider (in this case i think that is http://corbina.ru) but often they don't care. Bawolff (talk) 17:25, 13 March 2023 (UTC)

Special pages not updating

Hello. I am an administrator for IMFDB, a website powered by MediaWiki. For unknown reasons, my wiki's maintenance report special pages, such as w:imfdb:special:brokenredirects, does not actually update despite claiming to be updating daily.

What should we do to resolve this issue? I am in contact with the site owner, and can forward any messages (such as requests for checking wiki maintenance script files) if needed. Wuzh (talk) 18:28, 13 March 2023 (UTC)

What is $wgMiserMode set to?
If it is set to true, has updateSpecialPages.php been run recently?
Is $wgDisableQueryPageUpdate set? Is $wgDisableQueryPages set? Bawolff (talk) 23:02, 13 March 2023 (UTC)
Belated reply, but we tried disabling Miser Mode, but the broken pages are still showing up. We're currently trying to look into UpdateSpecialPages.php. Wuzh (talk) 20:29, 22 March 2023 (UTC)
So i opened up https://www.imfdb.org/wiki/Special:BrokenRedirects (which i didn't before) and i actually think your issue is different.
All the problematic pages are redirects to pages with non ascii characters in them. On the api page they are all being replaced with unicode replacement characters https://www.imfdb.org/api.php?action=query&list=querypage&qppage=BrokenRedirects
Im not sure what is happening, but i guess i would start with charset configuration of your database, especially the redirect table. Bawolff (talk) 21:28, 22 March 2023 (UTC)
The CHARSET is "binary" and has been so from the start of the wiki.
$wgDBTableOptions = "ENGINE=InnoDB, DEFAULT CHARSET=binary";
Or is there another setting we should be looking at? 47.6.75.108 (talk) 21:57, 26 March 2023 (UTC)
binary is normal and to be expected. But i would check what it actually is in db, not what mw settings are.
E.g. https://stackoverflow.com/questions/1049728/how-do-i-see-what-character-set-a-mysql-database-table-column-is Bawolff (talk) 22:03, 26 March 2023 (UTC)
For the database:
+----------------------------+
| DEFAULT_CHARACTER_SET_NAME |
+----------------------------+
| utf8mb4                    |
+----------------------------+ Thebunni (talk) 22:10, 26 March 2023 (UTC)
I meant specifically the redirect table. The default charset for the database doesn't really effect much. Bawolff (talk) 23:16, 26 March 2023 (UTC)
+--------------------+
| CHARACTER_SET_NAME |
+--------------------+
| latin1             |
| latin1             |
+--------------------+ Thebunni (talk) 01:08, 27 March 2023 (UTC)
I'd suggest trying to convert to binary collation. E.g. ALTER TABLE redirect CONVERT TO CHARACTER SET binary;
I generally reccomend taking backups before doing this, although this particular table can probably be regenerated with refreshLinks.php if things go bad. Bawolff (talk) 06:42, 27 March 2023 (UTC)
Thanks! We will try this on our development server and report back. Thebunni (talk) 00:56, 28 March 2023 (UTC)
mysql> SELECT CCSA.character_set_name FROM information_schema.`TABLES` T, information_schema.`COLLATION_CHARACTER_SET_APPLICABILITY` CCSA WHERE CCSA.collation_name = T.table_collation AND T.table_name = "redirect" AND T.table_schema = "database";
+--------------------+
| CHARACTER_SET_NAME |
+--------------------+
| binary             |
+--------------------+
1 row in set (0.00 sec)
We ran the above command you provided to convert the table to binary, and re-ran updateSpecialPages.php, but we still have the same issue. We've confirmed the redirect table is now binary with the above command. Should we run any other maintenance scripts like refreshLinks.php? Thebunni (talk) 20:48, 9 April 2023 (UTC)
hmm. Looks like some of them are still wrong in redirect table https://www.imfdb.org/api.php?action=query&list=allredirects&arfrom=Alar&arprop=ids%7Ctitle&arlimit=max so refreshLinks.php --redirects-only spunds like a good idea. I guess i would also suggest checking the charset of the querycache table.
I guess i would also check https://www.imfdb.org/wiki/?curid=108056&action=raw&ctype=text/css is encoded properly but hard to test from a phone. (Checked, this is fine). Bawolff (talk) 21:17, 9 April 2023 (UTC)
It's fine. 41.116.95.128 (talk) 09:53, 11 April 2023 (UTC)

Feature Request: Basename without filename extension

Please see Help_talk:Magic_words#Basename_without_filename_extension Jidanni (talk) 00:59, 14 March 2023 (UTC)

How to report a bug Malyacko (talk) 09:45, 14 March 2023 (UTC)
Users should generally discuss feature requests before posting them at the Phabricator. dcljr (talk) 17:43, 19 March 2023 (UTC)
That's probably too niche for us to make it a MW core magic word.
You could create an extension, or you could use Extension:Scribunto (or parser functions with string functions enabled) to make something equivalent. Bawolff (talk) 18:00, 14 March 2023 (UTC)
Try this: [[File:{{#explode:{{PAGENAME}}|.|-2}} 2.{{#explode:{{PAGENAME}}|.|-1}}]] Jonathan3 (talk) 23:38, 18 March 2023 (UTC)

LDAP

Hi,

Does anyone managed to integrate LDAP extensions to mediawiki 1.39 ?

If yes, could you indicate the version and your configuration?

I spent lot of time trying to contact an openldap server.

Many thanks in advance

Yann 80.12.102.169 (talk) 08:55, 14 March 2023 (UTC)

SideBarMenu requires extension ParamProcessor

Hi,

We are using 1.39 verison. I have installed latest sidebar from here

https://extdist.wmflabs.org/dist/extensions/SideBarMenu-REL1_39-d4d45bf.tar.gz


Now even after i have installed param processor from composer

Composer require "param-processor/param-processor": "~1.0"


still facing issue SideBarMenu requires extension ParamProcessor, also after installing param processor from composer ,not getting its folder under extensions folder.

Also saw this extension is not compatible with 1.35 & above version.


please suggest . Pooja2425 (talk) 10:41, 14 March 2023 (UTC)

It seems like the extension is not fully supported. It seems to be receiving automatic updates for translations and various security checks etc. but its last true development seems to have been in 2014....
So my advice would be to stop using the extension —TheDJ (Not WMF) (talkcontribs) 15:08, 14 March 2023 (UTC)
@TheDJ is there any extension is alternatice of Side bar.
In our application we have a side bar so need. Pooja2425 (talk) 06:42, 15 March 2023 (UTC)
Manual:Interface/Sidebar Malyacko (talk) 12:43, 15 March 2023 (UTC)

I need to edit/save a page to see transcluded content update (or other)

Ok, I know it's cache related but I can't really understand how it works.

Let put for example i create a page "Foo". I insert a categorytree for example for category "bar"

<categorytree>bar</categorytree>

I now create another page "dummy" and set category to "bar".

Why I need to edit/save the Foo page to see the content?

I know that I can use "&action=purge" but I suppose that this would be automatic.

Where I'm wrong? Kaya8422 (talk) 15:21, 14 March 2023 (UTC)

CategoryTree doesn't integrate into MW's cache purging infrastructure, so you have to purge manually.
You can use $wgCategoryTreeDisableCache to disable cache entirely on pages that have a <categorytree> tag on them, if you want, or set to a time in seconds to make the cache shorter. Bawolff (talk) 17:57, 14 March 2023 (UTC)

Want to login to my profile but I am only sure about my email address / could many times NOT RESET my password!

My email address is lodi60@gmx.de my username is something like Lodidol or Lodidol60 and my password I'm no sure anymore after having been rejected so many times when trying to login into my account. Can you please grant me help to revive my account / profile. Second problem is that I seem not able anymore to suggest discussion topics even in desktop mode from my android phone (my only computer!). I just wanted to suggest to integrate 'calibration' as a subheading in the German Wikipedia article about scales (Waage).

Thank You very much for Your kind help. Stefan B. 2A01:598:8880:6298:2FFD:DA84:27A2:6C23 (talk) 15:58, 14 March 2023 (UTC)

On the reset password page, fill out only your email and not your username. The username is optional if you don't know it. Bawolff (talk) 17:56, 14 March 2023 (UTC)

How do I upgrade from MW 1.25 to MW 1.35?

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.


What I have done so far is an upgrade from MW 1.25 to 1.31 to 1.32 to 1.33 to 1.34 to 1.35, which, as a result, is creating a wiki with defects.

For the migration to MW 1.31 and 1.32 I just ran update.php

For the migration to MW 1.33, 1.34, and 1.35 I ran update.php, (the script is counting migration errors all over the place), followed by cleanupUsersWithNoId.php (force), with the latter again doing nothing.

The upgrade from MW 1.32 to 1.33 appears to be causing the wiki to derail, as noted in Project:Support desk/Flow/2020/11#h-Missing_pages,_but_data_appear_to_be_intact-2020-11-21T01:37:00.000Z. Additionally, and quite unfortunately, about 10% of the files were "disconnected" from their file pages, meaning they no longer show anywhere.

I'd appreciate some advice on how to upgrade a wiki without issues. If there is some script to be run in between, I will happily do so in the correct order, etc. [[kgh]] (talk) 21:10, 14 March 2023 (UTC)

honestly, i dont even know anymore. The actor migration has been a nightmere for third party wikis.
I guess first step is figure out what went wrong. Check the image table for the missing files. Is the img_actor field non-zero, and pointing to something in the actor table? Is the img_comment_id field non-zero and pointing to something in the comment table? Bawolff (talk) 22:17, 14 March 2023 (UTC)
Meh, did not want to individually cuddle database table lines. Well ... [[kgh]] (talk) 08:04, 15 March 2023 (UTC)
I was pointed to a solution without looking at the database directly. See this topic summarizing my experience. [[kgh]] (talk) 10:20, 22 March 2023 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

セットアップの開始が出来ない[session.save_path]

EN (Translated by Goole):

I am new to Mediawiki. During setup, I get the message "Session data has been lost! Make sure session.save_path is set to the correct directory in php.ini." It says to set an appropriate value, but it is not written anywhere and I do not know how to enter it.

WSL2 on Windows 11 / Ubuntu - Apache2

Network Status: Good


JA:

Mediawikiは初めてです。セットアップ時に「セッションのデータが消失しました! php.ini 内で session.save_path が適切なディレクトリに設定されていることを確認してください。」と出てきます。適切な値を設定して下さいと書かれていますがどこにも書いておらずどう入力すればいいのか分かりません。

WSL2 on Windows11 / Ubuntu - Apache2

ネットワークステータス: 良好 2400:2410:B440:AB00:7A79:F458:9580:747C (talk) 07:52, 15 March 2023 (UTC)

Hi there :-)


I installed the extension DiscussionTools and I get the reply button after user signature. Echo is also installed, but there are no notifications when a new topic is added to the Discussion page and, as mentioned in the title, there is no subscribe link next to a topic (Level 2 heading).


Any idea how to solve this? So far I couldn't find anything in the documentation of the extension. Maybe something about the configuration files?


Kind Regards Shaker0351 (talk) 16:09, 15 March 2023 (UTC)

I did a fresh install of Mediawiki and everything was working fine. But when I switched the skin to "Minerva" the "edit this page" link on heade disappeared... do I need to do anything to enable it? any clue, please?
Thank you! Marcis20X (talk) 18:06, 15 March 2023 (UTC)
No, this is all expected behavior. Malyacko (talk) 09:40, 16 March 2023 (UTC)
Can't edit pages if I use minerva skin?? :O Marcis20X (talk) 08:19, 24 March 2023 (UTC)
Better question, can I add the edit link?
If so... how should I do it, please? Marcis20X (talk) 10:53, 14 April 2023 (UTC)

Almost comprehensive look

This is an amazing wiki - everything related to the game, and more, except the one thing I was looking for when I arrived at the site.

Maybe I didn't find it, but did not see graphic of overview areas map/diagram, neutral and combat. B&W version from scans of game manual are here, but would like to find game graphic (NES).

Any help? 140.190.120.169 (talk) 20:43, 15 March 2023 (UTC)

btw - refering to game: Bionic Commando wiki 140.190.120.169 (talk) 20:45, 15 March 2023 (UTC)
Hi, just to clarify - we do help for all the wikis but aren't connected to individual wikis. For specific suggestions like this you need to mention it to people connected to that specific wiki so the right people see it. Bawolff (talk) 22:03, 15 March 2023 (UTC)

I can't find LocalSettings.php

Although Google says it's in the root folder of an installation I still can't find it. Is it an installation error? 2A02:C7C:BD2C:B500:ED36:472A:30F4:7F7B (talk) 21:48, 15 March 2023 (UTC)
See Manual:Config script. (I don't think Google writes MediaWiki documentation.) Malyacko (talk) 09:40, 16 March 2023 (UTC)
Sadly I don't find anything helpful. Does it require a MariaDB/MySQL database or is it an installation error? 2A02:C7C:BD2C:B500:2865:5F77:A943:21C (talk) 22:11, 17 March 2023 (UTC)
Which steps did you perform exactly, following which documentation where exactly, and at which exact step do you get which exact error message, with which MediaWiki software version on which database and database version and which webserver software and webserver software version? Malyacko (talk) 08:43, 18 March 2023 (UTC)
I didn't perform any steps, but I still might need help on how to get MediaWiki working (like it requires a file called 'LocalSettings.php') because like it's hard to get a wiki running without using a wiki host, but does it require a MySQL database or not? 2A02:C7C:BD2C:B500:C8D1:BFD:3FDA:8553 (talk) 09:21, 18 March 2023 (UTC)
Hi, see Manual:Installation_guide Malyacko (talk) 10:09, 18 March 2023 (UTC)
Okay, that seems helpful. Thank you! I'll try to resolve it later :) 2A02:C7C:BD2C:B500:3157:2908:7FCB:E75A (talk) 10:16, 18 March 2023 (UTC)

CSS and Java Script for Popup

Can someone please, if possible, provide me with both the CSS code and Java script of this popup plugin, but only for references?


Extension:Popups Fomkwiki (talk) 09:10, 16 March 2023 (UTC)

The code is all public. See the "Download Git master" link at Extension:Popups Malyacko (talk) 09:38, 16 March 2023 (UTC)

PageForms Extension

in multiple-instance "for template" forms all items are collapsed but the selected.

Is there a way to expand (maximize) them all as default.

Thank you in advance

Frank FrankTZimmermann (talk) 12:28, 16 March 2023 (UTC)

Here's an extract from the manual:
To avoid overloading the screen, in a displayed form, if the height of all the instances together (in pixels) is greater than the value defined for $wgPageFormsHeightForMinimizingInstances (which by default is 800), then all the instances get "minimized", with each one turned into a bar that then expands into the full instance when clicked on. You can change this height value in LocalSettings.php to whatever number of pixels you want. Or, if you want to disable minimizing altogether, just set it to a negative number, like -1. To name the collapsed bar with field names, use displayed fields when minimized=; see 'for template' tag, above.
Extension:Page_Forms/Defining_forms#'for_template'_tag Jonathan3 (talk) 20:29, 16 March 2023 (UTC)

How to Create Dynamic Tooltips Using Only CSS

Is it possible to create dynamic tooltips Using Only CSS? I don't mind if it involves JavaScript as long as it is not too complicated. Fomkwiki (talk) 13:59, 16 March 2023 (UTC)

What are "dynamic tooltips"? Which underlying problem made you think of this potential solution? How is this related to MediaWiki at all? Malyacko (talk) 17:03, 16 March 2023 (UTC)
Depends what you mean by dynamic, but generally yes.
Two approaches:
I use the unmaintained Extension:SimpleTooltip with MW 1.35 and it still seems to work all right. I see there's a fork of it for 1.38+ at Extension:SimpleTooltip (Universal-Omega). Here's another (maybe I should use it instead): Extension:RegularTooltips. You could see how they go about things. Maybe it's just CSS. Jonathan3 (talk) 23:31, 18 March 2023 (UTC)

What is the best way to create a landing page?

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


Hello, I am using MediaWiki on Bluehost and am trying to figure out which is the best way to create a landing page for the website. I was thinking at first to add a Wordpress page under a new subfolder separate of the MediaWiki file system. I was thinking that somehow I could possibly make it so that if you just type in the domain name without anything else, the index.php would redirect to the landing page, and if there is a specific page name value typed into the url (such as Main_Page), then it will go to the page in question.

However I have no idea how I would code that into the index.php without messing something up (thats one of my questions that being if I can do exactly as described without screwing something up in index.php).

The other option I had was to create one in MediaWiki itself, but I don't know how to create a page (maybe a Special page?) and then make index.php directly redirect to it instead of Main_Page. Thanks Guillaume Taillefer (talk) 15:39, 16 March 2023 (UTC)

Why can the main page not be a landing page? What is the main page currently used for if not for "landing"? Malyacko (talk) 17:02, 16 March 2023 (UTC)
I just thought of that before you had said it. I was now thinking that I could just use Mediawiki:Home as the current main page and then use Main_Page as the landing page. Thanks Guillaume Taillefer (talk) 17:06, 16 March 2023 (UTC)
I was just thinking also that in the case that someone in the future (or maybe me if I find it suitable), if you want to use Wordpress in the way I did, you could just turn Main_Page into a redirect to the Wordpress landing page, and then the button to enter the website on the landing page would link to MediaWiki:Home or something Guillaume Taillefer (talk) 17:08, 16 March 2023 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

MediaWiki PDF Creation

Hello all,

I am looking for a solution to export a MediaWiki instance to a PDF file. Specifically, it is a company manual which contains various chapters. Ideally the PDF should contain all chapters in a usable format. Existing addons like Collections need an external webserver for the generation. Unfortunately this is not a solution, because the MediaWiki server is not externally accessible. Does anyone know a simple solution? 178.203.204.121 (talk) 08:49, 17 March 2023 (UTC)

Trying to edit pages throws error Bad value for parameter $target: must be a MediaWiki\Linker\LinkTarget|MediaWiki\Page\PageReference

Hello,


I have a wiki that throws me an error whenever I try to edit a page:


[3944b0b33bcfb4fc5601e9b1] /geowiki/index.php?title=Hauptseite&action=tinymceedit Wikimedia\Assert\ParameterTypeException: Bad value for parameter $target: must be a MediaWiki\Linker\LinkTarget|MediaWiki\Page\PageReference

Backtrace:

from /srv/www/htdocs/geowiki/vendor/wikimedia/assert/src/Assert.php(105)

#0 /srv/www/htdocs/geowiki/includes/linker/LinkRenderer.php(156): Wikimedia\Assert\Assert::parameterType()

#1 /srv/www/htdocs/geowiki/extensions/SelectCategory/SelectCategory_body.php(109): MediaWiki\Linker\LinkRenderer->makeLink()

#2 /srv/www/htdocs/geowiki/includes/HookContainer/HookContainer.php(338): SelectCategory::showHook()

#3 /srv/www/htdocs/geowiki/includes/HookContainer/HookContainer.php(137): MediaWiki\HookContainer\HookContainer->callLegacyHook()

#4 /srv/www/htdocs/geowiki/includes/HookContainer/HookRunner.php(1588): MediaWiki\HookContainer\HookContainer->run()

#5 /srv/www/htdocs/geowiki/includes/EditPage.php(3148): MediaWiki\HookContainer\HookRunner->onEditPage__showEditForm_initial()

#6 /srv/www/htdocs/geowiki/includes/EditPage.php(778): EditPage->showEditForm()

#7 /srv/www/htdocs/geowiki/extensions/TinyMCE/TinyMCEAction.php(36): EditPage->edit()

#8 /srv/www/htdocs/geowiki/includes/MediaWiki.php(542): TinyMCEAction->show()

#9 /srv/www/htdocs/geowiki/includes/MediaWiki.php(322): MediaWiki->performAction()

#10 /srv/www/htdocs/geowiki/includes/MediaWiki.php(904): MediaWiki->performRequest()

#11 /srv/www/htdocs/geowiki/includes/MediaWiki.php(562): MediaWiki->main()

#12 /srv/www/htdocs/geowiki/index.php(50): MediaWiki->run()

#13 /srv/www/htdocs/geowiki/index.php(46): wfIndexMain()

#14 {main}


When an article has nested headlines and I click on "Edit" next to one of the nested headlines, it works flawlessly. That goes for TinyMCE as well as the Wiki source editor.


All my other wikis work flawlessly.


I found a reference to that error in phabricator, but that thread deals with the extension LiquidThreads, and I don't use that. Ablum010777 (talk) 12:25, 17 March 2023 (UTC)

@Ablum010777 Please see "Post a new question" in the sidebar, and also provide the exact version of the "SelectCategory" extension used. Malyacko (talk) 18:39, 17 March 2023 (UTC)
I found the "Post a new question" entry. SelectCategory is version 0.9.0 of Dec 4, 2022. Ablum010777 (talk) 05:49, 20 March 2023 (UTC)
That extension looks like it's ancient. What are the MW versions of your other wikis and this one, and do they all have this extension?
"When an article has nested headlines and I click on "Edit" next to one of the nested headlines, it works flawlessly." - likely the extension only gets used when a whole page is edited.
Maybe try to comment it out of LocalSettings.php and see how you go. Jonathan3 (talk) 23:26, 18 March 2023 (UTC)
I've tried to comment out SelectCategory in the LocalSettings.php, but it didn't help.
The version of SelectCategory is from Dec 4, 2022. That goes for all the wikis.
the require_once(....)-syntax is the only one that works since SelectCategory lacks the file extension.json.
All the wikis including this one are in Version 1.39, and all of them work with PHP 8.1.
Besides, the wiki can only be reached by an internal URL, you cannot reach it over the internet. Ablum010777 (talk) 05:47, 20 March 2023 (UTC)
Well did the error change after you commented it out? Bawolff (talk) 08:03, 20 March 2023 (UTC)
No, the error didn't change. Ablum010777 (talk) 08:35, 20 March 2023 (UTC)
Then you didn't disable the extension ;) Perhaps you are using php-fpm and you need to restart php ? —TheDJ (Not WMF) (talkcontribs) 09:39, 20 March 2023 (UTC)
I disabled the extension SelectCategory in the wiki (commented it out in LocalSettings.php including its configuration settings), and now everything works. Question is: Why does SelectCategory not work in that one wiki when it works in all the others? Ablum010777 (talk) 13:24, 20 March 2023 (UTC)
There is some difference between the wikis that hasn't been mentioned yet. Jonathan3 (talk) 13:55, 20 March 2023 (UTC)
Do you have exactly the same extensions on all wikis (I see that you have TinyMCE on this one)? Jonathan3 (talk) 13:56, 20 March 2023 (UTC)
All our wikis have the extensions LDAPAuthentication2, PluggableAuth, CirrusSearch, Elastica and TinyMCE. Plus of course the ones that are part of the mediawiki-Package. But not all our wikis have all extensions. But not all of them have SelectCategory. If I could upload a Microsoft Excel list and attach it to my response here, that list would show you which wikis make use of which extensions. Ablum010777 (talk) 14:07, 20 March 2023 (UTC)
At first glance these sentences seem contradictory. "Why does SelectCategory not work in that one wiki when it works in all the others?" "But not all of them have SelectCategory." (Looking again, you probably mean it works in all the others where it is present.)
Even if you were to explain that I don't think I could help you any further. Sorry! Jonathan3 (talk) 15:09, 20 March 2023 (UTC)
You were right with everything you wrote. Next time I shall write it more precisely. Thank you for your willingness to help. Ablum010777 (talk) 06:11, 21 March 2023 (UTC)

Strategy to insert non-editable page content

Please excuse me if this is a common question but I've been going around in circles in the docs and not found what I'm looking for.

I want to use mediawiki as a documentation tool. I have 1.5 million objects curated in a bespoke system accessible through an API. I want a wikki page for each of these objects that contains the data in the object in a non-editable form at the start of the page. Wiki users can then edit these pages to document the objects but not edit or remove the externally curated data.

I'm a professional PHP coder so no issue writing an extension. What I need help with is a strategy. I don't want to head down the wrong road at the start!

At what point in the rendering process would it be best to insert the external content? The page ID would be the object ID so I don't need to store any data in the page. I would know what to add right from the start.

Your thoughts most welcome, thanks. 31.94.4.81 (talk) 15:23, 17 March 2023 (UTC)

What about using Extension:External Data? Jonathan3 (talk) 23:21, 18 March 2023 (UTC)

SMW ERROR_SCHEMA_INVALID_KEY won't get fixed by running update.php nor setupStore.php

I'm trying to setup Semantic MediaWiki on a fresh MW install that I did using MAMP on MacOs. When visiting the link of the wiki i get the following error


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

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


When I try using the suggested scripts this is what i get:


php update.php

MediaWiki 1.39.2 Updater

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

Wikimedia\Rdbms\DBConnectionError from line 1477 of /Users/francesco/Sites/localhost/w6/includes/libs/rdbms/loadbalancer/LoadBalancer.php: Cannot access the database: Connection refused (127.0.0.1)

#0 /Users/francesco/Sites/localhost/w6/includes/libs/rdbms/loadbalancer/LoadBalancer.php(972): Wikimedia\Rdbms\LoadBalancer->reportConnectionError()

#1 /Users/francesco/Sites/localhost/w6/includes/libs/rdbms/loadbalancer/LoadBalancer.php(944): Wikimedia\Rdbms\LoadBalancer->getServerConnection(0, 'my_wiki_w6', 4)

#2 /Users/francesco/Sites/localhost/w6/includes/libs/rdbms/database/DBConnRef.php(95): Wikimedia\Rdbms\LoadBalancer->getConnectionInternal(-2, Array, 'my_wiki_w6', 4)

#3 /Users/francesco/Sites/localhost/w6/includes/libs/rdbms/database/DBConnRef.php(101): Wikimedia\Rdbms\DBConnRef->ensureConnection()

#4 /Users/francesco/Sites/localhost/w6/includes/libs/rdbms/database/DBConnRef.php(280): Wikimedia\Rdbms\DBConnRef->__call('getServerVersio...', Array)

#5 /Users/francesco/Sites/localhost/w6/maintenance/update.php(156): Wikimedia\Rdbms\DBConnRef->getServerVersion()

#6 /Users/francesco/Sites/localhost/w6/maintenance/includes/MaintenanceRunner.php(309): UpdateMediaWiki->execute()

#7 /Users/francesco/Sites/localhost/w6/maintenance/doMaintenance.php(85): MediaWiki\Maintenance\MaintenanceRunner->run()

#8 /Users/francesco/Sites/localhost/w6/maintenance/update.php(312): require_once('/Users/francesc...')

#9 {main}


I also tried by replacing $wgDBserver = "localhost"; to $wgDBserver = "127.0.0.1"; which would result in an error when visiting the website and the following output from the terminal


MediaWiki 1.39.2 Updater

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

Wikimedia\Rdbms\DBConnectionError from line 1477 of /Users/francesco/Sites/localhost/w6/includes/libs/rdbms/loadbalancer/LoadBalancer.php: Cannot access the database: No such file or directory (localhost)

#0 /Users/francesco/Sites/localhost/w6/includes/libs/rdbms/loadbalancer/LoadBalancer.php(972): Wikimedia\Rdbms\LoadBalancer->reportConnectionError()

#1 /Users/francesco/Sites/localhost/w6/includes/libs/rdbms/loadbalancer/LoadBalancer.php(944): Wikimedia\Rdbms\LoadBalancer->getServerConnection(0, 'my_wiki_w6', 4)

#2 /Users/francesco/Sites/localhost/w6/includes/libs/rdbms/database/DBConnRef.php(95): Wikimedia\Rdbms\LoadBalancer->getConnectionInternal(-2, Array, 'my_wiki_w6', 4)

#3 /Users/francesco/Sites/localhost/w6/includes/libs/rdbms/database/DBConnRef.php(101): Wikimedia\Rdbms\DBConnRef->ensureConnection()

#4 /Users/francesco/Sites/localhost/w6/includes/libs/rdbms/database/DBConnRef.php(280): Wikimedia\Rdbms\DBConnRef->__call('getServerVersio...', Array)

#5 /Users/francesco/Sites/localhost/w6/maintenance/update.php(156): Wikimedia\Rdbms\DBConnRef->getServerVersion()

#6 /Users/francesco/Sites/localhost/w6/maintenance/includes/MaintenanceRunner.php(309): UpdateMediaWiki->execute()

#7 /Users/francesco/Sites/localhost/w6/maintenance/doMaintenance.php(85): MediaWiki\Maintenance\MaintenanceRunner->run()

#8 /Users/francesco/Sites/localhost/w6/maintenance/update.php(312): require_once('/Users/francesc...')

#9 {main}


Thank you for any suggestions Moltowiki (talk) 22:44, 17 March 2023 (UTC)

Userrights-interwiki

I have a wiki farm. When I try to edit my user rights on another wiki (userrights-interwiki, which is editing my user rights on wiki A from wiki B), the following message is displayed:

Database [name of database] does not exist or is not local.

When trying to edit the user rights, I go to Special:UserRights and then type MyUsername@DesiredWiki. I'm not sure what should go after @. I have tried $wgDBname, $wgDBuser, the URL, but nothing has worked so far. I believe it should be the Wiki ID, but don't know what it is, either.

Thanks! 186.188.144.85 (talk) 07:27, 18 March 2023 (UTC)

You probably have to ensure its all setup with $wgConf and $wgLBFactoryConf Bawolff (talk) 12:33, 18 March 2023 (UTC)

How to print a = mark inside a template?

I have tried this:

{{קוד_חד_שורתי|{{=}}}}

But instead of getting a =, I get:

תבנית:=

Why? 2001:44C8:4047:8BD3:CE6:3385:EF93:3A4F (talk) 13:31, 18 March 2023 (UTC)

You are likely getting the Hebrew equivalent to a red link of Template:=
If that is the case, you just need to click the red link and create the template page with nothing in it but =. Jonathan3 (talk) 23:20, 18 March 2023 (UTC)
Try using &#x3d; Bawolff (talk) 05:16, 19 March 2023 (UTC)
It worked as Bawolff suggested.
Jonathan3 I need to print = inside various templates. 2001:44C8:4448:D818:14B1:4520:9EC1:EC43 (talk) 06:53, 19 March 2023 (UTC)
Johnathan3's suggestion should also work. Bawolff (talk) 08:01, 19 March 2023 (UTC)
Maybe this is an XY Problem scenario! I solved Y (your attempted solution) but Bawolff worked out and solved X (the underlying problem) :-) Jonathan3 (talk) 13:06, 19 March 2023 (UTC)

The only problem I have is that I don't understand why

{{קוד_חד_שורתי|{{=}}}}

Gave the output of a red link

תבנית:=

In the first place. 2001:44C8:4104:6D71:B125:BAD8:81A9:7643 (talk) 15:04, 19 March 2023 (UTC)

You are likely getting the Hebrew equivalent to a red link of Template:=
If that is the case, you just need to click the red link and create the template page with nothing in it but =. Jonathan3 (talk) 20:55, 19 March 2023 (UTC)
I recall that it worked before without creating this template but perhaps I misrecall. 2001:44C8:4550:469A:3D21:EF6D:C107:CB4F (talk) 14:41, 22 March 2023 (UTC)

How do I get Template:USERNAME working?

I am not talking about anything related to Fandom.


Hi, How do I get {{USERNAME}} working on a non-Fandom wiki? I ripped code from Uncyclopedia but it straight doesn't work. 2A02:C7E:572C:9A00:3408:3207:3F05:A948 (talk) 19:16, 18 March 2023 (UTC)

Please see "Post a new question" in the sidebar, and explain what {{USERNAME}} is or does, and where you found it (link), etc. Please provide sufficient context. Thanks! Malyacko (talk) 20:06, 18 March 2023 (UTC)
I found it on Fandom's Dev wiki. There is also a template of it on Uncyclopedia (the english one btw) and it's on lots of wikis on Fandom. I just need the JS code for it to work on a non-Fandom wiki (such as Meowpedia, which is on Miraheze) 2A02:C7E:572C:9A00:3408:3207:3F05:A948 (talk) 20:21, 18 March 2023 (UTC)
See my previous comment: Please provide a link to the template. Malyacko (talk) 22:06, 18 March 2023 (UTC)
Looks like the template is at https://en.uncyclopedia.co/wiki/Template:USERNAME and the JavaScript is at https://en.uncyclopedia.co/wiki/MediaWiki:Common.js:
/** Show username ********************************************************
 * The annoying hack used by [[Template:USERNAME]]!
 * Inserts user name into <span class='insertusername'></span>
 * Originally by [[wikia:User:Splarka|Splarka]], [[User:Spang]]
 * New version by [[User:Bizzeebeever]]
 */
$j( function() {
	var name = mw.config.get( 'wgUserName' );
	if ( !window.disableUsernameReplace && name ) {
		$j( 'span.insertusername' ).text( name );
	}
} );
Jonathan3 (talk) 23:15, 18 March 2023 (UTC)
It doesn't work on my wiki sadly. Does it require an extension or something? Or how else am I going to get it to work? 2A02:C7E:572C:9A00:458E:2135:F3D7:74 (talk) 07:23, 19 March 2023 (UTC)
If it "doesn't work", which exact code did you put into which exact place(s)? Malyacko (talk) 08:34, 19 March 2023 (UTC)
I put it somewhere at the top in Meowpedia’s sitewide JS. I put the JS script from the English Uncyclopedia, but it doesn’t work. 2A02:C7E:572C:9A00:11A9:9A83:FA22:DE08 (talk) 10:03, 19 March 2023 (UTC)
Please be specific and please leave zero room for interpretation and please always provide exact page names. Thanks. If you check your web browser's Developer Tools' console, which errors are shown? Malyacko (talk) 10:58, 19 March 2023 (UTC)
It looks like $j is being used on that other wiki for jQuery, but it's not set up like that on yours.
You could avoid jQuery and do something like this:
Array.from( document.getElementsByClassName( 'insertusername' ) ).forEach( e => { e.innerText = mw.config.get( 'wgUserName' ) || 'Anon.'; } );
Sam Wilson 12:47, 19 March 2023 (UTC)
Okay, anyways, why doesn't jQuery not work for MediaWiki 1.39? 2A02:C7C:BD2C:B500:C1E6:CF0D:F43F:CBD (talk) 17:52, 19 March 2023 (UTC)
@Samwilson sadly it doesn't seem like it works D: 2A02:C7C:BD2C:B500:FD6C:F516:4101:CF3 (talk) 21:13, 19 March 2023 (UTC)
jQuery does work in 1.39, but it's not called $j, but just $.
My example code wasn't really well tested. It was just an idle idea.
Do you know how to open your web browser's Developer Tools' console? What errors do you see? Sam Wilson 23:53, 19 March 2023 (UTC)
I wonder whether this line from Uncyclopedia would make the jQuery version work:
var $j = jQuery; //Touch this, and I will kill you. Jonathan3 (talk) 23:55, 19 March 2023 (UTC)

how can I delete images from the upload folder File::

I uploaded somefiles but my internet connection snapped. Somehow the files won't appear and create an Error Code 1. I plan to just overwrite this files but mediawiki just won't allow it. I just wanna delete this files and reupload them thank you. Repontes123 (talk) 21:28, 18 March 2023 (UTC)

New Computer, new installation, can't get past "A database query error has occurred. ..."

When I am at the "install" section of the installation, when I click on "Continue", I get this error:

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?

I can't run /maintenance/update.php because LocalSettings.php does not exist yet.


I am not updating anything. New computer, new installation of Ubuntu 24, new installation of Apache2, new installation of PHP8.2, new installation of MediaWiki.

(Using this guide.)

Plus HOURS of frustration.


Any tips would be appreciated. SteveRMann (talk) 23:30, 19 March 2023 (UTC)

Is there more to the error message than that? Normally there should be additional text. Bawolff (talk) 08:04, 20 March 2023 (UTC)
This is the same type of issue as the one I posted a new thread with below, which includes a bit more information if you want to have a look. Menkar112 (talk) 19:05, 20 March 2023 (UTC)

Trouble installing on RHEL 9

Hi all,

Attempting to install MediaWiki on RHEL 9. New to this sort of thing so please bear with me. I installed the required LAMP stack and created a user for Mariadb, flushing privileges after doing so. I go through the installation and end up receiving the following:

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

Please see https://www.me

I searched Google and determined that running 'update.php' should resolve this. It does not. I attempt to run it via:

/var/www/html/mediawiki/mediawiki-1.37.1/maintenance/update.php

I then see this:

A copy of your installation's LocalSettings.php

must exist and be readable in the source directory.

Use --conf to specify it.

At this point Google leads me to copy DefaultSettings.php to the same directory as /includes and rename it to LocalSettings.php. I do this and then retry update.php and see:

PHP Warning:  require(/var/www/html/mediawiki/mediawiki-1.37.1/ServiceWiring.php): Failed to open stream: No such file or directory in /var/www/html/mediawiki/mediawiki-1.37.1/vendor/wikimedia/services/src/ServiceContainer.php on line 125

PHP Fatal error:  Uncaught Error: Failed opening required '/var/www/html/mediawiki/mediawiki-1.37.1/ServiceWiring.php' (include_path='/var/www/html/mediawiki/mediawiki-1.37.1/vendor/pear/console_getopt:/var/www/html/mediawiki/mediawiki-1.37.1/vendor/pear/mail:/var/www/html/mediawiki/mediawiki-1.37.1/vendor/pear/mail_mime:/var/www/html/mediawiki/mediawiki-1.37.1/vendor/pear/net_smtp:/var/www/html/mediawiki/mediawiki-1.37.1/vendor/pear/net_socket:/var/www/html/mediawiki/mediawiki-1.37.1/vendor/pear/net_url2:/var/www/html/mediawiki/mediawiki-1.37.1/vendor/pear/pear-core-minimal/src:/var/www/html/mediawiki/mediawiki-1.37.1/vendor/pear/pear_exception:.:/usr/share/pear:/usr/share/php') in /var/www/html/mediawiki/mediawiki-1.37.1/vendor/wikimedia/services/src/ServiceContainer.php:125

Stack trace:

#0 /var/www/html/mediawiki/mediawiki-1.37.1/includes/MediaWikiServices.php(425): Wikimedia\Services\ServiceContainer->loadWiringFiles()

#1 /var/www/html/mediawiki/mediawiki-1.37.1/includes/MediaWikiServices.php(263): MediaWiki\MediaWikiServices::newInstance()

#2 /var/www/html/mediawiki/mediawiki-1.37.1/includes/Hooks.php(174): MediaWiki\MediaWikiServices::getInstance()

#3 /var/www/html/mediawiki/mediawiki-1.37.1/includes/exception/MWExceptionHandler.php(767): Hooks::runner()

#4 /var/www/html/mediawiki/mediawiki-1.37.1/includes/exception/MWExceptionHandler.php(291): MWExceptionHandler::logError()

#5 /var/www/html/mediawiki/mediawiki-1.37.1/vendor/wikimedia/services/src/ServiceContainer.php(125): MWExceptionHandler::handleError()

#6 /var/www/html/mediawiki/mediawiki-1.37.1/vendor/wikimedia/services/src/ServiceContainer.php(125): require()

#7 /var/www/html/mediawiki/mediawiki-1.37.1/includes/MediaWikiServices.php(425): Wikimedia\Services\ServiceContainer->loadWiringFiles()

#8 /var/www/html/mediawiki/mediawiki-1.37.1/includes/MediaWikiServices.php(263): MediaWiki\MediaWikiServices::newInstance()

#9 /var/www/html/mediawiki/mediawiki-1.37.1/includes/exception/MWExceptionHandler.php(130): MediaWiki\MediaWikiServices::getInstance()

#10 /var/www/html/mediawiki/mediawiki-1.37.1/includes/exception/MWExceptionHandler.php(201): MWExceptionHandler::rollbackPrimaryChangesAndLog()

#11 /var/www/html/mediawiki/mediawiki-1.37.1/includes/exception/MWExceptionHandler.php(170): MWExceptionHandler::handleException()

#12 [internal function]: MWExceptionHandler::handleUncaughtException()

#13 {main}

  thrown in /var/www/html/mediawiki/mediawiki-1.37.1/vendor/wikimedia/services/src/ServiceContainer.php on line 125


At this point I'm frustrated and don't know what else to do. This was supposed to be a simple learning project for me(and I think I've learned some things) but I can't complete it. Any help would be appreciated. Menkar112 (talk) 00:45, 20 March 2023 (UTC)

to clarify is the error message actually cut off like that mid sentence? "Please see https://www.me"?
> At this point Google leads me to copy DefaultSettings.php to the same directory as /includes and rename it to LocalSettings.php. I do this and then retry update.php and see:
This is the wrong thing to do, and won't work. The second error you have about missing ServiceWiring.php is caused by this.
The you need to run update.php error message is reused from normal mediawiki. If it happens in the installer something else is going on. You do not need to run update.php (nor would it be helpful if you haven't installed mediawiki yet)
[Sorry, i know none of that solves your problem] Bawolff (talk) 23:13, 20 March 2023 (UTC)
It's okay and yes the error cuts off mid sentence like that unfortunately. I've tried everything I know to do in my limited knowledge of things. 162.221.28.56 (talk) 12:04, 21 March 2023 (UTC)

wikibase internal error

Hello everyone

I have get an error after install wikibase client

MediaWiki internal error.

Original exception: [1c96d70cd220aec317deb06e] /index.php?title=Main_Page TypeError: hash() expects parameter 2 to be string, bool given
Backtrace:
from /path/extensions/Wikibase/client/WikibaseClient.ServiceWiring.php(992)
#0 /path/extensions/Wikibase/client/WikibaseClient.ServiceWiring.php(992): hash()
#1 /path/vendor/wikimedia/services/src/ServiceContainer.php(447): Wikimedia\Services\ServiceContainer->{closure}()
#2 /path/vendor/wikimedia/services/src/ServiceContainer.php(411): Wikimedia\Services\ServiceContainer->createService()
#3 /path/includes/MediaWikiServices.php(301): Wikimedia\Services\ServiceContainer->getService()
#4 /path/vendor/wikimedia/services/src/ServiceContainer.php(419): MediaWiki\MediaWikiServices->getService()
#5 /path/extensions/Wikibase/client/includes/WikibaseClient.php(466): Wikimedia\Services\ServiceContainer->get()
#6 /path/extensions/Wikibase/client/WikibaseClient.ServiceWiring.php(981): Wikibase\Client\WikibaseClient::getTermFallbackCacheFactory()
#7 /path/vendor/wikimedia/services/src/ServiceContainer.php(447): Wikimedia\Services\ServiceContainer->{closure}()
#8 /path/vendor/wikimedia/services/src/ServiceContainer.php(411): Wikimedia\Services\ServiceContainer->createService()
#9 /path/includes/MediaWikiServices.php(301): Wikimedia\Services\ServiceContainer->getService()
#10 /path/vendor/wikimedia/services/src/ServiceContainer.php(419): MediaWiki\MediaWikiServices->getService()
#11 /path/extensions/Wikibase/client/includes/WikibaseClient.php(461): Wikimedia\Services\ServiceContainer->get()
#12 /path/extensions/Wikibase/client/WikibaseClient.ServiceWiring.php(496): Wikibase\Client\WikibaseClient::getTermFallbackCache()
#13 /path/vendor/wikimedia/services/src/ServiceContainer.php(447): Wikimedia\Services\ServiceContainer->{closure}()
#14 /path/vendor/wikimedia/services/src/ServiceContainer.php(411): Wikimedia\Services\ServiceContainer->createService()
#15 /path/includes/MediaWikiServices.php(301): Wikimedia\Services\ServiceContainer->getService()
#16 /path/vendor/wikimedia/services/src/ServiceContainer.php(419): MediaWiki\MediaWikiServices->getService()
#17 /path/extensions/Wikibase/client/includes/WikibaseClient.php(547): Wikimedia\Services\ServiceContainer->get()
#18 /path/extensions/Wikibase/client/WikibaseClient.ServiceWiring.php(866): Wikibase\Client\WikibaseClient::getFallbackLabelDescriptionLookupFactory()
#19 /path/vendor/wikimedia/services/src/ServiceContainer.php(447): Wikimedia\Services\ServiceContainer->{closure}()
#20 /path/vendor/wikimedia/services/src/ServiceContainer.php(411): Wikimedia\Services\ServiceContainer->createService()
#21 /path/includes/MediaWikiServices.php(301): Wikimedia\Services\ServiceContainer->getService()
#22 /path/vendor/wikimedia/services/src/ServiceContainer.php(419): MediaWiki\MediaWikiServices->getService()
#23 /path/extensions/Wikibase/client/includes/WikibaseClient.php(321): Wikimedia\Services\ServiceContainer->get()
#24 /path/extensions/Wikibase/client/WikibaseClient.ServiceWiring.php(606): Wikibase\Client\WikibaseClient::getSidebarLinkBadgeDisplay()
#25 /path/vendor/wikimedia/services/src/ServiceContainer.php(447): Wikimedia\Services\ServiceContainer->{closure}()
#26 /path/vendor/wikimedia/services/src/ServiceContainer.php(411): Wikimedia\Services\ServiceContainer->createService()
#27 /path/includes/MediaWikiServices.php(301): Wikimedia\Services\ServiceContainer->getService()
#28 /path/vendor/wikimedia/services/src/ServiceContainer.php(419): MediaWiki\MediaWikiServices->getService()
#29 /path/extensions/Wikibase/client/includes/WikibaseClient.php(326): Wikimedia\Services\ServiceContainer->get()
#30 /path/extensions/Wikibase/client/WikibaseClient.ServiceWiring.php(553): Wikibase\Client\WikibaseClient::getLanguageLinkBadgeDisplay()
#31 /path/vendor/wikimedia/services/src/ServiceContainer.php(447): Wikimedia\Services\ServiceContainer->{closure}()
#32 /path/vendor/wikimedia/services/src/ServiceContainer.php(411): Wikimedia\Services\ServiceContainer->createService()
#33 /path/includes/MediaWikiServices.php(301): Wikimedia\Services\ServiceContainer->getService()
#34 /path/vendor/wikimedia/services/src/ServiceContainer.php(419): MediaWiki\MediaWikiServices->getService()
#35 /path/vendor/wikimedia/object-factory/src/ObjectFactory.php(211): Wikimedia\Services\ServiceContainer->get()
#36 /path/vendor/wikimedia/object-factory/src/ObjectFactory.php(152): Wikimedia\ObjectFactory\ObjectFactory::getObjectFromSpec()
#37 /path/includes/HookContainer/HookContainer.php(473): Wikimedia\ObjectFactory\ObjectFactory->createObject()
#38 /path/includes/HookContainer/HookContainer.php(156): MediaWiki\HookContainer\HookContainer->getHandlers()
#39 /path/includes/HookContainer/HookRunner.php(1201): MediaWiki\HookContainer\HookContainer->run()
#40 /path/includes/content/ContentHandler.php(1736): MediaWiki\HookContainer\HookRunner->onContentAlterParserOutput()
#41 /path/includes/content/Renderer/ContentRenderer.php(47): ContentHandler->getParserOutput()
#42 /path/includes/Revision/RenderedRevision.php(266): MediaWiki\Content\Renderer\ContentRenderer->getParserOutput()
#43 /path/includes/Revision/RenderedRevision.php(237): MediaWiki\Revision\RenderedRevision->getSlotParserOutputUncached()
#44 /path/includes/Revision/RevisionRenderer.php(221): MediaWiki\Revision\RenderedRevision->getSlotParserOutput()
#45 /path/includes/Revision/RevisionRenderer.php(158): MediaWiki\Revision\RevisionRenderer->combineSlotOutput()
#46 [internal function]: MediaWiki\Revision\RevisionRenderer->MediaWiki\Revision\{closure}()
#47 /path/includes/Revision/RenderedRevision.php(199): call_user_func()
#48 /path/includes/poolcounter/PoolWorkArticleView.php(91): MediaWiki\Revision\RenderedRevision->getRevisionParserOutput()
#49 /path/includes/poolcounter/PoolWorkArticleViewCurrent.php(97): PoolWorkArticleView->renderRevision()
#50 /path/includes/poolcounter/PoolCounterWork.php(162): PoolWorkArticleViewCurrent->doWork()
#51 /path/includes/page/ParserOutputAccess.php(299): PoolCounterWork->execute()
#52 /path/includes/page/Article.php(714): MediaWiki\Page\ParserOutputAccess->getParserOutput()
#53 /path/includes/page/Article.php(528): Article->generateContentOutput()
#54 /path/includes/actions/ViewAction.php(78): Article->view()
#55 /path/includes/MediaWiki.php(542): ViewAction->show()
#56 /path/includes/MediaWiki.php(322): MediaWiki->performAction()
#57 /path/includes/MediaWiki.php(904): MediaWiki->performRequest()
#58 /path/includes/MediaWiki.php(562): MediaWiki->main()
#59 /path/index.php(50): MediaWiki->run()
#60 /path/index.php(46): wfIndexMain()
#61 {main}

Can someone help me, please? Dan (talk) 10:31, 20 March 2023 (UTC)

Is $wgSecretKey set to a random string in LocalSettings.php ? (Normally installer would do this for you) Bawolff (talk) 00:00, 21 March 2023 (UTC)
@Bawolff Thanks. Dan (talk) 11:34, 21 March 2023 (UTC)

Phantom-User

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, ich betreibe ein kleines geschlossenes Wiki. Um neuen Usern Zugang zu gewähren, habe ich einen Phantom-User angelegt. Der ist aber gesperrt, nur die Option "Benutzerkonto anlegen" ist erlaubt. Damit soll der neue User sich ein eigenes Konto anmelden. Dies wird ihm aber verwehrt, weil die Meldung "Die erforderlichen Rechte fehlen" (als Phantom-User). Wie muß ich es richtig machen? LG

Hi, I run a small closed wiki. To give new users access, I created a phantom user. But it is blocked, only the option "Create user account" is allowed. This is to allow the new user to register their own account. However, he is denied this because the message "The required rights are missing" (as a phantom user). How do I have to do it right? LG 2003:E7:A720:8C54:55E5:FAB8:9DD6:268C (talk) 14:02, 20 March 2023 (UTC)

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

Hello,

After installing a new 1.39.2 Mediawiki server to upgrade our solution we are facing code regression issues with UNC Link.

in version 1.37.4 we used the following tags to handle UNC links:

<ext>file:///\\Server\Entity\Directory</ext>

This created a link that when we opened a new tab when we clicked on it and displayed the contents of the given directory.

For this if we used the extension "LaunchExternal" which is depressed on the new version.

So I tried to use the solutions provided with the following solution :

https://www.mediawiki.org/wiki/UNC_links/en

I also changed the following settings:

https://www.mediawiki.org/wiki/Manual:$wgUrlProtocols

https://www.mediawiki.org/wiki/Manual:$wgExternalLinkTarget

The link is therefore present on my mediawiki page but when I click on it nothing happens. On the other hand, if I right-click and open in a new tab, I see that the UNC link is correct.

However the display of the content is not done automatically I have to refresh the page.

If I try from our old wiki which is still active, the link opens automatically without further actions.

So my question is the following how to get this functionality on my new version of mediawiki please?

What am I missing in terms of settings for it to work properly?

regards

Cyril G. C.galissaires (talk) 14:21, 20 March 2023 (UTC)

It would be helpful to know the precise html being outputted. Maybe its some sort of encoding issue.
also maybe you are experiencing https://textslashplain.com/2019/10/09/navigating-to-file-urls/ Bawolff (talk) 23:56, 20 March 2023 (UTC)
Hi Bawolff,
Thank you for your answer. Here is the output html code for my link :
file://///server/Entity/Directory
When I take this code and place it in a browser, the latter opens it correctly and displays the contents of the directory.
My first concern is that I can't find how to make this link open in another tab from mediawiki and this from the upgrade. Then and always since the upgrade that the display of the content is done automatically.
I confirm on the other hand that in the old version of mediawiki everything works correctly (opening in a new tab + display of the content automatically).
Regards
Cyril C.galissaires (talk) 06:04, 21 March 2023 (UTC)

ReplaceText extension and "expansion depth limit exceeded"

I used ReplaceText to change the field name (e.g. |fieldname=) of a Cargo template. Dozens of pages ended up with this warning.

After undoing the edits, the pages were fine again.

Changing the field name on the same pages manually by clicking Edit and Save worked fine.

Any ideas?

I'm not sure whether this is a problem with the ReplaceText extension, or MediaWiki, or something else. Jonathan3 (talk) 14:32, 20 March 2023 (UTC)

Can you paste the NewPP parser report report, both for the normal edit, and for the problematic edit with the warning? Bawolff (talk) 23:54, 20 March 2023 (UTC)
In chronological order, here is the NewPP report for the old version of the page:
NewPP limit report
Cached time: 20230321102010
Cache expiry: 86400
Dynamic content: false
Complications: []
CPU time usage: 0.028 seconds
Real time usage: 0.044 seconds
Preprocessor visited node count: 390/1000000
Post‐expand include size: 7554/2097152 bytes
Template argument size: 2395/2097152 bytes
Highest expansion depth: 12/40
Expensive parser function count: 2/100
Unstrip recursion depth: 0/20
Unstrip post‐expand size: 945/5000000 bytes
This is from the revision created by ReplaceText (resulting in the "Expansion depth limit exceeded" warning):
NewPP limit report
Cached time: 20230321101847
Cache expiry: 86400
Dynamic content: false
Complications: []
CPU time usage: 0.003 seconds
Real time usage: 0.004 seconds
Preprocessor visited node count: 3/1000000
Post‐expand include size: 0/2097152 bytes
Template argument size: 0/2097152 bytes
Highest expansion depth: 2/40
Expensive parser function count: 0/100
Unstrip recursion depth: 0/20
Unstrip post‐expand size: 0/5000000 bytes
This is from the revision where I undo the ReplaceText revision:
NewPP limit report
Cached time: 20230321102056
Cache expiry: 86400
Dynamic content: false
Complications: []
CPU time usage: 0.029 seconds
Real time usage: 0.045 seconds
Preprocessor visited node count: 390/1000000
Post‐expand include size: 7554/2097152 bytes
Template argument size: 2395/2097152 bytes
Highest expansion depth: 12/40
Expensive parser function count: 2/100
Unstrip recursion depth: 0/20
Unstrip post‐expand size: 945/5000000 bytes
Jonathan3 (talk) 10:25, 21 March 2023 (UTC)
Huh, well clearly something weird is happening if all those limits are marked as 0. Bawolff (talk) 21:19, 22 March 2023 (UTC)
They'd all have been done via runJobs.php. Would that make any difference? Jonathan3 (talk) 14:42, 23 March 2023 (UTC)
It should not, but clearly something is happening that shouldn't be. Bawolff (talk) 17:01, 23 March 2023 (UTC)
Thanks. I'll report back with more details if it happens again, and in the meantime have mentioned it on the ReplaceText talk page at Extension talk:Replace Text/Archive 2023#h-ReplaceText_extension_and_"expansion_depth_limit_exceeded"-20230323220500. Jonathan3 (talk) 22:06, 23 March 2023 (UTC)
I've run into this problem in the past, but I cannot now remember if I resolved it. I have a memory that it was related to the number of pages I was inserting; all the tests I did were with ten pages, then I did a hundred and they got broken with this. Sam Wilson 03:57, 24 March 2023 (UTC)
Thanks. Yes for me it only happened with a large number of pages (over 100).
I've done that number of pages before, without problems, but I think maybe not a parameter name within a template. And the templates are nested a bit so it's not completely strange.
Having said that....... I have a feeling I absent-mindedly kept the "use regex" option on when replacing exactly the same template parameter name in the first 250 pages and it didn't cause the problem. Jonathan3 (talk) 18:34, 24 March 2023 (UTC)

While updating to MediaWiki 1.39.2, gives me a Error 1146

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


I am trying to update MediaWiki from I believe 1.38.4 to 1.39.2. However when going through the Upgrading Existing Installation page, it gave me an error:

An error occurred:

Error 1146: Table '##db name##.reading_list_entry' doesn't exist

Function: Wikimedia\Rdbms\Database::sourceFile( /##folder##/###folder###/public_html/extensions/ReadingLists/sql/patches/05-increase-rle_title-length.sql )

Query: ALTER TABLE reading_list_entry

MODIFY rle_title VARCHAR(383) BINARY NOT NULL

And then under that is a red box saying :

There was an error while upgrading the MediaWiki tables in your database.

For more information look into the log above, to retry click Continue.

I tried finding "reading_list_entry" in my table but its there, so I have no idea what MediaWiki is talking about. Any help would be great, thanks Guillaume Taillefer (talk) 19:38, 20 March 2023 (UTC)

Nevermind I found the solution. The problem is is that in the database the supposed "reading_list_entry" isn't called that but rather is "mwy6_reading_list_entry" instead. So I went to the sql file that it said the "Function:" was in, changed it to mwy6_reading_list_entry, and clicked "Continue", and then it was fixed, and I was allowed to finish the update Guillaume Taillefer (talk) 19:57, 20 March 2023 (UTC)
Filed as https://phabricator.wikimedia.org/T332651 Bawolff (talk) 23:49, 20 March 2023 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

How do I change the VectorTabs lines from a blue shade to a different colour?

Do you know how? What CSS script is needed to make it work? 2A02:C7C:BD2C:B500:79D1:6953:1B05:9116 (talk) 20:08, 20 March 2023 (UTC)

Also, why not the inactive buttons and active VectorTabs CSS scripts? 2A02:C7C:BD2C:B500:79D1:6953:1B05:9116 (talk) 20:19, 20 March 2023 (UTC)
Err… i need a reply 2A02:C7C:BD2C:B500:7C4E:2069:4C4A:CCCE (talk) 07:51, 22 March 2023 (UTC)
This will be a bit tedious. You will need to add some CSS to the "MediaWiki:Vector.css" page, something like
.mw-body {
  border: 1px solid red;
}
This is just an example to start out. You will need to fiddle a bit to figure it out. [[kgh]] (talk) 08:49, 22 March 2023 (UTC)
Sadly I already put the script in, however it still doesn't work. 2A02:C7C:BD2C:B500:6C60:2FB0:93F1:CC78 (talk) 18:34, 22 March 2023 (UTC)
Can you reply back please? Been 13 hours, and I still haven’t received a reply. 2A02:C7C:BD2C:B500:84F7:6415:5F98:821C (talk) 07:34, 23 March 2023 (UTC)
Please either be more patient, or see Professional development and consulting for your options if you expect answers in a certain timeframe. Thanks. Malyacko (talk) 14:28, 23 March 2023 (UTC)
Did you do a hard refresh? The CSS provided should at least change things for classical Vector. See also Manual:CSS. It is not the best of bread but it appears to be all we have here. [[kgh]] (talk) 09:05, 23 March 2023 (UTC)
The help on Cascading Style Sheets on the English Wikipedia is probably better to look for answers and help. [[kgh]] (talk) 14:10, 23 March 2023 (UTC)
Sorry. I couldn't find anything helpful 2A02:C7C:BD2C:B500:6C60:2FB0:93F1:CC78 (talk) 16:16, 23 March 2023 (UTC)
I am out of ideas too. Try to find someone in your wiki community who has some CSS knowledge. This is your best shot I guess. [[kgh]] (talk) 19:49, 23 March 2023 (UTC)
My community is small though. It only consists of one person. 2A02:C7C:BD2C:B500:A5CE:5CFD:630C:BFCB (talk) 08:10, 24 March 2023 (UTC)
been 8 days and i haven't got any replies 2A02:C7C:BD2C:B500:30B3:B930:B206:54DC (talk) 16:05, 1 April 2023 (UTC)
See Professional development and consulting if you must get replies. Here if nobody knows nobody will answer. Malyacko (talk) 17:30, 1 April 2023 (UTC)

I get this error now when I go to any Special page after updating to 1.39

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


After I had updated from 1.38.4 to 1.39.2, whenever I go to a Special page, it gives me this error at the top:

Deprecated: Use of SkinTemplateNavigation::SpecialPage hook (used in CentralNotice::addNavigationTabs) was deprecated in MediaWiki 1.39. [Called from MediaWiki\HookContainer\HookContainer::run in /###folder###/###folder###/public_html/includes/HookContainer/HookContainer.php at line 137] in /###folder###/###folder###/public_html/includes/debug/MWDebug.php on line 381

I tried searching around for this issue, but only came up with somewhat related errors but in the end aren't the same. Guillaume Taillefer (talk) 20:33, 20 March 2023 (UTC)

Maybe upgrade the CentralNotice extension. Jonathan3 (talk) 22:34, 20 March 2023 (UTC)
I did initially however I looked at the extention page for it and it said it supported 1.38 or less, but then I went to the download page and it had a version for 1.39 and it worked Guillaume Taillefer (talk) 22:48, 20 March 2023 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

How to keep running runJobs.php for uploading large files

Two months ago I posted how I was having a problem with uploading large files (1gb and above) and that I kept getting an error message about it. @Bawolff responded to me saying to set $wgEnableAsyncUploads to true,

"and you also have to run runJobs.php specifying the types AssembleUploadChunks and PublishStashedFile (These types are not run by default if you don't specify a type)."

This is the part I am confused on, as I don't know where to execute it. If you have to execute the command in SSH, doesn't that mean I will have to execute it every time that I upload a large file? I then thought otherwise and asked if I should execute it in LocalSettings.php using (I am redoing it because the example I gave doesn't include the parameters he's talking about) $output = shell_exec('php maintenance/runJobs.php --type=AssembleUploadChunks --type=PublishStashedFile'); echo "<pre>$output</pre>";? He didn't answer to that so I don't know. I tried executing :php maintenance/runJobs.php --type=AssembleUploadChunks --type=PublishStashedFile in Shell, but it complained that I was doing --type twice, but idk how to do both at the same time, however doing it each time with each type worked fine. Guillaume Taillefer (talk) 22:00, 20 March 2023 (UTC)

Normally you would add a cron job (from shell run crontab -e)
another option is to execute in a scree n with the --wait option (to make it keep going after you close the shell).
You have to run separate runJobs.pho commands for each job type. You cannot combine them.
This only works for things uploaded by uploadwizard. It does not work for Special:upload.
If you have access to shell, an easier approach might be to import your image with importImages.php which does not require job queue. This does require you to transfer your file to the server beforehand. Bawolff (talk) 23:07, 20 March 2023 (UTC)
So I tried combining the example shown on the cron job page, and inputted this (my MW_INSTALL_PATH : has my actual directory):
#!/bin/bash
# Put the MediaWiki installation path on the line below
MW_INSTALL_PATH=/home/www/www.mywikisite.example/mediawiki
RUNJOBS=$MW_INSTALL_PATH/maintenance/runJobs.php  
echo Starting job service...
# Wait a minute after the server starts up to give other processes time to
get started
sleep 60
echo Started.
while true; do
        # Job types that need to be run ASAP no matter how many of them  
are in the queue
        # Those jobs should be very "cheap" to run
        php $RUNJOBS --type="AssembleUploadChunks"
        php $RUNJOBS --type="PublishStashedFile"
        # Everything else, limit the number of jobs on each batch
        # The --wait parameter will pause the execution here until new
jobs are added,
        # to avoid running the loop without anything to do
        php $RUNJOBS --wait --maxjobs=20
        # Wait some seconds to let the CPU do other things, like handling
web requests, etc
        echo Waiting for 10 seconds...
        sleep 10
done
then when I reinputted your command to go back in, it wasn't there anymore. Then I retried doing it, and then exited and it gave me the following error:
(XID hyv26a) “/usr/bin/crontab” reported error code “1” when it ended: "-":6: bad minute
errors in crontab file, can't install.
I then tried to just insert the commands manually into SSH:
php /path/runJobs.php --wait --type="PublishStashedFile"
php /path/runJobs.php --wait --type="AssembleUploadChunks"
However I couldn't run one without being able to run the other so I closed the shell and although trying to go up the list of previous commands the previous one didn't show up, I did the next one anyways, and as before can't do the other command. Guillaume Taillefer (talk) 23:51, 20 March 2023 (UTC)
You shouldn't put the shell script into the crontab. The crontab just has the name of the file containing the script to run.
> However I couldn't run one without being able to run the other so I closed the shell and although trying to go up the list of previous commands the previous one didn't show up, I did the next one anyways, and as before can't do the other command.
you could try doing from shell:
nohup php /path/runJobs.php --wait --type="PublishStashedFile" > publishstashfile.log 2>&1 & ; nohup php /path/runJobs.php --wait --type=AssembleUploadChunks > assembleuploadchunks.log 2>&1 &
This may cause them to stay running after you exit ssh, so you may need to use the kill command if you want to stop them. Bawolff (talk) 00:38, 21 March 2023 (UTC)
I ran them but trying to upload the 1 gb file leads to the connection error (which is what it has been doing since I have set $wgEnableAsyncUploads to true), so I'll just have to try and reduce the file sizes by compression or something. Thanks anyways for the help though Guillaume Taillefer (talk) 01:15, 21 March 2023 (UTC)
connection error is kind of odd. You should try and figure out what the cause of that is. Its unlikely to be related to the jobs as a connection error would happen before that. It might indicate that normal upload instead of chunked upload is being used. It could also be a WAF related issue if you have one of those.
You could also try setting $wgUploadWizardConfig['maxSimultaneousConnections'] =1; or even decreasing the chunk size (although the default is quite small) Bawolff (talk) 02:55, 21 March 2023 (UTC)

SMW add results?

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


Is it possible to search for various categories?

Example:

{{#ask: [[Category:X::]] [[Category:Y::]]
|Question
|format=sum
}}

I have not found a way to make it work, the result always ignores Category: Y 2003:D0:170D:8691:AD23:10A6:7F5A:BB5A (talk) 09:10, 21 March 2023 (UTC)

Try
{{#ask:
 [[Category:X]]
 OR
 [[Category:Y]]
 |?Question
 |format=sum
}}
or
{{#ask:
 [[Category:X||Category:Y]]
 |?Question
 |format=sum
}}
See https://www.semantic-mediawiki.org/wiki/Help:Unions_of_results [[kgh]] (talk) 18:44, 21 March 2023 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Import failed: Expected <mediawiki> tag, got

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.


There have been a couple of posts about this. In my case Special:Export prepended the Google Analytics code to the export file. Removing everything, i.e. <script type="text/javascript"> ...</script> up to but not including the <mediawiki xmlns= .. tag helped resolve the issue. [[kgh]] (talk) 20:49, 21 March 2023 (UTC)

Its presumably a bug in whatever extension you are using for google analytics. Bawolff (talk) 23:10, 21 March 2023 (UTC)
This instance is not using a dedicated extension for Google Analytics. The code was added via configuration. If I am not mistaken, we are talking about an antediluvian version of MediaWiki, which had some bugs here. [[kgh]] (talk) 08:42, 22 March 2023 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Using Flow interface for Discussion pages

Hi there :-)


On this wiki Discussion pages for a given wiki page use the Flow interface. Is there some documentation on how I could accomplish that for my own wiki?


Kind regards Artem0351 (talk) 11:04, 22 March 2023 (UTC)

Yes. See Extension:StructuredDiscussions. Malyacko (talk) 11:38, 22 March 2023 (UTC)
Thank you for the reply! So this part here should do the work?
$wgNamespaceContentModels[NS_TALK] = 'flow-board';
$wgNamespacesWithSubpages[NS_TALK] = true;
$wgNamespaceContentModels[NS_USER_TALK] = 'flow-board';
$wgNamespacesWithSubpages[NS_USER_TALK] = true; Artem0351 (talk) 12:56, 22 March 2023 (UTC)

How do I add <meta> tag with page creation date to the <head> for all pages?

I want to add <meta> tag with page creation date to the <head> for all pages. Geniusroi (talk) 13:01, 22 March 2023 (UTC)

You write a hook function that hooks into ContentGetParserOutput. Then based on the revisionId, find the pageid, then from the page id, build an sql query to find the oldest known revision. Then get its rev_timestamp, and format that with a timestamp to date string renderer. Then insert that into the html, by calling addHeadItem on the parser output object you got from the hook and add a meta head item. —TheDJ (Not WMF) (talkcontribs) 13:32, 22 March 2023 (UTC)
You could use Extension:WikiSEO to add meta tags. See Extension:WikiSEO#Adding_dynamic_values.
You could use Extension:Cargo to get the page creation date. See Extension:Cargo/Storing_data#Storing_page_data. Jonathan3 (talk) 14:06, 22 March 2023 (UTC)
Something like this (untested):
{{#seo:
 |published_time={{#cargo_query:tables=_pageData
  |fields=_creationDate
  |where=_pageName="{{FULLPAGENAME}}"
 }}
}}
You might have to amend the Cargo query to format the date in the way that WikiSEO expects it to be. Jonathan3 (talk) 14:32, 22 March 2023 (UTC)

Page synchronization

Independent of licensing, is there an extension or other method that would synchronize a page on one wiki with a page on a different wiki? Fredddie (talk) 03:24, 23 March 2023 (UTC)

Have a look at Page import. Lots of solutions depending on what you want to do. [[kgh]] (talk) 20:13, 23 March 2023 (UTC)

Do not reveiving e-mail for password reset

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.


Could you please check? kroopkin / kroopkin@mail.ru

Thanks 2A01:CB04:231:C000:D4F:BEB1:7419:E9FA (talk) 08:20, 23 March 2023 (UTC)

What wiki are you talking about? [[kgh]] (talk) 20:10, 23 March 2023 (UTC)
Sorry, I tried to get helpdesk of Traditio.wiki... All the best! 2A01:CB04:231:C000:90F6:AE79:E7BD:F555 (talk) 08:11, 25 March 2023 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

automatische Abmeldung

Hallo, wie kann man die automatische Abmeldung auf einer Media-Wiki-basierten Homepage verändern, verlängern oder abschalten? Joschi18273 (talk) 10:59, 23 March 2023 (UTC)

What makes you think that this exists, and how does it show? Please also see "Post a new question" in the sidebar. Malyacko (talk) 14:30, 23 March 2023 (UTC)
Have a look at configuration parameter $wgExtendedLoginCookieExpiration. That's probably what you are looking for. [[kgh]] (talk) 20:09, 23 March 2023 (UTC)

Edit token validity

Manual:Edit token#Validity said that The edit token returned by the server can be reused multiple times for different edit operations. The token is only valid for a specific period of time. But specifically how many times and how long the period is? Is there any documentation giving details about it? I have to get edit token every time if I do not know it. Teetrition (talk) 11:27, 23 March 2023 (UTC)

I think the official answer is.. you should not care :)
Your usage should always expect that the token might have expired and that a new token has to be retrieved and the request be retried with the new token, which is something that the JS api mw.api.postWithToken() does automatically for you. I'll see if I can find a more exact value. —TheDJ (Not WMF) (talkcontribs) 13:47, 23 March 2023 (UTC)
Often timss mediawiki is set to only remember the last X tokens (oversimplifying) so the amount of time they last can be random. Bawolff (talk) 05:47, 24 March 2023 (UTC)

Editors not working

https://phabricator.wikimedia.org/T332370

Every time when I was trying to use an editor, there's always an error occurs.

Version:

Mediawiki 1.39.2


Environment:

Windows 10

XAMPP x64 8.1.6-0 VS16 portable

Chrome

The browser raise an error every time I was trying to save something by Code Editor or trying to open Visual Editor:

Failed to load resource: net::ERR_CONNECTION_RESET


Error.log

When using Code Editor:

[php:notice] PHP Deprecated:  mb_convert_encoding(): Handling HTML entities via mbstring is deprecated; use htmlspecialchars, htmlentities, or mb_encode_numericentity/mb_decode_numericentity instead in C:\\xampp\\htdocs\\wiki\\vendor\\wikimedia\\html-formatter\\src\\HtmlFormatter.php on line 94, referer: http://localhost/wiki/index.php?title=%E9%A6%96%E9%A1%B5&action=edit

When using Visual Editor:

[php:notice] PHP Deprecated:  Creation of dynamic property Less_Tree_Dimension::$parensInOp is deprecated in C:\\xampp\\htdocs\\wiki\\vendor\\wikimedia\\less.php\\lib\\Less\\Parser.php on line 2313, referer: http://localhost/wiki/index.php?title=Homepage&veaction=edit&debug=true

[php:notice] PHP Deprecated:  Creation of dynamic property Less_Tree_Variable::$parensInOp is deprecated in C:\\xampp\\htdocs\\wiki\\vendor\\wikimedia\\less.php\\lib\\Less\\Parser.php on line 2314, referer: http://localhost/wiki/index.php?title=Homepage&veaction=edit&debug=true Xyy23330121 (talk) 11:48, 23 March 2023 (UTC)

This is a PHP deprecation warning. You should turn off php deprecation warnings when you run things in production. https://www.php.net/manual/en/errorfunc.configuration.php
In your php.ini set: error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT
Not sure why you get ERR_CONNECTION_RESET, but this too probably is a PHP issue, for which you might be able to find additional details in the PHP error logs —TheDJ (Not WMF) (talkcontribs) 13:16, 23 March 2023 (UTC)
I figure out why the problem appears. There must be an hardware error or driver issue in HP OMEN laptop. I changed my laptop and the error never happened again. Xyy23330121 (talk) 06:59, 13 July 2023 (UTC)

Hiding wiki from outside world

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 may be a known question...


I am looking to "hide" the wiki from the outside world, behind a "login" page.

I understand that Mediawiki has its own user system, with the posibility to require login before being able to edit pages.

I however need a step before that... possibly combining both levels of access.

I'm looking for a way to have https://mywiki.mydomain.com/ (not my site!) land on a login page, where I do an AAA check on whoever wants to access the wiki, and if the request/user is valid, it redirects to https://mywiki.mydomain.com/wiki/index.php?title=Main_Page


How would I set this up?

I'll figure out how to do the AAA stuff separately, but I am not sure how to configure mediawiki in a way that this would work. Techcare.noc (talk) 13:21, 23 March 2023 (UTC)

@Techcare.noc Manual:Preventing_access Malyacko (talk) 14:30, 23 March 2023 (UTC)
That told me what I was looking for.
Thank you very much. Techcare.noc (talk) 11:05, 24 March 2023 (UTC)
If you're using Apache you could put the entire mywiki subdomain behind a .htaccess password requirement. Jonathan3 (talk) 22:09, 23 March 2023 (UTC)
I was looking for a more mediawiki-centered solution, but if the need arrises, I will certainly consider this.
Thank you for your input. Techcare.noc (talk) 11:06, 24 March 2023 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Internal error when attempting to block a user

When I attempt to block a user, I get the following error:


[ZBxe4B01JeBH1S44EUNgDwABjDA] /w/index.php/Special:Block Error: Call to undefined method MediaWiki\Block\DatabaseBlock::getTarget()

Version: 1.38.2

PHP: 8.0.28 (litespeed)

Database: MySQL 5.7.23-23 Arandomusername12124 (talk) 14:18, 23 March 2023 (UTC)

See both "Post a new question" and "Before you post" in the sidebar. The first should also link to Manual:How_to_debug. Malyacko (talk) 14:27, 23 March 2023 (UTC)
I still cannot figure out what is causing it. I even tried disabling all extensions, and it still gave the same error Arandomusername12124 (talk) 18:15, 23 March 2023 (UTC)
As malyacko said, please set $wgShowExceptionDetails=true; and report the longer version of the error message. Bawolff (talk) 05:46, 24 March 2023 (UTC)
Note that the error is unchanged even if DiscordNotifications is disabled
Backtrace:
from /home3/plafaons/public_html/w/extensions/DiscordNotifications/DiscordNotificationsCore.php(418)
#0 /home3/plafaons/public_html/w/includes/HookContainer/HookContainer.php(338): DiscordNotificationsCore::onDiscordUserBlocked(MediaWiki\Block\DatabaseBlock, User, NULL)
#1 /home3/plafaons/public_html/w/includes/HookContainer/HookContainer.php(137): MediaWiki\HookContainer\HookContainer->callLegacyHook(string, array, array, array)
#2 /home3/plafaons/public_html/w/includes/HookContainer/HookRunner.php(1039): MediaWiki\HookContainer\HookContainer->run(string, array)
#3 /home3/plafaons/public_html/w/includes/block/BlockUser.php(604): MediaWiki\HookContainer\HookRunner->onBlockIpComplete(MediaWiki\Block\DatabaseBlock, User, NULL)
#4 /home3/plafaons/public_html/w/includes/block/BlockUser.php(532): MediaWiki\Block\BlockUser->placeBlockInternal(boolean)
#5 /home3/plafaons/public_html/w/includes/block/BlockUser.php(466): MediaWiki\Block\BlockUser->placeBlockUnsafe(boolean)
#6 /home3/plafaons/public_html/w/includes/specials/SpecialBlock.php(922): MediaWiki\Block\BlockUser->placeBlock(boolean)
#7 /home3/plafaons/public_html/w/includes/specials/SpecialBlock.php(1036): SpecialBlock::processFormInternal(array, User, MediaWiki\Block\UserBlockCommandFactory, MediaWiki\Block\BlockUtils)
#8 /home3/plafaons/public_html/w/includes/htmlform/HTMLForm.php(725): SpecialBlock->onSubmit(array, OOUIHTMLForm)
#9 /home3/plafaons/public_html/w/includes/htmlform/HTMLForm.php(615): HTMLForm->trySubmit()
#10 /home3/plafaons/public_html/w/includes/htmlform/HTMLForm.php(631): HTMLForm->tryAuthorizedSubmit()
#11 /home3/plafaons/public_html/w/includes/specialpage/FormSpecialPage.php(209): HTMLForm->show()
#12 /home3/plafaons/public_html/w/includes/specialpage/SpecialPage.php(701): FormSpecialPage->execute(string)
#13 /home3/plafaons/public_html/w/includes/specialpage/SpecialPageFactory.php(1428): SpecialPage->run(string)
#14 /home3/plafaons/public_html/w/includes/MediaWiki.php(316): MediaWiki\SpecialPage\SpecialPageFactory->executePath(string, RequestContext)
#15 /home3/plafaons/public_html/w/includes/MediaWiki.php(904): MediaWiki->performRequest()
#16 /home3/plafaons/public_html/w/includes/MediaWiki.php(562): MediaWiki->main()
#17 /home3/plafaons/public_html/w/index.php(50): MediaWiki->run()
#18 /home3/plafaons/public_html/w/index.php(46): wfIndexMain()
#19 {main} Arandomusername12124 (talk) 20:24, 24 March 2023 (UTC)
Are you sure you disabled the extension properly when testing?
Normally an error like this would indicate that you need a different version of DiscordNotifications for your version of mediawiki. Bawolff (talk) 20:55, 24 March 2023 (UTC)
Yes, I removed the line in LocalSettings that makes the extension load, I even tried disabling ALL of the extensions as well, but it still threw the error
Also, the version of DiscordNotifications I clearly remember being the one for 1.38 Arandomusername12124 (talk) 22:08, 24 March 2023 (UTC)
After removing it, does it still show up on Special:Version?
> Also, the version of DiscordNotifications I clearly remember being the one for 1.38
Maybe its just a bad extension then Bawolff (talk) 23:55, 24 March 2023 (UTC)

Upgrade from 1.25.5 to 1.39.2

Hi,

when I export the MysqlDB (1.25.5) to a dump and import it into the 1.39.2 DB i get an error.


An error occurred:

Error 1054: Unknown column 'ar_comment_id' in 'where clause'

Function: MigrateComments::migrate

Query: SELECT  ar_id,ar_comment  FROM `archive`    WHERE ar_comment_id = 0 AND (1=1)  ORDER BY ar_id LIMIT 100  


Also when i do a php importDump.php i get:

Wikimedia\Rdbms\DBQueryError from line 1618 of /var/www/mediawiki/includes/libs/rdbms/database/Database.php: Error 1054: Unknown column 'img_actor' in 'field list'

Function: LocalFile::loadFromDB

Query: SELECT  img_name,img_size,img_width,img_height,img_metadata,img_bits,img_media_type,img_major_mime,img_minor_mime,img_timestamp,img_sha1,img_actor,image_actor.actor_user AS `img_user`,image_actor.actor_name AS `img_user_text`,comment_img_description.comment_text AS `img_description_text`,comment_img_description.comment_data AS `img_description_data`,comment_img_description.comment_id AS `img_description_cid`,img_metadata  FROM `image` JOIN `actor` `image_actor` ON ((actor_id=img_actor)) JOIN `comment` `comment_img_description` ON ((comment_img_description.comment_id = img_description_id))   WHERE img_name = 'S2-SecurityTab-CC.009F.01.0E.11.009.jpg'  LIMIT 1 Ripper121 (talk) 18:52, 23 March 2023 (UTC)

Not sure what you mean by moving a 1.25 database into a 1.39 database. When upgrading, you start with a 1.25 database, and during the updates, you end up with a 1.39 database. Without schema conversions, there is no way to get a 1.25 dump working in a 1.39 schema.
You need to upgrade step by step, first, from 1.25 to 1.31. This can be done in one go directly. After that, do the update as described post. It is a bit tedious, but the result should be a working wiki - hopefully. [[kgh]] (talk) 19:58, 23 March 2023 (UTC)

retrieve section header of image on page

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


is there any way i can get the section header under which a given image appears on a page?

e.g. file:apple.png appears on foods under section #fruits. special:whatlinkshere/file:apple.png will show foods - could i have it display foods#fruits instead?

i'm guessing if this is possible, it'd be with a snippet on common.js. could someone point me in the direction of the correct documentation or someone's similar widget? thanks 2607:FEA8:780:3620:51A3:BDFF:C9BF:B589 (talk) 20:24, 23 March 2023 (UTC)

Not really possible. Bawolff (talk) 05:44, 24 March 2023 (UTC)
ahh, it was worth a try. thanks for the answer 38.15.68.177 (talk) 01:36, 25 March 2023 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

How to configure LDAP Authentication

I'm new and deploying a mdiawiki in my server.

I'm very confuse document content about configure LDAP authentication.

Extension:LDAPAuthentication2 and LDAP hub and Extension:LDAPProvider make me confused.

I have had a LDAP configure , but I don't know how to applicate it to LDAPAuthentication2 or LDAPProvider configure to integrate into mediawiki?

Who can help me ? 103.167.134.28 (talk) 06:40, 24 March 2023 (UTC)

Special:Import doesn't add the page, does nothing

After I try to import anything—primarily templates from Wikipedia—I will search for it, and the page will not exist. For example, I tried to import Template:Citation and the search gave nothing. Any help? 216.11.6.192 (talk) 14:21, 24 March 2023 (UTC)

For reference, I am running the latest version of MediaWiki. 216.11.6.192 (talk) 14:39, 24 March 2023 (UTC)

File(/gitinfo/info.json) is not within the allowed path(s)

On MW 1.39, when I go to Special:Version, I get numerous warnings like :

Warning: is_readable(): open_basedir restriction in effect. File(/gitinfo/info.json) is not within the allowed path(s): (/var/www/vhosts/[...]/:/tmp/) in [...]/includes/GitInfo.php on line 173

I don't have access to php.ini and setting $wgGitBin to false has no effect. Any idea how I could go about solving this?

Edit: I'm seeing this with ini_set( 'display_errors', 1 ) so maybe it's only natural that this warning is showing. Close this report if it is. Cavila 16:22, 24 March 2023 (UTC)

Something is wrong with a path configuration somewhere. It should not be trying to read that out of the root directory. Bawolff (talk) 21:04, 24 March 2023 (UTC)
Any idea what configuration needs to be changed to fix this? I'm having the same problem in MW 1.41: Special:Version page has numerous warnings overwriting the top of the page.
Most look like:
Warning: is_readable(): open_basedir restriction in effect. File(/gitinfo/info.json) is not within the allowed path(s): (/var/services/web:/tmp:/var/services/tmp) in /volume1/web/mediawiki/includes/utils/GitInfo.php on line 177
Poem added this one:
Warning: is_readable(): open_basedir restriction in effect. File(/gitinfo/info-extensions-Poem.json) is not within the allowed path(s): (/var/services/web:/tmp:/var/services/tmp) in /volume1/web/mediawiki/includes/utils/GitInfo.php on line 177 InfoSharer (talk) 03:33, 3 June 2024 (UTC)
Please post LocalSettings.php (minus any passwords) Bawolff (talk) 09:01, 3 June 2024 (UTC)
Sorry for the delay, @Bawolff - here's my LocalSettings.php content:
<?php
# This file was automatically generated by the MediaWiki 1.35.5
# installer. If you make manual changes, please keep track in case you
# need to recreate them later.
#
# See includes/DefaultSettings.php for all configurable settings
# and their default values, but don't forget to make changes in _this_
# file, not there.
#
# Further documentation for configuration settings may be found at:
# https://www.mediawiki.org/wiki/Manual:Configuration_settings
# Protect against web entry
if ( !defined( 'MEDIAWIKI' ) ) {
   exit;
}
## Uncomment this to disable output compression
# $wgDisableOutputCompression = true;
$wgSitename = "thesitename";
$wgMetaNamespace = "thenamespace";
## The URL base path to the directory containing the wiki;
## defaults for all runtime URL paths are based off of this.
## For more information on customizing the URLs
## (like /w/index.php/Page_title to /wiki/Page_title) please see:
## https://www.mediawiki.org/wiki/Manual:Short_URL
$wgScriptPath = "/mediawiki";
## The protocol and server name to use in fully-qualified URLs
$wgServer = "http://myserver";
## The URL path to static resources (images, scripts, etc.)
$wgResourceBasePath = $wgScriptPath;
## The URL paths to the logo.  Make sure you change this from the default,
## or else you'll overwrite your logo when you upgrade!
## $wgLogos = [ '1x' => "$wgResourceBasePath/resources/assets/wiki.png" ];
$wgLogos = [ '1x' => "$wgResourceBasePath/resources/assets/mediawiki.png" ];
## UPO means: this is also a user preference option
$wgEnableEmail = true;
$wgEnableUserEmail = true; # UPO
$wgEmergencyContact = "apache@🌻.invalid";
$wgPasswordSender = "apache@🌻.invalid";
$wgEnotifUserTalk = false; # UPO
$wgEnotifWatchlist = false; # UPO
$wgEmailAuthentication = true;
## Database settings
$wgDBtype = "mysql";
$wgDBserver = "localhost:/run/mysqld/mysqld10.sock";
$wgDBname = "the_mediawiki_db";
$wgDBuser = "the_mediawiki_user";
$wgDBpassword = "thepassword";
# MySQL specific settings
$wgDBprefix = "";
# MySQL table options to use during installation or update
$wgDBTableOptions = "ENGINE=InnoDB, DEFAULT CHARSET=binary";
# Shared database table
# This has no effect unless $wgSharedDB is also set.
$wgSharedTables[] = "actor";
## Shared memory settings
$wgMainCacheType = CACHE_ACCEL;
$wgMemCachedServers = [];
## To enable image uploads, make sure the 'images' directory
## is writable, then set this to true:
$wgEnableUploads = false;
# InstantCommons allows wiki to use images from https://commons.wikimedia.org
$wgUseInstantCommons = false;
# Periodically send a pingback to https://www.mediawiki.org/ with basic data
# about this MediaWiki instance. The Wikimedia Foundation shares this data
# with MediaWiki developers to help guide future development efforts.
$wgPingback = false;
## If you use ImageMagick (or any other shell command) on a
## Linux server, this will need to be set to the name of an
## available UTF-8 locale. This should ideally be set to an English
## language locale so that the behaviour of C library functions will
## be consistent with typical installations. Use $wgLanguageCode to
## localise the wiki.
$wgShellLocale = "en_US.utf8";
## Set $wgCacheDirectory to a writable directory on the web server
## to make your wiki go slightly faster. The directory should not
## be publicly accessible from the web.
#$wgCacheDirectory = "$IP/cache";
# Site language code, should be one of the list in ./languages/data/Names.php
$wgLanguageCode = "en";
$wgSecretKey = "thesecretkey";
# Changing this will log out all existing sessions.
$wgAuthenticationTokenVersion = "1";
# Site upgrade key. Must be set to a string (default provided) to turn on the
# web installer while LocalSettings.php is in place
$wgUpgradeKey = "theupgradekey";
## For attaching licensing metadata to pages, and displaying an
## appropriate copyright notice / icon. GNU Free Documentation
## License and Creative Commons licenses are supported so far.
$wgRightsPage = ""; # Set to the title of a wiki page that describes your license/copyright
$wgRightsUrl = "";
$wgRightsText = "";
$wgRightsIcon = "";
# Path to the GNU diff3 utility. Used for conflict resolution.
$wgDiff3 = "";
# The following permissions were set based on your choice in the installer
$wgGroupPermissions['*']['createaccount'] = false;
$wgGroupPermissions['*']['edit'] = false;
$wgGroupPermissions['*']['read'] = false;
## Default skin: you can change the default skin. Use the internal symbolic
## names, ie 'vector', 'monobook':
$wgDefaultSkin = "vector";
# Enabled skins.
# The following skins were automatically enabled:
wfLoadSkin( 'MonoBook' );
wfLoadSkin( 'Timeless' );
wfLoadSkin( 'Vector' );
# End of automatically generated settings.
# Add more configuration options below.
# enable extensions (extension needs to be placed in 'extensions' dir,
#    if not already there
wfLoadExtension( 'Poem' ); InfoSharer (talk) 21:26, 24 June 2024 (UTC)
I have the same issue. Do you have a solution? 2001:4C4C:1ECA:DB02:B62E:99FF:FEE6:B53F (talk) 18:06, 13 January 2025 (UTC)

smw_id from 'INT UNSIGNED NOT NULL AUTO_INCREMENT' to 'INT(11) UNSIGNED NOT NULL KEY AUTO_INCREMENT' ... Wikimedia\Rdbms\DBQueryError from line 1618 of

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


Hi. I am using mediawiki 1.39.1, while creating from image I am getting DROP 'PRIMARY' error. It started giving this error today. In the previous weeks it was deploying with smw.

Thanks in advance.

The full track is here.

Checking table smw_object_ids ... Table already exists, checking structure ... ... changing type of field smw_id from 'INT UNSIGNED NOT NULL AUTO_INCREMENT' to 'INT(11) UNSIGNED NOT NULL KEY AUTO_INCREMENT' ... Wikimedia\Rdbms\DBQueryError from line 1618 of /var/www/html/includes/libs/rdbms/database/Database.php: Error 1091: Can't DROP 'PRIMARY'; check that column/key exists Function: SMW\SQLStore\TableBuilder\MySQLTableBuilder::doUpdateFieldType Query: ALTER TABLE `smw_object_ids` DROP PRIMARY KEY #0 /var/www/html/includes/libs/rdbms/database/Database.php(1602): Wikimedia\Rdbms\Database->getQueryException('Can't DROP 'PRI...', 1091, 'ALTER TABLE `sm...', 'SMW\\SQLStore\\Ta...') #1 /var/www/html/includes/libs/rdbms/database/Database.php(1576): Wikimedia\Rdbms\Database->getQueryExceptionAndLog('Can't DROP 'PRI...', 1091, 'ALTER TABLE `sm...', 'SMW\\SQLStore\\Ta...') #2 /var/www/html/includes/libs/rdbms/database/Database.php(952): Wikimedia\Rdbms\Database->reportQueryError('Can't DROP 'PRI...', 1091, 'ALTER TABLE `sm...', 'SMW\\SQLStore\\Ta...', false) #3 /var/www/html/includes/libs/rdbms/database/DBConnRef.php(103): Wikimedia\Rdbms\Database->query('ALTER TABLE `sm...', 'SMW\\SQLStore\\Ta...', 0) #4 /var/www/html/includes/libs/rdbms/database/DBConnRef.php(293): Wikimedia\Rdbms\DBConnRef->__call('query', Array) #5 /var/www/html/extensions/SemanticMediaWiki/src/SQLStore/TableBuilder/MySQLTableBuilder.php(231): Wikimedia\Rdbms\DBConnRef->query('ALTER TABLE `sm...', 'SMW\\SQLStore\\Ta...') #6 /var/www/html/extensions/SemanticMediaWiki/src/SQLStore/TableBuilder/MySQLTableBuilder.php(201): SMW\SQLStore\TableBuilder\MySQLTableBuilder->doUpdateFieldType('`smw_object_ids...', 'smw_id', 'FIRST', 'INT UNSIGNED NO...', 'INT(11) UNSIGNE...') #7 /var/www/html/extensions/SemanticMediaWiki/src/SQLStore/TableBuilder/MySQLTableBuilder.php(131): SMW\SQLStore\TableBuilder\MySQLTableBuilder->doUpdateField('`smw_object_ids...', 'smw_id', 'INT(11) UNSIGNE...', Array, 'FIRST', Array) #8 /var/www/html/extensions/SemanticMediaWiki/src/SQLStore/TableBuilder/TableBuilder.php(159): SMW\SQLStore\TableBuilder\MySQLTableBuilder->doUpdateTable('`smw_object_ids...', Array) #9 /var/www/html/extensions/SemanticMediaWiki/src/SQLStore/Installer.php(229): SMW\SQLStore\TableBuilder\TableBuilder->create(Object(SMW\SQLStore\TableBuilder\Table)) #10 /var/www/html/extensions/SemanticMediaWiki/src/SQLStore/SQLStore.php(452): SMW\SQLStore\Installer->install(Object(SMW\Options)) #11 /var/www/html/extensions/SemanticMediaWiki/src/Store.php(488): SMW\SQLStore\SQLStore->setup(Object(SMW\Options)) #12 /var/www/html/includes/installer/DatabaseUpdater.php(547): SMW\Store::setupStore(true, Object(SMW\Options)) #13 /var/www/html/includes/installer/DatabaseUpdater.php(515): DatabaseUpdater->runUpdates(Array, true) #14 /var/www/html/maintenance/update.php(202): DatabaseUpdater->doUpdates(Array) #15 /var/www/html/maintenance/includes/MaintenanceRunner.php(309): UpdateMediaWiki->execute() #16 /var/www/html/maintenance/doMaintenance.php(85): MediaWiki\Maintenance\MaintenanceRunner->run() #17 /var/www/html/maintenance/update.php(312): require_once('/var/www/html/m...') #18 {main} The command '/bin/sh -c php /var/www/html/maintenance/update.php --conf=/var/www/html/LocalSettings.php' returned a non-zero code: 1 2023/03/24 16:35:02 Container failed during run: acb_step_0. No retries remaining. failed to run step ID: Bukami (talk) 16:47, 24 March 2023 (UTC)

This sounds like a SemanticMediaWiki bug. I would reccomend filing a bug in their bug tracker Bawolff (talk) 03:24, 25 March 2023 (UTC)
Thanks Bawolff. Reported as a bug. 2001:2020:430B:FCF7:9DD8:2248:D0FB:D3B (talk) 11:00, 25 March 2023 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

mediawiki internal error

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


Erreur interne [6e207e6e-eae7-4c26-8cf1-23943f55343f] 2023-03-24 18:29:16: Erreur fatale de type « Shellbox\ShellboxError »

when translating https://www.mediawiki.org/wiki/Manual:Pywikibot/Installation/fr Christian 🇫🇷 FR 🚨 (talk) 18:31, 24 March 2023 (UTC)

@Wladek92 That's off-topic as this page is not about Wikimedia wikis. See How to report a bug what to do - thanks. Malyacko (talk) 00:27, 25 March 2023 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Dashes gone missing on Firefox (Ubuntu and derivates) / Question about de-x-formal, es-x-formal, etc.

{{{text}}}

When the language is set to "de", MW puts lang="de"in the <html> tag. When the language is set to de-formal, it outputslang="de-x-formal". I was wondering what the rationale was for this because formal and informal German are not two different languages. It's simply German either way, so I'm not sure why it isn't just "de" always. I'm sure a Spanish speaker would say the same thing about "es" vs "es-x-formal".

Thanks Hamburg0815 (talk) 18:39, 24 March 2023 (UTC)

Per BCP47, this marks the text as being a (private) variant of that language.
As an example, canadian and american english is almost identical, but we still distinguish the former with en-CA. Bawolff (talk) 20:58, 24 March 2023 (UTC)
If you are into SEO for your wiki, use "de" for configuration parameter $wgLanguageCode. You could perhaps try configuration parameter $wgDefaultLanguageVariant to get "de-x-formal" system messages by default. Never fiddled with this configuration parameter, though. [[kgh]] (talk) 16:48, 25 March 2023 (UTC)
The reason I asked was because there is a bug in the Ubuntu flavor of Firefox that messes up characters in MW if the language is set to de-formal. It's not MW's fault, of course, but the fact that this bug exists tells me the Ubuntu developers didn't expect websites to output "private" variants like de-x-formal in the <html> tag. It made me wonder if there were any "Internet rules" on what value should go into the lang attribute of the <html> tag for a given language, variant, and region. Things like en-CA are common but de-x-formal was new to me. Hamburg0815 (talk) 18:20, 25 March 2023 (UTC)
Wow. You are my hero!!! I have been suffering from this issue for a couple of years now - all over the place. I posted about it here at the support desk, but nobody could guess the issue. I am unable to find the thread, though. :(
In the meantime, I am used to not seeing dashes in MediaWiki since I use "de-x-formal" everywhere. They are there but invisible to the user. Setting $wgLanguageCode to "de" does not help. When I select "de-x-formal" via the user preferences, MediaWiki outputs "de-x-formal" in the HTML tag. Before the language code was "de-formal". Pretty sure it worked with "de-formal" Not sure why it was changed to "de-x-formal".
To conclude: Until Ubuntu fixes this bug for Firefox, one can no longer use de-x-formal or alike if one wants to use your wiki from Ubunt or derivates. [[kgh]] (talk) 21:53, 25 March 2023 (UTC)
@Nikerabbit: Is there a way for MediaWiki to help people out of this misery? Is it feasible to prevent "de-x-formal" from being added to the HTML tag if a user selects the language variant (user language) via the user preferences? In the end, HTML should probably use what is set via $wgLanguageCode (instance language) for the wiki, no? It will be great to get some comments or insights from you. [[kgh]] (talk) 21:58, 25 March 2023 (UTC)
@Kghbln If you have write access to includes/language/LanguageCode.php, you can work around the bug by changing the line
'de-formal' => 'de-x-formal'
to
'de-formal' => 'de' Hamburg0815 (talk) 23:39, 25 March 2023 (UTC)
Weird, ubuntu version of firefox only? I wonder what they are doing to cause this.
> Before the language code was "de-formal". Pretty sure it worked with "de-formal" Not sure why it was changed to "de-x-formal".
Officially de-formal is not a valid lang tag, where de-x-formal is following the bcp47 standard. Bawolff (talk) 01:05, 26 March 2023 (UTC)
See also https://phabricator.wikimedia.org/T106367 Bawolff (talk) 01:09, 26 March 2023 (UTC)
@Hamburg0815 Thank you for your suggestion. However, I could do it on my end, but I would not like to "hack" MW in this particular context.
@Bawolff Thank you for providing context and references. I fully grok now why this was changed. Nothing against it.
To me, reality always appears more creative than fiction. ;) I am on Mint, which builds upon Ubuntu, and I have it. Dunno about other derivates or distros. [[kgh]] (talk) 08:36, 26 March 2023 (UTC)
Working on Fedora. The same person on Ubuntu confirmed the issue. Yeah, weird but in reality. [[kgh]] (talk) 08:42, 27 March 2023 (UTC)

Looking for a mediawiki 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 am a wiki developer, and now I need a mediawiki skin with special customization requirements. Who can develop one for me? My reserve fund is 1000¥,thanks

My email:channelwey@outlook.com Zero-zoner (talk) 03:59, 25 March 2023 (UTC)

I am not a native speaker of English, and my English proficiency is relatively poor, so please forgive me for any offensive language. Zero-zoner (talk) 03:59, 25 March 2023 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Substitute template every time a page is saved

Some templates like start date and age automatically update themselves. How do I make it so after I save it, the page content doesn't change until the next revision? Aaron Liu (talk) 01:19, 26 March 2023 (UTC)

Check out Help:Magic words for more information. I think what you're looking for is {{REVISIONTIMESTAMP}} to get 20250326184132. From there, you can use any of the time formatting methods to turn it into something useful such as w:Template:Date {{date|{{REVISIONTIMESTAMP}}|mdy}}. Fredddie (talk) 03:34, 26 March 2023 (UTC)
Thanks! Is there a way to keep the existing value of that magic word when transcluded instead of it automatically updating to the new page’s value? Aaron Liu (talk) 13:08, 31 March 2023 (UTC)
basically no. Bawolff (talk) 15:21, 4 April 2023 (UTC)

Mariadb does not appear in Wikipedia installation

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, After installing Wikimedia, I only see the option to connect it to Sqlite but no MaraiDB (it is install and running on the server).


How can I tall the Wiki installation to see the Maria installation?

Thanks. Roezohar (talk) 09:31, 26 March 2023 (UTC)

Hi, if you meant MediaWiki, please see "Post a new question" in the sidebar and provide all data. Malyacko (talk) 10:30, 26 March 2023 (UTC)
Usually this means the php mysql extension is missing. If using debian or ubuntu, run sudo apt install php-mysql (you use php-mysql for both mysql and mariadb) Bawolff (talk) 10:57, 26 March 2023 (UTC)
Thanks Bawolff, That was it. For some reason I didn't find it easy documented.
(I am using Redhat, So Used "yum install php-mysqlnd ").
Thanks a lot. Roezohar (talk) 11:16, 26 March 2023 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

İTALYA NÜFUS BİLGİSİ YANLIŞ.

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.


İtalya nüfus bilgisi 301 milyon olarak verilmiş. Nüfus grafikleri sayfalarında ise 58.919.974 olarak verilmektedir. Bu yanlışın düzeltilmesi gerekir. Ahmet Boyacı (talk) 03:39, 27 March 2023 (UTC)

This forum is for MediaWiki, the software that powers Wikipedia. If you feel there is an error on an article, you may simply edit that article yourself. Fredddie (talk) 04:02, 27 March 2023 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

ハッシュの種類

MediaWikiのデータベースに保存される、パスワードのハッシュの種類はなんですか? Asahi-jp (talk) 05:03, 27 March 2023 (UTC)

Manual:Hashing Malyacko (talk) 08:32, 27 March 2023 (UTC)
ありがとう! Asahi-jp (talk) 15:01, 5 April 2023 (UTC)

Hallo zusammen,


ich würde gerne mein Impressum ins Footer-Menü neben Datenschutz einfügen.


Wie realisiere ich das am besten? 2003:DF:D700:5C00:3953:E353:270B:8224 (talk) 11:14, 27 March 2023 (UTC)

Vielleicht hilft das: Manual:Fußzeile - MediaWiki 37.24.154.213 (talk) 12:04, 27 March 2023 (UTC)
Danke für Deine Antwort.
Muss ich dafür vorher etwas installieren?
(ich bin absoluter Neuling) 2003:DF:D700:5C00:DC4F:5F3B:7492:3BCC (talk) 05:00, 28 March 2023 (UTC)

Error: Class 'graph\Content' 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.


Hi, im getting this error when using this on a page:

{{ Graph:Chart

| width = 450

| height = 150

| type = line

| x = 1,2,3,4,5,6,7,8,9

| y = 10,12,6,14,2,10,7,9,12

}}


This is the Error traceback:

[ZCGLg7oPwm2guCCBLSlE1gAAABA] /wiki/index.php?title=Graph:Chart&action=edit&redlink=1 Error: Class 'graph\Content' not found

Backtrace: from /var/www/html/mediawiki-1.39.1/extensions/JsonConfig/includes/JCContentHandler.php(115)

#0 /var/www/html/mediawiki-1.39.1/extensions/JsonConfig/includes/JCContentHandler.php(139): JsonConfig\JCContentHandler->unserializeContent()
#1 /var/www/html/mediawiki-1.39.1/includes/EditPage.php(1391): JsonConfig\JCContentHandler->makeEmptyContent()
#2 /var/www/html/mediawiki-1.39.1/includes/EditPage.php(730): EditPage->initialiseForm()
#3 /var/www/html/mediawiki-1.39.1/includes/actions/EditAction.php(73): EditPage->edit()
#4 /var/www/html/mediawiki-1.39.1/includes/MediaWiki.php(542): EditAction->show()
#5 /var/www/html/mediawiki-1.39.1/includes/MediaWiki.php(322): MediaWiki->performAction()
#6 /var/www/html/mediawiki-1.39.1/includes/MediaWiki.php(904): MediaWiki->performRequest()
#7 /var/www/html/mediawiki-1.39.1/includes/MediaWiki.php(562): MediaWiki->main()
#8 /var/www/html/mediawiki-1.39.1/index.php(50): MediaWiki->run()
#9 /var/www/html/mediawiki-1.39.1/index.php(46): wfIndexMain()
#10 {main}


Any ideas?

I've got Lua support, Scribunto and JsonConfig. Aseicor (talk) 12:29, 27 March 2023 (UTC)

is Extension:Graph installed? Bawolff (talk) 22:15, 27 March 2023 (UTC)
Yes:
Here is the Graph version:
Graph – (1a1308a) 07:14 24 ene 202
I can even draw normal basic Graphs, and with visual editor too. Aseicor (talk) 14:28, 30 March 2023 (UTC)
This may be caused by incorrect config for $wgJsonConfigModels Bawolff (talk) 12:10, 1 April 2023 (UTC)
$wgJsonConfigModels['graph.jsonconfig'] = 'graph\Content';
$wgJsonConfigs['graph.jsonconfig'] = array(
'namespace' => <688>,
'nsName' => 'Graph',
'isLocal' => true,
);
i dont think so, i've got it defined.
I've found a workaround, when i imported the Templates for graph it always uses this namespace:
Template:Graph:Chart
If i change it to:
Template:GraphChart
and then call that template, looks to be working, but i still dont know why it says i havent got it defined.
This is aseicor. 93.188.143.1 (talk) 10:12, 3 April 2023 (UTC)
> $wgJsonConfigModels['graph.jsonconfig'] = 'graph\Content';
Looks incorrect and the cause of your issues. Bawolff (talk) 12:34, 3 April 2023 (UTC)
Although it comes straight from the docs, so i have no idea what the correct value is. Bawolff (talk) 12:40, 3 April 2023 (UTC)
i guess support for that was removed in
https://github.com/wikimedia/mediawiki-extensions-Graph/commit/2783f5d6780728385b4d477245d5452bd85bb95d Bawolff (talk) 12:43, 3 April 2023 (UTC)
So it works cause they actually removed that class since 2016? Aseicor (talk) 15:29, 4 April 2023 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Data Base Error when accessing history pages to lookup revision

Hi,

as soon as I want to access the history page, i.e. revision page, of a media wiki page on my wiki I get the following error trace:

[c7e0e2886c7f9a61f73c5798] /wiki/index.php?title=Hauptseite&action=history Wikimedia\Rdbms\DBQueryError from line 1713 of /var/lib/wiki/includes/libs/rdbms/database/Database.php: A database query error has occurred. Did you forget to run your application's database schema updater after upgrading?

Error 1176: Key 'page_timestamp' doesn't exist in table 'revision' (localhost)

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 (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 = 1 ORDER BY rev_timestamp DESC,rev_id DESC LIMIT 51

Backtrace:

#0 /var/lib/wiki/includes/libs/rdbms/database/Database.php(1697): Wikimedia\Rdbms\Database->getQueryException()

#1 /var/lib/wiki/includes/libs/rdbms/database/Database.php(1672): Wikimedia\Rdbms\Database->getQueryExceptionAndLog()

#2 /var/lib/wiki/includes/libs/rdbms/database/Database.php(1241): Wikimedia\Rdbms\Database->reportQueryError()

#3 /var/lib/wiki/includes/libs/rdbms/database/Database.php(1921): Wikimedia\Rdbms\Database->query()

#4 /var/lib/wiki/includes/libs/rdbms/database/DBConnRef.php(68): Wikimedia\Rdbms\Database->select()

#5 /var/lib/wiki/includes/libs/rdbms/database/DBConnRef.php(313): Wikimedia\Rdbms\DBConnRef->__call()

#6 /var/lib/wiki/includes/pager/IndexPager.php(449): Wikimedia\Rdbms\DBConnRef->select()

#7 /var/lib/wiki/includes/pager/IndexPager.php(278): IndexPager->reallyDoQuery()

#8 /var/lib/wiki/includes/pager/IndexPager.php(788): IndexPager->doQuery()

#9 /var/lib/wiki/includes/pager/ReverseChronologicalPager.php(44): IndexPager->isNavigationBarShown()

#10 /var/lib/wiki/includes/actions/HistoryAction.php(304): ReverseChronologicalPager->getNavigationBar()

#11 /var/lib/wiki/includes/actions/FormlessAction.php(48): HistoryAction->onView()

#12 /var/lib/wiki/includes/MediaWiki.php(531): FormlessAction->show()

#13 /var/lib/wiki/includes/MediaWiki.php(313): MediaWiki->performAction()

#14 /var/lib/wiki/includes/MediaWiki.php(947): MediaWiki->performRequest()

#15 /var/lib/wiki/includes/MediaWiki.php(547): MediaWiki->main()

#16 /var/lib/wiki/index.php(53): MediaWiki->run()

#17 /var/lib/wiki/index.php(46): wfIndexMain()

#18 {main}


If I check the "revision" table in the database, there is no "page_timestamp". My MediaWiki Version is 1.35.8, PHP Version: 7.4.33 and MariaDB Version: 10.5.15-MariaDB-0+deb11u1

I have no idea why the history pages of the created wiki pages generate this error. Everything else seems to work fine.

I also executed php /maintenance/update.php, however it made no difference and did not fix the problem.

Any ideas or suggestion what I could do to fix this error? 141.52.248.4 (talk) 14:43, 27 March 2023 (UTC)

Hi MediaWiki Community,
since I got no answers until now I wanted to request again for your help. I think the problem might be related with this error message: Error 1176: Key 'page_timestamp' doesn't exist in table 'revision' However, I have no idea how to resolve this error and I only found several times the recommendation to execute sudo php mainenance/update.php but this does not help to fix this error. Everything else seem to work fine, besides requesting the history resp. revision pages of created or edited wiki pages.
Thanks in advance,
N. 2A00:1398:4:200:289D:20C8:FC33:5EB8 (talk) 08:58, 29 March 2023 (UTC)
Hi MediaWiki Community,
have you any hints why this database error occurs? I tried the solutions that were mentioned on the web such as run update.php script in der maintenance directory, however it did not fix the issue. Every page is created properly without any problems, however, when I want to access the history revision page of the created pages I get the mentioned error above. I would appreciate it, if anybody could give a hint how to fix this database error. Nirpsi (talk) 14:52, 31 March 2023 (UTC)
While, the page_timestamp index was renamed to rev_page_timestamp in mediawiki 1.37. Are you sure you are using the correct version of mediawiki with your mediawiki database?
What is the output of the SQL command show indexes in revision; ? Bawolff (talk) 10:38, 1 April 2023 (UTC)
@Bawolff Thanks for answering.
If I execute the sql query I get the following out:
I have columns and keys that start with rev_ and indeed there is as key given named "rev_page_timestamp". It seems the wiki queries the wrong key and that's why I get the error. However, what can I do to fix this? Updating the MediaWiki version or downgrading the Maria database? Nirpsi (talk) 15:21, 1 April 2023 (UTC)
So if somehow you have the rev_page_timestamp key that was introduced in 1.37, then i guess i would suggest upgrading mediawiki
Downgrading the database is difficult. Bawolff (talk) 15:59, 1 April 2023 (UTC)
@Bawolff Many Thanks for your help. Upgrading the MediaWiki to 1.39 solved the issue for me. Nirpsi (talk) 11:10, 2 April 2023 (UTC)

Need upgrade suggestions

Hi,

I've been tasked with upgrading Mediawiki 1.27.1 running on centOS 6.1.

My thinking is:

  1. Spin up a new OS (Ubuntu 22.04.2 LTS)
  2. Backup Mediawiki 1.27.1 DB and other pages.
  3. Restore 1.27.1 data on New OS.
  4. Recreate Mediawiki 1.27.1 file structure on New OS.
  5. Verify Mediawiki 1.27.1 starts and works.
  6. Do a complete system back up.
  7. Load required 3rd software new versions, PHP, etc
  8. Upgrade Mediawiki to 1.35 in one step.
  9. Test and do a full system backup
  10. Upgrade Mediawiki from 1.35 to 1.38.x
  11. Test and do a full system backup.

I've been checking out info on this page:

Manual:Upgrading#Frequently asked questions


At what point do I upgrade extensions: At 1.35 and 1.38 or just wait until the end?

If you have any thoughts/ideas to make this less painful please reply.

Dave BlueNight21 (talk) 21:06, 27 March 2023 (UTC)

Generally should upgrade extensions when you upgrade mediawiki (if the extension does not have database tables, you could also just disable them until end).
You can skip installing 1.27 on the new os and go 1.35 directly. If moving OS check if you need to change any LocalSettings.php stuff (like db host name) Bawolff (talk) 22:12, 27 March 2023 (UTC)
And don't forget the images directory and the permissions required on the image directory —TheDJ (Not WMF) (talkcontribs) 11:38, 28 March 2023 (UTC)

Wikitext nesting

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.


What are the priorities of parsing wikitext? There are:

  • wikitext,
  • HTML tags and HTML character entities,
  • MediaWiki tags (<nowiki>),
  • extensions tags (<charinsert>, <poem>),
  • templates,
  • parser functions (built-in ({{fullurl:pagename}}) and from extensions ({{#if}}, {{#switch}} etc)),
  • magic words (variables, behavior switches)
  • etc - how to understand which nesting will work, and which will not?

I use MediaWiki 1.39.2, PHP 8.1.0 (cgi-fcgi), MySQL 8.0.31 Neuteron (talk) 23:15, 27 March 2023 (UTC)

You need to be more specific as to what you are asking.
Generally things are evaluated in "normal" order. Most things can be nested. The main exception is you cannot nest things inside extension tags (but extensions may process their args as wikitext making it look like you can for some of them). However there is #tag: syntax to work around that. Bawolff (talk) 20:42, 28 March 2023 (UTC)
I need to generate questions for Quiz extension:
<quiz>
{ Question 1
|type="{}"}
Answer is { answer 1 }
{ Question 2
|type="{}"}
Answer is { answer 2 }
...
</quiz>
It will be:

1   Question 1
Answer is HTML input tag

2   Question 2
Answer is HTML input tag

Questions and answers stored in DataTable2 table. To extract data I should type:
<dt2-showtable table="Linux bash commands">
<template>
{{{Question}}}<br>
{{{Answer}}}<br>
</template>
</dt2-showtable>
To combine, it should be:
<quiz>
<dt2-showtable table="Linux bash commands">
<template>
{ {{{Question}}}
|type="{}"}
Answer is { {{{Answer}}} }
</template>
</dt2-showtable>
</quiz>
It should generate Quiz-questions like:

1   How to call manual for any command?
Answer is HTML input tag

2   How to change current working directory?
Answer is HTML input tag

but it doesn't — Quiz interprets it using his specific syntax.
How can I solve it? Neuteron (talk) 14:55, 30 March 2023 (UTC)
Try using {{#tag:quiz| quiz definition here}} instead.
Im not very familiar with datatables, so it may or may not work. Bawolff (talk) 21:06, 30 March 2023 (UTC)
Markup that works:
{{#tag:quiz|
{ example
{{!}}type="{}"}
{ 1 }
}}
{{#tag:dt2-showtable|
<template>
{{{Question}}}<br>{{{Answer}}}<br>
</template>
| table="Linux bash commands"
}}
but I need:
{{#tag:quiz|
  {{#tag:dt2-showtable|
    <template>
    { {{{Question}}}
    {{!}}type="{}"}
    Answer is { {{{Answer}}} }
    </template>
  | table="Linux bash commands"
  }}
}}
From Special:ExpandTemplates I got:
<quiz>
<dt2-showtable table="Linux bash commands">
<template>
{ {{{Question}}}
|type="{}"}
Answer is { {{{Answer}}} }
</template>
</dt2-showtable>
</quiz>
and Quiz extension interprets this literally. I expected to get:
<quiz>
{ How to call manual for any command?
|type="{}"}
Answer is { man }
{ How to change current working directory?
|type="{}"}
Answer is { cd }
...
</quiz>
The <dt2-showtable> tag should be processed first, and then the output should be piped to <quiz>. How to implement this? Neuteron (talk) 16:21, 1 April 2023 (UTC)
ChatGPT suggested to wrire a Lua module. Then the code will look something like this:
{{#tag:quiz|
  {{#invoke:ExpandExtensionTags|Expand|
    | dt2-showtable
    | <template>
      { {{{Question}}}
      {{!}}type="{}"}
      Answer is { {{{Answer}}} }
      </template>
    | table="Linux bash commands"
  }}
}}
Arg1 (dt2-showtable) is extension tag, arg2 is its content, arg3 (table="") is tag's attributes.
However, I couldn't find out from ChatGPT how to implement this.
Was such a module or similar one written in the Wikimedia projects? It may not be for specific extensions, but implement this mechanism in a general way Neuteron (talk) 08:25, 20 April 2023 (UTC)
Lua module is a good approach (as it gives you lots of control), but you would probably use frame:extensionTag not have the output of lua go into #tag:quiz Bawolff (talk) 11:06, 20 April 2023 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

find sandbox

To whom it may concern,

I had published a sandbox yesterday, however now I cannot locate it, please can you help.

Name of the title Praveen Moman

Published 27th March 2023 Esme Stewart (talk) 06:07, 28 March 2023 (UTC)

Hi, sandboxes aren't the place for draft articles. However is https://www.mediawiki.org/w/index.php?title=Project:Sandbox&oldid=5850848 the place you are looking for?
For more information on creating wikipedia articles see w:WP:AFC. Bawolff (talk) 06:14, 28 March 2023 (UTC)
Thank you! Esme Stewart (talk) 06:15, 28 March 2023 (UTC)

Searchbox suggestions limit

Hello.

When you type in the search field, a drop-down menu appears with suggestions. Currently there is a limit of 10 entries. Can we change this limit?

mediawiki: 1.36.1

php: 7.4

mariadb: 10.3 195.66.78.20 (talk) 08:25, 28 March 2023 (UTC)

Tried changing $wgOpenSearchDefaultLimit in DefaultSettings.php but it didn't help.
When you enter characters in the searchBox a GET request is sent /api.php?action=opensearch&format=json&formatversion=2&search=sometext&namespace=0&limit=10
Is there a way to change a limit parameter? 195.66.78.20 (talk) 14:35, 28 March 2023 (UTC)
You should not ever edit $wgDefaultSettings. Any config changes should be placed in LocalSettings.php.
That variable controls the default. I suspect but am not sure that the search dropdown does not use the default. Bawolff (talk) 20:36, 28 March 2023 (UTC)
Tried to place this variable in LocalSettings.php and that didn't work either 195.66.78.20 (talk) 06:41, 29 March 2023 (UTC)
I think I found where it can be changed.
jquery.suggestions.js - maxRows 195.66.78.20 (talk) 06:58, 29 March 2023 (UTC)

[Resolved] "Could not open" on visual editor

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


I've just (I thought) fully moved our wiki to a new server, but I get an error when I try to use the visual editor (hiding under the "edit" option on the page).

The error says

[ZCMAX_ruNRQnn_pBMp5FrQAAAE8] Exception caught: Could not open '/var/www/mediawiki-1.39.0/images/tmp-fpm-fcgi/mw-GlobalIdGenerator48-UUID-128'.


When I check the /var/www/mediawiki-1.39.0/images directory, I do not see a folder tmp-fpm-fcgi/ folder.

The general permissions in the /var/www/mediawiki-1.39.0/images folder (or /var/www/mediawiki/images as I tend to use the softlink) is 700 for directories and 644 for files.

the owner of the folder is the apache user.

Is this a case of a temp folder being misplaced? Techcare.noc (talk) 15:06, 28 March 2023 (UTC)

I'd just create the directory. The directory is controlled by $wgTmpDirectory, falling back to system environment variables or /tmp. Bawolff (talk) 20:33, 28 March 2023 (UTC)
I see $wgTmpDirectory = $IP . '/images/tmp-' . php_sapi_name(); in LocalSettings.php
the apache user should have all the rights to the images/ directory and contents...
I've added the directory, and will test. Techcare.noc (talk) 09:24, 29 March 2023 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Call to undefined function php_uname() error

How can i solve this type error ar setup page (language setup): Call to undefined function php_uname() 78.163.107.59 (talk) 09:01, 29 March 2023 (UTC)

Are you experiencing this on a shared hosting platform or something ? —TheDJ (Not WMF) (talkcontribs) 13:28, 29 March 2023 (UTC)
Check disabled_functions in your php.ini file Bawolff (talk) 13:38, 29 March 2023 (UTC)

CODE CSS

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


How do I remove the padding around the CODE element in MediaWiki? E.g.:

  • "monospace" (using CODE element)
  • "monospace" (using TT element)

Nicole Sharp (talk) 09:28, 29 March 2023 (UTC)

I found the fix. Just use:
  • "<code style="padding: 0;"></code>" instead of
  • "<code></code>".
Nicole Sharp (talk) 22:57, 29 March 2023 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

[Resolved] Temp directory confusion

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 resolved an issue with an error on the visual editor by adding a directory tmp-fpm-fcgi to the images directory, to fullfill the entry

$wgTmpDirectory = $IP . '/images/tmp-' . php_sapi_name();

In LocalSettings.php.

I now have two temp directories and a thumb directory under Images:

drwx------. 18 apache apache 4096 Mar 29 11:45 temp

drwx------. 19 apache apache  165 Feb  1 14:43 thumb

drwxr-xr-x.  2 apache apache    6 Mar 29 11:41 tmp-fpm-fcgi

I have several missing images in the wiki, most of which display the message:

Error creating thumbnail: Unable to save thumbnail to destination

My whole /var/www/mediawiki(-1.39.0)/ directory is owned by the apache user

I just noticed that the tmp-fpm-fcgi directory has permissions set to 755, where other directories in images/ were set to 700.

Changing any of these permissions does nothing to change the error message.

Searching for this error message I came across some settings, which I implemented in Localsettings.php, to no avail.

Currently I have the following in Localsettings.php

# $wgUploadPath = $IP . '/images';

$wgTmpDirectory = $IP . '/images/tmp-' . php_sapi_name();

# putenv('TMPDIR=/var/www/www.example.com/images');

$wgTmpDirectory = "$IP/images/temp";

putenv('TMPDIR=/var/www/mediawiki/images/temp');

$wgShellLocale = "en_US.UTF-8";

$wgUseImageMagick = false;


I am getting confused.


I would like to have images/temp/ to be the $wgTmpDirectory, and I *guess* images/thumb for the thumbs.

What am I doing wrong, not doing? Techcare.noc (talk) 12:03, 29 March 2023 (UTC)

Ok, so I found that the line
$wgTmpDirectory = "$IP/images/temp";
is not formatted correctly. I changed that to
$wgTmpDirectory = $IP . '/images/temp';
And now de visual editor works, although the missing images now show the name of the image that is *supposed* to be displayed. Techcare.noc (talk) 12:07, 29 March 2023 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Unable to upload images

Hello all,

I have been trying to upload images for the better part of the day now, and have been having a tough time uploading said pics.

I am currently using Vultr, and using Virtualmin, where I created a subdomain, and this is when I am hosting my media wiki page.

When I try to upload an image, I get the Could not store upload in the stash (UploadStashFileException): "Could not create directory "mwstore..., and so on


This is despite updating open_basedir and upload_tmp_dir in php.ini.


I have also set the correct permissions for my images folder, but still no luck. Any help in this matter will be much appreciated. Abhishek.nage (talk) 13:42, 29 March 2023 (UTC)

Have you enabled php error reporting? Php error logs might have more details.
Are you using Special:upload or upload wizard?
Does your host have selinux enabled?
Typically this error is almost always directory permissions/ownership issues or selinux. Bawolff (talk) 03:41, 30 March 2023 (UTC)

Hello -

What's Needed: Remediate the "Phishing by Navigating Browser tabs" for external links that shows up in Medaiwki.

What's done: We have updated the configs that takes care for all linkslinks referenced through medaiwiki pages however the pages with "Help" buton icons in uploads or book creator ..etc has external links to "https://mediawiki.org" that needs to be remediated with href tag attribute rel="noopener noreferrer".

Approach:

One of the approaches we plan to remediate is to route all the external help links to our internal help page. We notice that we need to override the "addlink" function in mediawiki file .../includes/specialpage/SpecialPage.php. (Refer attachment on change needed on that file)

I need to know what the best approach is to override this class file without modifying the source file in MW. I want a way to keep this change upgrade proof.

I'm open for alternative approach as well. Armfns001 (talk) 16:45, 29 March 2023 (UTC)

Note, with the exception of opera and android web view, all browsers have rel="noopener" as the default for links with target="_blank". Its been this way for more than 2 years now - https://caniuse.com/mdn-html_elements_a_implicit_noopener . So the attack you are talking about isn't relevant to modern web browsers.
That said, modifying OutputPage::addHelpLink in an upgrade proof way is difficult. Bawolff (talk) 19:10, 29 March 2023 (UTC)

Specialsite Preferences

Hi! As an admin of a mediawiki, how can I edit the specialsite:preferences? I would like to edit the introductory text first. Thank you very much for your support! 95.90.62.221 (talk) 17:39, 29 March 2023 (UTC)

Please be more specific about what you want to edit Bawolff (talk) 18:59, 29 March 2023 (UTC)
wiki/Special:Preferences?uselang=qqx shows the raw strings. For example, if you wanted to overwrite "preferences-summary", create a page "MediaWiki:Preferences-summary" with your text to show instead. Malyacko (talk) 19:21, 29 March 2023 (UTC)

Special:ChangeCredentials does not change password

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


MediaWiki 1.35.9

PHP 8.0.28 (cgi-fcgi)

MariaDB 10.5.19-MariaDB

ICU 50.2


Currently setting up a wiki for a small project, however when an account goes to Special:ChangeCredentials and logs in again, the page only displays fields for New Password and Repeat New Password. No issue filling those out. However, once the password is changed, it stays on the Special:ChangeCredentials page. Logged out of the account and attempted to log in with the new password which does not work. Log in with the old password.


Essentially, Special:ChangeCredentials is not actually changing the password. I've done hours of consulting the manuals, and can not find a solution. Any help is appreciated. Honto335 (talk) 18:58, 30 March 2023 (UTC)

If you are running php 8, we strongly reccomend you use mediawiki 1.39 and not the older mediawiki 1.35. J have no idea if that's related to your issue but might be worth a try.
Are there any errors/warnings in php debug log when changing the password?
You might want to try enabling the (very noisey) mediawiki debug log. See manual:How to debug.
Do you have any authentication extensions enabled? Bawolff (talk) 12:05, 1 April 2023 (UTC)
Updating to 1.39 fixed the issue. Not sure why thats the case, but it worked. Thank you for the help! Honto335 (talk) 05:32, 2 April 2023 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

MediaWiki 1.35.7 PHP 7.4.3 MySQL 8.0.32


Howdy,

we have defined an interwiki shortcut "rzj". Works well, except that sometimes spaces in the resulting URL will be replaced by underscore - which means the target page will not be found. Examples:

  • RZJ:Sonderdruck 1966/RZ-Sonderdruck 01.jpg
  • gives http://www.rz-journal.de/Downl/Sonderdruck_1966/RZ-Sonderdruck%2001.jpg
  • RZJ:Sonderdruck 1966/RZ-Sonderdruck Extra 01.jpg
  • gives http://www.rz-journal.de/Downl/Sonderdruck_1966/RZ-Sonderdruck_Extra_01.jpg but should be http://www.rz-journal.de/Downl/Sonderdruck_1966/RZ-Sonderdruck%20Extra%2001.jpg

Could anyone please explain why the first example does work but the second doesn't? 2003:C2:3F41:E200:9C1B:55DF:92C0:87F8 (talk) 20:17, 30 March 2023 (UTC)

Neither should. Interwiki links assume wiki like url syntax. Bawolff (talk) 21:08, 30 March 2023 (UTC)
Roger, first hit is just by accident. Never mind, I`ll go back from interwiki to template. Thank you! 2003:C2:3F41:E200:8FC:5285:7122:A25 (talk) 07:30, 31 March 2023 (UTC)
See also https://phabricator.wikimedia.org/T2707 Bawolff (talk) 08:27, 31 March 2023 (UTC)

a few questions

I have a few questions, sorry if this is not the place and sorry for the funny wording - I used Google Translate.

1. Where can I translate system messages into Hebrew?

2. Where is there a neat documentation of the JS object "mw", and all its features?

3. How do I handle the text directions of pages on the MediaWiki website, which are displayed from left to right in Hebrew as well, instead of from right to left (which seems very ridiculous. And this is also on the main page)?

4. Where can improvements to MediaWiki be suggested?

Thank you השמעון (talk) 10:35, 31 March 2023 (UTC)

  1. https://translatewiki.net/wiki/Translating:MediaWiki
  2. Manual:Interface/JavaScript
  3. Harder to answer without more details, links, more info (setting for content language, setting for interface language, browser and browser version, etc).
  4. How to report a bug if the improvements are actionable, well-defined, smaller. If you have bigger thoughts, please see Communication Malyacko (talk) 10:46, 31 March 2023 (UTC)
Thank you!
Regarding 3., it seems that I did not explain myself correctly. I mean this site itself, where pages translated into Hebrew, like main page, are displayed in the opposite direction. You won't be able to see it in Template:Main_page/he, or in MediaWiki/he, but you will be able to see it on the main page itself, if you change the language to Hebrew in your preferences. השמעון (talk) 10:59, 31 March 2023 (UTC)
Questions about this page itself are best brought up on Project:Current issues. I guess I can reproduce. Malyacko (talk) 11:03, 31 March 2023 (UTC)
Thank you again, could you repeat your last words, "I guess I can reproduce",  in another wording or language? Because Google translates them like "I guess I can breed", And that's probably not what you meant to say...
I understand German at a reasonable level.
By the way, I eventually found full documentation for the mw object in ResourceLoader/Core modules השמעון (talk) 19:43, 1 April 2023 (UTC)
Google translate translating reproduce to breed is actually pretty funny.
In context "reproduce" means "i am able to see the same thing you are seeing when i try it"
So Malyacko is saying that he can confirm that he can see the issue that you mentioned. Bawolff (talk) 17:08, 2 April 2023 (UTC)
Actually, I guessed that was the original intention...
Do any of you have the patience for more questions about MediaWiki? השמעון (talk) 17:18, 2 April 2023 (UTC)
You can always ask. Whether or not people respond depends on them. Bawolff (talk) 18:58, 2 April 2023 (UTC)
1. Is there somewhere documentation and explanation about the structure of MediaWiki's HTML elements?
For example, about the different properties of an external link element, and of an internal link (I often find JSONs there as a property of an element, and this is also true in templates).
It matters to me because I developed a script for opening links while editing in source code, and I would like to extend it to visual editing as well, (where the external links are often inside a template and the user cannot access them). The way I want to open the link is this: after the user has selected a link on the page (actually an HTML element) and clicks on a certain key combination, the element will go through decoding that finds the link in it.
The problem with this is that the HTML of the visual editor is very strange. Sometimes the element that contains the full link is neither a sibling nor a father or son of the text body element, but its nephew or something else.
So you can go wild with loops and recursions that roam the DOM, and work hard, but instead I'd rather learn about the logic behind it and go straight. It also just interests me.
2. Regarding the website translatewiki.net, does it also deal with the drafting of system messages or only their translation? השמעון (talk) 19:11, 2 April 2023 (UTC)
for 1: Is https://www.mediawiki.org/wiki/Specs/HTML/2.7.0 what you are looking for?
For 2: Translatewiki.net only deals with translations. The drafting of (english) system messages happens on https://gerrit.wikimedia.org and https://phabricator.wikimedia.org Bawolff (talk) 15:19, 4 April 2023 (UTC)
1. Yes, although the HTML of the visual editor is not discussed there (and rightly so - it is not such an important topic), it will help me.
2. Thanks. השמעון (talk) 16:40, 4 April 2023 (UTC)
another question. In our wiki, https://www.hamichlol.org.il/ , the symbol indicating an external link does not appear. Can you check why? השמעון (talk) 17:47, 4 April 2023 (UTC)
Its due to MediaWiki:Gadget-ExternalLinkIcon.css which according to https://www.hamichlol.org.il/%D7%9E%D7%99%D7%95%D7%97%D7%93:%D7%92%D7%90%D7%93%D7%92'%D7%98%D7%99%D7%9D is enabled by default for everyone Bawolff (talk) 12:17, 5 April 2023 (UTC)
You can usually write an HTML div element with style in the wiki code, like this:
<div style="color=red;"> Text</div>
So why is this code not working?
<div style="filter: blur(5px) !important;"> Text</div> השמעון (talk) 20:06, 15 April 2023 (UTC)
Certain CSS items are restricted. I'm not sure why filter is on the list, but probably people were worried about referencing filters from svg files. However, we also block url(), so seems pointless to block filter.
You might be able to work around this using Extension:TemplateStyles. Bawolff (talk) 20:36, 15 April 2023 (UTC)

RSS in XML

I'd like to generate RSS feeds in xml format for my MediaWiki articles. Is that possible? 80.98.177.69 (talk) 11:23, 31 March 2023 (UTC)

Extension:RSS Malyacko (talk) 12:07, 31 March 2023 (UTC)
Extension:RSS is for including feeds. If you want to create feeds there are a couple options like Extension:Semantic MediaWiki, extension:GoogleNewsSitemap, extension:FeaturedFeeds, probably more Bawolff (talk) 12:45, 31 March 2023 (UTC)