Jump to content

Project:Support desk/Flow/2021/12

Add topic
From mediawiki.org
Latest comment: 3 years ago by 195.68.180.51 in topic Page contents missing
This page is an archive.
Please ask questions on the current support desk.


Infobox width inside

hi


FOr testing purposes I exported some pages from wikipedia and imported them into my mediawiki. All of them have infoboxes on the right. All of them work correctly on my mediawiki as well.

Now I`m trying myself on a own infobox template. Basically it is working, correct size, correct position... the only thing thats not correct is the split inside the infobox. while on other infoboxes the names of the items takes about 20% of the width and the actual information takes 80%, on my template is about the opposite.


year: 1984

color: blue


in my example 1984 and blue show on the very right, 20% of the width.

How can I change that? BugDroid (talk) 13:51, 1 December 2021 (UTC)

Its probably related to some css in Mediawiki:common.css
Generally you would fix this by setting a width in css for the first cell in one of the columns (either via mediawiki:common.css or style attribute)
Help:tables might have some useful info. Bawolff (talk) 16:55, 1 December 2021 (UTC)

DOM loading stuck on MediaWiki

Hi, I am using MW 1.34.2 and have been having some issues with custom Javascript code.

In one os my scripts I need to run some code after the page is loaded, so I use document.addEventListener("DOMContentLoaded",myFunction, false);. However, the DOMContentLoaded event never gets triggered. Using Chrome Dev Tools to "watch" document.readyState, I noticed it never leaves the 'loading' stage.

This property can be 'loading', 'interactive' or 'complete' and (I recently learned that) once it gets to 'complete' the DOMContentLoaded is triggered. The "loading" wheel on my Chrome tab stops spinning and all content on the page seems to be in place, but document.readyState is still stuck in 'loading'. Something is preventing completion of the loading process, thus causing my scripts to never run.

(Actually, sometimes document.readyState eventually turns to 'complete', but it takes several minutes, so it might be something timming out, instead of failing... not sure).

I have tried changing my skin and disabling all my custom scripts, to no avail.

There are some errors / warnings on my console after loading any page on the wiki. From what I was able to figure out (googling) they do not seem to be the issue, but still, here is the output:

 P%C3%A1gina_principal:1 Unchecked runtime.lastError: The message port closed before a response was received.
  P%C3%A1gina_principal:1 Unchecked runtime.lastError: The message port closed before a response was received.
  P%C3%A1gina_principal:1 Unchecked runtime.lastError: The message port closed before a response was received.
  load.php?lang=pt-br&…s&version=1j8oy:144 JQMIGRATE: Migrate is installed with logging active, version 3.0.1
  VM97:105 This page is using the deprecated ResourceLoader module "jquery.tabIndex".
  P%C3%A1gina_principal:1 Mixed Content: The page at 'https://www.mydomain.com/wiki/P%C3%A1gina_principal' was loaded over HTTPS, but requested an insecure favicon 'http://www.mydomain.com/wiki/Favicon.ico'. This request has been blocked; the content must be served over HTTPS.
  P%C3%A1gina_principal:1 The resource https://www.mydomain.com/w/logo_wiki.png?bda1e was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.

Any thoughts will be greatly appreciated.

Thanks in advance

 Rbirmann (talk) 14:54, 1 December 2021 (UTC)
The Unchecked runtime.lastError: The message port closed before a response was received is kind of weird sounding and one i havent heard of before. I would investigate that one.
I would check network tab to see if any connections are just sitting there waiting.
It sounds like it could be some sort of weird misconfiguration between http/2, content-length headeds and gzip - bit of a long shot but check if $wgDisableOutputCompression affects anything. I would check config related to those things generally. Also try loading a page with curl -v to see if it gives any warnings (sometimes curl is better at giving warnings than web browsers) Bawolff (talk) 16:53, 1 December 2021 (UTC)
Thanks @Bawolff!! The tip of checking the Network tabs was very useful. In my case, my antivirus software (Kapersky) was injecting a script in all pages and that script never loaded, preventing the document loading to complete. I have disabled JS injection from Kapersky altogether (too bad they only have a global settings instead of a whitelist option) and now my scripts fire normally.
It is still odd however that the injected script doesn't seem to be causing any other sites to halt. At least I wasn't able to notice it anywhere else. Not even Wikipedia or other MediaWiki sites. Rbirmann (talk) 00:30, 6 December 2021 (UTC)
If your site is http and not https, it might only be injecting into http sites or something like that. Bawolff (talk) 09:18, 6 December 2021 (UTC)

How do I host a wiki locally?

How can I host a wiki locally from my computer that only I can access? Maybe something similar to DokuWiki on a Stick Wortwortwort3 (talk) 19:41, 1 December 2021 (UTC)

Some years ago I used Denwer for local server. I can install any CMS using it. Fokebox (talk) 08:37, 2 December 2021 (UTC)
Generally the same way as you would install mediawiki on a server.
Install apache and php (i would suggest using sqlite for db in this case, which doesnt require installing anything),install mediawiki.
There are also docker images if you like docker. Bawolff (talk) 09:13, 2 December 2021 (UTC)

Update Mediawiki 1.23.5 version to latest

Hello there,
I would like to know is there a way to update my 1.23.5 of mediawiki to the latest stable version i.e 1.37? If so can you please help me.
Regards Maddyyard (talk) 07:33, 2 December 2021 (UTC)
And I would suggest to make update to LTS versions. 1.23.5 to 1.27 then to 1.31 then to 1.35.
As for 1.37 I tried to install it but I faced some php errors of this version. Fokebox (talk) 08:22, 2 December 2021 (UTC)
Hi, see Manual:Upgrading linked from the frontpage. Malyacko (talk) 08:13, 2 December 2021 (UTC)
Yes, that page says "Since Version 1.36, MediaWiki only commits to supporting upgrades from two LTS releases ago (see phab:T259771). Upgrades from older versions of MediaWiki will have to be performed in multiple steps. This means that if you want to upgrade to 1.36 from 1.23 or earlier, you'll first have to upgrade your 1.23 wiki to 1.27 (or 1.35), and, from 1.27 (or 1.35), you'll be able to upgrade to 1.36."
So you could either go from 1.23 --> 1.27 --> 1.37
or 1.23 --> 1.35 --> 1.37 Jonathan3 (talk) 22:07, 4 December 2021 (UTC)

Text automatically appearing on pages with a specific category?

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,


is it possible to have some specific text/content appear in a custom place of all pages belonging to an individual category? My use case is that we have pages in the category "Archive". We want to show a kind of banner at the top of the these pages only, so it should only appear when the page is in the "Archive" category.


I know about templates that can be used to include a predefined text on any page - but this is not automatic since I would need to manually include the template on any page I put into the "Archive" category. I would like to have the text included automatically as soon as the page is put into the category "Archive".


Is there a way to achieve this? TorstenBerg (talk) 08:43, 2 December 2021 (UTC)

Usually people have the template put the page in the category, so its automatic for anything with the template.
There's probably things you can do with either js or php extensions.
See also extension:PageInCat (maybe combined with mediawiki:sitenotice. Not sure if sitenotice is rendered per page) Bawolff (talk) 09:10, 2 December 2021 (UTC)
Thanks for the help! So I now did what you suggested: instead of writing the category "Archive" directly into the page using the "Category" mechanism, I just use the template for the archive. The template will then add the category itself and add the info box at the top of the page. Quite handy and easy enough, as it also allows users with access to the template to change the info text! TorstenBerg (talk) 10:35, 2 December 2021 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Most Special:SpecialPages will not load after upgrade

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


After upgrading from 1.31 to 1.37, I am unable to get into Special:SpecialPages, but the rest of the site seems to be working fine, including the ability to Log In, view Version, and even to reset the password, which is Special:PasswordReset. This is the error:

Warning: require(/opt/app-root/src/includes/specials/SpecialDeadendPages.php): failed to open stream: No such file or directory in /opt/app-root/src/includes/AutoLoader.php on line 117

Fatal error: require(): Failed opening required '/opt/app-root/src/includes/specials/SpecialDeadendPages.php' (include_path='/opt/app-root/src/vendor/pear/console_getopt:/opt/app-root/src/vendor/pear/mail:/opt/app-root/src/vendor/pear/mail_mime:/opt/app-root/src/vendor/pear/net_smtp:/opt/app-root/src/vendor/pear/net_socket:/opt/app-root/src/vendor/pear/net_url2:/opt/app-root/src/vendor/pear/pear-core-minimal/src:/opt/app-root/src/vendor/pear/pear_exception:.:/opt/app-root/src:/usr/share/pear') in /opt/app-root/src/includes/AutoLoader.php on line 117

Here's my version info: https://www.coraldigest.org/index.php/Special:Version

This is hosted on in a RedHat OpenShift environment at my University. I've had issues before, mostly related to Composer, and it could be that it's here again.

To build this, I downloaded the 1.37 zip folder, unzipped, copied in my LocalSetting.php and images directory, removed mw-config, and updated the Tweeki skin. I then send it on to a private repository that triggers the build on OpenShift. After the initial build, I ran the maintenance/update.php script to update the database.

Any thoughts on how I can overcome this issue, as I need to be able to manage the site once logged in. Thanks! Brian.unc (talk) 20:27, 2 December 2021 (UTC)

When Special:SpecialPages crashes, it is generally the fault of an extension providing a special page and the given special page fails to initialise. Here it seems to be Special:DeadendPages, which is a core special page.
It seems unlikely to be related to Composer since this file is managed by the core of MediaWiki and its autoloader (/opt/app-root/src/includes/AutoLoader.php and a list of classes in /opt/app-root/src/autoload.php).
Did you verify the file /opt/app-root/src/includes/specials/SpecialDeadendPages.php is really present? (possibly removed by mistake?)
Other PHP files for special pages seems to be missing: Special:ShortPages, Special:UncategorizedPages, and possibly others. ~ Seb35 [^_^] 09:48, 3 December 2021 (UTC)
Sometimes this happens if you extract a new version of mediawiki on top of an old one, and have a mix of files from both versions present.
I would suggest reinstalling mediawiki into a clean directory (keeping LocalSettings.php, images, and extensions directories of course) Bawolff (talk) 10:25, 3 December 2021 (UTC)
It was a clean install, aside from images and LocalSettings.php. I have checked to verify that Special:DeadendPages and the others that have failed are, indeed, present. I will try another clean install to see if that helps. Brian.unc (talk) 13:26, 3 December 2021 (UTC)
You verified that /opt/app-root/src/includes/specials/SpecialDeadendPages.php was present? (With that exact case and spelling?)
It would be very odd to get that error message if the file was actually present. Bawolff (talk) 14:10, 3 December 2021 (UTC)
Yes, it's there... I started wondering if somehow the directory wasn't readable, but that wasn't the case, either. Brian.unc (talk) 14:45, 3 December 2021 (UTC)
Could it be selinux related? Although i would expect a different error. Bawolff (talk) 15:24, 3 December 2021 (UTC)
OK, a completely new redeploy has fixed the error. I believe that there were some artifacts left over from the previous installation in my repository that I did not properly clean up using git rm that created the strange behavior. Lesson to all - make sure you keep your git repositories clean! Brian.unc (talk) 17:07, 3 December 2021 (UTC)
Indeed, probably a security feature. If not linked to SELinux, it could be the PHP parameter open_basedir.
(I replied before seeing the last answer -- can be ignored then.) ~ Seb35 [^_^] 17:17, 3 December 2021 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Licensing Help

Hello, id like to have my wiki use CC-BY License. If i use that license, can i still add pictures that are licensed under CC-BY-NC?
On the very bottom of the page it states "Content is available under CC-BY if not stated otherwise". Is it enough if on the file page it says that that its a NC license or would i have to put that in the image description on the contant page? 2003:ED:1F03:BB00:41DB:6553:6201:CE3D (talk) 21:16, 3 December 2021 (UTC)
This seems not related to MediaWiki itself. For general content licensing questions, please ask in a legal forum. Thanks. Malyacko (talk) 04:25, 4 December 2021 (UTC)
You should talk to a lawyer if you want to know for sure (or at least ask in a creative commons form), but it should be noted that lots of websites do that sort of thing. Bawolff (talk) 04:31, 4 December 2021 (UTC)

content in diferent languages

hi

I want to make my wiki available in two languages, not by a translator, but writing the 2 pages myself, and then having the option for the user to simply switch an article between the 2 languages.

What is the best way to achieve this? 181.62.255.97 (talk) 04:00, 4 December 2021 (UTC)

There are three different ways people use:

Я подтверждаю свой email aleksejnetreba25681@gmail.com

Я подтверждаю мой email aleksejnetreba25681@gmail.com почему мне не приходят Ваши сообщения на этот почтовый ящик 2A00:1FA1:418A:A382:DD09:842F:9781:A638 (talk) 12:38, 4 December 2021 (UTC)

Specifically which messages are you talking about?
For receiving email notifications, make sure your settings are correct at Special:Preferences#mw-prefsection-echo. AhmadF.Cheema (talk) 13:33, 4 December 2021 (UTC)

1.31 to 1.39 in one step?

Will that be possible or one has to go via 1.35? Spiros71 (talk) 19:13, 4 December 2021 (UTC)

Should be fine. Bawolff (talk) 21:27, 4 December 2021 (UTC)

linking existing contributions to new user account

I've been making modest contributions monthly for some time but evidently had not created a user name. Now that I've done that how do I connect my contributions to my log in so I stop seeing the fundraising requests? Thank you. Srgreene76 (talk) 22:56, 4 December 2021 (UTC)

Use visual editor in LAN-only mediawiki

So, I made a LAN-Only mediawiki for sharing of information about a project here that I don't want to make public

I tried enabling the visualeditor, but I had 3 problems with it:

The first one was a HTTP error, which I solved by enabling SSL on the server, the second one was a cURL error, because the SSL wasn't trusted, so I added the self-signed certificate as a trusted certificate to the apache2 configurations, but now I'm getting a HTTP 500 error which I'm not being able to find the source because it doesn't even get put into PHP error logs... So... How do I go about debugging it?

"Error contacting the Parsoid/RESTBase server (HTTP 500)" RMisaki (talk) 01:04, 5 December 2021 (UTC)

Thats a restbase error so its more likely to be parsoid logs not php.
Newer versions of mediawiki use php parsoid i think (i havent fully kept up with it) which might be easier. Try using the latest version. Bawolff (talk) 05:10, 5 December 2021 (UTC)
I am using the latest (or at least very recent) version with PHP Parsoid, but I don't know where to look for the error logs for Parsoid, if I knew what was causing the server error I'd go and fix it, but unfortunately, I don't have a clue... RMisaki (talk) 08:13, 5 December 2021 (UTC)

hi


I installed 3 wikis on my hostgator hosting:

mypage.com/en.mywiki

mypage.com/es.mywiki

mypage.com/pool.mywiki


on the first 2 I removed the folders docs, extensions, includes, languages, maintenance, resources, skins, tests and vendor; in order to save space, according to Manual:Wiki family/pl#Multiple wikis sharing common resources

now I should create symlinks and modifiy some configuration files. I`m not sure how to do this. IMHO the instructions on the page above are rather confusing. Can someone shine some light on this please? BugDroid (talk) 03:31, 5 December 2021 (UTC)

nobody? BugDroid (talk) 16:12, 6 December 2021 (UTC)

How to intigrate a forum system into my mediawiki

Hello, I would like to ask if anyone knows how to integrate a forum system into mediawiki (not just the typical discussion page thing on mediawiki and wikipedia, but would replace the discussion page for each page as well as have a general forum age), such as something like phpBB. Thanks Guillaume Taillefer (talk) 04:22, 5 December 2021 (UTC)

See Extension:DPLforum (use-case examples are linked to at the bottom of that page). You can also try Extension:WikiForum, see if it still works.
In case there is going to be extensive use of forums on your site, maybe it would be better to use a separate dedicated forum application for this purpose, instead of relying on MediaWiki's less ideal solutions. AhmadF.Cheema (talk) 14:02, 5 December 2021 (UTC)
I was planning on just relying on a separate application (probably phpBB), do you think it would be best if when you click on a discussion page link it will just like to the page of that discussion page in the application? For example if you were on article number 3450 and you click on discussion page then it would bring you to the forum page for article number 3450. Thanks Guillaume Taillefer (talk) 14:25, 5 December 2021 (UTC)
I don't have much experience in this, but my guess would be that if the discussions are expected to be short, then StructuredDiscussions (this is the method used on this page) seems more comfortable for users, but if the discussions are going to be very detailed with lengthy walls of text, then the present default talk pages might be better.
I personally feel that with paginated (divided into multiple pages) forums like phpBB, casual users might not bother going through the trouble of clicking through each page. On the other hand, MediaWiki discussion pages have everything on one page, it isn't very aesthetic (can be helped through better skins), but casual users participation seems more likely. AhmadF.Cheema (talk) 15:01, 5 December 2021 (UTC)
thank you for the response, I don't think that the length and depth of the amount of pages will be an issue because this is a history/scholarly oriented website that I am creating Guillaume Taillefer (talk) 15:30, 5 December 2021 (UTC)

Not sure how to make my site mobile friendly

I'm a Windows PC kind of guy with a tiny personal wiki (I'm the only editor). I'm making some new game content that will probably attract mostly folks using cellphones for browsing.

When I try to google about making my site mobile-friendly, I find lots of pages about "what to avoid". I don't need this (yet); I simply don't know how to make it mobile at all (yet).

It's hard to find something that just straight-up seems to say "use this to make your site mobile friendly". For example, when I go to Wikipedia, it looks better on my phone and I notice that all the URLs have a "m" in front of them (m.wikipedia.com). But I can't simply put an "m" in front of my little site's URL; it just breaks it.

Based on what I can infer, I am thinking I probably need Extension:MobileFrontend. Is that sort of the standard pick for "making your site mobile"?

If I do that, will it automatically sense mobile vs. PC users, and interact relative to that?

Thanks if you can help! RedKnight7 (talk) 14:51, 5 December 2021 (UTC)

Yes, pretty much all you need is Extension:MobileFrontend; it will automatically detect users' device as mobile or PC and send them to the appropriate version. On a side note, the "m" in front like (m.wikipedia.org) is a separate configuration, you shouldn't need it. AhmadF.Cheema (talk) 15:58, 5 December 2021 (UTC)
Yes this seems to do the trick. I'm such an amateur I don't know just what to check, lol. But it's no longer cluttering up with the PC navbar on my phone, etc. And pictures and figures seem to come through just fine.
Right... my bad; it's wikipedia.org. I knew better. Guess it slipped through the mental cracks. Of which I have plenty, laugh.
Thanks! RedKnight7 (talk) 16:47, 9 December 2021 (UTC)
Or use a responsive skin like Foreground. Jonathan3 (talk) 23:14, 5 December 2021 (UTC)

Specific Questions, or sharing data type blogs

How does one ask a specific question concerning a movie that is not answered in Wikipedia, Maybe someone else out there would know the answer!
For example: In the 1937 movie called "Dead End" Humphrey Bogart rarely moves his right arm. What is that all about? There is no source to enlist this question. Those outside of the Wikipedia Staff.
It would be nice, on the same page as the "Dead End" write up is given, I could ask all those who viewed this movie and know why. Pmcoms (talk) 17:05, 5 December 2021 (UTC)
This is a question for that Wikipedia, and does not seem to be a question about the MediaWiki software. If this is about English Wikipedia, then see w:en:Wikipedia:Questions. Malyacko (talk) 20:35, 5 December 2021 (UTC)
Generally speaking, Wikipedia staff doesn't work on articles, the articles' content is written by volunteers. Regarding asking questions about specific articles, the appropriate place on Wikipedia are the corresponding Talk pages, see Talk:Dead End (1937 film). If no one answers there, you'll have to try your luck at other question/answer forums like Quora etc. AhmadF.Cheema (talk) 17:28, 5 December 2021 (UTC)

Fatal exception of type Wikimedia\Rdbms\DBQueryError

When I try to search for any non-existent page on my wiki to create it, I get the Fatal exception of type Wikimedia\Rdbms\DBQueryError Error. Below is the full error message.


I am running:

- Mediawiki 1.37.0

- PHP 7.3.31

- MySQL 8.0.27

- Apache2 2.4.38 (on Debian)


I have already tried the 'php update.php' command in the maintenance folder, but this has not fixed the problem.

I would really appreciate any help on this!


Full error message:

[08e69f8afcb416571eb11ba6] /wiki/index.php?search=common&title=Special%3ASearch&go=Go 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 'wikisci_database.searchindex' doesn't exist (34.123.24.126)

Function: SearchMySQL::searchInternal

Query: SELECT page_id,page_namespace,page_title FROM `page`,`searchindex` WHERE (page_id=si_page) AND ( MATCH(si_title) AGAINST('+common ' IN BOOLEAN MODE) ) AND page_namespace = 0 ORDER BY MATCH(si_title) AGAINST('+common ' IN NATURAL LANGUAGE MODE) DESC LIMIT 21

Backtrace:

from /var/lib/mediawiki/includes/libs/rdbms/database/Database.php(1809)

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

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

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

#3 /var/lib/mediawiki/includes/libs/rdbms/database/Database.php(2012): Wikimedia\Rdbms\Database->query(string, string, integer)

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

#5 /var/lib/mediawiki/includes/libs/rdbms/database/DBConnRef.php(324): Wikimedia\Rdbms\DBConnRef->__call(string, array)

#6 /var/lib/mediawiki/includes/search/SearchMySQL.php(196): Wikimedia\Rdbms\DBConnRef->select(array, array, array, string, array, array)

#7 /var/lib/mediawiki/includes/search/SearchMySQL.php(182): SearchMySQL->searchInternal(string, boolean)

#8 /var/lib/mediawiki/includes/search/SearchDatabase.php(74): SearchMySQL->doSearchTitleInDB(string)

#9 /var/lib/mediawiki/includes/search/SearchEngine.php(156): SearchDatabase->doSearchTitle(string)

#10 /var/lib/mediawiki/includes/search/SearchEngine.php(187): SearchEngine->{closure}()

#11 /var/lib/mediawiki/includes/search/SearchEngine.php(157): SearchEngine->maybePaginate(Closure)

#12 /var/lib/mediawiki/includes/specials/SpecialSearch.php(447): SearchEngine->searchTitle(string)

#13 /var/lib/mediawiki/includes/specials/SpecialSearch.php(228): SpecialSearch->showResults(string)

#14 /var/lib/mediawiki/includes/specialpage/SpecialPage.php(647): SpecialSearch->execute(NULL)

#15 /var/lib/mediawiki/includes/specialpage/SpecialPageFactory.php(1366): SpecialPage->run(NULL)

#16 /var/lib/mediawiki/includes/MediaWiki.php(314): MediaWiki\SpecialPage\SpecialPageFactory->executePath(string, RequestContext)

#17 /var/lib/mediawiki/includes/MediaWiki.php(925): MediaWiki->performRequest()

#18 /var/lib/mediawiki/includes/MediaWiki.php(559): MediaWiki->main()

#19 /var/lib/mediawiki/index.php(53): MediaWiki->run()

#20 /var/lib/mediawiki/index.php(46): wfIndexMain()

#21 {main} LJMWiki (talk) 23:55, 5 December 2021 (UTC)

Your database is missing the searchindex table.
You may create it yourself and then run the rebuildtextindex.php script. You can find the CREATE TABLE SQL statement inside the maintenance/tables.sql script. Ciencia Al Poder (talk) 12:17, 6 December 2021 (UTC)

Replacing image logo of a company

How do I replace an outdated image on a Wikipedia Commons page? Twigglee (talk) 02:53, 6 December 2021 (UTC)

For policies on some website (e.g. Wikimedia Commons), please ask on that website. See e.g. c:Commons:Overwriting existing files Malyacko (talk) 09:14, 6 December 2021 (UTC)

Comment inside the Article

Hi

Let's say there are many paragraphs inside an article.

Is there a way to let users click the "Comment" button, and let users comment and other to reply in-between the paragraphs?

thanks 147.8.16.195 (talk) 07:50, 6 December 2021 (UTC)

The closest solution I came across is to use separate annotation extensions. See this TechRepublic article (the first one, genius, seems to now be obsolete). AhmadF.Cheema (talk) 04:52, 7 December 2021 (UTC)

Importing All the categories from wikipedia to my wiki

Hello Everyone I need help Importing all the categories namespace on Wikipedia to my wiki...

I know about this https://en.wikipedia.org/wiki/Special:Export But is there not a way I can import everything in one file..??? Please i need help/ suggestion on how to easily import all page on categories name space to my namespace Thatnewman (talk) 14:19, 6 December 2021 (UTC)

If import big files use commandline manual:importDump.php instead of special:import.
Also keep in mind that the text on category pages is very different then what pages are in the category (the categorylinks table - there is a special dump for that.) Bawolff (talk) 22:39, 6 December 2021 (UTC)
Sorry Sir i don get you, you mean ? I will create a importDump.php file? and add php importDump.php --conf ../LocalSettings.php /path_to/dumpfile.xml.gz
How will i add it to import from wikipedia site.. sorry i am a newbi
or how sir
I found the dump file https://dumps.wikimedia.org/enwiki/20211120/ which one will i downlaod and where do i install them Thatnewman (talk) 01:44, 7 December 2021 (UTC)
You already have the importDump.php file it is in the maintenance directory. You have to use commandline (ssh or puTTY). You have to run (replace wiki with path to your wiki)
cd wiki/maintenance
php importDump.php /path/to/dump
I would suggest reading an intro tutorial on using linux commandline. Bawolff (talk) 04:44, 7 December 2021 (UTC)

Help! A bunch of new spam accounts!

Hi, I have a tiny personal wiki. I kept Account Creation off because I was the only person using it.

Yesterday I turned Account Creation on to let a bona fide colleague make an account and come edit.

This morning I looked at Recent Changes to see what they did and was shocked to find over a hundred new users and pages. 127 bogus new users in fact, over the course of 20 hours and 39 minutes (that's about 1 new user every 10 minutes).

At a glance, it looks like each one made one new page. All on ridiculous stuff like "Good Webpage Design Planning", "Ten Wonderful Led linear Light Hacks", "Hello I am a Danish female", User pages, Online Slot Tournaments ... you name it.

As soon as I saw what was happening, I turned off Account Creation a couple of hours ago. However there continue to be new pages added by the bogus accounts after I turned off Account Creation.

With over a hundred bogus accounts and pages, it would be a super hassle to individually revoke rights and delete users and pages.

Is there some way to do it en masse? Like a page that has a checklist, "delete this user and all edits and pages made by them?" Then I could just checkmark it for the 127 accounts. It would be great to simply remove all that b.s. from my logs and pages so it remains just "my" site when I look back on historical edit logs, etc.

When I google on this, the results are oriented toward non-tiny sites trying to keep spam on their site to a minimum. I don't see anything oriented toward "how to kill a lot of users and their pages all at once".

A quick reply will be appreciated. :-)

P.S. I am using MW v. 1.35.1. I did a backup of my wiki folders shortly before turning on account creation. I guess I could restore that but I'm not sure I'd do it right. Plus I'd have to tiptoe all around the new bona fide edits made by my colleague (on maybe 8 pages). Not impossible, but a hassle plus quite embarrassing to me for this person who kindly volunteered to help me with some pages. "No wait - stop editing, stop editing! Make your account again! Make all your changes again!", lol RedKnight7 (talk) 14:40, 6 December 2021 (UTC)

Extension:Nuke. Clump (talk) 14:57, 6 December 2021 (UTC)
That looks enticing but it only applies to deleting pages, not users themselves. Also it doesn't remove the pages from history.
Still it's much better than doing it all manually. I thank you for that. RedKnight7 (talk) 15:02, 6 December 2021 (UTC)
There's also more info on Manual:Combating spam and Manual:Combating vandalism. The latter has advice on clean-up. Clump (talk) 15:58, 6 December 2021 (UTC)
I've had this. I used Manual:removeUnusedAccounts.php to get rid of the spam accounts, and Extension:ConfirmEdit with QuestyCaptcha to prevent new ones. Jonathan3 (talk) 23:06, 6 December 2021 (UTC)

Is this a valid way to wipe and restore my entire wiki?

Hi, I have a tiny personal wiki that only I can edit. Yesterday I invited somebody else to edit it; that worked fine. But I made the mistake of leaving Account Creation on overnight and got over a hundred new spam accounts and pages (details here).

Fortunately, I archived my whole wiki just prior to turning on Account Creation. Rather than dealing with all the new bogus users and pages (and clutter in my logs and histories for an otherwise very clean site), I'm considering just restoring from the archive. And then use copies of the few changes that that one guest editor did, for them to apply again.

Could some kindly expert here tell me if these steps will work?

I have been bit many times by simple-looking operations actually going way south and taking days to recover from. This one sounds like it's asking for it!

My host provider is SiteGround. I used their Site Tools and its File Manager to make a .zip of my wiki, specifically, the public_html, logs, and webstats folders. (Not anything else at a "higher" level!) It's an 820 MB zip; my site is pretty small.

IF this is easy, I imagine I only need to:

  1. First, make a copy of the four pages that the one legit editor worked on. The entire contents of them.
  2. Delete the three folders (public_html, logs, and webstat).
  3. Unzip my mediawiki archive to the same place (root wiki.[my site]).

In theory this should restore it to as it was before, right? Nothing else needed? No "sync" problems somehow? (Though I might need to clear all my PC's browser cookies for my site.)

Then for the legit user who only edited four pages:

  1. Work with them to have Account Creation open for a brief period, and let them make an account. Then turn it back off again.
  2. Let them (the new user) replace the four pages with the backups I made.

Since I got copies of the four pages, if they replace the entire page, then all changes will show up as edits they made, right? One of the four pages was their User page (completely new), but the other three were edits here and there on existing pages.

The only thing I can think of that will be lost with this approach is that instead of all their individual edits showing up as they did them the day (yesterday), they'd all now show up as one big edit by them for each page, as of the time they copy in the backup of each page (the one that included their edits from yesterday). We can live with that. Fortunately, they're pretty understanding.

Many thanks if you can help. Wow this is all so much more work than I ever thought. It never ceases to amaze me how much, lol. RedKnight7 (talk) 18:32, 6 December 2021 (UTC)

Page contents are stored in the database. It is unclear if your archive includes that, but it sounds like it might not.
P.s. there is also a feature where if you go to special:createaccount when loggged in as admin,you can invite someone by email (assuming email enabled) without opening it to the world. Bawolff (talk) 22:36, 6 December 2021 (UTC)
Hi, after researching the wiki database (and still feeling unsure), ultimately I just went with using my site host's Backup And Restore tool, which applies to the entire site. I hadn't thought of this at the time I wrote the OP above; I was hoping there might be a simple Yes to my question.
Fortunately it's a tiny wiki and there were only 5 pages that had been changed, so I just saved their source before backing up. Everything seems to have worked fine. I didn't even need to wipe the cookies and cache on my browser PC.
Also: Many thanks for mentioning Special:CreateAccount. I didn't know about it; it's easy to get lost in all the google results and MW Manual pages that list every possible option. By using it, I didn't even have to expose the Account Creation link.
I'm kind of shocked that spammers found it and started abusing my site within 15 minutes. The analytics for my site show a sudden spike in access from Latvia, haha RedKnight7 (talk) 18:57, 7 December 2021 (UTC)

How to embed and load a PHP webpage in a MediaWiki webpage?

MediaWiki 1.36.1.

I have an empty MediaWiki webpage in which I want to embed and load a PHP file.

  • I tried to do so with XMLHttpRequest but the CSS wasn't loaded
  • I tried to do so with iframe but it was rendered awfully and I didn't have time to keep "playing" with the iframe tags (unique?) attributes
  • I can link to the PHP webpage directly from the sidebar menu but than it would be a standalone webpage lacking all the graphics coming with my MediaWiki theme (logo, etc.) which I don't want

Perhaps fetch is better than XMLHttpRequest (I didn't try).

Anyway, how would you embed and load a PHP file in a MediaWiki webpage? 182.232.144.129 (talk) 00:10, 7 December 2021 (UTC)

You could make a custom special page: manual:special pages
The other major option are iframes. Remember that iframes can only access cookies that are marked SameSite=none and have the secure flag. The only attributes you really need src, and maybe border=0. And width/height. Bawolff (talk) 16:24, 7 December 2021 (UTC)
Creating a webpage named Special:Contact us would feel to me as a user experience problem unless there is some decent way to control the naming of the webpage (removing the Special: namespace from the actual name). 49.230.30.157 (talk) 01:30, 8 December 2021 (UTC)
Special pages can be transcluded as templates. For example you can put {{Special:recentchanges}} on a page. Also its just the url, the special: prefix isn't shown on the page and most people would follow a link not manually type it in. Bawolff (talk) 05:00, 8 December 2021 (UTC)
Okay,
Another problem I have with creating a custom special page for this php-embeded webpage is that (as far as I know) special pages require editing LocalSettings.php which in my case is quite default and I prefer "not to touch" unless it's about some "serious stuff".
Am I right, or just having an anxiety on the matter? :) 49.230.29.35 (talk) 13:14, 8 December 2021 (UTC)
Was I wrong anywhere? 49.230.28.107 (talk) 05:15, 10 December 2021 (UTC)
It would involve touching LocalSettings.php Bawolff (talk) 05:17, 10 December 2021 (UTC)
A Codidact Software Development discussion is currently being formed about the iframe problem first mentioned in this very thread:
software.codidact.com/posts/285235 79.176.20.41 (talk) 14:07, 14 December 2021 (UTC)
@Bawolff you might have an opinion if this problem with iframe is a bias from MediaWiki, a bug in iframe itself, or something else. 79.176.20.41 (talk) 14:31, 14 December 2021 (UTC)
It sounds like its working the way its supposed to. The width (as a percent) is relative to the width of the containing element minus any relavent margins. Bawolff (talk) 17:05, 14 December 2021 (UTC)
Indeed, as Bawolff said, it was a relationality issue.
Changing @media screen and (min-width: 922px) to @media screen and (min-width: 720px) helped.
For anyone interested, I have described more in the Codidact discussion linked above. 79.176.20.41 (talk) 04:48, 15 December 2021 (UTC)

How to start a conversation like this at the end of page or article

Hi! I am new here. I have not installed any MediaWiki yet.

Are the following things possible?

(1) at the end of a wiki article or page to have a conversation thread just like what we are doing right now?

(2) in the middle of an article or page to have a conversation thread?

(3) let individual users make comments like youtube, the guardian, Financial Times, etc? Is that possible ? I presume this is only possible at the end of an article.

Thanks a million! Nivek2046 (talk) 07:07, 7 December 2021 (UTC)

Comments at the end of the page is doable, see Extension:CommentStreams. In the middle of the content I'm not sure. Maybe Extension:Comments can do this.. AhmadF.Cheema (talk) 13:54, 9 December 2021 (UTC)

How to insert templates on bottom of every page?

I want to insert templates on bottom of every pages.

However, I would like to exclude some pages. For example, document Front Page.

What should I do? Gaon12 (talk) 11:48, 7 December 2021 (UTC)

See if Project:Support desk/Flow/2016/05#h-Add_a_template_to_EVERY_(even_not_created)_page_in_a_namespace?-Database_error-2016-05-31T21:42:00.000Z helps. AhmadF.Cheema (talk) 14:17, 9 December 2021 (UTC)

mediawiki trying to parse .png files?

mediawiki is trying to parse a bunch of my .png files instead of just displaying the picture....any thoughts? 69.165.137.183 (talk) 12:57, 7 December 2021 (UTC)

Why is that a problem? Can you define "parse", i suspect you mean something other than the usual definition. Bawolff (talk) 16:19, 7 December 2021 (UTC)
Just to note, you used parse 100% correctly - sorry about being condescending Bawolff (talk) 16:50, 8 December 2021 (UTC)
Warning: Unexpected character in input: '�' (ASCII=28) state=0 in (removed).png on line 814
Parse error: in (removed).png on line 814 69.165.137.183 (talk) 17:21, 7 December 2021 (UTC)
This means your webserver is configured to parse all files on the server as PHP files. This is bad and a security risk. Only .php files should be processed by PHP!
This has nothing to do with MediaWiki, btw. Ciencia Al Poder (talk) 19:56, 7 December 2021 (UTC)
ok thank you very much! 69.165.137.183 (talk) 20:07, 7 December 2021 (UTC)

Posted in wrong group

Hi, I have just started a new page called Central Highlands Rugby League. I think I posted it in the wrong place(mediawiki). It is a amatuer sports page so I wanted it to go in the main wiki page, have i got the right or wrong? If its wrong how do i get it to wiki main page? Thanks Highlander2021 (talk) 13:58, 7 December 2021 (UTC)

Correct, that content does not belong anywhere here. Clump (talk) 14:12, 7 December 2021 (UTC)
Ok, Can i cut and paste the stuff I have already written on put it in the right place or do i have to start again Highlander2021 (talk) 03:46, 8 December 2021 (UTC)
w:WP:AFC might have some useful info to you Bawolff (talk) 05:29, 8 December 2021 (UTC)
I'll post a copy of your article on your talk page so you can have it for reference and dont have to start over. Bawolff (talk) 05:31, 8 December 2021 (UTC)
i found the copied section. gunna try to upload it. Thank you Highlander2021 (talk) 10:35, 29 December 2021 (UTC)
thank you. any luck Highlander2021 (talk) 10:30, 29 December 2021 (UTC)

How to update PHP to version 7.4.3?

Yesterday, I configured a skin that is requires PHP versions 7.4.3 and up. My current PHP version is 7.3.33; the problem is that I don't know how to update to the latest version of PHP.

Can anyone explain this? Newman2 (talk) 14:03, 7 December 2021 (UTC)

Depends on your operating system/linux distro (please say which one). If its a shared host you might not even be allowed to. Bawolff (talk) 16:21, 7 December 2021 (UTC)
I am using Windows 10. Newman2 (talk) 16:33, 7 December 2021 (UTC)
Is your webserver windows 10? (As opposed to just the computer you are using) - is that what the Special:Version page of your wiki says?
Windows 10 doesn't come with php by default, so upgrading would be the same as however you installed (of which there are multiple possibilities, so it depends which one you used) Bawolff (talk) 05:05, 8 December 2021 (UTC)

Wikibase on cPanel

Hi


I set up a mediawiki on my hostgator account, unsing cPanel using Softaculous Apps Installer. So far so good

Now I am thinking to install also wikibase there, but with no success so far. Could this actually work?


I followed the instrctions but now mediawiki wont open anymore. I get:

Original exception: ... Error: Class 'DataValues\Deserializers\DataValueDeserializer' not found

Exception caught inside exception handler: ... Error: Class 'Diff\Differ\MapDiffer' not found BugDroid (talk) 16:39, 7 December 2021 (UTC)

Usually this means composer hasn't been run. Normally you do this with ssh access. If you have only cpanel you can maybe use the cron feature to do this, but its really difficult.
Often Special:extensiondistributor will do all the composer stuff for you, but im not sure it works with wikibase. You could try doing this on a different computer and then uploading the vendor directory.
You could also try using wikipedias vendor directory which you can download from https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/vendor/ Bawolff (talk) 05:28, 8 December 2021 (UTC)

Mysterious Icon

Hi


on this page https://es.wikipedia.org/wiki/Metro_de_la_Ciudad_de_Mexico

you see an infobox on the right. On its titel with the red background you see a small icon on the right. I havent been able to understand where this icon is commong from, where its been implemented.


can someone help? BugDroid (talk) 05:14, 8 December 2021 (UTC)

Loading c:File:Infobox_Public_Transport.png is defined in the CSS class "cabecera.transporte" which is located in w:es:MediaWiki:Gadget-imagenesinfobox.css. You can find out by using the "debug=true" URL parameter and checking your browser's developer tools. Malyacko (talk) 10:10, 8 December 2021 (UTC)
thx a lot! can you also tell me, where MediaWiki:Gadget-imagenesinfobox.css is being called? BugDroid (talk) 15:23, 8 December 2021 (UTC)
per https://es.wikipedia.org/wiki/Especial:Accesorios its enabled by default so its called automatically Bawolff (talk) 19:00, 8 December 2021 (UTC)
you say its enabled by default. Could it be that it is disabled on my wiki?
I am trying to build my own mediawiki using wikibase and all the rest. Its not meant for anything, only for me to understand and get into mediawiki.
Everything is working just fine. The page on my wiki looks identicaly to the original on wikipedia. Only the png I mentioned is not there
I do have imported imagenesinfobox and imagenesinfobox.css. When I open the original page and inspect it, I see a bunch of cabecera parameter, also "cabecera.transporte". The latter calls for the png
.cabecera.transporte {
background:url("//upload.wikimedia.org/wikipedia/commons/3/31/Infobox_Public_Transport.png") no-repeat top right
}
nevertheless, on my page I dont see any cabecera parameters. BugDroid (talk) 00:03, 9 December 2021 (UTC)
> you say its enabled by default. Could it be that it is disabled on my wiki?
The user preference (gadget) is enabled by default only on es wikipedia. It would not be enabled by default (or even exist) on your wiki unless you created.
By default i just mean the user preference starts out being checked on Special:preferences, not that it is a default part of mediawiki.
See extension:gadgets for more info. Bawolff (talk) 04:10, 9 December 2021 (UTC)
I got it working, finally :)
thx again for the help, I couldnt have done it without it!
one more question: there are a ton of gadgets on Especial:Accesorios
is there a way to export more than one or even all at once? BugDroid (talk) 23:40, 9 December 2021 (UTC)
I'm not aware of one. Bawolff (talk) 05:16, 10 December 2021 (UTC)

search-title-disabled

Hey MediaWiki API users, I'm trying to retrieve Wikipedia Categories with certain strings in the title (srwhat=title) using this query:

https://en.wikipedia.org/w/api.php?action=query&format=json&list=search&utf8=1&srwhat=title&srsearch=Axioms%20of%20set%20theory&srnamespace=14

But it seem search-title is disabled, any ideas of what I could do differently? Silva Selva (talk) 11:55, 8 December 2021 (UTC)

Use intitle: operator in the general search field (not the title field).
Help:CirrusSearch might be helpful Bawolff (talk) 16:49, 8 December 2021 (UTC)

Infobox at the top in desktop view but after first paragraph in mobile view?

In the article at https://en.wikipedia.org/wiki/Angela_Davis, the top of infobox is flush with the first line of text. In mobile view, however, it is flush with the second paragraph. How do I this on my wiki without the Infobox template from WP which requires setting up several extensions, scripts, etc.? Is there a simple way to do this? Hamburg0815 (talk) 20:35, 8 December 2021 (UTC)

Wrapping it in <div class="infobox">....</div> does the trick, at least for images with the "thumb" and "right" options set. Hamburg0815 (talk) 15:23, 12 December 2021 (UTC)

How to get detailed error-message in API / upload

I am using the mw.Api() call for uploading a file. It often works but sometimes fails. In the failure cases I only get back the name of the file instead of a detailed error message. How can I find out about the reason fo the error?

var param = {fileInput, format: 'json', comment, errorformat:"raw"};

  var api = new mw.Api();

  api.upload( fileInput, param )

    .done( function ( data ) {console.log ("API upload returned ", JSON.stringify (data));} )

    .fail( function ( data ) {console.log ("upload failed: ", JSON.stringify (data))} )

The fail call in data returns only the name of the file. How come? 2003:E7:5702:7C00:D9E8:785F:312A:C42B (talk) 23:36, 8 December 2021 (UTC)

MediaWiki 1.26.4 LocalSettings.php not found.

Hi,


We have installed mediawiki1.26.4 4 years ago and our site working without any issues until now. From 12/06/2021 we are seeing the above file. We have checked the LocalSettings.php there in the root folder. But still we are getting the error. Need your help. Veera.chettebhaktula (talk) 00:25, 9 December 2021 (UTC)

@Veera.chettebhaktula: What did you change on 12/06/2021? Sam Wilson 05:31, 9 December 2021 (UTC)
We did not change anything. There was a disk space issue, which we fixed by moving the back-up files to different drive. 152.44.217.82 (talk) 05:42, 10 December 2021 (UTC)
Maybe one of those backups were actually the real thing. Bawolff (talk) 00:56, 13 December 2021 (UTC)
MediaWiki 1.26 went end of life in early 2017. Please update to a supported version. Taavi (talk!) 08:01, 9 December 2021 (UTC)
Yes, we are looking into this as last option. Veera.chettebhaktula (talk) 17:50, 10 December 2021 (UTC)
Make sure you are looking in the right directory. Bawolff (talk) 05:23, 10 December 2021 (UTC)

MediaWiki 136.1.

I want to show a link to a random page in my homepage.

I can use the template Special:Randompage

But, I want the link name to be the same as that of the linked article.

How to do that? 49.230.30.5 (talk) 08:01, 9 December 2021 (UTC)

Don't think this feature exists yet. The closest I found is Project:Support desk/Flow/2013/10#h-Random_page_in_a_template?-2013-10-15T21:24:00.000Z. AhmadF.Cheema (talk) 13:47, 9 December 2021 (UTC)

CannotCreateActorException

I am recieving this Internal Error - [YbH5qyUNH_vBtE6nESg2fgAAiAA] 2021-12-09 12:42:19: Fatal exception of type "CannotCreateActorException"

I am trying to verify a new account in the instance I have installed. Tried Google and a few other places with no luck.

The process is i go to a special page, review the new account, create the account and that is when the error appears.

I would be thankful for any assistance.

Steve Fulton, UE Cableguysteve (talk) 12:47, 9 December 2021 (UTC)

To get a more detailed error report, in your LocalSettings.php, set:
$wgShowExceptionDetails = true;
$wgDevelopmentWarnings = true; error_reporting( -1 ); ini_set( 'display_errors', 1);
For details see: Manual:How to debug (Setting up a debug log file).
Regarding the present problem, Extension talk:UserMerge/Archive 2/Flow export#h-UserMerge_CannotCreateActorException-2020-01-07T13:37:00.000Z might be relevant. AhmadF.Cheema (talk) 13:44, 9 December 2021 (UTC)
[YbINUv6o1oGWX-wzmrLcLwABzQc] /mw19/index.php?title=Special:CreateAccount&returnto=Special:ConfirmAccounts/authors CannotCreateActorException: Failed to create actor ID for user_id=6 user_name="David T1423"
Backtrace:
from /home/ch/public_html/mw19/includes/user/ActorStore.php(439)
#0 /home/ch/public_html/mw19/includes/user/User.php(3549): MediaWiki\User\ActorStore->acquireActorId(MediaWiki\User\UserIdentityValue, Wikimedia\Rdbms\DatabaseMysqli)
#1 /home/ch/public_html/mw19/includes/libs/rdbms/database/Database.php(4782): User->{closure}(Wikimedia\Rdbms\DatabaseMysqli, string)
#2 /home/ch/public_html/mw19/includes/libs/rdbms/database/DBConnRef.php(68): Wikimedia\Rdbms\Database->doAtomicSection(string, Closure)
#3 /home/ch/public_html/mw19/includes/libs/rdbms/database/DBConnRef.php(668): Wikimedia\Rdbms\DBConnRef->__call(string, array)
#4 /home/ch/public_html/mw19/includes/user/User.php(3551): Wikimedia\Rdbms\DBConnRef->doAtomicSection(string, Closure)
#5 /home/ch/public_html/mw19/includes/auth/AuthManager.php(1493): User->addToDatabase()
#6 /home/ch/public_html/mw19/includes/auth/AuthManager.php(1217): MediaWiki\Auth\AuthManager->continueAccountCreation(array)
#7 /home/ch/public_html/mw19/includes/specialpage/AuthManagerSpecialPage.php(376): MediaWiki\Auth\AuthManager->beginAccountCreation(User, array, string)
#8 /home/ch/public_html/mw19/includes/specialpage/AuthManagerSpecialPage.php(502): AuthManagerSpecialPage->performAuthenticationStep(string, array)
#9 /home/ch/public_html/mw19/includes/htmlform/HTMLForm.php(718): AuthManagerSpecialPage->handleFormSubmit(array, VFormHTMLForm)
#10 /home/ch/public_html/mw19/includes/specialpage/AuthManagerSpecialPage.php(435): HTMLForm->trySubmit()
#11 /home/ch/public_html/mw19/includes/specialpage/LoginSignupSpecialPage.php(318): AuthManagerSpecialPage->trySubmit()
#12 /home/ch/public_html/mw19/includes/specialpage/SpecialPage.php(647): LoginSignupSpecialPage->execute(NULL)
#13 /home/ch/public_html/mw19/includes/specialpage/SpecialPageFactory.php(1366): SpecialPage->run(NULL)
#14 /home/ch/public_html/mw19/includes/MediaWiki.php(314): MediaWiki\SpecialPage\SpecialPageFactory->executePath(string, RequestContext)
#15 /home/ch/public_html/mw19/includes/MediaWiki.php(925): MediaWiki->performRequest()
#16 /home/ch/public_html/mw19/includes/MediaWiki.php(559): MediaWiki->main()
#17 /home/ch/public_html/mw19/index.php(53): MediaWiki->run()
#18 /home/ch/public_html/mw19/index.php(46): wfIndexMain()
#19 {main} Cableguysteve (talk) 14:07, 9 December 2021 (UTC)
Regarding the present problem, Extension talk:UserMerge/Archive 2/Flow export#h-UserMerge_CannotCreateActorException-2020-01-07T13:37:00.000Z might be relevant. - Same error.
Steve Cableguysteve (talk) 14:09, 9 December 2021 (UTC)

how to let an individual user who wrote one paragraph within an article to protect that one paragraph from other users editing it?

can that be done? thanks Pcll2000 (talk) 04:16, 10 December 2021 (UTC)

No, you can only protect the entire page not individual paragraphs.
However help:templates and extension:abusefilter may be of interest. Bawolff (talk) 05:21, 10 December 2021 (UTC)

Uploading files for translation

I tried to upload a .dox file for translation but I get a message saying "file type is not allowed. Allowed: *.glp

Looks like I would have to convert my .dox file to .glp__?

Thanks


Clueless in San Francisco 2600:1702:C20:74B0:7545:4927:1173:3A76 (talk) 04:35, 10 December 2021 (UTC)

Donations

I just donated again the other day, but when using wikipedia by phone, I continue to be made to feel guilty as if I am just a freeloader, while I never have been.

Many thanks,

DP 2600:1700:F9D1:570:8CD7:1F8:F106:5C33 (talk) 05:10, 10 December 2021 (UTC)

Hi, this forum is not handled by wikimedia foundation employees. You need to direct questions to donate@wikimedia.org
If its helpful, if you create an account and are logged in, the donation messages go away. Bawolff (talk) 05:19, 10 December 2021 (UTC)

Getting all categories from the database using mediawiki

I need to get a list of all mediawiki categories to be able to add them using checkbox. I have not been able to figure out how to do this using mediwaiki.


MediaWiki     1.37.0

PHP     7.4.16 (apache2handler)

MySQL     5.6.43-84.3-log

ICU     67.1

OS: Windows 10 Lonelinessless (talk) 07:02, 10 December 2021 (UTC)

https://www.mediawiki.org/w/api.php?action=help&modules=query%2Ballcategories
If direct db access see manual:categorylinks table and manual:category table. Along with page table for page_namespace set to right value. Bawolff (talk) 22:23, 11 December 2021 (UTC)

Is there a way to see a list of all of the pages that have been moved / renamed on a wiki?

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


On a wiki, I would like to see a list that shows all pages on a wiki that have moved / renamed from another page / name. Is it possible to add such functionality to a wiki? If so, how? YousufSSyed (talk) 07:04, 10 December 2021 (UTC)

https://www.mediawiki.org/wiki/Special:Log?type=moveTheDJ (Not WMF) (talkcontribs) 12:37, 10 December 2021 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

problems with syntaxhighlight

hi!

i installed https://www.mediawiki.org/wiki/Extension:SyntaxHighlighter wfLoadExtension( 'SyntaxHighlight_GeSHi' );

when i paste the example into a page

<syntaxhighlight lang="php">
<?php
  echo "Hallo Welt!";
?>

then the following category "pages with Syntaxerror" (org. german: Seiten mit Syntaxhervorhebungsfehlern) will be added.

the code will not be formated.

could someone help?

regards Jan JanTappenbeck (talk) 10:34, 10 December 2021 (UTC) You need an ending </syntaxhighlight> Bawolff (talk) 14:30, 11 December 2021 (UTC)

Hi!
sorry - Copy Error in Post!
In reallity the Close-tag exists.
Jan 2A02:8108:1140:2CE8:B587:6795:CE43:1422 (talk) 18:58, 11 December 2021 (UTC)
Can you link to your wiki? Bawolff (talk) 22:11, 11 December 2021 (UTC)

Button in the VisualEditor for initiating Drawio?

Hello,

I would like to add a button in the visualeditor that initiate drawio. I was trying to follow the example code that is provided here (VisualEditor/Gadgets/Add a tool) but my knowledge with java scripts is limited.

I am facing problems in which script or file path I have to write the code. So far what I have understood is that there is a part must be placed in the command file, then command registry and finally in the initializing script (Please correct me if I am wrong). However I don't know what to put exactly in order to functionalize a button for drawio.

Your help and guidance are much appreciated.

Thank you.

AIDInn - pmbd (talk) 12:48, 10 December 2021 (UTC)
Any support would be really appreciated. AIDInn - pmbd (talk) 10:36, 13 December 2021 (UTC)

recent contributors & Active users

Hi

Do not be respectful and tired

According to the statistics below, I have a lot of edits and pages. And multiple users. But in the registration page at the bottom, this statistic shows the number 0 !!! What is the cause of these problems?

Thanks

20,515

edits

4,337

pages

0

recent contributors

0

Active users Sokote zaman (talk) 13:58, 10 December 2021 (UTC)

"Active users" is the number of users who have made edits recently (by default the past 30 days). "recent contributors" is probably something similar, If no user has made any recent edits on your Wiki, then those two figures will be zero. AhmadF.Cheema (talk) 17:36, 10 December 2021 (UTC)
Thank you
I have been active for two years and I do not see anything but 0 Sokote zaman (talk) 17:38, 10 December 2021 (UTC)
Thank you. The problem was solved
Be healthy@AhmadF.Cheema Sokote zaman (talk) 17:56, 10 December 2021 (UTC)
What is your MediaWiki version?
You might need to run RunJobs.php to force update the statistics. AhmadF.Cheema (talk) 17:58, 10 December 2021 (UTC)
What is your MediaWiki version? 1.37
I typed the code below and it was solved:
php initSiteStats.php --update --active Sokote zaman (talk) 18:00, 10 December 2021 (UTC)
Sometimes updateSpecialPages.php can help with activeusers as well. Bawolff (talk) 22:13, 11 December 2021 (UTC)
Thank you. @Bawolff
Is it appropriate to run this script periodically, for example once a week? updateSpecialPages.php Sokote zaman (talk) 10:24, 12 December 2021 (UTC)
Old versions of mediawiki used to require that for special:activeusers, but i think it might have been fixed, so im not sure if it is still needed. Bawolff (talk) 00:51, 13 December 2021 (UTC)

ISO skilled MediaWiki admin who can help on an as-needed basis

I can pay via PayPal or whatever works.

I've tried lists of people offering to help, but these can be made by anybody who can say anything, and are often outdated and you don't even get a reply, to boot. Sites like Upwork have some good people, but also lots of straight-up crooks. You practically need a private investigator to tell the difference.

I've been editing MW for years and a few years ago made my own tiny personal wiki site that only I edit. I've worked on it a lot the past few months, but every other week there's some inscrutable problem that takes hours or days to resolve (though the fix is usually pretty simple, once you know exactly what to do). Any sort of googling leads to dozens of posts with hundreds of ideas, often from people in very different situations from me.


Would you be able to be on call, as it were, to help? At an hourly rate we agree on. Or would you know someone you trust that I could ask? It would probably involve several sessions initially. And then a request maybe once or twice a month, all depending.

I'd really appreciate some help or a recommend. It's so frustrating when all I want to do is edit the content of my wiki... but I find I practically need a Ph.D. in general IT just to hold it all together, SMH. RedKnight7 (talk) 14:51, 10 December 2021 (UTC)

In case none of the few volunteers here take this job, you can take a look at Professional development and consulting, given your suspicions, the Companies section might be more trustworthy, for example, one is run by Yaron Koren, who has extensive publicly acknowledged work on MediaWiki.
Another possibility could be to go for a MediaWiki hosting service so you don't have to worry about any of the technical stuff; one prominent and free service is Miraheze. AhmadF.Cheema (talk) 17:55, 10 December 2021 (UTC)
These are both interesting suggestions Ahmad. Thanks! I'll look into them. RedKnight7 (talk) 23:59, 10 December 2021 (UTC)

Trying to create an account

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


I am trying to create an account for MediaWiki, but whenever I try to it thinks I'm a spambot! Can someone please help? 108.44.169.75 (talk) 16:34, 10 December 2021 (UTC)

Don't you get the CAPTCHA challenge?
Try creating the account from another browser or in incognito/private mode. AhmadF.Cheema (talk) 17:59, 10 December 2021 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

color code

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


Hi


when I open sites like MediaWiki:Common.css on wikipedia, the code there eveutally appears colored. The text on the same site my mediawiki appears only black. How can I change that? BugDroid (talk) 18:47, 10 December 2021 (UTC)

You should install Extension:SyntaxHighlightAmmarpad (talk) 19:16, 10 December 2021 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

What is a IP address?

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


What is a IP address on MediaWiki-powered sites? 104.220.86.181 (talk) 16:46, 11 December 2021 (UTC)

See w:en:IP address Malyacko (talk) 18:12, 11 December 2021 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Project desk

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


What a wonderful project desk 41.13.78.64 (talk) 21:49, 11 December 2021 (UTC)

Project desk is a place where experts discuss about a project. Its just a help desk of a project. ↠Tanbirzx () 11:10, 12 December 2021 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Unable to get "Gadget usage statistics"

I am trying to get gadget statistics from my Special Pages. When I click on "Gadget usage statistics" I get the following error:

 [ee3ed5a3f36a3b8b4bbb6e14] /wiki/index.php/Special:GadgetUsage   Wikimedia\Rdbms\DBQueryError: A database query error has occurred. Did you forget to run your application's database schema updater after upgrading?
 
 Error 42703: ERROR:  column "activeusers" does not exist
 LINE 1: ...etwo" ON ((user_name = qcc_title) AND (qcc_type = "activeuse...
                                                             ^
 
 Function: SpecialGadgetUsage::reallyDoQuery
 Query: SELECT  up_property AS "title",SUM( up_value ) AS "value",COUNT( qcc_title ) AS "namespace"  FROM "user_properties" LEFT JOIN "mwuser" ON ((up_user = user_id)) LEFT JOIN "querycachetwo" ON ((user_name = qcc_title) AND (qcc_type = "activeusers") AND (up_value = 1))   WHERE (up_property LIKE 'gadget-%' ESCAPE '`' )  GROUP BY up_property ORDER BY value DESC LIMIT 1001  OFFSET 0  
Backtrace:
from /var/www/html/wiki/includes/libs/rdbms/database/Database.php(1719)

I am using MediaWiki 1.36.1, PHP 7.2.42, PostgreSQL 13.5, ICU 67.1, Lua 5.1.5.

I am suspecting this may have to do with PostgreSQL. I did get my database and there is "activeusers" in the "querycachetwo" table. Lbundle (talk) 23:26, 11 December 2021 (UTC)

Yes it sounds likely this is a bug in mw's postgres support. I would suggest filing a bug at https://phabricator.wikimedia.org Bawolff (talk) 00:24, 12 December 2021 (UTC)

Adding extensions to LocalSettings.php breaks the Wiki

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://joinfediverse.wiki/

MediaWiki 1.37.0
PHP 7.3.31-1~deb10u1 (fpm-fcgi)
MariaDB 10.3.31-MariaDB-0+deb10u1
ICU 63.1

I think something is wrong with my LocalSettings.php file. Whenever I add an extension the wiki is just a blank white page / it's not loading.

Here is a screenshot of what my LocalSettings.php looks like: https://ibb.co/nf6LyTY PaulaKreuzer (talk) 08:04, 12 December 2021 (UTC)

See if Manual:Common errors and symptoms#You see a Blank Page helps. AhmadF.Cheema (talk) 19:16, 12 December 2021 (UTC)
If I add
error_reporting( E_ALL );
ini_set( 'display_errors', 1 );
to the LocalSettings.php I get:
Fatal error: Uncaught Exception: Unable to open file /var/www/mediawiki/extensions/PortableInfobox/extension.json: filemtime(): stat failed for /var/www/mediawiki/extensions/PortableInfobox/extension.json in /var/www/mediawiki/includes/registration/ExtensionRegistry.php:174 Stack trace: #0 /var/www/mediawiki/includes/GlobalFunctions.php(52): ExtensionRegistry->queue('/var/www/mediaw...') #1 /var/www/mediawiki/LocalSettings.php(191): wfLoadExtension('PortableInfobox') #2 /var/www/mediawiki/includes/Setup.php(145): require_once('/var/www/mediaw...') #3 /var/www/mediawiki/includes/WebStart.php(90): require_once('/var/www/mediaw...') #4 /var/www/mediawiki/index.php(44): require('/var/www/mediaw...') #5 {main} thrown in /var/www/mediawiki/includes/registration/ExtensionRegistry.php on line 174 PaulaKreuzer (talk) 05:47, 13 December 2021 (UTC)
You probably have an old version of the extension PortableInfobox: given the error, the file extension.json (new way of declaring and registering the extensions since MW 1.27) is not present.
=> You should download and install the latest version of the extension, probably the branch master from Github.
PS: given the number of open issues on Github for this extension for recent versions of MediaWiki (1.35+), you may experience other issues after solving this one. ~ Seb35 [^_^] 07:39, 13 December 2021 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

How to identify (in the url) each page on MediaWiki by their id number instead of text name

Hello everyone. I am trying to create my website with MediaWiki and wanted to make modifications to it to suit my needs. One of such things is if it is possible to change something in one of the files or add an extension that will identify each page by their page id (page_id) instead of their text name (page_title), specifically when you are requesting for a specific page in the url and normally it will say something like: example.com/index.php?title=Roman_Empire, but instead have it like: example.com/index.php?id=264830 . Thanks Guillaume Taillefer (talk) 02:22, 13 December 2021 (UTC)

You can use the API to query for the pageid of a title: API:Query#Example 1: Specifying pages Malyacko (talk) 11:19, 13 December 2021 (UTC)
Thank you for the response! Could you tell me though how which file I would need to implement the "pageids" option instead of the "titles" parameter so that when i go tot he website it redirects to page_id 1 (Main_Page) instead of the name of "Main_Page". I also have probably should have mentioned this but I want to use page_id instead of the text name because I am planning on creating pages that will have the same title but are talking about different things (something like multiple articles with people named John Smith but are talking about different people, so doing what Wikipedia does to solve that issue wouldn't work for me). Thanks Guillaume Taillefer (talk) 14:40, 13 December 2021 (UTC)
Use the curid parameter index.php?curid=1 will load the page that has page_id of 1 Bawolff (talk) 07:06, 14 December 2021 (UTC)

Move piece of text into the infobox

MediaWiki 1.35.4
PHP 7.4.26 (apache2handler)
MariaDB 10.3.32-MariaDB-0ubuntu0.20.04.1
ICU 66.1

I have about 12,000 pages that have this piece of text in this format (- Reference number: ORG1234\PUB) in the wrong place at the bottom after citations. The number that keeps changing is the one in bold but the rest remains the same in all the affected pages. I have created an infobox field to capture this in future and the challenge I now have is how to mass copy that piece of text across all pages having this to the new infobox field. Gachangi (talk) 09:03, 13 December 2021 (UTC)

See Manual:Edit.php.
The maintenance scripts edit.php in combination with getText.php should work. However, you'll have to work out the somewhat complicated text transformation steps which will work for your purpose. AhmadF.Cheema (talk) 13:59, 13 December 2021 (UTC)
In addition to the above suggestion, some other options are pywikibot or extension:ReplaceText Bawolff (talk) 01:05, 14 December 2021 (UTC)

How do I create pages in other languages

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 use the "in other languages" function in the sidebar to switch to the same page in a different language, but I don't know how.

I guess I need an extension, but I don't know which.


https://joinfediverse.wiki/

MediaWiki 1.37.0
PHP 7.3.31-1~deb10u1 (fpm-fcgi)
MariaDB 10.3.31-MariaDB-0+deb10u1
ICU 63.1
PaulaKreuzer (talk) 09:36, 13 December 2021 (UTC)
Quoting Bawolff:
There are three different ways people use:
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Error when saving an edit

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.


Whenever I try to save an edit I get this error:

[3d2741062e6728beeb0beb57] 2021-12-13 09:58:01: Fatal exception of type "Wikimedia\Rdbms\DBUnexpectedError"


https://joinfediverse.wiki/

MediaWiki 1.37.0
PHP 7.3.31-1~deb10u1 (fpm-fcgi)
MariaDB 10.3.31-MariaDB-0+deb10u1
ICU 63.1
PaulaKreuzer (talk) 09:59, 13 December 2021 (UTC)
See Manual:How to debug Malyacko (talk) 11:15, 13 December 2021 (UTC)
What exactly am I supposed to see there? PaulaKreuzer (talk) 11:43, 13 December 2021 (UTC)
How to find the stack trace for DBUnexpectedError and possibly a more detailed reason for the error. —TheDJ (Not WMF) (talkcontribs) 11:57, 13 December 2021 (UTC)
Okay, now I get:
[6efa7c0045e10987a17f3ace] /index.php?title=Main_Page&action=submit Wikimedia\Rdbms\DBUnexpectedError: The unique key array should contain a single unique index
Backtrace:
from /var/www/mediawiki/includes/libs/rdbms/database/Database.php(2315)
#0 /var/www/mediawiki/includes/libs/rdbms/database/Database.php(2286): Wikimedia\Rdbms\Database->normalizeUpsertKeys(array)
#1 /var/www/mediawiki/includes/libs/rdbms/database/Database.php(3454): Wikimedia\Rdbms\Database->normalizeUpsertParams(array, array)
#2 /var/www/mediawiki/includes/libs/rdbms/database/DBConnRef.php(68): Wikimedia\Rdbms\Database->replace(string, array, array, string)
#3 /var/www/mediawiki/includes/libs/rdbms/database/DBConnRef.php(513): Wikimedia\Rdbms\DBConnRef->__call(string, array)
#4 /var/www/mediawiki/extensions/PortableInfobox/includes/services/Helpers/PagePropsProxy.php(48): Wikimedia\Rdbms\DBConnRef->replace(string, array, array, string)
#5 /var/www/mediawiki/extensions/PortableInfobox/includes/services/PortableInfoboxDataService.php(250): PortableInfobox\Helpers\PagePropsProxy->set(integer, array)
#6 /var/www/mediawiki/extensions/PortableInfobox/includes/services/PortableInfoboxDataService.php(149): PortableInfoboxDataService->clear()
#7 /var/www/mediawiki/extensions/PortableInfobox/includes/PortableInfobox.hooks.php(42): PortableInfoboxDataService->delete()
#8 /var/www/mediawiki/includes/HookContainer/HookContainer.php(338): PortableInfoboxHooks::onPageContentSave(WikiPage, User, WikitextContent, CommentStoreComment, integer, NULL, NULL, integer, Status)
#9 /var/www/mediawiki/includes/HookContainer/HookContainer.php(137): MediaWiki\HookContainer\HookContainer->callLegacyHook(string, array, array, array)
#10 /var/www/mediawiki/includes/HookContainer/HookRunner.php(2714): MediaWiki\HookContainer\HookContainer->run(string, array)
#11 /var/www/mediawiki/includes/Storage/PageUpdater.php(807): MediaWiki\HookContainer\HookRunner->onPageContentSave(WikiPage, User, WikitextContent, CommentStoreComment, integer, NULL, NULL, integer, Status)
#12 /var/www/mediawiki/includes/page/WikiPage.php(1994): MediaWiki\Storage\PageUpdater->saveRevision(CommentStoreComment, integer)
#13 /var/www/mediawiki/includes/EditPage.php(2349): WikiPage->doUserEditContent(WikitextContent, User, CommentStoreComment, integer, boolean, array, integer)
#14 /var/www/mediawiki/includes/EditPage.php(1685): EditPage->internalAttemptSave(array, boolean)
#15 /var/www/mediawiki/includes/EditPage.php(665): EditPage->attemptSave(array)
#16 /var/www/mediawiki/includes/actions/EditAction.php(71): EditPage->edit()
#17 /var/www/mediawiki/includes/actions/SubmitAction.php(38): EditAction->show()
#18 /var/www/mediawiki/includes/MediaWiki.php(538): SubmitAction->show()
#19 /var/www/mediawiki/includes/MediaWiki.php(320): MediaWiki->performAction(Article, Title)
#20 /var/www/mediawiki/includes/MediaWiki.php(925): MediaWiki->performRequest()
#21 /var/www/mediawiki/includes/MediaWiki.php(559): MediaWiki->main()
#22 /var/www/mediawiki/index.php(53): MediaWiki->run()
#23 /var/www/mediawiki/index.php(46): wfIndexMain()
#24 {main} PaulaKreuzer (talk) 12:07, 13 December 2021 (UTC)
extensions/PortableInfobox/includes/services/PortableInfoboxDataService.php
This extension is not compatible right now with your setup, so it should probably be disabled until the real problem can be found.
This is the source code repo of PortableInfobox https://github.com/lkucharczyk/mediawiki-PortableInfoboxTheDJ (Not WMF) (talkcontribs) 14:40, 13 December 2021 (UTC)
Thanks, yeah disabling PortableInfobox solved the issue. PaulaKreuzer (talk) 15:20, 13 December 2021 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

<img> tag in MW 1.35

In our test wiki we detected the <img> tag does no longer work like before after upgrade to 1.35. We use <img> a lot, to include external images and scaling them in one step. Now the image is still included, but the scaling does not work and the raw content of the wiki tag appears in front of the image and afterwards. What is the new syntax to include and scale external images? Is there a help or support page where I can get more details? 2003:C2:3F24:0:B508:1E2A:A8C3:66BE (talk) 10:40, 13 December 2021 (UTC)

It seems it has been deprecated in 1.35 per the History file. I am not sure why it no longer works as it used to though, (the deprecation patch didn't break it). But anyway you should start looking for alternative, since it will even stop working altogether in newer releases. – Ammarpad (talk) 16:19, 13 December 2021 (UTC)
Change was done as part of phab:T254802 Malyacko (talk) 16:41, 13 December 2021 (UTC)
And which alternatives do I have? 2003:C2:3F24:0:C507:1A1C:D42A:4036 (talk) 08:02, 14 December 2021 (UTC)
You should check whether there's any extension that suits your need (e.g start here
Category:Image_extensions
) or write one yourself. – Ammarpad (talk) 06:12, 16 December 2021 (UTC)
Could you please report back here if you find anything suitable? Thanks. Jonathan3 (talk) 16:24, 16 December 2021 (UTC)
You are kidding, aren't? I asked for support because a function that has been working well for lots of years is seemingly broken. Okay, you gave me several links to histories, patches, Phab tasks, I am not familiar with one of those (regarding MediaWiki I am user, not developer), but as far as I see the <img> wikitag was removed because: a) some kind of a blacklist function did not work in <img> processing, b) future (!) parser versons might not process the <img> tag.
Great.
Next answer is "hey you could search for an extension or write one, give us report if you have a solution".
Great.
Netiquette forbids what I'd like to reply now. 2003:C2:3F24:0:D1C1:3912:9F27:82B (talk) 11:09, 17 December 2021 (UTC)
the <img> tag hasn't been removed in 1.35. It should still work. If it doesn't, feel free to bugreport it. Ciencia Al Poder (talk) 12:09, 17 December 2021 (UTC)
It still works in MW1.35.
It makes sense to prepare for its removal in future now that it's been deprecated.
It's possible to use the Widgets extension to get round it. Jonathan3 (talk) 12:19, 17 December 2021 (UTC)
Indeed, the Widgets extension would be a good replacement Ciencia Al Poder (talk) 13:27, 17 December 2021 (UTC)
Widgets extension, alright. Thank you, I'll have a look.
I have to admit the problem resulted from deactivating the $wgAllowImageTag option. Reactivating it solved the problem for the moment. Still I think it is a bad idea to "deprecate" a heavily used feature. Debugging the wiki for some other problem is very very difficult now because the apache log is then filled up with thousands and thousends of "deprecate warnings". For me, this is of no sense. But of course this is the developers' decision.
btw, $wgAllowImageTag is deprecated but $wgAllowExternalImages not. 2003:C2:3F1C:100:A11D:7FB3:D263:8A51 (talk) 14:55, 31 January 2022 (UTC)

Log4j exploit

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 assume that as MW is using IIS in Windows that there is no Log4j exploit to worry about?

Is there any possibility that this is an issue to worry about. 192.173.19.30 (talk) 18:32, 13 December 2021 (UTC)

MediaWiki core doesn't use Java.
Some components like Elasticsearch (if used in your installation) use Java and are potentially vulnerable.
You can search the entire disk for *.jar files to look for potential Java programs to worry about Ciencia Al Poder (talk) 18:34, 13 December 2021 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Publication date as metadata, used in sorts

I have a site, https://www.wooljersey.com/wiki/Main_Page which represents people, places and events in history, specifically the history of the first big bicycle boom in Northern California, in the late 19th century. Most of my pages are newspaper articles, containing text and images that represent people, places or things. I am using categories for the taxonomy. I artificially represent a chronological timeline for Category:articles via a manually-edited page: https://www.wooljersey.com/wiki/Chronological_index_of_historical_cycling_articles_in_San_Francisco_Bay_Area_Bicycle_Culture,_Historical. I would like to record date of publication, for instance 1897/05/27, for each article page, be able to query it, ideally with date ranges, be able to display the articles in chronological order, perhaps with the intersection extension. I haven't been able to find any support for what I want to do. Is there a path, or is this code that needs to be written? 50.0.74.138 (talk) 20:05, 13 December 2021 (UTC)

Maybe extension:Semantic MediaWiki would work well for your use case (extension:Cargo is another popular one also)
If you want to stick with categories, extension:SubpageSortkey might be an option, but its not a perfect fit for what you are looking for. Bawolff (talk) 01:01, 14 December 2021 (UTC)
Thank you, I'll try it. 50.0.74.138 (talk) 04:29, 14 December 2021 (UTC)
Thanks again, this Semantic Mediawiki worked well for me. You can see it in action here. I'd link, but mediawiki thinks it's link spam. wooljersey.com > Chronological index of articles about bicycling in the San Francisco Bay Area shows it. Al pastor (talk) 14:46, 23 December 2021 (UTC)

Template hide none request params & Template Param Html Tag Problems.

I wanted to make a template where I can make text variables incase I want to change it and I don't want to look trough the whole site to change the text. While I have gotten it to work There are a few problems.

Like how it adds a br tag and a paragrpah tags eventhough I don't want it to.

I can "enter" (endline?) the if statement because it adds that br (This is why I ahve used the hmtl tag for comment () so it doesn't add the br and is visually more visable)

Here is what i got:

Page Template:Variables

Template with name "variables"



Output on Template Page is blank as it's currently supposed to be. Output on page


Yellow

Yellow

So is there a way to just output the requested param from template. Or is there a way to not have the do the html tags but still keep it visually organised while editing. Or Is there something else I can do? 213.127.93.109 (talk) 23:41, 13 December 2021 (UTC)

I messed up !
I wanted to make a template where I can make text variables incase I want to change it and I don't want to look trough the whole site to change the text. While I have gotten it to work There are a few problems. Like how it adds a br tag and a paragrpah tags eventhough I don't want it to. I can "enter" (endline?) the if statement because it adds that br (This is why I ahve used the hmtl tag for comment (<!-- -->) so it doesn't add the br and is visually more visable) '''Here is what i got:''' '''Page''' {{Variables|HoBTest=Yes}} '''Template''' with name "variables" <!-- Here you can set variables for this template page so you can have global access --> <!-- = Dungeons and Dragons = --> <!-- == Player Characters == --> <!-- === Devon Niall Black === --> {{#if:{{{HoBDrug|}}}|Enigma}} {{#if:{{{HoBTest|}}}|Yellow}} {{#if:{{{HoBGreen|}}}|Green}}<!-- ==== House of Black ==== --> {{#if:{{{HoBDrug|}}}|Enigma}}<!-- -->{{#if:{{{HoBTest|}}}|Yellow}}<!-- -->{{#if:{{{HoBGreen|}}}|Green}}<!-- --> '''Output on Template''' Page is blank as it's currently supposed to be. '''Output on page''' Yellow Yellow So is there a way to just output the requested param from template. ''Or'' is there a way to not have the do the html tags but still keep it visually organised while editing. ''Or'' Is there something else I can do? 213.127.93.109 (talk) 23:42, 13 December 2021 (UTC)
"There are a few problems.
Like how it adds a br tag and a paragrpah tags eventhough I don't want it to."
Usually the trick is to forget about making the template page look pretty, and just squeeze everything into one line so that MediaWiki doesn't do any unwanted formatting. Jonathan3 (talk) 10:16, 16 December 2021 (UTC)

Is MediaWiki affected by CVE-2021-44228

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 All

Is the MediaWiki software affected by vulnerability: CVE-2021-44228

I have tried to look this up but nothing seems to be recorded regarding this.

Thank you in Advance SergeantAlex1 (talk) 10:13, 14 December 2021 (UTC)

CVE-2021-44228 only affects (a subset of) Java software. MediaWiki core doesn't use Java, although you may have external components that MediaWiki interacts with, like ElasticSearch or similar, that may be affected. Ciencia Al Poder (talk) 10:42, 14 December 2021 (UTC)
Hello @Ciencia Al Poder
Thank you for your prompt response. SergeantAlex1 (talk) 10:45, 14 December 2021 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Elastic serach using log4j-1.2-api-2.11.1.jar

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


Hi Team,

we are using below,

MediaWiki 1.35.3
PHP 7.4.23 (apache2handler)
MySQL 8.0.26
Lua 5.1.5
Elasticsearch 6.5.4

/usr/share/elasticsearch/lib/log4j-1.2-api-2.11.1.jar

log4j-api-2.11.1.jar

log4j-core-2.11.1.jar

x-pack-security/log4j-slf4j-impl-2.11.1.jar

please provide us any patch which is higher then log4j>2.15.0 Pooja2425 (talk) 12:17, 14 December 2021 (UTC)

You have to ask the elasticsearch people Bawolff (talk) 17:00, 14 December 2021 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Database Error

Hi

I have recently received a message from a user of my wiki that he can no longer log in to the site.

This is the error message he got: https://jpst.it/2HLHa


Mediawiki Version

Software Version
MediaWiki 1.36.0
PHP 7.4.25 (cgi-fcgi)
MySQL 5.5.60-0+deb7u1-log
ICU 63.1


Hopefully someone can help me solve the problem. Thanks in advance. 94.223.112.127 (talk) 13:10, 14 December 2021 (UTC)

A database table is missing. Did you upgrade MediaWiki recently and forgot to run update.php? Ciencia Al Poder (talk) 13:53, 14 December 2021 (UTC)
I updated from version 1.26.2 to 1.36.0 earlier this year. I ran update.php through the browser as described here (Manual:Upgrading#Web updater). There it said that everything would be okay (i.ibb.co/YTx6whX/Installation-von-Media-Wiki-1-36-0.png). 94.223.112.127 (talk) 18:17, 14 December 2021 (UTC)
Bot passwords db table is missing. Try rerunning update.php. sometimes this can happen if using a single sign on system. Otherwise i guess create it manually.
If all else fails set Manual:$wgEnableBotPasswords to false in LocalSettings.php Bawolff (talk) 04:59, 15 December 2021 (UTC)
I already tried to run update.php again yesterday, but it didn't help. I have little idea how to create tables in the database manually, so I set $wgEnableBotPasswords to false for now. Maybe this is enough. 94.223.112.127 (talk) 17:45, 15 December 2021 (UTC)

DBConnectionError

Hi

I am running MediaWiki on Synology DS414 NAS. I recently update MediaWiki, PHP and MariaDB using standard Synology update process. Since this update I cannot access any more to my Wiki, I receive the following error message


$wgShowExceptionDetails = true; MediaWiki internal error.

Original exception: [ed07867d352d2e5c2b0e1e8c] 2021-12-14 13:16:07: 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.


I try to add $wgShowExceptionDetails = true in the LocalSetting.php to get detailed infos but with no success.

I also run php update.php and I got also some errors accessing the database:

root@DS414-PDI:/volume1/web/mediawiki/maintenance# php update.php PHP Warning: PHP Startup: Unable to load dynamic library 'mcrypt.so' (tried: /usr/local/lib/php73/modules/mcrypt.so (/usr/local/lib/php73/modules/mcrypt.so: cannot open shared object file: No such file or directory), /usr/local/lib/php73/modules/mcrypt.so.so (/usr/local/lib/php73/modules/mcrypt.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library 'mcrypt.so' (tried: /usr/local/lib/php73/modules/mcrypt.so (/usr/local/lib/php73/modules/mcrypt.so: cannot open shared object file: No such file or directory), /usr/local/lib/php73/modules/mcrypt.so.so (/usr/local/lib/php73/modules/mcrypt.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library 'mysql.so' (tried: /usr/local/lib/php73/modules/mysql.so (/usr/local/lib/php73/modules/mysql.so: cannot open shared object file: No such file or directory), /usr/local/lib/php73/modules/mysql.so.so (/usr/local/lib/php73/modules/mysql.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 MediaWiki 1.35.3 Updater

Your composer.lock file is up to date with current dependencies! Wikimedia\Rdbms\DBConnectionError from line 1420 of /volume1/web/mediawiki/includes/libs/rdbms/loadbalancer/LoadBalancer.php: Cannot access the database: Unknown error (localhost:/run/mysqld/mysqld10.sock)

  1. 0 /volume1/web/mediawiki/includes/libs/rdbms/loadbalancer/LoadBalancer.php(934): Wikimedia\Rdbms\LoadBalancer->reportConnectionError()
  2. 1 /volume1/web/mediawiki/includes/libs/rdbms/loadbalancer/LoadBalancer.php(901): Wikimedia\Rdbms\LoadBalancer->getServerConnection(0, 'pdi_wiki-pdiwik...', 4)
  3. 2 /volume1/web/mediawiki/includes/libs/rdbms/loadbalancer/LoadBalancer.php(1046): Wikimedia\Rdbms\LoadBalancer->getConnection(-2, Array, 'pdi_wiki-pdiwik...', 4)
  4. 3 /volume1/web/mediawiki/maintenance/includes/Maintenance.php(1368): Wikimedia\Rdbms\LoadBalancer->getMaintenanceConnectionRef(-2, Array, 'pdi_wiki-pdiwik...')
  5. 4 /volume1/web/mediawiki/maintenance/update.php(141): Maintenance->getDB(-2)
  6. 5 /volume1/web/mediawiki/maintenance/doMaintenance.php(107): UpdateMediaWiki->execute()
  7. 6 /volume1/web/mediawiki/maintenance/update.php(253): require_once('/volume1/web/me...')
  8. 7 {main}


Using phpMyAdmin, I have no problem to access the wiki database.

Software Version
DSM 6.2.4-25556 Update 2
MediaWiki 1.53.3-0144
PHP 7.3.24-0010
MariaDB 10.3.29-0070

I request support to Synology but after access to my NAS, they told me to ask support to MediaWiki.

Any idea to investigate to solve my problem

Thanks in advance Patjacdil (talk) 13:57, 14 December 2021 (UTC)

That means that for whatever reason, your MediaWiki cannot connect to the database any longer. Have you checked that the database is running ? Can you manually access the database via terminal ? Have you tried enabling MediaWiki debug logging ?
> I request support to Synology but after access to my NAS, they told me to ask support to MediaWiki.
That's just them being lazy. They ship it, it's their packaging, they should help you if there was an upgrade problem. They are a commercial company, they do not get to shove their problems into the hands of volunteers. —TheDJ (Not WMF) (talkcontribs) 14:06, 14 December 2021 (UTC)
To TheDJ
Thanks for your help.
Since your answer, I have add somme informations in may first message about the result of "php update.php" with errors and no problem to access the database using phpMyAdmin.
I just add the "MediaWiki debug logging" in LocalSettings.php and also add the "debug" directory with all the right to access but no debug file is created when i run MediaWiki.
But I made a mistake in inserting "$wgShowExceptionDetails = true;" in LocalSettings.php and now I have the following verbose output when running MediaWiki:
MediaWiki internal error.
Original exception: [b397500f6c9871ed9a9fc6b9] /mediawiki/index.php?title=Accueil Wikimedia\Rdbms\DBConnectionError from line 1420 of /volume1/web/mediawiki/includes/libs/rdbms/loadbalancer/LoadBalancer.php: Cannot access the database: Unknown error (localhost:/run/mysqld/mysqld10.sock)
Backtrace:
#0 /volume1/web/mediawiki/includes/libs/rdbms/loadbalancer/LoadBalancer.php(934): Wikimedia\Rdbms\LoadBalancer->reportConnectionError()
#1 /volume1/web/mediawiki/includes/libs/rdbms/loadbalancer/LoadBalancer.php(901): Wikimedia\Rdbms\LoadBalancer->getServerConnection(integer, string, integer)
#2 /volume1/web/mediawiki/includes/libs/rdbms/loadbalancer/LoadBalancer.php(1046): Wikimedia\Rdbms\LoadBalancer->getConnection(integer, array, string, integer)
#3 /volume1/web/mediawiki/includes/GlobalFunctions.php(2463): Wikimedia\Rdbms\LoadBalancer->getMaintenanceConnectionRef(integer, array, string)
#4 /volume1/web/mediawiki/includes/cache/localisation/LCStoreDB.php(56): wfGetDB(integer)
#5 /volume1/web/mediawiki/includes/cache/localisation/LocalisationCache.php(449): LCStoreDB->get(string, string)
#6 /volume1/web/mediawiki/includes/cache/localisation/LocalisationCache.php(495): LocalisationCache->isExpired(string)
#7 /volume1/web/mediawiki/includes/cache/localisation/LocalisationCache.php(371): LocalisationCache->initLanguage(string)
#8 /volume1/web/mediawiki/includes/cache/localisation/LocalisationCache.php(312): LocalisationCache->loadItem(string, string)
#9 /volume1/web/mediawiki/includes/language/LanguageFallback.php(106): LocalisationCache->getItem(string, string)
#10 /volume1/web/mediawiki/includes/language/LanguageFactory.php(175): MediaWiki\Languages\LanguageFallback->getAll(string)
#11 /volume1/web/mediawiki/includes/language/LanguageFactory.php(121): MediaWiki\Languages\LanguageFactory->newFromCode(string)
#12 /volume1/web/mediawiki/includes/ServiceWiring.php(241): MediaWiki\Languages\LanguageFactory->getLanguage(string)
#13 /volume1/web/mediawiki/vendor/wikimedia/services/src/ServiceContainer.php(447): Wikimedia\Services\ServiceContainer->{closure}(MediaWiki\MediaWikiServices)
#14 /volume1/web/mediawiki/vendor/wikimedia/services/src/ServiceContainer.php(416): Wikimedia\Services\ServiceContainer->createService(string)
#15 /volume1/web/mediawiki/includes/MediaWikiServices.php(623): Wikimedia\Services\ServiceContainer->getService(string)
#16 /volume1/web/mediawiki/includes/Setup.php(700): MediaWiki\MediaWikiServices->getContentLanguage()
#17 /volume1/web/mediawiki/includes/WebStart.php(89): require_once(string)
#18 /volume1/web/mediawiki/index.php(44): require(string)
#19 {main}
Exception caught inside exception handler: [b397500f6c9871ed9a9fc6b9] /mediawiki/index.php?title=Accueil Wikimedia\Rdbms\DBConnectionError from line 1420 of /volume1/web/mediawiki/includes/libs/rdbms/loadbalancer/LoadBalancer.php: Cannot access the database: Unknown error (localhost:/run/mysqld/mysqld10.sock)
Backtrace:
#0 /volume1/web/mediawiki/includes/libs/rdbms/loadbalancer/LoadBalancer.php(934): Wikimedia\Rdbms\LoadBalancer->reportConnectionError()
#1 /volume1/web/mediawiki/includes/libs/rdbms/loadbalancer/LoadBalancer.php(901): Wikimedia\Rdbms\LoadBalancer->getServerConnection(integer, string, integer)
#2 /volume1/web/mediawiki/includes/libs/rdbms/loadbalancer/LoadBalancer.php(1046): Wikimedia\Rdbms\LoadBalancer->getConnection(integer, array, string, integer)
#3 /volume1/web/mediawiki/includes/GlobalFunctions.php(2463): Wikimedia\Rdbms\LoadBalancer->getMaintenanceConnectionRef(integer, array, string)
#4 /volume1/web/mediawiki/includes/cache/localisation/LCStoreDB.php(56): wfGetDB(integer)
#5 /volume1/web/mediawiki/includes/cache/localisation/LocalisationCache.php(394): LCStoreDB->get(string, string)
#6 /volume1/web/mediawiki/includes/cache/localisation/LocalisationCache.php(312): LocalisationCache->loadItem(string, string)
#7 /volume1/web/mediawiki/includes/language/LanguageFallback.php(106): LocalisationCache->getItem(string, string)
#8 /volume1/web/mediawiki/includes/language/LanguageFactory.php(175): MediaWiki\Languages\LanguageFallback->getAll(string)
#9 /volume1/web/mediawiki/includes/language/LanguageFactory.php(121): MediaWiki\Languages\LanguageFactory->newFromCode(string)
#10 /volume1/web/mediawiki/includes/ServiceWiring.php(241): MediaWiki\Languages\LanguageFactory->getLanguage(string)
#11 /volume1/web/mediawiki/vendor/wikimedia/services/src/ServiceContainer.php(447): Wikimedia\Services\ServiceContainer->{closure}(MediaWiki\MediaWikiServices)
#12 /volume1/web/mediawiki/vendor/wikimedia/services/src/ServiceContainer.php(416): Wikimedia\Services\ServiceContainer->createService(string)
#13 /volume1/web/mediawiki/includes/MediaWikiServices.php(623): Wikimedia\Services\ServiceContainer->getService(string)
#14 /volume1/web/mediawiki/includes/ServiceWiring.php(694): MediaWiki\MediaWikiServices->getContentLanguage()
#15 /volume1/web/mediawiki/vendor/wikimedia/services/src/ServiceContainer.php(447): Wikimedia\Services\ServiceContainer->{closure}(MediaWiki\MediaWikiServices)
#16 /volume1/web/mediawiki/vendor/wikimedia/services/src/ServiceContainer.php(416): Wikimedia\Services\ServiceContainer->createService(string)
#17 /volume1/web/mediawiki/includes/MediaWikiServices.php(925): Wikimedia\Services\ServiceContainer->getService(string)
#18 /volume1/web/mediawiki/includes/exception/MWExceptionRenderer.php(329): MediaWiki\MediaWikiServices->getMessageCache()
#19 /volume1/web/mediawiki/includes/exception/MWExceptionRenderer.php(63): MWExceptionRenderer::reportOutageHTML(Wikimedia\Rdbms\DBConnectionError)
#20 /volume1/web/mediawiki/includes/exception/MWExceptionHandler.php(106): MWExceptionRenderer::output(Wikimedia\Rdbms\DBConnectionError, integer)
#21 /volume1/web/mediawiki/includes/exception/MWExceptionHandler.php(185): MWExceptionHandler::report(Wikimedia\Rdbms\DBConnectionError)
#22 /volume1/web/mediawiki/includes/exception/MWExceptionHandler.php(156): MWExceptionHandler::handleException(Wikimedia\Rdbms\DBConnectionError, string)
#23 [internal function]: MWExceptionHandler::handleUncaughtException(Wikimedia\Rdbms\DBConnectionError)
#24 {main}
Any idea?
I agree with for the "nice" answer from Synology.
I use to be a hardware/software engineer (retired now) but not to much familiar with database and php.
thanks again for your help. Patjacdil (talk) 16:54, 14 December 2021 (UTC)
It sounds like something might be wrong with your php.ini file (especially for the commandline part - sounds like mysqli php extension could not be loaded) Bawolff (talk) 16:59, 14 December 2021 (UTC)
To Bawolff
Thanks for your help.
I don't know which is the used php.ini file, this the list of php.ini found in the system:
/usr/local/etc/php73/cli/php.ini
/usr/local/etc/php72/cli/php.ini
/usr/local/etc/php56/php.ini
/usr/syno/etc/packages/WebStation/php70/php.ini
/usr/syno/etc/packages/WebStation/php56/php.ini
/etc/php/php.ini
My feeling was /etc/php/php.ini the used one. I check if it is the same that /usr/local/etc/php73/cli/php.ini and it wasn't so I save /etc/php/php.ini and I copy /usr/local/etc/php73/cli/php.ini to /etc/php but the with nos success.
I remove any php.ini from /etc/php and the result was the same when I run MediaWiki so I think is not the used one?
An other point is that phpMyAdmin is running with no problem with php 7.3.24 :
  • nginx/1.16.1
  • Version du client de base de données : libmysql - mysqlnd 5.0.12-dev - 20150407 - $Id: 7cc7cc96e675f6d72e5cf0f267f48e167c2abb23 $
  • Extension PHP : mysqli curl mbstring
  • Version de PHP : 7.3.24
phpMyAdmin has access to my wiki database with no problem.
Any other idea?
Thanks again Patjacdil (talk) 09:20, 15 December 2021 (UTC)
Nobody can help me, No idea? ..... Patjacdil (talk) 21:16, 17 December 2021 (UTC)
> Cannot access the database: Unknown error (localhost:/run/mysqld/mysqld10.sock)
MediaWiki expects there to be a database connection (socket) on /run/mysqld/mysqld10.sock and its not there. We cannot know why. —TheDJ (Not WMF) (talkcontribs) 13:56, 16 January 2022 (UTC)

Hello all,

my wiki has like 400 pages, successfully moved (by updating every page's page_namespace from 0 to my namespace ID) so from the default, main namespace into a new one.

my question is: how to deal with all the broken links inside each page?

for example all internal links are like this: [[pageTitle]] now it should be [[myNewNamespace:pageTitle]]

How to deal with this ?

Already ran refreshLinks.php with no luck

MediaWiki     1.35.2 93.57.21.240 (talk) 16:03, 14 December 2021 (UTC)

Extension:replacetext or just create a bunch of redirects. Bawolff (talk) 16:57, 14 December 2021 (UTC)
If you don't mind having about 400 redirect pages, you could use manual:moveBatch.php to move the pages back to the main namespace (don't create redirects) and then move them to the new namespace (do create redirects this time). Jonathan3 (talk) 09:48, 15 December 2021 (UTC)
Thanks for the answers.
Am I in this situation, because in the beginning we didn't plan to restrict wiki access to groups and used main namespace?
Or did i do something wrong?
I mean, the idea is to restrict write accesses to groups based on their role, while keeping readability for everyone. 93.57.21.240 (talk) 14:35, 15 December 2021 (UTC)
As a sidenote, in case you weren't aware, to restrict editing of pages only to certain groups you didn't need to transfer pages to a separate new namespace, this can also be done through the Protect feature. This "protect" can also be done in bulk. AhmadF.Cheema (talk) 18:51, 15 December 2021 (UTC)
thank you, didn't know that.
looks like that method is suitable on all pages, while we need to make like 3 or 4 areas reserved to each group
everyone can read everything.
develeoper can only edit their sections; system Administrators can only edit their sections and son on
that's why i chose namespaces...am i wrong? 95.236.240.248 (talk) 15:37, 16 December 2021 (UTC)
The extra information you've just given makes your choice seem right :-) Jonathan3 (talk) 17:00, 16 December 2021 (UTC)

Styling broken following migration of MediaWiki site

We have recently moved our internal MediaWiki site from a subdirectory to a subdomain. Following the migration the structure of the site is all fine but the styling has completely broken.


Does anyone know how I can fix this or anything I need to check that I might have missed? 31.124.43.193 (talk) 16:09, 14 December 2021 (UTC)

Probably you need to adjust $wgScriptPath or $wgArticlePath, or your rewrite rules if you have any. Ciencia Al Poder (talk) 16:18, 14 December 2021 (UTC)

How to use OCR in a Miraheze wiki?

I have a Miraheze wiki like Wikisource in Bengali Language. It is "গ্রন্থশালা". Here is an index page. Here I want to use Google OCR while proofreading. But, I failed to add OCR in this wiki. So, I am requesting to help me in this regard. Thanks. ~ MS Sakib (talk) 19:57, 14 December 2021 (UTC)

I guess that is part of Extension:Wikisource. Ask Miraheze support for help setting up extensions on miraheze. Bawolff (talk) 04:53, 15 December 2021 (UTC)
@MS Sakib You should use the Miraheze support desk or you can use [Miraheze Phabricator] for reporting an issue. ↠Tanbirzx () 18:32, 18 December 2021 (UTC)
@Tanbirzx, @Bawolff: I asked the same question in miraheze meta. (https://meta.miraheze.org/wiki/Community_noticeboard#How_to_add_OCR_in_a_Miraheze_wiki?)
They also told me to activate Wikisource extension through Phabricator. I did it, but nothing worked.
(https://phabricator.miraheze.org/T8426) MS Sakib (talk) 19:55, 18 December 2021 (UTC)
If miraheze is unwilling/unable to install, that's really something you will have to take up with them.
It is a much harder extension to setup than a normal extension. Bawolff (talk) 22:16, 18 December 2021 (UTC)

Update.php crashes: RevisionAccessException: Could not determine title for page ID x and revision ID y

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


I'm importing a wiki from an SQL dump and on running update.php I get the error below. It relates to a row in the revision table whose rev_page does not match any existing page_id in the page table. What should I do? Thanks.

...doing rev_id from 9401 to 9600 MediaWiki\Revision\RevisionAccessException from line 307 of /var/www/html/includes/Revision/RevisionStore.php: Could not determine title for page ID 1930 and revision ID 9459 Jonathan3 (talk) 23:32, 14 December 2021 (UTC)

Please see "Post a new question" the sidebar. Malyacko (talk) 09:05, 15 December 2021 (UTC)
Sorry! I had hoped it might be a well-known question with a simple answer (probably "just delete that revision row").
I'm upgrading a wiki from MediaWiki 1.25.2, PHP 7.4.21 (cgi-fcgi), MariaDB 10.3.27-MariaDB to MediaWiki 1.35.4, PHP 7.4.25 (apache2handler), MariaDB 10.5.12-MariaDB-0+deb11u1.
Thank you. Jonathan3 (talk) 09:29, 15 December 2021 (UTC)
I guess you could delete the revision out of the db (its not going to be accessible anyways if there is no page entry). Make backups if you try that. Bawolff (talk) 16:48, 15 December 2021 (UTC)
Thanks. I started to do that, and it allows update.php to proceed. Unfortunately there wasn't just the one row... I'll just delete them all at once, next time I'm on the computer. (Edit: I mean every revision row for a non-existent page.) I can't imagine it'll cause a problem - why would it look for revisions for non-existent pages? :-) The wiki still seems to work fine.
But what should I test to really be sure? Jonathan3 (talk) 18:29, 15 December 2021 (UTC)
Good news, for future reference.
SELECT * FROM prefix_revision WHERE rev_page NOT IN (SELECT page_id FROM prefix_page); returned 3 rows.
Manual:deleteOrphanedRevisions.php --report found 3 orphaned revisions.
Rather than use that script and potentially cause unintended consequences I just used DELETE FROM prefix_revision WHERE rev_page NOT IN (SELECT page_id FROM prefix_page);.
After that, deleteOrphanedRevisions.php found 0 orphaned revisions.
And update.php worked after that!
I wonder whether it would help for update.php to run the other script instead of crashing. Jonathan3 (talk) 22:23, 15 December 2021 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Synology DMS7 Visual Editor error CURL7 and 28 ,cant save.

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.


Synology DMS7 Visual Editor error CURL7 and 28 ,cant save. 2400:DD01:101A:21:24DB:4D1A:AB6:9490 (talk) 08:37, 15 December 2021 (UTC)

Please see "Post a new question" the sidebar. Malyacko (talk) 09:04, 15 December 2021 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Site hacked

Hello


A bunch of pages with random content have been created on my wiki website.

I run MediaWiki 1.35.0. I suppose it is an unstable an unsecured version ? I should upgrade to 1.37 ?

And how to delete these pages ? Go into database through phpmyadmin ?


Thanks a lot Bseutin (talk) 21:13, 15 December 2021 (UTC)

Manual:Spam
This is not hacking if you configured your website to allow anyone on the internet to edit, and then some people did. Bawolff (talk) 07:01, 16 December 2021 (UTC)
No, only registered people can edit. And the content is random. Bseutin (talk) 10:28, 16 December 2021 (UTC)
(Yes, 1.35.0 is ancient and outdated. Please keep software updated.) Malyacko (talk) 07:17, 16 December 2021 (UTC)
Any idea to purge quickly unwanted content ? There is almost 1000 pages. Bseutin (talk) 10:29, 16 December 2021 (UTC)
Have your tried the Extension:Nuke mentioned in the above provided link? AhmadF.Cheema (talk) 20:35, 17 December 2021 (UTC)
Note that sometimes hacking happens because people leave the old installation path still accessible from the Internet, when upgrading mediawiki (for example, at /wiki_old/ and somehow spambots and hackers know about that URL, which probably contains the real vulnerabilities and not the 1.35 version (which is still supported if you use 1.35.5) Ciencia Al Poder (talk) 22:09, 27 December 2021 (UTC)

update.php/DatabaseUpdater.php: "Failed to set the local repo temp zone container to be private"

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 run update.php the penultimate line, before "Purging caches...done." is "Failed to set the local repo temp zone container to be private."

I can see that the error is from /includes/installer/DatabaseUpdater.php but I'd need a bit of a prompt to know what to do... Thanks. Jonathan3 (talk) 22:39, 15 December 2021 (UTC)

Thats not really a required step, so you probably need to do nothing.
Basically mediawiki tries to add a .htaccess to the tmp and deleted upload folders to prevent them from being viewable. This of course only works in apache anyways.
If you're paranoid, configure mediawiki to use directories not served by the webserver for this purpose. Bawolff (talk) 07:00, 16 December 2021 (UTC)
I ran sudo php update.php and it worked, saying "Set the local repo temp zone container to be private."
Thanks for the guidance. Jonathan3 (talk) 10:05, 16 December 2021 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Image served by script and deprecation of $wgAllowImageTag

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


I need to display images from an external site where the URLs are of a script which serves the image (rather than the being of the image file itself).

I can get the image to display by putting it within <img src="..."> but that approach has been now been deprecated, and presumably in future versions will not work: see Manual:$wgAllowImageTag.

Unfortunately when I just type the URL on its own the image doesn't get displayed, as ordinarily expected. Instead it just shows up as a normal link. I have set $wgAllowExternalImagesFrom correctly. Presumably MediaWiki just doesn't recognise it as an image.

I expect I could use Extension:Widgets to continue using img tags.

Is there any other way round this? Thanks. Jonathan3 (talk) 10:02, 16 December 2021 (UTC)

you mean you want to do an external image in line right? so why you used it without allowing it? I mean did you do it like this:
{|
| <image url>
|-
| caption
|} M.Aghshal (talk) 10:27, 16 December 2021 (UTC)
Yes, I need to display external images. I don't know what "so why you used it without allowing it?" means. I've kept Manual:$wgAllowExternalImages false, but used Manual:$wgAllowImageTag to allow them from one site only. I was doing it by adding the URL to the page without a caption within a table, but it's materially the same.
It turns out that the answer was to trick the parser into thinking it's a normal wiki link by adding &.jpg to the end of the link! Jonathan3 (talk) 10:40, 16 December 2021 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

I can't manage to list all new pages…

Hi!

I can't manage to list all new pages on my mediawiki for a year like that: https://wiklou.org/w/index.php?title=Sp%C3%A9cial:Nouvelles_pages&offset=20210101000000&dir=prev&limit=500

Can anyone tell me how to list all new pages in this year? 2001:912:1480:380:0:0:0:1 (talk) 11:37, 16 December 2021 (UTC)

Please first check a recent and supported MediaWiki version: Manual:Upgrading. The version on that website is old, insecure, and unsupported. Malyacko (talk) 12:01, 16 December 2021 (UTC)
Its limited to $wgRCMaxAge
Try using Special:log instead which doesnt have the same limit Bawolff (talk) 05:54, 17 December 2021 (UTC)

CentralNotice - issue with banner displaying

Hello dear all! I run following MW:

MediaWiki 1.35.5
PHP 7.4.14 (cgi-fcgi)
MySQL 5.7.27-30
ICU 50.1.2
Lua 5.1.5

I installed CentralNotice extension. I have created a campaign and banner for it. All seems to be done well, but I don't see banner displayed. On the page of banner creation it is displayed how it look like, but when I click the banner to "preview on wiki" then opens random page and there is no banner on it. Can someone help me with this issue? What shall I do? Fokebox (talk) 13:14, 16 December 2021 (UTC)

Importing .docx

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


Hi all!

Can someone please provide an EASY way to import .docx? I have approx. 500 pages exported from Nuclino.com, and I'm looking for a way to import it to MediaWiki without copy/paste and without tech knowledge. Any help will be greatly appreciated. MsHiller (talk) 16:14, 16 December 2021 (UTC)

See Project:Support desk/Flow/2017/08#h-How_to_convert_MS_word_document_into_Mediawiki_page?-2017-08-08T09:13:00.000Z. This is probably the best we have at the moment; unfortunately, there doesn't appear to be the convenient solution that you're looking for. It would've been somewhat easier if the pages could be exported as HTML form nuclino.com. AhmadF.Cheema (talk) 20:31, 17 December 2021 (UTC)
Thank you. MsHiller (talk) 15:31, 20 December 2021 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Database locked error with OAuth extension

  • MediaWiki 1.35.4
  • PHP 7.3
  • Sqlite 3.31.1
  • OAuth extension

When making multiple API requests in quick succession, often a request will fail with a database locked exception a la:

[DBQuery] Error 5 from SqlBagOStuff::updateTable, database is locked DELETE FROM objectcache WHERE keyname = 'OAUTH:<AUTH_DETAILS_HERE>

#0 /var/lib/mw/mediawiki-1.35.4/includes/libs/rdbms/database/Database.php(1658): Wikimedia\Rdbms\Database->getQueryExceptionAndLog(string, integer, string, string)

<... STACKTRACE>

#22 {main}

[SQLBagOStuff] DBError: Error 5: database is locked

[SQLBagOStuff] SqlBagOStuff::setAndLogDBError: ignoring query error

Because the delete fails, subsequent validation of the nonce fails:

[OAuth] OAUTH:<AUTH_DETAILS_HERE> exists, so nonce has been used by this consumer+token

[session] Bad OAuth request from {ip}

Which causes a cascading failure and a 500 error.

Clearly I could change my strategy and use a database that supports concurrency, but I thought I'd try help debug the issue. What additional information can I gather to find out what is locking the DB? Squirreltech (talk) 19:32, 16 December 2021 (UTC)

As far as I can tell, the consumer starts updating the search index just before the attempt to delete from the object cache:
[DBQuery] Wikimedia\Rdbms\Database::beginIfImplied (MediaWiki\Extensions\OAuth\Backend\Consumer::newFromKey) [0s] localhost: BEGIN DEFERRED
Title::getRestrictionTypes: applicable restrictions to Acorn:Test are {edit,move}
[DBQuery] SearchSqlite::fulltextSearchSupported [0s] localhost: SELECT sql FROM sqlite_master WHERE tbl_name = 'searchindex' LIMIT 1
[DBQuery] SearchSqlite::update [0.001s] localhost: DELETE FROM searchindex WHERE rowid = 395
Shifting the wiki to use a separate cache should also fix the issue, but I'd like to help improve the OAuth extension's support for SQLite. Squirreltech (talk) 19:43, 16 December 2021 (UTC)
I would think the bug is, that mediawiki should probably just wait for the db to be unlocked. Bawolff (talk) 05:52, 17 December 2021 (UTC)
This error is actually kind of misleading it seems.. Apparently it is actually a timeout BECAUSE of a lock by another thread. See the "database is locked" section of the Django project which describes this problem rather well: https://docs.djangoproject.com/en/dev/ref/databases/#sqlite-notesTheDJ (Not WMF) (talkcontribs) 11:36, 28 December 2021 (UTC)

Ornithopedia

Hello, I'm Dove, I'm interested in creating a wiki encyclopaedia about birds! Where do I start? 82.23.69.143 (talk) 20:13, 16 December 2021 (UTC)

If you want to create your own wiki (as opposed to contributing to something like wikipedia) you need to either self-host mediawiki (technically complicated, requires knowledge of web servers) or use a host.
For the second option, check out miraheze, wikia or shoutwiki.
If you want to add to wikipedia see w:WP:Treehouse and w:WP:WikiProject Birds Bawolff (talk) 05:49, 17 December 2021 (UTC)

Page contents missing

When I go to a few pages on my wiki I get the following error: There is currently no text in this page. You can search for this page title in other pages, search the related logs, or create this page.

If I try to edit the page, I get The revision #0 of the page named "...." does not exist. This is usually caused by following an outdated history link to a page that has been deleted. Details can be found in the deletion log. but there is an edit box.

If I put something into the edit box and try to save it I get Edit conflict: ...., and if I do the usual conflict resolution and put something in the edit box there, I get another edit conflict.

I can get Page Information for the page (e.g. its Page ID), there are revisions in the history, etc.

If I try to delete the page I get Fatal exception of type "LogicException"

If I try to move the page I get Fatal exception of type "MWException"/

If I try to make a new page with a different name and move it over top of the corrupted page, I get Fatal exception of type "LogicException"

This problem started at least a few weeks ago, but I couldn't pinpoint exactly when, it's an older wiki I have always kept version updated but not otherwise used for a while until lately. There are two corrupted pages where various fussing about that included user scripts and db reviews and possibly changes eventually fixed this, but I couldn't tell what causes it and how to fix it. There is another topic that seems related, Project:Support desk/Flow/2020/11#h-Missing_pages,_but_data_appear_to_be_intact-2020-11-21T01:37:00.000Z

How do I fix this consistently, or better yet, fix whatever underlying problem breaks this? Tenbergen (talk) 02:49, 17 December 2021 (UTC)

Sounds like referential integrity issues in the db. This is probably pretty difficult to fix without expert knowledge of mw's db schema.
The most immediate issue is probably something wrong with page_latest field of page table entry for that page. Bawolff (talk) 05:46, 17 December 2021 (UTC)
Sounds like referential integrity issues to me as well. I am certainly not an expert on mw schema, but I had worked my way through it, partly to try to troubleshoot this. Multi content revisions sure turned it into a beast!
If I understand it at this point then it links together something like this:
SELECT p.page_title, p.page_id, p.page_latest, r.rev_id, slot_revision_id, c.content_id, c.content_address, t.old_ID, t.old_text
FROM `mw_page` as p
join `mw_revision` as r on p.page_id=r.rev_page
join `mw_slots` as s on r.rev_id=s.slot_origin
join `mw_content` as c on s.slot_content_id = c.content_id
join `mw_text` as t on MID(content_address, 4) = t.old_id
WHERE
p.page_id="<ID of page as listed in Page Information>"
When I run this for a page that works, I get a "page_latest" and "rev_id" that are the same.
When I run it for a corrupted page, they are different, e.g. page_latest = 3166 but rev_id = 2743
My hunch is that I should make them be the same, but I don't know enough about the beast to know which I should change.
Also, I seem to come across pages that were messed up kind of randomly, so it would be nice to be able to run a query that tells me what pages are messed up as well. Tenbergen (talk) 03:19, 18 December 2021 (UTC)
In my case running the maintenance script to upgrade DB schema fixed the problem.
More info here: Manual:Upgrading 195.68.180.51 (talk) 08:21, 10 February 2023 (UTC)

Syntax Highlight not Working on Windows 10 MediaWiki 1.37.0

It didn't work on 1.34.1 either; but someone posted a "work around" fix https://www.mediawiki.org/w/index.php?title=Project%3ASupport%20desk/Flow/2020/03#c-46.232.228.6-2020-03-11T22%3A06%3A00.000Z-46.232.228.6-2020-03-10T15%3A57%3A00.000Z that seemed to "bypass" the problem. That fix doesn't work in 1.37.0 since the relevant code segment has been rewritten.


Fundamentally the problem is that Python doesn't start correctly and generates this message: Fatal Python error: _Py_HashRandomization_Init: failed to get random numbers to initialize Python Python runtime state: preinitialized


Has this bug been reported for 1.37.0? Mwgbell (talk) 07:19, 17 December 2021 (UTC)

Apparently this is a known Windows Python issue when run as a subprocess... https://www.scivision.dev/python-calling-python-subprocess/
Someone should probably file a ticket about this and then find a developer who uses Windows (rare) to help fix it. —TheDJ (Not WMF) (talkcontribs) 11:29, 28 December 2021 (UTC)
Thanks you for your response. That appears to be the exact problem. I decided to switch to Highlightjs_Integration since it actaully works, and the Wiki syntax is identical. Mwgbell (talk) 16:26, 26 January 2022 (UTC)
I have filed https://phabricator.wikimedia.org/T300223TheDJ (Not WMF) (talkcontribs) 00:32, 27 January 2022 (UTC)

MediaWiki versionL 1.36.2

PHP version: 7.4.26 (cgi-fcgi)

MySQL Database version: 5.6.51

When I open certain special pages on my wiki, I get a parser warning on my wiki. This is affecting the readability of my wikis.

This is what it looks like:

Warning: in_array() expects parameter 2 to be array, bool given in /home/gjlxrtap/public_html/mw19/includes/parser/Parser.php on line 2188

How can this be fixed? Newman2 (talk) 15:37, 18 December 2021 (UTC)

Which special page? If its an extension its probably a bug in the extension, you should ask the author to fix. Bawolff (talk) 18:55, 18 December 2021 (UTC)
Special:SpamRegex and Special:Version. Newman2 (talk) 19:43, 18 December 2021 (UTC)
In your LocalSettings.php. have you added any lines which turn on error reporting? AhmadF.Cheema (talk) 23:21, 19 December 2021 (UTC)

"Main" template

Hello everyone. Im trying to implement a basic Main template to my own wiki. Contents of my Template:Main is:

<code>''Main article: {{{Main}}}''</code>

But when I use this template on my pages like this:

<code>{{Main|Page I want}}</code>

it just shows Main article: {{{Main}}}

Any idea about why it doesnt work? 88.227.93.106 (talk) 18:55, 18 December 2021 (UTC)

See help:templates
You probably want {{{1}}} in the template instead of {{{Main}}} Bawolff (talk) 22:19, 18 December 2021 (UTC)

How to use Some code in Visual Editor?

How can I quickly use the tag <code> within the Visual Editor? If I insert it, it gets surrounded with <nowiki></nowiki> and thus has no effect.

I know I can use the source editor to do so, but changing to another editor is cumbersome.

If I type <ref> the Visual Editor recognizes it. It would be great to have the same for <code>... Stefahn (talk) 19:48, 18 December 2021 (UTC)

But why you want to use <code> this in VisualEditor? ↠Tanbirzx () 17:52, 23 December 2021 (UTC)
Because we do have some articles about coding - and I want to highlight the code from the usual text. Stefahn (talk) 12:48, 4 January 2022 (UTC)

Ambassador to

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! When I'm importing the infobox officeholder to my wiki, I'm finding that it all shows up "Ambassador to" on each of my offices? Here's a link to an example page: https://des.miraheze.org/wiki/User:John_Kent 86.173.71.191 (talk) 12:41, 19 December 2021 (UTC)

Nevermind. Fixed. 86.173.71.191 (talk) 14:34, 19 December 2021 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Adding Minerva Neue to LocalSettings.php makes my site blank

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


I've downloaded the Minerva Neue skin into my skins/ directory; I then added

wfLoadSkin('MinervaNeue');

$wgDefaultSkin = 'minerva';

to my LocalSettings.php file as per documentation.


However, it seems that my website is shown as blank when viewed in a browser. Removing those lines from LocalSettings.php restores original behavior; that is, my website's content appears.


Specs

MediaWiki 1.35.4

PHP 7.4.25 (apache2handler)

MariaDB 10.5.12-MariaDB-0.deb11u1 Eatmorepies (talk) 08:31, 20 December 2021 (UTC)

I looked in the Apache docs and found that Minerva Neue requires MediaWiki 1.37, while the current version in Debian's repos (which I downloaded from) is 1.35. Eatmorepies (talk) 08:49, 20 December 2021 (UTC)
You should download 1.35 branch of Minerva Neue from this link (Special:SkinDistributor/MinervaNeue) – Ammarpad (talk) 10:46, 20 December 2021 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

[MW 1.37.1] Error creating thumbnails with tiff-Images only

Uploading e.g. pdf or jp2 works very well, also thumbnails are generated. However uploading any tiff-file (tried with many different compressed and uncompressed tiff-files from 2kB to 50MB) does not create thumbnails anymore.


/tmp/ and ./images/ directories are owned by http-user / are writable for him.

$wgFileExtensions = array_merge($wgFileExtensions, array('doc', 'xls', 'mpp', 'pdf', 'ppt', 'xlsx', 'csv', 'sh', 'jpg', 'tiff', 'tif', 'bmp', 'pnm', 'ppm', 'odt', 'odg', 'ods', 'odp', 'zip', 'tar', 'tgz', 'gz', '7z', 'svg', 'txt', 'mp4', 'mkv', 'mpeg', 'avi', 'ogg', 'mp3', 'wasm', 'jp2'));

$wgTiffThumbnailType = array('png', 'image/png');

$wgMaxShellMemory = 0;

$wgMaxShellTime = 0;

$wgMaxImageArea = 10e7; Barpfotenbaer (talk) 11:22, 20 December 2021 (UTC)

Found a temporary workaround:
Replacing
mediawiki-1.37.1/includes/media/TiffHandler.php
by the older
mediawiki-1.36.3/includes/media/TiffHandler.php
and tiff-upload seems to work well. Barpfotenbaer (talk) 11:48, 20 December 2021 (UTC)

Load MediaWiki via OAuth

Dear MediaWiki,

I would like to load data via OAuth in our MediaWiki.

I already have the access Token created. But now I follow the instructions from API:Edit - but there is just an description of the botuser login not of the OAuth - than I also checked https://api.wikimedia.org/wiki/API_reference/Core/Pages/Edit_page where a OAuth description is and modified it to MediaWiki purpose.


I probably use the wrong input for 'User-Agent': 'YOUR_APP_NAME (YOUR_EMAIL_OR_CONTACT_PAGE)' or 'latest': { 'id': 'LATEST_REVISION_ID' } so I am not able to edit a MediaWiki side. Can you help me what I have to input in these Variables to edit a MediaWiki page via OAuth?


BR

Carla 195.190.143.246 (talk) 14:40, 20 December 2021 (UTC)

‪OAuth Api Support: User-Agent and latest Id‬

List of steps to reproduce (step by step, including full links if applicable):
I am quit new here and try to edit a page from my mediawiki.org project via OAuth.
I´m using the instruction on https://api.wikimedia.org/wiki/API_reference/Core/Pages/Edit_page
I have the Access Token but I am unsure if I put the right input in
'User-Agent': 'YOUR_APP_NAME (YOUR_EMAIL_OR_CONTACT_PAGE)'
and
'latest': { 'id': 'LATEST_REVISION_ID' }
because it doesn´t update the Mediawiki Page. ( https://<xxx>.<yyy>.org/mediawiki/index.php/<page> )
Can you help me to find the right input for 'User-Agent' and 'Latest'?
What happens?:
Get a 200 Response but nothing changes on the page
What should have happened instead?:
The text of a page should be changed
Software version (if not a Wikimedia wiki), browser information, screenshots, other information, etc:
https://<xxx>.<yyy>.org/mediawiki/index.php/<page> 195.190.143.246 (talk) 09:26, 21 December 2021 (UTC)
See https://phabricator.wikimedia.org/T298074#7582436 and see https://meta.wikimedia.org/w/index.php?title=Tech&oldid=22475665#OAuth_Api_Support:_User-Agent_and_latest_Id - it has been explained several times that api.wikimedia.org is not for your personal wiki installation. Malyacko (talk) 11:15, 21 December 2021 (UTC)
Thank you - unfortunately on Mediawiki is only an OAuth connection instruction to find no instruction how to edit a page through OAuth, which is why I have helped me at api.wikimedia.org. The variant described on Edit:Page Mediawiki is using a botuser which is unfortunately not the OAuth variant. Is there a description for OAuth editing? CarlaSch (talk) 17:00, 21 December 2021 (UTC)
You log in using the Authorization header. Try looking for some generic oauth 1.0 instructions as this is not mediawiki specific Bawolff (talk) 01:06, 22 December 2021 (UTC)
OAuth/For Developers has instructions. I believe api:edit uses version 1.0 of oauth Bawolff (talk) 01:08, 22 December 2021 (UTC)

Resetting log-in restriction

I have recently been made webmaster for a nonprofit, Friends of Nigeria. We have a wiki based on MediaWiki, wikifon.org. This wiki was created at least 10 years ago and none of the people involved are accessible. When I try to login/create an account, I get a message "Use FON listserv to request login". Unfortunately, the listserv no longer exists. How can I reset the login to get rid of this restriction?

Thank you, Dave Axtell David.axtell (talk) 23:28, 21 December 2021 (UTC)

If you have file or shell access to the server you can change this by editing LocalSettings.php, and using manual:createAndPromote.php and manual:changePassword.php Bawolff (talk) 01:02, 22 December 2021 (UTC)

Log4j and MediaWiki

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


Do you have any advice about the Log4j security issues? Buster2223 (talk) 23:51, 21 December 2021 (UTC)

Mediawiki does not use java so is not vulnerable.
However some extensions may use java components. You should make sure they and everything they use is up to date. In particular if using the CirrusSearch extension, make sure elasticsearch is up to date. Bawolff (talk) 01:00, 22 December 2021 (UTC)
Thank you. I did not know that about CirrusSearch. Do we have a list somewhere of extensions that use Java? Buster2223 (talk) 01:12, 22 December 2021 (UTC)
The only other thing that comes to mind is if you're using wikibase and setting up blazegraph for querying.
Some of the other less popular search extensions also use java.
Java is pretty unpopular in mediawiki extensions because most are php. I'm not aware of any list. Bawolff (talk) 02:10, 22 December 2021 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Require LDAP authentication for edit, but allow anonymous read

Product Version
MediaWiki 1.37.1
PHP 7.4.27 (fpm-fcgi)
SQLite 3.36.0
ICU 69.1
Lua 5.1.5
Pygments 2.10.0

with PluggableAuth, LDAPProvider, LDAPAuthentication2, LDAPAuthorization, LDAPUserInfo and LDAPGroups plugins installed from git.


Salient details from LocalSettings.php:

wfLoadExtension( 'PluggableAuth' );
$wgPluggableAuth_EnableAutoLogin = true;
$wgPluggableAuth_EnableLocalLogin = false;
$wgGroupPermissions['*']['authcreateaccount'] = true;
wfLoadExtension( 'LDAPProvider' );
$LDAPProviderCacheType = CACHE_ANYTHING;
$LDAPProviderDefaultDomain = "example.com";
$LDAPProviderDomainConfigs = "/etc/mediawiki/ldapprovider.json";
wfLoadExtension( 'LDAPAuthentication2' );
wfLoadExtension( 'LDAPAuthorization' );
$LDAPAuthorizationAutoAuthRemoteUserStringParser = "username-at-domain";
wfLoadExtension( 'LDAPGroups' );
wfLoadExtension( 'LDAPUserInfo' );

And an excerpt from the ldapprovider.json flle, omitting the 'connection' block:

{
   "example.com": {
    "authorization": {
      "rules": {
        "groups": {
          "required": [
            "cn=mediawiki_users,cn=groups,dc=example,dc=com"
          ]
        }
      }
    },
    "groupsync": {
      "mechanism": "mappedgroups",
      "mapping": {
        "bureaucrat": "cn=mediawiki_admins,cn=groups,dc=example,dc=com"
      }
   },
   "userinfo": {
    "attributes-map": {
      "email": "mail",
      "realname": "cn"
    }
   }
 }
}

This is a non-public wiki installation that is not accessible from the Internet.


As configured, visitors are required to log in to access any content page; I'd like to require authentication for editing, but generally allow anonymous read.


Can someone kindly point me in the right direction of how to update my configuration to support this use-model? My sense is that I need to augment the authorization block for the non-authenticated "user" , but exactly how alludes.


If there's a better way to achieve the "LDAP-backed authentication required for edit and maintenance but anonymous read" goal than what I've described here, I'm interested to learn/adapt/and improve my deployment.


Thanks! 72.81.158.95 (talk) 02:06, 23 December 2021 (UTC)

If the only thing you need to archive is "LDAP-backed authentication required for edit and maintenance but anonymous read", you only require
  • LDAPProvider
  • PluggabeAuth
  • LDAPAuthentication2
You can leave out LDPAGroups, LDAPUserInfo and even LDAPAuthorization. You only need to set "read" permission to group "*" and "edit" permission to group "user":
$wgGroupPermissions['*']['read'] = true;
$wgGroupPermissions['*']['edit'] = false;
$wgGroupPermissions['user']['edit'] = true; Osnard (talk) 13:33, 23 December 2021 (UTC)
Osnard -
Thanks for the quick reply. I understand now my original request didn't make the authorization part of my needs clear.
Let me offer a revised goal: I aim for LDAP-backed authentication and authorization for management of users and their roles, but would like to grant unauthenticated users general read-only access.
Thanks for your attention. 72.81.158.95 (talk) 16:38, 23 December 2021 (UTC)

digital ouput sms command.

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


Please how do I achieve this. ( Turning on and off the digout 1 using sms command). aAm having teltonika fmb 920 and fmb 125.

I have tried using the wiki sms command format but its failing. 41.75.189.246 (talk) 09:26, 23 December 2021 (UTC)

This is the support forum for the MediaWiki software stack for wikis. Your question seems specific to a particular wiki and does not relate to MediaWiki so we unfortunately cannot help you. —TheDJ (Not WMF) (talkcontribs) 11:39, 23 December 2021 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

MediaWiki internal error

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


I cannot access the wiki and I am getting this message. No clue what I should do or where to look. Can anyone help?

MediaWiki internal error.

Original exception: [a09cc71b0df637d8fef9c0cc] /mediawiki/index.php/P%C3%A1gina_principal Wikimedia\Rdbms\DBConnectionError: Cannot access the database: Access denied for user 'root'@'localhost' (using password: NO) (localhost) (localhost)

Backtrace:

from C:\xampp\htdocs\mediawiki\includes\libs\rdbms\loadbalancer\LoadBalancer.php(1513)

#0 C:\xampp\htdocs\mediawiki\includes\libs\rdbms\loadbalancer\LoadBalancer.php(991): Wikimedia\Rdbms\LoadBalancer->reportConnectionError()

#1 C:\xampp\htdocs\mediawiki\includes\libs\rdbms\loadbalancer\LoadBalancer.php(963): Wikimedia\Rdbms\LoadBalancer->getServerConnection(integer, string, integer)

#2 C:\xampp\htdocs\mediawiki\includes\libs\rdbms\loadbalancer\LoadBalancer.php(1128): Wikimedia\Rdbms\LoadBalancer->getConnection(integer, array, string, integer)

#3 C:\xampp\htdocs\mediawiki\includes\GlobalFunctions.php(2229): Wikimedia\Rdbms\LoadBalancer->getMaintenanceConnectionRef(integer, array, string)

#4 C:\xampp\htdocs\mediawiki\includes\cache\localisation\LCStoreDB.php(57): wfGetDB(integer)

#5 C:\xampp\htdocs\mediawiki\includes\cache\localisation\LocalisationCache.php(448): LCStoreDB->get(string, string)

#6 C:\xampp\htdocs\mediawiki\includes\cache\localisation\LocalisationCache.php(494): LocalisationCache->isExpired(string)

#7 C:\xampp\htdocs\mediawiki\includes\cache\localisation\LocalisationCache.php(370): LocalisationCache->initLanguage(string)

#8 C:\xampp\htdocs\mediawiki\includes\cache\localisation\LocalisationCache.php(311): LocalisationCache->loadItem(string, string)

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

#10 C:\xampp\htdocs\mediawiki\includes\language\LanguageFactory.php(158): MediaWiki\Languages\LanguageFallback->getAll(string)

#11 C:\xampp\htdocs\mediawiki\includes\language\LanguageFactory.php(116): MediaWiki\Languages\LanguageFactory->newFromCode(string)

#12 C:\xampp\htdocs\mediawiki\includes\ServiceWiring.php(380): MediaWiki\Languages\LanguageFactory->getLanguage(string)

#13 C:\xampp\htdocs\mediawiki\vendor\wikimedia\services\src\ServiceContainer.php(447): Wikimedia\Services\ServiceContainer::{closure}(MediaWiki\MediaWikiServices)

#14 C:\xampp\htdocs\mediawiki\vendor\wikimedia\services\src\ServiceContainer.php(416): Wikimedia\Services\ServiceContainer->createService(string)

#15 C:\xampp\htdocs\mediawiki\includes\MediaWikiServices.php(279): Wikimedia\Services\ServiceContainer->getService(string)

#16 C:\xampp\htdocs\mediawiki\includes\MediaWikiServices.php(801): MediaWiki\MediaWikiServices->getService(string)

#17 C:\xampp\htdocs\mediawiki\includes\ServiceWiring.php(1712): MediaWiki\MediaWikiServices->getContentLanguage()

#18 C:\xampp\htdocs\mediawiki\vendor\wikimedia\services\src\ServiceContainer.php(447): Wikimedia\Services\ServiceContainer::{closure}(MediaWiki\MediaWikiServices)

#19 C:\xampp\htdocs\mediawiki\vendor\wikimedia\services\src\ServiceContainer.php(416): Wikimedia\Services\ServiceContainer->createService(string)

#20 C:\xampp\htdocs\mediawiki\includes\MediaWikiServices.php(279): Wikimedia\Services\ServiceContainer->getService(string)

#21 C:\xampp\htdocs\mediawiki\includes\MediaWikiServices.php(1688): MediaWiki\MediaWikiServices->getService(string)

#22 C:\xampp\htdocs\mediawiki\includes\session\SessionManager.php(229): MediaWiki\MediaWikiServices->getUserNameUtils()

#23 C:\xampp\htdocs\mediawiki\includes\session\SessionManager.php(135): MediaWiki\Session\SessionManager->__construct()

#24 C:\xampp\htdocs\mediawiki\includes\Setup.php(762): MediaWiki\Session\SessionManager::singleton()

#25 C:\xampp\htdocs\mediawiki\includes\WebStart.php(90): require_once(string)

#26 C:\xampp\htdocs\mediawiki\index.php(44): require(string)

#27 {main}

Exception caught inside exception handler: [a09cc71b0df637d8fef9c0cc] /mediawiki/index.php/P%C3%A1gina_principal Wikimedia\Rdbms\DBConnectionError: Cannot access the database: Access denied for user 'root'@'localhost' (using password: NO) (localhost) (localhost)

Backtrace:

from C:\xampp\htdocs\mediawiki\includes\libs\rdbms\loadbalancer\LoadBalancer.php(1513)

#0 C:\xampp\htdocs\mediawiki\includes\libs\rdbms\loadbalancer\LoadBalancer.php(991): Wikimedia\Rdbms\LoadBalancer->reportConnectionError()

#1 C:\xampp\htdocs\mediawiki\includes\libs\rdbms\loadbalancer\LoadBalancer.php(963): Wikimedia\Rdbms\LoadBalancer->getServerConnection(integer, string, integer)

#2 C:\xampp\htdocs\mediawiki\includes\libs\rdbms\loadbalancer\LoadBalancer.php(1128): Wikimedia\Rdbms\LoadBalancer->getConnection(integer, array, string, integer)

#3 C:\xampp\htdocs\mediawiki\includes\GlobalFunctions.php(2229): Wikimedia\Rdbms\LoadBalancer->getMaintenanceConnectionRef(integer, array, string)

#4 C:\xampp\htdocs\mediawiki\includes\cache\localisation\LCStoreDB.php(57): wfGetDB(integer)

#5 C:\xampp\htdocs\mediawiki\includes\cache\localisation\LocalisationCache.php(393): LCStoreDB->get(string, string)

#6 C:\xampp\htdocs\mediawiki\includes\cache\localisation\LocalisationCache.php(311): LocalisationCache->loadItem(string, string)

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

#8 C:\xampp\htdocs\mediawiki\includes\language\LanguageFactory.php(158): MediaWiki\Languages\LanguageFallback->getAll(string)

#9 C:\xampp\htdocs\mediawiki\includes\language\LanguageFactory.php(116): MediaWiki\Languages\LanguageFactory->newFromCode(string)

#10 C:\xampp\htdocs\mediawiki\includes\ServiceWiring.php(380): MediaWiki\Languages\LanguageFactory->getLanguage(string)

#11 C:\xampp\htdocs\mediawiki\vendor\wikimedia\services\src\ServiceContainer.php(447): Wikimedia\Services\ServiceContainer::{closure}(MediaWiki\MediaWikiServices)

#12 C:\xampp\htdocs\mediawiki\vendor\wikimedia\services\src\ServiceContainer.php(416): Wikimedia\Services\ServiceContainer->createService(string)

#13 C:\xampp\htdocs\mediawiki\includes\MediaWikiServices.php(279): Wikimedia\Services\ServiceContainer->getService(string)

#14 C:\xampp\htdocs\mediawiki\includes\MediaWikiServices.php(801): MediaWiki\MediaWikiServices->getService(string)

#15 C:\xampp\htdocs\mediawiki\includes\ServiceWiring.php(922): MediaWiki\MediaWikiServices->getContentLanguage()

#16 C:\xampp\htdocs\mediawiki\vendor\wikimedia\services\src\ServiceContainer.php(447): Wikimedia\Services\ServiceContainer::{closure}(MediaWiki\MediaWikiServices)

#17 C:\xampp\htdocs\mediawiki\vendor\wikimedia\services\src\ServiceContainer.php(416): Wikimedia\Services\ServiceContainer->createService(string)

#18 C:\xampp\htdocs\mediawiki\includes\MediaWikiServices.php(279): Wikimedia\Services\ServiceContainer->getService(string)

#19 C:\xampp\htdocs\mediawiki\includes\MediaWikiServices.php(1180): MediaWiki\MediaWikiServices->getService(string)

#20 C:\xampp\htdocs\mediawiki\includes\exception\MWExceptionRenderer.php(377): MediaWiki\MediaWikiServices->getMessageCache()

#21 C:\xampp\htdocs\mediawiki\includes\exception\MWExceptionRenderer.php(75): MWExceptionRenderer::reportOutageHTML(Wikimedia\Rdbms\DBConnectionError)

#22 C:\xampp\htdocs\mediawiki\includes\exception\MWExceptionHandler.php(107): MWExceptionRenderer::output(Wikimedia\Rdbms\DBConnectionError, integer)

#23 C:\xampp\htdocs\mediawiki\includes\exception\MWExceptionHandler.php(202): MWExceptionHandler::report(Wikimedia\Rdbms\DBConnectionError)

#24 C:\xampp\htdocs\mediawiki\includes\exception\MWExceptionHandler.php(170): MWExceptionHandler::handleException(Wikimedia\Rdbms\DBConnectionError, string)

#25 [internal function]: MWExceptionHandler::handleUncaughtException(Wikimedia\Rdbms\DBConnectionError)

#26 {main} 213.60.68.92 (talk) 19:20, 23 December 2021 (UTC)

Can you please elaborate what is unclear about "Cannot access the database: Access denied for user 'root'@'localhost' (using password: NO) (localhost) (localhost)"? Your database settings are incorrect. Malyacko (talk) 20:01, 23 December 2021 (UTC)
Sorry. Complete newbie here. Already sorted out. 213.60.68.92 (talk) 20:30, 23 December 2021 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Save the data on the page even though you click Refresh

Hello,

I need help how I keep the data from being erased when refreshing.

I use localstorage. I'm writing a script for the first time so here's the code that works:

(function () {
	 
	var link, ls, pt;
	var i=0;
link = mw.util.addPortletLink('p-tb', '#', 'מעקב למידה');



if ( !link ) {
return;
}
     
link.onclick = function(event) {
        
event.preventDefault();
        
function recalculate() {
       
alert('האם להוסיף את הדף למעקב הלמידה שלך?');

pt = mw.util.addPortletLink('p-tb', '#' , "WikiPage::getId()" );

localStorage.setItem("lastname", "john1");
document.getElementById("btn").innerHTML = localStorage.getItem("lastname");


}
       
mw.util.$content.find(".firstHeading").after(
$('<div>', {'id' : 'btn' , 'class': 'voteCounterSpan'})
.css({'font-size': '140%', 'margin-bottom': '20px', padding: '8px', width: 'auto'})
.text('בוצע')
.append(
$('<input>', {'type': 'checkbox'})
.change(recalculate)
)
.append($('<span>', {'class': 'voteResults'}))
);
};
}() );

And this is the link but it seems to me that there is no access to it.

https://he.wikipedia.org/wiki/%D7%9E%D7%A9%D7%AA%D7%9E%D7%A9:ProjectYA/common.js ProjectYA (talk) 22:09, 23 December 2021 (UTC)

(function () {
var link, ls, pt;
var i=0;
link = mw.util.addPortletLink('p-tb', '#', 'מעקב למידה');
if ( !link ) {
return;
}
link.onclick = function(event) {
event.preventDefault();
function recalculate() {
alert('האם להוסיף את הדף למעקב הלמידה שלך?');
pt = mw.util.addPortletLink('p-tb', '#' , "WikiPage::getId()" );
localStorage.setItem("lastname", "john1");
document.getElementById("btn").innerHTML = localStorage.getItem("lastname");
}
mw.util.$content.find(".firstHeading").after(
$('<div>', {'id' : 'btn' , 'class': 'voteCounterSpan'})
.css({'font-size': '140%', 'margin-bottom': '20px', padding: '8px', width: 'auto'})
.text('בוצע')
.append(
$('<input>', {'type': 'checkbox'})
.change(recalculate)
)
.append($('<span>', {'class': 'voteResults'}))
);
};
}() ); 125.166.126.122 (talk) 05:43, 25 December 2021 (UTC)
Which underlying (!) problem is there to solve? Simply don't refresh? :) Malyacko (talk) 10:28, 25 December 2021 (UTC)
I want to keep the changes made to the page and will always appear.
The idea for this script is to track the pace of user progress on Wikipedia. So I need him to always see the progress.
I studied the subject but did not find a solution I would be happy to help! ProjectYA (talk) 18:30, 25 December 2021 (UTC)
I want to keep the changes made to the page and will always appear.
The idea for this script is to track the pace of user progress on Wikipedia. So I need him to always see the progress.
I studied the subject but did not find a solution I would be happy to help! ProjectYA (talk) 18:29, 25 December 2021 (UTC)
While it looks like you are setting the lastname to john1 and then immediately fetching it. If you want to keep it between reloads, you need to setItem everytime the user changes it, and not reset it back to default before fetching. Bawolff (talk) 00:33, 26 December 2021 (UTC)
Thank you,
Can you please show me what to write in the code? ProjectYA (talk) 06:35, 26 December 2021 (UTC)

Selected Topic Access for Users

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


I want to create a series of related topics in one Moodle course. From time to time I may have users that do not need the entire course. User A need to go through the whole course. User B may only need Topic #4. User C may need Topics 3, 5 and 9. How do I configure things so that Users B and C only have access to the Topics that they are required to take? Timjeske (talk) 23:28, 23 December 2021 (UTC)

Not sure what Moodle is but this is not their support desk,. —TheDJ (Not WMF) (talkcontribs) 23:56, 23 December 2021 (UTC)
Their documentation site uses MediaWiki and their categories pages contain a "Help" link which goes to MediaWiki.org... see https://docs.moodle.org/311/en/Special:Categories Jonathan3 (talk) 00:16, 24 December 2021 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

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


Hi,

Iam trying to follow

Manual:Footer

I copy exactly sample with external links but receive error

Notice: Undefined variable: skin in /www/wikifood.cz/LocalSettings.php on line 596

Fatal error: Uncaught Error: Call to a member function msg() on null in /www/wikifood.cz/LocalSettings.php:596 Stack trace: #0 /www/wikifood.cz/includes/Setup.php(145): require_once() #1 /www/wikifood.cz/includes/WebStart.php(90): require_once('/www/wikifood.c...') #2 /www/wikifood.cz/index.php(44): require('/www/wikifood.c...') #3 {main} thrown in /www/wikifood.cz/LocalSettings.php on line 596


MediaWiki 1.37.1, skin Vector


any ideas please?

Thanks! MikerCZx (talk) 11:31, 24 December 2021 (UTC)

Which exact version and branch of Vector is being used? Malyacko (talk) 16:30, 24 December 2021 (UTC)
Vektor 1.0.0 (the one in development package), upgraded to Vektor 1.0.0 (7f5eab5) 22. 12. 2021, 06:51
but no help - still same error MikerCZx (talk) 09:36, 25 December 2021 (UTC)
The second example on Manual:Footer is for LocalSettings.php. "External links" is the third and it is not stand-alone as it is not a function. You need to combine. Malyacko (talk) 10:26, 25 December 2021 (UTC)
Iam trying now this
// Add an external link
$wgHooks['onSkinAddFooterLinks'][] = function ( Skin $skin, string $key, array &$footerlinks  ) {
    if ( $key === 'places' ) {
        $footerlinks['my_url'] = Html::rawElement( 'a', [ 'href' => 'https://my.url/' ], 'My URL' );
    }
};
no error, but also no output :( MikerCZx (talk) 12:05, 25 December 2021 (UTC)
it should be $wgHooks['SkinAddFooterLinks'][] no on. On is a convention for the function name but not part of the event name. Bawolff (talk) 00:40, 26 December 2021 (UTC)
Thank you, this is finally working! MikerCZx (talk) 07:09, 26 December 2021 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Warnings appear when using

When using: Extension:MyVariables or Extension:GetUserName.In text {{CURRENTUSER}} or {{#USERNAME:}} A warning appears:
Deprecated

Use of $wgUser was deprecated in MediaWiki 1.35. [Called from MediaWiki\HookContainer\HookContainer::callLegacyHook in var/www/html/includes/HookContainer/HookContainer.php at line 338] in /var/www/html/includes/debug/MWDebug.php on line 375


Deprecated

$wgUser reassignment detected [Called from MediaWiki\HookContainer\HookContainer::callLegacyHook in /var/www/html/includes/HookContainer/HookContainer.php at line 338] in /var/www/html/includes/debug/MWDebug.php on line 375

Version MediaWiki: 1.37.1

What to do? Thanks. Khavwiki (talk) 11:26, 25 December 2021 (UTC)

Have you installed the latest updates for those extensions, with the same version as MW? Kanasalaatti (talk) 14:59, 25 December 2021 (UTC)
Yes of course. Everything is just downloaded. Everything is only the latest version. Khavwiki (talk) 18:33, 25 December 2021 (UTC)
the extension is a bit older, and probably the author hasn't updated it for the latest version of mediawiki. Try contacting the author. Bawolff (talk) 21:22, 25 December 2021 (UTC)
Both? Extension:MyVariables, Extension:GetUserName. But there are no others.
Extension:UserFunctions - does not work. Do what? Thanks anyway. Khavwiki (talk) 21:40, 25 December 2021 (UTC)
Whatever software needs updating. Malyacko (talk) 09:26, 26 December 2021 (UTC)
If the problem is that the warnings are user visible, then you should configure your php appropriately. See also: https://www.php.net/manual/en/function.error-reporting.php
However these (community maintained) extensions do require updating, and you are welcome to provide software patches to them of course, so that everyone can keep enjoying them. —TheDJ (Not WMF) (talkcontribs) 11:18, 28 December 2021 (UTC)
Hi,
I made a pull request which should fix warnings by the GetUserName extension. https://github.com/Wikimedica/mediawiki-extensions-GetUserName/pull/7
If you still have issue with extensions MyVariables and UserFunctions, place a message on my talk page here.
I would like to help you. :)
Best regards and happy holidays,
Zoran Kizule (talk) 03:40, 3 January 2022 (UTC)
Hi Kizule / Zoran, there is still a warning when using the MyVariables extension in MW 1.38. The warning appears both with REL1_38 and master branch. It says:
Deprecated: Use of $wgUser was deprecated in MediaWiki 1.35. [Called from MediaWiki\HookContainer\HookContainer::callLegacyHook in /html/intern.interspirit.de/mediawiki/includes/HookContainer/HookContainer.php at line 338] in /html/website/mediawiki/includes/debug/MWDebug.php on line 377
Deprecated: $wgUser reassignment detected [Called from MediaWiki\HookContainer\HookContainer::callLegacyHook in /html/intern.interspirit.de/mediawiki/includes/HookContainer/HookContainer.php at line 338] in /html/website/mediawiki/includes/debug/MWDebug.php on line 377
Can you fix that?
Thanks a lot! Stefahn (talk) 19:33, 21 October 2022 (UTC)
Hello Stefahn,
there aren't any usages of $wgUser in master branch. Are you sure that you've downloaded the latest version of files?
Best regards,
Zoran Kizule (talk) 18:44, 24 October 2022 (UTC)
Sorry, I used $wgUser in my LocalSettings.php. That was the problem, not the extension. Stefahn (talk) 16:36, 26 October 2022 (UTC)
Update: I had two issues at the same time. One was my LocalSettings.php, but the other is still Extension:MyVariables. In the 1.38 branch I get this warning on pages that use {{CURRENTUSER}}. I get exactly the two warnings I posted above. Can you fix that issue? Stefahn (talk) 10:07, 28 October 2022 (UTC)

Wiki common

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


Hello How can i design my wiki to function like wiki common.... Where they upload picture and can use the picture on my second wiki (knowledge wiki) ...... Thatnewman (talk) 08:38, 26 December 2021 (UTC)

What is "wiki common"? Please be way more specific. Malyacko (talk) 09:25, 26 December 2021 (UTC)
https://commons.wikimedia.org/wiki/Main_Page Thatnewman (talk) 11:34, 26 December 2021 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

What is the most early hook called in all pages?

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


I need to inject some css and js (1) very early in the page and (2) in every page in order to patch on the appearance.


All the hooks I tried thus far either are too far down in the page (and I get a flickering of the page on reload) or they appear only on article pages but are missing on special pages, user preference pages, contribution pages or similar. Also, common.css and common.js do not work. 2003:E7:572B:AB00:91FB:8B32:DFDD:1E7E (talk) 09:46, 26 December 2021 (UTC)

Take a look at Snippets/Load an additional JavaScript or stylesheet file on all pages and see if this solves your problem. Ciencia Al Poder (talk) 10:40, 26 December 2021 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Mediawiki will not install with supported PHP.

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


Current PHP:

# php -v

PHP 7.4.27 (cli) (built: Dec 20 2021 21:28:15) ( NTS )

Copyright (c) The PHP Group

Zend Engine v3.4.0, Copyright (c) Zend Technologies

    with Zend OPcache v7.4.27, Copyright (c), by Zend Technologies


MediaWiki Installer:

MediaWiki 1.37 internal error

MediaWiki 1.37 requires PHP 7.3.19 or higher (and not 7.4.0 - 7.4.2); you are using PHP 7.2.34-28+ubuntu20.04.1+deb.sury.org+1.

Supported PHP versions

Please consider upgrading your copy of PHP. PHP versions less than v7.3.0 are no longer supported by the PHP Group and will not receive security or bugfix updates.

If for some reason you are unable to upgrade your PHP version, you will need to download an older version of MediaWiki from our website. See our compatibility page for details of which versions are compatible with prior versions of PHP.


Please tell me what I am doing wrong. Cylismaori (talk) 10:22, 26 December 2021 (UTC)

You have different PHP versions installed on your system.
On command line you have php 7.4.27, but on webserver you have PHP 7.2.34. You'll have to upgrade the webserver's PHP version, or configure it to use a newer version if it's already installed Ciencia Al Poder (talk) 10:25, 26 December 2021 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

creating a common wiki

Hello i would like to create a wiki for uploading picture https://commons.wikimedia.org/wiki/Main_Page and another wiki where it can be used like wikipeidia.. Please how can i ? Thatnewman (talk) 11:35, 26 December 2021 (UTC)

Manual:$wgForeignFileRepos Bawolff (talk) 20:02, 26 December 2021 (UTC)

Prevent editing pages when vpn is enabled

I get the following error. I see this error when editing a test on one of the MediaWiki pages, and the same is true of other Wikipedia Foundation wikis.

How can I prevent edits that are enabled on my wiki and via vpn?


You do not have permission to edit this page, for the following reason:

Your IP address is in a range that has been blocked on all Wikimedia Foundation wikis.

The block was made by Martin Urbanec (meta.wikimedia.org). The reason given is No open proxies: please read the FAQ should you be affected.

  • Start of block: 01:13, 16 August 2020
  • Expiry of block: 01:13, 16 August 2023

Your current IP address is 37.120.217.114 and the blocked range is 37.120.217.0/24. Please include all above details in any queries you make.

If you believe you were blocked by mistake, you can find additional information and instructions in the No open proxies global policy. Otherwise, to discuss the block please post a request for review on Meta-Wiki or send an email to the stewards OTRS queue at stewards@wikimedia.org including all above details. Sokote zaman (talk) 09:56, 27 December 2021 (UTC)

this was a manual block via extension:globalBlocking. https://meta.m.wikimedia.org/wiki/Special:GlobalBlockList
You could copy all the blocks.
Alternatively you could also try $wgEnableDnsBlacklist Bawolff (talk) 19:17, 27 December 2021 (UTC)

Suggestion to upgrade Fandom Wikis to MediaWiki

Hello there, i have a suggestion. Do you think that all Fandom Wiki sites such as TTTE Wiki (https://ttte.fandom.com/wiki/Thomas_the_Tank_Engine_Wiki), Sonic News Network Wiki (https://sonic.fandom.com/wiki/Sonic_News_Network), Scoobypedia (https://scoobydoo.fandom.com/wiki/Scoobypedia) and others should be upgraded to MediaWiki just like MarioWiki? Here's the link: https://www.mariowiki.com/ What are your thoughts about this? 82.69.56.206 (talk) 05:27, 28 December 2021 (UTC)

We don't have any say over fandom and as far as i know fandom folks don't monitor this page. You should talk to the fandom people about this directly. Bawolff (talk) 06:15, 28 December 2021 (UTC)
I thought all Fandom wikis were now running 'normal' MediaWiki? There was a project to migrate away from their custom version of core, and use Wikimedia's version. Sam Wilson 10:08, 28 December 2021 (UTC)
You can just check the Special:Version page of any fandom wiki to find exactly what they are running. For instance: https://ttte.fandom.com/wiki/Special:Version. Currently 1.33.3 it seems. —TheDJ (Not WMF) (talkcontribs) 11:12, 28 December 2021 (UTC)

How one can create company page in Wikipedia?

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


Hello I need to create a Wikipedia page for my Company. Can anyone help me out how its done? Sunnyuffizio (talk) 10:31, 28 December 2021 (UTC)

This is not the helpdesk for Wikipedia (see here for that), but in general, you shouldn't as you have a conflict of interest and Wikipedia discourages you from writing about things you have a conflict of interest in. Inclusion in Wikipedia is not something that companies get to decide, Wikipedia is not for profiles of your company. —TheDJ (Not WMF) (talkcontribs) 11:05, 28 December 2021 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Skins not working with wikifarm

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


I am having trouble getting my wiki's stylesheets (skins) loaded when setting up a wikifarm. (Some details below are anonymised, but not to the extent of obscuring what is happening.)

  • MediaWiki version 1.32.0
  • PHP version 7.3.31 (cgi-fcgi)
  • MySQL version 5.5.60-0+deb7u1-log
  • ICU version 63.1


Background: I have nine independent MediaWiki installations that I want to consolidate into one MediaWiki software installation with separate LocalSettings and image directories for each independent wiki instance (the purpose of the consolidation is to reduce the overhead of updating multiple sites, and reduce the number of duplicted files on my server).


Current approach: I've created a new copy of the 1.32.0 files. To this, I've added a basic LocalSettings.php which contains only the following code (so far):

<?php $callingurl = strtolower( $_SERVER['REQUEST_URI'] ); // get the calling url if ( strpos( $callingurl, '/site1' ) === 0 ) {

       require_once 'LocalSettings_site1.php';

} elseif ( strpos( $callingurl, '/site2' ) === 0 ) {

       require_once 'LocalSettings_site2.php';

} elseif ( strpos( $callingurl, '/site3' ) === 0 ) {

       require_once 'LocalSettings_site3.php';

} elseif ( strpos( $callingurl, '/site4' ) === 0 ) {

       require_once 'LocalSettings_site4.php';

} else {

       header( 'HTTP/1.1 404 Not Found' );
       echo "This wiki (\"" . htmlspecialchars( $callingurl ) . "\") is not available. Check configuration.";
       exit( 0 );






}

I've then taken a copy of the LocalSettings.php from one of the sites, renamed it to LocalSettings_site1.php, and placed it in the same (new MW installation) directory. That file has the following edits:

  • $wgScriptPath changed from a relative path ("/directory/wiki") to an absolute path ("http://domain.tld/directory/wiki").
  • Added: $wgUploadPath = "http://domain.tld/directory/wiki/images";

In my .htaccess file, I have pointed to the new installation location: RewriteRule ^site1/(.*)$ /mediawiki-1.32.0/index.php?title=$1 [PT,L,QSA] RewriteRule ^site1/*$ /mediawiki-1.32.0/index.php [L,QSA]

To ensure that the correct (new) LocalSettings.php file is being used, I renamed the old filename.

Special:Version confirms that each of index.php, api.php, load.php are correctly pointing to the old (http://domain.tld/directory/wiki) installation directory.


Problem: The site loads content correctly (including images) but does not load the stylesheets.

  • There are no custom stylesheets.
  • Each of MonoBook, Timeless, Vector are enabled, and Vector is the default.
  • Copies of the stylesheets exist in the standard format in the skins subdirectory in both the old and new installation locations.
  • MediaWiki:Common.css contains some innocuous customisation (standard CSS for some named table classes).

Setting a value in LocalSettings_site1.php for $wgStylePath and/or $wgLocalStylePath has no effect.

Setting a value in LocalSettings_site1.php for $wgStyleDirectory causes an error:

Fatal error: Uncaught Exception: http://domain.tld/directory/wiki/skins/MonoBook/skin.json does not exist! in /homepages/44/d134443309/htdocs/mediawiki-1.32.0/includes/registration/ExtensionRegistry.php:107 Stack trace: #0 /homepages/44/d134443309/htdocs/mediawiki-1.32.0/includes/GlobalFunctions.php(87): ExtensionRegistry->queue('http://domain.t...') #1 /homepages/44/d134443309/htdocs/mediawiki-1.32.0/LocalSettings_wh40k.php(129): wfLoadSkin('MonoBook') #2 /homepages/44/d134443309/htdocs/mediawiki-1.32.0/LocalSettings.php(8): require_once('/homepages/44/d...') #3 /homepages/44/d134443309/htdocs/mediawiki-1.32.0/includes/Setup.php(103): require_once('/homepages/44/d...') #4 /homepages/44/d134443309/htdocs/mediawiki-1.32.0/includes/WebStart.php(77): require_once('/homepages/44/d...') #5 /homepages/44/d134443309/htdocs/mediawiki-1.32.0/index.php(39): require('/homepages/44/d...') #6 {main} thrown in /homepages/44/d134443309/htdocs/mediawiki-1.32.0/includes/registration/ExtensionRegistry.php on line 107

This error arises if I use one of these methods to pass a value to $wgStyleDirectory:

  • $wgStyleDirectory = "http://domain.tld/directory/wiki/skins";
  • $wgStyleDirectory = $wgScriptPath ."/skins";
  • $wgStyleDirectory = $wgStylePath; # and $wgStylePath has been give a value
  • $wgStyleDirectory = $wgLocalStylePath; # and $wgLocalStylePath has been given a value

The file "http://domain.tld/directory/wiki/skins/MonoBook/skin.json" absolutely does exist. I can enter that URL (deanonymised) into my browser and the file contents is displayed.

Alternatively, pointing at the new skins location, I get the same error but with a different file location:

Fatal error: Uncaught Exception: http://domain.tld/mediawiki-1.32.0/skins/MonoBook/skin.json does not exist! in /homepages/44/d134443309/htdocs/mediawiki-1.32.0/includes/registration/ExtensionRegistry.php:107 Stack trace: #0 /homepages/44/d134443309/htdocs/mediawiki-1.32.0/includes/GlobalFunctions.php(87): ExtensionRegistry->queue('http://domain.t...') #1 /homepages/44/d134443309/htdocs/mediawiki-1.32.0/LocalSettings_wh40k.php(131): wfLoadSkin('MonoBook') #2 /homepages/44/d134443309/htdocs/mediawiki-1.32.0/LocalSettings.php(8): require_once('/homepages/44/d...') #3 /homepages/44/d134443309/htdocs/mediawiki-1.32.0/includes/Setup.php(103): require_once('/homepages/44/d...') #4 /homepages/44/d134443309/htdocs/mediawiki-1.32.0/includes/WebStart.php(77): require_once('/homepages/44/d...') #5 /homepages/44/d134443309/htdocs/mediawiki-1.32.0/index.php(39): require('/homepages/44/d...') #6 {main} thrown in /homepages/44/d134443309/htdocs/mediawiki-1.32.0/includes/registration/ExtensionRegistry.php on line 107

This error arises if I use this method to pass a value to $wgStyleDirectory:

  • $wgStyleDirectory = "http://domain.tld/mediawiki-1.32.0/skins";

Again the file "http://domain.tld/mediawiki-1.32.0/skins/MonoBook/skin.json" absolutely does exist.

However, if I explicitly set $wgStyleDirectory to its default value ($IP ."/skins"), I get the initial behaviour of the site content loading corrently (including images) but no stylesheets being applied.

Inspecting the served document, the stylesheet links are pointing to:

  • "http://domain.tld/directory/wiki/load.php?debug=false&lang=en-gb&modules=jquery.makeCollapsible.styles%7Cmediawiki.legacy.commonPrint%2Cshared%7Cmediawiki.skinning.interface%7Cskins.vector.styles&only=styles&skin=vector"
  • "http://domain.tld/directory/wiki/load.php?debug=false&lang=en-gb&modules=site.styles&only=styles&skin=vector"

Removing extensions has no effect on the above described behaviour.

Commenting out the load of MonoBook and/or Timeless just moves the error down the list, ultimately to Vector.


Any thoughts on what might be going wrong with MediaWiki looking for the stylesheets, and any approaches I might try to fix it, please? Stelio (talk) 17:18, 28 December 2021 (UTC)

Your setting incorrect values for a bunch of these.
  • $wgScriptPath should be relative (it is appended to $wgServer)
  • $wgStyleDirectory is not a url but a file system path.
  • $wgStylePath, while probably ok being a full url, is not related to loading css files anymore. Bawolff (talk) 19:57, 28 December 2021 (UTC)
Thanks for the reply. I've backed out the bits you mentioned ($wgScriptPath is now relative again, and neither $wgStyleDirectory nor $wgStylePath are set at all in LocalSettings). The problematic behaviour is still exactly the same: text content and images are served, but no stylesheets are working. Stelio (talk) 22:18, 28 December 2021 (UTC)
So if i understand correctly, directory/wiki is an empty directory (other than .htaccess), and you use rewrite rules in your .htaccess so that a url like directory/wiki/index.php?action=history gets resolved to mediawiki-1.32.0/index.php ?
So to confirm, first of all:
  • Does editing a page work?
  • Does viewing api.php give the API help page?
  • If you visit http://domain.tld/directory/wiki/load.php?debug=false&lang=en-gb&modules=jquery.makeCollapsible.styles%7Cmediawiki.legacy.commonPrint%2Cshared%7Cmediawiki.skinning.interface%7Cskins.vector.styles&only=styles&skin=vector what do you get? Do you get a css file? a 404 error page? Some sort of php error? The normal wiki? Something else?
It sounds like you are rewriting index.php to the real index.php, but you also need to rewrite all the other .php files in the root of the mediawiki directory (especially api.php and load.php) Bawolff (talk) 00:26, 29 December 2021 (UTC)
@Stelio 1.32.0 is an ancient insecure software version. Please upgade for your own safety. Malyacko (talk) 17:13, 29 December 2021 (UTC)
@Malyacko - Indeed, I know. My target is to upgrade my MediaWiki version(s). Currently I have nine independent sites. If I can consolidate them onto a single installation as a wikifarm, I can then do the upgrade once.
Otherwise, I need to independently upgrade each of the nine installations one by one. And then I still need to consolidate them into a wikifarm at some point to save having to do this again.
So ideally I'm trying to get a working wikifarm first and then worry about upgrading. Stelio (talk) 17:35, 29 December 2021 (UTC)
Thank you for the insight, and apologies for not making my approach clearer.
  • /directory/wiki contains an installation of MW 1.32.0 that is fully functional and works properly. This is the old installation.
    • In my .htaccess file, I can point access to this code and LocalSettings.php with these lines:
      RewriteRule ^site1/(.*)$ /directory/wiki/index.php?title=$1 [PT,L,QSA]
      RewriteRule ^site1/*$ /directory/wiki/index.php [L,QSA]
  • /mediawiki-1.32.0 contains a new installation of MW 1.32.0 which is to be the location for the wikifarm code. I want to use this single directory to hold all the MediaWiki source code (along with skins and extensions).
    • In my .htaccess file, I can point access to this code and LocalSettings.php with these lines:
      RewriteRule ^site1/(.*)$ /mediawiki-1.32.0/index.php?title=$1 [PT,L,QSA]
      RewriteRule ^site1/*$ /mediawiki-1.32.0/index.php [L,QSA]
Ultimately I want to remove the MediaWiki installation from /directory/wiki, leaving behind just the images subdirectory. I'd like to do the same with all of the independent MediaWiki installations that I have, so that they are served by one consistent code base but have independent databases and image directories. I am ambivalent to the location for the individual LocalSettings.php files for each site. My understanding is that I therefore need to use $wgScriptPath = "/mediawiki-1.32.0" and get that working.
(Existing working old installation.) If I point .htaccess to /directory/wiki/index.php, then...
If I point .htaccess to /mediawiki-1.32.0/index.php, and set /mediawiki-1.32.0/LocalSettings.php to load /mediawiki-1.32.0/LocalSettings_site1.php (renaming /directory/wiki/LocalSettings.php to ensure it's not being used), and set $wgScriptPath = "/directory/wiki", then...
(Possible target operating model using new installation as a wikifarm.) If I point .htaccess to /mediawiki-1.32.0/index.php, and set /mediawiki-1.32.0/LocalSettings.php to load /mediawiki-1.32.0/LocalSettings_site1.php (renaming /directory/wiki/LocalSettings.php to ensure it's not being used), and I set $wgScriptPath = "/mediawiki-1.32.0", then...
(Possible target operating model using new installation as a wikifarm.) If I point .htaccess to /mediawiki-1.32.0/index.php, and set /mediawiki-1.32.0/LocalSettings.php to load /directory/wiki/LocalSettings.php, and I set $wgScriptPath = "/mediawiki-1.32.0", then...
I'd reccomend deleting your old path (to avoid confusion). You have half the things pointing to the new wikifarm, and half the things pointing to the old directory. You have to have all the things (by which i mean php urls via .htaccess. Its fine for images to be seperate) point to your new wikifarm in order for mediawiki to work - it won't work if its mixed together. Right now it seems like you are only rewriting short urls, but you would also need rewrite rules in your .htaccess for long urls (e.g. index.php), api.php and load.php (and i suppose the other php entrypoints but they aren't as important)
E.g. you need rewrite rules like (haven't tested this, this is just to demonstrate the idea,may not be precisely correct)
RewriteRule ^site1/index.php /mediawiki-1.32.0/index.php [L,QSA]
RewriteRule ^site1/api.php /mediawiki-1.32.0/api.php [L,QSA]
RewriteRule ^site1/load.php$ /mediawiki-1.32.0/load.php [L,QSA]
RewriteRule ^site1/(.*)$ /mediawiki-1.32.0/index.php?title=$1 [PT,L,QSA]
RewriteRule ^site1/*$ /mediawiki-1.32.0/index.php [L,QSA]
Bawolff (talk) 06:27, 30 December 2021 (UTC)
Ugh. I see that the issue is completely to do with the how the wikifarm is set up in the man LocalSettings.php with the switch statement.
That determines which wiki is required by parsing the URL and loads the appropriate site-specific LocalSettings, then serves the page contents.
However various URLs do not include the site-specific domains. They are using the MW installation location, so the URL contains no information on which specific site is required. For example, none of these URLs are site-specific, meaning the global LocalSettings.php cannot handle them:
  • http://domain.tld/mediawiki-1.32.0/index.php?title=Main_Page&action=edit
  • http://domain.tld/mediawiki-1.32.0/api.php
  • http://domain.tld/mediawiki-1.32.0/load.php?debug=false&lang=en-gb&modules=jquery.makeCollapsible.styles%7Cmediawiki.legacy.commonPrint%2Cshared%7Cmediawiki.skinning.interface%7Cskins.vector.styles&only=styles&skin=vector
The two examples on Manual:Wiki family (1: Basic principles and 2: Giant switch statement) don't actually provide a way to cope with handling global page loads.
I think I'm missing something fundamental on how the wikifarm is meant to work. :-( Stelio (talk) 19:50, 30 December 2021 (UTC)
All of those urls are controlled by $wgScriptPath. So normally you set $wgScriptPath = "/directory/wiki"; and then have rewrite rules so the backend rewrites it to be mediawiki-1.32.0 directory. Bawolff (talk) 22:10, 30 December 2021 (UTC)
You beauty! That's it. :-D That's the concept I was missing, and now everything appears to be working. Perfect. Thank you very much indeed! Stelio (talk) 08:53, 31 December 2021 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Main page image not working

Version: MediaWiki 1.37.1 LTS

The wiki image on my website doesn't work

Wiki link: http://wiki.jmcs-uk.ml

It still shows the default logo or a really zoomed in image not the pepsi socks I used as a test

I'm not really sure what to do 213.205.198.142 (talk) 20:51, 28 December 2021 (UTC)

I see the pepsi socks, but zoomed in. The wiki logo must be 135x135 pixels big. If its a different size, you will get a very zoomed in picture.
If things aren't updating, try and do ctrl+shift+r to do a hard refresh of the page. Bawolff (talk) 00:31, 29 December 2021 (UTC)

Community Wishlist Survey 2022 is coming. Help us!

The Community Wishlist Survey 2022 starts in less than two weeks (Monday 10 January 2022, 18:00 UTC). We, the team organizing the Survey, need your help.

Only you can make the difference

How many people will hear and read about the Survey in their language? How many will decide to participate? Will there be enough of you to vote for a change you would like to see? It all depends on you, volunteers.

Why are we asking?

  • We have improved the documentation. It's friendlier and easier to use. This will mean little if it's only in English.
  • Thousands of volunteers haven't participated in the Survey yet. We'd like to improve that, too. Three years ago, 1387 people participated. Last year, there were 1773 of them. We hope that in the upcoming edition, there will be even more. You are better than us in contacting Wikimedians outside of wikis. We have prepared some images to share. More to come.

What is the Community Wishlist Survey?

It's an annual survey that allows contributors to the Wikimedia projects to propose and vote for tools and platform improvements. Long years of experience in editing or technical skills are not required.

Thanks, and be safe and successful in 2022! SGrabarczuk (WMF) (talk) 03:15, 29 December 2021 (UTC)

MediaWiki message delivery (talk) 03:15, 29 December 2021 (UTC)

Special404 doesn't work

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


good afternoon, i installed the extension https://www.mediawiki.org/wiki/Extension:Special404 but it doesn't work. Could you tell me what rule in htaccess I need to register. For apache, it says to write:

RewriteCond% {REQUEST_FILENAME}! -F
RewriteCond% {REQUEST_FILENAME}! -D
RewriteRule ^ /?. * $ /Index.php?title=Special:Error404

But the fact is that this option, as I understand it, is suitable for static URLs without friendly URLs. And I have a friendly URL enabled on my site. This is my Htaccess file:

RewriteEngine On
RewriteRule ^/(.*):(.*) /index.php/$1:$2
<IfModule mod_rewrite.c> 
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /Facial_Anti-Spoofing:_Types,_Countermeasures_%26_Challenges\ HTTP/ 
RewriteRule ^Facial_Anti-Spoofing:_Types,_Countermeasures_%26_Challenges$ http://%{HTTP_HOST}/ [R=301,L]
</IfModule>
 
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) index.php?title=$1 [L,QSA]

Redirect 301 /index.html https://antispoofing.org/
Redirect 301 /home.php https://antispoofing.org/
Redirect 301 /home.html https://antispoofing.org/


RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^/?.*$ index.php?title=Special:Error404
92.47.57.157 (talk) 18:18, 29 December 2021 (UTC)
? 176.64.13.162 (talk) 06:37, 30 December 2021 (UTC)
Hello, you can help me? 92.47.56.101 (talk) 09:29, 30 December 2021 (UTC)
If your pages are located at the root directory of your wiki (e.g.: example.com/Page_name), there's no point in installing a "Special:404" handler, because every unknown path of your site will reach MediaWiki, either an existing page, or a non-existing one.
You can edit MediaWiki:noarticletext and MediaWiki:noarticletext-nopermission to customize the text displayed on the non-existing page Ciencia Al Poder (talk) 10:03, 30 December 2021 (UTC)
thanks 176.64.13.162 (talk) 14:24, 30 December 2021 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

How to reference, e.g., a table on a MW page?

I'd like to hotlink, e.g., a "Battery Statistics Table" from a number of places on my wiki. (This is just an example.) I can google lots of info on the Ref or Cite functionality, but I'm not talking about end notes or citations. I'm talking about linking to other parts of my text (which are not Table of Contents).

I feel sure that there must be an easy way to do this, but I just don't know the right keyword (or whatever) to google on.

Thanks if you can help! RedKnight7 (talk) 21:17, 29 December 2021 (UTC)

If the table has an id attribute, you can reference it by adding #ID_HERE to the end of the page name.
e.g.
{| class="wikitable" id="fruit"
|+Food complements
|-
|Orange
|Apple
|-
|Bread
|Pie
|-
|Butter
|Ice cream 
|}
Can be linked to with [[Page table is on#fruit]] Bawolff (talk) 06:15, 30 December 2021 (UTC)

Deleting my account

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


How do i delete my account, can't find a section anywhere 2A00:23C8:9C1F:EB01:A5D0:7113:4FD8:1DA8 (talk) 22:18, 29 December 2021 (UTC)

Account where? Please provide a full link to the website that this is about. Malyacko (talk) 09:41, 31 December 2021 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Traducción del francés al español realizada por un novato en edición de Wikipedia

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


Soy redactora jefe de Wamiz España, la versión en español de la página web dedicada a los animales de compañía líder en Europa, WAMIZ, con sede en París.

Desde que wamiz.es se pusiera en línea en febrero de 2.019 decenas de medios de comunicación españoles han compartido nuestras noticias y consejos. El sitio web es ya conocido entre los propietarios de mascotas y el gran público quiere cerciorarse de la fiabilidad del mismo, puesto que se ofrecen consejos de veterinaria.

Mi intención es hacer una traducción del artículo de Wikipedia sobre Wamiz disponible en francés. Sin embargo, nunca antes he editado en Wikipedia y me resulta arduo puesto que no conozco el editor.

Me gustaría añadir la traducción en español de la página dedicada a Wamiz -EN FRANCÉS- puesto que domino a la perfección el idioma, sin hacer otras aportaciones a Wikipedia.

He intentado hacer la traducción por mi cuenta. No obstante, he podido constatar que crear un artículo en Wikipedia no es algo que un novato en edición pueda realizar fácilmente.

Mi pregunta es: ¿puedo enviar el texto en bruto traducido más el logo oficial de la versión en español de Wamiz sin realizar ninguna otra aportación y sin ser experto en edición en Wikipedia?

Gracias de antemano por la ayuda. Cristina Ridao (talk) 11:01, 30 December 2021 (UTC)

Hola, te recomiendo que leas w:es:Wikipedia:Conflicto de interés, pues es un claro caso de conflicto de interés.
Aunque tenga artículo en Wikipedia en francés, este no es necesariamente relevante en Wikipedia en español. Por ejemplo, la web podría no ser tan popular para los hablantes de español, y Wikipedia en español tendrá sus políticas sobre artículos de sitios web.
En estos casos, lo recomendable es que sea la comunidad la que cree el artículo, cuando se considere que es relevante. También puedes hacer tu consulta en el café de ayuda, donde es más relevante. Ciencia Al Poder (talk) 12:03, 30 December 2021 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Hello=)

Is there any URL handler that can be used to disable the link to itself on the page. For example:

I am on the page: https://example.com/mainpage

And at the same time, I have a link to this page on the main sidebar: mainpage | mainpage

And how to make it so that in the sidebar if I am on the page / mainpage this link becomes inactive.

I tried variants with JS and CSS. But this option is not suitable, you need to have the link in the code without the <a> attribute. 176.64.13.162 (talk) 14:40, 30 December 2021 (UTC)

Maybe you could do something with parser functions. https://www.mediawiki.org/wiki/Manual:Interface/Sidebar#Parser_functions_in_sidebar Bawolff (talk) 23:19, 1 January 2022 (UTC)

Can I use LocalSettings.php to store a variable for JavaScript?

I want to store my phone number in LocalSettings.php so it would be easy to change any occurrence of my phone number in one place, as I use my phone number in various places:

  • Phone call now button
  • WhatsApp call now button
  • Popup box with a "why won't you call me now?" message
  • Probably more JavaScript buttons and windows

I assume that MediaWiki Templates are not good for this because I cannot parse them in JavaScript files which I load from mediawiki:Common.js:

mw.loader.load("/index.js");

What is my option? 109.66.33.120 (talk) 15:38, 30 December 2021 (UTC)

See Manual:Hooks/ResourceLoaderGetConfigVars Bawolff (talk) 18:46, 30 December 2021 (UTC)
I almost don't know anything about OOP.
I also don't know what is the & in &$vars.
Isn't the hook ResourceLoaderGetConfigVars creates some output? Is this output HTML or a JSON resource file?
How would it help me? 109.66.33.120 (talk) 11:41, 31 December 2021 (UTC)
The & means the variable is read/write and can be modified even if it isn't returned.
Example
$wgHooks['ResourceLoaderGetConfigVars'][] = function onResourceLoaderGetConfigVars( array &$vars, string $skin, Config $config ) {
  $vars['myPhoneNumber'] = '123-5555';
};
Of course, most people would probably just create a variable in Common.js Bawolff (talk) 18:58, 31 December 2021 (UTC)

Problems after upgrading in a subdirectory (/w)

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.


For some time now I’ve had my mediawiki installation directly in my “public_html” directory.

But for a number of reasons I’ve decided to upgrade to the latest mediawiki version by placing it in in a subdirectory “/w”.

After successfully installing the new version, the only changes I’ve made are as follows:


I copied over my old LocalSettings.php file — and placed it in the new “/w” directory — and added the following:

$wgScriptPath     = "/w";

$wgArticlePath    = "/wiki/$1";


And in the .htaccess file I have added:

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

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


Some questions:

  1. Presumably I now have two instances of mediawiki running? To deactivate the old version is it simply a case of deleting every file in the “public_html” directory (except for the “/w” directory and my .htaccess file?) or is there a safer and better method?
  2. What do I do about my “images” folder? Is it best simply to copy all my images to the “images” folder in “/w” (as opposed to keeping it in the directory above)?
  3. I get a "403 - Forbidden" when I attempt to access any of my special pages such as “http://wiki.scotlandonair.com/wiki/Special:Upload”. How do I fix this? I'm not aware of having changed any permissions and I am definitely logged in. Grahamstewart (talk) 00:53, 31 December 2021 (UTC)
For 1: basically yes
For 2: doesn't really matter, whichever you prefer.
For 3: http://wiki.scotlandonair.com/w/index.php?title=Special:Upload works, so maybe rewrite rule related, but your rewrite rules look ok. Check your apache error logs. Could be something WAF/mod_security related Bawolff (talk) 01:55, 31 December 2021 (UTC)
Thanks - re. question 3...
The problem seems to be that the URLs in mediawiki's sidebar menu are of the form:
http://wiki.scotlandonair.com/wiki/Special:Upload (doesn't work)
As opposed to:
http://wiki.scotlandonair.com/w/index.php?title=Special:Upload (works!)
Why would this be so? And what's the best way of resolving this?
(Similar problem occurs when attempting to click on an image - browser attempts to access URL such as http://wiki.scotlandonair.com/wiki/File:1983-On-The-Campaign-Trail-titlecard.jpg - which just throws up a "403 - Forbidden" again. Grahamstewart (talk) 02:30, 31 December 2021 (UTC)
That's the way its supposed to work if short urls are enabled. I mention the other variant works as it narrows down where the problem is. Bawolff (talk) 04:37, 31 December 2021 (UTC)
So am I right in saying that using Short URLs breaks a whole host of stuff: including all the standard sidebar navigation links, links to categories, filepaths to images, etc etc etc? Seems as if it's not really worth it in that case. :-/ Grahamstewart (talk) 06:53, 31 December 2021 (UTC)
Normally it would not. It does appear to be in your case.
It doesn't seem like it has anything to do with mediawiki or short urls per se. Your webserver seems to have banned pages with colons in them, e.g. http://wiki.scotlandonair.com/foo:bar gives a 403, but is fine with it if its after a ? In the url. This is something wrong with your webserver (probably misconfigured waf) Bawolff (talk) 09:16, 31 December 2021 (UTC)
Solved it. A series of 6G firewall/blacklist entries in my .htaccess file were preventing colons and commas in my URLs (among other characters). For anyone else coming across this problem the offending line is shown below, but with colon and commas removed from this list...
RedirectMatch 403 (?i)(~|`|<|>|;|%|\\|\s|\{|\}|\[|\]|\|) Grahamstewart (talk) 22:30, 2 January 2022 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Error contacting the Parsoid/RESTBase server (HTTP 404)

Im having an issue publishing: Error contacting the Parsoid/RESTBase server (HTTP 404) 2001:980:4233:1:40C7:7D0C:1CA3:17A2 (talk) 12:43, 31 December 2021 (UTC)

Problem installing LuaSandbox

My first attempts to install the LuaSandbox package via APT seem to be failing. I'm running Ubuntu (18.04.6), PHP 7.4.27 and MediaWiki 1.35.5

When I try running the apt install command I get an error that reads:

The following packages have unmet dependencies:
php-luasandbox : Depends: phpapi-20170718
E: Unable to correct problems, you have held broken packages.

Suggestions? Thanks! Darlig Gitarist (talk) 16:23, 31 December 2021 (UTC)

This is really a debian question more than a mediawiki question. Bawolff (talk) 18:53, 31 December 2021 (UTC)