Project:Support desk

Jump to navigation Jump to search

About this board

vde   Welcome to MediaWiki.org's Support desk, where you can ask MediaWiki questions!

There are also other places where to askCommunication: IRCCommunication#Chat, mailing listsMailing lists, Wikimedia Developer Support, Q&A, mwusers (unofficial forum) etc.

Before you post

Post a new question

  1. To help us answer your questions, please always indicate which versions you are using (reported by your wiki's Special:Version page):
    • MediaWiki
    • PHP
    • Database
  2. Please include the URL of your wiki unless you absolutely can't. It's often a lot easier for us to identify the source of the problem if we can look for ourselves.
  3. To start a new thread, click "Start a new topic".

Getting scripts and styles fails (err 500) with $wgLanguageCode="de"

11
Tetramil (talkcontribs)

Hello !

I installed MediaWiki 1.3.1 on a Windows/IIS server with PHP 7.3.0 and MySql 8.0.

After installation (with language set to German i.e. "de"), the mail pages shows up but with no CSS styling. In the network tab of the browers development tool I see that getting scripts and styles fails with error 500.

Now when I change $wgLanguageCode="en" this problem is gone. The initial pages are in english now. Users with their profile set to "de" see the German page just fine.

I know I should probably provide some Infos from the log files, but I'm completely new to MediaWiki and therefore don't know where to look. Can you please advise?


Thanks!

Ciencia Al Poder (talkcontribs)

Temporarily set $wgShowExceptionDetails = true; in LocalSettings.php and open the load.php URL that returns a 500 error. You should be able to see details about the error that could give a hint of the problem

This post was hidden by AhmadF.Cheema (history)
Tetramil (talkcontribs)

Ok, here's the output. Any idea?


<!DOCTYPE html>

<html><head><title>Internal error – mypedia</title><style>body { font-family: sans-serif; margin: 0; padding: 0.5em 2em; }</style></head><body>

<div class="errorbox mw-content-ltr"><p>[8b9da3388ae7579791af6f08] /load.php?debug=false&amp;lang=de&amp;modules=startup&amp;only=scripts&amp;skin=vector   Error from line 689 of C:\inetpub\wwwroot\mypedia\includes\exception\MWExceptionHandler.php: Class 'FormatJson' not found</p><p>Backtrace:</p><p>#0 C:\inetpub\wwwroot\mypedia\includes\exception\MWExceptionHandler.php(216): MWExceptionHandler::logError(ErrorException, string, string)<br />

#1 C:\inetpub\wwwroot\mypedia\includes\AutoLoader.php(109): MWExceptionHandler::handleError(integer, string, string, integer, array)<br />

#2 C:\inetpub\wwwroot\mypedia\includes\AutoLoader.php(109): require()<br />

#3 [internal function]: AutoLoader::autoload(string)<br />

#4 C:\inetpub\wwwroot\mypedia\includes\resourceloader\ResourceLoader.php(141): spl_autoload_call(string)<br />

#5 C:\inetpub\wwwroot\mypedia\includes\resourceloader\ResourceLoaderStartUpModule.php(440): ResourceLoader-&gt;preloadModuleInfo(array, DerivativeResourceLoaderContext)<br />

#6 C:\inetpub\wwwroot\mypedia\includes\resourceloader\ResourceLoaderStartUpModule.php(422): ResourceLoaderStartUpModule-&gt;getAllModuleHashes(DerivativeResourceLoaderContext)<br />

#7 C:\inetpub\wwwroot\mypedia\includes\resourceloader\ResourceLoaderModule.php(831): ResourceLoaderStartUpModule-&gt;getDefinitionSummary(DerivativeResourceLoaderContext)<br />

#8 C:\inetpub\wwwroot\mypedia\includes\resourceloader\ResourceLoader.php(665): ResourceLoaderModule-&gt;getVersionHash(DerivativeResourceLoaderContext)<br />

#9 [internal function]: ResourceLoader-&gt;{closure}(string)<br />

#10 C:\inetpub\wwwroot\mypedia\includes\resourceloader\ResourceLoader.php(678): array_map(Closure, array)<br />

#11 C:\inetpub\wwwroot\mypedia\includes\resourceloader\ResourceLoader.php(759): ResourceLoader-&gt;getCombinedVersion(ResourceLoaderContext, array)<br />

#12 C:\inetpub\wwwroot\mypedia\load.php(51): ResourceLoader-&gt;respond(ResourceLoaderContext)<br />

#13 {main}</p></div>

</body></html>


Ciencia Al Poder (talkcontribs)
Tetramil (talkcontribs)

Hm, ok, are you sure?

On the page you linked they say "As of PHP 5.2.0, the JSON extension is bundled and compiled into PHP by default." and I have PHP 7.3, so shouldn't that extension not already be in there?


And the output of php -i contains these lines:


json support => enabled

json version => 1.7.0


I'd like to try the php-json module of course, but where can I find it compiled as a Windows x64 .dll?

Tetramil (talkcontribs)

It seems I resolved this issue by adding this line to LocalSettings.php:

require_once("$IP/includes/json/FormatJson.php");

The error 500 is gone. So this works, but why???

Ciencia Al Poder (talkcontribs)

Is this a new installation? or an upgrade?

Tetramil (talkcontribs)

A new installation

Ciencia Al Poder (talkcontribs)

I don't know, then. Looks like you're the first person with that problem that I know of. Maybe this is a problem with PHP 7.3?

星耀晨曦 (talkcontribs)

What is certain is that the class autoloader does not work as expected.

Reply to "Getting scripts and styles fails (err 500) with $wgLanguageCode="de""
Fanatikvoice (talkcontribs)
Cindy.cicalese (talkcontribs)

That can happen when you use {{DISPLAYTITLE:...}} more than once on a page.

Reply to "No working {{DISPALAYTITLE}}"
RolandHorn (talkcontribs)

Hallo,

ich habe vor einiger Zeit ein Wiki (V. 1.3nochwas) übernommen und wollte es nun auf die aktuelle Version upgraden. Das Update hat nach wenigen Tagen möglichweise geklappt, nachdem ich noch ein paar Fehler aus der usr.php 'rauskommentiert habe. Jetzt kommt die Fehlermeldung "[XBEZQNTjGBkAAD8msOUAAAAl] 2018-12-12 14:20:48: Fatal exception of type Wikimedia\Rdbms\DBQueryError", was anscheinend bedeutet, dass ich die Datenbank aktualisieren soll. Das funktioniert aber nicht, und ich habe gerade erfahren, dass 1&1 die Ausführung des Update-Skripts nicht zulässt. Gibt es da einen Trick und/oder würde der Umzug auf einen anderen Server den Vorgang des Upgrades möglich machen? Ich wollte sowieso von 1&1 weg und habe nun noch einen Grund mehr...

Gruß

Roland

MarkAHershberger (talkcontribs)

From Google translate:

I took over some time ago a wiki (V. 1.3something) and wanted to upgrade it to the current version. The update was able to work after a few days, after I commented out a few bugs from the usr.php '. Now comes the error message "[XBEZQNTjGBkAAD8msOUAAAAl] 2018-12-12 14:20:48: Fatal exception of type Wikimedia \ Rdbms \ DBQueryError", which apparently means that I should update the database. This does not work, and I've just learned that 1 & 1 will not allow the update script to run. Is there a trick and / or would moving to another server make the process of upgrading possible? I wanted to get away from 1 & 1 anyway and I have one reason more ...

2001:16B8:10FB:7C00:ADB5:7DFF:3358:6492 (talkcontribs)

Hi Roland,

lass mich kurz auf Englisch antworten:

Yes, you have to update the database as well. There are two ways to do that: One is running update.php from the shell. I guess, you mean that this is not possible with your 1&1 account.

The other option is using the web updater in mw-config/index.php. This can be done using the webbrowser. Details are explained here: Manual:Upgrading/de#Das_Update-Skript_ausführen.

Reply to "Datenbank-Update"
Waanders (talkcontribs)

Is it possible to query the name of the used skin in a template so I can use this to adapt generated output?

MarkAHershberger (talkcontribs)

This is not something you would want to do in a template since it would cache the wrong information. In JS, you could look for the skin-??? class in the <body> tag.

Reply to "Query skin name"

Do not display snippet on any Special pages

2
Spiros71 (talkcontribs)

I am using this code in MW 1.31 to display quotes. Currently, they are not displayed on home page. I want to also NOT display them on any Special pages and on Discussion Pages. In other words, only display it in standard pages. How can I do that?


if ( $this->data['title'] !== $this->getMsg( 'mainpage' )->inContentLanguage()->plain() ) {

echo wfGetQuote();

}

MarkAHershberger (talkcontribs)

It looks like you're modifying the skin, which is probably not what you want to do (unless you're building your own skin).

In any case, if you ignore my good advice to look at a hook like BaseTemplateAfterPortlet, then, assuming you have access to $skin, you can use MWNamespace::isContent( $skin->getTitle()->getNamespace() ) or similar to determine if the namespace is a content namespace (e.g. NS_MAIN).

Reply to "Do not display snippet on any Special pages"

"mw.getCurrentFrame():getParent()" is a broken table

1
Taylor 49 (talkcontribs)

Extension:Scribunto/Lua reference manual#frame:getParent

[SCRIBUNTO] I can seize single parameters passed to the caller using "mw.getCurrentFrame():getParent().args[1]". Thus "mw.getCurrentFrame():getParent().args" should be the complete table with all parameters. Function "type" reports "table" as expected but function "next" reports "nil" making it impossible to traverse the table. How can I fix this? Thanks.

Reply to ""mw.getCurrentFrame():getParent()" is a broken table"

FlowChartWiki - Problem creating sample graph

4
Kael1117 (talkcontribs)

Hello: How can i get more information about this problem?


Check FlowChartWiki extension Web Server: Apache/2.4.6 (CentOS) PHP/7.0.32 SVN/1.7.14

PHP version: 7.0.32

Platform: Linux VM_0_10_centos 3.10.0-862.11.6.el7.x86_64 #1 SMP Tue Aug 14 21:49:04 UTC 2018 x86_64

Mediawiki version: 1.31.1

Database: [{{int:version-db-mariadb-url}} MariaDB] 5.5.60-MariaDB

Database prefix: origin

FlowChartWiki version: 1.2.5

OK FlowChartWiki data folder
OK FlowChartWiki data folder permissions
OK GraphViz path
OK GraphViz executable
OK FlowChartWiki database table
ERROR Create sample graphProblem creating sample graph
ERROR Total status
Malyacko (talkcontribs)
Kael1117 (talkcontribs)
Kael1117 (talkcontribs)

Solved:

wget https://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/a/ann-libs-1.1.2-3.el7.x86_64.rpm
rpm -ivh ann-libs-1.1.2-3.el7.x86_64.rpm

CategoryIntersection Download File is missing

3
Nedge1000 (talkcontribs)
AhmadF.Cheema (talkcontribs)

The files should be available through svn checkout URL.

However, in case you wanted to add it to a Wikia hosted Wiki, according to this, since the extension is unmaintained you will probably not be able to get the extension installed on Wikia anyway.

There might be newer maintained extensions that would fit your needs.

Nedge1000 (talkcontribs)

Extension's name not appearing on Special:SpecialPages

3
Supasaru (talkcontribs)

My extension currently shows "⧼myextention⧽" when I am on Special:SpecialPages, instead of the extension's actual name.

I have read Manual:Developing_extensions a few times and have examined the extensions that come with MediaWiki, and I still can't figure out what piece makes the name appear on SpecialPages.

Can someone point me in the right direction?

(Edit: my extension is just a Special page; it's not a parser function or anything else.)

Jdforrester (WMF) (talkcontribs)

Does the name show on Special:Version?

That display means that you haven't defined a message key with that key either doesn't exist, or you've made it but not registered it.

For example of a special page, see VisualEditor's Special:CollabPad experimental feature, in includes/SpecialCollabPad.php and the keys defined in i18n/ve-mw/en.json#23 and linked via extension.json#113 (which is more complex than you probably need).

Supasaru (talkcontribs)

*embarrassed laugh* Oops - it turns out that the problem was a small typo. The folder I declared in extension.json > MessagesDirs > Extension didn't match the name of the folder in my extension's directory.

Thanks for your help, Jdforrester.

Commons and Wikimedia Upload appear to have been BGP-hijacked

2
64.114.223.5 (talkcontribs)

Commons shows an error with the following message:


"Error: Our servers are currently under maintenance or experiencing a technical problem. Please try again in a few minutes.

See the error message at the bottom of this page for more information.

If you report this error to the Wikimedia System Administrators, please include the details below.

Request from 216.171.227.197 via cp4025 frontend, Varnish XID 88169232

Upstream caches: cp4025 int

Error: 404, Requested domainname does not exist on this server at Fri, 07 Dec 2018 19:07:07 GMT"


The 216 IP belongs to a proxy service, and is not my IP shown on other projects (64.114.223.5).


Upload.Wikimedia images are also broken:


"Page not found: /wikipedia/commons/3/32/Mezquita_de_Malek,_Kerman,_Ir%C3%A1n,_2016-09-22,_DD_20-22_HDR.jpg

We could not find the above page on our servers.

Did you mean: /wiki/wikipedia/commons/3/32/Mezquita_de_Malek,_Kerman,_Ir%C3%A1n,_2016-09-22,_DD_20-22_HDR.jpg

Alternatively, you can visit the Main Page or read more information about this type of error."


I am in Canada, and this is happening with 2 computers.


Jdforrester (WMF) (talkcontribs)

Hi there. I'm sorry to hear that. It sounds like a system is re-writing the URLs for you in a broken way. From looking at the logs, we don't think the problem is at our end, or a wider Internet problem that a BGP issue would show as.

Colleagues of mine asked if you were on a school network (from digging, the proxy looks like it might be used by the Ministry of Education), and if the two computers on which you had this issue are clean devices of your own, or if they're owned/controlled by the school. For our end, it looks like there's a proxy that's mis-behaving; that might be because the devices are configured to use it, or the network is inserting a proxy anyway that's breaking things for you.

Sorry we can't give more help!