Project:Support desk

Jump to: navigation, 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".

Error 500 when a new, non-default skin is added to Localsettings.php

34
Newman2 (talkcontribs)

I got an error 500 after adding new skins to my LocalSettings.php. This has only occurred with additional skins that are NOT one of four default skins (Cologne Blue, Modern, MonoBook, Vector), and I appeared to have used the correct skin addition method for my current MediaWiki version. I made this wiki with Webhostface, and it runs on a currently supported version. However, I had no problems with adding user rights or enabling extensions.

I have not found a solution to fix this error, and I need some help fixing the error 500 on my wiki. Is there any way to fix this strange error and enable the skins without getting any more errors? Thank you.

2001:16B8:1022:4F00:D9C7:A745:8FE2:7F2B (talkcontribs)

It depends... In order to help you further, please answer the following questions:

  • Which skin did you try to add?
  • Which version of MediaWiki are you using?
  • How exactly does the line look like, which you added to LocalSettings.php?
Newman2 (talkcontribs)

-I was adding two skins, one of them being Monaco and another (being a skin I created) called Candy.

-I am using MediaWiki 1.30

-The line looks exactly like this (Candy is the skin that I added):

# Enabled skins.

# The following skins were automatically enabled:

wfLoadSkin( 'Candy' );

wfLoadSkin( 'CologneBlue' );

wfLoadSkin( 'Modern' );

wfLoadSkin( 'MonoBook' );

wfLoadSkin( 'Vector' );

Ciencia Al Poder (talkcontribs)

A 500 error message is not helpful at all. You'll need to look at server error logs to see a meaningful error message. See blank page

This post was hidden by 177.249.219.18 (history)
Newman2 (talkcontribs)

By the way, I could not find enough information on the error 500.

2001:16B8:10A0:DB00:198F:24E4:C3ED:88E5 (talkcontribs)

On which skin did you base the Candy skin? Is it basically a copy of the Vector skin, which you then modified? Or is it based on the Monaco skin?

> I could not find enough information on the error 500.

That is why Ciencia is asking for more information. This information should be in the error log of the webserver.

After looking at the Monaco skin,

https://github.com/dantman/monaco-port

this skin does not support the line with wfLoadSkin(), because it is still using the old skin architecture. The Monaco skin has to be included using a line with require_once "$IP/skins/monaco/monaco.php";.

Does the error happen for both skins, Candy and Monaco?

Apart from that, the last changes to the Monaco skin have been done four years ago. Maybe the skin is no longer working with current versions of MediaWiki.

Newman2 (talkcontribs)

Candy is a copy of the MonoBook skin. And yes, the error happens for both Candy and Monaco.

2001:16B8:10AE:AE00:88E9:486B:2ED1:A316 (talkcontribs)

More information about your server error will be in the error log of the server.

Without more information, we will not be able to help you.

Newman2 (talkcontribs)

Okay. How do I debug the error then?

Newman2 (talkcontribs)

I also get an error 500 when attempting to debug and log the errors.

Ciencia Al Poder (talkcontribs)

The error log of the webserver should contain the information about the error.

Newman2 (talkcontribs)

How do you open the error log then? It wouldn't show up on my wiki.

Ciencia Al Poder (talkcontribs)
Newman2 (talkcontribs)

What do I need to type in to debug the error?

Newman2 (talkcontribs)

^^Look at the post above

Ciencia Al Poder (talkcontribs)

You already have the tools to debug the error. Nobody can tell you what do you need to type in to debug the error, because there are so many environments, operating systems, configurations, etc that is impossible to tell you the exact commands to type.

If you don't plan to take a bit of time to locate the error logs by yourself, interpret them to at least post here the relevant information, feel free to spend some money by hiring someone from Professional development and consulting.

Newman2 (talkcontribs)

The error looks like this:

PHP Fatal error:  Uncaught exception 'Exception' with message '/home/gjlxrtap/public_html/mw19/skins/Candy/skin.json does not exist!' in /home/gjlxrtap/public_html/mw19/includes/registration/ExtensionRegistry.php:99

Stack trace:

#0 /home/gjlxrtap/public_html/mw19/includes/GlobalFunctions.php(157): ExtensionRegistry->queue('/home/gjlxrtap/...')

#1 /home/gjlxrtap/public_html/mw19/LocalSettings.php(126): wfLoadSkin('Candy')

#2 /home/gjlxrtap/public_html/mw19/includes/WebStart.php(102): require_once('/home/gjlxrtap/...')

#3 /home/gjlxrtap/public_html/mw19/index.php(40): require('/home/gjlxrtap/...')

#4 {main}

  thrown in /home/gjlxrtap/public_html/mw19/includes/registration/ExtensionRegistry.php on line 99

Ciencia Al Poder (talkcontribs)

Look, a useful error message after all :)

Looks like Candy skin doesn't support extension registration. You should use require_once "$IP/skins/Candy/Candy.php"; or similar instead of wfLoadSkin

Newman2 (talkcontribs)

I get the same error, even with the require_once setup. Even if the message is useful, is there a way that I could fix this?

Newman2 (talkcontribs)

Now I've got this error:

PHP Fatal error:  Class 'MonoBookTemplate' not found in /home/gjlxrtap/public_html/mw19/skins/Modern/SkinModern.php on line 51

AhmadF.Cheema (talkcontribs)

Does your Skin:Modern version correspond to your MediaWiki core version? How did you download this skin?

Newman2 (talkcontribs)

I'm pretty sure my Modern skin version corresponds with the core version because the skin was built into the installation. Even if these messages are useful, I still need a way to get around this error and make my site run better.

This post was hidden by Newman2 (history)
This post was hidden by 2001:16B8:10A1:2100:3C43:EE16:CDE1:BE37 (history)
2001:16B8:10A1:2100:3C43:EE16:CDE1:BE37 (talkcontribs)

You are using MediaWiki 1.30, which is fine.

The skins, which are coming with MediaWiki 1.30, are Cologne Blue, Modern, MonoBook and Vector. These four skins all do have a skin.json file. Also the Modern skin should be working without the error "Class 'MonoBookTemplate' not found".

I think that something is wrong with the content of the four folders of these skins in the skins/ folder. I would delete these four folders and extract them again from the MediaWiki 1.30 tarball.

If the Candy skin is based on MonoBook from MediaWiki 1.30, it should be working.

Newman2 (talkcontribs)

Thanks for the info. But what software that is easy to download can debug any error including these ones?

2001:16B8:106D:2800:50C0:AF40:FC95:293B (talkcontribs)

You must enable error reporting - and obviously you have done that already as you already know the error message.

You should now replace the folders as detailed in my last post!

Newman2 (talkcontribs)

How do I extract those folders and enable error reporting? The fatal error occurs when I use the Modern skin, and the error 500 occurs when I add Candy to the site.

Now that I have enabled error reporting, now what do I do to debug this error? If the error reports and debugs are enabled, then how do I view and debug the errors if the error still occurs on my page? Where are the error displays located? I need some assistance on viewing the error reports.

星耀晨曦 (talkcontribs)
Newman2 (talkcontribs)

Yes, I saw the page on debugging. The problem is that I do not know whether or not HHVM has debugging on my wiki's database. Also, I do not know where MediaWiki Vagrant would be located. If they are on there, then would they be in the maintenance folder, the includes folder, or what location in MediaWiki? Thank you for reading this.

Ciencia Al Poder (talkcontribs)
Newman2 (talkcontribs)

I added the debug log file to my Localsettings.php, and it caused a 404 error. Does something else need to be send up, or does the $wgDBname have to be changed to the name of the database? There is something that needs to be done.

星耀晨曦 (talkcontribs)

The value of $wgDebugLogFile is the path you want to save. Name the file as you like, do not necessarily name the file by the example code.

> I added the debug log file to my Localsettings.php, and it caused a 404 error.

Very strange, it is likely that you misconfigured.

Reply to "Error 500 when a new, non-default skin is added to Localsettings.php"
Ag3dvr (talkcontribs)

I have a wiki page where the maths rendered perfectly until recently. Now, without any change on my part (either to the wiki text or to LocalSettings.php), it does not.

http://wiki.glennersterlab.com/index.php/Main_Page

For example:

http://wiki.glennersterlab.com/index.php/Notation

now has unrendered text (as I originally inputted it), like:

\( \begin{equation} \vec{r} = \begin{bmatrix} r_{1} \\ r_{2} \\ \vdots \\ r_{n} \end{bmatrix} \end{equation} \)

and I have put a png on the page to show how this used to render.

https://www.mathjax.org/#demo renders the text fine.

Can you tell me what needs to be done to get this to render properly? I have asked my web hosting provider but they have not been able to solve the problem.

MediaWiki 1.25.2

PHP 5.6.33 (litespeed)

MariaDB 10.1.30-MariaDB

The problem occurs on Chrome and Safari on a Mac and on an iPhone. I assume it applies to all browsers.

I am not a programmer, but relevant-looking lines in LocalSettings.php include the following (and there have been no changes in LocalSettings.php since it was working fine):

require_once "$IP/extensions/Math/Math.php";

$wgUseTeX = true;

$wgMathPath = "{$wgUploadPath}/math";

$wgMathDirectory = "{$wgUploadDirectory}/math";

$wgTmpDirectory = "{$wgUploadDirectory}/tmp";

require_once "$IP/extensions/MathJax/MathJax.php";

$wgParserCacheType = CACHE_NONE;

require_once "$IP/extensions/SimpleMathJax/SimpleMathJax.php";

$wgSimpleMathJaxSize = 120;

wfLoadExtension( 'Math' );

2A02:C7F:963F:BA00:4C5F:68F5:DDC5:BCED (talkcontribs)

Please upgrade your MediaWiki version first before getting help.

Bawolff (talkcontribs)

In addition to updated, I'd also mention, You also seem to have 3 different math extensions being loaded, and the Math extension being loaded in 2 different ways. Probably they are stepping over each other and breaking each other.

You should probably check the javascript console for errors in your web browser.

Ag3dvr (talkcontribs)

My web hosting provider has done that now:

Product Version
MediaWiki 1.30.0
PHP 5.6.33 (litespeed)
MariaDB 10.1.30-MariaDB
ICU 4.2.1

... with the result that there are now a lot of red error messages on the wiki (e.g.http://wiki.glennersterlab.com/index.php/Notation). The messages say: Failed to parse (Missing texvc executable); please see math/README to configure.). but I gather that This feature was removed from MediaWiki core in version 1.18.0 and there is no $wgTexvc in my LocalSettings.php. The extensions installed include:

Math 3.0.0 (ba08a3a)04:38, 1 February 2017

and

SimpleMathJax 0.7.1

Thanks for your help.

Ag3dvr (talkcontribs)

Thank you Bawollf. The javascript console does show useful errors.

JQMIGRATE: Migrate is installed with logging active, version 3.0.1-pre

/extensions/SimpleMathJax/modules/MathJax/MathJax.js?config=TeX-AMS-MML_CHTML&_=1524499368186 Failed to load resource: the server responded with a status of 404 (Not Found)

Notation:1 Uncaught SyntaxError: Unexpected token <

at DOMEval (load.php:1)

at Function.globalEval (load.php:4)

at text script (load.php:130)

at ajaxConvert (load.php:120)

at done (load.php:125)

at XMLHttpRequest.<anonymous> (load.php:129)

I then commented out SimpleMathJax from LocalSettings.php and this seems to get rid of the errors in the javascript console but the wiki looks the same (same red error messages). I am no expert, as you can tell. I may have to move providers to get more help. I have now commented out all math lines except wfLoadExtension( 'Math' ); but with no effect. This math extension remains:

3.0.0 (ba08a3a)04:38, 1 February 2017

Thanks again.

Ciencia Al Poder (talkcontribs)
Ag3dvr (talkcontribs)

You are right. That folder (SimpleMathJax/modules/MathJax/) is empty. I will talk to my provider and see if they can install SimpleMathJax properly. Thank you for your help. It is still odd that math on the wiki worked fine before and it broke without me touching anything. Anyway, thank you, I am very grateful for your help.

Reply to "Help with math rendering"
Andrea.bozzano87 (talkcontribs)

Hi everyone,

for my project, i need that my bots could upload images on my wiki. reading the manual, i found that i can use the Upload API for this purpose. To do so, i do a call for APIs with a post request that i send to my MW installation:

action=upload&filename=myfile.png&url=http://url.of.thefile/myfile.png&token=+\

I'm using content type multipart/form-data because i know, from the manual, that application/x-www-form-urlencoded wouldn't work.

The problem is that, even though my Bot is allowed from user group rights to upload files, i cant upload files with it. What did i miss?

Any suggestion would be helpful, thanks for your time and happy development!

Reply to "Bots Uploading images on MW Projects"
84.107.176.74 (talkcontribs)

I can not add global users to my privat wiki.

In "Global accounts list" the member is mentioned, but at "User rights" I can not find him. How can I add the member? Sometimes it succeeds but that seems coincidence.

Reply to "Adding members to my privat wiki"
Dog1994 (talkcontribs)

I substitute my infoboxes because that's easier for me.

I can't for the life of me figure out how to change the alignment without basically creating an entirely new infobox to call upon, which would be super annoying.

I've tried adding |align        ="left" and |style =leftto the infobox afterward and nothing changes. What can I do? i also do not want to edit common.css

Ciencia Al Poder (talkcontribs)
Dog1994 (talkcontribs)

they're not copied, no. completely built from scratch.

I have a CSS override so that they all align=right but I want some of them to align=left, and that's my problem.

AhmadF.Cheema (talkcontribs)

If you are using local CSS overrides, than I assume those CSS rules are implemented on-to the Infobox through a class. In which case, can't just two separate classes be made, one for left-alignment and the other for right-alignment?

Dog1994 (talkcontribs)

They can, how would I accomplish that?

To make it clear: i have one page that I am attempting to use multiple infoboxes on and it looks awful with all of them on the same alignment. I want to change it so that every other box is aligned left.

Reply to "substitution alignment"

Is SemanticWiki the only way to get Topic Tagging?

6
Johnywhy (talkcontribs)

We want to tag our articles (topic-tags, not revision-tags).

And then display "Related Articles", based on those tags.

This article describes a method using SemanticWiki,

https://clkoerner.com/2012/08/28/use-semantic-mediawiki-semantic-forms-to-create-a-folksonomy-for-tagging-related-pages/

but that seems a heavy solution, since we don't need any other SemanticWiki features.

Any simpler or, preferably, native method?

Can't use Categories, as we're already using Categories as Categories, for organizing and TOC.

Thx

Ciencia Al Poder (talkcontribs)

Categories is the way to go if you don't want SMW. This is exactly the purpose of categories, group similar pages.

Johnywhy (talkcontribs)

We consider Categories and Tags to be different concepts. That Folksonomy article agrees.

Eg:

  • Category is Fruit.
  • Title is Oranges.
  • Tags are citrus, segmented, juicy, vitamin C, cold prevention, breakfast

Or

  • Category: Books
  • Title: Cien Años de Soledad
  • Tags: Spanish, surrealism, Colombia, magical realism, Latin American

We use Category as a hierarchical organizing structure. We want articles to appear in only one Category in TOC, but articles can have multiple tags. Tags are non-hierarchical, and can apply across different Categories. We really want tags independent of Categories.

Bawolff (talkcontribs)

Then create a prefix to the category name, to distinguish between your "real" categories and "tags". E.g. have "Category:Tag:Spanish"

The differences you cite between tags and categories is all in how you use the feature, and none in how the feature is actually implemented. If it makes you feel better, you can even do $wgExtraNamespaces[NS_CATEGORY] = 'Tag'; $wgExtraNamespaces[NS_CATEGORY_TALK] = "Tag_talk"; and then change the pages MediaWiki:nstab-category , MediaWiki:categories, MediaWiki:pagecategories, etc to use the word "Tag".

Johnywhy (talkcontribs)
> "create a prefix to the category name", E.g. have "Category:Tag:Spanish"

Thx, but that seems like a complicated, non-intuitive workaround.

Tree: This will put all the tags into the CategoryTree. We don't want the tags in the CategoryTree.

Entry: We want to apply Tags by simply entering "Spanish" in a "Tags" box. Don't want to enter "Category:Tag:Spanish".

Cross-Reference: We want a given tag to apply to multiple Categories. Then show "Related pages" based on Tags. I don't see how to do that with this method.

Subcategories: Maybe there's a way to do this with sub-categories.

Pro: Tree: CategoryTree has "depth" parameter, which would hide that subcategory "tags" which is good.

Con: No, subcategories would be difficult, if we want to allow same tag for multiple categories. That would require adding same subcategory to multiiple categories.

Con: I don't see how to cross-reference subcategories across different categories (to show "Related Pages" at bottom of every page, based on subcategory).

> "do $wgExtraNamespaces[NS_CATEGORY] = 'Tag'; $wgExtraNamespaces[NS_CATEGORY_TALK] = "Tag_talk"; and then change the pages MediaWiki:nstab-category , MediaWiki:categories, MediaWiki:pagecategories, etc to use the word "Tag".

That throws out Categories, and uses the word "Tag" instead of "Category". Correct? We don't want to throw out the word Category. We want both tags and categories.

Extension:RelatedArticles might help.

thx

Bawolff (talkcontribs)

Your description still sounds like you basically just want the category system

  • tree: just make sure the tags dont have the same parent as your "real" categories
  • entry: just make a page named Template:Tag containing <includeonly>[[category:Tag:{{{1}}}]]</includeonly>. Then you can simply add pages to tags by doing {{tag|Spanish}}
  • cross-reference: if you mean you want to add a category to a tag to imply that all members in that category should also be in that tag (for the purposes of Special:Recentchangeslinked) thats a little harder. There are some work arounds with extensions that do "deep category intersection". Some people also work around it by using templates to add things to categories that automatically specify the right additional tags, but there really arent great solutions to this. Basically for this method "real categories" and "tags" are entirely separate, and if you want all pages in a specific category to have a specific tag you have to tag them all individually.

Re subcategory - Im kind of confused by this-if you were tagging a category, it would be the parent of the category, not the child (subcategory). CategoryTree would ignore it as it doesnt look at backedges i the category graph.

Re tags namespace: yeah, thats just renaming category to tag.

Reply to "Is SemanticWiki the only way to get Topic Tagging?"

How to apply wgNamespaceContentModels to ALL namespaces in a single statement?

5
Johnywhy (talkcontribs)

Flow manual says i must apply the following to localsettings.php, for each namespace.

$wgNamespaceContentModels[NS_TALK] = 'flow-board';
$wgNamespaceContentModels[NS_USER_TALK] = 'flow-board';
# Do not reassign the global ($wgNamespaceContentModels =)

Extension:StructuredDiscussions#Enabling or disabling StructuredDiscussions

How can i apply wgNamespaceContentModels to ALL namespaces in a single statement?

星耀晨曦 (talkcontribs)

To enable Flow for all namespaces is a bad idea. If you want to use your wiki as a social site:

$needFlow = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15];
foreach ( array_keys( $wgExtraNamespaces ) as $key ) {
    $needFlow[] = $key;
}
foreach ( $needFlow as $value ) {
    $wgNamespaceContentModels[$value] = 'flow-board';
}

put it to the bottom of your LocalSettings.php.

Johnywhy (talkcontribs)

Thx!

> To enable Flow for all namespaces is a bad idea.

Why?

Bawolff (talkcontribs)

Typically people dont want flow on all namespaces as usually some namespaces are for content and others are for talking. But its really up to you.

Bawolff (talkcontribs)

A shorter version of that is

$wgNamespaceContentModels = array_fill( 0, 16, true );

[That said, 星耀晨曦's is a better solution because it takes extra namespaces into account and is less hacky. Although you can do the same with array_fill by replacing 16 with 2000 (since invalid namespaces are ignored)]

Reply to "How to apply wgNamespaceContentModels to ALL namespaces in a single statement?"
67.131.21.67 (talkcontribs)

Hey,

Whenever anyone on our private wiki tries to sign in, it redirects to the index.php page and then when you try to do anything else it redirects to another login page. I already verified that our $wgServer variable is set properly and I don't know what else to do.

It's really annoying, hopefully there's a fix.

Cheers o/

Ciencia Al Poder (talkcontribs)

Are you using "short" or "pretty" URLs? I mean viewing articles have a different URL structure than when editing (/wiki/ vs /index.php or similar). Because cookie path may be the problem here. See Manual:$wgCookiePath

67.131.21.67 (talkcontribs)

Oops, forgot to use the reply button. But, for a little more information, when you visit wiki.domain.com it goes to wiki.domain.com/index.php. If you go to domain.com/wiki/index.php it still works the same.

67.131.21.67 (talkcontribs)

Hi, I'm a little confused on what you mean. Our Wiki is on wiki.domain.com, but the directory is on /wiki. When I tried setting $wgCookiePath, the Wiki didn't load at all.

Ciencia Al Poder (talkcontribs)

If the wiki doesn't load at all, you made a typo when adding that configuration.

Try:

$wgCookiePath = '/';

Still, this is the default value and should work for you unless you changed it.

Reply to "Private Wiki Requires Two Logins"

Extension:CategoryTree Not Updating with Cache Enabled

5
Johnywhy (talkcontribs)

Not finding a solution here.

i've tried purging the page with Extension:Purge, and re-entering the source. Neither makes the tree update.

I'm able to get refresh by turning off caching, and then re-enter the page-source:

$wgEnableParserCache = false; 
$wgCachePages = false;

However, won't the site performance suffer without caching?

Johnywhy (talkcontribs)

Update: Making a little progress. The following settings are in my LocalSettings.php:

# not sure why tree is not refreshing, if set to NONE! Was default:
$wgMainCacheType = CACHE_NONE;
$wgMemCachedServers = [];

# unclear why this is commented by default
# $wgCacheDirectory = "$IP/cache";

# i installed this
require_once "$IP/extensions/MagicNoCache/MagicNoCache.php";

# i added this to ensure caching. 
$wgEnableParserCache = true; 
$wgCachePages = true;

Then i added the magic word __NOCACHE__ to the page containing the Tree.

I notice that, with above setting, new pages are added to the Tree, but old copy of moved pages stays in Tree! I'm guessing that might be intended as a convenience (?), but without redirect it's just a dead link.

We don't want deleted pages to stay in Tree.

Update: Changed $wgMainCacheType to ANYTHING. Now seeing improved performance on pages, but no change in Tree behavior-- deleted pages still showing.

Ciencia Al Poder (talkcontribs)
Bawolff (talkcontribs)

Just set $wgCategoryTreeDisableCache = true;

This will cause the parser cache to be disabled on all pages that use categorytree (You can still potentially have browser cache or file cache (if you enable file cache, its not on by default) giving stale results, but that's much less likely).

Johnywhy (talkcontribs)

i set $wgCategoryTreeDisableCache = true;

A little progress:

Tree is no longer showing deleted pages.

But tree is not showing moved pages. The old version of the moved page is in the tree, not the new version. (i moved the page to a different namespace).

API and Special:CategoryTree shows the page (Peaches) has been moved to new namespace (Main) from previous namespace (Draft):

https://gunretort.xyz/index.php/Special:CategoryTree?target=Category%3ADefinitions&mode=all

However, Tree shows the page still in it's old namespace (Draft):

https://gunretort.xyz/index.php/Portal:Table_of_Contents

Reply to "Extension:CategoryTree Not Updating with Cache Enabled"
Analistacavanha (talkcontribs)

I've put the extension https://www.mediawiki.org/wiki/Extension:MobileDetect and it is embedding the texts perfectly, but the images are not scaling.

For the images I use the following:

Are there any other items that should be parameterized in the extension? Or should I change the inclusion of the images?

Reply to "MobileDetect with images"