Project:Support desk/Flow/2023/06

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

How should I structure translations for my wiki

Currently, I have an English wiki containing text and images in English. I want to automate the process of rewriting the content and images into different languages using a Python script. However, I'm concerned about the complexity of creating and managing multiple subdomains. Is there a way to replicate the settings and extensions of my main domain for these subdomains while allowing them to have their own articles and images?

One possible solution I'm considering is manually generating multiple wikis and using a cron job to transfer extensions and settings, as well as import text files and images into each wiki individually. However, I'm hoping to find a simpler approach.

Additionally, I cannot use the generic Translate extension because the images contain English text, and I have schemas and SEO tags associated with each page that would be incorrect during the translation process. MarblehorseNet (talk) 05:21, 1 June 2023 (UTC)

Template content not being generated at page load

Hello I am trying to create a banner on my page that shows if the last edit was over given time. for testing purposes I have set this time to 1 minute.

I have template with:

{{#expr: {{#time: U | {{CURRENTTIMESTAMP}} }} - {{#time: U | {{REVISIONTIMESTAMP}} }} }} Seconds
{{#ifexpr: {{#expr: ({{#time: U | {{CURRENTTIMESTAMP}} }} - {{#time: U | {{REVISIONTIMESTAMP}} }})  }} > 60 | Page was edited over one minute }}

I saved as Template:LastEdit On a test page I inculude this template, and behaviour is not as expected.

{{LastEdit}}
{{#time: F j, Y, H:i|{{REVISIONTIMESTAMP}}}} Edited
{{#time: F j, Y, H:i|{{CURRENTTIMESTAMP}}}} Current

I see following after saving:

0 Seconds
June 1, 2023, 14:08 Edited
June 1, 2023, 14:08 Current

But waiting some time, nothing changes. I go onto page, and just press ave the page is updated:

318 Seconds
Page was edited over one minute
June 1, 2023, 14:08 Edited
June 1, 2023, 14:13 Current

I dont understand why the page didnt refresh during page load. If afterwards I save over the page, the timer doesnt refresh, it looks like just using the value when the template was added. Does anyone know why this is happening? 176.236.58.247 (talk) 14:15, 1 June 2023 (UTC)

Due to parser cache, pages do not get rerendered everytime you view.
You could try extension:MagicNoCache but beware disabling parser cache is really bad for performance.
You can also force a refresh without edit by adding ?action=purge (or &action=purge) to end of url. Bawolff (talk) 16:38, 1 June 2023 (UTC)

Lua issue

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,

Getting this error on a hosted environment: ./extensions/Scribunto/includes/engines/LuaStandalone/binaries/lua5_1_5_linux_64_generic/lua: /lib/libc.so.6: version `GLIBC_2.3' not found (required by ./extensions/Scribunto/includes/engines/LuaStandalone/binaries/lua5_1_5_linux_64_generic/lua)

Is there someone can help me with this?

JB Janbartbergers (talk) 14:36, 1 June 2023 (UTC)

You probably either need to recompile it for the libc used by your host or use a different host. Bawolff (talk) 16:32, 1 June 2023 (UTC)
Hey Bawolff, thank you.
Unfortunately we couldn't do a Make ourselves due to restrictions on our hosting account. However, we updated the lua executable packed with the Screbunto extension with this one sourceforge.net/projects/luabinaries/files/5.1.4/Tools%20Executables and now we have ambox working, where this issue started with in the first place.
Thx,
-JB Janbartbergers (talk) 13:02, 2 June 2023 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Issue with uploading images to wiki

I want to put a image on my wikipage. All of the methods for putting photos on a wiki page include using the url where the image is located on the internet. My issue is that the photo is saved to my machine and does not exist online. The image is under /home/carter/Photos. I'm using Ubuntu 22.4. Let me know if you have any solutions. Thanks Carter.smith1 (talk) 19:55, 1 June 2023 (UTC)

Upload it using the page named Special:upload or importImages.php from command line Bawolff (talk) 23:46, 1 June 2023 (UTC)
This is the error I get when I try to upload throught the Special:Upload page:
Could not open lock file for "mwstore://local-backend/local-public/1/16/Gitlab-fork.png". Make sure your upload directory is configured correctly and your web server has permission to write to that directory. See https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:$wgUploadDirectory for more information. Carter.smith1 (talk) 18:13, 2 June 2023 (UTC)
Usually that means there are incorrect permissions on the images directory (or one of its subdirectories) in your mediawiki folder. Ensure the webserver can write there. Bawolff (talk) 19:00, 2 June 2023 (UTC)
I'm getting an error that says:
No suitable files could be found for import.
I've read this sometimes means that the directory does not have permission so I tried to run:
sudo chmod -R 777 Photos
I'm not sure why it is not working. Let me know. Thanks Carter.smith1 (talk) 18:50, 5 June 2023 (UTC)
I found the solution when running this command:
php maintenance/importImages.php /path/to/images/directory
I had this at the end: /Photos/The-name-of-the-image
The issue is the command only needs the directory name where the photos are located, not the actual name of the photo. Carter.smith1 (talk) 19:18, 5 June 2023 (UTC)

Error: invalid magic word 'categorytree'

I'm inconsistently getting this error on my wiki (luchawiki.org)

"Original exception: [ZHkGbsYjBOWozDJGc5KRrAAAJ5o] /index.php?title=Special:Version MWException: Error: invalid magic word 'categorytree' "

I'm on 1.39.3 and I've only seen it come up since the upgrade. It comes and goes strangly.I did run the update script from SSH (and again a couple of more times just to be sure after the error popped up.) Is there anything else I should check? Thecubsfan (talk) 21:03, 1 June 2023 (UTC)

That's kind of weird, especially if intermittent. I guess try running rebuildLocalisationCache.php --force Bawolff (talk) 23:45, 1 June 2023 (UTC)
Thanks. I tried that and now I see this one popping up at random.
"/index.php?title=DASH 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 Manual:Upgrading and Manual:How_to_debug for more information.
Error 1062: Duplicate entry 'en-messages:apihelp-delete-param-deletetalk' for key 'PRIMARY'" Thecubsfan (talk) 02:19, 2 June 2023 (UTC)

Hello, how can I center my logo in the middle of the page?

I can't find the html file. To make it center, I have to change the html flle but there's nothing similar. Currently I am using the skin "Timeless". Mago1993 (talk) 22:55, 1 June 2023 (UTC)

Create page through Form

On my MediaWiki instance 1.39, I have configured a form using PageForms extension, Now I want this form as default for page creation action, as of now when user search a title and if its not there it prompts to create the page and on initiating a page creation from there it takes to a blank page, I want a option to redirect page creation using Form Bpnimmala (talk) 07:14, 2 June 2023 (UTC)

Some extensions' talk pages are ignored, but the author monitors this one's. Anyway, I don't know the answer, but you might find some ideas here: Extension:Page_Forms/Linking_to_forms#Pointing_red_links_to_a_form. Jonathan3 (talk) 17:51, 4 June 2023 (UTC)

using PropertyTable2 and SimpleTable extensions in MW 1.35

Hello every one

Actually i'm using PropertyTable2 and SimpleTable extensions in my mediawiki V 1.28 i upgraded it to v 1.35 but both this two extensions are no longer supported in new version of mediawiki. i have many bugs and display issue in may pages and cant found the alternatives


Any suggestions please to replace this extensions ?


Thanks 79.95.86.132 (talk) 09:25, 2 June 2023 (UTC)

Lua Issues as well

the site I'm working at is. https://avorial.com/mediawiki/index.php?title=Test and I'm getting this error.

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


What I have done so far.

  • I went though the walkthrough on Infobox and have changed the permissions to 777 on the lua
  • I'm on a synology DS1019+, running a INTEL Celeron J3455, and DSM 7.2 Avorial (talk) 13:36, 2 June 2023 (UTC)
Project:Support desk/Flow/2014/01#h-Lua_error:_Cannot_create_process:_proc_open(/dev/null):_failed_to_open_stream:_O-2014-01-31T14:26:00.000Z; https://superuser.com/questions/1183462/cannot-create-process-proc-open-failed-to-open-stream-permission-denied Malyacko (talk) 11:18, 4 June 2023 (UTC)
The implication of the page you sent is just my /usr/share/webapps/mediawiki/extensions/Scribunto premissions & /dev/null are off. I have made all of those permissions open.
I tried it again and there was no change. Is there something I'm missing in the link you sent? Avorial (talk) 13:16, 4 June 2023 (UTC)

Issue with update my wiki 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.


Hi can someone please help me going crazy, getting this error when I try to update my wiki:

Error 1091: Can't DROP INDEX `user_timestamp`; check that it exists

Thanks Järnvägen (talk) 19:06, 2 June 2023 (UTC)

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

Master version error

I have a bug that causes errors in ServiceContainer.php, etc. when I install the master version of this extension on my server.

Mediawiki 1.41

php 8.2.5 153.131.152.0 (talk) 13:44, 3 June 2023 (UTC)

sorry 153.131.152.0 my log out edit ドデカイラーメン (talk) 14:03, 3 June 2023 (UTC)
I had the May 10 extension file and overwrote it and it fixed it. It still seems to be a bug in the extension. ドデカイラーメン (talk) 14:46, 3 June 2023 (UTC)
Which extension? What error (Please include it exactly)? Bawolff (talk) 20:30, 3 June 2023 (UTC)

wgRawHtml - Version 1.39.3 not working

Hello,

I installed a new version of MediaWiki on my managed server (one domain for this wiki). My configuration allows working on the wiki with allowance only. I wanted to use HTML and set $wgRawHtml = true; . Nevertheless, it is not possible to use HTML. I know how to use it because I have another wiki with the version 1.36.1. There it is no problem. Can anybody help me further? I have no idea what I can do now.

Thank you for your help.

Best regards, NetteFee (talk) 14:15, 4 June 2023 (UTC)

An error occured during infobox publishing: [ZHzbjey7-fB8I-TGHFTtmQAAAA8] Exception caught: Function name must be a string

How do i fix this error


An error occured during infobox publishing: [ZHzbjey7-fB8I-TGHFTtmQAAAA8] Exception caught: Function name must be a string Cocopuff2018 (talk) 18:48, 4 June 2023 (UTC)

Ignore upload warnings permanently

My wiki has a huge number of missing files, so we created blank pages for them with categories, making sorted lists of missing files possible. However, now whenever someone tries to upload a missing image, they get this warning:

"The description page for this file has already been created at [File], but no file with this name currently exists. The summary you enter will not appear on the description page. To make sure your summary appear there, you will need to manually edit it."

I would like to permanently disable this warning on my wiki. I did find this snippet that should permanently check mark the "ignore any warnings" checkbox, but I tried adding that snippet in both MediaWiki:UploadForm.js and MediaWiki:Commons.js and still the checkbox is blank. Clarasiir (talk) 22:43, 4 June 2023 (UTC)

The snippet works for me. Maybe there's another error in your MediaWiki:Common.js that prevents further execution of scripts. Check the error console of your browser (usually by hitting F12 key) Ciencia Al Poder (talk) 11:15, 5 June 2023 (UTC)

How upgrade Mediawiki and Database ?

Hi, I'm trying to upgrade my MediaWiki from 1.38 to 1.39. My MW instance is running on Docker.  

However I have a display error when I connect.

There is currently no text on this page. You can launch a search on this title in the other pages, search in related operations or create this page.

[9db9b7555e94f2b21245627f] /index.php?title=Accueil&action=edit Wikimedia\Rdbms\DBQueryError: A database query error has occurred. Did you forget to run your application's database schema updater after upgrading or after adding a new extension?

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

Error 1146: Table 'dowiki.linktarget' doesn't exist

Function: MediaWiki\Linker\LinkTargetStore::getLinkTargetIdFromCache

Query: SELECT lt_id,lt_namespace,lt_title FROM `linktarget` WHERE lt_namespace = 0 AND lt_title = 'Accueil' LIMIT 1

Same error when editing a page.

I tried to update my DB by running the php script update.php. But I still get the same SQL errors

#0 /var/www/html/includes/libs/rdbms/database/Database.php(1602): Wikimedia\Rdbms\Database->getQueryException('Can't DROP INDE...', 1091, 'ALTER TABLE `re...', 'Wikimedia\\Rdbms...')

#1 /var/www/html/includes/libs/rdbms/database/Database.php(1576): Wikimedia\Rdbms\Database->getQueryExceptionAndLog('Can't DROP INDE...', 1091, 'ALTER TABLE `re...', 'Wikimedia\\Rdbms...')

#2 /var/www/html/includes/libs/rdbms/database/Database.php(952): Wikimedia\Rdbms\Database->reportQueryError('Can't DROP INDE...', 1091, 'ALTER TABLE `re...', 'Wikimedia\\Rdbms...', false)

#3 /var/www/html/includes/libs/rdbms/database/Database.php(3302): Wikimedia\Rdbms\Database->query('ALTER TABLE `re...', 'Wikimedia\\Rdbms...')

#4 /var/www/html/includes/libs/rdbms/database/Database.php(3241): Wikimedia\Rdbms\Database->sourceStream(Resource id #906, NULL, NULL, 'Wikimedia\\Rdbms...', NULL)

#5 /var/www/html/includes/libs/rdbms/database/DBConnRef.php(103): Wikimedia\Rdbms\Database->sourceFile('/var/www/html/m...')

#6 /var/www/html/includes/libs/rdbms/database/DBConnRef.php(807): Wikimedia\Rdbms\DBConnRef->__call('sourceFile', Array)

#7 /var/www/html/includes/installer/DatabaseUpdater.php(718): Wikimedia\Rdbms\DBConnRef->sourceFile('/var/www/html/m...')

#8 /var/www/html/includes/installer/DatabaseUpdater.php(843): DatabaseUpdater->applyPatch('/var/www/html/m...', false, 'Table revision ...')

#9 /var/www/html/includes/installer/DatabaseUpdater.php(547): DatabaseUpdater->dropField('revision', 'rev_text_id', 'patch-revision-...')

#10 /var/www/html/includes/installer/DatabaseUpdater.php(511): DatabaseUpdater->runUpdates(Array, false)

#11 /var/www/html/maintenance/update.php(202): DatabaseUpdater->doUpdates(Array)

#12 /var/www/html/maintenance/includes/MaintenanceRunner.php(309): UpdateMediaWiki->execute()

#13 /var/www/html/maintenance/doMaintenance.php(85): MediaWiki\Maintenance\MaintenanceRunner->run()

#14 /var/www/html/maintenance/update.php(312): require_once('/var/www/html/m...')

#15 {main}


If someone can help me. 212.24.219.214 (talk) 11:53, 5 June 2023 (UTC)

see Manual:Upgrading Taavi (talk!) 12:14, 5 June 2023 (UTC)
I followed the tutorial adapted to my case. I have MW version 1.39.3 with PHP version 7.4.33, a DB MariaDB 10.5.19 and a Memcached 1.6, running on Docker. That's three containers.
I've made my DB backup, I've got all my extensions in wfwfLoadExtension in my LocalSettings.php.
But when I do a php update.php I get these errors:
#0 /var/www/html/includes/libs/rdbms/database/Database.php(1602): Wikimedia\Rdbms\Database->getQueryException('Can't DROP INDIA...', 1091, 'ALTER TABLE `re...', 'Wikimedia\Rdbms...')
#1 /var/www/html/includes/libs/rdbms/database/Database.php(1576): Wikimedia\Rdbms\Database->getQueryExceptionAndLog('Can't DROP INDIA...', 1091, 'ALTER TABLE `re...', 'Wikimedia\Rdbms...')
#2 /var/www/html/includes/libs/rdbms/database/Database.php(952): Wikimedia\Rdbms\Database->reportQueryError('Can't DROP INDIA...', 1091, 'ALTER TABLE `re...', 'Wikimedia\Rdbms...', false)
#3 /var/www/html/includes/libs/rdbms/database/Database.php(3302): Wikimedia\Rdbms\Database->query('ALTER TABLE `re...', 'Wikimedia\Rdbms...')
#4 /var/www/html/includes/libs/rdbms/database/Database.php(3241): Wikimedia\Rdbms\Database->sourceStream(Resource id #839, NULL, NULL, 'Wikimedia\Rdbms...', NULL)
#5 /var/www/html/includes/libs/rdbms/database/DBConnRef.php(103): Wikimedia\Rdbms\Database->sourceFile('/var/www/html/m...')
#6 /var/www/html/includes/libs/rdbms/database/DBConnRef.php(807): Wikimedia\Rdbms\DBConnRef->__call('sourceFile', Array)
#7 /var/www/html/includes/installer/DatabaseUpdater.php(718): Wikimedia\Rdbms\DBConnRef->sourceFile('/var/www/html/m...')
#8 /var/www/html/includes/installer/DatabaseUpdater.php(843): DatabaseUpdater->applyPatch('/var/www/html/m...', false, 'Table revision ...')
#9 /var/www/html/includes/installer/DatabaseUpdater.php(547): DatabaseUpdater->dropField('revision', 'rev_text_id', 'patch-revision-...')
#10 /var/www/html/includes/installer/DatabaseUpdater.php(511): DatabaseUpdater->runUpdates(Array, false)
#11 /var/www/html/maintenance/update.php(202): DatabaseUpdater->doUpdates(Array)
#12 /var/www/html/maintenance/includes/MaintenanceRunner.php(309): UpdateMediaWiki->execute()
#13 /var/www/html/maintenance/doMaintenance.php(85): MediaWiki\Maintenance\MaintenanceRunner->run()
#14 /var/www/html/maintenance/update.php(312): require_once('/var/www/html/m...')
#15 {main} 212.24.219.214 (talk) 13:23, 5 June 2023 (UTC)
I tried with the URL access localhost:8080/mw-config/ but when I get to the step 'Upgrade existing installation' i got this error
An error occurred:
Error 1091: Can't DROP INDEX `user_timestamp`; check that it exists
Function: Wikimedia\Rdbms\Database::sourceFile( /var/www/html/maintenance/archives/patch-revision-actor-comment-MCR.sql ) 212.24.219.214 (talk) 13:34, 5 June 2023 (UTC)

Error on DB when I upgrade MW 1.38 to 1.39

I tried with the URL access localhost:8080/mw-config/ but when I get to the step 'Upgrade existing installation' i got this error

An error occurred:

Error 1091: Can't DROP INDEX `user_timestamp`; check that it exists

Function: Wikimedia\Rdbms\Database::sourceFile( /var/www/html/maintenance/archives/patch-revision-actor-comment-MCR.sql ) 212.24.219.214 (talk) 13:35, 5 June 2023 (UTC)

I found a solution to my answer. I commented out the files executing the blocking commands to my version upgrade. Then I reassembled them on my container.
patch-archive-MCR.sql & patch-revision-actor-comment-MCR 212.24.219.214 (talk) 14:52, 5 June 2023 (UTC)

a problem with importDump.

Hi guys, I have a problem with importDump.

I have used docker php-fpm mediawiki images and dockerfile and put them together in docker compose with memcached, mariadb, elastic and nginx. Also, I have used wikibase, TemplateStyle and Scribunto extensions.

When I export contents as XML from that wiki or other wikis, and then import them through web-based or importDump command, some warning about non-utf8 characters comes and imports fail with this error:"Error: data must be loaded before reading" and "Error : PCDATA invalid char value"

Be aware, my XML files are utf8 and the contents can be imported into others wikis as well as before, but in this case, I have a problem.

Please help me how to solve this problem.

MediaWiki 1.39.3
PHP 8.1.19 (fpm-fcgi)
MariaDB 10.11.3-MariaDB-1:10.11.3+maria~ubu2204
ICU 72.1
LuaSandbox 4.0.2
Lua 5.1.5
Pygments 2.11.2
Elasticsearch 7.10.2

Some configurations and errors are shown below:

Sokote zaman (talk) 13:40, 5 June 2023 (UTC)

Internal Error errors when source editing large pages and templates

Hi - I am encountering an "Internal Server Error: The server encountered an internal error or misconfiguration and was unable to complete your request." problem when editing template pages in "source editor" mode. It is really odd: it seems to happen only when pages get to a certain length, and it only impacts "source editing" mode and not "visual editor" mode, so I can generally get around it, but not when editing templates as they don't give you the visual editor option (why is that by the way?)

It seems to be mediawiki related as it comes up on different machines, different browsers and on mobile as well. Is it something i have done? ElectricRay (talk) 14:16, 5 June 2023 (UTC)

Update: I have added template namespace to those for which the visual editor loads, but I would still be interested to know what the problem is with the source editor.ElectricRay (talk) 15:30, 5 June 2023 (UTC)

How to show sidebar default in vactor-2022?

How to show sidebar default in vactor-2022?


Vactor-2022's default is hide. Tunglinwu (talk) 16:27, 5 June 2023 (UTC)

Score extension/Shellbox headaches

When I set up Shellbox and enable the Score extension, MediaWiki complains with the following:

[ed4919abc99fe3ec043a59fb] /w/index.php?title=Special:Version MWException: Unable to open CDB file "/var/www/notawiki/w/cache/l10n_cache-en.cdb.tmp.1161605081" for write.
Backtrace:
from /var/www/notawiki/w/includes/language/LCStoreCDB.php(100)
#0 /var/www/notawiki/w/includes/language/LocalisationCache.php(1013): LCStoreCDB->startWrite()
#1 /var/www/notawiki/w/includes/language/LocalisationCache.php(496): LocalisationCache->recache()
#2 /var/www/notawiki/w/includes/language/LocalisationCache.php(413): LocalisationCache->initLanguage()
#3 /var/www/notawiki/w/includes/language/LocalisationCache.php(332): LocalisationCache->loadSubitem()
#4 /var/www/notawiki/w/includes/language/MessageCache.php(725): LocalisationCache->getSubitem()
#5 /var/www/notawiki/w/includes/language/MessageCache.php(1221): MessageCache->isMainCacheable()
#6 /var/www/notawiki/w/includes/language/MessageCache.php(1126): MessageCache->getMsgFromNamespace()
#7 /var/www/notawiki/w/includes/language/MessageCache.php(1097): MessageCache->getMessageForLang()
#8 /var/www/notawiki/w/includes/language/MessageCache.php(1042): MessageCache->getMessageFromFallbackChain()
#9 /var/www/notawiki/w/includes/language/Message.php(1476): MessageCache->get()
#10 /var/www/notawiki/w/includes/language/Message.php(1123): Message->fetchMessage()
#11 /var/www/notawiki/w/extensions/CirrusSearch/includes/Hooks.php(191): Message->isDisabled()
#12 /var/www/notawiki/w/includes/libs/objectcache/BagOStuff.php(216): CirrusSearch\Hooks::CirrusSearch\{closure}()
#13 /var/www/notawiki/w/extensions/CirrusSearch/includes/Hooks.php(195): BagOStuff->getWithSetCallback()
#14 /var/www/notawiki/w/extensions/CirrusSearch/includes/Hooks.php(91): CirrusSearch\Hooks::overrideMoreLikeThisOptionsFromMessage()
#15 /var/www/notawiki/w/extensions/CirrusSearch/includes/Hooks.php(63): CirrusSearch\Hooks::initializeForRequest()
#16 /var/www/notawiki/w/includes/HookContainer/HookContainer.php(338): CirrusSearch\Hooks::onBeforeInitialize()
#17 /var/www/notawiki/w/includes/HookContainer/HookContainer.php(137): MediaWiki\HookContainer\HookContainer->callLegacyHook()
#18 /var/www/notawiki/w/includes/HookContainer/HookRunner.php(933): MediaWiki\HookContainer\HookContainer->run()
#19 /var/www/notawiki/w/includes/MediaWiki.php(207): MediaWiki\HookContainer\HookRunner->onBeforeInitialize()
#20 /var/www/notawiki/w/includes/MediaWiki.php(923): MediaWiki->performRequest()
#21 /var/www/notawiki/w/includes/MediaWiki.php(576): MediaWiki->main()
#22 /var/www/notawiki/w/index.php(50): MediaWiki->run()
#23 /var/www/notawiki/w/index.php(46): wfIndexMain()
#24 {main}

I’m running Shellbox via Docker. Fifo F (talk) 18:01, 5 June 2023 (UTC)

Is wgCacheDirectory writable by the web server. Bawolff (talk) 18:02, 5 June 2023 (UTC)
yes, it works fine when I comment out the Score extension line Fifo F (talk) 18:11, 5 June 2023 (UTC)
When I disable the Score extension and then access a page that uses SyntaxHighlight, MW also spits out errors:
[d1b1b4f08601cb883f9b70d1] /wiki/MediaWiki:Common.css Shellbox\ShellboxError: Shellbox server error: The configuration variable "secretKey" is required, but it is not present in the config file.
Backtrace:
from /var/www/notawiki/w/vendor/wikimedia/shellbox/src/Client.php(169)
#0 /var/www/notawiki/w/vendor/wikimedia/shellbox/src/Command/RemoteBoxedExecutor.php(77): Shellbox\Client->sendRequest()
#1 /var/www/notawiki/w/vendor/wikimedia/shellbox/src/Command/BoxedExecutor.php(20): Shellbox\Command\RemoteBoxedExecutor->executeValid()
#2 /var/www/notawiki/w/vendor/wikimedia/shellbox/src/Command/BoxedCommand.php(183): Shellbox\Command\BoxedExecutor->execute()
#3 /var/www/notawiki/w/extensions/SyntaxHighlight_GeSHi/includes/Pygmentize.php(303): Shellbox\Command\BoxedCommand->execute()
#4 /var/www/notawiki/w/extensions/SyntaxHighlight_GeSHi/includes/SyntaxHighlight.php(345): MediaWiki\SyntaxHighlight\Pygmentize::highlight()
#5 /var/www/notawiki/w/includes/libs/objectcache/wancache/WANObjectCache.php(1759): MediaWiki\SyntaxHighlight\SyntaxHighlight::MediaWiki\SyntaxHighlight\{closure}()
#6 /var/www/notawiki/w/includes/libs/objectcache/wancache/WANObjectCache.php(1589): WANObjectCache->fetchOrRegenerate()
#7 /var/www/notawiki/w/extensions/SyntaxHighlight_GeSHi/includes/SyntaxHighlight.php(351): WANObjectCache->getWithSetCallback()
#8 /var/www/notawiki/w/extensions/SyntaxHighlight_GeSHi/includes/SyntaxHighlight.php(393): MediaWiki\SyntaxHighlight\SyntaxHighlight::highlightInner()
#9 /var/www/notawiki/w/extensions/SyntaxHighlight_GeSHi/includes/SyntaxHighlight.php(590): MediaWiki\SyntaxHighlight\SyntaxHighlight::highlight()
#10 /var/www/notawiki/w/includes/HookContainer/HookContainer.php(338): MediaWiki\SyntaxHighlight\SyntaxHighlight::onContentGetParserOutput()
#11 /var/www/notawiki/w/includes/HookContainer/HookContainer.php(137): MediaWiki\HookContainer\HookContainer->callLegacyHook()
#12 /var/www/notawiki/w/includes/HookContainer/HookRunner.php(1190): MediaWiki\HookContainer\HookContainer->run()
#13 /var/www/notawiki/w/includes/content/ContentHandler.php(1741): MediaWiki\HookContainer\HookRunner->onContentGetParserOutput()
#14 /var/www/notawiki/w/includes/content/Renderer/ContentRenderer.php(47): ContentHandler->getParserOutput()
#15 /var/www/notawiki/w/includes/Revision/RenderedRevision.php(260): MediaWiki\Content\Renderer\ContentRenderer->getParserOutput()
#16 /var/www/notawiki/w/includes/Revision/RenderedRevision.php(232): MediaWiki\Revision\RenderedRevision->getSlotParserOutputUncached()
#17 /var/www/notawiki/w/includes/Revision/RevisionRenderer.php(227): MediaWiki\Revision\RenderedRevision->getSlotParserOutput()
#18 /var/www/notawiki/w/includes/Revision/RevisionRenderer.php(164): MediaWiki\Revision\RevisionRenderer->combineSlotOutput()
#19 [internal function]: MediaWiki\Revision\RevisionRenderer->MediaWiki\Revision\{closure}()
#20 /var/www/notawiki/w/includes/Revision/RenderedRevision.php(199): call_user_func()
#21 /var/www/notawiki/w/includes/poolcounter/PoolWorkArticleView.php(87): MediaWiki\Revision\RenderedRevision->getRevisionParserOutput()
#22 /var/www/notawiki/w/includes/poolcounter/PoolWorkArticleView.php(68): PoolWorkArticleView->renderRevision()
#23 /var/www/notawiki/w/includes/poolcounter/PoolCounterWork.php(166): PoolWorkArticleView->doWork()
#24 /var/www/notawiki/w/includes/page/ParserOutputAccess.php(299): PoolCounterWork->execute()
#25 /var/www/notawiki/w/includes/page/Article.php(735): MediaWiki\Page\ParserOutputAccess->getParserOutput()
#26 /var/www/notawiki/w/includes/page/Article.php(545): Article->generateContentOutput()
#27 /var/www/notawiki/w/includes/actions/ViewAction.php(78): Article->view()
#28 /var/www/notawiki/w/includes/MediaWiki.php(556): ViewAction->show()
#29 /var/www/notawiki/w/includes/MediaWiki.php(333): MediaWiki->performAction()
#30 /var/www/notawiki/w/includes/MediaWiki.php(923): MediaWiki->performRequest()
#31 /var/www/notawiki/w/includes/MediaWiki.php(576): MediaWiki->main()
#32 /var/www/notawiki/w/index.php(50): MediaWiki->run()
#33 /var/www/notawiki/w/index.php(46): wfIndexMain()
#34 {main}
SecretKey is not present? I swear there’s a match in both the Shellbox config file and LocalSettings.php Fifo F (talk) 18:24, 5 June 2023 (UTC)
I fixed the first two issues, but now I’m getting this. I’m posting it on dpaste because I don’t want to spam walls of text here: *expired*
Here: https://testwiki.fifo-f.eu/wiki/Special:Version Fifo F (talk) 15:44, 7 June 2023 (UTC)

Issue with changing logos on wiki

I'm trying to change a the logo on my wiki. I have the file saved in a directory called Photos which has 777 permission on it. This is the line that is currently in my Localsettings.php file:


$wgLogos = "wgScriptPath/home/carter/Photos/logo.png";


Im not sure what I am doing wrong. Thanks Carter.smith1 (talk) 14:44, 6 June 2023 (UTC)

The image needs to be in a directory served by the webserver (not your home directory unless that is served), it needs to be a url not a filesystem path, and the syntax is $wgLogos = ["1x" => "url here"];
See also manual:$wgLogos Bawolff (talk) 16:56, 6 June 2023 (UTC)

Issue with inserting images on VisualEditor

I'm trying to use the VisualEditor insert tool to upload a new image (instead of using the direct uploads page.) However, when clicking "upload", a red box pops up saying "Invalid response from the server." This is on MediaWiki 1.39.3, VisualEditor 0.1.2.


Checking the logs reveals the following error:

"PHP message: PHP Fatal error:  Declaration of Wikimedia\ParamValidator\Util\UploadedFile::getStream() must be compatible with Psr\Http\Message\UploadedFileInterface::getStream(): Psr\Http\Message\StreamInterface in /var/www/html/w/includes/libs/ParamValidator/Util/UploadedFile.php on line 86"


Uploading via Special:Upload works as expected. Not sure if this is an extension issue or a MW issue. 209.50.140.229 (talk) 15:10, 6 June 2023 (UTC)

I fixed this issue by reinstalling MediaWiki. I'm not sure what happened, but somehow a file must have been corrupt somewhere. 209.50.140.229 (talk) 15:23, 6 June 2023 (UTC)
This is a known bug that can be caused by running composer (there is an error in mediawiki's composer.json file). It will be fixed in the next release of mediawiki, but reinstalling will also fix it. Bawolff (talk) 01:15, 8 June 2023 (UTC)
@Bawolff Do you happen to know the specific error in the composer.json file? I would like to fix it on all of my 1.39.4 LTS wikis since many users have complained that uploading images on pages is not working due to the error described by OP. (I use MsUpload too allow multi-file-uploads) User44868732 (talk) 12:18, 9 August 2023 (UTC)
https://github.com/wikimedia/mediawiki/commit/35cdb41d83c17d56e200824ce56b9d14723586ec Bawolff (talk) 20:15, 9 August 2023 (UTC)
I have added that line of code into my composer.json, but I still get the same error where I can't upload images. The PHP error I get is:
Backend fatal error: PHP Fatal error:  Declaration of Wikimedia\\ParamValidator\\Util\\UploadedFile::getStream() must be compatible with Psr\\Http\\Message\\UploadedFileInterface::getStream(): Psr\\Http\\Message\\StreamInterface in /home/username/public_html/wiki/includes/libs/ParamValidator/Util/UploadedFile.php on line 86\n, referer: https://domain.com/wiki/index.php/Special:FormEdit/Form_name/Page_name
Is this open on phabricator? Just wondering if it's something that needs to be raised.
I have thought if it maybe a PHP8.1 issue? I did try and revert back to PHP 7.4 but I couldn't due to composer dependencies needing PHP 8.1 Squeak24 (talk) 21:05, 12 August 2023 (UTC)
You have to run the command composer update after changing the file.
It shouldn't matter what version of php Bawolff (talk) 22:08, 12 August 2023 (UTC)
Thanks Bawolff, for some reason it was still broken.
After investiagtion it turned out it was the SemanticExtraSpecialProperties was also causing a problem Squeak24 (talk) 20:48, 13 August 2023 (UTC)
This solution fixed the same problem for me. The first step of the semantic installation modified the composer.json and I wound up with an http-message version 2.0 in my composer.lock & Special:Versions but no http-message version in my composer.json. 143.215.230.88 (talk) 20:21, 11 December 2023 (UTC)
Had the same issue on an out of the box fresh install of 1.42.1. composer.json did require psr/http-message 1.1, which I verified in Special:Version on the running site. composer update did not fix this issue on a new 1.42.1 clean installation.
I ended up having to correct the function declarations in includes/libs/ParamValidator/Util/UploadedFile.php to fix the error. I don't personally recommend this as you're editing core installation files, but it's what worked for me so out of brevity I'll include the fixes here for anyone else googling this issue with the note of "Danger, here be dragons" -- you might break something unintended and it's better to wait for a proper patch from MediaWiki themselves:
Line 86 change
public function getStream() {
to
public function getStream(): \Psr\Http\Message\StreamInterface {
Line 96 change
public function moveTo( $targetPath ) {
to
public function moveTo( $targetPath ): void {
Line 121 change
public function getSize() {
to
public function getSize(): null|int {
Line 125 change
public function getError() {
to
public function getError(): int {
Line 129 change
public function getClientFilename() {
to
public function getClientFilename(): null|string {
Line 134 change
public function getClientMediaType()
to
public function getClientMediaType(): null|string 101.191.140.4 (talk) 15:28, 7 August 2024 (UTC)

Upgraded from 1.35.1 to 1.39.3, Infoboxes are breaking pages

I am able to view my wiki, except any page with an infobox - which is most of the pages.

If I edit a page to remove the infobox code it works.

If I put an infobox back in it won't save. When I try to either save or preview with an infobox, or view a page with an infobox I get this same error:

Thanks for any clues


[ZH9Z5iwOJrA44gD5JwVHMwAAAAM] /index.php?title=Karma_(Part_2)&action=submit Error: Class "MWNamespace" not found

Backtrace:

from /home/jfwiki/wiki139/extensions/Scribunto/includes/engines/LuaCommon/SiteLibrary.php(37)

#0 /home/jfwiki/wiki139/extensions/Scribunto/includes/engines/LuaCommon/LuaEngine.php(511): Scribunto_LuaSiteLibrary->register()

#1 /home/jfwiki/wiki139/extensions/Scribunto/includes/engines/LuaCommon/LuaEngine.php(150): Scribunto_LuaEngine->instantiatePHPLibrary(string, string, boolean)

#2 /home/jfwiki/wiki139/extensions/Scribunto/includes/engines/LuaStandalone/LuaStandaloneEngine.php(16): Scribunto_LuaEngine->load()

#3 /home/jfwiki/wiki139/extensions/Scribunto/includes/engines/LuaCommon/LuaEngine.php(223): Scribunto_LuaStandaloneEngine->load()

#4 /home/jfwiki/wiki139/extensions/Scribunto/includes/engines/LuaCommon/LuaModule.php(38): Scribunto_LuaEngine->getInterpreter()

#5 /home/jfwiki/wiki139/extensions/Scribunto/includes/engines/LuaCommon/LuaModule.php(55): Scribunto_LuaModule->getInitChunk()

#6 /home/jfwiki/wiki139/extensions/Scribunto/includes/common/Hooks.php(140): Scribunto_LuaModule->invoke(string, PPTemplateFrame_Hash)

#7 /home/jfwiki/wiki139/includes/parser/Parser.php(3443): ScribuntoHooks::invokeHook(Parser, PPTemplateFrame_Hash, array)

#8 /home/jfwiki/wiki139/includes/parser/Parser.php(3126): Parser->callParserFunction(PPTemplateFrame_Hash, string, array)

#9 /home/jfwiki/wiki139/includes/parser/PPFrame_Hash.php(276): Parser->braceSubstitution(array, PPTemplateFrame_Hash)

#10 /home/jfwiki/wiki139/includes/parser/Parser.php(3317): PPFrame_Hash->expand(PPNode_Hash_Tree)

#11 /home/jfwiki/wiki139/includes/parser/PPFrame_Hash.php(276): Parser->braceSubstitution(array, PPFrame_Hash)

#12 /home/jfwiki/wiki139/includes/parser/Parser.php(2955): PPFrame_Hash->expand(PPNode_Hash_Tree, integer)

#13 /home/jfwiki/wiki139/includes/parser/Parser.php(1610): Parser->replaceVariables(string)

#14 /home/jfwiki/wiki139/includes/parser/Parser.php(724): Parser->internalParse(string)

#15 /home/jfwiki/wiki139/extensions/PageInCat/PageInCat_body.php(281): Parser->parse(string, Title, ParserOptions)

#16 /home/jfwiki/wiki139/includes/HookContainer/HookContainer.php(338): PageInCat::onEditPageGetPreviewContent(EditPage, WikitextContent)

#17 /home/jfwiki/wiki139/includes/HookContainer/HookContainer.php(137): MediaWiki\HookContainer\HookContainer->callLegacyHook(string, array, array, array)

#18 /home/jfwiki/wiki139/includes/HookContainer/HookRunner.php(1537): MediaWiki\HookContainer\HookContainer->run(string, array)

#19 /home/jfwiki/wiki139/includes/EditPage.php(4432): MediaWiki\HookContainer\HookRunner->onEditPageGetPreviewContent(EditPage, WikitextContent)

#20 /home/jfwiki/wiki139/includes/EditPage.php(3143): EditPage->getPreviewText()

#21 /home/jfwiki/wiki139/includes/EditPage.php(778): EditPage->showEditForm()

#22 /home/jfwiki/wiki139/includes/actions/EditAction.php(73): EditPage->edit()

#23 /home/jfwiki/wiki139/includes/actions/SubmitAction.php(38): EditAction->show()

#24 /home/jfwiki/wiki139/includes/MediaWiki.php(542): SubmitAction->show()

#25 /home/jfwiki/wiki139/includes/MediaWiki.php(322): MediaWiki->performAction(Article, Title)

#26 /home/jfwiki/wiki139/includes/MediaWiki.php(904): MediaWiki->performRequest()

#27 /home/jfwiki/wiki139/includes/MediaWiki.php(562): MediaWiki->main()

#28 /home/jfwiki/wiki139/index.php(50): MediaWiki->run()

#29 /home/jfwiki/wiki139/index.php(46): wfIndexMain()

#30 {main} Seaniekaye (talk) 16:18, 6 June 2023 (UTC)

Update your version of scribunto Bawolff (talk) 16:53, 6 June 2023 (UTC)
That was it.
You're amazing, thank you so much. Seaniekaye (talk) 17:09, 6 June 2023 (UTC)

TypeError: Cannot read properties of null (reading 'match')

At this writing, I'm trying to prepare a message at Extension talk:Arrays re: numeric sorting issues. For some unexplained reason, however, the error mentioned in this thread title shows up once said message hits a certain limit--although the source code has no issues to begin with. (Meaning that the text must be typed in on an external editor--wholesale--before pasting it in on the "Visual editing" side. As if that wasn't enough, "Caught exception of type Flow\Exception\DataModelException" is now appearing whenever I try to make a new paragraph here Resolved as of this slight formatting update [7/6].)

To @Bawolff: Any idea what happened here? (I'll paste in the trouble spot once I'm requested to.) --Slgrandson (talk) 21:27, 6 June 2023 (UTC)

I had the same two errors trying to add a message here yesterday. Jonathan3 (talk) 08:10, 8 June 2023 (UTC)
I'm not really a VE person. I would suggest filing a bug in phabricator. Bawolff (talk) 04:31, 6 October 2023 (UTC)
How to report a bug Malyacko (talk) 19:16, 6 October 2023 (UTC)

Notifications

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


I want to bring an notification and approval layer when new pages are created or old pages are edited. there will be user groups say Alpha and Beta. when users from Alpha group create a page or edit an existing page we want Beta group users to be notified of the same with in the interface of MediaWiki, not through Email.

I am on mediawiki-1.39.3 version 14.192.1.54 (talk) 16:47, 7 June 2023 (UTC)

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

Missing toolbar - PHP Fatal error: Call to undefined method

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 just upgraded a 1.16 install to 1.27. There were several issues that I have overcome and the current one is missing toolbar with the edit button etc. I am not a programmer, and the PHP version is 5.6.


Error log has only one line about the skin so far:


PHP Fatal error: Call to undefined method SkinAmorphic::tooltipAndAccesskey()

This refers to line 148 in the skin.php file (based on monobook I believe):

echo $skin->tooltipAndAccesskey( "ca-$key" );

Is there something I can change in that line of code to make it compliant? Lord Muffins (talk) 19:48, 7 June 2023 (UTC)

Maybe upgrading Skin:MonoBook would work. I see it says 1.29+ so you probably need to download an older version. Jonathan3 (talk) 08:07, 8 June 2023 (UTC)
Hey, I ended up fixing my issue! This was a custom skin based on monobook so I couldn't just upgrade.
I had a look at a modern monobook skin to see what it was doing. I learned that 'echo' meant generating something. I learned afterwards that a fatal error means the php script exits at that point.
So it was unable to generate something and stopped there, failing to generate elements further down in the script.
So I decided to delete the following in my skin.php file (line 147, 148, 149):
else {
echo $skin->tooltipAndAccesskey( "ca-$key" );
}
It worked. The next fatal error was line 161 but the edit toolbar was before that, so it generated.
For anyone reading, I will repeat that this is for OLD monobook skin (1.16 specifically) after upgrading mediawiki to 1.27.
I can only assume that the skin was calling for things in the mediawiki code that is changed or moved in some way. No point trying to make an old skin fit.
This is just a personal site, so being janky and broken is fine. Having the edit buttons makes life easier for me. Lord Muffins (talk) 19:38, 8 June 2023 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Upgrading from 1.35.8 to 1.39.x

Between now and September (based on Version lifecycle) I plan to upgrade.

Is there anything I should be aware of apart from the usual things?

I vaguely remember problems with upgrading to early versions of 1.39, people having trouble with the actor table migration, problems skipping some versions etc.

Thanks. Jonathan3 (talk) 08:09, 8 June 2023 (UTC)

Notifications

I want to bring an notification and approval layer when new pages are created or old pages are edited. there will be user groups say Alpha and Beta. when users from Alpha group create a page or edit an existing page we want Beta group users to be notified of the same with in the interface of MediaWiki, not through Email.

I am on mediawiki-1.39.3 version Bpnimmala (talk) 14:10, 8 June 2023 (UTC)

Call to undefined method Postgres onTransactionIdle

I'm getting the following error when I upgrade from 1.35 to 1.37. It seems related to the Semantic MediaWiki plugin. The plugin works just fine in version 1.35


The debug trace

[b3fe91be197ea513080c3e6f] [no req] Error: Call to undefined method Wikimedia\Rdbms\DatabasePostgres::onTransactionIdle() Backtrace: from /home/wiki/htdocs/test_mediawiki/includes/libs/rdbms/database/DBConnRef.php(103) #0 /home/wiki/htdocs/test_mediawiki/extensions/SemanticMediaWiki/src/MediaWiki/Connection/Sequence.php(86): Wikimedia\Rdbms\DBConnRef->__call() #1 /home/wiki/htdocs/test_mediawiki/extensions/SemanticMediaWiki/src/SQLStore/TableBuilder/PostgresTableBuilder.php(488): SMW\MediaWiki\Connection\Sequence->restart() #2 /home/wiki/htdocs/test_mediawiki/extensions/SemanticMediaWiki/src/SQLStore/TableBuilder/PostgresTableBuilder.php(474): SMW\SQLStore\TableBuilder\PostgresTableBuilder->doCheckOnPostCreation() #3 /home/wiki/htdocs/test_mediawiki/extensions/SemanticMediaWiki/src/SQLStore/TableBuilder/TableBuildExaminer.php(171): SMW\SQLStore\TableBuilder\PostgresTableBuilder->checkOn() #4 /home/wiki/htdocs/test_mediawiki/extensions/SemanticMediaWiki/src/SQLStore/Installer.php(239): SMW\SQLStore\TableBuilder\TableBuildExaminer->checkOnPostCreation() #5 /home/wiki/htdocs/test_mediawiki/extensions/SemanticMediaWiki/src/SQLStore/SQLStore.php(452): SMW\SQLStore\Installer->install() #6 /home/wiki/htdocs/test_mediawiki/extensions/SemanticMediaWiki/src/Store.php(488): SMW\SQLStore\SQLStore->setup() #7 /home/wiki/htdocs/test_mediawiki/includes/installer/DatabaseUpdater.php(547): SMW\Store::setupStore() #8 /home/wiki/htdocs/test_mediawiki/includes/installer/DatabaseUpdater.php(515): DatabaseUpdater->runUpdates() #9 /home/wiki/htdocs/test_mediawiki/maintenance/update.php(202): DatabaseUpdater->doUpdates() #10 /home/wiki/htdocs/test_mediawiki/maintenance/includes/MaintenanceRunner.php(309): UpdateMediaWiki->execute() #11 /home/wiki/htdocs/test_mediawiki/maintenance/doMaintenance.php(85): MediaWiki\Maintenance\MaintenanceRunner->run() #12 /home/wiki/htdocs/test_mediawiki/maintenance/update.php(312): require_once(string) #13 {main} Jeffryjohar (talk) 16:21, 8 June 2023 (UTC)

Please do not post this in lots of places. This has been answered in https://phabricator.wikimedia.org/T338490 Malyacko (talk) 09:58, 9 June 2023 (UTC)

search error message

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 do a search in wikimedia, I receive the following error message - An error has occurred while searching: We could not complete your search due to a temporary problem. Please try again later. Surrat48 (talk) 20:46, 8 June 2023 (UTC)

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

Can someone fix this typo please?

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


https://bulbapedia.bulbagarden.net/wiki/List_of_moves_(Masters)#See_also


ctrl f "Fun Times!"

In the box it says "Grbutty Terrain" and it should say "Grassy Terrain"


Thank you! 2600:1700:8661:BE40:79A3:64AF:C790:2F58 (talk) 14:55, 9 June 2023 (UTC)

Done. In the future, please ask on their forums, Discord, or create an account and fix it yourself. Ciencia Al Poder (talk) 17:00, 9 June 2023 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Display issue of some page contenent after upgrade MW from 1.28 to 1.35

Hello everyone


I succeded to upgrade my MW from 1.28 to 1.35, but I have some issue in displaying some contenent pages such as :

in my wikitexte (page contenent) i using the balise <properties> </properties> , this balise is well intrepreted/formatted in MW 1.28 but not in MW 1.35 and MW display this balise in place to format it.

Does i miss to configure or update some thing in MW 1.35 to support using <properties> </properties> in my page contenent ?

does it a CSS, HTML or PHP issue ?


the contenent of my page is  : "

<properties>

NAME=XXX

USERNAME=YYYY

DATE=JJMMAAAA

Projet=TEST

</properties>

"


any help please Raoufgui (talk) 17:10, 9 June 2023 (UTC)

You are probably missing a MediaWiki extension. Bawolff (talk) 08:51, 10 June 2023 (UTC)
@Bawolff Thanks for your reply i have only the" PropertyTable2" extension is not installed in MW v1.35 i dont found it and any other aletrnative
whene i inspect the source code of the too page (v1.28 and 1.35) is not the same
How can i please modify directly the source code of my pages how can i found where may php pages are saved in my MW folder ?
Thanks Raoufgui (talk) 18:10, 11 June 2023 (UTC)
<properties> is part of the Extension:PropertyTable2. If you do not have the extension, you can not use the <properties> tag and have to replace it with tables or something else.
Pages are not saved in the mediawiki folder. If you need to modify the page source, you should do it from the web interface. If you need to do it from the command line consider edit.php. If you want to make bulk edits, consider extension:ReplaceText. Bawolff (talk) 02:51, 16 July 2023 (UTC)

CSS dont work with JS

idk why but when i wanna make something with css in the code section where js is already running its dont work,

JS

mw.loader.using('jquery');

$(document).ready(function() { $('.scenario-subsection h3').click(function() { var content = $(this).next('.scenario-subsection-content'); content.slideToggle(); }); });

CSS

.scenario-section { margin-bottom: 2em; border: 1px solid #cccccc; padding: 1em; border-radius: 5px; background-color: #000000; color: #FFFFFF ; }


.scenario-subsection h3 { cursor: pointer; font-weight: bold; font-family:"Oswald"; color: #FFFFFF }

.scenario-content .scenario-subsection-content { display: none; background-color: #000000; color: #FFFFFF; }

.scenario-subsection.active .scenario-subsection-content { display: block; background-color: #000000; }

HTML

Сценарий "Аварийная посадка"

Базовые ресурсы сценария

               Поселенцы 3ед.


               Случайное животное 1ед.


               Компонент 30ед.


               Сталь 1170ед.


               Древесина 300ед.


               Медь 200ед.


               Свинец 100ед.


               Алюминий 160ед.


               Серебро 800ед.


               Сухой паёк 57ед.


               Медикаменты 30ед.


               Винтовка Ли-Энфилд 1ед.


               Патроны .303 (ОП) 100ед.


               Револьвер 1ед.


               Патроны .44 60ед.


               Бронежилет 1ед.


               Бронештаны 1ед.


               Бронешлем из пластали 1ед.


               Нож 1ед.


               обломок корабля 3ед.

Особенности

               -

Технологии сценария

Технологии сценария "Аварийная посадка"
Племенные Средневековые Индустриальные
Techno1 Techno2 Techno3

178.138.33.246 (talk) 23:30, 9 June 2023 (UTC)

<div class="scenario-section"
<h2Сценарий "Аварийная посадка"</h2
<div class="scenario-content"
<div class="scenario-subsection"
<h3Базовые ресурсы сценария</h3
<div class="scenario-subsection-content"
fdsfs
i cant make css changes in scenario-subsection-content , i change in the code, but mediawiki dont give me any changes on my wiki 178.138.33.246 (talk) 23:32, 9 June 2023 (UTC)

executable permissions

how do i give executable permissions? Cocopuff2018 (talk) 12:55, 10 June 2023 (UTC)

With chmod Bawolff (talk) 02:14, 11 June 2023 (UTC)

difference in the numbre of articles between the old and new MW (after upgrade)

Hello

my old version of my MW V1.28 (actually in use , prod environment) show a tolal of 16 564 articles

i upgrade my MW to V 1.35 ( not in use, test environment) it show only 15 989 articles

why i don' have the same number of articles found by MW ?

does this diffrence comes from not recent database and images folder used in the V1.35 and should i restore a more recent backup of database and image folder of my MW ?


does it a problem of reindexing my new MW ?


how can i proceed please to resolve the issue ? Raoufgui (talk) 18:27, 11 June 2023 (UTC)

Sometimes those counts can become inaccurate. Run manual:updateArticleCount.php
Just because they are different does not mean you lost articles or anything. Bawolff (talk) 09:36, 15 June 2023 (UTC)
@Bawolff thank you very much Raoufgui (talk) 16:38, 15 June 2023 (UTC)

I hope this is the correct area to post this! As per the title, the footer link for the 'Mobile view' link is no longer being displayed in English language text - and this seems to be happening on all WMF wiki sites from a variety of different WMF projects. I am no expert on languages, but it looks like it is displaying in one of the Indian languages - possibly Hindi.

Can an expert please look into this issue, and advise accordingly? Best. Militum professio scriniarii (talk) 23:19, 11 June 2023 (UTC)

Correction - it is displaying in Punjabi - ਮੋਬਾਈਲੀ ਦਿੱਖ - that is what I am seeing. Militum professio scriniarii (talk) 23:22, 11 June 2023 (UTC)
Hi, this is the support desk for the MediaWiki software. For issues on Wikimedia sites, please use https://meta.wikimedia.org/wiki/Tech. Note that some issues were reverted in https://github.com/wikimedia/mediawiki-extensions-MobileFrontend/commit/1d15c214e36c9a6e02b91f3732fc18f8bbb994b8 Malyacko (talk) 13:12, 12 June 2023 (UTC)
Thank you for your advice. Militum professio scriniarii (talk) 13:53, 12 June 2023 (UTC)
Yes - I have this problem too.
It is a compound issue: when I visit other sites (eg MediaWiki, Wikipedia) the toggle link is also displayed in Punjabi. Also within the pages themselves, I see some words in Punjabi, but also in Russian, etc.
Wondering if it might be related to using http rather than https? GrayanOne (talk) 14:04, 12 June 2023 (UTC)
I always use https.
A further update: when using mobile view, the footer links for 'Privacy policy' and 'Disclaimers' are being displayed in punjabi - so a sort of inverse of desktop view! Militum professio scriniarii (talk) 12:23, 13 June 2023 (UTC)
@Malyacko, apologies for adding to this, I hadn't seen your reply. GrayanOne (talk) 14:07, 12 June 2023 (UTC)

Download as PDF

Hello,

In the right Tools column on this site there is an option "Download as PDF". Which extension is used to do that? I Have looked as a few and have not found what that seems to be.

Thanks, in advance!

Paul. Paul.parisi (talk) 18:56, 12 June 2023 (UTC)

that would be Extension:ElectronPdfService Taavi (talk!) 08:09, 14 June 2023 (UTC)

Hallo,

There's a weird issue with the login link on any-page top right. Clicking on it always results in the error msg above on the page itself, plus an error in /var/log/messages.

[date] <host> /usr/libexec/gdm-x-session[4050]: [4045:4045:0612/213915.860793: ERROR:page_load_metrics_update_dispatcher.cc(178)] Invalid first_paint 8.534 s for first_image_paint 1.923 s

and another one in /var/log/httpd/mediawiki_error.log

[date] [proxy_fcgi:error] [pid 66347:tid 66380] [client 127.0.0.1:54816] AH01071: Got error 'Primary script unknown', referer: .../wiki/Main_Page (but any pagename)

The first error looks like a binary Chrome/Chrome Driver mismatch. but I don't think it is, because it doesn't get triggered by any of my other four non-mediawiki plain ole php sites, all of which also use php-fpm.

The second error looks like a php-fpm (perms?) issue. I've checked all the obvious stuff eg. /cache/ perms, etc etc.

I made two Logout links on the sidebar, neither of which trigger an HTTP 404, but DO trigger both the above error messages.

http://my-wiki.local/mediawiki/index.php?title=Special:UserLogout&returnto={{FULLPAGENAME}}|Logout 1
http://my-wiki.local/mediawiki/index.php?title=Special:UserLogout&returnto={{FULLPAGENAMEE}}|Logout 2

I then delved into the bowels of SkinTemplate.php, Skin.php, SpecialPage.php, ServiceContainer.php, MediaWikiServices.php, but tons of debug statements have produced zero solutions.

If anyone has any ideas, I would really appreciate it.

Kernel: Linux 6.2.15-200.fc37.x86_64
Fedora Linux 37 (Workstation Ed)
MediaWiki 1.39.3
MariaDB Ver 15.1 Distrib 10.5.19-MariaDB
PHP 8.1.19 (cli) (built: May 10 2023 13:43:03)
Zend Engine v4.1.19 w/Zend OPcache v8.1.19

GrayanOne (talk) 20:46, 12 June 2023 (UTC)

Enable to activate HeaderFooter extension on MW 1.39

Hello

i upgrade my MW from 1.35 to 1.39

i install HeaderFooter extension using this doc Extension:Header Footer

whene i run the update script i get this message "This version of the HeaderFooter extension requires MediaWiki 1.25+"

what can i do please my actual version is 1.39 > 1.25 ?

Thanks Raoufgui (talk) 13:54, 13 June 2023 (UTC)

Make sure you use wfLoadExtension( 'HeaderFooter') instead of including HeaderFooter.php from your LocalSettings.php. All extensions and skins should be enabled with wfLoadExtension and wfLoadSkin nowadays. —TheDJ (Not WMF) (talkcontribs) 14:47, 13 June 2023 (UTC)
@TheDJ thanks for your reply, i already used wfLoadExtension( 'HeaderFooter') when i got the message "This version of the HeaderFooter extension requires MediaWiki 1.25+" Raoufgui (talk) 20:48, 13 June 2023 (UTC)

Im stuck on the Apache test Page when setting up Wiki

Im trying to set up a a wiki using Cent OS 9. Ive followed this tutorial(Manual:Running MediaWiki on Red Hat Linux) but when I put the servers IP into a search bar I only see the test page not the Mediawiki flower with "Please set up the wiki first". I downloaded the tar file from the mediawiki website. I untarred it and moved it to /var/www/html/mediawiki-1.39.3. I went into the /etc/httpd/conf/httpd.conf file and changed it. Here is a ss of what is in the file now:


DocumentRoot "/var/www/html/mediawiki-1.39.3"

#

# Relax access to content within /var/www.

#

<Directory "/var/www">

    AllowOverride None

    # Allow open access:

    Require all granted

</Directory>

# Further relax access to the default document root:

<Directory "/var/www/html">


I don't know why but its as if Apache can not find the mediawiki file: Currently on my wiki it asks if I am the administrator to add your website content to the directory /var/www/html/. I dont know what I am doing wrong. Thanks for the help in advance. Carter.smith1 (talk) 19:48, 13 June 2023 (UTC)

Your virtual host looks a little short-changed. I'm on Fedora 37; here's what mine looks like. Note MW_INSTALL_PATH is set because I've put mediawiki-1.39.3 in a not-usual place; most people shouldn't have to do that. And if you want https, then you will have to tinker with port 443 as well, see the apache docs.
<VirtualHost *:80>
  ServerName my-wiki.local
  DocumentRoot "/path/to/my-wiki.org"
  SetEnv MW_INSTALL_PATH "/path/to/my-wiki.org/mediawiki"
  Alias /wiki /path/to/my-wiki.org/mediawiki/index.php
  RewriteEngine on
  RedirectMatch ^/$ /wiki/
  <Directory "/path/to/my-wiki.org">
    Options -Indexes +FollowSymLinks +Includes +MultiViews
    AllowOverride None
    Require all granted
  </Directory>
  ErrorLog /var/log/httpd/mediawiki_error.log
</VirtualHost> GrayanOne (talk) 08:13, 15 June 2023 (UTC)

Where are user IP addresses logged when editing etc?

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.


Ryn78 (talk) 22:50, 13 June 2023 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Is AD integration is working fine in MediaWiki 1.39.1?

Hi All,

Can anyone please confirm AD integration is working fine in MediaWiki 1.39.1? Anisharosethomas (talk) 09:50, 14 June 2023 (UTC)

Close 2 group among 9 in randomization

Hi, I have 9 random group, and I would like to close only 2 of them (Group 4 and 8). For now, the code is {rand(1,9)}. What do i need to write for this to work ?


Thanks ! 2A01:CB1C:E1B:BA00:F5C2:DE78:AC64:9131 (talk) 13:07, 14 June 2023 (UTC)

This seems offtopic to the support desk. Mediawiki questions only. Bawolff (talk) 09:33, 15 June 2023 (UTC)

Hello everyone,

I want to create a link on a page in my wiki to a folder on my server. I am using a mac.

The external link is not suitable for this I think and the UNC link only works for windows if I am not mistaken.

Can anyone help me with this issue?

Thank you! JanixGanix (talk) 13:10, 14 June 2023 (UTC)

Get a PopupButtonWidget used in an OOUI form

Hello,

I have the following lines of JS code in a gadget that I'm currently writing:

var myInput = new OO.ui.NumberInputWidget( {
	max: 60,
	min: 1
} );

var myLabel = new OO.ui.LabelWidget( {
	input: myInput,
	label: 'Number of days to look for'
} );

var myField = new OO.ui.FieldLayout( myInput, {
	align: 'top',
	help: 'Value must be an integer between 1 and 60.',
	label: myLabel.$element
} );

var myFieldset = new OO.ui.FieldsetLayout( {
	items: [ myField ]
} );

ProcessDialog.$body.append( myFieldset.$element );

I want to modify the icon of the help button, and for that I need to access the setIcon() method of the OO.ui.PopupButtonWidget object. I need access to the relevant widget itself, including all of its properties and methods, i.e. something like the OO.ui.infuse() function (which unfortunately only works with widgets created by PHP, not those created by user scripts and gadgets).

TL;DR: How can I get the OO.ui.PopupButtonWidget object that produces the popup with the help text (the text in line 13 at the above code)?

Thanks, Guycn2 (talk) 20:05, 14 June 2023 (UTC)

Where is addToDatabase() ?

I've been looking through AuthManager.php which contains function calls to addToDatabase(), but I can't figure out where the code for that function is (there's no reference to any file unlike all the other function calls I've come across in MediaWiki, and no includes, nor is the function located in AuthManager). This would seem to be the crucial function that adds a new user to the db, but where is this function located in the files? Thank you for any help. 2600:6C46:637F:A801:A96F:6BDD:4BF5:B3F2 (talk) 23:31, 14 June 2023 (UTC)

Is https://github.com/wikimedia/mediawiki/blob/master/includes/user/User.php#L2755 what you are looking for? Bawolff (talk) 09:25, 15 June 2023 (UTC)
Thank you, that's the function I was looking for. I also can't figure out at which points the user's IP address is logged: is that done only when a user makes an edit to the wiki, or is it also when signing up for the first time, logging in again, etc? 2600:6C46:637F:A801:A96F:6BDD:4BF5:B3F2 (talk) 20:41, 5 September 2023 (UTC)
depends on what type of logging is enabled (is checkuser installed, is debug logging enabled, $wgPutIPinRC, webserver level access logs, etc)
As a general rule - always logged when user not logged in makes an edit. In common configurations also logged when anyone makes an edit, or when someone logs in. Typically the webserver is separately configured to log ips on every access. Bawolff (talk) 22:26, 5 September 2023 (UTC)
Thank you. When the IP is logged, is it ever saved permanently or only for the usual three months or whatever the current setting is? 2600:6C46:637F:A801:A96F:6BDD:4BF5:B3F2 (talk) 22:46, 6 September 2023 (UTC)
Checkuser typically stores for 3 months, but there is a script you are supposed to run to ensure it gets deleted in the appropriate time frame. Bawolff (talk) 23:04, 6 September 2023 (UTC)

==

 tag in Template causes mayhem ==

I'm trying to make a small template which will take some markup, and product side-by-side output, with one side showing the markup, and the other showing the parsed result.

BUT I cannot get the template to play nicely with any of:

* <code><nowiki><pre>{{{1}}}

</nowiki>

  • <includeonly><pre></includeonly>{{{1}}}<includeonly></pre></includeonly>
  • <nowiki> tags don't work either
  • {{#tag|pre|{{{1}}}}}
  • plus tons more

I've messed about for hours, without success. I can wrap the text externally before making the template call, but that defeats one of the objects of the exercise, which is to eliminate duplicating the input text.

I feel certain there is a trivial solution to this, but I can't seem to discover what that is.

This works:

{{my-tpl

|<pre><Text is <b>wonderful</b>,<ref name="note" /> text is <i>nice</i>.</pre>

|Text is wonderful,[1] text is nice.}}

Which leads me to think that latency is the issue, ie what gets processed when. The includeonly tags should take care of that, but they don't.

GrayanOne (talk) 08:02, 15 June 2023 (UTC)

Generally not possible to have unparsed template parameters.
You can include templates unparsed via {{msgnw:
See also https://phabricator.wikimedia.org/T322513 Bawolff (talk) 09:31, 15 June 2023 (UTC)
Thank you for replying.
The thing that confuses me is that I'm passing <pre>...</pre> to the template as part of the chunk of text (see above), and the parser is quite happy to process it. But if I try to use the pre tag within the template itself, it barfs. I don't understand this.
I don't want to include the whole template unparsed; I just want to be able to use the pre tag inside the template, so it wraps the text I'm passing in.
I did do some tinkering with {{msgnw:}} but I don't really understand what I'm doing with it (not a lot of docs out there wrt my use case) and all variations I tried failed. GrayanOne (talk) 10:05, 15 June 2023 (UTC)
Pre is like a nowiki tag. If you pass the whole thing its fine and doesn't interpret anything, but you cant pass a parameter inside it as it also prevents interpreting parameters. Bawolff (talk) 10:54, 15 June 2023 (UTC)
Thanks for your input, but how incredibly frustrating.
Unwilling to accept defeat, I tried using #replace to deal with tricky entities eg "<" and friends, and wrote some css to emulate the pre tag.
Suffice to say it didn't work well. I've wasted enough time on this. Grr. GrayanOne (talk) 12:39, 15 June 2023 (UTC)

issue whene using SSO against Azure AD with PluggableAuth and openid connect

Hello

i implement a SSO in my MW 1.39 against Azure AD

all thing work fine whene i click the login button i am redirect to microsoft interface tu use email to authentificate


But whene i click on mail i get this message :


"Désolé, nous rencontrons des problèmes pour vous connecter.

AADSTS900971: No reply address provided."


i configure my redirect URI in Azure AD like this :


"https://myserever/index.php/Special:PluggableAuthLogin"


NB : NO ssl on my MW but i don't think that the problem come frome certificate ssl


which the right Redirect URI should i put  ? does i miss configuration of a plugin in my MW OR in AZURE AD side ?


Thanks Raoufgui (talk) 16:35, 15 June 2023 (UTC)

Problems in using Extension AccessControl

Hello, I try to use extension access control. I put in the following code to LocalSettings.php in the end:


wfLoadExtension( 'AccessControl' );

$wgAccessControlRestrictions[] = [

    'group' => '*', // Every user

    'read' => '*', // not allowed to read

    'title' => 'Aussensicht', // Title of the blocked page

    'restriction' => 'admin', // "admin" can read page "Aussensicht"

];


Unfortunately, it doesn't work. I still can see the blocked page as everyone. Can you give me an advice? 84.75.196.69 (talk) 21:10, 15 June 2023 (UTC)

I don't understand what you are trying to say. Is there something else I have to add in my configuration? 84.75.196.69 (talk) 05:32, 16 June 2023 (UTC)

[c510ded8c5d44065c6b4aff4] 2023-06-16 04:35:37: Fataler Ausnahmefehler des Typs „Wikimedia\Rdbms\DBQueryError“

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


I get this error on all pages:


[c510ded8c5d44065c6b4aff4] 2023-06-16 04:35:37: Fataler Ausnahmefehler des Typs „Wikimedia\Rdbms\DBQueryError“ PKFP (talk) 04:37, 16 June 2023 (UTC)

Can anyone help, please?
Thanks! PKFP (talk) 08:10, 18 June 2023 (UTC)
Please set $wgShowExceptionDetails=true; and report the more detailed error message. Bawolff (talk) 12:47, 18 June 2023 (UTC)
[c83b87c5108f183bfdcc179a] /mediawiki/index.php?title=Spezial:Wiederherstellen&target=Main_Page Wikimedia\Rdbms\DBQueryError: A database query error has occurred. Did you forget to run your application's database schema updater after upgrading or after adding a new extension?
Please see https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Upgrading and https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:How_to_debug for more information.
Error 1: no such table: linktarget
Function: MediaWiki\Linker\LinkTargetStore::getLinkTargetIdFromCache
Query: SELECT lt_id,lt_namespace,lt_title FROM "linktarget" WHERE lt_namespace = 0 AND lt_title = 'Main_Page' LIMIT 1
Backtrace:
from /usr/share/mediawiki/includes/libs/rdbms/database/Database.php(1618)
#0 /usr/share/mediawiki/includes/libs/rdbms/database/Database.php(1602): Wikimedia\Rdbms\Database->getQueryException()
#1 /usr/share/mediawiki/includes/libs/rdbms/database/Database.php(1576): Wikimedia\Rdbms\Database->getQueryExceptionAndLog()
#2 /usr/share/mediawiki/includes/libs/rdbms/database/Database.php(952): Wikimedia\Rdbms\Database->reportQueryError()
#3 /usr/share/mediawiki/includes/libs/rdbms/database/Database.php(1711): Wikimedia\Rdbms\Database->query()
#4 /usr/share/mediawiki/includes/libs/rdbms/database/Database.php(1720): Wikimedia\Rdbms\Database->select()
#5 /usr/share/mediawiki/includes/libs/rdbms/database/DBConnRef.php(103): Wikimedia\Rdbms\Database->selectRow()
#6 /usr/share/mediawiki/includes/libs/rdbms/database/DBConnRef.php(344): Wikimedia\Rdbms\DBConnRef->__call()
#7 /usr/share/mediawiki/includes/linker/LinkTargetStore.php(257): Wikimedia\Rdbms\DBConnRef->selectRow()
#8 /usr/share/mediawiki/includes/libs/objectcache/wancache/WANObjectCache.php(1688): MediaWiki\Linker\LinkTargetStore->MediaWiki\Linker\{closure}()
#9 /usr/share/mediawiki/includes/libs/objectcache/wancache/WANObjectCache.php(1522): WANObjectCache->fetchOrRegenerate()
#10 /usr/share/mediawiki/includes/linker/LinkTargetStore.php(250): WANObjectCache->getWithSetCallback()
#11 /usr/share/mediawiki/includes/libs/objectcache/BagOStuff.php(216): MediaWiki\Linker\LinkTargetStore->MediaWiki\Linker\{closure}()
#12 /usr/share/mediawiki/includes/linker/LinkTargetStore.php(243): BagOStuff->getWithSetCallback()
#13 /usr/share/mediawiki/includes/linker/LinkTargetStore.php(126): MediaWiki\Linker\LinkTargetStore->getLinkTargetIdFromCache()
#14 /usr/share/mediawiki/includes/linker/LinksMigration.php(74): MediaWiki\Linker\LinkTargetStore->getLinkTargetId()
#15 /usr/share/mediawiki/includes/Permissions/RestrictionStore.php(590): MediaWiki\Linker\LinksMigration->getLinksConditions()
#16 /usr/share/mediawiki/includes/Permissions/RestrictionStore.php(557): MediaWiki\Permissions\RestrictionStore->getCascadeProtectionSourcesInternal()
#17 /usr/share/mediawiki/includes/Permissions/PermissionManager.php(1089): MediaWiki\Permissions\RestrictionStore->getCascadeProtectionSources()
#18 /usr/share/mediawiki/includes/Permissions/PermissionManager.php(538): MediaWiki\Permissions\PermissionManager->checkCascadingSourcesRestrictions()
#19 /usr/share/mediawiki/includes/Permissions/PermissionManager.php(299): MediaWiki\Permissions\PermissionManager->getPermissionErrorsInternal()
#20 /usr/share/mediawiki/includes/specials/SpecialUndelete.php(254): MediaWiki\Permissions\PermissionManager->userCan()
#21 /usr/share/mediawiki/includes/specials/SpecialUndelete.php(209): SpecialUndelete->isAllowed()
#22 /usr/share/mediawiki/includes/specials/SpecialUndelete.php(301): SpecialUndelete->loadRequest()
#23 /usr/share/mediawiki/includes/specialpage/SpecialPage.php(701): SpecialUndelete->execute()
#24 /usr/share/mediawiki/includes/specialpage/SpecialPageFactory.php(1428): SpecialPage->run()
#25 /usr/share/mediawiki/includes/MediaWiki.php(316): MediaWiki\SpecialPage\SpecialPageFactory->executePath()
#26 /usr/share/mediawiki/includes/MediaWiki.php(904): MediaWiki->performRequest()
#27 /usr/share/mediawiki/includes/MediaWiki.php(562): MediaWiki->main()
#28 /usr/share/mediawiki/index.php(50): MediaWiki->run()
#29 /usr/share/mediawiki/index.php(46): wfIndexMain()
#30 {main} PKFP (talk) 13:11, 18 June 2023 (UTC)
Okay I ran php update.php in the maintenance folder and now it all works again. Thanks! PKFP (talk) 13:31, 18 June 2023 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

LDAPProvider 2.0.0 - error when signing using LDAP

Hello, I would like to ask for some advice with authentication to our LDAP server. I've been struggling with this problem for a couple of days, but without success.

Our current environment:

MediaWiki 1.39.3 PHP 8.1.20 (apache2handler) MariaDB 10.3.39-MariaDB-0+deb10u1 ICU 65.1


LDAPAuthentication2 2.0.0 (125b09a) 14. 6. 2023, 15:16 LDAPGroups 2.0.0 (590afec) 14. 6. 2023, 12:00 LDAPProvider 2.0.0 (12bd838) 14. 6. 2023, 11:57 LDAPUserInfo 2.0.0 (01a4b9e) 14. 6. 2023, 12:03 PluggableAuth 7.0.0 (068be5d) 13. 6. 2023, 07:53


My ldap.json is followning:


"cca.cz": {

"connection": {

"server": "xxx.cca.cz",

"port": "636",

"user": "cn = ldapbrowse,cn=users,dc=cca,dc=cz",

"pass": "<password>",

"enctype": "ssl",

"options": {

"LDAP_OPT_DEREF": 1

},

"basedn": "dc=cca,dc=cz",

"userbasedn": "ou=uzivatele,ou=cca group bez kit,dc=cca,dc=cz",

"searchattribute": "samaccountname",

"usernameattribute": "samaccountname",

"realnameattribute": "cn",

"emailattribute": "mail",

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

},

"userinfo": [],

"authorization": []


My LocalSettings.php - only LDAP part:

// Private Wiki. External LDAP login. Default NS requires login.
$wgEmailConfirmToEdit = false;
$wgGroupPermissions['*']['edit'] = false;
$wgGroupPermissions['*']['read'] = false;
$wgGroupPermissions['*']['createaccount'] = true;
$wgGroupPermissions['sysop']['createaccount'] = false;
$wgGroupPermissions['*']['autocreateaccount'] = true;
$wgBlockDisablesLogin = true;</code>


// Load LDAP Config from JSON
$ldapJsonFile = "/var/www/mediawiki/ldap.json";
$ldapConfig = false;
if (is_file($ldapJsonFile) && is_dir("$IP/extensions/LDAPProvider")) {
  $testJson = @json_decode(file_get_contents($ldapJsonFile),true);
  if (is_array($testJson)) {
    $ldapConfig = true;
  } else {
    error_log("Found invalid JSON in file: $IP/ldap.json");
  }
}


$wgShowExceptionDetails = true;
$wgShowExceptionDetails = true;

$wgDebugToolbar = true;

$wgShowDebug = true;

$wgDevelopmentWarnings = false;

$wgDebugDumpSql = false;


//$wgShowSQLErrors = true;

$wgShowDBErrorBacktrace = false;

$wgPluggableAuth_EnableAutoLogin = false;

$wgPluggableAuth_EnableLocalLogin = true;

$wgPluggableAuth_EnableLocalProperties = false;

$wgPluggableAuth_ExtraLoginFields=[];

$wgPluggableAuth_Class = "MediaWiki\\Extension\\LDAPAuthentication2\\PluggableAuth";

$wgPluggableAuth_ButtonLabel = "Log In";

$LDAPAuthentication2AllowLocalLogin=true;

$LDAPAuthentication2UsernameNormalizer= 'strtolower';

$wgPluggableAuth_Config['Log In (cca.cz)'] = [

    'plugin' => 'LDAPAuthentication2',

    'data' => [

        'domain' => 'cca.cz'

    ]

];

// Activate Extension
if ( $ldapConfig ) {

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

## wfLoadExtension( 'LDAPAuthorization' );

  wfLoadExtension( 'LDAPUserInfo' );
  wfLoadExtension( 'LDAPGroups' );

  $LDAPProviderDomainConfigs = $ldapJsonFile;


# $LDAPProviderDefaultDomain = "cca.cz";


When I run CheckLogin.php (php CheckLogin.php --username sir --domain=cca.cz) everything is correct - script returns OK.

But I'm getting this error message in Debug log:

[7f2a04eeb8d13e57884c4309] /index.php/Hlavn%C3%AD_strana TypeError: HashConfig::__construct(): Argument #1 ($settings) must be of type array, null given, called in /var/www/mediawiki/extensions/LDAPProvider/src/DomainConfigFactory.php on line 76
Backtrace:
from /var/www/mediawiki/includes/config/HashConfig.php(49)

# 0 /var/www/mediawiki/extensions/LDAPProvider/src/DomainConfigFactory.php(76): HashConfig->__construct()
# 1 /var/www/mediawiki/extensions/LDAPProvider/src/Hook/UserLoadAfterLoadFromSession.php(154): MediaWiki\Extension\LDAPProvider\DomainConfigFactory->factory()
# 2 /var/www/mediawiki/extensions/LDAPProvider/src/Hook/UserLoadAfterLoadFromSession.php(102): MediaWiki\Extension\LDAPProvider\Hook\UserLoadAfterLoadFromSession->setSuitableDomainConfig()
# 3 /var/www/mediawiki/extensions/LDAPProvider/src/Hook/UserLoadAfterLoadFromSession.php(90): MediaWiki\Extension\LDAPProvider\Hook\UserLoadAfterLoadFromSession->process()
# 4 /var/www/mediawiki/includes/HookContainer/HookContainer.php(338): MediaWiki\Extension\LDAPProvider\Hook\UserLoadAfterLoadFromSession::callback()
# 5 /var/www/mediawiki/includes/HookContainer/HookContainer.php(137): MediaWiki\HookContainer\HookContainer->callLegacyHook()
# 6 /var/www/mediawiki/includes/HookContainer/HookRunner.php(4252): MediaWiki\HookContainer\HookContainer->run()
# 7 /var/www/mediawiki/includes/user/User.php(442): MediaWiki\HookContainer\HookRunner->onUserLoadAfterLoadFromSession()
# 8 /var/www/mediawiki/includes/user/User.php(1658): User->load()
# 9 /var/www/mediawiki/includes/user/User.php(2310): User->getId()
# 10 /var/www/mediawiki/includes/Permissions/PermissionManager.php(1549): User->isRegistered()
# 11 /var/www/mediawiki/includes/Permissions/PermissionManager.php(1477): MediaWiki\Permissions\PermissionManager->getRightsCacheKey()
# 12 /var/www/mediawiki/includes/Permissions/PermissionManager.php(1432): MediaWiki\Permissions\PermissionManager->getUserPermissions()
# 13 /var/www/mediawiki/includes/Permissions/PermissionManager.php(656): MediaWiki\Permissions\PermissionManager->userHasRight()
# 14 /var/www/mediawiki/includes/Permissions/PermissionManager.php(538): MediaWiki\Permissions\PermissionManager->checkReadPermissions()
# 15 /var/www/mediawiki/includes/Permissions/PermissionManager.php(345): MediaWiki\Permissions\PermissionManager->getPermissionErrorsInternal()
# 16 /var/www/mediawiki/includes/Permissions/UserAuthority.php(259): MediaWiki\Permissions\PermissionManager->getPermissionErrors()
# 17 /var/www/mediawiki/includes/Permissions/UserAuthority.php(205): MediaWiki\Permissions\UserAuthority->internalCan()
# 18 /var/www/mediawiki/includes/user/User.php(3494): MediaWiki\Permissions\UserAuthority->authorizeRead()
# 19 /var/www/mediawiki/includes/MediaWiki.php(227): User->authorizeRead()
# 20 /var/www/mediawiki/includes/MediaWiki.php(904): MediaWiki->performRequest()
# 21 /var/www/mediawiki/includes/MediaWiki.php(562): MediaWiki->main()
# 22 /var/www/mediawiki/index.php(50): MediaWiki->run()
# 23 /var/www/mediawiki/index.php(46): wfIndexMain()
# 24 {main}

Signing with local account works well.

I would be very glad for any help.

Thanks a lot Milan Široký Stp-cca (talk) 10:57, 16 June 2023 (UTC)

Hello Milan Široký,
I tried out your configuration locally and found the problem.
You need to add "groupsync": [] in your domain configuration. It'll look like that:
 "userinfo": [],
 "authorization": [],
 "groupsync": []
Please try that fix and tell me if it works.
Also I would be grateful if next time you'll wrap in the "code" markup all PHP code (instead of wrapping separate lines) to make it more readable. Also error backtrace could be wrapped in the "code" markup as well.
If formatting went not as you expected from the first try, you can always fix it by editing your comment.
Thank you in advance! AKulbii (talk) 13:34, 19 June 2023 (UTC)
Hello Akulbii,
you are right. That was the problem.
Thaks a lot,
Milan Stp-cca (talk) 05:37, 20 June 2023 (UTC)
Glad to help!
And thank you for editing your message, now it looks great. AKulbii (talk) 07:17, 20 June 2023 (UTC)

Wes geht man damit um, wenn im Transport Teile fehlen?

Wir haben das Problem, dass manchmal Teile für den Transport fehlen - wie geht man in SAP mit dem Problem um? 2A04:6EC0:22C:EE0:95FB:289F:7D5:C5BC (talk) 15:42, 16 June 2023 (UTC)

Wikipedia edit tab

On Wikipedias, it is possible to change the wording of the edit tab, depending on the skin, for example at w:simple:MediaWiki:Vector-view-edit. What page would need to be edited to change the wording of the edit tab on the Vector 2022 skin, Monobook skin, MinervaNeue skin, and Timeless skin?

See here: w:simple:special:permalink/8871916#Vector_2022:_change_vs_edit Lights and freedom (talk) 18:30, 16 June 2023 (UTC)

Use w:simple:mediawiki:skin-view-edit. That should work for all skins.
You can add ?uselang=qqx to end of url to see what mediawiki: pages to use. Bawolff (talk) 20:11, 16 June 2023 (UTC)
@Bawolff Thank you! Lights and freedom (talk) 21:39, 16 June 2023 (UTC)

how would i go about adding a definition to wikipedia

how would i go about adding a definition to Wikipedia SuperBoss19 (talk) 20:46, 16 June 2023 (UTC)

Ask at w:WP:TEAHOUSE
See also w:WP:AFC Bawolff (talk) 04:03, 17 June 2023 (UTC)

Template:Wikidata Image Shows On Infobox Person

When i was making infobox person this crap template shows at the page how do i get rid of this stupid template? 112.209.33.235 (talk) 10:26, 17 June 2023 (UTC)

Only you know how you set up your MediaWiki installation and why and how you imported certain templates. Also please mind your tone. Malyacko (talk) 22:52, 17 June 2023 (UTC)

Changing URLs

So I tried changing the URL of my mediawiki by changing the $wgServer and the $wgScriptPath parameter in LocalSettings.php. However, afterwards I still couldn't access it via that, nor via the old url. Meaning now there's no way for me to access it anymore. Fun.

There's also no $wgArticlePath in my LocalSettings.php either. How can I change URLs now? 2A02:A446:7A20:1:60B7:66BE:A902:43D3 (talk) 11:34, 17 June 2023 (UTC)

It's important to describe exactly what "couldn't access it" means, including exact error messages, because there are many possible ways you can't access your wiki, and many possible causes. Ciencia Al Poder (talk) 16:42, 17 June 2023 (UTC)
you also didn't state if you modified the webserver, because you cannot just change the mediawiki config and NOT the web server config of course. —TheDJ (Not WMF) (talkcontribs) 11:52, 19 June 2023 (UTC)

Order of application of CSS from template and from print.css

I'd like to have fancy background colors for certain areas in my wiki, but strip those out in print.css. However, just putting things like "background-color: white !important" into print.css doesn't seem to have any effect.

I'm using Extension:CSS to make the changes in templates for each page. Is the problem that all the template CSS is applied after the print.css? If so, I'm not sure how I can make that work. Skalchemisto (talk) 19:24, 17 June 2023 (UTC)

I can't add a new language no matter what I do.

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 added a new language to a MediaWiki installation before, but I can't remember how, and now, I'm trying to add a new language, following what I did to add the previous language, but no matter what I do, it just doesn't work. It keeps telling me that the language code is invalid, by saying that it's blank, when it's not. I've already added the code to the Names.php file, and added the necessary files in the root/languages/i18n folder, and the root/languages folder. If it helps, this is the error it gives me:


[903b9a9dcb5af1dfa8256763] /e/mw-config/index.php?page=Language MWException: Invalid language code ""

Backtrace:

from C:\xampp\htdocs\e\includes\language\LanguageNameUtils.php(293)

#0 C:\xampp\htdocs\e\includes\language\LanguageNameUtils.php(305): MediaWiki\Languages\LanguageNameUtils->getFileName(string, string, string)

#1 C:\xampp\htdocs\e\includes\language\LocalisationCache.php(730): MediaWiki\Languages\LanguageNameUtils->getMessagesFileName(string)

#2 C:\xampp\htdocs\e\includes\language\LocalisationCache.php(957): LocalisationCache->readSourceFilesAndRegisterDeps(string, array)

#3 C:\xampp\htdocs\e\includes\language\LocalisationCache.php(499): LocalisationCache->recache(string)

#4 C:\xampp\htdocs\e\includes\language\LocalisationCache.php(373): LocalisationCache->initLanguage(string)

#5 C:\xampp\htdocs\e\includes\language\LocalisationCache.php(314): LocalisationCache->loadItem(string, string)

#6 C:\xampp\htdocs\e\includes\language\LanguageFallback.php(106): LocalisationCache->getItem(string, string)

#7 C:\xampp\htdocs\e\includes\language\LanguageFactory.php(186): MediaWiki\Languages\LanguageFallback->getAll(string)

#8 C:\xampp\htdocs\e\includes\language\LanguageFactory.php(144): MediaWiki\Languages\LanguageFactory->newFromCode(string)

#9 C:\xampp\htdocs\e\includes\libs\MapCacheLRU.php(274): MediaWiki\Languages\LanguageFactory->MediaWiki\Languages\{closure}()

#10 C:\xampp\htdocs\e\includes\language\LanguageFactory.php(141): MapCacheLRU->getWithSetCallback(string, Closure)

#11 C:\xampp\htdocs\e\includes\language\LanguageFactory.php(128): MediaWiki\Languages\LanguageFactory->getRawLanguage(string)

#12 C:\xampp\htdocs\e\mw-config\index.php(75): MediaWiki\Languages\LanguageFactory->getLanguage(string)

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

#14 {main} Headmate (talk) 22:56, 17 June 2023 (UTC)

Can you include all the code you added?
What is the fallback language specified for your new language? Bawolff (talk) 23:14, 17 June 2023 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

REST API with path parameter containing a slash

Hi! I’ve tried reviewing a subpage in my local dev setup (latest versions of both core and FlaggedRevs, updated a few hours ago, and latest Apache version packaged with Bullseye, 2.4.56-1~deb11u2). It uses the REST API. It doesn’t work:

  • http://localhost/wiki/rest.php/flaggedrevs/internal/review/Real-time_preview_message%2Fhu (used by the JS) shows a generic Apache “not found” page;
  • http://localhost/wiki/rest.php/flaggedrevs/internal/review/Real-time_preview_message/hu (my next best guess) shows a REST API error message informing me that /flaggedrevs/internal/review/Real-time_preview_message/hu didn’t match any known handler.

Reviewing non-subpages works as expected. I suspect my configuration is wrong, as the REST endpoint has been in use for over 1.5 years, without anyone complaining on production WMF wikis. How can I make it work? Tacsipacsi (talk) 09:34, 18 June 2023 (UTC)

Try the apache config AllowEncodedSlashes On Bawolff (talk) 12:46, 18 June 2023 (UTC)
Thanks for the reply! Unfortunately, it doesn’t seem to work. I put AllowEncodedSlashes NoDecode in apache2.conf while Apache was shut down, started the server after saving, and I still get a 404. Tacsipacsi (talk) 18:20, 19 June 2023 (UTC)

Suspect bug in UploadedFile.php

Hello support.


I had a problem with an extension and my solution needed a patch of the extension as well as of a core MediaWiki file. I described this in point 4 of


https://github.com/clecap/mediawiki-extensions-DrawioEditor/blob/master/README-patch.md


I am sorry that I am not familiar with Phabricator to a degree which would allow me to make a pull request there for the MediaWiki files, but maybe this is helpful nevertheless. 217.95.162.219 (talk) 21:13, 18 June 2023 (UTC)

The Declaration of Wikimedia\ParamValidator\Util\UploadedFile::getStream() must be compatible with Psr\Http\Message\UploadedFileInterface::getStream(): is a known issue and will be fixed in the next release of mediawiki (or already fixed if you get a copy from git) Bawolff (talk) 22:04, 18 June 2023 (UTC)

Creating custom RSS (or whatever syndication) feeds?

I see that the API includes a few feed-related things, like get a feed for recent changes. Also, the help text says that most MW instances contain the same syndication functionality as Wikipedia, but there are some exceptions (for example, it says wikimedia.org "offers cross-project information like page view metrics").

I would like to create various custom feeds. I have thus far been unable to find any information on how to do so. Could anyone point me towards information on this, please? Thanks.

-Rwv37 (talk) 00:05, 19 June 2023 (UTC)

Also, I should say: I'm not wed to the idea of doing this via the API. For example, perhaps there's some directive that could be included in a page's markup to say that the generated page should be RSS, and if so, that would be perfectly fine with me. -Rwv37 (talk) 00:13, 19 June 2023 (UTC)
wikipedia uses extension:FeaturedFeeds however it is confusing to setup.
Some extensions like extension:Cargo, extension:SemanticMediaWiki and extension:GoogleNewsSitemap support outputting queries as rss.
If those dont work you would probably have to create a custom api module. Bawolff (talk) 03:07, 19 June 2023 (UTC)
@Bawolff, great, thank you! I've actually been using Cargo for a while now, and that was one of my first thoughts, but when I checked the help pages for it, I didn't notice anything about it. I'll check again, and ask about it there if I still don't find anything. Thanks again! -Rwv37 (talk) 03:37, 19 June 2023 (UTC)
oh weird its not documented. I think it uses format=feed. There is definitely code for it https://github.com/wikimedia/mediawiki-extensions-Cargo/blob/master/includes/formats/CargoFeedFormat.php Bawolff (talk) 04:22, 19 June 2023 (UTC)
@Bawolff, I asked on the Cargo discussion pages about it, and I was told it's a new feature, not yet in a production release, so I guess that's why it's not in the documentation yet. But it can be used if you install the master version that you linked to.
Also, when you specify the "format=feed" that you mentioned, I'm told that you can then add "feed type=rss" or "feed type=atom".
Thanks again! Rwv37 (talk) 22:10, 19 June 2023 (UTC)

Wikibase installation

Hello,

I've installed two wikis via Xampp on localhost, one was successfully set as wikibase repo ("lexikon") and second should be a client ("historika"). I've add the sites to sites table and used configuration as per Wikibase/Installation/Advanced configuration. If I'm trying to add the corresponding sitelink on lexikon item page via right box, it has historika in options and it suggest an article name so it can access historika, but when I click on save button, it has error:

A page "XYZ" could not be found on "historika". The external client site "historika" did not provide page information for page "XYZ".

So I assume there is a mistake on my part in historika client settings. I've set:

$wgWBClientSettings['repoUrl'] = 'https://localhost/lexikon';

$wgWBClientSettings['repoArticlePath'] = '/index.php/$1';

My other settings:

$wgWBClientSettings['entitySources'] = [

   'lexikon' => [

       'repoDatabase' => 'lexikon',

       'baseUri' => 'https://localhost/lexikon/entity',

       'entityNamespaces' => [

           'item' => 120,

           'property' => 122,

       ],

       'rdfNodeNamespacePrefix' => 'wd',

       'rdfPredicateNamespacePrefix' => '',

       'interwikiPrefix' => '',

   ],

];

$wgWBClientSettings['itemAndPropertySourceName'] = 'lexikon';

$wgWBClientSettings['siteLinkGroups'] = [ 'Wikiny' ];

$wgWBClientSettings['siteGlobalID'] = 'historika';

What am I doing wrong? Silesianus (talk) 07:19, 19 June 2023 (UTC)

File usage incomplete

MW 1.35.7


Hello,

on every page in the "File" namespace, there is a list called "File usage" showing where that file is used directly, i.e. [[File:...]]

But it is incomplete: files just being linked to by [[:File:...]] cannot be found there. Instead, I need to check "what links here".

If the file is only referenced by links, then file usage is empty and the file will appear on the special page "unused files", which is not true. Are there any plans to correct this strange behaviour? 2003:C2:3F17:C200:28AD:D719:E78:5D2A (talk) 09:06, 19 June 2023 (UTC)

No, this is intentional. Bawolff (talk) 09:50, 19 June 2023 (UTC)

"MediaWiki internal error" when trying to load up

When I try to load up the wiki, the browser has me face a blank page with the words:


"MediaWiki internal error.


Original exception: [a142af6482e014f910741cc4] 2023-06-19 23:35:02: Fatal exception of type "Wikimedia\Rdbms\DBConnectionError"


Exception caught inside exception handler.


Set $wgShowExceptionDetails = true; at the bottom of LocalSettings.php to show detailed debugging information."


What should I do? 151.18.139.38 (talk) 23:37, 19 June 2023 (UTC)

Follow the instructions in the error message. Taavi (talk!) 12:07, 20 June 2023 (UTC)

MediaWiki

Hello,


I installed MediWiki on my pc and I start. But I don't know huw to use it. Turankaya74 (talk) 05:54, 20 June 2023 (UTC)

see Help:Contents Taavi (talk!) 12:08, 20 June 2023 (UTC)
I don't how to use it ? How can I edit Wikipedia article ? Turankaya74 (talk) 17:37, 22 June 2023 (UTC)

編集保存時「セッションデータが消失したため編集を処理できませんでした。」と表示される

1.39.3のMediaWikiでページの保存や画像のアップロード時に


申し訳ありません! セッションデータが消失したため編集を処理できませんでした。

アカウントがログアウトされている可能性があります。アカウントにログインしていることを確認して、もう一度やり直してください。 それでも失敗する場合、ログアウトしてからログインし直し、現在使用しているブラウザーでこのサイトからのクッキーが許可されていることを確認してください。


と表示されます。

ブラウザの更新・変更、ログイン&ログアウト、キャッシュの削除等試しましたが改善されません。 MirukuPC (talk) 06:07, 20 June 2023 (UTC)

maintenance script update.php is taking more than 1 hour

Hi,

MW 1.39.3

php 8.0

SimpleSAMLphp library 2.0.3  

PluggableAuth 6.2

SimpleSAMLphp extension 5.0.1

Elastic Search 7.3

We are using mediawiki image https://hub.docker.com/_/mediawiki/ & working on docker & trying to build container image with above & some extra extensions.


Since our DB file size is more than 7GB . when we are trying to connect to our latest db of size 7gb & trying to run update.php.

Then its taking more than 1 hour to run maintenance script. The server in which we are trying to deploy this app has limited time of 1 hour.

After 1 hour Pipeline got failed with Run ID: cg1aagu timed out after 1h0m0s. & script failed app is not working.

please suggest us how do we run maintenance script successfully before 1 hour.

As we cannot increase deployment time of server more than 1 hour , its set for all app of organization. Pooja2425 (talk) 06:30, 20 June 2023 (UTC)

And if we are triyng to point to latest db after 1 month then we need to create upgrade key & secret key again ? Pooja2425 (talk) 12:24, 20 June 2023 (UTC)
What stage did the script get to?
> And if we are triyng to point to latest db after 1 month then we need to create upgrade key & secret key again?
Doesnt really matter. Secret key is about saved logins. I would suggest not changing the keys Bawolff (talk) 09:49, 22 June 2023 (UTC)

MySQL shutdown unexpectedly, please help!

Since last time I used Mediawiki and had no problem whatsoever, when now I try to run XAMPP an error message appears saying:


"Error: MySQL shutdown unexpectedly.

This may be due to a blocked port, missing dependencies,

improper privileges, a crash, or a shutdown by another method.

Press the Logs button to view error logs and check

the Windows Event Viewer for more clues

If you need more help, copy and post this

entire log window on the forums"


How can I fix that?

I put stuff which I need to work with on MediaWIki and I really need to recover it!

Also how can I prevent this from happening again in the future? 151.44.36.223 (talk) 08:37, 20 June 2023 (UTC)

Small update: if restoring the MediaWiki isn't possible, is there any chance to at least recover the articles text as some last resort measure?
Thanks in advance!
Alberto 151.44.36.223 (talk) 09:32, 20 June 2023 (UTC)
You should ask this in a XAMPP support channel. Taavi (talk!) 12:07, 20 June 2023 (UTC)
Thanks, I'll certainly do.
If they can't help me, there's a way to savage the articles' text?
Where are the articles localized? 151.18.64.45 (talk) 12:38, 20 June 2023 (UTC)
See https://www.mediawiki.org/wiki/Manual:Page_table and https://www.mediawiki.org/wiki/Manual:Text_table Malyacko (talk) 07:40, 21 June 2023 (UTC)
Thanks for the useful info, Malyacko, although I didn't really understand how to extract the text or even where that's stored.
Is it saved in .php files?
Is there any program I can use to read them other than MySQL?
Thanks,
Alberto 151.18.209.133 (talk) 10:43, 21 June 2023 (UTC)
MySQL is a database engine, and the data is stored on files only understandable by MySQL. You should fix MySQL by following the instructions given:
Press the Logs button to view error logs and check
the Windows Event Viewer for more clues Ciencia Al Poder (talk) 13:17, 21 June 2023 (UTC)
Thank you very much, Ciencia Al Poder!
I wonder if I can read those files with the MySQL installed on another pc. 151.82.157.42 (talk) 13:31, 21 June 2023 (UTC)
Anyway the Logs gives me this, which doesn't help me the slightest:
2023-06-21 15:32:18 0 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2023-06-21 15:32:18 0 [Note] InnoDB: Uses event mutexes
2023-06-21 15:32:18 0 [Note] InnoDB: Compressed tables use zlib 1.2.12
2023-06-21 15:32:18 0 [Note] InnoDB: Number of pools: 1
2023-06-21 15:32:18 0 [Note] InnoDB: Using SSE2 crc32 instructions
2023-06-21 15:32:18 0 [Note] InnoDB: Initializing buffer pool, total size = 16M, instances = 1, chunk size = 16M
2023-06-21 15:32:18 0 [Note] InnoDB: Completed initialization of buffer pool
2023-06-21 15:32:18 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
2023-06-21 15:32:18 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2023-06-21 15:32:18 0 [Note] InnoDB: Setting file 'C:\xampp\mysql\data\ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2023-06-21 15:32:18 0 [Note] InnoDB: File 'C:\xampp\mysql\data\ibtmp1' size is now 12 MB.
2023-06-21 15:32:18 0 [Note] InnoDB: Waiting for purge to start
2023-06-21 15:32:19 0 [Note] InnoDB: 10.4.27 started; log sequence number 67016564; transaction id 170
2023-06-21 15:32:19 0 [Note] InnoDB: Loading buffer pool(s) from C:\xampp\mysql\data\ib_buffer_pool
2023-06-21 15:32:19 0 [Note] Plugin 'FEEDBACK' is disabled.
2023-06-21 15:32:19 0 [Note] Server socket created on IP: '::'.
Alberto 151.82.157.42 (talk) 13:33, 21 June 2023 (UTC)
Well, the logs says Mysql has started successfully and it's listening on the IP adress :: which is the IPv6 "unspecified" address and means it's listening on all IPv6 addresses. There's no error here. Ciencia Al Poder (talk) 18:07, 21 June 2023 (UTC)

Have some problem with Lockdown module. Please help.

Hi there. I have problem, maybe about syntax. When I use this syntax:

$wgSpecialPageLockdown['Specialpages'] = [ 'admins', 'sysop' ];

It works, and my Special Pages will lock, but when I use:

$wgSpecialPageLockdown['Mynewpage1'] = [ 'admins', 'sysop' ];

It's not working. What I'm gonna do? Madb0nes (talk) 13:20, 20 June 2023 (UTC)

This has nothing to do with syntax. Is "Mynewpage1" really a SpecialPage? How did you implement that?
Please also read "Post a new question" in the sidebar. Malyacko (talk) 07:38, 21 June 2023 (UTC)
No, "Mynewpage1" is not SpecialPage, I just want change premmisions on my new pages, and I don't know how can I do that, try many modules, and no result. I'm newbe in mediawiki, please help, maybe I need use another module? Madb0nes (talk) 09:41, 22 June 2023 (UTC)
See Manual:Preventing_access. (PS: These are not "modules".) Malyacko (talk) 13:31, 22 June 2023 (UTC)

Problems in using extension access control

Hello, I try to use extension access control. I put in the following code to LocalSettings.php in the end:

wfLoadExtension( 'AccessControl' );

$wgAccessControlRestrictions[] = [

    'group' => '*', // Every user

    'read' => '*', // not allowed to read

    'title' => 'Aussensicht', // Title of the blocked page

    'restriction' => 'admin', // "admin" can read page "Aussensicht"

];

Unfortunately, it doesn't work. I still can see the blocked page as everyone. Can you give me an advice? Marc19791 (talk) 21:42, 20 June 2023 (UTC)

Magic word for creator of a page?

is there a magic word or any user-invented template/module that can return the username of the revision user of the 1st revision of a page? like REVISIONUSER but for the 1st revision. RoyZuo (talk) 08:48, 21 June 2023 (UTC)

Magic word, no. Template, possibly no. – Ammarpad (talk) 06:15, 22 June 2023 (UTC)
Not a magic word, but if you use Cargo you can achieve this: Extension:Cargo/Storing_data#Storing_page_data. Jonathan3 (talk) 10:36, 22 June 2023 (UTC)

Upload a file on MediaWiki

I am a new member and I wanted to edit my first page. Therefore I wanted to add a few pictures. When I click on the upload button the following message appears:

"We could not determine wheter this file is suitable for Wikimedia Commons. Please only upload photos that you took yourself with your camera, or see what else is acceptable. See the guide to make sure the file is acceptable and learn how to upload it on Wikimedia Commons."

Both inserted links ("what else is acceptable" and "guide") are leading to the MainPage of MediaWiki.

Can you please help me? What can I do to make uploading files possible?

Thanks in advance! MGaehl (talk) 12:41, 21 June 2023 (UTC)

Do you mean your own website or this website? Bawolff (talk) 09:46, 22 June 2023 (UTC)
This website. MGaehl (talk) 09:58, 22 June 2023 (UTC)
What type of file are you intending to upload? Bawolff (talk) 09:59, 22 June 2023 (UTC)
.png MGaehl (talk) 10:18, 22 June 2023 (UTC)
My Coworker could upload the same file. MGaehl (talk) 10:18, 22 June 2023 (UTC)
Extension:ContentTransfer - MediaWiki it was the picture of this side MGaehl (talk) 10:20, 22 June 2023 (UTC)
Now it works! Thank you for your help! MGaehl (talk) 08:49, 26 June 2023 (UTC)

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


From the Help:Links page:
If the page title you are linking to is that of the page you are editing, the result is not a hyperlink at all but simply bold text (for example, on this page the markup [[Help:Links]] gives the result Help:Links).
My question: is there a way of disabling that “bold” effect, or having the self-linked text just present as plain text (or however the default formatting of the text would be if it were not a link)?

I reuse a lot of content from templates, and all the random boldness is a bit unsightly. ElectricRay (talk) 13:26, 21 June 2023 (UTC)

It's just CSS applied to anchors in the mw-selflink class. So you could override that in your (personal, global, or skin-specific) common.css:
a.mw-selflink {
  font-weight: inherit;
}
Clump (talk) 18:28, 21 June 2023 (UTC)
brilliant. that is it. fixed. thank you so much. ElectricRay (talk) 13:08, 22 June 2023 (UTC)
If it's on your wiki, you can also use the SelfLinkBegin hook to disable the behavior. – Ammarpad (talk) 21:09, 21 June 2023 (UTC)
Thank you for this. It is my wiki but I am fairly useless with php so I think I might go for the CSS option which seems to be a good one. but thanks for replying all the same. ElectricRay (talk) 13:04, 22 June 2023 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Extract page text from MediaWiki

Hello,


for some unexplicable reason MySQL stopped working and I can no longer access my MediaWiki content, how can I recover the text from its articles without MySQL? 151.82.238.104 (talk) 15:57, 21 June 2023 (UTC)

templating "Project:Support desk/Flow/2023/06"

What are the ways, if any, to using/writing something shorter than "{{NAMESPACE}}:{{PAGENAME}}" and get the same result.

(mainly for MW code debugging purpose)


Like for example: "{{ {{CallSelf}} | ... }}"

... or of course "{{ {{CS}} | ... }}"


Preferably without having "{{NAMESPACE}}:{{PAGENAME}}" being substituted-in on page save. (still highly mystified about proper savesubst: & subst: usage)


Why eat <br> tags ... O well, hard returns it is. -- I hate "fighting the system". MvGulik (talk) 07:38, 22 June 2023 (UTC)

{{FULLPAGENAME}} can be used instead of {{NAMESPACE}}:{{PAGENAME}}Ammarpad (talk) 07:44, 22 June 2023 (UTC)
Hmm ... what little detail em I not seeing/reading.
Aha.
You mean. Using "{{:{{FULLPAGENAME}} | ... }}" will do the same thing as "{{ {{NAMESPACE}}:{{PAGENAME}} | ... }}" for both Main-namespace pages and named-namespace pages.
Granted:
1) I did not know that.
Never thought about trying FULLPAGENAME with a leading colon, although it makes sense in hindsight.
2) Yea. Its a bit shorter an easier to type.
Still aiming for that (really short) "{{ {{CS}} | ... }}" case though. MvGulik (talk) 17:03, 22 June 2023 (UTC)
I didn't add any leading colon in my reply. So what I said is what I mean. – Ammarpad (talk) 19:02, 22 June 2023 (UTC)
Aha. Right.
I guess I did no emphasize the "templating" part sufficiently in my question and why I like to have it as an template.
The latter being that it could be usable in pages in the Main-namespace and Named-namespaces alike without having to worry about adding (or removing) that leading ":" part.
Guess I could give it a second try in creating it and see what rolls out. MvGulik (talk) 07:56, 23 June 2023 (UTC)

How to force images to have same height?

Let us say there are two images having approximately - but not exactly - the same size. How can I force them to show side-by-side and having exactly the same height?


<gallery heights=300px> results in different heights, so does [[File:... |x300px]]


Thumbnailing seems to do the job but does not work properly within the gallery tag. 2003:C2:3F2E:8100:DD0E:1F16:EC99:333A (talk) 15:10, 22 June 2023 (UTC)

how to create my own wiki

i need to do a wiki and work on them in mediawiki but i don't know how to start, someone know about it? Macamilagomezco (talk) 15:15, 22 June 2023 (UTC)

See Manual:Installing MediaWikiAmmarpad (talk) 19:00, 22 June 2023 (UTC)

How to set the "upload new file" system to UploadWizard

Hello, for a while now I had found that when you try to upload a new file version, instead of it being redirected to UploadWizard, it redirects it to the original file upload system, which isn't as good especially with larger files. Is there any way I could change a setting to make it use UploadWizard instead? Thanks Guillaume Taillefer (talk) 15:30, 22 June 2023 (UTC)

Set $wgUploadNavigationUrl in LocalSettings.php – Ammarpad (talk) 20:05, 22 June 2023 (UTC)
Thanks but I put that in ($wgUploadNavigationUrl = 'https://wwii-archives.org/index.php/Special:UploadWizard';), but it absolutely did nothing. Whenever you click on upload a new version, it will still go to the old file uploader Guillaume Taillefer (talk) 22:33, 22 June 2023 (UTC)
Upload wizard doesnt support uploading new versions of already existing files Bawolff (talk) 00:58, 23 June 2023 (UTC)
Boooo that sucks (Thanks anyways though) Guillaume Taillefer (talk) 12:41, 23 June 2023 (UTC)

Restore MW database from V1.28 on V1.39

Hello

I would like to know if does it possible to restore a MW database backup from V1.28 on V1.39 ?

Thanks Raoufgui (talk) 15:59, 22 June 2023 (UTC)

Yes. Restore the database and follow Manual:Upgrading Ciencia Al Poder (talk) 09:58, 24 June 2023 (UTC)
Thank you very much Raoufgui (talk) 14:20, 10 July 2023 (UTC)

Using flagged revisions with shortened urls

I installed MediaWiki on my laptop. I also installed the FlaggedRevs extension, which worked. Then I implemented url shortening, and FlaggedRevs didn't like that.

My .htaccess has this:

RewriteEngine On

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

RewriteRule ^(.*)$ w/index.php?title=$1 [L,QSA]
RewriteRule ^$ w/index.php [L,QSA]

My LocalSettings.php has this:

$wgScriptPath = "/w";
$wgArticlePath = "/$1";
$wgScriptExtension = ".php";
$wgUsePathInfo = true;

$wgServer = "http://localhost";

$wgResourceBasePath = $wgScriptPath;

$actions = array( 'view', 'edit', 'watch', 'unwatch', 'delete','revert', 'rollback', 'protect', 'unprotect', 'markpatrolled', 'render', 'submit', 'history', 'purge', 'info' );

foreach ( $actions as $action ) {
   $wgActionPaths[$action] = "/$action/$1";
}

So, my urls look like this:

http://localhost/Main_Page
http://localhost/edit/Main_Page
http://localhost/history/Talk:Main_Page
etc.

All works fine, but when I try to approve a pending revision, it fails. My browser's console shows a 404 on this url: http://localhost/w/rest.php/flaggedrevs/internal/review/Main_Page

As it turns out, my wiki literally tries to load an article named "W/rest.php/flaggedrevs/internal/review/Main Page". In other words, FlaggedRevs does not load rest.php, and instead tries loading an unexisting wiki article. This of course causes FlaggedRevs to fail.

I tried hardcoding rest.php into .htaccess, explicitly instructing the server to access rest.php when asked, not a wiki page. Emphasis added:

RewriteEngine On

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

RewriteRule ^w/rest.php/(.*)$ w/rest.php/$1 [L,QSA]
RewriteRule ^(.*)$ w/index.php?title=$1 [L,QSA]
RewriteRule ^$ w/index.php [L,QSA]

This does not work. What am I doing wrong? Manifestation (talk) 09:11, 23 June 2023 (UTC)

What happens if the URL doesn't have the /w - e.g. http://localhost/rest.php/flaggedrevs/internal/review/Main_Page ?
I think $wgScriptPath is used to make URLs. Mine is "". Maybe yours should be too. What if you change yours to that? Jonathan3 (talk) 13:55, 23 June 2023 (UTC)
@Jonathan3: If I change $wgScriptPath to "", it breaks my wiki.
I installed MediaWiki in the "/w" directory. Manifestation (talk) 17:40, 23 June 2023 (UTC)
I just discovered something. Inserting "/wiki/" into the url fixes the problem! 😲
.htaccess:
(...)
RewriteRule ^wiki/(.*)$ w/index.php?title=$1 [L,QSA]
RewriteRule ^wiki$ w/index.php [L,QSA]
RewriteRule ^$ w/index.php [L,QSA]
LocalSettings.php:
$wgArticlePath = "/wiki/$1";
(...)
$wgActionPaths[$action] = "/wiki/$action/$1";
Is this why all Wikimedia wikis have this stupid "wiki/" bit in their urls???
Why would you want the word "wiki" in the url of a wiki?! Manifestation (talk) 18:12, 23 June 2023 (UTC)
A small addition:
As you can read above, I kind of 'fixed' the problem by making the URLs less pretty. But then I ran into another problem: FlaggedRevs did not work on subpages. For example: "Main_Page/test". If I choose "Accept revision" on that page, it failed. The browser's console showed a 404 when rest.php was called.
The reason: Apache *by default* does not accept encoded forward slashes ("/"), probably due to some security reason. The titles of subpages have encoded forward slashes when sent to the rest api, so Apache refused them.
The solution: add AllowEncodedSlashes NoDecode to httpd.conf. You should put it in the <VirtualHost>. If your Apache server does not have any, you can add this at the end of the file:
<VirtualHost *:80>
AllowEncodedSlashes NoDecode
</VirtualHost>
Don't forget to reboot.
I have left a note about this at Extension talk:FlaggedRevs. Manifestation (talk) 13:00, 25 June 2023 (UTC)
Ok, thanks to Stack Overflow, I have now definitely fixed this issue. The solution is this (emphasis added):
RewriteEngine On
RewriteCond %{REQUEST_URI} !^/w/rest\.php
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d
RewriteRule ^(.*)$ w/index.php?title=$1 [L,QSA]
RewriteRule ^$ w/index.php [L,QSA]
Combined, of course, with the "AllowEncodedSlashes NoDecode" directive described above, plus the appropriate lines in LocalSettings. Manifestation (talk) 10:22, 3 July 2023 (UTC)
There is no very good reason to have the "wiki" part - see Manual:Wiki in site root directory.
I think you solved the problem by matching $wgArticlePath with your URL structure, i.e. now you are using "wiki" in the URL and have "wiki" in $wgArticlePath. I think you could remove "wiki" from both. Jonathan3 (talk) 20:14, 24 June 2023 (UTC)

translate: second title occurence not accessible on translated page

Hi all, Page -> https://www.mediawiki.org/wiki/OOUI/Using_OOUI_in_MediaWiki shows an interessant case where the same title is used twice in the same page

1.2 Using OOUI widgets
2.1 Using OOUI widgets

Recent update of anchors has extended the automatic reference of EN titles in the translated pages which is a good thing.

After the page has been translated the second anchor is known as Using_OOUI_widgets_2

Problem: The second case is referenced in 1.2.1 List of available elements under link '(or in JS via oojs-ui-core...' as -> https://www.mediawiki.org/wiki/Special:MyLanguage/OOUI/Using_OOUI_in_MediaWiki#Using_OOUI_widgets_2 and this is not operational on the translated page.

Test  : Now requesting from a blank page the anchor 2 on EN page : -> https://www.mediawiki.org/wiki/OOUI/Using_OOUI_in_MediaWiki#Using_OOUI_widgets_2 you reach 2.1 Using OOUI widgets => well done !!!

Now try similarly the equivalent in the FR page : https://www.mediawiki.org/wiki/OOUI/Using_OOUI_in_MediaWiki/fr#Using_OOUI_widgets_2 and it remains at the top of file => the anchor 2 is not recognized there, why ?

I am confused. Where am I wrong ? Thanks. -- Christian 🇫🇷 FR (talk) 19:40, 23 June 2023 (UTC)

Border radius in wikitables

Hi, I want a wikitable with a border radius but the attribute won't work and I even tried to put them in the corner cells individually.

Is it a way to do that ? Thanks for your help ! Scratcheur-2020Send (talk) 08:03, 24 June 2023 (UTC)

wikitable has border-collapse set to 'collapse'. If you set rounded border styles on individual data cells you have to unset border-collapse to see the effect. – Ammarpad (talk) 17:53, 25 June 2023 (UTC)
Thank you but it's not working on wikitables, I just tried it Scratcheur-2020Send (talk) 17:37, 26 June 2023 (UTC)
It'd be easier to understand if you can give example here or link to where you're testing this. – Ammarpad (talk) 08:56, 27 June 2023 (UTC)
I just need a table with rounded borders but the border-radius doesn't seem to work... Scratcheur-2020Send (talk) 16:37, 3 July 2023 (UTC)
Sure it does:
{| class="wikitable" style="border-radius:20px;border-collapse:unset;border-spacing:5px;"
| style="border:none" |a cell with no border
|a cell with default borders
|-
| style="border-radius:20px;" |a cell with a rounded border
|a cell with default borders
|}
a cell with no border a cell with default borders
a cell with a rounded border a cell with default borders

Clump (talk) 17:34, 3 July 2023 (UTC)

How can I change user preference in my extension?

I've already set up a new special page to generate a specific setting string of my extension, but I can't find a way to submit the generated setting to user's preferences, should I use mediawiki PHP api, How? Cirno.Tim (talk) 02:38, 26 June 2023 (UTC)

From within an extension, use the UserOptionsManager class
e.g.
\MediaWiki\MediaWikiServices::getInstance()->getUserOptionsManager()->setOption( $this->getUser(), 'preference name', 'preference value' )
Best practise would be to dependency inject UserOptionsManager instead of using \MediaWikiServices::getInstance()->getUserOptionsManager (i.e. in extension.json doing something like:
         "SpecialPages": {
                  "MySpecialPageName": {
                          "class": "SpecialPageClassNameHere",
                          "services": [
                                  "UserOptionManager"
                         ]
                  }
which then causes the UserOptionsManager to be passed as an argument to the constructor of your special page.
See also https://doc.wikimedia.org/mediawiki-core/master/php/classMediaWiki_1_1User_1_1UserOptionsManager.html Bawolff (talk) 04:05, 26 June 2023 (UTC)
Thanks, that is really helps a lot.
I've successfully set user options by your first given example, but when I tried to add services to extension.json, it throw a exception called "NoSuchServiceException: No such service: UserOptionManager", why that? Cirno.Tim (talk) 06:16, 26 June 2023 (UTC)
Oh, i got it, I got a typo of UserOptionManager Cirno.Tim (talk) 06:20, 26 June 2023 (UTC)
Yes, its a typo, it should be UserOptionsManager —TheDJ (Not WMF) (talkcontribs) 11:17, 26 June 2023 (UTC)

MediaWiki layout is messed up after enabling and disabling extension.

MediaWiki - 1.39.3

PHP - 7.4.33 (apache2handler)

MySQL - 8.0.33

ICU - 67.1

I downloaded an extension: Extension:MobileDetect and enabled it. For some reason, many weird things started to happen to the site:

  • There is a backslash in the top left corner of every page no matter what skin you use.
  • Loading site pages seems to take longer than usual, though it is minimal
  • All downloaded fonts are sans-serif (doesn't seem to be the case with me but is for a friend)
  • I cannot switch tabs in Preferences
  • Some line heights are shorter than they used to be.
  • Some extensions do not work, such as VisualEditor and Translate.
  • My Mainpage is set to MyLanguage:Main_Page. Before this, the URL would switch back to Main_Page after loading, but now stays at MyLanguage:Main_Page.
  • Probably more, but I have yet to find.

Disabling the extension has not fixed the issue. I completely removed it from my wiki. I am wondering if this was a problem caused by the extension or from simply restarting apache after doing something else? All I really did beforehand was some work in Common.css/Monobook.css. I am uncertain if reinstalling skins will help because this happens on every skin. Not sure what to do... I also tried running update.php with no change. Not sure if any other maintenance script would fix the issue.

Here is the site: https://kirbyspeedrun.com/wiki/Main_Page

In addition, I had an old window open before this stuff started to happen, so I have a comparison screenshot here. Left is the old (good) site, while the right is the messed up one: https://cdn.discordapp.com/attachments/1122680125721415710/1122690335072600074/image.png

edit: added versions Nippo4512 (talk) 04:28, 26 June 2023 (UTC)

This sounds a bit like you made a typo in LocalSettings.php - Can you check that the very beginning of that file is <?php and that you didn't add a \ to it? Bawolff (talk) 05:36, 26 June 2023 (UTC)
Words cannot describe how dumb of a mistake this was... Thank you for helping me. Nippo4512 (talk) 06:40, 26 June 2023 (UTC)
We've all been there Bawolff (talk) 22:34, 28 June 2023 (UTC)

semantic mediawiki not running

Hi,

We are using Mediawiki 1.39.3 & Sematic meadiwiki 4.1.1 & tried with 4.0.2.

After adding through composer when running update.php then error .


Fatal error: Uncaught Error: Class "SMWDataValue" not found in /var/www/html/extensions/SemanticMediaWiki/src/DataValues/PropertyValue.php:45 Stack trace: #0 /var/www/html/includes/AutoLoader.php(244): require() #1 [internal function]: AutoLoader::autoload('SMW\\DataValues\\...') #2 /var/www/html/extensions/SemanticMediaWiki/includes/SemanticMediaWiki.php(205): class_alias('SMW\\DataValues\\...', 'SMWPropertyValu...') #3 /var/www/html/extensions/SemanticMediaWiki/includes/SemanticMediaWiki.php(29): SemanticMediaWiki::setupAliases() #4 /var/www/html/includes/registration/ExtensionRegistry.php(527): SemanticMediaWiki::initExtension(Array) #5 /var/www/html/includes/registration/ExtensionRegistry.php(279): ExtensionRegistry->exportExtractedData(Array) #6 /var/www/html/includes/Setup.php(278): ExtensionRegistry->loadFromQueue() #7 /var/www/html/includes/WebStart.php(86): require_once('/var/www/html/i...') #8 /var/www/html/index.php(44): require('/var/www/html/i...') #9 {main} thrown in /var/www/html/extensions/SemanticMediaWiki/src/DataValues/PropertyValue.php on line 45 Pooja2425 (talk) 12:52, 26 June 2023 (UTC)

So I have page "A"

On page "A" I have links to pages "R1","R2","R3",...

Those "Rn" pages are redirects to existing sections/headers on page "A".


Now when I middle-mouse click (ie: open in new tab) such a Rn link on page "A". Page "A" loads 'and' jumps to the requested Rn-section. (always)

But. When I left-mouse click such a Rn links (ie: open in current tab). Page "A" loads, but (usually*) it will not jump to the requested "Rn" section.


What might be the potential reasons for that last case to (usually*) not doing that section jump ?

(it kinda trashes the reason for having those "Rn" (navigation)links :-/ )


MW:1.39.0

+(I can't change those "Rn" links to include the target section (that's what the redirects are for), as that will break other stuff.) MvGulik (talk) 14:50, 26 June 2023 (UTC)

SkinDistributor seems to be down?

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


Can't download using the link from the skin pages. They were working less than a day ago. It says "No such skin" and "Unable to fetch skin list"


e.g. Special:SkinDistributor/Nostalgia Ham Pastrami (talk) 17:47, 26 June 2023 (UTC)

This is now phab:T340483 Taavi (talk!) 19:15, 26 June 2023 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Create Category-like Extension

I utilize the category extensively, and I don't want to do anything to change how that works. However, I'd like to create a new namespaces (like "Publisher" or "Author") and to add wikicode like [[Publisher:Random House]] to a page and for a link to that "category" to be added to the bottom of the page, and when clicking on it it'll show the Publisher:Random House page where I'll be able to write a short snippet about that publisher to show at top and to list all the pages that included the [[Publisher:Random House]] code.

I'm familiar with creating new namespaces from Manual:Using custom namespaces but is there a way to change how it functions? 70.160.223.43 (talk) 21:24, 26 June 2023 (UTC)

There is no built in option of this. Categories are a special functionality that is tied solely to the namespace "Category:" —TheDJ (Not WMF) (talkcontribs) 09:38, 27 June 2023 (UTC)
Thanks 70.160.223.43 (talk) 23:17, 27 June 2023 (UTC)
You might be interested in extension:SemanticMediaWiki Bawolff (talk) 22:30, 28 June 2023 (UTC)

Code to Log User Information ?

I can't find the code which logs the user's IP and other information when editing an article (and possibly also when signing up? Or isn't that type of information logged when someone makes a new account?) 2600:6C46:637F:A801:A96F:6BDD:4BF5:B3F2 (talk) 00:30, 27 June 2023 (UTC)

See extension:CheckUser Bawolff (talk) 22:34, 28 June 2023 (UTC)

Our application use Mediawiki (1.35.10 LTS) and integrates with Siteminder SSO utilizing Remote user extension "Extension:Auth remoteuser".

On performing the vulnerability scan for the application, we get flagged for utilizing "http" non secure cookies for the following 5 headers -

mw304f3058RemoteToken

mw304f3058_session

mw304f3058Token

mw304f3058UserID

mw304f3058UserName


Can you please suggest the approach to make the cookies from MW to be completely secure?

For awareness, MW app is behind the apache load balancer.


Thanks

Balaji Armfns001 (talk) 14:57, 27 June 2023 (UTC)

Set $wgCookieSecure in LocalSettings.php
Is $wgServer set to something starting with https:// ? Bawolff (talk) 22:33, 28 June 2023 (UTC)

MediaWiki serving Dev URL from SI URL

Hi all, currently we are using ROSA to deploy our dev instance of MediaWiki. I have just deployed our SI instance of MediaWiki, but I am finding that when I use specific MediaWiki functionality i.e. the global search for MediaWiki:Sidebar or save a newly created user, my browser will return the dev URL, and not my current SI, URl. Any suggestions as to why this is? Glaphopen (talk) 16:13, 27 June 2023 (UTC)

Check $wgServer and $wgScriptPath in LocalSettings.php Bawolff (talk) 22:31, 28 June 2023 (UTC)

Custom Tag Extensions and Templates

I'm creating a Manual:Tag extensions using Manual:Hooks/ParserFirstCallInit as shown in one of the examples.

When I create <sample arg1="xxx" arg2="xxx">...input...</sample> on my page it works perfectly. However, if I put the same tag in a template to have it inserted into the same page but now using the template the tag no longer works. Instead it just shows <sample arg1="xxx" arg2="xxx">...input...</sample>.

How can I get my custom tag extension to work with templates? 70.160.223.43 (talk) 01:18, 28 June 2023 (UTC)

The issue resolved itself. Since I was changing a template used by many pages it created many jobs it needed to run. Both tags worked once all the jobs cleared. 70.160.223.43 (talk) 10:34, 28 June 2023 (UTC)

API Category Members Multiple Categories in One Query

I'm writing a script that needs to check multiple categories to see if they have any members in them. I should note that the category pages have not been created.

I know how to do this individually using the list parameter and categorymembers setting in the api: /w/api.php?action=query&list=categorymembers&cmtitle=Category:ThisScriptOne

Is there a way to check multiple categories with one call? Like cmtitles=Category:ThisScriptOne|Category:ThisScriptTwo|Category:ThisScriptThree

Or, since all the categories I need to check have the same unique starting string, is there a way to check if there are many members for categories that start with "Category:ThisScript*". 70.160.223.43 (talk) 02:00, 28 June 2023 (UTC)

You want the memberships of multiple categories retrieved at once ? No as far as I know, there is no way to do that right now. —TheDJ (Not WMF) (talkcontribs) 10:08, 28 June 2023 (UTC)
Correctly. I didn't think so but I've been proved wrong many times before. Thanks. 70.160.223.43 (talk) 19:26, 28 June 2023 (UTC)
Cargo has an API which you might be able to use for this: Extension:Cargo/Exporting_data#API. Jonathan3 (talk) 14:49, 29 June 2023 (UTC)

Forced 2 factor

I was wondering if somebody can assist me.  I am working on a project for my company with Mediawiki and we are using OAUTH.  I am new to Mediawiki and I was wondering if there was a way to enforce the 2fA and to let it show up once users logs in for the first time they are automatically forced presented the QR code to enable it and after enabling it the user is unable to disable it, except for the sysop.  I would truly appreciate any advice on this. 102.39.23.66 (talk) 08:35, 28 June 2023 (UTC)

Extension:OATHAuth has wgOATHRequiredForGroups to enforce 2fa for any group you specify. I don't think this currently presents a prompt to you to enable 2FA on first login, but it shouldn't be too hard to expand the code to do that as well (and would actually probably be very welcome). —TheDJ (Not WMF) (talkcontribs) 09:06, 28 June 2023 (UTC)
Instead of preventing them to remove 2fa, I'd probably go with setting wgOATHExclusiveRights, to severely limit what they can do without enabling 2fa. —TheDJ (Not WMF) (talkcontribs) 09:11, 28 June 2023 (UTC)
So either option is viable, I will look into it a bit. Thank you very much for the feedback 102.39.23.66 (talk) 09:18, 28 June 2023 (UTC)

Customise the "Sorry! This site is experiencing technical difficulties." message

I asked something similar 3 years ago (Project:Support desk/Flow/2020/09#h-Customise_the_"Sorry!_This_site_is_experiencing_technical_difficulties."_message-2020-09-06T16:37:00.000Z) but notice that replying doesn't "bump" the topic like it would do on a normal forum, hence this new query. I'd like to be able to change the default messages (MediaWiki:Dberr-problems and MediaWiki:Dberr-again and MediaWiki:dberr-info-hidden) so that when the error is "Cannot connect to the database" my amended version of the default messages are shown. The messages are mentioned in https://gerrit.wikimedia.org/g/mediawiki/core/+/e6a4048b38e135afccb80f05d56a3cc0600add83/includes/exception/MWExceptionRenderer.php#304 and https://gerrit.wikimedia.org/g/mediawiki/core/+/b9b5b044776da206936de16e89cb784c7a2f60f6/languages/i18n/en.json#4009 but I don't know how to change them. Thanks. Jonathan3 (talk) 10:42, 29 June 2023 (UTC)

The same answer that was given there (by me) still applies.
For the second question you added afterwards (changing them via LocalSettings.php), no it's not possible. If fetching your local MediaWiki:Dberr* fails, the last resort (to avoid giving you blank screen) is hardcoded and will always be in English. You can't change that (except by modifying the source files) – Ammarpad (talk) 00:39, 2 July 2023 (UTC)
Thanks. It was only the second question I was asking now. I'd be happy to edit the code.
I guess en.json is what populates the MediaWiki: messages so there's no point editing that, and I should edit https://gerrit.wikimedia.org/g/mediawiki/core/+/e6a4048b38e135afccb80f05d56a3cc0600add83/includes/exception/MWExceptionRenderer.php#304 instead? Does that sound right? Jonathan3 (talk) 16:00, 2 July 2023 (UTC)

Upgrading Ubuntu from 18.04 to 20.04

New release '20.04.6 LTS' available.
Run 'do-release-upgrade' to upgrade to it.

I've only got MediaWiki running on this server. Is it as simple as backing up then do-release-upgrade or is there anything MediaWiki-related I need to be aware of? Thanks. Jonathan3 (talk) 10:45, 29 June 2023 (UTC)

If you install MediaWiki from the packages, you would need to run the updater after upgrading the OS. If not, your MW installation must be upgraded separately. Either way, take backups beforehand, read the Ubuntu release notes/upgrade guide, etc. Taavi (talk!) 10:51, 29 June 2023 (UTC)
Thank you.
I just download MediaWiki from mediawiki.org tarballs.
"your MW installation must be upgraded separately" - Do you mean I would have to upgrade MediaWiki after upgrading Ubuntu, or just that the two things are completely unrelated? I suspect the latter.
(I am planning to upgrade MediaWiki soon anyway.) Jonathan3 (talk) 11:00, 29 June 2023 (UTC)
Completely unrelated. Taavi (talk!) 11:18, 29 June 2023 (UTC)
Excellent. I'll do the OS upgrade first and see whether it upsets the wiki. If it does, I suppose I could set up a new Ubuntu 20.04 server and transfer the wiki to that. Let's see. Jonathan3 (talk) 12:34, 29 June 2023 (UTC)
I went ahead and did it, and nothing seems to have broken so far...
For reference, I used the commands sudo apt update, sudo apt upgrade, sudo apt dist-upgrade, sudo reboot, sudo do-release-upgrade and went along with all the default suggestions (including keeping local versions of various config files) except I didn't remove obsolete packages. Jonathan3 (talk) 22:13, 25 August 2023 (UTC)

<code>

#dpl:

|linksfrom = X

|nottitlematch = X

|mode = ordered

|ordermethod = title

|order = ascending

#dpl:

|linksto = X

|nottitlematch = X

|mode = ordered

|ordermethod = title

|order = ascending

</code>


If I refresh the page, mediawiki then counts the links from the "linksto" query as links that are on the page, so then "linksfrom" adds these as links on the page and counts them in the query. This is not wanted and i thought I fixed it with "nottitlematch" but apperently not.


After refreshing it also messes up Extension:network which will then also count "linksto" query results in.


I then tried to have the query results as text, which worked, but did not change the results. Bedtry (talk) 10:58, 29 June 2023 (UTC)

I couldn't follow your question fully, but have you tried |eliminate = all ? Jonathan3 (talk) 14:46, 29 June 2023 (UTC)

Include SVG text in search?

Is there an extension so that mediawiki recognizes the text in these files?

If not what could help is a tool that browser search at least can find the text of a file without having to click on it. Bedtry (talk) 13:11, 29 June 2023 (UTC)

Hmm, that would be a reasonable feature request (at least for search ext like CirrusSearch) Bawolff (talk) 21:32, 29 June 2023 (UTC)

Appearance of the editor wrong

Hello,

I have installed MediaWiki and activated the editor: http://wiki.brecht-gym.de/

But now the interface looks quite ... strange. Are language files missing here maybe?

I tried to upload the files again. This did not help. I tried with Firefox and Safari on macOS.


Can anyone help me? :) Stjonas (talk) 15:31, 29 June 2023 (UTC)

Yes it looks like i18n is missing for that extension.
Are you using any custom configuration for localisationCache? Can you confirm that you have a correct copy of tve extension including i18n files? Does removing the extension from LocalSettings.php, viewing some pages, and readding it help? Bawolff (talk) 21:28, 29 June 2023 (UTC)

Problem url in email without my domain

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


Hello, I have a problem sending and receiving emails. The urls of my site are all deprived of the domain name eg: http:///index.php?title=Speciale:RichiediUtenza&action=confirmemail&wpEmailToken=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx. I set $wgServer = "https://mydomain.it" in the localsetting file;

I want: http://mydomain.it/index.php?title=Speciale:RichiediUtenza&action=confirmemail&wpEmailToken=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Serviziperinternet (talk) 17:20, 29 June 2023 (UTC)

I solved the problem by inserting in the localsetting: $wgCanonicalServer = 'https... Serviziperinternet (talk) 11:31, 30 June 2023 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Vector default skin is not migrating, media wiki 1.18 upgrade to 1.23

Hi I really need some help. After spending many hours, I am unable to find solution.

I have old media wiki 1.18 upgrading to a new version 1.23.

My skin is default Vector with Blue line on the top header.

After upgrade to 1.23 this is not migrating unfortunately and vector skin is a little bit different on 1.23 version. I have tried to copy old files, and pictures from skins vector, vector php.

It does not help.

How to preserve blue line header and older data skin ?


Best Regards,

Mantas Mruskys (talk) 06:23, 30 June 2023 (UTC)

MediaWiki 1.23 has been unsupported for over six years now. Taavi (talk!) 10:43, 30 June 2023 (UTC)
You probably want to ignore minor changes in the skin, upgrade to a more recent version of MediaWiki, and only then make changes to the skin. Jonathan3 (talk) 13:54, 30 June 2023 (UTC)
If you make modifications to skin source you will have to redo them everytime you upgrade. Bawolff (talk) 12:03, 1 July 2023 (UTC)

DynamicPageList3 extension is not working for DynamicPageList2 text/queries

I have recently upgraded Mediawiki 1.16.1 to 1.35.10 , it working good apart from a few extensons. SO among all extension DPL3 extension is unable to fetch results for the DPL2 queries/text. For example:

<DPL>

 category       = Weekly Updates
 ordermethod    = firstedit
 order          = descending
 count          = 15
 format         = ,,\n*%TITLE%,
 columns         =3

</DPL> this one is not fethcing reslut in proper format

result in dpl3:

  • <a href="/mediawiki-1.35.10/index.php/Special:FilePath/%25TITLE%25" title="Special:FilePath/Weekly Group Updates 06-21-19.xlsx">Weekly Group Updates 06-21-19.xlsx</a>
  • <a href="/mediawiki-1.35.10/index.php/Special:FilePath/%25TITLE%25" title="Special:FilePath/WeeklyGroup Updates 06-13-19.xlsx">WeeklyGroup Updates 06-13-19.xlsx</a>
  • <a href="/mediawiki-1.35.10/index.php/Special:FilePath/%25TITLE%25" title="Special:FilePath/Weekly Group Updates 06-14-19.xlsx">Weekly Group Updates 06-14-19.xlsx</a>
  • <a href="/mediawiki-1.35.10/index.php/Special:FilePath/%25TITLE%25" title="Special:FilePath/Weekly Group Updates 06-13-19.xlsx">Weekly Group Updates 06-13-19.xlsx</a>
  • <a href="/mediawiki-1.35.10/index.php/Special:FilePath/%25TITLE%25" title="Special:FilePath/Weekly Group Updates 06-06-19.xlsx">Weekly Group Updates 06-06-19.xlsx</a>


while dpl2 result:

What is the best way to update all dpl3 for dpl2 queries? Chittakk (talk) 14:31, 30 June 2023 (UTC)

I have MW1.35 and use DPL3. I tried that query (only changing the category= to a category that exists on my wiki) and it worked as expected. Are you on a version of DPL3 that is compatible with MW1.35? Maybe the master branch is incompatible. Jonathan3 (talk) 17:54, 30 June 2023 (UTC)
Just checked my LocalSettings.php. I have this note: "had to git checkout 3.4.6 as 3.5.0 requires MW1.39+". Jonathan3 (talk) 17:55, 30 June 2023 (UTC)
I am on version 1.35.10 and downloaded dpl for 1.35 Chittakk (talk) 11:22, 3 July 2023 (UTC)
what does this mean? had to git checkout 3.4.6 as 3.5.0 requires MW1.39+". Chittakk (talk) 11:23, 3 July 2023 (UTC)
If you're downloading the extension via git, you can type "git checkout ..." (e.g. "git checkout 3.4.6") to use an older version of the extension than the master branch. It was the changes since that tagged version that made it incompatible with MW 1.35. There are other ways to get old versions of extensions and it sounds as though you have done that. Jonathan3 (talk) 13:06, 3 July 2023 (UTC)

Wikimedia\Rdbms\DBQueryError from line 1713 of /../w/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?

I got this error message when attempting to edit a page after the upgrade from MediaWiki 1.31.x to MediaWiki 1.35.x:

[a1a50a8a74c9a9a773153922] /w/index.php?title=MediaWiki:Sitenotice&action=submit Wikimedia\Rdbms\DBQueryError from line 1713 of /../w/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 1364: Field 'old_comment' doesn't have a default value (localhost)
Function: MediaWiki\Storage\SqlBlobStore::storeBlob
Query: INSERT INTO `text` (old_id,old_text,old_flags) VALUES (NULL,'Die Software des Wikis wird bis voraussichtlich 13 Uhr aktualisiert. Daher kann das Wiki nicht bearbeitet werden.','utf-8')

Backtrace:

#0 /../w/includes/libs/rdbms/database/Database.php(1697): Wikimedia\Rdbms\Database->getQueryException(string, integer, string, string)
#1 /../w/includes/libs/rdbms/database/Database.php(1672): Wikimedia\Rdbms\Database->getQueryExceptionAndLog(string, integer, string, string)
#2 /../w/includes/libs/rdbms/database/Database.php(1241): Wikimedia\Rdbms\Database->reportQueryError(string, integer, string, string, boolean)
#3 /../w/includes/libs/rdbms/database/Database.php(2357): Wikimedia\Rdbms\Database->query(string, string, integer)
#4 /../w/includes/libs/rdbms/database/Database.php(2337): Wikimedia\Rdbms\Database->doInsert(string, array, string)
#5 /../w/includes/libs/rdbms/database/DBConnRef.php(68): Wikimedia\Rdbms\Database->insert(string, array, string)
#6 /../w/includes/libs/rdbms/database/DBConnRef.php(369): Wikimedia\Rdbms\DBConnRef->__call(string, array)
#7 /../w/includes/Storage/SqlBlobStore.php(254): Wikimedia\Rdbms\DBConnRef->insert(string, array, string)
#8 /../w/includes/Revision/RevisionStore.php(789): MediaWiki\Storage\SqlBlobStore->storeBlob(string, array)
#9 /../w/includes/Revision/RevisionStore.php(559): MediaWiki\Revision\RevisionStore->storeContentBlob(MediaWiki\Revision\SlotRecord, Title, array)
#10 /../w/includes/Revision/RevisionStore.php(523): MediaWiki\Revision\RevisionStore->insertSlotOn(Wikimedia\Rdbms\DatabaseMysqli, integer, MediaWiki\Revision\SlotRecord, Title, array)
#11 /../w/includes/Revision/RevisionStore.php(419): MediaWiki\Revision\RevisionStore->insertRevisionInternal(MediaWiki\Revision\MutableRevisionRecord, Wikimedia\Rdbms\DatabaseMysqli, User, CommentStoreComment, Title, integer, integer)
#12 /../w/includes/libs/rdbms/database/Database.php(4473): MediaWiki\Revision\RevisionStore->MediaWiki\Revision\{closure}(Wikimedia\Rdbms\DatabaseMysqli, string)
#13 /../w/includes/libs/rdbms/database/DBConnRef.php(68): Wikimedia\Rdbms\Database->doAtomicSection(string, Closure)
#14 /../w/includes/libs/rdbms/database/DBConnRef.php(641): Wikimedia\Rdbms\DBConnRef->__call(string, array)
#15 /../w/includes/Revision/RevisionStore.php(427): Wikimedia\Rdbms\DBConnRef->doAtomicSection(string, Closure)
#16 /../w/includes/Storage/PageUpdater.php(1073): MediaWiki\Revision\RevisionStore->insertRevisionOn(MediaWiki\Revision\MutableRevisionRecord, Wikimedia\Rdbms\DBConnRef)
#17 /../w/includes/Storage/PageUpdater.php(794): MediaWiki\Storage\PageUpdater->doModify(CommentStoreComment, User, integer)
#18 /../w/includes/page/WikiPage.php(2015): MediaWiki\Storage\PageUpdater->saveRevision(CommentStoreComment, integer)
#19 /../w/includes/EditPage.php(2459): WikiPage->doEditContent(WikitextContent, CommentStoreComment, integer, boolean, User, string, array, integer)
#20 /../w/includes/EditPage.php(1726): EditPage->internalAttemptSave(array, boolean)
#21 /../w/includes/EditPage.php(680): EditPage->attemptSave(array)
#22 /../w/includes/actions/EditAction.php(71): EditPage->edit()
#23 /../w/includes/actions/SubmitAction.php(38): EditAction->show()
#24 /../w/includes/MediaWiki.php(531): SubmitAction->show()
#25 /../w/includes/MediaWiki.php(313): MediaWiki->performAction(Article, Title)
#26 /../w/includes/MediaWiki.php(947): MediaWiki->performRequest()
#27 /../w/includes/MediaWiki.php(547): MediaWiki->main()
#28 /../w/index.php(53): MediaWiki->run()
#29 /../w/index.php(46): wfIndexMain()
#30 {main}

Browsing, diffing etc, was working perfectly, so why is editing not working? I am going to self answer to chare my experience and providing the solution. 2003:F1:C738:C000:910B:20AE:3FB:547B (talk) 17:30, 30 June 2023 (UTC)

It happens that the "text" table of the said database still hat the pre MediaWiki 1.4.x filelds "ld_id", "old_namespace", "old_title", "old_text", "old_comment", "old_user", "old_user_text", "old_timestamp", "old_minor_edit", "old_flags", and "inverse_timestamp" in place. After a bit of investigation and the big help from the chat we found out that all fields except for "old_id", "old_text", and "old_flags" need to be deleted as advised on Manual:Old table. After doing also editing worked perfectly.
At least the MediaWiki versions until version 1.31 did still work with these fields presen, MediaWiki 1.35 and later do not.
This issue will only appear if your MediaWiki instance was installed in a pre 1.4 version, that said wiki started out with MediaWiki 1.3, and if these transgressing fields were not yet deleted. 2003:F1:C738:C000:910B:20AE:3FB:547B (talk) 17:40, 30 June 2023 (UTC)
An early MediaWiki adopter! I think I started with about 1.6 (in 2006). Which chat do you use? I might use it when I run into difficulties in future. Thanks. Jonathan3 (talk) 17:47, 30 June 2023 (UTC)
Yeah, this wiki started with 1.3.x in 2004. I used the #mediawiki channel at Libero Chat. This is the log: "ogs/%23mediawiki/20230630.txt" Please prefix with //wm-bot.wmcloud.org/ since I am unable to add the full link due to abuse filter blocking (⧼abusefilter-warning-linkspam⧽) 2003:F1:C738:C000:910B:20AE:3FB:547B (talk) 17:56, 30 June 2023 (UTC)

Error contacting the Parsoid/RESTBase server (HTTP 500)

I'm getting this error every time I try to create a new page in Visual Editor or edit a page with visual editor. I'm seeing a lot of different posts on this in the past with no much clear resolution. Any insight? I'm running this application within a container. Waterlooglass (talk) 19:34, 30 June 2023 (UTC)

VisualEditor sometimes uses connections to itself. It is likely that doesn't work from within the container. Im not sure what the config is but you should be able to override what url it reaches out to in config. Bawolff (talk) 12:02, 1 July 2023 (UTC)
Thanks so much, do you know what folder I can check the config? Waterlooglass (talk) 15:14, 3 July 2023 (UTC)

URL keeps reverting to IP address

I've set $wgServer to my server's hostname several times. However, something keeps overwriting the value to use the IP address instead. Any ideas on what to check or how to fix this? Capple-gca (talk) 22:39, 30 June 2023 (UTC)

You probably have it set twice, and incorrectly the second time? 70.29.239.49 (talk) 02:10, 1 July 2023 (UTC)
Only once - the issue is that when I update it to include the hostname, eventually, it reverts to the server's IP address in LocalSettings.php Capple-gca (talk) 16:42, 7 July 2023 (UTC)
Keep in mind that, after changing $wgServer, the HTML of most pages are cached.
Try to manually set Manual:$wgCacheEpoch Ciencia Al Poder (talk) 11:32, 1 July 2023 (UTC)
I gave that a shot. I also found something that may have been related because I also noticed that whatever was overwriting the hostname with IP address was forcing all interactions to revert back to HTTP from HTTPS. I reset $wgServer to the hostname, added the $wgCacheEpoch parameter as suggested, and then added $wgForceHTTPS = true.
An even more bizarre detail is that we even set LocalSettings.php to be read-only as a means of preventing whatever was overwriting hostname with IP address - but the IP address still showed up.
I'll give this overnight to see if those changes were a fix. Capple-gca (talk) 17:05, 7 July 2023 (UTC)
This does, indeed, appear to be a fix. So far, the IP address gremlin is banished. Capple-gca (talk) 04:01, 9 July 2023 (UTC)
If you edit LocalSettings.php (but not counting files included by LocalSettings.php) cache gets cleared automatically. I would suspect most redirects arent cached but maybe browsers cache some.
$wgServer (or related variables) are the most likely candidate, but this can also be caused by rewrite rules in .htaccess or other web server config.
If your website is public,linking to it would be helpful. Bawolff (talk) 11:55, 1 July 2023 (UTC)
It is accessible but in what I'll call almost an "alpha" stage of development:
act.globalcyberalliance.org Capple-gca (talk) 18:53, 5 July 2023 (UTC)
Your $wgServer is set to an IP address.
https://act.globalcyberalliance.org/api.php?action=query&format=json&meta=siteinfo&siprop=general&format=jsonfm
Review your LocalSettings again. If in doubt, deliberately introduce some syntax error (like adding XXXXX at the end of the file) and if the wiki doesn't break that means you're not editing/viewing the LocalSettings.php file in use by the wiki. Ciencia Al Poder (talk) 20:53, 5 July 2023 (UTC)
It's definitely the correct file based on the troubleshooting advice you gave. Thank you. Capple-gca (talk) 16:49, 7 July 2023 (UTC)
I can see that in the LocalSettings.php file as well. Even when I change it back to the hostname and save the file, something is replacing it with the IP address after I do that. I'll try out the troubleshooting advice though to see if that sheds light on what may be happening. Capple-gca (talk) 01:15, 7 July 2023 (UTC)
You are saying something is editing the LocalSettings.php file? MediaWiki does not edit the LocalSettings.php file under any circumstances, so it would have to be something you setup. Bawolff (talk) 11:50, 9 July 2023 (UTC)
It was likely an interaction between the web server and Mediawiki. The fixes that I posted about appear to have resolved the issue. Capple-gca (talk) 15:07, 12 July 2023 (UTC)
Category:Pages with reference errors Category:Support desk archives Category:Support desk archives with broken file links