Project:Support desk

About this board

Welcome to the MediaWiki Support desk, where you can ask MediaWiki questions!

(Read this message in a different language)

See also

Before you post

Post a new question

  1. To help us answer your questions, please indicate which versions you are using, as found on your wiki's Special:Version page:
    • MediaWiki version
    • PHP version
    • Database type and version
  2. Please include the web address (URL) to your wiki if possible. It's often easier for us to identify the source of the problem if we can see the error directly.
  3. To start a new thread, click "Start a new topic".

Possible bug in template page information

3
Larrydberg (talkcontribs)

Hi. I have a potential bug. It may no longer be relevant so I'm asking for guidance here.

Page information on a template has a section "Page properties" with (on my wiki) a subsection "Pages transcluded on", a bulleted list of page titles. But the titles are all empty: You see only the bullet plus an "(edit)" link for an empty title. Example here.

When requesting this page info two warnings are logged for each list member: $page_title and $page_namespace are undefined. The offending code is includes/Title.php line 3158 where these two properties are referenced in a routine that seems to be invoked only when getting page info on a template.

The same page on other wikis, e.g. mediawiki.org, doesn't have the "Pages transcluded on" subsection and everything looks fine. This is no doubt because my version is older. But the same code appears in 1.39.0-wmf.12 so possibly there's latent buggy code even though its results aren't displayed. Send to Phabricator?

horawiki.org, MediaWiki 1.37.2, PHP 7.4.29 (litespeed), MySQL 5.6.51-cll-lve

Bawolff (talkcontribs)
Larrydberg (talkcontribs)

Same behavior with all extensions disabled. I'll file a bug. Thanks.

Reply to "Possible bug in template page information"
Japanczyk (talkcontribs)

Hey, beginner's question here

I'm planinning on adding restriction of the articles to particular user groups and I'd like to add the checkboxes for groups selection from the Edit page

I'm lost though how exactly to add or modify the functionality of Edit form

Reply to "Edit page modification"

mw_config redirects to Mw_config even though I have renamed .htaccess

2
Cassolotl (talkcontribs)

I am trying to update my wiki (wiki.polyinpictures.com) from 1.32.0 to 1.37.1.

I have renamed the .htaccess file in the new wiki folder, in accordance with this instruction:

It might happen that the web-updater does not seem to work: Instead of seeing the initial language selection screen, you might see an empty wiki page, possibly with some error message. In this case it is most likely that your web server uses Rewrite Rules (most likely for short URLs), which do not show you the updater at mw-config/, but a wiki page at Mw-config/, with capital "M". In this case, rename the .htaccess file for the time of the update. Then you should be able to access the web-updater.

It didn't work, and I don't know what to try next. Am I supposed to rename some other .htaccess file? Are there other causes for this issue?

Thank you in advance. This has been causing me a lot of stress for a long time, and I really, really need to update my wiki because it's covered in error messages all the time and now for unknown reasons I am unable to upload media.

Edit: Here's my version info:

Product Version
MediaWiki 1.32.0
PHP 8.0.17 (litespeed)
MySQL 5.7.23-23
ICU 69.1
Bawolff (talkcontribs)

It could be something in your apache httpd.conf. you should disable all rewrite rules temporarily.

Alternatively, just use the cli update.php

Reply to "mw_config redirects to Mw_config even though I have renamed .htaccess"

<code>common.js</code> files are not executing

8
I.hate.spam.mail.here (talkcontribs)
  1. I installed Mediawiki brand-new.
  2. I set $wgAllowUserJs = true; at the bottom of LocalSettings.php.
  3. I created a Special:Mypage/common.js file and saved it with contents such as alert(1).
  4. When I bypass the cache, the JavaScript does not execute. Why not? I'm using Mediawiki 1.37.2 and PHP 7.4.29 with MariaDB.

I.hate.spam.mail.here (talk) 04:51, 17 May 2022 (UTC)

Bawolff (talkcontribs)

If you open the developer console in your web browser, are there any errors?

I.hate.spam.mail.here (talkcontribs)
Bawolff (talkcontribs)

Are you sure? The script will be named load.php

I.hate.spam.mail.here (talkcontribs)
Bawolff (talkcontribs)

If you have a link to your wiki, it would be helpful so we could look closer.

I.hate.spam.mail.here (talkcontribs)

Sorry, I'm running it on localhost, so I don't have a link. ~~~~

I.hate.spam.mail.here (talkcontribs)

Call to undefined method Wikibase\Repo\WikibaseRepo::getDefaultInstance()

1
No39188 (talkcontribs)

Hi, I need some advice, I have an own standalone mediawiki instance with wikibase extension.

In the past, I've imported Qitems and properties using the WikibaseImport extension. This now fails with this exception backtrace,

# php maintenance/importEntities.php --query P31:Q5

[5de1fd28e98e57b7da508039] [no req]   Error: Call to undefined method Wikibase\Repo\WikibaseRepo::getDefaultInstance()

Backtrace:

from /crypt/htdocs/geneawiki/mediawiki-1.37.1/w/extensions/WikibaseImport/maintenance/importEntities.php(112)

#0 /crypt/htdocs/geneawiki/mediawiki-1.37.1/w/extensions/WikibaseImport/maintenance/importEntities.php(51): Wikibase\Import\Maintenance\ImportEntities->newEntityIdListBuilderFactory()

#1 /crypt/htdocs/geneawiki/mediawiki-1.37.1/w/maintenance/doMaintenance.php(108): Wikibase\Import\Maintenance\ImportEntities->execute()

#2 /crypt/htdocs/geneawiki/mediawiki-1.37.1/w/extensions/WikibaseImport/maintenance/importEntities.php(133): require_once(string)

#3 {main}

According to https://phabricator.wikimedia.org/T280984 , it appears the getDefaultInstance() method was removed around April - May 2021,

the WikibaseImport code ( https://github.com/filbertkm/WikibaseImport ) looks untouched since May 7, 2016,

is this code maintained at all ?

Reply to "Call to undefined method Wikibase\Repo\WikibaseRepo::getDefaultInstance()"
NemesisAT (talkcontribs)

Hi all, following feedback from users on my wiki I'd like to create a map that allows all articles to be viewed as points, using the coordinates input with the GeoData extension. Is this currently possible? Thanks

Tanbirzx (talkcontribs)

Welcome to MediaWiki. Please see "post a new question" in the sidebar.

Jonathan3 (talkcontribs)

You could use the Cargo extension.

Reply to "Create map using GeoData"
Sockerz (talkcontribs)

I want to change the title of a single page, but the "copy" function is not working, because I just want to change the title of the page from uppercase to lowercase - as the page still exists as a "delete-log" it still keeps the same writing :( what can I do?

thank you

Tanbirzx (talkcontribs)

Which copy function you meant? You can change the page title by moving it (source edit).

Reply to "change title of a page"

How can I only load template and modules from enwiki dump

1
Sajangohil11 (talkcontribs)

I would like to load only template and module pages from wikipedia data dumps to my database in installation of mediawiki. Is this possible? Even after loading, How can I identify if a page is a template or module page?

Thank you

Reply to "How can I only load template and modules from enwiki dump"
108.39.140.52 (talkcontribs)

Trying to fresh install 1.37.2. I see:


"[random string] /w/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."


How do I backtrace to see more? Which query failed? This user is fully granted on the DB.

108.39.140.52 (talkcontribs)

It seems to get more output I have to create a LocalSettings.php...which messes with the installer.

Malyacko (talkcontribs)
Reply to "Database setup error"

Need these log problems be addressed?

2
Summary by Larrydberg

Log errors should be addressed but probably aren't causing slowdown; object cacheing is important even for low-traffic instances.

Larrydberg (talkcontribs)

MediaWiki 1.37.2, PHP 7.4.29 (litespeed), MySQL 5.6.51-cll-lve, http://horawiki.org/

Hi. I'm trying to improve the slow behavior of my wiki. I suspect the real problem is load at the hosting service (GoDaddy) but I'm grasping at every straw.

I'm currently getting lots of logged warnings, and the question is whether they should be addressed. They're of two kinds:

1) PHP Deprecated, for Title::isWatchable and User::isLoggedIn and ContentHandler::getForTitle and maybe others, called from MinervaNeue and MobileFrontEnd and maybe others.

2) PHP Notice for undefined properties stdClass::$page_namespace and stdClass::$page_title, in includes/Title.php.

Are any of these not ignorable?

BTW: I haven't set up any cacheing because the site is very low traffic: At most a few thousand hits per day (including everything) and a handful of edits per month. But I'll cheerfully go that route if it's a good idea despite the low traffic.

Thanks, as always, for your help.

Bawolff (talkcontribs)

these are probably not causing your performance issues.

However they shouldn't be happening and may indicate a buggy or out of date extension. Make sure all skins/extensions are the correct version for your version of mediawiki.

For caching - there are different types, some more helpful than others. Object caching ($wgMainCacheType) is very important, and will improve performance even on low traffic sites.