Project:Support desk/Flow/2024/09

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

'noindex' detected in 'robots' meta tag

Google cannot index my webpages because 'noindex' detected in 'robots' meta tag. I checked all my robots.txt and html pages but I don't find the noindex command ! Is it somewhere injected in the pages by another extention ? Steveley (talk) 13:11, 1 September 2024 (UTC)

Update : when I look to my html by "view Source" I see 43 times rel="nofollow"
How is it injected in the pages ?? Steveley (talk) 13:25, 1 September 2024 (UTC)
@Steveley: The 'noindex' meta tag is added to lots of MediaWiki pages that shouldn't be indexed — are you perhaps looking at one of those? For example, the edit form, or page history, or special pages, are all excluded because they're not actual content and so shouldn't be indexed. You shouldn't have the robots meta tag when viewing an actual current wiki page though, as far as I know.
As for nofollow, do you mean for external links? You can disable that via $wgNoFollowLinks. It doesn't stop your own wiki pages from being indexed though. Sam Wilson 00:20, 2 September 2024 (UTC)
@Samwilson
It looks like mainly external links have the nonfollowing tag. But still I don't know why google refuses my main page because there should be a robot non following tag and I cannot find it. Steveley (talk) 03:35, 2 September 2024 (UTC)
@Steveley: So Google is telling you that there's a noindex tag somewhere on your main page, but you can't find it? That's odd. Do the Bing webmaster tools say the same thing? Have you submitted sitemap URLS, that can sometimes help. What's your site's URL? Sam Wilson 10:16, 2 September 2024 (UTC)
Have you checked your Manual:Robots.txt ?? Maybe the noindex is not in the page, but in the robots.txt —TheDJ (Not WMF) (talkcontribs) 20:18, 3 September 2024 (UTC)

Upload bug error

I just want to indicate this "[ZtTpZ5VwMzObl1msU0TfYAAAALg] Exception caught: A database query error has occurred. This may indicate a bug in the software.". This happens every time I try to upload an image to the wiki and I've installed MediaWiki through the Softaculous extensions downloader. NormalRichard (talk) 22:25, 1 September 2024 (UTC)

Apparently, this also happens when saving a page. NormalRichard (talk) 22:32, 1 September 2024 (UTC)
@NormalRichard: Have you run the updater? See Manual:How to debug for some info about what to try. Sam Wilson 00:01, 2 September 2024 (UTC)

Special:version does not show extension

Hi,

I have installed three extensions with my mediawiki. When I look on the page "Special:version" under "installed extensions" I see only one of them. However, all three work correctly, so I could simply ignore this. However, I wonder whether I did something wrong which might cause problems in the future. Any ideas? Thanks! Xwr111 (talk) 08:05, 2 September 2024 (UTC)

Which extensions did not show up, and how did you confirm they actually work? – Ammarpad (talk) 10:44, 2 September 2024 (UTC)
One of the extension is "EmbedChessboard", the other one is Wiki-Editor. I have just checked for the "EmbedChessboard" which allows to show chess games on a board entering a particular notation (pgn), and it works perfectly. Xwr111 (talk) 13:03, 4 September 2024 (UTC)
'EmbedChessboard' is that really a MediaWiki extension? I cannot find it here or with a general Google search. Can you show where you downloaded it? Also if your wiki is public please link to it. – Ammarpad (talk) 08:06, 5 September 2024 (UTC)
That chess extension comes up in a DuckDuckGo search (though not Google!): https://sourceforge.net/projects/pgn4web/ Jonathan3 (talk) 20:14, 9 September 2024 (UTC)

Hi there, in the database is there a way to differentiate between links that appear actually in a Wikipedia page, and links that appears at the very bottom in the V.T.E template, thanks in advance 2A01:E0A:3DB:9860:A88D:9B78:EB8F:48C0 (talk) 14:00, 2 September 2024 (UTC)

No. Bawolff (talk) 00:13, 3 September 2024 (UTC)

how do I handle an offensive comment from a Barnstar Editor?

how do I handle an offensive comment from a Barnstar Editor? Walter Tau (talk) 00:04, 3 September 2024 (UTC)

For non-technical questions about english wikipedia, please ask at w:WP:TEAHOUSE Bawolff (talk) 00:12, 3 September 2024 (UTC)

Issues with MediaWiki Search Function and Elasticsearch Integration

Subject: Issues with MediaWiki Search Function and Elasticsearch Integration

Hi there,

I am currently encountering issues with the MediaWiki search functionality integrated with ElasticSearch, CirrusSearch, and TitleKey extensions. Despite these extensions passing all tests without errors, the search function within MediaWiki is returning the following error message:

"An error occurred while searching: We were unable to complete your search due to a temporary problem. Please try again later."

To resolve this, I attempted to rebuild the search indexes. However, I encountered the following error:

Elastica\Exception\Connection\HttpException from line 186 of /var/lib/mediawiki/extensions/Elastica/vendor/ruflin/elastica/src/Transport/Http.php: Couldn't resolve host

In addition, running the command curl localhost:9200/_cat/indices produced the following output:

green open mw_cirrus_metastore_first -qrRWYZQSiiVfUmkmMHTxg 1 0 18 17  13.2kb  13.2kb

green open mediawiki_content_content 3CBSBBK9RGGAkEzL4iIuPw 1 0  3  0 172.6kb 172.6kb

Connection Test Output:

{

  "cluster_name" : "elasticsearch",

  "status" : "green",

  ...

}


Log Files:

MediaWiki debug.log:

[cirrussearch-request]

[DeferredUpdates] DeferredUpdates::run: ended MediaWiki\Deferred\MWCallableUpdate_CirrusSearch\RequestLogger->addRequest #1105, processing time: 0.00021004676818848

...

Elasticsearch.log:

[2024-09-03T11:18:15,044][INFO ][o.e.c.r.a.AllocationService] [atk] Cluster health status changed from [RED] to [GREEN] (reason: [shards started [[mw_cirrus_metastore_first][0]]] ).

Additional Issue:

There is also an issue with the run.php file where execution seems to stop after the line echo "deneme2";. The following commands, including $runner->run();, do not execute, and no further output is produced. This suggests that there may be a problem with loading the Setup.php file, preventing MediaWiki from fully initializing.

Expected Behavior:

The script should continue executing after echo "deneme2";, with subsequent steps such as echo "deneme3"; and others running as expected.

System Information:

MediaWiki 1.43.0-alpha (0ed4f6f)

18.22, 1 Eylül 2024

PHP 8.3.10 (apache2handler)
ICU 66.1
MySQL 8.0.39-0ubuntu0.20.04.1
CirrusSearch (c76e4e4) 21.27, 28 Ağustos 2024 GPL-2.0-or-later MediaWiki için Elasticsearch destekli arama Nik Everett, Chad Horohoe, Erik Bernhardson ve diğerleri
Elastica 6.2.0 (522396f) 20.01, 24 Ağustos 2024 GPL-2.0-or-later Base Elasticsearch functionality for other extensions by providing Elastica library Nik Everett ve Chad Horohoe
TitleKey 1.0 (21d252f) 14.08, 25 Ağustos 2024 GPL-2.0-or-later Başlık öneki araması öneri sunucu uygulaması

Could you please assist in troubleshooting these issues?

Thank you for your attention to this matter. I look forward to your guidance. ACR user (talk) 14:47, 3 September 2024 (UTC)

Criar perfil burocrata

Boa tarde, como posso criar um novo perfil burocrata? Existia esse perfil porém quem tem acesso não está mais na empresa 177.116.169.87 (talk) 19:42, 3 September 2024 (UTC)

You can run a maintenance script on the console of the server to create and/or promote another user to bureaucrat. See also Manual:CreateAndPromote.phpTheDJ (Not WMF) (talkcontribs) 20:15, 3 September 2024 (UTC)

Looking for the Timeless simpleSearch/searchInput border color stylesheet

I'll try to keep this short - I've been working on modifying the included 'Timeless' skin but can't for the life of me find where the header's simpleSearch -> searchInput-container -> searchInput is getting its blue/#36c border and border-radius from.

Have followed this the whole way down to where I think the Mediawiki Skin base class is creating the search box component but I don't see anywhere it might be pulling in a style class from.

Does anyone know off the top of their head where exactly one would find the style for this thing? NorthernWing (talk) 06:22, 4 September 2024 (UTC)

@NorthernWing: Is that the :focus-visible outline? Sam Wilson 07:40, 4 September 2024 (UTC)
"Does anyone know off the top of their head where exactly one would find the style for this thing?"
No, but using ?debug=true and a web inspector should be able to tell you in seconds. —TheDJ (Not WMF) (talkcontribs) 10:01, 4 September 2024 (UTC)
According to the inspector, it is simply the user-agent default styling (outline) of an input field. The border-radius is set by the skin using:
form:not( .oo-ui-layout ) textarea,
form:not( .oo-ui-layout ) input {
 border: solid 1px #c8ccd1;
 border-radius: 2px;
}
The border is overridden to be 0 by something else, but outline-radius follows border-radius, even if there is no border. —TheDJ (Not WMF) (talkcontribs) 10:15, 4 September 2024 (UTC)

Installation under Linux on localhost

Hi,

I am trying for some time now to install mediawiki under Linux (Mint/Ubuntu) locally. As I am not really familiar with Linux, I just try to follow exactly the installation manual (and other manuals in the web) step by step. I install Apache2 (works), mySql (works), php (works), do some configuration, create an SQL database and a user with all rights. Then I copy the latest wikimedia version into the appropriate directory (/var/www/).

Then, the next step in the handbook is always to start the wikimedia installation script by opening in the browser wikimedia URL. If I open the page localhost, or 127.0.0.1, what I get is always the default Apache page which tells me that Apache is working. Can someone tell me what I do wrong and how I get the installation started? Thanks a lot ! Xwr111 (talk) 12:58, 4 September 2024 (UTC)

How did you configure Apache HTTPD to point to your MediaWiki folder under /var/www/? Malyacko (talk) 14:10, 4 September 2024 (UTC)
I followed instructions which told me to create a file
/etc/apache2/sites-available/mediawik.conf
in which I put the line: DocumentRoot /var/www/<mediawiki-directory>
and then to run several commands to point apache to this file / restart apache. However, neither this file, nor modifying or removing the existing file in this directory (000-default.conf) seems to have any effect. Xwr111 (talk) 14:42, 4 September 2024 (UTC)
What "instructions" where exactly? Malyacko (talk) 08:45, 6 September 2024 (UTC)
Generally you want your active sites to be in sites-enabled, not sites-available. Which config files to edit depend on how you installed apache, and what distro.
In debian, it is most common that the appropriate directory to put MediaWiki into is /var/www/html/ not /var/www/. However this can vary depending on where you got apache from.
Generally you probably wouldn't put a DocumentRoot line all by itself in an apache config. You would normally place it in a VirtualHost directive, or you would just edit an existing DocumentRoot directive. Most commonly you wouldn't modify apache config at all and just put mediawiki in the default document root (usually /var/www/html) Bawolff (talk) 17:18, 6 September 2024 (UTC)

Imported files do not appear on the wiki

Hello,

I imported a set of files into a wiki using the importImages.php script, which finished successfully. Some of the files, however, do not appear on the wiki: they are listed in Special:NewFiles, but do not have a thumbnail, and going to their page prompts for an upload.

The files are present in the images directory on the server.

I am running a wiki family using the "Separate settings files" approach from Manual:Wiki family, if this matters.

The wiki is located at https://craftsitewiki.stary.pc.pl/. GrzesiekJedenastka (talk) 14:24, 4 September 2024 (UTC)

SSO Sign in for MediaWiki Page

Hi ya'll,

I have been trying to get this to work, the LDAP extensions are a little confusing on how they need to be set up. After reading all the ways that I need to do to set this up. I have tried to install quite a bit to make it work.

I have installed all the necessary extensions for adding this SSO sign in for my Org Domain. I have added:

LDAPAuthenication2, LDAPAuthorization, LDAPProvider, LDAPGroups

As well as a few others that were recommended by some of the extensions, yet either I cannot login or I get a list of errors that don't allow login or the page totally stops working in itself.

Here is what I have put in for extensions and the configs that I have done, some of the domain information I have added an * in place:

$wgShowExceptionDetails = true;

$wgEnableUploads = true; # Enable uploads

wfLoadExtension( 'PluggableAUTH')

wfLoadExtension( 'Auth_remoteuser' );

wfLoadExtension( 'LDAPProvider' );

wfLoadExtension( 'LDAPAuthentication2' );

wfLoadExtension( 'LDAPAuthorization' );

wfLoadExtension( 'LDAPUserInfo' );

wfLoadExtension( 'LDAPGroups' );

$wgPluggableAuth_EnableAutoLogin = False;

$wgPluggableAuth_EnableLocalLogin = True;

$wgPluggableAuth_EnableLocalProprties = False;

wfLoadExtension( 'LDAPProvider' );

wfLoadExtension( 'LDAPAuthentication2' );

$LDAPPProviderDomainConfigProvider = function () {

$config = [

'LDAP' => [

'connection' => [

"server" => "HHSC4DVTXHDC01.*.*.*.*"

"user" => "cn=SVC_WikiUser,ou=*,dc=*,dc=*,dc=.*,dc=*,dc=*,dc=*",

"pass" => '**************',

"options" => [

"LDAP_OPT_DEREF" => 1

],

"basedn"=> "ou=*,ou=*,ou=*,dc=*,dc=*,dc=*,dc=*,dc=*",

"groupbasedn" => "dc=*,dc=*,dc=*,dc=*,dc=*",

"userbasedn" => "ou=*,ou=*,ou=*,ou=*,dc=*,dc=*,dc=*,dc=*,dc=*",

"emailattribute" => "mail",

"usernameattribute" => "uid",

"realnameattribute" => "cn","bas"

"searchattribute" => "mail",

]

]

];

$LDAPAuthentication2AllowLocalLogin = true;

$wgPluggableAuth_EnableAutoLogin = false;

$wgPluggableAuth_EnableLocalLogin = TRUE;

$wgPluggableAuth_EnableLocalProprties = false;

$wgPluggableAuth_ExtraLoginFields = [];

$wgGroupPermissions['*']['create account'] = false;

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

// The actual ad config is placed in a file one level up (outside of the public Webroot)

$LDAPProviderDomainConfigs = "/www/ldapprovider1.json";

$LDAPAuthentication2UsernameNormalizer = 'strtolower';

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

$LDAPProviderDefaultDomain = array_key_first(json_decode(file_get_contents($LDAPProviderDomainConfigs), true));

$wgPluggableAuth_Config['Log in with COMPANY account'] = [

    'plugin' => 'LDAPAuthentication2',

   'data' => [

       'domain' => 'AD'

 ]

]; Cross044 (talk) 21:05, 4 September 2024 (UTC)

There is no real SSO with LDAP. You's need something like Kerberos and Extension:Auth_remoteuser. See LDAP_hub#LDAP_stack_flow.
What errors are being reported exactly? Osnard (talk) 11:32, 5 September 2024 (UTC)

How to download generally any MediaWiki website whatsoever for offline reading?

How to download generally any MediaWiki website whatsoever for offline reading?

Especially in a way that allows using its internal search engine, otherwise it would be almost impossible or very hard to navigate (I would presume).

Thanks in advance. 49.237.11.47 (talk) 23:39, 4 September 2024 (UTC)

Check out the Kiwix project. Osnard (talk) 11:29, 5 September 2024 (UTC)

DPL3 'include' parameter and recursive template processing with parameter

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 can I use the DPL3 'include' parameter to pass page titles to a template, and then call that template recursively using the page titles?

Specifically, I'm trying to:

  1. Use DPL3 to generate a list of pages from a specific category
  2. Pass each page name to a custom template's parameter
  3. Have the template process each page name individually
  4. Repeat this process for all pages returned by the DPL3 query

I've tried using the 'format' parameter with %TITLE%, but I'm having trouble getting the template to process each page separately. Any guidance on the correct syntax or approach would be greatly appreciated. 180.252.167.214 (talk) 08:39, 5 September 2024 (UTC)

this is my code right now:
{{#dpl:
category=Birthday/{{{month}}}/{{{day}}}|mode=userformat|include={Ark/sandbox/ProcessSingerPage}:%TITLE%|allowcachedresults=true}}
where to place the '%TITLE% so it will be processed as parameter? 180.252.167.214 (talk) 08:45, 5 September 2024 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

DBConnectionError after installation

Hello, I have the following problem with starting Media Wiki 1.42.1:

“localsettings.php”: is created and I copied it to the root directory

Database: MariaDB is filled with tables during installation - so access works during installation.

But:

When you access the domain, the following error message appears:

MediaWiki internal error.

Original exception: [830779dbccee7f45c80d6a6e] 2024-09-05 09:03:10: 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. SirBoerky2024 (talk) 09:12, 5 September 2024 (UTC)

Did you run maintenance/update.php after the installation?
Try to
Set $wgShowExceptionDetails = true; at the bottom of LocalSettings.php to show detailed debugging information.
Osnard (talk) 11:27, 5 September 2024 (UTC)

Different configuration if user is logged in

I would like to have a different cache configurations if I user is logged in or anonymous.

I was thinking to simply add in LocalSettings.php something like:

if user is loggedIn then override these cache settings or set these values

Example of configuration variables:

$wgExternalDataSources['*']['min cache seconds'] = 60;

$wgMainCacheType = 'redis';

$wgSessionCacheType = 'redis';

$smwgCacheType = 'redis';

$smwgMainCacheType = 'redis';

$smwgQueryResultCacheType = 'redis';

$smwgValueLookupCacheType = 'redis';

$smwgQueryResultCacheLifetime = 180;

This would be very useful as when updating the wiki it's important to see the pages not cached, but at the same time keep the caching for wikis in production

Any suggestions on how to do this?

Thank you Allanext2 (talk) 14:25, 5 September 2024 (UTC)

You probably don't want to disable cache generally.
It sounds like what you want is to disable parser cache ($wgParserCacheType) entirely (And maybe also some of the non-core caches from external data sources and SMW), and then use either varnish (preferably) or file cache for logged out users.
Keep in mind that sometimes its better to have very short timeouts (like 1 minute) then no cache at all, as often the same user will view the same page multiple times in quick succession or you will have sudden short bursts of traffic that can quickly overload the server.
Also, it is very important that $wgSessionCacheType is the same for all users. Bawolff (talk) 17:13, 6 September 2024 (UTC)
Hi @Bawolff !
I don't want to disable cache generally, but I'd need a few minutes for logged in users, which are the only ones modifying the private wikis.
In some instances I have Varnish as page caching, but for external wikis using ExternalData I'd like them to manage different values of cache timeouts.
Specifically for only these two values (sorry for adding above the other configuration):
$wgExternalDataSources['*']['min cache seconds'] = 3600;
$smwgQueryResultCacheLifetime = 3600;
and for example, for logged in users shorter timeouts, how can I achieve that? can I say something in LocalSetting.php if user is loggedIn these values otherwise these other settings?
Thank you Allanext2 (talk) 09:44, 7 September 2024 (UTC)
The main issue is that usually (Although it can vary in extensions and i haven't checked SMW or external data) the cache expiry is set at the time the cache entry is saved. So making it be different for logged out vs logged in, would mean that if a logged out user rendered the page, the cache would be set for a long time for reads coming from both types of users until that particular cache entry expired. Similarly, if a logged in user caused the cache entry to be saved, that cache entry would have the short expiry for all users until that entry expired.
If you are using varnish, in principle these lower level caches would mostly not be checked at all for logged out users as varnish would just serve a cached page to such users before the lower level caches get involved (assuming the page is in varnish cache) Bawolff (talk) 21:31, 7 September 2024 (UTC)

New 1.42 Fedora 40 install log in, create account fail

I have created a fresh 1.42 install into Fedora 40 running Apache/2.4.61 (Unix), PHP/8.3.10, mod_perl/2.0.13, Perl/v5.38.2, and Mariadb 11.4.2. The web server works perfectly with all software including Mediawiki 1.42.1 except when I try to log into my Administrator account or when creating an account. I get the error 'There seems to be a problem with your login session; this action has been canceled as a precaution against session hijacking. Please resubmit the form.'

The wiki is a small internal project accessed via http (not https) I have not modified the after installation LocalSettings.php other than to add $wgSessionCacheType = CACHE_DB, which was suggested in order to remedy the problem, and to allow uploads via $wgEnableUploads = true.

I have followed all the instructions as indicated by Manual:How to debug/Login problems under "For site administrators" but I still have the problem.

I did notice looking in the user table dump that an account was created for one that I set up after installation, but still can not use it to log in.

I am able to create pages while not logged in since I specified an open wiki, but I am not able to upload images without the wiki asking me to log in.

Other specifics: I located the wiki away from the server root and used a symlink from the root to access it called 'wiki'. The database name is wikidb, not my_wiki. I did not use root to create the wiki but rather wikiuser, which is the account I used throughout the installation. I access the wiki via an IP address, i.e. http://192.168.1.4/wiki

I have since tried to do the exact install on other Fedora 40 boxes and have the same problem.

Suggestions?

Thanks. KrawzAz (talk) 20:20, 5 September 2024 (UTC)

Enable error logging Manual:How to debug.
Quite often, this means that the temporary directory that php is communicating to Mediawiki is not writable by the webserver, or plain non existent. So maybe check that ? —TheDJ (Not WMF) (talkcontribs) 06:45, 6 September 2024 (UTC)
Thanks, but what temporary directory are we talking about? Where is it usually located? I checked /tmp and found entries from the wiki.
On a side note, I tried to log in after a fresh reboot and changing the wiki ownership to match the Apache server. It appeared to accept my log in but on the refresh it did not show me as logged in. When I tried to upload a file it asked me to log in and failed again.
Checking the debug.log I found these:
[session] Session "[30]MediaWiki\Session\CookieSessionProvider<-:1:Multiuser>3utaocdat76kl9o5067tnadvceinkepo": Unverified user provided and no metadata to auth it
COOKIE: wikidbUserName=Multiuser
I will try the other debug instructions. KrawzAz (talk) 04:53, 7 September 2024 (UTC)
Check also that $wgServer is set correctly (this type of error sometimes happens if there is a mismatch between $wgServer and the real address of the wiki) Bawolff (talk) 22:36, 8 September 2024 (UTC)
I've checked and $wgServer has always matched the Apache 2.4 server. It would be interesting if someone else would do a fresh install on Fedora 40 (with no prior wiki setup) and see if they have the same problem.
Thanks anyway. KrawzAz (talk) 04:59, 11 September 2024 (UTC)
I mean $wgServer matches what you are typing in address bar (including protocol), not that it matches apache config (it of course should match that too) Bawolff (talk) 07:17, 11 September 2024 (UTC)

'Cannot access the database' error after my web host migrated to a new server?

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


My web host moved everything to a new web server, I updated all of the DNS information, I can access other domains and subdomains, and I can access images directly uploaded to the subdomain that hosts my MediaWiki install, but when I try to interface with the MediaWiki site in any way, I get that error.


"Sorry! This site is experiencing technical difficulties.


Try waiting a few minutes and reloading.


(Cannot access the database)"


Any ideas on what I can try to do to fix this? 65.35.222.225 (talk) 04:37, 6 September 2024 (UTC)

Check $wgDBserver, $wgDBname, $wgDBuser , ... settings on LocalSettings.php. Most likely you need to update the values to match the new environment. Osnard (talk) 05:47, 6 September 2024 (UTC)
From what I'm seeing, all three of those are empty. Given that it did work before the migration, am I to assume it should be fine at this point? 65.35.222.225 (talk) 08:01, 6 September 2024 (UTC)
Well, the application must be configured with the database connection settings somewhere. If not in LocalSettings.php, then maybe in some other setting file that get's included. You may need to search the filesystem for such a file. Osnard (talk) 08:18, 6 September 2024 (UTC)
I definitely installed everything in the most 'default' way possible. At the time that I installed it, it was MediaWiki 1.37.1. Any idea where else that setting would be? 65.35.222.225 (talk) 08:22, 6 September 2024 (UTC)
Actually, to update my question a bit, would $wgSQLiteDataDir be the possible database setting? It seems to be pointing to a location that doesn't exist any more. 65.35.222.225 (talk) 09:18, 6 September 2024 (UTC)
If you were using SQLite, then yes, that's the problem Ciencia Al Poder (talk) 15:12, 6 September 2024 (UTC)
I can't thank you guys enough for the support!
For anyone else who comes across this issue and can't find an obvious issue, I contacted my web host and they said it was a bug on their end when they migrated my stuff to a new server. 65.35.222.225 (talk) 02:37, 7 September 2024 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

CDN configuration problems

Hello,

With great difficulty, I managed to get my cdn (use IPV4 46.105.204.7) to work for my wiki with :

$wgMainCacheType = CACHE_ACCEL;

$wgUseCdn = true;

$wgCdnServers[] = "46.105.204.7";

$wgCdnMaxageStale = 31104000;

$wgCdnMaxAge = 31104000;

$wgCacheDirectory = "$IP/cache";

But I had to disable it because...

1/ videos are broken when landing to pages... and working fine when reload...

2/ However, no matter what I do with the localsettings and the htaccess, I can't change the header parameters. I always get “cache-control: s-maxage=1200, must-revalidate, max-age=0” no matter what I do.

Even after modifying my htaccess, they remain in place in addition to my modification: “cache-control: s-maxage=1200, must-revalidate, max-age=0, max-age=31104000”.

Is there any way I can modify/get rid of these “smaxage=1200”, “must-revalidate” and "max-age=0"?


Does anyone have any ideas for an easy configuration for a CDN  ?

Thanks in advance.

NB : my wiki is www.wikimedecine.fr Nanash (talk) 17:40, 6 September 2024 (UTC)

This really isn't my specialty, but I think the s-maxage stuff is controlled by $wgCdnMaxageStale. must-revalidate and max-age=0 are hardcoded in a few places in MW core (see codesearch results: must-revalidate, max-age=0) so they may not be configurable? Regardless, given that WMF wikis and many other high-profile MW sites do use aggressive caching etc. I'm sure you should be able togget it working somehow. Best of luck! Jack Phoenix (Contact) 19:05, 6 September 2024 (UTC)
I tried with $wgCdnMaxageStale... nothing change ._. Nanash (talk) 01:46, 7 September 2024 (UTC)
Why do you want to change these and what are you trying to accomplish? Generally mediawiki does not support that (other than s-maxage time which can be configured) as it would typically be a very bad idea.
> $wgCdnMaxAgeStale
What this does is complicated but probably not relavent to your website. (It controls max time to cache something outdated in varnish in the event of a site overload. Your site probably does not have overload handling set up, so it probably does nothing in your setup.)
$wgCdnMaxAge controls the smaxage part of the header. However, smaxage is dynamic and also takes into account how old the page is. $wgCdnMaxAge should be considered the max value smaxage can have, not its actual value.
For videos - it would help to know precisely what happened (was there an error), how the videos are put on page (which extension), if there is any errors in the browser debug console, and an example of a broken video. Bawolff (talk) 22:29, 8 September 2024 (UTC)
I'm just trying to get the CDN provided by my host to work.
1/ Concerning the header :
I'm not sure it matters. But as it doesn't correspond to the configuration recommended by my host, I'd prefer to be able to modify it if possible. But I can live with it.
2/ Concerning videos:
This really prevents me from using the CDN.
Browser debugging consoles don't show any errors. It's just that when I activate the CDN, all the videos appear “broken” (as if the file didn't exist). When I reload the pages, the videos appear normally. But if I empty the browser's cache and reload the page, the video reappears “broken”.
Without CDN, no problem... I don't know if it's a CDN problem (but those using cms like wordpress don't have this problem), or an incompatibility with the mediawiki config...
I know, the absence of errors doesn't help... But if anyone has an idea to try, I'd love to hear it. Otherwise I'll continue without CDN -_- Nanash (talk) 02:27, 9 September 2024 (UTC)
So when it comes to caching & CDN, there is a big difference between static and dynamic assets. For static assets, i.e. things that never change and if they do change they get a new url, a high max-age is really good. However for dynamic assets like wiki-pages, this is really bad. Essentially the high max-age means that once one of your users view a page, it becomes frozen for them, and they will never see a new version until the timer runs out (31104000 = 360 days).
The max-age = 0; must-revalidate means that web browsers are still supposed to save the website, but if they have a saved copy, they always check if there is a newer version available instead of just immediately displaying the new copy. This still improves things, as the browser only has to check if a new version is available, instead of downloading the whole page again. It is not as big an improvement over always displaying the saved copy, but at least users won't see really old pages.
On a similar note, if you are using an external CDN, make sure it supports page purging, otherwise your users will likely see outdated copies of pages for however long the s-maxage is set to.
Keep in mind also that you have {{Spécial:SimpleChanges}} on your main page. The SimpleChanges extension disables both parser cache and cdn cache when included on a page. (This is where no-cache, no-store is coming from). Parser cache is the mediawiki level caching and can have a major impact on performance.
For video, this sounds kind of like a bug in the extension used to include videos. Is there a page that has videos on it that i can see. When i browse to the main page i don't see any videos. Bawolff (talk) 03:57, 9 September 2024 (UTC)
Hmmm... Thanks for the clarification. I'll have to think about whether or not CDN is right for me...
In any case, I'd like to understand what's wrong with my CDN, mediawiki and videos.
I made a few changes and put the CDN back on a subdomain to see... If the problem recurs, I'll provide you with a url to inspect.
Thanks in any case. Nanash (talk) 09:47, 9 September 2024 (UTC)

Can't click Preference tabs (other than User profile) + 'Edit' no longer works; only 'Edit source'.

After updating to the latest version of MediaWiki (1.42.1), I can no longer click any Preference tabs (other than User profile). I can't click (and go to) any of these tabs: Appearance, Editing, Recent changes, Watchlist, Search. I CAN change and save stuff in the 'User profile' tab.

Also, 'Edit' no longer works; only 'Edit source'.

Can someone help me fix this?

M.J.W.B. (talk) 23:26, 6 September 2024 (UTC)

Open your browser's console and look for errors. See Manual:How to debug in general. – Ammarpad (talk) 10:20, 7 September 2024 (UTC)
Thanks for the tip! I have opened the Chrome console, and see the following, but don't know what to do with it from here.
https://app.screencast.com/7jhnNyIsDrOL9?conversation=cK77hNbqY5W9nPM5SWs4a8 (screenshot!)
Special:Preferences:12
GET https://beijerterm.com/w/load.php? lang=en&modules=startup&only=scripts&raw=1&safemode=1&skin=vectornet::ERR_ABORTED 500 (Internal Server Error)
Special:Preferences:1
Refused to execute script from 'https://beijerterm.com/w/load.phplang=en&modules=startup&only=scripts&raw=1&safemode=1&skin=vector' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled. M.J.W.B. (talk) 16:52, 7 September 2024 (UTC)
OK, when you updated Mediawiki, have you also updated your skins and extensions? Please update all to match the MediaWiki version. Always do so together. (This particular error is for a removed class alias in MediaWiki which the skin relied on. If you update, I believe it will fix itself) – Ammarpad (talk) 18:06, 7 September 2024 (UTC)
Thanks! Indeed, I went and deleted a bunch of unused skins, and updated my skins, and that solved it!
I don't suppose you would know how to enable the navigation menu (‘main menu’)(in Vector 2022) on mobile, would you? M.J.W.B. (talk) 21:57, 7 September 2024 (UTC)

Problem with URL when migrating to new server

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 migrating from a 1.35 Mediawiki on Centos 7, to 1.42 on Ubuntu. I've followed this guide: Manual:Running_MediaWiki_on_Debian_or_Ubuntu

The login page: wiki.mypage.com

After login: wiki.mypage.com/index.php/PageName


On Ubuntu it looks like this:

The login page: wiki-ubuntu.mypage.com/mediawiki/

After login: wiki-ubuntu.mypage.com/mediawiki/index.php/PageName


So on Ubuntu, I have a mediawiki-part extra in the URL. This is a problem since we have quite a few links to wiki pages spread out here and there.

Any easy-ish way to fix this? I tried URL rewriting, which didn't work - and I'm guessing it is because I'm unfamiliar with it (I asked Copilot for help!). JohnnyBruv (talk) 10:57, 7 September 2024 (UTC)

So rewrite rules is one way to fix it, but another way is to move mediawiki one directory up.
Like right now you probably have it somewhere like /var/www/html/mediawiki/ if instead you got rid of the mediawiki directory and placed it in /var/www/html/ it would probably fix your problem (You may need to also adjust $wgScriptPath ) Bawolff (talk) 07:13, 8 September 2024 (UTC)
Ah, thanks! I moved it, changed the $wgScriptPath and also the document folder in the Apache2 config, and now the URL's on the old and the new are identical. JohnnyBruv (talk) 11:06, 8 September 2024 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Replace old extension code that parses wikitext

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 update some extension code to work with MW1.39. I believe the problem is because it relies on Manual:$wgParser.

The code is from https://stackoverflow.com/questions/18379992/how-to-use-the-mediawiki-parser-to-get-html-from-wikitext

$text = "Your [[wikitext]]";
$title = $skin->getTitle(); // Get the title object from somewhere or use $wgTitle
$parser = new Parser;
$parserOptions = new ParserOptions;
$parserOutput = $parser->parse( $text, $title, $parserOptions );
$html = $parserOutput->getText();
echo $html;

I think the replacement for the $parser = line is $parser = \MediaWiki\MediaWikiServices::getInstance()->getParser();

But now $parserOptions = new ParserOptions needs a UserIdentity object and I'm stuck there.

Any pointers would be gratefully received. Jonathan3 (talk) 21:13, 8 September 2024 (UTC)

What is proper to do here depends on the context of where this code is running from. Where is this code running? What is it trying to do?
The code you posted doesn't even use $wgParser.
That said, ParserOptions::newFromAnon() may be what you are looking for. Bawolff (talk) 22:07, 8 September 2024 (UTC)
It's an extension I updated years ago based on the old "Bulletfeed" extension. When used with "action=bullet_feed" it turns HTML bullet points into an RSS feed. So basically the best way of getting the HTML content of the page is what I need. The little I knew is now very rusty, as you were able to tell already... The extension isn't exactly the same as the code above (e.g. it doesn't just echo $html at the end). Jonathan3 (talk) 11:46, 9 September 2024 (UTC)
Basically I can get the page wikitext all right, but would like to parse it to HTML. The reason is that the wikitext calls a template. If I had unlimited time I would probably rewrite it from scratch. But if I could find out how to convert wikitext to HTML, including expanding templates, then that sticking plaster would be good enough for now! Jonathan3 (talk) 12:20, 9 September 2024 (UTC)
In the end I used the API, based on the PHP code here: API:Parsing_wikitext#PHP. For some reason, "http_build_query" didn't work, so I just created $url by hand. Jonathan3 (talk) 13:13, 9 September 2024 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Extension for page visit

Is there any extension that shows when was the page last visited(viewed), so that it helps to track the older pages 167.103.54.99 (talk) 06:14, 9 September 2024 (UTC)

See your server logs but what is the use case? Going over "unpopular pages" to solve which problem? Malyacko (talk) 08:25, 9 September 2024 (UTC)
Extension:HitCounters, but often an external solution is better for analytics Bawolff (talk) 16:42, 9 September 2024 (UTC)
Not quite what you want, but with Extension:DynamicPageList3 you can order by "lastedit". Jonathan3 (talk) 20:08, 9 September 2024 (UTC)
Thanks for the response!!
HitCounters extension will only show how many times a page has been accessed. We want something like when was it last accessed since we want to remove really old pages which are no longer required. So if there is any extension or any other to track. Thanks in advance!! 167.103.7.14 (talk) 10:07, 17 September 2024 (UTC)
Perhaps the ‘Analytics’ extension would suit you? It includes a page search function and provides a history of both edits and views. But it only provides stats from the moment it is installed. Nanash (talk) 11:13, 17 September 2024 (UTC)
How to use the analytics extension, can I get some insights on it it would be really helpful. Chinnuabc (talk) 07:17, 22 October 2024 (UTC)

How to rename a user on a farm wiki?

The Manual:Renameuser extension cannot be used to rename a user on a farm wiki because it is incompatible with $wgSharedDB (known issue see phab:T104830.)

Is there any other way? S0ring (talk) 14:03, 10 September 2024 (UTC)

You must likely have to code something for your specific setup. Like the suggestion in phab:T104830#9029786Ammarpad (talk) 13:12, 11 September 2024 (UTC)

How do I make a footnote on Mediawiki?

I think there is a template that is missing from my wiki since I have only 2 pages on there. 35.40.141.252 (talk) 13:47, 11 September 2024 (UTC)

Help:Cite, like William Shakespeare, it doesn't work. I copied and pasted the code and what did it do? NOTHING! 35.40.141.252 (talk) 14:58, 11 September 2024 (UTC)
What code have you pasted? Also have you enabled the relevant extension Extension:Cite? – Ammarpad (talk) 15:47, 11 September 2024 (UTC)
The code that I pasted was this:
The Sun is pretty big.<ref>E. Miller, ''The Sun'', (New York: Academic Press, 2005), 23–25.</ref> The Moon, however, is not so big.<ref>R. Smith, "Size of the Moon", ''Scientific American'', 46 (April 1978): 44–46.</ref>
==Notes==
<references /> 97.91.34.184 (talk) 14:52, 12 September 2024 (UTC)
Also, no, I haven't enabled the extension. I'm not even sure how to do it. 97.91.34.184 (talk) 14:52, 12 September 2024 (UTC)
Ok you now need the extension mentioned above for that to work correctly. See Manual:Installing extensionsAmmarpad (talk) 18:49, 12 September 2024 (UTC)
I think that saw the extension's folder, but does that mean that it is installed? 97.91.34.184 (talk) 22:38, 12 September 2024 (UTC)
It probably means it's downloaded not installed. Please read Extension:Cite from the top. – Ammarpad (talk) 10:51, 13 September 2024 (UTC)
I think that I downloaded it just a few seconds ago. 97.91.34.184 (talk) 13:01, 13 September 2024 (UTC)
But it still doesn't work and I still see the code even after I saved the changes. 97.91.34.184 (talk) 13:02, 13 September 2024 (UTC)
That is, I want the code to work and stay hidden outside of editing, but this just is not happening. 97.91.34.184 (talk) 13:20, 14 September 2024 (UTC)
Never mind, I got the extension to work! I just added some code in the local settings and it works! 97.91.34.184 (talk) 13:28, 14 September 2024 (UTC)

Class "ResourceLoaderImageModule" not found

recently upgraded to MediaWiki 1.42.1. I am getting the above error when the skin tries to load. The skin is technically loading, but some resources (specifically dropdowns) are not loading correctly.

I'm having trouble finding where ResourceLoaderImageModule is referenced. I assume it's just a mismatch between ResourceLoader.php and the skins I have downloaded.

Here is the trace if it is relevant. Thank you!

from /var/www/html/w/includes/ResourceLoader/ResourceLoader.php(417)
 #0 /var/www/html/w/includes/ResourceLoader/ResourceLoader.php(453): MediaWiki\ResourceLoader\ResourceLoader->getModule()
 #1 /var/www/html/w/includes/ResourceLoader/StartUpModule.php(170): MediaWiki\ResourceLoader\ResourceLoader->preloadModuleInfo()
 #2 /var/www/html/w/includes/ResourceLoader/StartUpModule.php(425): MediaWiki\ResourceLoader\StartUpModule->getModuleRegistrations()
 #3 /var/www/html/w/includes/ResourceLoader/Module.php(839): MediaWiki\ResourceLoader\StartUpModule->getScript()
 #4 /var/www/html/w/includes/ResourceLoader/Module.php(808): MediaWiki\ResourceLoader\Module->buildContent()
 #5 /var/www/html/w/includes/ResourceLoader/Module.php(951): MediaWiki\ResourceLoader\Module->getModuleContent()
 #6 /var/www/html/w/includes/ResourceLoader/ResourceLoader.php(686): MediaWiki\ResourceLoader\Module->getVersionHash()
 #7 /var/www/html/w/includes/ResourceLoader/ResourceLoader.php(786): MediaWiki\ResourceLoader\ResourceLoader->getCombinedVersion()
 #8 /var/www/html/w/includes/ResourceLoader/ResourceLoaderEntryPoint.php(53): MediaWiki\ResourceLoader\ResourceLoader->respond()
 #9 /var/www/html/w/includes/MediaWikiEntryPoint.php(199): MediaWiki\ResourceLoader\ResourceLoaderEntryPoint->execute()
 #10 /var/www/html/w/load.php(42): MediaWiki\MediaWikiEntryPoint->run()
 #11 {main}

Hazysoda (talk) 19:53, 11 September 2024 (UTC)

I guess i should also mention that I removed and redownloaded the skin, as well as backdated to an older version but still got the same error. Error happens regardless of which skin I choose. Hazysoda (talk) 19:56, 11 September 2024 (UTC)
@Hazysoda - I got this same error after upgrading a wiki; it turned out to be caused by not having upgraded the WikiEditor extension. So my guess is that for you, too, this was caused by some extension that needs upgrading (maybe WikiEditor). Yaron Koren (talk) 18:36, 27 September 2024 (UTC)

stuck

Wiki creation is stuck, what should I do?

Stuck on stage

Creating a Home Page with Default Content... LigindaLeg1 (talk) 19:56, 11 September 2024 (UTC)

@LigindaLeg1: How are you installing it? It sounds like you might be using a wikifarm or one-click installer (because I don't think there's any message like that during a new install). Sam Wilson 00:28, 12 September 2024 (UTC)
I installed the wiki by downloading the file MediaWiki-1.42.1.zip and transferring all the files from it to the site directory LigindaLeg1 (talk) 17:59, 12 September 2024 (UTC)
Does your php error log report any errors? Bawolff (talk) 17:17, 13 September 2024 (UTC)

Landing page for non-authorized users

I have set up a private wiki for a group of authorized people to use. Is it possible to create a separate landing page for non-authorized users only?

I need this page to be visible without logging in. After logging in, they would be taken to the Main Page. Would that be possible? Nesuprachy (talk) 07:25, 12 September 2024 (UTC)

You can make "Main Page" public and say whatever you want to say on that page, and a different "Home Page" which would be the "true" main page for authorised users. An example can be seen on any private WMF wiki, such as https://steward.wikimedia.org/. Leaderboard (talk) 12:01, 12 September 2024 (UTC)
Can you show the steps how to set the login use use :Home Page" as the landing page instead of Main Page ? Lotusccong (talk) 02:42, 22 September 2024 (UTC)
What do you mean by "login use"? You mean authorised users? I don't think there's an easy way to "block" Main Page, but authorised users just need to click a link. Leaderboard (talk) 04:26, 22 September 2024 (UTC)

ERROR 500

After installing the wiki, I get an HTTP ERROR 500 error when I try to connect to the site, what should I do? LigindaLeg1 (talk) 17:57, 12 September 2024 (UTC)

An error 500 usually leaves a trace in the server logs. Check the webserver and PHP error logs for hints.
You can also try to temporarily enable error reporting to be send to the Client in PHP itself. See Manual:How_to_debug#PHP_errors. Osnard (talk) 13:21, 13 September 2024 (UTC)

Unable to create a page

Hi, Im new here. Im very happy and excited to be able to be part of this community. However I have been unable to complete my page setup as an automatic message pops up saying Im unable to introduce the information as there are too many references to digital computers. This new country is entirely digital, that is the point! However I am not able to complete or save the process. I would like to publish it to complete it with more information however I am unable to continue. I tried contacting administrators to report the error however I am finding it impossible to reach anyone. Please help! Thank you! John A. Smith 141.105.103.206 (talk) 19:58, 12 September 2024 (UTC)

Which website is this in reference to? Bawolff (talk) 17:16, 13 September 2024 (UTC)

How to Create Dynamic Tooltips with CSS and Javascript

MediaWiki:Common.css

.WD-Ausartung, .WD-Gewalt {cursor:help; border-bottom:1px dotted #000; display:inline-block; position:relative}

.WD-Ausartung:before, .WD-Gewalt:before {background-color:#d0dcf1; border-radius:6px; bottom:120%; color:#000; font-size:13px; left:50%; max-width:340px; opacity:0; padding:8px 12px; position:absolute; text-align:justify; transform:translateX(-50%); transition:opacity 1s; visibility:hidden; box-shadow:0 0 8px rgba(27,27,27,0.6); width:max-content; content:attr(data-tooltip)}

.WD-Ausartung:hover:before, .WD-Gewalt:hover:before, .WD-Ausartung:hover:after, .WD-Gewalt:hover:after {opacity:1; visibility:visible}


MediaWiki:Common.js

$(document).ready(function() {

   $('.WD-Ausartung').hover(function() {

       // Set the tooltip content from the data attribute

       $(this).attr('data-tooltip', 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui. Etiam rhoncus. Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit amet adipiscing sem neque sed ipsum. Nam quam nunc, blandit vel, luctus pulvinar, hendrerit id, lorem. Maecenas nec odio et ante tincidunt tempus. Donec vitae sapien ut libero venenatis faucibus. Nullam quis ante. Etiam sit amet orci eget eros faucibus tincidunt. Duis leo. Sed fringilla mauris sit amet nibh. Donec sodales sagittis magna. Sed consequat, leo eget bibendum sodales, augue velit cursus nunc,');

   }, function() {

       // Clear the tooltip content

       $(this).attr('data-tooltip', '');

   });

});


What modification in the javascript needs to be done to prevent the popup or tooltip from going off-screen? Fomkwiki (talk) 21:09, 12 September 2024 (UTC)

You could just use the title attribute instead. Bawolff (talk) 17:15, 13 September 2024 (UTC)

How to restrict double extension file in file upload feature

How to restrict double extension file in file upload feature 2401:4900:5305:F0A:209D:CEC7:72A:1084 (talk) 12:37, 13 September 2024 (UTC)

you can use tools like extension:SpamBlacklist or extension:AbuseFilter to restrict filenames. Bawolff (talk) 17:13, 13 September 2024 (UTC)

LDAP: User cannot be authenticated

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.


Still working on migrating from a 1.35 Mediawiki on Centos 7, to 1.42 on Ubuntu. The Wiki is up and running fine, except for the LDAP connection.

I've tried to follow some guides, and also tried to get to know the different extensions when that didn't work well. I got a lot further from studying them - but not far enough.

When I try to log in with a domain user now, the MediaWiki login feedback is: User cannot be authenticated

In pluggableauth.log:

mediawiki: Getting PluggableAuth instance

mediawiki: Plugin name: LDAPAuthentication2

mediawiki: Authentication failure.

In LDAPAuthentication2.log:

mediawiki: Try to authenticate user: frodobaggins

mediawiki: Not local login. Checking LDAP...

mediawiki: LDAP domain: intratriona.se

mediawiki: Username not found in user info provided by LDAP!Please check LDAP domain configuration. Specifically usernameattribute

mediawiki: LDAP user info results for user frodobaggins: Array

(

<snip>

[samaccountname] => FrodoBaggins

LocalSettings.php and ldapprovider.json are as follows:


LocalSettings.php - LDAP part

wfLoadExtension('PluggableAuth');

wfLoadExtension('LDAPProvider');

wfLoadExtension('LDAPAuthentication2');

wfLoadExtension('LDAPAuthorization');

wfLoadExtension('LDAPUserInfo');

wfLoadExtension('LDAPGroups');

$LDAPProviderDomainConfigs = "/srv/mediawiki/ldapprovider.json";

$LDAPAuthentication2UsernameNormalizer = 'strtolower';

$LDAPAuthorizationAutoAuthUsernameNormalizer = 'strtolower';

$wgLDAPGroupUseFullDN = false; # Use short group names instead of full DNs (optional)

$wgLDAPGroupsPrevail = false;   # LDAP groups take precedence over MediaWiki's internal group settings

$wgPluggableAuth_Config['Domain login'] = [

       'plugin' => 'LDAPAuthentication2',

       'data' => [

           'domain' => 'ourfirm.com',

       ],

];

$wgLDAPPreferences = [

   "ourfirm.com" => [

       "email" => "mail",

       "realname" => "displayname"

       ]

];

------------------------

ldapprovider.json

{

   "ourfirm.com": {

       "connection": {

           "server": "ldaps.ourfirm.com",

           "port": "636",

           "user": "<password",

           "pass": "<username>",

           "enctype": "ssl",

           "options": {

               "LDAP_OPT_DEREF": 1

           },

           "basedn": "DC=ourfirm,DC=com",

           "groupbasedn": "OU=Groups,OU=Tech,DC=ourfirm,DC=com",

           "userbasedn": "OU=Users,OU=Tech,DC=ourfirm,DC=com",

           "searchattribute": "sAMAccountName",

           "usernameattribute": "sAMAccountName",

           "realnameattribute": "displayname",

           "emailattribute": "mail"

       },

       "authorization": {

           "rules": {

               "groups": {

                   "required": ["CN=Tech Users,OU=Admin,DC=ourfirm,DC=com"]

               }

           }

       }

   }

}

Any help with this would be much appreciated! JohnnyBruv (talk) 14:24, 13 September 2024 (UTC)

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

Invicti Scan detected Possible BREACH Attack on Watchlist

We are looking for guidance on remediating a security vulnerability that Invicti (Netsparker) identified on:

https://website/wiki/Special:Watchlist.

The scan has highlighted the word "token" in the http response. (ex: mw.user.tokens.set, wltoken, ...)

We are not sure of which cookie the remediation notes are referring to when it says using the SameSite Cookie attribute will mitigate the issue.

Invicti Enterprise reported a Possible BREACH Attack issue because the target web page meets the following conditions that facilitate it:

  • Served from a server that uses HTTP-level compression (ie. gzip)
  • Reflects user-input in the HTTP response bodies
  • Contains sensitive information (such as a CSRF token) in HTTP response bodies

To mitigate the issue, we recommend the following solutions:

  1. If possible, disable HTTP level compression
  2. Separate sensitive information from user input
  3. Protect vulnerable pages with CSRF token. The SameSite Cookie attribute will mitigate this issue, because to exploit this issue an attacker forces the victim to visit a target website using invisible frames. With the SameSite cookie attribute added, cookies that belong to the target won't be sent with a request that does not include top level navigation.
  4. Hide the length of the traffic by adding a random number of bytes to the responses.
  5. Add in a rate limit, so that the page maximum is reached five times per minute. Molsen7970 (talk) 19:51, 13 September 2024 (UTC)
Key word being "possible". This is not an actual breach attack vulnerability, just a false positive. At least for mw.user.tokens.set.
For, wltoken, there is a theoretical possibility it might be subject to a breach-style attack, however it seems like such an attack is not really plausible in practise, and the risk is low as wltoken only controls watchlist access. Bawolff (talk) 18:53, 14 September 2024 (UTC)
Filed phab:T374766. If you create a phabricator account and tell me your phab username, i will add you to the ticket. Bawolff (talk) 19:12, 14 September 2024 (UTC)
Thank you! My Phabricator username is Molsen7970. Molsen7970 (talk) 17:49, 16 September 2024 (UTC)

1.39.1

Currently using MediaWiki version 1.39.1.

The article for the page table says "The text of the page itself is stored in the text table. To retrieve the text of an article, MediaWiki first searches for page_title in the page table. Then, page_latest is used to search the revision table for rev_id, and rev_text_id is obtained in the process. The value obtained for rev_text_id is used to search for old_id in the text table to retrieve the text."

However, there is no rev_text_id in the revision table anymore. I believe this changed in more recent versions. I have been trying to figure out how to get the right entry in the text table for a given page (the latest revision of that page) and not sure how to do this now. If anyone could help that would be very appreciated! Azoundria (talk) 21:02, 13 September 2024 (UTC)

There is an example at https://www.mediawiki.org/wiki/Manual:Page_table#Listing_pages_and_relations_with_other_essential_tables
You look up page, find page_latest, look that up in slots table unser slots_revision_id, find slot_content_id, look that up in content, find content_address, remove the tt: prefix, look that up in text table as the old_id.
However it is generally reccomended you dont do this. Instead fetch page contents via api or getText.php Bawolff (talk) 18:52, 14 September 2024 (UTC)

Rollback not working as expected

Rollback failed - Missing required parameters on request.

my wiki rollback isn't working, I have done some forum scraping but I can't really find anyone with the same issue as me. i'm honestly so confused

MediaWiki 1.41.1

PHP 8.3.6

Lua 5.1.5

Ubuntu 24.04.1 LTS 2A00:23C8:2D11:9001:6D02:830A:56AF:7271 (talk) 09:52, 15 September 2024 (UTC)

Please supply the required parameters (per the error message) and see if it still does not work. – Ammarpad (talk) 16:26, 15 September 2024 (UTC)
It just returns an error, and I'm pressing the rollback button when it tells me I don't have all of the parameters, so I assumed it would have just worked
{
"error": {
"code": "mustpostparams",
"info": "The following parameter was found in the query string, but must be in the POST body: token.",
"*": "See https://dovedale.wiki/api.php for API usage. Subscribe to the mediawiki-api-announce mailing list at &lt;https://lists.wikimedia.org/postorius/lists/mediawiki-api-announce.lists.wikimedia.org/&gt; for notice of API deprecations and breaking changes."
}
} 2A00:23C8:2D11:9001:6D02:830A:56AF:7271 (talk) 19:23, 15 September 2024 (UTC)
Where are you getting this message? Is this part of a script? Leaderboard (talk) 04:21, 16 September 2024 (UTC)
There are scenarios where mw core can generate that error when clicking the built-in rollback button, but it would be super unusual. Like misconfigured reverse proxy. Bawolff (talk) 05:23, 16 September 2024 (UTC)
Do you have any custom JS or gadgets enabled?
If you create a fresh new account, does rollback work from that account?
If all else fails, it might be helpful if you can generate a HAR file of doing a rollback and share it, which will let us see what is really going on. ( https://support.zendesk.com/hc/en-us/articles/4408828867098-Generating-a-HAR-file-for-troubleshooting ) [Note however, HAR files often contain session cookies, which can be used to compromise your account, so you want to log out immediately after generating the file to ensure that the info can't be used nefariously, and maybe not post the HAR file publicly] Bawolff (talk) 19:31, 15 September 2024 (UTC)

How to restrict special characters in text field

We want to restrict some special characters in text area. 2401:4900:560E:C1D4:36D2:2CB5:DD4F:E755 (talk) 08:37, 16 September 2024 (UTC)

Which problem would that solve? What is "the text area"? What blocks you from doing it? Please also read "Post a new question" in the sidebar. Malyacko (talk) 16:11, 16 September 2024 (UTC)

Hello,

Do you know a way of adding the page creation date to the footer, similar to the last revision date?

Given that this date is generated automatically in the info page, I suppose it's possible but I can't find a way of doing it. Nanash (talk) 11:26, 16 September 2024 (UTC)

Why is logging in disabled on this wiki?

Hello. I'm not a creator of a MediaWiki, I'm just here to ask a question. I want to create an account and edit on the Touhou wiki (https://en.touhouwiki.net/wiki/Touhou_Wiki) which was created with MediaWiki (I am NOT a vandal, by the way, I'll probably make a couple of blog posts for my personal Touhou fanworks and edit some typos/things that need to be changed because they're outdated, etc.). It says that registering an account on the wiki is disabled and to do so you have to request it on their Discord server. I do not use Discord and I don't want to go through the pain of making an account and all that stuff just to have an account on the Touhou wiki. I wonder if there's a reason to this, I think it is most likely to prevent vandals (but there could be another reason), and I'm not asking to have one right now, I am just wondering. 2601:C6:D200:E9B0:6895:D447:CA56:E4C0 (talk) 21:09, 16 September 2024 (UTC)

You'd have to ask on Touhou_Wiki. This is a different wiki, using the same software, but not administratively connected. Clump (talk) 21:31, 16 September 2024 (UTC)
I think there's nowhere I can use on the Touhou wiki that I can chat on. There don't seem to be discussions, and you can't edit without an account. 2601:C6:D200:E9B0:6895:D447:CA56:E4C0 (talk) 22:01, 16 September 2024 (UTC)

Load MediaWiki classes in PhpStorm

Hello. I am trying to develop a MediaWiki extension in PhpStorm, but all imports from MediaWiki, such as use MediaWiki\\MediaWikiServices, are recognized as undefined. How can I resolve this? 鈴音雨 (talk) 05:44, 17 September 2024 (UTC)

Is your PhpStorm project just the extension directory, or the whole mediawiki directory? I think it's more normally the latter. Sam Wilson 07:16, 17 September 2024 (UTC)
It is open only in the extensions directory. 鈴音雨 (talk) 11:47, 17 September 2024 (UTC)
I think it'd be easier to open the project as the whole MediaWiki directory, rather than figure out a way to get PhpStorm to index the rest of the files without doing that. Maybe someone else has a better idea though. :) Sam Wilson 12:02, 17 September 2024 (UTC)
It is definitely possible with some additional config settings for the project, and I have done so in the past. But I don’t have access to phpstorm this month, so its difficult to look up for me right now. Sam’s method is the easy route however. —TheDJ (Not WMF) (talkcontribs) 15:57, 23 September 2024 (UTC)

Pictures not displaying when logged out of Miraheze

I've uploaded pictures to the main page of my wiki, but they only display when I'm logged in.  I'd like people I share the wiki link with to be able to see those pictures without having to have a Miraheze account, so what can I do to fix this?  Many thanks DJC's Astracolonial Ventures (talk) 07:12, 17 September 2024 (UTC)

Can you link to an example?
You'll probably have to ask this on the Miraheze community portal though; this support desk is about the MediaWiki software only. Sam Wilson 07:19, 17 September 2024 (UTC)

How to restrict special characters in summary while uploading file?

How to restrict special characters in summary while uploading file? Geetadholwade (talk) 11:39, 17 September 2024 (UTC)

See Project:Support desk/Flow/2024/09#h-How_to_restrict_double_extension_file_in_file_upload_feature-20240913123700 Clump (talk) 11:56, 17 September 2024 (UTC)

ERR_CONNECTION_RESET editing a sub section

wikimedia 1.35 on linux debian, php 7.3

what possibly could give a client side ERR_CONNECTION_RESET editing a sub section, no apparent errors server side, editing the entire page works properly, I intentionally disabled https, plain http is enough inside a secure lan

thanks for any hints whatsoever where to look possibly Darkmatterenergy (talk) 21:33, 17 September 2024 (UTC)

Did you look at your webserver error logs (apache error logs, php-fpm process logs...)? A connection reset may indicate the webserver or (more commonly) the php engine crashed while processing the request (usually with a SIGSEV signal, or "segmentation fault"). If that's the case, this may happen due to a buggy php extension installed, sometimes related to php caching. Ciencia Al Poder (talk) 21:45, 17 September 2024 (UTC)
I have this at the beginning of LocalSettings.php :
error_reporting( E_ALL );
ini_set( 'display_errors', 1 );
and at the end :
$wgShowError = true;
$wgShowErrors = true;
$wgShowSQLError = true;
$wgShowSQLErrors = true;
$wgShowException = true;
$wgShowExceptions = true;
$wgShowExceptionDetails = true;
$wgDebugComments = true;
$wgDebugLogFile = "/var/log/mediawiki/logfile.log";
no errors in /var/log/apache2/error.log
[Tue Sep 17 21:07:31.966640 2024] [mpm_prefork:notice] [pid 1487] AH00163: Apache/2.4.38 (Debian) configured -- resuming normal operations
[Tue Sep 17 21:07:31.966765 2024] [core:notice] [pid 1487] AH00094: Command line: '/usr/sbin/apache2'
in /var/log/mediawiki/logfile.log
I can't find any "error" or "segmentation" what should I look for say "timeout" ?
/var/log/syslog also nothing apparent :
Sep 17 21:07:31 mediawiki1 systemd[1]: Started The Apache HTTP Server.
Sep 17 21:09:00 mediawiki1 systemd[1]: Starting Clean php session files...
Sep 17 21:09:00 mediawiki1 systemd[1]: phpsessionclean.service: Succeeded.
Sep 17 21:09:00 mediawiki1 systemd[1]: Started Clean php session files.
Sep 17 21:09:01 mediawiki1 CRON[1558]: (root) CMD (  [ -x /usr/lib/php/sessionclean ] && if [ ! -d /run/systemd/system ]; then /usr/lib/php/sessionclean; fi)
Sep 17 21:22:01 mediawiki1 CRON[1566]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Sep 17 21:39:00 mediawiki1 systemd[1]: Starting Clean php session files...
Sep 17 21:39:00 mediawiki1 systemd[1]: phpsessionclean.service: Succeeded.
it is php 7.3, how to configure php-fpm ? Darkmatterenergy (talk) 22:23, 17 September 2024 (UTC)
If you are using apache, you're using apache-mod-php and not php-fpm.
Looks like you can discard a segmentation fault at this point. It may be an intermediate firewall or proxy (mis)detecting some weird thing and resetting the connection. Only you know the different devices/software between your browser and the server to know what could be. A network inspecting tool like Wireshark or tcpdump can be used by an expert to check on both server and client from where the connection reset originates. Ciencia Al Poder (talk) 18:31, 18 September 2024 (UTC)
if possible to delete previous message, it should be :
from wireshark on client side, after the POST there is a red RST, connection dropped I suspect from server side, the strange thing is that editing the entire page works Darkmatterenergy (talk) 17:38, 19 September 2024 (UTC)
You may run the same analysis from the server side using the tcpdump command line utility (restrict to http port and optionally by IP to not get flooded). If you get the same results, this would confirm it's the server dropping the connection somehow. If not, there's an intermediate network equipment interfering. Ciencia Al Poder (talk) 16:49, 20 September 2024 (UTC)

SyntaxHighlight Extension 500 error and $wgServer must be set in LocalSettings.php.

Hello,

I am using MediaWiki version 1.39.1 and when I define the SyntaxHighlight_GeSHi extension in LocalSettings.php file, I encounter two separate errors.

Problems I am experiencing:

$wgServer must be set in LocalSettings.php error: I get this error and then I define $wgServer correctly (for example: https://www.docs.clomosy.com). However, when I resolve this error, I encounter a second error.

500 Internal Server Error: I cannot access the page and I get a 500 Internal Server Error error. Because of this error, I have to disable the extension.

Tests I have performed:

When I test the same configuration on my local server with MediaWiki version 1.39.0, everything works fine.

However, I am facing this issue with version 1.39.1 in the live environment.

I have set the $wgServer configuration correctly and checked the file permissions.

When I remove the wfLoadExtension( 'SyntaxHighlight_GeSHi' ); line that I added to the LocalSettings.php file, the site is accessible again.

I kindly ask for your help on what to do about this. ACR user (talk) 07:56, 18 September 2024 (UTC)

For the second error, is there a more detailed error in your php error log? (See How to debug) Bawolff (talk) 23:48, 19 September 2024 (UTC)
When I examine the errors I get this output.
Fatal error: Uncaught ExtensionDependencyError: SyntaxHighlight requires "shell" ability: Unable to run external programs, proc_open() is disabled in /home/docs5580/public_html/includes/registration/ExtensionRegistry.php:432 Stack trace: #0 /home/docs5580/public_html/includes/registration/ExtensionRegistry.php(276): ExtensionRegistry->readFromQueue(Array) #1 /home/docs5580/public_html/includes/Setup.php(278): ExtensionRegistry->loadFromQueue() #2 /home/docs5580/public_html/includes/WebStart.php(86): require_once('/home/docs5580/...') #3 /home/docs5580/public_html/index.php(44): require('/home/docs5580/...') #4 {main} thrown in /home/docs5580/public_html/includes/registration/ExtensionRegistry.php on line 432 ACR user (talk) 08:45, 23 September 2024 (UTC)
The hoster does not allow you to run external programs from php, but this extension requires that. Contact your hoster. —TheDJ (Not WMF) (talkcontribs) 15:50, 23 September 2024 (UTC)

I have different wikis running. On one running MediaWiki 1.42, links with templated are not interpreted as links, e.g. [[ {{valuefromtemplate}} ]] are just like blocked while working in other wikis running MediaWiki 1.41 or below. Is there a configuration or parameter I should set? Thanks! Ahaemmerli (talk) 11:49, 18 September 2024 (UTC)

I still have the problem: If I include a Magic word, it works, but if I include a variable or a value from a template (in my case I generate a serial number in a template) it doesn't work in MW 1.42. Any idea? Ahaemmerli (talk) 08:11, 2 October 2024 (UTC)

Where to put this orphaned manual in Manual:Contents

Where to put Manual:File page warnings in Manual:Contents? Waddie96 (talk) 10:51, 19 September 2024 (UTC)

@Shirayuki: : ping contributor to Manual that is still active Waddie96 (talk) 12:56, 20 September 2024 (UTC)
Since the only page passing both dev=y and admin=y in {{Hubs}} is Manual:Maintenance scripts, I personally think it would be good to place it near that. Shirayuki (talk) 22:26, 20 September 2024 (UTC)
How would one do that? (Mistakenly replied without having logged in). Waddie96 (talk) 11:36, 21 September 2024 (UTC)
@Shirayuki Waddie96 (talk) 20:04, 26 September 2024 (UTC)
I can't do it, so you should ask someone else. Besides, this is a topic that should be discussed on the Project:Village Pump. Shirayuki (talk) 22:09, 26 September 2024 (UTC)
{{Info
| inline = 1
| text = Moved to Project:Village Pump: Project:Village Pump/Flow/2024/09#h-Where_to_put_this_orphaned_manual_in_Manual:Contents-20240926233400.
}} Waddie96 (talk) 00:19, 27 September 2024 (UTC)

Error: Call to undefined function MediaWiki\Installer\phpinfo()

Anyone can help me?


[Zu1BJCu3GYIGvp-MUcvRiQAAAAg] /mw-config/index.php Error: Call to undefined function MediaWiki\Installer\phpinfo()

Backtrace:

from /home2/kimonosp/public_html/altamiradba.org/includes/installer/Installer.php(1257)

#0 /home2/kimonosp/public_html/altamiradba.org/includes/installer/Installer.php(985): MediaWiki\Installer\Installer::apacheModulePresent()

#1 /home2/kimonosp/public_html/altamiradba.org/includes/installer/Installer.php(595): MediaWiki\Installer\Installer->envCheckModSecurity()

#2 /home2/kimonosp/public_html/altamiradba.org/includes/installer/WebInstallerWelcome.php(37): MediaWiki\Installer\Installer->doEnvironmentChecks()

#3 /home2/kimonosp/public_html/altamiradba.org/includes/installer/WebInstaller.php(257): MediaWiki\Installer\WebInstallerWelcome->execute()

#4 /home2/kimonosp/public_html/altamiradba.org/mw-config/index.php(85): MediaWiki\Installer\WebInstaller->execute()

#5 /home2/kimonosp/public_html/altamiradba.org/mw-config/index.php(43): wfInstallerMain()

#6 {main} AltamiraDBA (talk) 09:34, 20 September 2024 (UTC)

phpinfo() is a pretty basic PHP function, but it can be disabed by your host, which is what likely happened here. Please contact your webhost to inquire. – Ammarpad (talk) 11:20, 20 September 2024 (UTC)

Editing MediaWiki Tagline (Site Subtitle) v.1.38.1, 1.39.8

Where can I edit Site Subtitle? Currently, subtitle is only pulling name of wiki, e.g. From MyWiki. I want to add colon with extra description of wiki to the subtitle.

I know the subtitle can be styled in Common.css, but I want to edit text of subtitle - Manual:Tagline (Site Subtitle). I also know there's a CustomSubtitle extension, but I've been able to add text to subtile before, just can't remember how I did that. Is there a way to do it in Vector skin? Can it also be done in MobileFrontend so it shows in Mobile view as well as Desktop? DStallTX (talk) 15:48, 20 September 2024 (UTC)

The message to edit is MediaWiki:Tagline. – Ammarpad (talk) 18:32, 20 September 2024 (UTC)
OK got it. Thanks. DStallTX (talk) 18:35, 20 September 2024 (UTC)

Short URL and Tagline Font-Size v.1.39.8

Cannot remove "index.php" from URLs on v.1.39.8

I have 2 wiki installs v.1.38.1, have used tool at shorturls.redwerks.org for new v.1.39.8 wiki install as I did for 2 older ones, but code the tool generates doesn't work for v.1.39.8.

Also, Common.css font-size for tagline is not applying in v.1.39.8 like it does in v.1.38.1

See — https://dstall.com/REF/index.php/Main_Page, https://dstall.com/REF/index.php/MediaWiki:Common.css DStallTX (talk) 19:12, 20 September 2024 (UTC)

@DStallTX: It looks like your $wgArticlePath is set to /REF/index.php/$1. Try changing it to /REF/$1. But also, what do the relevant bits of your web server configuration look like? Sam Wilson 23:12, 20 September 2024 (UTC)
Doesn't work revised without index.php. (Actually had omitted that line of code, but added it per your revision.) I'm on shared hosting. Don't know about web server config. DStallTX (talk) 23:41, 20 September 2024 (UTC)
@DStallTX: Without being able to change the web server's rewrite rules you might not be able to do short URLs. There might be somewhere in your control panel or whatever, where you can change things. What provider is it? Sam Wilson 04:09, 21 September 2024 (UTC)
AsuraHosting.com Short URLs work fine with v.1.38.1, so why don't they work with v.1.39.8? DStallTX (talk) 05:05, 21 September 2024 (UTC)
Hmm good point! And nothing else has changed? Doesn't work revised without index.php What is the actual error? You get a 404? Is the error coming from MediaWiki or is it a generic server error? Sam Wilson 08:31, 21 September 2024 (UTC)
URL does not shorten - still includes index.php
Font-Size does not change in Tagline, regardless of how I size font (em, px, pt, %, etc.) DStallTX (talk) 11:39, 21 September 2024 (UTC)
URL does not shorten - still includes index.php It looks like https://dstall.com/REF/Main_Page is currently redirecting to https://dstall.com/REF/index.php/Main_Page — have you changed $wgArticlePath? If you change it, what error do you get? Sam Wilson 11:51, 21 September 2024 (UTC)
Nothing happens when I make that change - URLs don't shorten, still include index.php.
Currently, I do not have $wgArticlePath? in LocalSettings. I only have $wgScriptPath bc I only have that in LocalSettings for the other 2 wikis and URLs shorten just fine there with only $wgScriptPath.
I do have all the code in .htaccess that the tool generates for that file. Per instructions, I have to use code generated by the tool bc my sites are on shared hosting. DStallTX (talk) 14:29, 21 September 2024 (UTC)
@DStallTX: Nothing happens when I make that change - URLs don't shorten, still include index.php. That sounds like maybe it's being overwritten later in LocalSettings.php maybe, or is not being set correctly, because it shouldn't be ignoring it like that. What if you set it to an obviously wrong value (e.g. $wgArticlePath='/WRONG/$1';) does that value show in the links when you open a wiki page? Sam Wilson 08:58, 22 September 2024 (UTC)
No - URL still shows index.php DStallTX (talk) 18:51, 22 September 2024 (UTC)
Thanks. Got it working with this:
$wgScriptPath = "/REF";
$wgArticlePath = "{$wgScriptPath}/$1";
$wgUsePathInfo = true; DStallTX (talk) 21:44, 22 September 2024 (UTC)

template ll doesnt retrieve the translated page title for Main article

on page https://www.mediawiki.org/wiki/Manual:Using_custom_namespaces#For_extension_developers we use last link as : {{ll|Extension namespace registration}} but the title (of ns Main) remains in english on the translated page . Why ? Christian 🇫🇷 FR 🚨 (talk) 14:27, 21 September 2024 (UTC)

Unable to upgrade from 1.40 to 1.42 - getting 'externallinks' table error

Specifically, index 'el_from' cannot be dropped from `externallinks` because it does not exist in this table. This is a bug in [maintenance/archives/patch-externallinks-el_to_path.sql]. Please help! Will this be resolved in the next update? StellaSolaris (talk) 19:06, 21 September 2024 (UTC)

Was it a 1.40 release version, or a git (development) version of 1.40? —TheDJ (Not WMF) (talkcontribs) 15:45, 23 September 2024 (UTC)
Can somebody please help with this issue? It clearly affects great many people who try to upgrade to v.1.42 from v.1.40 and apparently versions 1.30-1.39 as well. I used the release version packages for both 1.40 and 1.42. Thank you!! StellaSolaris (talk) 15:15, 24 September 2024 (UTC)
Release - I definitely downloaded it from the main download link using WGET. StellaSolaris (talk) 16:46, 23 September 2024 (UTC)

[d2ebbb87bf232eac27bb8e1c] 2024-09-21 19:23:16: Fatal exception of type "Wikimedia\Rdbms\DBQueryError"

How have to solve this ....

[d2ebbb87bf232eac27bb8e1c] 2024-09-21 19:23:16: Fatal exception of type "Wikimedia\Rdbms\DBQueryError"


Please, anyone help us. 43.224.111.30 (talk) 19:28, 21 September 2024 (UTC)

Please enable $wgShowExceptionDetails to get detailed error message. See Manual:How to debug for additional information. – Ammarpad (talk) 20:56, 21 September 2024 (UTC)

Can't access database

Don't know what happened, can anyone help please?

Here are the logs:

MediaWiki internal error.

Original exception: [4e9fc0c7a48718b19bb962af] /tenniswiki/ Wikimedia\Rdbms\DBConnectionError: Cannot access the database: Access denied for user 'sasuke92'@'localhost' (using password: YES) (localhost)

Backtrace:

from C:\xampp\htdocs\tenniswiki\includes\libs\rdbms\loadbalancer\LoadBalancer.php(1477)

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

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

#2 C:\xampp\htdocs\tenniswiki\includes\libs\rdbms\database\DBConnRef.php(95): Wikimedia\Rdbms\LoadBalancer->getConnectionInternal(integer, array, string, integer)

#3 C:\xampp\htdocs\tenniswiki\includes\libs\rdbms\database\DBConnRef.php(101): Wikimedia\Rdbms\DBConnRef->ensureConnection()

#4 C:\xampp\htdocs\tenniswiki\includes\libs\rdbms\database\DBConnRef.php(312): Wikimedia\Rdbms\DBConnRef->__call(string, array)

#5 C:\xampp\htdocs\tenniswiki\includes\language\LCStoreDB.php(61): Wikimedia\Rdbms\DBConnRef->selectField(string, string, array, string)

#6 C:\xampp\htdocs\tenniswiki\includes\language\LocalisationCache.php(451): LCStoreDB->get(string, string)

#7 C:\xampp\htdocs\tenniswiki\includes\language\LocalisationCache.php(497): LocalisationCache->isExpired(string)

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

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

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

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

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

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

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

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

#16 C:\xampp\htdocs\tenniswiki\includes\ServiceWiring.php(452): MediaWiki\Languages\LanguageFactory->getLanguage(string)

#17 C:\xampp\htdocs\tenniswiki\vendor\wikimedia\services\src\ServiceContainer.php(445): Wikimedia\Services\ServiceContainer::{closure}(MediaWiki\MediaWikiServices)

#18 C:\xampp\htdocs\tenniswiki\vendor\wikimedia\services\src\ServiceContainer.php(411): Wikimedia\Services\ServiceContainer->createService(string)

#19 C:\xampp\htdocs\tenniswiki\includes\MediaWikiServices.php(301): Wikimedia\Services\ServiceContainer->getService(string)

#20 C:\xampp\htdocs\tenniswiki\includes\MediaWikiServices.php(855): MediaWiki\MediaWikiServices->getService(string)

#21 C:\xampp\htdocs\tenniswiki\includes\ServiceWiring.php(2060): MediaWiki\MediaWikiServices->getContentLanguage()

#22 C:\xampp\htdocs\tenniswiki\vendor\wikimedia\services\src\ServiceContainer.php(445): Wikimedia\Services\ServiceContainer::{closure}(MediaWiki\MediaWikiServices)

#23 C:\xampp\htdocs\tenniswiki\vendor\wikimedia\services\src\ServiceContainer.php(411): Wikimedia\Services\ServiceContainer->createService(string)

#24 C:\xampp\htdocs\tenniswiki\includes\MediaWikiServices.php(301): Wikimedia\Services\ServiceContainer->getService(string)

#25 C:\xampp\htdocs\tenniswiki\includes\MediaWikiServices.php(1940): MediaWiki\MediaWikiServices->getService(string)

#26 C:\xampp\htdocs\tenniswiki\includes\session\SessionManager.php(224): MediaWiki\MediaWikiServices->getUserNameUtils()

#27 C:\xampp\htdocs\tenniswiki\includes\session\SessionManager.php(130): MediaWiki\Session\SessionManager->__construct()

#28 C:\xampp\htdocs\tenniswiki\includes\Setup.php(440): MediaWiki\Session\SessionManager::singleton()

#29 C:\xampp\htdocs\tenniswiki\includes\WebStart.php(86): require_once(string)

#30 C:\xampp\htdocs\tenniswiki\index.php(44): require(string)

#31 {main} 92.239.141.155 (talk) 03:32, 23 September 2024 (UTC)

Is $wgDBuser and $wgDBpass set correctly? Bawolff (talk) 04:59, 23 September 2024 (UTC)
Yes 92.239.141.155 (talk) 03:46, 24 September 2024 (UTC)

problems after updateing wiht $wgHooks

I have an older script "Werbung.php" which was intecrated per

require_once( "$IP/extensions/Werbung/Werbung.php" );

$wgHooks['ParserBeforeStrip'][]='Werbung';

in the LocalSettings.php and now don't work under version 1.42.

Unfortunately I can't find any hint in error.log of PHP for the problem. What's the best way to fix this update-problem?

Thanks in advance. Kyebert (talk) 11:20, 23 September 2024 (UTC)

It is probably no longer compatible. You would have to ask the author of Werbung.php to release a newer version, or update the code yourse to be conpatible with newer versions of Mediawiki. —TheDJ (Not WMF) (talkcontribs) 15:43, 23 September 2024 (UTC)
Thank your for this information. The author is not available. Perhaps someone has a hint as to what should be adapted here (ins the (in the manageable code):
function getPOIs($cmd) { require_once("/usr/www/users/data.php"); 
$mysqli = new mysqli($DBHost, $DBUser, $DBPass, $DBName);
<nowiki>#</nowiki>Aufbau des Kommandos:<!-- Karte;latitude;longitude;zoom;NumberOfPOIs -->
$c = preg_split('/;/', $cmd[0]);
$latitude = $c[1];
$longitude = $c[2];
$zoom = $c[3];
$c4 = intval($c[4]); #30.5.15 Anzahl der POIs begrenzen
$maxNumberOfPOIs = $c4;
if ($c4 == 0)    $maxNumberOfPOIs =   50; # POI Anzahl
if ($c4 > 1500)  $maxNumberOfPOIs = 1500; 
$map = "{{#display_map:
";
$query = "select src from vaPOIs2 order by sqrt( power(lat-$latitude,2) + power(lon-$longitude,2) ) limit $maxNumberOfPOIs";
$result = $mysqli->query($query);
while($row = $result->fetch_row()) {
	$map .= $row[0] . "\n";
}
$map = trim ($map);
$map = trim ($map, ';');
$map .= "|service=openlayers|center=$latitude, $longitude|width=100%|zoom=$zoom}}";
return $map; } #funct getPOIs
function Werbung(&$parser, &$text) {	$text = preg_replace_callback ('/<!-- Karte.* -->/', "getPOIs", $text);	echo $text;	return(true); }
Kyebert (talk) 11:12, 24 September 2024 (UTC)
This code looks very simple. Apparently it just composes an invocation of Extension:Maps, based on some database content. But I don't think we can discuss it here on the SupportDesk.
Maybe you want to check out the Professional_development_and_consulting page. Osnard (talk) 14:44, 24 September 2024 (UTC)
Thanks for the tip. My idea with the board here was just to get an approach to solving the problem. I thought that some people would have to fix similar problems with an update... Kyebert (talk) 07:28, 25 September 2024 (UTC)
You will need to update the "Werbung" extension. There is a guide available that may help you: Manual:Extension_registration/Migration Osnard (talk) 11:11, 25 September 2024 (UTC)
I had already tried a few things - unfortunately always without success:
1. with Manual:Hooks/de to replace $wgHooks['ParserBeforeStrip'][]='Werbung';
-> Werbung ( $parser, $text );
2. Manual:Hooks/ParserBeforeInternalParse extensions.json -> add:
   "HookHandlers": {
       "main": {
           "class": "MediaWiki\\Extension\\Werbung",
       }
   },
   "Hooks": {
       "ParserBeforeStrip": "Werbung",
       "services": [ "UserNameUtils" ]
   }
alternativ:
"Hooks": {
       "ParserBeforeStrip": "MediaWiki\\Extension\\Werbung\\Hooks::onParserBeforeStrip"
   },
(at least there was no error message with this version)
But I probably just don't have the right approach ? Kyebert (talk) 12:20, 26 September 2024 (UTC)
The error probably went away because your changes made it fail before the error was encountered.
You should probably post any error message you got. Bawolff (talk) 19:24, 26 September 2024 (UTC)
I have found the error messages of the function
function Werbung(&$parser, &$text) {
   $text = preg_replace_callback ('//', "getPOIs", $text);
   #echo $text;
   #echo "<br><brblblb lblbllbd lbalbab.<br><br>";
   return(true);
}
which I set in the LocalSettings.php
Werbung ( $parser, $text );
(instead of the old Hook #$wgHooks['ParserBeforeStrip'][]='Werbung';)
Deprecated: preg_replace_callback(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /usr/www/users/abc/archiv24/extensions/Werbung/Werbung.php on line 49
Notice: Headers already sent, should send headers earlier than require [Called from MediaWiki\Request\HeaderCallback::warnIfHeadersSent in /usr/www/users/veikkoc/archiv24/includes/Request/HeaderCallback.php at line 94] in /usr/www/users/abc/archiv24/includes/debug/MWDebug.php on line 492
Warning: session_name(): Session name cannot be changed after headers have already been sent in /usr/www/users/abc/archiv24/includes/Setup.php on line 472 Kyebert (talk) 09:04, 18 October 2024 (UTC)
You can not call something like Werbung ( $parser, $text ); within LocalSettings.php. There is neither a $parser nor a $text in this context. You need to register the method as a hook handler.
The messages are (more or less) unrelated. I guess you have an empty line somewhere before a <?php or after a ?>. Osnard (talk) 14:05, 18 October 2024 (UTC)
I used the info in Manual:Hooks and changed, like
Function, no data $wgHooks['EventName'][] = 'efSomeFunction'; efSomeFunction( $param1, $param2 );
#$wgHooks['ParserBeforeStrip'][]='Werbung'; -> Werbung ( $parser, $text );
(old version -> new version 1.42)
But what exactly is missing? Kyebert (talk) 10:31, 22 October 2024 (UTC)
Respectfully, that's just not how this works at all. I would suggest an introduction to php tutorial. (E.g. https://www.javatpoint.com/php-tutorial ) Bawolff (talk) 14:31, 22 October 2024 (UTC)
Hello, thanks for your answer. I thought, if I change the script according to the instruction from Manual:Hooks , an uncomplicated adaption is possible. But if not, who could help me with this little scirpt? Kyebert (talk) 08:40, 29 October 2024 (UTC)
I guess, in case you want help from the community, you should consider making the whole code publicly available (e.g. on github.com). Make sure to use a proper open source license. There are no guarantees you will find a volunteer though.
Otherwise, check out Professional development and consulting. Osnard (talk) 13:49, 29 October 2024 (UTC)
Thanks for the tip.
I posted the complete code and how to call it above. That's all it is.
The script doesn't actually do anything else, like (for example)
Map;52.436758;13.550262;14;300;
with a collection of POIs that the following software (Maps, possibly with SemanticMediawiki ?) needs to insert a map.
This is what the page should look like when it works: https://www.veikkos-archiv.com/index.php?title=Adlershof
Who could help me with this?
PS: or is it also possible to work here completely without this hook? Kyebert (talk) 07:14, 31 October 2024 (UTC)

Bot attacks

My wiki - www.jerripedia.org - has been plagued for some weeks by what appears to be bot attacks. At one point the problem was so severe that the hosting company - Krystal - shut the site down. They were less than helpful to me, despite my lack of technical knowledge, and insisted that I had to employ a consultant to resolve the problem. They did turn the site back on.

Finding someone to help proved extremely difficult, with Wiki support companies I contacted not taking on new customers. I was advised to contact Wikiworks, and Yaron Koren took up the challenge. However, during the course of a couple of weeks exchange of emails, with the site sometimes running normally, at other times very slow, our discussions concentrated on an upgrade to the Mediawiki software, which is several years out of date, but has worked very well for years.

I allowed myself to believe that this would solve the bot attack problem, but when I posed the question directly, somewhat belatedly, I was assured that the two were not connected. I asked Yaron to concentrate on trying to solve the bot problem.

He made some changes to /public_html/.htaccess, which did not improve things, and suggested that I should 'find somebody who specialised in this sort of thing'. A day later the site was working normally, and did so for the best part of a week. But the problem has now returned, and is probably as bad as it has ever been.

I searched online for potential solutions and ended up editing robots.txt, also with no effect.

I am convinced that the problem is bots, although Krystal were ambivalent about this. An image-holding page which I have been working on daily, but only opening three or four times a day, has had some 3,000 visits in the past week, despite not being part of the menu structure.

If anyone reading this believes that they can be of help to me, could they please contact me through editorial@jerripedia.org so that we can take things further. Depending on what is involved I am prepared to pay for assistance, although I stress that this is a non-commercial site funded by user donations.

Mike Bisson Mikebisson (talk) 11:51, 23 September 2024 (UTC)

Firstly: you MUST absolutely upgrade. You're on MediaWiki 1.17, which is very much ancient and can lead you to all kinds of serious security issues. You don't even have basic anti-spam tools such as Extension:AbuseFilter after all.
But, I don't see evidence of new accounts after 8 July 2023, which makes me think that the problem is something else. Can you describe the problems you've having in more detail? Leaderboard (talk) 15:10, 23 September 2024 (UTC)
There are a lot of different types of "bot" problems.
First of all, you have to figure out if these are intentionally malicious bots or just normal web scrappers. For normal web scrappers blocking by user-agent or IP address in .htaccess can often be sufficient. In that case better caching can also often be helpful (parser cache or varnish cache).
if it is malicious, then you have to separate between spammers or ddos. For spammers who want to maliciously edit your site, see spam.
If it an intentional attempt to take down your site (DDOS), you probably need to use different steps. The easiest approach is probably using cloudflare. They provide a product to filter out non human requests to your site. I think they have a free offering for situations like yours. Bawolff (talk) 00:17, 24 September 2024 (UTC)
If you don't care about your website being available in foreign countries, and they're ignoring robots.txt, you could just look at the server access log, find out where most of the requests come from, and just block those IP ranges, e.g. <code>ufw deny from 129.0.0.0/8</code>. That always seems to calm things down... Jonathan3 (talk) 09:34, 24 September 2024 (UTC)

How do I show raw code on my wiki?

I can't really find anything online, whatsoever. Does it have anything to do with syntax highlighting? 97.91.34.184 (talk) 23:51, 23 September 2024 (UTC)

Check out Extension:SyntaxHighlight Osnard (talk) 09:14, 24 September 2024 (UTC)
Ah. So it does have something do with syntax highlight. 97.91.34.184 (talk) 10:21, 24 September 2024 (UTC)
It depends what "it" is. I dont think there is enough details here to say. Bawolff (talk) 17:34, 24 September 2024 (UTC)

Extension talk

Is there any extension that shows when was the page last visited(viewed), so that it helps to track the older pages. The Extension:HitCounters will only show how many times a page has been accessed. We want something like when was it last accessed since we want to remove really old pages which are no longer required and any thoughts on which ‘Analytics’ extension can be used or is there any other extension that talk on the same.

Thanks in advance.. Chinnuabc (talk) 07:49, 24 September 2024 (UTC)

You can use DPL3 to list pages according to revision dates, which gets you part of the way there - https://help.fandom.com/wiki/Extension:DPL3/Parameters:_Criteria_for_page_selection#Select_articles_based_on_REVISION_dates Jonathan3 (talk) 19:45, 27 September 2024 (UTC)

putting user comments in a main page ?

on https://www.mediawiki.org/wiki/Help:Preferences#User_profile and at the beginning of the page i have discovered the possibility to encounter user comments attached to a section of an article which is not a talk page. Strange ? what is this functionality and where is it described ? thanks --Christian 🇫🇷 FR 🚲 Paris 2024🗼 (talk) 10:03, 24 September 2024 (UTC)

This is because Help: (namespace) is a signature namespace in this wiki. In other words it should behave like a talkpage. That's why you're seeing that. – Ammarpad (talk) 11:58, 24 September 2024 (UTC)

Swapping directories when upgrading

I can read in upgrade instructions:

1. Unpack the new version of MediaWiki into a new directory ... 7. Swap the old directory and the new directory.

Current MW install is in root (ie. /public_html). Let's say that new directory is /public_html/newmw. How do I swap the directories? Spiros71 (talk) 13:27, 24 September 2024 (UTC)

This is not really a MediaWiki question. Please read up on the basics of linux file management. Specifically the mv commmand. There are plenty of websites to learn Linux.
And respectfully, but people at this knowledge level should probably not be running webservers just yet (as indicated in the requirements “basic system administrator knowledge is required”) —TheDJ (Not WMF) (talkcontribs) 14:33, 24 September 2024 (UTC)
I am really sorry to bother you, yet, I do appreciate your answer. My logic would be if I had two folders on the same level, i.e. /public_html/old and /public_html/new to rename /public_html/old to /public_html/old1 and then rename /public_html/new to /public_html/old, thus, achieving the swap. But this is not the case, as one of the folders is in root directory. Spiros71 (talk) 14:48, 24 September 2024 (UTC)
Move the contents of public_html somewhere else, then move the contents of newmw to public_html.
Though it would be easier in the long run if you were to set it up so that the wiki's in a subdirectory along the lines of public_html/wiki. Jonathan3 (talk) 22:40, 24 September 2024 (UTC)

Is there anything for MediaWiki like Wordpress's Wordfence plugin?

In particular, it dynamically blocks access per IP address along the lines of what Cloudflare does.


Though Wordfence is just on your own server, like an MW extension would be. Jonathan3 (talk) 14:18, 24 September 2024 (UTC)

cant login after upgrade from 1.35.4 to 1.42.1

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


Hi,

after manual upgrade (web used) I cannot log in.

I'm  always getting this message

[ZvMd6a7LgNXyj8p6zW97LAAAAX0] 2024-09-24 20:15:37: Fatal exception of type „Wikimedia\Rdbms\DBQueryError“


honestly I do not know what to do. I'm not skilled in this..

pleas help MORTARUM (talk) 21:22, 24 September 2024 (UTC)

There's a part of this page about how to debug. Alternatively you could disable all extensions and see how it goes. Jonathan3 (talk) 22:33, 24 September 2024 (UTC)
@Jonathan3 thanks for your reply. IT looks like one of the extensions is doing that.
I will try to identify which one is it.
thanks MORTARUM (talk) 08:20, 25 September 2024 (UTC)
Cool. Good to hear you're on the right track now. I said "alternatively" but really now you just need to turn on the debugging messages, and try each extension in turn, to find out exactly what's up. Jonathan3 (talk) 14:02, 25 September 2024 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

translation of islandink wiktionary in Greek

Hello, I found out when I received a notification from the islandink wiktionary in Greek, the word Ισλανδικό was incorrectly written as Ισλανικό (missing the letter δ). I guess this originates somewhere here in the translation. Can anybody point to the correct spot to correct it? I searched without any result. FocalPoint (talk) 09:22, 25 September 2024 (UTC)

You are most likely talking about the message key project-localized-name-iswiktionary. It can be updated using the TranslateWiki.net site:
https://translatewiki.net/w/i.php?title=Special:Translate&showMessage=project-localized-name-iswiktionary&group=ext-wikimediaprojectnames&language=el&action_source=search&filter=&optional=1&action=translate Osnard (talk) 11:14, 25 September 2024 (UTC)
@Osnard, many thanks. I just fixed it. I could honestly take ages to find it on my own ... if I would ever find it :) FocalPoint (talk) 11:53, 25 September 2024 (UTC)
You can add &uselang=qqx to the URL to find out message names. Jonathan3 (talk) 19:43, 27 September 2024 (UTC)
Hi @Jonathan3, out of curiosity, please give an example, I do not really know where to add this.
Also, I must be still missing something. Even though I correct the translation https://translatewiki.net/w/i.php?title=MediaWiki%3AProject-localized-name-iswiktionary%2Fel&diff=12646159&oldid=7891814 , I still see the message in the mistaken version in elwikt. FocalPoint (talk) 19:40, 30 September 2024 (UTC)
e.g. https://is.wiktionary.org/w/index.php?title=Wikior%C3%B0ab%C3%B3k:Fors%C3%AD%C3%B0a&uselang=qqx Jonathan3 (talk) 21:19, 30 September 2024 (UTC)

Help logging into Conservapedia

Can you assist with get me an account on Conservapedia? Conservative.botany207 (talk) 22:08, 25 September 2024 (UTC)

@Conservative.botany207: Nope, sorry. MediaWiki.org is only for the actual software, and doesn't handle tech support for any sites that actually use MediaWiki. You'll have to reach out to someone who manages Conservapedia (assuming you're talking about conservapedia.com, which incidentally is using a pretty ancient version of MediaWiki). Sam Wilson 05:08, 26 September 2024 (UTC)
Yes, I came here because I have been hunting for a way to contact one of the admins on conservapedia.com to ask for assistance in getting a login.
The conservapedia.com help with a login link points here:
https://www.conservapedia.com/index.php?title=Special:UserLogin&returnto=House+Oversight+Committee Conservative.botany207 (talk) 00:54, 27 September 2024 (UTC)
We dont have any connection to the people who run conservapedia, so we can't help with that. Bawolff (talk) 02:18, 29 September 2024 (UTC)

Need Help

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


HI.I have a problem.

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

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

Error 1044: Access denied for user 'wiki'@'localhost' to database 'my_wiki'

Function: MediaWiki\Installer\MysqlInstaller::setupDatabase

Query: CREATE DATABASE `my_wiki`CHARACTER SET utf8


I don't know where go wrong. :( RainSun8942 (talk) 07:07, 26 September 2024 (UTC)

What were you doing? Which version is this? Leaderboard (talk) 07:48, 26 September 2024 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

How to get filled template data from page.

Hello everyone.

I have a page that gets filled with a template, and another page that collects a bunch of these pages and makes a little summary.

I am wondering if I can extract some parameters data from the template field original page to the summary page.

I have tried the LabeledSectionTransclusion and the Scribunto + Transducer Module, but since the information on the original page is entered using a template, I cannot get it to the summary one.

Is there any way to do that? AnotnioATN (talk) 11:12, 26 September 2024 (UTC)

I think this would be possible using DPL 3 queries - see https://help.fandom.com/wiki/Extension:DPL3/Parameters:_Controlling_output_volume#include_contents_related_to_templates
Alternatively you could use Extension:Cargo to associate a database table with your template, which would allow you automatically to save the template parameters to the database and allow you to query that database. Jonathan3 (talk) 13:48, 26 September 2024 (UTC)

URGENT upgrade issue - Unable to upgrade from 1.40 to 1.42 - getting 'externallinks' table error

We are currently running 1.40 generic release version. We are unable to upgrade to the generic 1.42 release version because there is a blocking error "There is currently no text in this page". When I tried to run the database update script "maintenance/update.php", I am getting another error - index 'el_from' cannot be dropped from `externallinks` because it does not exist in this table. This is a bug in [maintenance/archives/patch-externallinks-el_to_path.sql]. Please help! Will this be resolved in the next update? This problem must be affecting GREAT MANY people because it is a standard release to standard release upgrade. Please help!! StellaSolaris (talk) 18:42, 26 September 2024 (UTC)

You have to run the database changes in https://github.com/wikimedia/mediawiki/blob/master/maintenance/archives/patch-externallinks-el_to_path.sql individually by hand. (One at a time, skipping the ones already done)
It is unlikely to be fixed next release unless there is evidence it is affecting more people. It is unclear if this is a bug in mediawiki. Bawolff (talk) 19:16, 26 September 2024 (UTC)
Many thanks for your response! I did run all the commands manually and luckily it worked. StellaSolaris (talk) 19:30, 29 September 2024 (UTC)

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

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 ran migration from 1.31 to 1.39.8 (mariadb 10.6) and I reached to this stage (may be useful to refer to Project:Support desk/Flow/2019/07#h-update.php_Error:_1054_Unknown_column_'ar_comment_id'_in_'where_clause'_(localho-2019-07-10T11:31:00.000Z and https://www.mediawiki.org/wiki/Project%3ASupport%20desk/Flow/2020/10#h-Error_1054%3A_Unknown_column_%27ipb_sitewide%27-2020-10-07T14%3A31%3A00.000Z):


Completed migration, updated 3233919 row(s) with 15049 new comment(s)

Beginning migration of archive.ar_comment to archive.ar_comment_id

Wikimedia\Rdbms\DBQueryError from line 1618 of /home/wikiuser/public_html/new2024/includes/libs/rdbms/database/Database.php: Error 1054: Unknown column 'ar_comment_id' in 'where clause'

Function: MigrateComments::migrate

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

#0 /home/wikiuser/public_html/new2024/includes/libs/rdbms/database/Database.php(1602): Wikimedia\Rdbms\Database->getQueryException('Unknown column ...', 1054, 'SELECT  ar_id,a...', 'MigrateComments...')

#1 /home/wikiuser/public_html/new2024/includes/libs/rdbms/database/Database.php(1576): Wikimedia\Rdbms\Database->getQueryExceptionAndLog('Unknown column ...', 1054, 'SELECT  ar_id,a...', 'MigrateComments...')

#2 /home/wikiuser/public_html/new2024/includes/libs/rdbms/database/Database.php(952): Wikimedia\Rdbms\Database->reportQueryError('Unknown column ...', 1054, 'SELECT  ar_id,a...', 'MigrateComments...', false)

#3 /home/wikiuser/public_html/new2024/includes/libs/rdbms/database/Database.php(1711): Wikimedia\Rdbms\Database->query('SELECT  ar_id,a...', 'MigrateComments...', 32)

#4 /home/wikiuser/public_html/new2024/includes/libs/rdbms/database/DBConnRef.php(103): Wikimedia\Rdbms\Database->select('archive', Array, Array, 'MigrateComments...', Array)

#5 /home/wikiuser/public_html/new2024/includes/libs/rdbms/database/DBConnRef.php(326): Wikimedia\Rdbms\DBConnRef->__call('select', Array)

#6 /home/wikiuser/public_html/new2024/maintenance/migrateComments.php(162): Wikimedia\Rdbms\DBConnRef->select('archive', Array, Array, 'MigrateComments...', Array)

#7 /home/wikiuser/public_html/new2024/maintenance/migrateComments.php(54): MigrateComments->migrate('archive', Array, 'ar_comment')

#8 /home/wikiuser/public_html/new2024/maintenance/includes/LoggedUpdateMaintenance.php(45): MigrateComments->doDBUpdates()

#9 /home/wikiuser/public_html/new2024/includes/installer/DatabaseUpdater.php(1241): LoggedUpdateMaintenance->execute()

#10 /home/wikiuser/public_html/new2024/includes/installer/DatabaseUpdater.php(547): DatabaseUpdater->migrateComments()

#11 /home/wikiuser/public_html/new2024/includes/installer/DatabaseUpdater.php(511): DatabaseUpdater->runUpdates(Array, false)

#12 /home/wikiuser/public_html/new2024/maintenance/update.php(209): DatabaseUpdater->doUpdates(Array)

#13 /home/wikiuser/public_html/new2024/maintenance/includes/MaintenanceRunner.php(309): UpdateMediaWiki->execute()

#14 /home/wikiuser/public_html/new2024/maintenance/doMaintenance.php(85): MediaWiki\Maintenance\MaintenanceRunner->run()

#15 /home/wikiuser/public_html/new2024/maintenance/update.php(319): require_once('/home/wikiuser...')

#16 {main}
And on the actual wiki page I can see:
A database query error has occurred. This may indicate a bug in the software.

[ZvZWk5PRbYpM41iipnkJBwAByw4] /new2024/ 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 1054: Unknown column 'ipb_sitewide' in 'field list'
Function: MediaWiki\Block\DatabaseBlock::newLoad
Query: SELECT ipb_id,ipb_address,ipb_timestamp,ipb_auto,ipb_anon_only,ipb_create_account,ipb_enable_autoblock,ipb_expiry,ipb_deleted,ipb_block_email,ipb_allow_usertalk,ipb_parent_block_id,ipb_sitewide,ipb_by_actor,ipblocks_actor.actor_user AS `ipb_by`,ipblocks_actor.actor_name AS `ipb_by_text`,comment_ipb_reason.comment_text AS `ipb_reason_text`,comment_ipb_reason.comment_data AS `ipb_reason_data`,comment_ipb_reason.comment_id AS `ipb_reason_cid` FROM `ipblocks` JOIN `actor` `ipblocks_actor` ON ((actor_id=ipb_by_actor)) JOIN `comment` `comment_ipb_reason` ON ((comment_ipb_reason.comment_id = ipb_reason_id)) WHERE ipb_address = '2.87.81.81' OR ((ipb_range_start LIKE '0257%' ESCAPE '`' ) AND (ipb_range_start <= '02575151') AND (ipb_range_end >= '02575151'))

Backtrace:

from /home/wikiuser/public_html/new2024/includes/libs/rdbms/database/Database.php(1618)
#0 /home/wikiuser/public_html/new2024/includes/libs/rdbms/database/Database.php(1602): Wikimedia\Rdbms\Database->getQueryException(string, integer, string, string)
#1 /home/wikiuser/public_html/new2024/includes/libs/rdbms/database/Database.php(1576): Wikimedia\Rdbms\Database->getQueryExceptionAndLog(string, integer, string, string)
#2 /home/wikiuser/public_html/new2024/includes/libs/rdbms/database/Database.php(952): Wikimedia\Rdbms\Database->reportQueryError(string, integer, string, string, boolean)
#3 /home/wikiuser/public_html/new2024/includes/libs/rdbms/database/Database.php(1711): Wikimedia\Rdbms\Database->query(string, string, integer)
#4 /home/wikiuser/public_html/new2024/includes/libs/rdbms/database/DBConnRef.php(103): Wikimedia\Rdbms\Database->select(array, array, string, string, array, array)
#5 /home/wikiuser/public_html/new2024/includes/libs/rdbms/database/DBConnRef.php(326): Wikimedia\Rdbms\DBConnRef->__call(string, array)
#6 /home/wikiuser/public_html/new2024/includes/block/DatabaseBlock.php(291): Wikimedia\Rdbms\DBConnRef->select(array, array, string, string, array, array)
#7 /home/wikiuser/public_html/new2024/includes/block/DatabaseBlock.php(887): MediaWiki\Block\DatabaseBlock::newLoad(User, integer, boolean, string)
#8 /home/wikiuser/public_html/new2024/includes/block/BlockManager.php(161): MediaWiki\Block\DatabaseBlock::newListFromTarget(User, string, boolean)
#9 /home/wikiuser/public_html/new2024/includes/user/User.php(1434): MediaWiki\Block\BlockManager->getUserBlock(User, WebRequest, boolean, boolean)
#10 /home/wikiuser/public_html/new2024/includes/user/User.php(1532): User->getBlockedStatus(boolean, boolean)
#11 /home/wikiuser/public_html/new2024/includes/block/BlockManager.php(552): User->getBlock()
#12 /home/wikiuser/public_html/new2024/includes/MediaWiki.php(780): MediaWiki\Block\BlockManager->trackBlockWithCookie(User, WebResponse)
#13 /home/wikiuser/public_html/new2024/includes/MediaWiki.php(640): MediaWiki::preOutputCommit(RequestContext)
#14 /home/wikiuser/public_html/new2024/includes/MediaWiki.php(917): MediaWiki->doPreOutputCommit()
#15 /home/wikiuser/public_html/new2024/includes/MediaWiki.php(562): MediaWiki->main()
#16 /home/wikiuser/public_html/new2024/index.php(50): MediaWiki->run()
#17 /home/wikiuser/public_html/new2024/index.php(46): wfIndexMain()
#18 {main}
And here is the comment table
Type Collation Attributes Null Default Extra
comment_id Primary bigint(20) UNSIGNED No None AUTO_INCREMENT
comment_hash Index int(11) No None
comment_text blob No None
comment_data blob Yes NULL
Spiros71 (talk) 06:16, 27 September 2024 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Backup & Restore to Shared Hosting Server

Is it possible to backup and restore a MediaWiki site to shared hosting server? How?- step by step?

I've looked at "Manual:Backing up a wiki" but that involves running a command line which I cannot do on shared hosting. I want to be able to download a site, then recreate it.

I want to update sites to latest version 1.42, but that requires changing php version to 8.1 which I don't want to do without having sites backed up and knowing how to recreate them.

I want to be able to install v. 1.42 with Scriptaculous, then upload database content from old site. Alternately, I want to be able to manully install v.1.42 (upload zipped MW installer to shared hosting server, then unzip and rename root folder to what I want), and upload content from old site. I can easily download the site php database in SQL file format from phpMyAdmin, but SQL file has no content, only table structure for creating tables which already exist, yielding an error message to that effect. DStallTX (talk) 10:39, 27 September 2024 (UTC)

Where from? You could ask the current hosting company to email you a dump of the database. There are shared hosting companies that allow shell access - even if you don't really need it now, it would be useful in the long run. Jonathan3 (talk) 19:40, 27 September 2024 (UTC)
OK, so I ask hosting company to email me a dump of my database. Then what?
What type of file is that?
Do I then import that via phpMyAdmin into the new site database created by Scriptaculous install of Mediawiki, or what?
Please be specific. I'm a designer with limited knowledge, not an engineer. I simply want to know how to be able to reconstruct my wiki sites if something gets screwed up, which is way too easy to happen with Mediawiki, Scriptaculous, and phpMyAdmin and their proverbial glitches. DStallTX (talk) 02:03, 28 September 2024 (UTC)
Is https://docs.bitnami.com/aws/apps/dolibarr/administration/export-database/ helpful?
The exact instructions differ between hosting platforms, but typically you have to create an database dump file. Usually this is a .sql or .sql.gz file. To restore, you can usually import it into phpmyadmin.
You also have to backup your mediawiki files, especially your LocalSettings.php file and any images.
I would strongly suggest doing a practise run of restoring from backup. Its hard to know if you are doing everything right until you actually try it. Bawolff (talk) 20:41, 29 September 2024 (UTC)
Here are manual pages I bookmarked when moving my wiki to a new server:
Are tables in database the same in version 1.35 and 1.38 and 1.42?
Backup/restore is a bit more involved than you describe —
If backup (download copy) is made of root folder, then folder can be restored (uploaded) to server (without MediaWiki install), and new database created in MySQL, which will contain no tables, so import of .sql dump can be imported into database in phpMyAdmin..
But to upgrade from one full version to another — e.g. 1.38 to 1.42 (bc cannot auto upgrade, only upDATE from say 1.38.1 to 1.38.14, latest update) MW installer must be run which will create database full of tables.
When installed (manually or auto with Softaculous) MediaWiki creates tables in database, which will yield error message of "table already exists" when trying to import .sql dump backup file.
In that case, delete database created by MediaWiki, then recreate database in MySQL with same settings, and import .sql dump in phpMyAdmin.
But that's conditional on tables being the same from one version to the other. Are they? Or will .sql dump from 1.35 or 1.38 not work in latest version 1.42? DStallTX (talk) 15:13, 30 September 2024 (UTC)
I just tried that technique and it didn't work — created test wiki v.1.38.1, exported database.sql file, then deleted site from server and installed same name site v.1.42, deleted database in MySQL, then recreated database with same name, user and password as in LocalSettings.php file.
I uploaded .sql file from original v.1.38.1 site, but v.1.42 site now shows Error for title instead of Main Page - "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."
When I search for TEST 1 page I created in original site which should have been in database, no such page is found on new 1.42 site.
So how can I move my data to v.1.42 site?
Or is there any problems with v.1.38.1? If not, then I won't try to fix what's not broken. DStallTX (talk) 20:29, 30 September 2024 (UTC)
The update script changes the database tables.
It sounds like you're overthinking this.
If you can upgrade to 1.42 on the old server, then do that, check it works, back it all up and restore it on the new server.
If you can't upgrade to 1.42 on the old server (for whatever reason), then just transfer it all across before upgrading. Jonathan3 (talk) 20:45, 30 September 2024 (UTC)
I don't have old server and new server, just same server on shared hosting account.
And I don't understand MediaWiki:Ugrading instructions. I don't have command line capability on shared hosting account.
Isn't there a simple, easy way to upgrade from 1.38.1 or 1.35.14 to 1.42? DStallTX (talk) 23:42, 30 September 2024 (UTC)
I think I see what you mean now. I don't know what's possible without using the command line. When I used a shared server they allowed shell access. You might want to move to a more suitable hosting company. That way you can also find out for sure whether you are able to restore your site :-) Jonathan3 (talk) 10:12, 1 October 2024 (UTC)

IntlException: Constructor failed on new instance

Hi MediaWiki team,

I'm trying to upgrade an old 1.22 version of MediaWiki on a new server of mine. I'm running MediaWiki on FreeBSD for years, so far without any issues. On the new server however I seem to run into issues I really can't wrap my head around so I though I'll start a new install to see if I get there without upgrading from a super old LocalSettings.php.

I tried several versions of MediaWiki meanwhile, including the last LTS version (mediawiki-1.39.8) and the latest one (mediawiki-1.42.). In every case the installer starts & asks for the language. As soon as I select it, I get this error:

[c60a54151a3ddda7467158ca] /mw-config/index.php?page=Welcome IntlException: Constructor failed

Backtrace:

from /data/httpd/netlabs.org/vwiki/includes/language/Language.php(3236)

#0 /data/httpd/netlabs.org/vwiki/includes/language/Language.php(3236): NumberFormatter->__construct()

#1 /data/httpd/netlabs.org/vwiki/includes/language/Language.php(3179): Language->formatNumInternal()

#2 /data/httpd/netlabs.org/vwiki/includes/parser/Parser.php(4315): Language->formatNum()

#3 /data/httpd/netlabs.org/vwiki/includes/parser/Parser.php(1647): Parser->finalizeHeadings()

#4 /data/httpd/netlabs.org/vwiki/includes/parser/Parser.php(723): Parser->internalParse()

#5 /data/httpd/netlabs.org/vwiki/includes/installer/Installer.php(781): Parser->parse()

#6 /data/httpd/netlabs.org/vwiki/includes/installer/WebInstallerOutput.php(100): Installer->parse()

#7 /data/httpd/netlabs.org/vwiki/includes/installer/WebInstallerWelcome.php(31): WebInstallerOutput->addWikiTextAsInterface()

#8 /data/httpd/netlabs.org/vwiki/includes/installer/WebInstaller.php(270): WebInstallerWelcome->execute()

#9 /data/httpd/netlabs.org/vwiki/mw-config/index.php(82): WebInstaller->execute()

#10 /data/httpd/netlabs.org/vwiki/mw-config/index.php(40): wfInstallerMain()

#11 {main}


Strangely there is nothing logged to the apache error log of that vhost, it's really all I have.

I found exactly one result when I search for that error and it was not related to MediaWiki. Then I though it might be because I have PHP 8.2 which according to the install instructions is not the best tested version. So I changed mod_php & all modules to 8.1 but I get the exact same error.

So I'm really running out of ideas here. No entry in my apache logs, no additional context for this error and almost no results for the error, especially in context of MediaWiki. It's a new FreeBSD 14.1 server with Apache24, MySQL & PHP.

Anyone has some ideas of what I could check to get this fixed?

Thanks for the support & all the work over decades with MediaWiki! TheKtk (talk) 08:45, 28 September 2024 (UTC)

It seems like this is probably something wrong with how php is configured. There are some reports that this happens if php's date.timezone is set incorrectly.
Intl is at the php level, so the error will probably still be there for different versions of mediawiki. Bawolff (talk) 02:13, 29 September 2024 (UTC)
That was indeed a good hint, but unfortunately I couldn't solve it yet. But I created a minimal testcase:
<?php
// Set the locale to test
$locale = 'en_US.UTF-8';
// Check if Intl extension is loaded
if (!extension_loaded('intl')) {
  die("Intl extension is not loaded!\n");
}
// Display the current locale settings
echo "Current locale: " . setlocale(LC_ALL, 0) . "\n";
// Test the Intl NumberFormatter
try {
  $formatter = new NumberFormatter($locale, NumberFormatter::DECIMAL);
  echo "Number formatting test: " . $formatter->format(12345.67) . "\n";
} catch (Exception $e) {
  echo "IntlException: " . $e->getMessage() . "\n";
}
?>
on cli php this outputs:
Current locale: C/C.UTF-8/C/C/C/C
Number formatting test: 12,345.67
and in Apache:
Current locale: C/C.UTF-8/C/C/C/C
IntlException: Constructor failed
I have no idea why though, even tried setting locale in Apache itself and phpinfo reports all as expected.
Will follow up here once I hopefully figure out what's wrong. TheKtk (talk) 16:30, 29 September 2024 (UTC)
Try comparing your cli php.ini file and your apache php.ini file and check what differs between them. Bawolff (talk) 20:37, 29 September 2024 (UTC)
According to phpinfo() they both use the same file. That's why I am so confused. 2001:1620:B12:1:D80F:F21C:5DC8:8F29 (talk) 18:40, 30 September 2024 (UTC)
Found the problem, that was a stupid error on my side...
Got the hint to add intl_get_error_message() and then got an even weirder error I couldn't understand. Now it took me a few days of thinking about it and figuring out that in a totally unrelated issue, I managed to accidentally f-up permissions on some directories, among other on "lib".
So poor apache runs on www and couldn't read lib anymore, which lead to this super esoteric error. And because my tests on cli were as root, I couldn't reproduce the problem on the same machine.
So all good, neither locale nor any other problem, just me killing read access on the "lib" dir for poor apache.
Thanks anyway for the hints, the path lead me to the fix :) TheKtk (talk) 15:59, 11 October 2024 (UTC)
Glad to hear you got it working. Kind if weird php does not give a better error for that. Bawolff (talk) 17:10, 11 October 2024 (UTC)

missing anchors on MW target pages are no longer signalled (...?)

If i am not wrong, i have seen a small popup with warning appearing in the upper right corner when trying to reach an anchor which no longer exists on a reworked MEDIAWIKI page. This is very useful during my rereading campaign of pages and allows to adapt the source or the translated page consequently. But it is no longer shown. How to reactivate them again, at least for translator needs ? Thanks -- Christian 🇫🇷 FR 🚲 Paris 2024🗼 (talk) 10:49, 28 September 2024 (UTC)

A question

solved, now be unblocked.

I know there is not better to discuss it. But I can't find other useful area to post. I want ask a question here.

Now I can access the Wikimedia (without Wikipedia). But I'm from China.

Is GFW unblocked it? 2408:8239:701:9CE6:30CE:FB07:6BF5:1275 (talk) 12:07, 28 September 2024 (UTC)

According to https://www.chinafirewalltest.com/ (which of course itself is blocked), wikipedia.org is blocked but mediawiki.org and wikimedia.org are not. Jonathan3 (talk) 09:25, 30 September 2024 (UTC)
Thanks, but it was have been blocked a long time ago. 2408:8239:701:9CE6:10A3:56E6:9542:9D54 (talk) 12:45, 30 September 2024 (UTC)
I wasn't sure what you meant by "the Wikimedia (without Wikipedia)" so had to guess that you meant mediawiki.org or wikimedia.org. Jonathan3 (talk) 20:47, 30 September 2024 (UTC)

Alternative for depreciated SkinTemplateOutputPageBeforeExec

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


I have been using the following code in LocalSettings.php which was removed and not available in 1.39, is there some other way to achieve the same? I know one can use Manual:Hooks/SkinAddFooterLinks but I am not sure how to adapt the code and using the example code in that page did not produce any result.
$wgHooks['SkinTemplateOutputPageBeforeExec'][] = function( $sk, &$tpl ) {
	$tpl->set( 'learngreek', $sk->footerLink( 'learngreek', 'learngreekpage' ) );
	$tpl->data['footerlinks']['places'][] = 'learngreek';
	return true;
};
Spiros71 (talk) 12:35, 28 September 2024 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Use of $wgUser was deprecated in MediaWiki 1.35

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


These are a couple of errors I see in an 1.39.8 install.
Deprecated: Use of $wgUser was deprecated in MediaWiki 1.35. [Called from MediaWiki\HookContainer\HookContainer::callLegacyHook in /includes/HookContainer/HookContainer.php at line 338] in /includes/debug/MWDebug.php on line 381

Deprecated: $wgUser reassignment detected [Called from MediaWiki\HookContainer\HookContainer::callLegacyHook in /includes/HookContainer/HookContainer.php at line 338] in /includes/debug/MWDebug.php on line 381
Spiros71 (talk) 13:35, 28 September 2024 (UTC)
It's probably from an extension. You can ignore deprecation warnings or you can try to find which extension is the cause. – Ammarpad (talk) 17:42, 28 September 2024 (UTC)
It was in LocalSettings.php Spiros71 (talk) 20:26, 28 September 2024 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Upgrade from old version

I have inherited a WikiMedia instance for a plant database.  It is running verion 1.32 and I want to bring it up to the  the current version.  Do I have to start with an upgrade to 1.35 and then proceed with other upgrades to get to the current version, or is there an easier way to bring this Wiki up to the current version, such as installing the latest and importing the content from the old one? Davidwoliver501 (talk) 16:37, 28 September 2024 (UTC)

Yes, you have to upgrade to 1.35 first. That's the easier way (to not cause you frustration or even data loss). – Ammarpad (talk) 18:01, 28 September 2024 (UTC)

Comment créer une zone information avec médiawiki ?

Comment créer une zone information avec médiawiki ?

J'aimerais pouvoir ajouter des zones d'informations comme sur cette page ( Zone d'information en bleu ).

Help:Formatting/fr

Le besoin :

J'aimerais coloriser certaines parties du wiki comme étant des pages "rédigées" en vert, et, des pages qui doivent encore être rédigées, en rouge.

Une page mediawiki pourrait contenir plusieurs zones de couleurs.

Ce serait pour faciliter la relecture de mon wiki, comme par exemple, sur cette page : https://wiki.amis-sh.fr/index.php?title=Installer_Apache2_sur_Debian Zer00CooL (talk) 18:39, 28 September 2024 (UTC)

J'ai trouvé ceci : Template:Note/fr
Mais, je ne sais pas créer le modèle. Comment faire ?
De toute façon, cela ne correspond pas au besoin de coloriser tout un contenu, par exemple, tout le contenu d'un menu de niveau 3
( ===Menu de niveau 3 === ) Zer00CooL (talk) 20:37, 28 September 2024 (UTC)
Peut-être que https://developer.mozilla.org/fr/docs/Web/CSS/background-color est utile ?
Par exemple
<div style="background-color:blue">
Le texte à l'intérieur ici est bleu
</div>
Bawolff (talk) 02:05, 29 September 2024 (UTC)

Undefined constant "NS_IMAGE_TALK"

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


I get the error below after upgrade to 1.39.8 from 1.31. Accessing a page with an image throws an HTTP ERROR 500. Same error on all pages when I switch from php 7.4 to php 8+.
PHP Fatal error:  Uncaught Error: Undefined constant "NS_IMAGE_TALK" in ..LocalSettings.php:244
Stack trace:
#0 ..includes/Setup.php(218): require_once()
#1 ..includes/WebStart.php(86): require_once('/home/wikifolder...')
#2 ..index.php(44): require('/home/wikifolder...')
Spiros71 (talk) 05:54, 29 September 2024 (UTC)
Change NS_IMAGE_TALK to NS_FILE_TALK on line 244 of your LocalSettings.php Bawolff (talk) 20:34, 29 September 2024 (UTC)
Thanks, I had already done that, forgot to mention that it fixed it! Spiros71 (talk) 16:29, 30 September 2024 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

HTTP error 406 apierror-visualeditor-docserver-http

Hello I am getting http error 406 with my mediawiki when i am trying to use Visual Editor. Everything is up to date. Is there any possibility to fix it? I already tried to change the parsoid settings but nothing is helping me.. 81.91.211.130 (talk) 10:45, 30 September 2024 (UTC)

Error when trying to load data : apierror-visualeditor-docserver-http: HTTP 406. 81.91.211.130 (talk) 10:46, 30 September 2024 (UTC)
What version of MediaWiki are you using? What is your webserver? Older version of Parsoid gave 406 when there was a version mismatch, but I don't think newer versions of the bundled Parsoid should. MarkAHershberger(talk) 14:00, 30 September 2024 (UTC)
Hello I am using mediawiki 1.41.1 there should already packed parsoid with good version right? 85.193.34.221 (talk) 19:13, 30 September 2024 (UTC)
there should be* 85.193.34.221 (talk) 19:14, 30 September 2024 (UTC)
i am using rhel and httpd 85.193.34.221 (talk) 19:14, 30 September 2024 (UTC)
yes, it should already have parsoid. Was it working before? If so, Did you update anything that may have caused the problem? MarkAHershberger(talk) 23:43, 30 September 2024 (UTC)

Merging or combining MediaWiki and Markdown into one computer language

Hello

I use MediaWiki documentation language on offline and online MediaWiki data structures and I use Markdown documentation language mostly on online data structures such as GitHub and Stack Exchange.

Was there any attempt to merge or combine both languages to create some sort of an "all purpose" documentation language and anyway what do you think of this idea?

Thank you 49.237.22.41 (talk) 10:50, 30 September 2024 (UTC)

I think translation between the two is a better approach. If you are more comfortable with one or the other, you can use a tool like pandoc to translate between them. MarkAHershberger(talk) 13:55, 30 September 2024 (UTC)

Unable to load CharInsert Extension

I've recently installed MediaWiki version 1.42 and I'm trying to load the CharInsert extension version 1.42 but I'm getting the following error:

Warning: file_get_contents(/var/www/html/MediaWiki/extensions/CharInsert/extension.json). Failed to open stream: Permission denied in /var/www/html/MediaWiki/includes/registration/ExtensionRegistry.php on line 429.

Fatal error: uncaught IncalidArgumentException: Unable to read /var/www/html/MediaWiki/extensions/CharInsert/extension.json, does it exist? in /var/www/html/MediaWiki/includes/registration/ExtensionRegistry.php: 431 Stack trace: #0 /var/www/html/MediaWiki/includes/registration/ExtensionRegistry.php(317): ExtensionRegistry->readFrmQueue() #1 /var/www/html/MediaWiki/includes/Setup.php(288): ExtensionRegistry->loadFromQueue() #2 /var/www/html/MediaWiki/includes/WebStart.php(85): require_once('...') #3 /var/www/html/MediaWiki/inde.php(50): require('...') #4 {main} thrown in /var/www/html/MediaWiki/includes/registration/ExtensionRegistry.php on line 431.


Has anyone seen this error or know what may be causing this error? Any help would be greatly appreciated.

Thanks, Ivpham (talk) 16:02, 30 September 2024 (UTC)

Check the permissions of the extension file. It must be readable by the web user. Bawolff (talk) 17:19, 30 September 2024 (UTC)

PHP 8.2 Errors on Wiki 1.38.1 (formerly php 7.3)

In PHP Selector on shared hosting account, I changed from v.7.3 to 8.1 in order to install latest MediaWiki version 1.42.

I have 2 wikis running on v.1.38.1 and 2 others running on 1.35.14. All are still running fine on php 8.1 except one of the v.1.38.1 wikis. I switched back to php 7.3 but that didn't fix issue and created an issue on the 1.35.14 wikis.

How can I fix the errors shown on Main Page https://dstall.com/DIY/

Deprecated: strcasecmp(): Passing null to parameter #1 ($string1) of type string is deprecated in /home/dstallco/domains/dstall.com/public_html/DIY/includes/session/CookieSessionProvider.php on line 99

Deprecated: Return type of MediaWiki\Session\Session::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/dstallco/domains/dstall.com/public_html/DIY/includes/session/Session.php on line 606

Deprecated: Return type of MediaWiki\Session\Session::current() should either be compatible with Iterator::current(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/dstallco/domains/dstall.com/public_html/DIY/includes/session/Session.php on line 612

Deprecated: Return type of MediaWiki\Session\Session::next() should either be compatible with Iterator::next(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/dstallco/domains/dstall.com/public_html/DIY/includes/session/Session.php on line 624

Deprecated: Return type of MediaWiki\Session\Session::key() should either be compatible with Iterator::key(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/dstallco/domains/dstall.com/public_html/DIY/includes/session/Session.php on line 618

Deprecated: Return type of MediaWiki\Session\Session::valid() should either be compatible with Iterator::valid(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/dstallco/domains/dstall.com/public_html/DIY/includes/session/Session.php on line 636

Deprecated: Return type of MediaWiki\Session\Session::rewind() should either be compatible with Iterator::rewind(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/dstallco/domains/dstall.com/public_html/DIY/includes/session/Session.php on line 630

Deprecated: Return type of Wikimedia\RemexHtml\Tokenizer\PlainAttributes::offsetExists($key) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/dstallco/domains/dstall.com/public_html/DIY/vendor/wikimedia/remex-html/src/Tokenizer/PlainAttributes.php on line 24

Deprecated: Return type of & Wikimedia\RemexHtml\Tokenizer\PlainAttributes::offsetGet($key) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/dstallco/domains/dstall.com/public_html/DIY/vendor/wikimedia/remex-html/src/Tokenizer/PlainAttributes.php on line 28

Deprecated: Return type of Wikimedia\RemexHtml\Tokenizer\PlainAttributes::offsetSet($key, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/dstallco/domains/dstall.com/public_html/DIY/vendor/wikimedia/remex-html/src/Tokenizer/PlainAttributes.php on line 32

Deprecated: Return type of Wikimedia\RemexHtml\Tokenizer\PlainAttributes::offsetUnset($key) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/dstallco/domains/dstall.com/public_html/DIY/vendor/wikimedia/remex-html/src/Tokenizer/PlainAttributes.php on line 39

Deprecated: Return type of Wikimedia\RemexHtml\Tokenizer\PlainAttributes::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/dstallco/domains/dstall.com/public_html/DIY/vendor/wikimedia/remex-html/src/Tokenizer/PlainAttributes.php on line 44

Deprecated: Optional parameter $params declared before required parameter $frame is implicitly treated as a required parameter in /home/dstallco/domains/dstall.com/public_html/DIY/extensions/AddHTMLMetaAndTitle/includes/Adder.php on line 86

Notice: Headers already sent, should send headers earlier than OutputPage->output [Called from MediaWiki\HeaderCallback::warnIfHeadersSent in /home/dstallco/domains/dstall.com/public_html/DIY/includes/HeaderCallback.php at line 87] in /home/dstallco/domains/dstall.com/public_html/DIY/includes/debug/MWDebug.php on line 500

Warning: Cannot modify header information - headers already sent by (output started at /home/dstallco/domains/dstall.com/public_html/DIY/vendor/wikimedia/remex-html/src/Tokenizer/PlainAttributes.php:8) in /home/dstallco/domains/dstall.com/public_html/DIY/includes/WebResponse.php on line 75

Warning: Cannot modify header information - headers already sent by (output started at /home/dstallco/domains/dstall.com/public_html/DIY/vendor/wikimedia/remex-html/src/Tokenizer/PlainAttributes.php:8) in /home/dstallco/domains/dstall.com/public_html/DIY/includes/WebResponse.php on line 75 DStallTX (talk) 19:03, 30 September 2024 (UTC)

It looks like you're re-installing the system and I don't see errors there. MarkAHershberger(talk) 23:45, 30 September 2024 (UTC)
I had to manually install MW 1.38.1 bc Softaculous no longer offers that option, only 1.35, 1.39 and 1.42. Issue persists.
This is really, really incredibly glitchy that it didn't affect my other 1.38 site that was installed exactly the same way with Softaculous. Thank God! bc that's my main site with over 100 pages.
So what's the fix for this???? DStallTX (talk) 02:30, 1 October 2024 (UTC)
@DStallTX There are no "errors" at all. There are deprecation warnings. The way to fix this is upgrading to a more recent version which includes fixes for these deprecation warnings. MediaWiki 1.38 has been unsupported for more than a year so you are running a version with known unfixed security vulnerabilities. MediaWiki 1.39 and later officially support PHP 8.1. Malyacko (talk) 05:34, 1 October 2024 (UTC)
Manually installed last update for MW - 1.38.7, and errors disappeared. Currently working on figuring out how to migrate data to 1.42.3
Any idea why my main, bigger wiki 1.38.1 (plus 2 small 1.35.14 ones) had no issues with php 8.1, but the much smaller 1.38.1 one did? Not very consistent behavior. DStallTX (talk) 17:56, 1 October 2024 (UTC)
Maybe the PHP debugging settings are set differently for each wiki. Jonathan3 (talk) 22:04, 1 October 2024 (UTC)
You need at least mediawiki 1.39 for php 8.2 support. Bawolff (talk) 04:27, 2 October 2024 (UTC)
Category:Support desk archives Category:Support desk archives with syntax highlighting errors