Jump to content

Project:Support desk

About this board

Welcome to the MediaWiki Support desk. This is a place where you can ask any questions you have about installing, using or administrating the MediaWiki software.

(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 version of MediaWiki you are using, as found on your wiki's Special:Version page:
  2. If possible, add $wgShowExceptionDetails = true;error_reporting( -1 );ini_set( 'display_errors', 1 ); to LocalSettings.php in order to make MediaWiki show more detailed error messages.
  3. 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.
  4. To start a new thread, click the box with the text "Start a new topic".

Short URL and Tagline Font-Size v.1.39.8

6
DStallTX (talkcontribs)
Samwilson (talkcontribs)

@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?

DStallTX (talkcontribs)

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.

Samwilson (talkcontribs)

@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?

DStallTX (talkcontribs)

AsuraHosting.com Short URLs work fine with v.1.38.1, so why don't they work with v.1.39.8?

Samwilson (talkcontribs)

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?

Reply to "Short URL and Tagline Font-Size v.1.39.8"

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

3
DStallTX (talkcontribs)

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?

Ammarpad (talkcontribs)
DStallTX (talkcontribs)

OK got it. Thanks.

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

Where to put this orphaned manual in Manual:Contents

3
Waddie96 (talkcontribs)
Waddie96 (talkcontribs)

@Shirayuki: : ping contributor to Manual that is still active

Shirayuki (talkcontribs)

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.

Reply to "Where to put this orphaned manual in Manual:Contents"

Wiki table not sortable with mediawiki 1.26.2

2
Alex1859 (talkcontribs)

Hello,

I have MW 1.26.2 but my old custom skin doesn't load the javascript for sortable tables.

My custom skin was created in older versions of MW and I think it doesn't have the latest updates.

What is the javascript needed for sortable table ? where can I find it, and how to add it in the skin ? plz

Many thx

Alex

MarkAHershberger (talkcontribs)

Replace old extension code that parses wikitext

5
Summary by Jonathan3

Used API.

Jonathan3 (talkcontribs)

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.

Bawolff (talkcontribs)

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.

Jonathan3 (talkcontribs)

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 (talkcontribs)

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 (talkcontribs)

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.

ERR_CONNECTION_RESET editing a sub section

6
Darkmatterenergy (talkcontribs)

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

Ciencia Al Poder (talkcontribs)

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.

Darkmatterenergy (talkcontribs)

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 ?

Ciencia Al Poder (talkcontribs)

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.

Darkmatterenergy (talkcontribs)

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

Ciencia Al Poder (talkcontribs)

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.

Reply to "ERR_CONNECTION_RESET editing a sub section"

Extension for page visit

6
167.103.54.99 (talkcontribs)

Is there any extension that shows when was the page last visited(viewed), so that it helps to track the older pages

Malyacko (talkcontribs)

See your server logs but what is the use case? Going over "unpopular pages" to solve which problem?

Bawolff (talkcontribs)
Jonathan3 (talkcontribs)
167.103.7.14 (talkcontribs)

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!!

Nanash (talkcontribs)

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.

Reply to "Extension for page visit"

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

2
AltamiraDBA (talkcontribs)

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}

Ammarpad (talkcontribs)

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.

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

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

2
ACR user (talkcontribs)

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.

Bawolff (talkcontribs)

For the second error, is there a more detailed error in your php error log? (See How to debug)

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

Pictures not displaying when logged out of Miraheze

2
DJC's Astracolonial Ventures (talkcontribs)

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

Samwilson (talkcontribs)

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.

Reply to "Pictures not displaying when logged out of Miraheze"