Project:Support desk

Jump to: navigation, search

About this board

Edit description
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, Q&A 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".
By clicking "Add topic", you agree to our Terms of Use and agree to irrevocably release your text under the CC BY-SA 3.0 License and GFDL

Ads defined in LocalSettings.php - means to limit them to NS_MAIN only?

5
Balerion300 (talkcontribs)

As the title says! I'm trying to figure out if there's a way, within Localsettings.php, to wrap ad tags/scripts with code that indicates they should only execute on pages within the Main namespace. Any suggestions that doesn't require an extension?

Ciencia Al Poder (talkcontribs)

You should tell us more details about what code/extension are you using for this. If you're doing the right thing, you'd be using a hook that receives a Title object which you can use to get the namespace of the page.

Balerion300 (talkcontribs)

I am using hooks, but I'm not sure how to get the namespace from that point. We use the SiteNoticeAfter, SkinBuildSidebar, and the SkinAfterContent hooks -- how would I work a check on namespace into that?

76.68.139.34 (talkcontribs)

Don't use hooks associated with the skin. Use hooks associated with page rendering (see Manual::hooks for details). Then do something like:

if($title->getNamespace == NS_MAIN){

$out->addModules('myscript');

}

76.68.139.34 (talkcontribs)

maybe try this hook:

Manual:Hooks/BeforePageDisplay

public static function onBeforePageDisplay( OutputPage &$out, Skin &$skin ) {

if($out->getTitle()->getNamespace() == NS_MAIN){

$out->addModules('mymodule');

}

}

You probably also don't want the module to be loaded for certain actions... so you'll have to make sure to do this only for viewing the article.

Reply to "Ads defined in LocalSettings.php - means to limit them to NS_MAIN only?"

Pages load, flash once then are replaced by white screen and constant page load activity - Chrome and Edge, not Firefox or Safari

4
Summary by Epimetreus

Disabling the wikEd editor, which I had enabled via a script in Mediawiki:Common.js, ended the problem.

2607:FB90:138B:B03A:F4DE:FD4F:B03C:3FE9 (talkcontribs)

In Chrome and Edge, my wiki (Mediawiki 1.28.2, PHP 5.6.29, MySQL 5.6.32-78.1-log) has a display problem. On page load, the page is briefly visible, then it flashes to a white screen, and the page continues loading activity indefinitely.

This problem is not occurring in Firefox or in iOS Safari, both of which display the pages normally.

I've added the error logging code to my LocalSettings.php, but no error messages appear. I changed $wgMemoryLimit to 64M, just in case 50 wasn't enough.

I'd appreciate any help. Unfortunately, it's a private wiki, requiring accounts and logins, so I'd rather not post the address. If it's absolutely necessary, I could establish a troubleshooting account and email login details, though.

Thanks for any help you can provide. Please let me know if I haven't provided enough information to diagnose the problem.

Ciencia Al Poder (talkcontribs)

This is usually caused by a JavaScript code using document.write. Locate where it comes from and try to remove the extension/gadget/custom script or replace it with a working one.

Hitting F12 on the browser may give you a hint if you look at the console.

Epimetreus (talkcontribs)

You were correct; using browser dev tools did locate the problem, which was with the wikEd editor. I disabled it and the problem seems to have stopped in Chrome. Haven't had a chance to test it with Edge yet, but I will post here if for some reason Edge still has the problem. Otherwise, consider this resolved. Thanks!

MacFan4000 (talkcontribs)

Were you trying to enable WikiEditor for everyone by default?

Reply to "Pages load, flash once then are replaced by white screen and constant page load activity - Chrome and Edge, not Firefox or Safari"

How to add "this page has been accessed ... times"

2
BlagovestPeshev (talkcontribs)

Hi Team,

I cannot find what variable I should add in LocalSettings.php in order to add the statistics for a page to be displayed in the footer of the page.

Osnard (talkcontribs)

Page hit count got removed from MediaWiki. have a look at Extension:HitCounters

Reply to "How to add "this page has been accessed ... times""

Cannot connect to an NAS database server

2
152.115.56.199 (talkcontribs)

Hi, I'm trying to create a wiki and in the setup I want to connect it to a database that is on a Synology NAS with MariaDB and phpMyAdmin installed. However, when I enter the information for the database if gives me the following message:

DB connection error: MySQL server has gone away (xxx.xxx.xxx.xxx:xxxx).

Check the host, username and password and try again.

I tried this both with and without the port reserved for the NAS and still nothing.

What should I do in order to get the connection to the database working?

152.115.56.199 (talkcontribs)

Another thing: I can create a wiki directly on the NAS using the MediaWiki package and it allows me to use a local database on the NAS and I can set it up successfully, however when I try to log onto the wiki from the NAS it prompts me to go one page back, reload, and try to log in again.

If anyone has a solution, either for this problem or the one mentioned earlier, please let me know.

Reply to "Cannot connect to an NAS database server"

Changing font size of text field on editing page

2
Joelwatsonfish (talkcontribs)

First, I apologize if this is the wrong place to post this, or if it has been answered already. I did spend some time searching, but couldn't find an answer (though admittedly, I'm not quite sure of the terms to search for).

I'm running Media Wiki, and I have several contributors who have complained that the font size of the text field (when editing a wiki page) is too small, so I'd like to increase the default font size so it's easier for them to read what they are typing. I've figured out how to increase the default font size of displayed pages by adding the following code to the MediaWiki:Common.css file, but it doesn't affect the text fields for page editing. I would very much appreciate some help.


/* jwf--Make text larger */

#mw-content-text {

  font-size: 1.000em;

}


/* jwf--Make text larger */

#bodyContent {

  font-size: 1.000em;

}

Ciencia Al Poder (talkcontribs)
/* Edit textarea */
#wpTextbox1 {
    font-size: 1.5em;
}

/* Edit summary */
#wpSummary {
    font-size: 1.5em;
}
Reply to "Changing font size of text field on editing page"
Kairo5590 (talkcontribs)

Hello guys,

I have a self written Multilanguage extension for MediaWiki using <country> tag for selective text display depending from user language settings. It interacts with the LanguageSelector which I installed in the version for my MediaWiki 1.23.

The extension is working fine, but I get some weird output like..

UNIQ64ea7d5fb1d3858c-country-00000000-QINU on my page.

Here the Extension Function:

function wfArticleSectionCheck() {

        global $wgParser;

        $wgParser->setHook("country","wfRenderArticleSectionCheck");

        }

function wfRenderArticleSectionCheck($input, $args, $parser) {

global $wgLanguageCode, $wgLang;

$lan = $wgLang->getCode();

if(strpos($args['lan'], $lan) !== false) {

$output = $parser->recursiveTagParse($input);

return $output;

}

}

Here is my setup..

MediaWiki 1.23

PHP 5.3.3

MySQL 5.1.67

Thank you.

Reply to "Extension outputting UNIQ-QINU"

Technical assistance to upgrade our WIKI.

2
Palanimunuswamy1 (talkcontribs)

We are running version 1.26 and want to upgrade to 1.27 or 1.28. We are in transition and have no body to upgrade the WIKI. We are looking for somebody to come and upgrade. Please let us know

Malyacko (talkcontribs)

See Professional development and consulting

Reply to "Technical assistance to upgrade our WIKI."

Some of Bizagi's Thumbnails didn't display on Mediawiki

2
Pmt-it (talkcontribs)

Hello everyone,

When I export my Bizagi's procedure to MediaWiki, some of Bizagi's Thumbnails display and some other not display and there's an error message instead of a thumbnail on Mediawiki.

I read a blog that dealt with image size. It said that if the image size was important, mediawiki could not resize it to become Thumbnails, but a setting exist to fix it.

My question is, what's the setting to fix my problem please?

Malyacko (talkcontribs)

What is Bizagi? What is "my Bizagi's procedure"? And if there is an error message, what is the error message? And which MediaWiki version is used? Have you checked Manual:Errors and symptoms#Image Thumbnails not working and.2For appearing already?

Reply to "Some of Bizagi's Thumbnails didn't display on Mediawiki"

What is hyperlink convert function name

2
Chan15tw (talkcontribs)

I wrote a parser to detect the <c link="abc"/> (for example) tag and want to convert it like [[abc|abc]], but when I return this it become a string not a hyperlink like <a href="xxx/index.php/abc" title="abc">abc</a>, any internal method can do it?

Osnard (talkcontribs)

You will need to parse your wiki text. See Manual:Tag extensions#How do I render wikitext in my extension.3F

Reply to "What is hyperlink convert function name"

Need longer image names in categories

11
Timeshifter (talkcontribs)

I don't know why longer image filenames in categories is not a default setting in the Mediawiki software. At least a little bit longer. It is very short now. Please see this discussion at a Shoutwiki forum:

*http://www.shoutwiki.com/wiki/Forum:Long_image_names_in_categories

Ciencia Al Poder (talkcontribs)

I'd also like this. You can probably start a discussion in Mailing lists and/or open a bugreport to add a new config setting to control the length of the image name in galleries.

Timeshifter (talkcontribs)

I wish all bug reports, config setting discussions, and feature requests happened mainly on Mediawiki talk pages. Most people don't like remembering the intricacies of other systems such as mailing lists, Phabricator, Flow, etc..

If you don't mind maybe you can start a discussion on those forums. I just don't use them often enough to feel familiar with them.

This comment was hidden by 69.61.172.79 (history)
This comment was hidden by 69.61.172.79 (history)
69.61.172.79 (talkcontribs)

This is User:Timeshifter. I am logged in, but my user name is not showing up automatically.

User:Ciencia Al Poder. I started a feature request on Bugzilla:

* https://phabricator.wikimedia.org/T166989

Default MediaWiki setting for length of filenames in categories is 22 characters. Then the ellipsis (...) shows up.

You have to go outside Wikipedia and the Commons to see this. For example look at "File:Under contruction icon-yellow.svg" filename in this category on the Shoutwiki Hub user image category.

* http://www.shoutwiki.com/wiki/Category:User_images

It shows up as "Under contruction icon..."

That is a total of 22 characters and spaces before the ellipsis shows up. That is way too short. We need a longer default length, and/or a config setting to choose a longer length.

Wikipedia and Commons have much longer filenames in categories. See:

* https://en.wikipedia.org/wiki/Category:Wikipedia_non-free_files_with_valid_backlink

* https://commons.wikimedia.org/wiki/Category:Women%27s_March_on_Washington

Commons has a default gadget setting for longer filenames. I don't know how Wikipedia does it. It doesn't matter whether one is logged in or not. Both Wikipedia and the Commons have long filenames in categories.

See discussion here:

* https://www.mediawiki.org/wiki/Topic:Tricrswpl7rhv4o5

* http://www.shoutwiki.com/wiki/Forum:Long_image_names_in_categories

Ciencia Al Poder (talkcontribs)

Ah, I haven't checked the details of how it was implemented. I though the text was being cut at a fixed character length, but it's not. It's automatically cut to fit one line with CSS. This is easily solvable with custom CSS and not worth another configuration variable.

In fact it was fixed to 25 characters in $wgGalleryOptions before 1.28 but now it can be overridden easily with CSS.

Timeshifter (talkcontribs)

User:Ciencia Al Poder. I copied the Commons gadget CSS to a Shoutwiki wiki to fix the problem.

But that is not a good solution because it may not work longterm. The underlying CSS in the mediawiki software may change. This happened with a previous fix when the solution was in custom JS. The underlying software changed and the custom JS no longer worked in allowing longer image filenames to be visible in categories.

It may not merit a configuration variable if the default setting is long enough. For example; 100 characters as a default setting.

This comment was hidden by Ciencia Al Poder (history)
Ciencia Al Poder (talkcontribs)

If you upgrade MediaWiki, there are many other changes to worry about, I don't think that a "not-so probable change" in this CSS code in the future would give you more headaches than a configuration variable that only sysadmins can change affecting the whole wiki.

Timeshifter (talkcontribs)

User:Ciencia Al Poder. Why is this crappy talk system still being used on Mediawiki.org? :)

There are tens of thousands of wikis outside Wikimedia. It shouldn't be necessary for the admins on all these wikis to have to figure out this stuff.

The simpler solution is to have a default length of 100 characters. See: https://en.wikipedia.org/wiki/Category:Wikipedia_non-free_files_with_valid_backlink

Reply to "Need longer image names in categories"