Jump to content

Project:Support desk/Flow/2018/04

Add topic
From mediawiki.org
Latest comment: 3 years ago by Michael Z Freeman in topic Why many wikis running a outdated version?
This page is an archive.
Please ask questions on the current support desk.


How to get "Add topic", "Start a new topic", or "Add Section" on Content Page (not Talk), Without VisualEditor?

How to get "Add topic", "Start a new topic", or "Add Section" on Content Page (not Talk), Without VisualEditor?

thx Johnywhy (talk) 00:05, 1 April 2018 (UTC)

Use __NEWSECTIONLINK__ (Help:Magic words) Ciencia Al Poder (talk) 09:21, 3 April 2018 (UTC)
Great! How to get that into all page headers?
i'm using Extension:Header Footer, but that just puts the "Add topic" button to the top of the header-page, instead of all pages.
is there a way? Put into skin? Johnywhy (talk) 16:20, 4 April 2018 (UTC)
You may add it with the Manual:Hooks/SkinTemplateNavigation hook Ciencia Al Poder (talk) 19:23, 4 April 2018 (UTC)

TinyMCE infinite loop error and freeze

I have tried several Mediawiki versions, from 1.26.4 to 1.31-alpha and in every version i get infinite loop error when i go to "Show preview" and it freezes when i go to "Save page".... Is there anything i can do about that? Darkwarrior92 (talk) 15:20, 1 April 2018 (UTC)

== What is

Tag? ==

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


This page says "This page is currently a draft." It's source contains
{{Draft}}
How is this done? Johnywhy (talk) 19:39, 1 April 2018 (UTC)
It is transcluding/rendering the page Template:Draft. AhmadF.Cheema (talk) 20:05, 1 April 2018 (UTC)
It appears the Template contains nothing except the "under-construction" image, and the "This page is a draft" message, correct?
Template:Draft
And the transclude has to be manually added and removed, right? It's not automatically displayed based on namespace, correct? Johnywhy (talk) 22:03, 1 April 2018 (UTC)
That is what the template appears to the reader, but there are other behind-the-scenes things, such as the use of Template:Mbox, too.
To automatically add the template a bot will have to be used, or a create page button which pre-fills some of the content on the page, or one of those boiler plate extensions, which based on some rules pre-fill content on the page. AhmadF.Cheema (talk) 04:31, 2 April 2018 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Preventing articles from appearing in maintenance pages

Is there a way to have certain pages not displayed in maintenance special pages? For example, to prevent an uncategorized page from appearing in Special:UncategorizedPages. Or a page with some broken files to not appear in Category:Pages with broken files links. Thanks! 2001:16B8:2B53:3000:49C0:7AD:DF9F:9D2B (talk) 21:11, 1 April 2018 (UTC)

Bug? New Page is Visible Before Approval by ApprovedRevs

To replicate problem:

  1. Login as user without `approverevisions` permission
  2. Create a new page. Enter some random text. Save the new page.
  3. Log out.
  4. Return to new page.
  5. View page history: the ApprovedRevs link says "approve", indicating the page has not yet been approved.
  6. Switch to `Read` mode on the page.

Expected result: The page contents should not be visible, because it has not be approved yet.

Actual result: The page contents are visible.

@Yaron Koren Johnywhy (talk) 22:38, 1 April 2018 (UTC)

Extension:Approved_Revs#Displaying_unapproved_pages_as_blank wargo (talk) 09:37, 2 April 2018 (UTC)
you're right, i forgot about that config. 
i'm exploring if a mod involving Draft namespace could be done simply:
- User manually creates new page in Draft namespace.
- On first rev approval, auto-move page to "Main" namespace. Johnywhy (talk) 15:59, 2 April 2018 (UTC)

bad CSS cuts off descenders

I'm a routine user of ArchLinux's and openSUSE's wikis. For many web sites I routinely use, I create user styles to override common idiotic site styles, e.g. non-default space-wasting leading. Font designers know how to design their fonts for optimal use. Extra leading is entirely unnecessary when appropriate line lengths, font size and contrast are declared.

Mediawiki's load.php includes the following:

.diff-addedline .diffchange, .diff-deletedline .diffchange {padding: 0.25em 0;}

The result of this rule causes descenders on diff pages where it is applied to be cut off in all Gecko versions tested, among which RV17, RV52 and RV59, on desktops using 108 DPI and 120 DPI, and browser default font settings of 18px and 20px. Thus with my line-height override to use *normal* leading, I found that an override to the above declaration that reduces the padding to 0 enables seeing all descenders. Mrmazda (talk) 08:10, 2 April 2018 (UTC)

Get wiki's default timezone in JS?

I need to get the wiki's default timezone offset in order to correct the timestamp which the API returns, which for some reason ignores the wiki's timezone and is always in UTC, unlike magic words like CURRENTTIMESTAMP which use the wiki's timezone.

I know the offset is included in the user.defaults module, but there seems to be no way to access it. I can only retrieve the user's options, which does not include the default value if the user has changed the offset from the default. So far the only way seems to make another API request to the siteinfo API, which is annoying when the information is already included in the page. 110.149.143.35 (talk) 11:47, 2 April 2018 (UTC)

Note, you can combine the two api requests into one if your initial api request is using action=query, as action=query allows you to specifiy both the meta=siteinfo and prop=whatever at the same time.
I don't think there's any other way to fetch this data. FWIW, CURRENTTIMESTAMP is supposed to be always UTC (vs LOCALTIMESTAMP which is server timezone) Bawolff (talk) 07:28, 3 April 2018 (UTC)
Ah sorry I got mixed up with the magic words, it is REVISIONTIMESTAMP that uses the server timezone. Good tip about combining the requests, always forget about that, thanks. Still would be nice not to have to download all that extra data. 110.149.143.35 (talk) 03:55, 4 April 2018 (UTC)
You could place something like the following in LocalSettings.php (untested):
$wgHooks['ResourceLoaderGetConfigVars'][] = function ( &$vars ) {
  global $wgLocalTZoffset;
  $vars['wgLocalTZoffset'] = $wgLocalTZoffset;
};
And then it will be available as mw.config.get( 'wgLocalTZoffset' );. Bawolff (talk) 17:08, 4 April 2018 (UTC)

[SOLVED] images 404

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


Hi, I moved MW from root (/) to (/w) directory and upgrade from 1.20 to 1.30 Html pages are normally opened http://montibus.org/wiki/ old wiki url: http://wiki.mountainclub.ru/

My /.htaccess config

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^wiki/(.*)$ w/index.php?title=$1 [PT,L,QSA]
RewriteRule ^wiki/*$ w/index.php [L,QSA]
RewriteRule ^wiki$ w/index.php [L,QSA]

My /w/images/.htaccess config

# Protect against bug T30235
<IfModule rewrite_module>
  RewriteEngine On
  RewriteOptions inherit
  RewriteCond %{QUERY_STRING} \.[^\\/:*?\x22<>|%]+(#|\?|$) [nocase]
  RewriteRule . - [forbidden]
  # Fix for bug T64289
  Options +FollowSymLinks


</IfModule>

Part of my /w/LocalSettings.php

$wgScriptPath = "/w";
$wgArticlePath = "/wiki/$1";

What's wrong? 2A02:6B8:0:3903:51C7:D5DE:9F7B:2E62 (talk) 13:24, 2 April 2018 (UTC)

There problem, that images not opened,
200 Normal: http://wiki.mountainclub.ru/images/8/89/Андрей_Антонов.jpg
404 Not Found: http://montibus.org/w/images/8/89/Андрей_Антонов.jpg EAndreyF (talk) 14:24, 2 April 2018 (UTC)
SOLVED. There were file permissions error. 620 change to 644 EAndreyF (talk) 04:51, 3 April 2018 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Quickly Share CSS to Community?

What's best simple way share with the community, my preferred CSS tweak for this site?

#p-personal{
    position:fixed;
    background: rgb(255,255,255);
}

i assume would work on any MW site.

Keeps notification bar on top when scrolling.

https://preview.ibb.co/jOG8S7/fix_mw_bar.png

(how to embed images here?) Johnywhy (talk) 13:28, 2 April 2018 (UTC)

https://userstyles.org/ ? Ciencia Al Poder (talk) 09:16, 3 April 2018 (UTC)
thx, but no luck posting css there. userstyles.org says my "Style code looks unintentionally global. Please read https://github.com/JasonBarnabe/stylish/wiki/Preventing-global-styles"
They say to "export" from chrome to get domain-specific code, but i don't see how to do that in chrome.
They also say i can
 include the following code anywhere in your style:
/* i really want this to be global */
I tried that, but that fails for me. Too much trouble.
i was hoping there might be a place to share css on mediawiki.org, where mediawikians are most likely to find it.
thx Johnywhy (talk) 17:16, 4 April 2018 (UTC)
Save this CSS on the page User:Yourname/verycoolstyle.css and use URL like /w/index.php?title=User:Yourname/verycoolstyle.css&action=raw&ctype=text/css to load it.
Then users can add the following to their vector.js:
mw.loader.load( '/w/index.php?title=User:Yourname/verycoolstyle.css&action=raw&ctype=text/css', 'text/css' ); Edward Chernenko (talk) 21:31, 6 April 2018 (UTC)
User:Johnywhy/floating-toolbar.css
I noticed the page is syntax-highlighted as CSS. Will any page ending in ".css" be interpreted as css by mediawiki?
To round out the topic:
  • is there a mediawiki community CSS registry of some sort?
  • Or a Special: page that lists all user-css pages?
  • Or: Since I can do the following to get all user pages....
{{Special:PrefixIndex/User:}}
....how can i get "User:*.css" pages?
thx! Johnywhy (talk) 01:05, 7 April 2018 (UTC)
There's no way to do what you're requesting here. userstyles.org is the place for that. People come here to find documentation, not user styles. Ciencia Al Poder (talk) 10:45, 8 April 2018 (UTC)
Ok, fair enuf.
But on my own wiki, or some other wiki, how to view all users' CSS pages?
  • a Special: page that lists all user-css pages?
  • Or something like this?
{{Special:PrefixIndex/User:*.css}}
thx Johnywhy (talk) 12:43, 8 April 2018 (UTC)
Maybe with Extension:DynamicPageList (third-party) Ciencia Al Poder (talk) 13:17, 8 April 2018 (UTC)

How to change meta keywords

Is it possible to add, or change HTML meta keywords on pages? NeedAGoodUsername (talk) 15:56, 2 April 2018 (UTC)

See Project:Support desk/Flow/2015/12#h-How_do_I_add_<meta>_tags_to_the_<head>_for_all_pages?-2015-12-12T02:39:00.000Z or Extension:Add HTML Meta and Title Malyacko (talk) 09:09, 4 April 2018 (UTC)

Can I update a wiki as a bureaucrat, or do I need access to the actual server installation?

As I understand it, to update a wiki I need access to the actual server installation (not physically, I can connect to its cPanel or FTP in or whatever), right? I can't just update it as a bureaucrat? Banaticus (talk) 19:35, 2 April 2018 (UTC)

Yes. At the very minimum you need ftp access (To replace the files). Having ssh access is even better. Bawolff (talk) 07:15, 3 April 2018 (UTC)

How to Hardcode a Namespace in Inputbox Create Function?

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


Extension:InputBox provides a GUI to create new pages, but pages are created in the default namespace.

Extension talk:InputBox/Archive 2/Flow export#h-Namespaces_for_create_form-2016-04-22T16:09:00.000Z offers a mod for a namespace dropdown-picker. (not sure this mod is compatible with current releases of MW and InputBox).

But, how to hardcode the target namespace?

thx Johnywhy (talk) 21:21, 2 April 2018 (UTC)

Use prefix= Ciencia Al Poder (talk) 09:15, 3 April 2018 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Necessity to install install Visual C++ Redistributable for the Visual Studio 2015

Hello.

We currently have on our server the Wiki version 1.26.0 and PHP version 5.6.26 been installed.

Based on your instruction available on Manual:Upgrading it looks like we will do an upgrade to Wiki 1.30.0 and PHP v.7.1.15 or more recent.

I know that that our current PHP 5.6.26 uses Visual C++ Redistributable for the Visual Studio 2011, and new PHP 7.1.x requires to install Visual C++ Redistributable for the Visual Studio 2015.

QUESTION: Should I install on our wiki server the Visual C++ Redistributable for the Visual Studio 2015 first before downloading MediaWiki tarball or will it re required on the step by running the command php update.php, or will it not be required at all?

Please let us know. Thank you! Alex 198.232.184.254 (talk) 23:33, 2 April 2018 (UTC)

So first of all, MediaWiki 1.30 only requires PHP 5.5.9. Thus 5.6.26 is new enough for MediaWiki 1.30, so you do not have to upgrade PHP
Second, You would only need visual studio if you were compiling PHP by hand. Which would be unusual. Most people get precompiled php packages via your operating system's package manager (e.g. apt, yum, etc) or they download a precompiled binary from the PHP website. Bawolff (talk) 07:14, 3 April 2018 (UTC)
Hello!
Thank you so much, Bawolff for your comment.
So, am I correct that if we have PHP 5.6.26 and will upgrade our Wiki from 1.26.0 to 1.30.0 then the command php update.php will not upgrade PHP to the newer version, right?
Thank you! 198.232.187.14 (talk) 17:58, 3 April 2018 (UTC)
php update.php doesn't update PHP (or MySQL etc.), only the MediaWiki installation. AhmadF.Cheema (talk) 20:38, 3 April 2018 (UTC)

"Thank" fails on this mobile site

I get:

Send thanks
Do you want to publicly send thanks for this comment?

The postid parameter must be set.

Johnywhy (talk) 12:31, 3 April 2018 (UTC)

If that problem is reproducible feel free to file a bug report with sufficient information to reproduce: How to report a bug Malyacko (talk) 12:44, 4 April 2018 (UTC)
https://phabricator.wikimedia.org/T191442 Johnywhy (talk) 16:39, 4 April 2018 (UTC)

How to limit who can add a category?

I would like only bureaucrats and administrators the ability to add a category. Is this possible. i would assume so Jamesghansen (talk) 22:11, 3 April 2018 (UTC)

You could probably use abuse filters to prevent people from adding particular categories to a page, but this isn't necessarily the most reliable, and could cause issues with people editing near the category, as it will think they are changing it. 110.149.143.35 (talk) 03:42, 4 April 2018 (UTC)
What should happen if a user adds a template to a page, and that template includes a category?
And what about removing a category from a page? Ciencia Al Poder (talk) 09:29, 4 April 2018 (UTC)

Funny problem regarding special chars such as á and ñ - II

Hi:

I've been experiencing difficulties with a new MW site and I've done everything at my reach to solve the situation.

I have a 1.29 installation facing a lot of problems with collation. I've installed several times trying different combinations (e.g. binary /utf8, etc) but special characters are not working at all (accented ones such as á, é and others like "ñ"). My tech stack (L: 2.6.32-696.23.1.el6.centos.plus.x86_64, A:2.4.18, MySQL:10.0.34-MariaDB, PHP 5.5.32)

I reviewed the charset in DB and it seems ok (utf8_unicode_ci) and db tables are InnoDB/Binary. I've tried utf8_general_ci, swedish and latin but nothing is working.

After several days trying to make it work i did something different: I used ISO-8859-1 (as a test) from the text editor and when clicking on preview the accented words looked fine! (e.g. when I wrote "Observaci&oacute;n" MW showed correctly "Observación" in the main area).

I've been looking around here for suggestions and I've tried most of them. To avoid a corrupted DB, after the changes (charsets / collations / Localsettings, etc) I've re-installed and recreated both the DB and configurations, pretty much with the same results.

So, if you can provide with a solution it'll be much appreciated.

Regards

Rick Rickstrat07 (talk) 00:36, 4 April 2018 (UTC)

Manual:$wgDBTableOptions DEFAULT CHARSET=binary is recommended. However note that changing the default collation of a database doesn't change the collation of the existing tables and columns, you'll need to drop all tables and create from scratch.
If it doesn't work, maybe there's something weird in the server that's sending the page with ISO-8859-1 charset instead of utf-8. Look at the HTTP response headers (use developer tools of your browser, hit F12 and look at the network tab). It should return "content-type: text/html; charset=UTF-8" Ciencia Al Poder (talk) 09:40, 4 April 2018 (UTC)

E-mail problems

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


Hi to all, I have some problems with SMTP on my MediaWiki installation. I installed the pear chain, and configured Localsetting.php, but when I try to send emails (such as at the creation of a new user) the browser remains waiting some tens of seconds and then go on without errors, but I don't receive the mail... Stefano664 (talk) 07:15, 4 April 2018 (UTC)

This is my configuration:
#Configure SMTP
$wgEnableEmail="true";
$wgEnableUserEmail="true";
$wgEmergencyContact="wiki@mydomain.it";
$wgPasswordSender="wiki@mydomain.it";
$wgNoReplyAddress="myname@gmail.com";
$wgSMTP = array(
'host'     => "172.20.1.84",
'IDHost'   => "mydomain.it",
'port'     => 25,
'auth'     => false
);
$wgShowExceptionDetails = true; Stefano664 (talk) 07:17, 4 April 2018 (UTC)
Have you checked the logs of your mail server which you host at 172.20.1.84? Malyacko (talk) 09:02, 4 April 2018 (UTC)
I can't, is out of my control... Stefano664 (talk) 09:16, 4 April 2018 (UTC)
Set up a debug log as explained in Manual:How to debug, then try the same action (for example, send yourself an email from Special:Emailuser), From the logs you may be able to see if there's an error trying to contact the SMTP server. For example, a firewall may be blocking such connections. Ciencia Al Poder (talk) 09:26, 4 April 2018 (UTC)
Thank you. It returns:
>>R&D wiki could not send your confirmation mail. Please check your email address for invalid characters.
>>Mailer returned: Failed to connect to 172.20.1.84:25 [SMTP: Failed to connect socket: Connection timed out (code: -1, response: )]
But from the console of the server that hosts the wiki I can use telnet to connect to the server and send mail via standard SMTP commands...
Stefano Stefano664 (talk) 09:42, 4 April 2018 (UTC)
Solved. I wrote a space into the server address. Now works.
Thanks to all!
Stefano Stefano664 (talk) 09:54, 4 April 2018 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

mediawiki smw-editpage-annotation-enabled editform to large

Hello,

my EditForm is to large and the save button is out of my screen. I must scroll down, to press the button.

After installing SmenaticMediaWiki there is a smw-editpage-annotation-enabled-section in the Firefox DebugConsole, that push the EditForm a little bit down.

I need a option to reduce the size of the editform, OR i need the option to collapsible the smw-editpage-annotation-enabled-section.

Can anyone help me?

I do not know the right section, here or in the extension-page: Extension talk:Semantic MediaWiki/Archive 2/Flow export#h-mediawiki_smw-editpage-annotation-enabled_editform_to_large-2018-04-04T08:21:00.000Z 213.61.254.68 (talk) 08:22, 4 April 2018 (UTC)

disable "editpage-copy-warn" for edit ?

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


Who can I disable the complete editpage-copy-warn-section?

When I cleared the MediaWiki:Copyrightwarning2 Page, I have a big red line in that area, in edit mode. 213.61.254.67 (talk) 09:25, 4 April 2018 (UTC)

That section should have a CSS class or id. Find it inspecting the element in your browser, and add a CSS rule (see Manual:Interface/CSS) to hide it (display:none) Ciencia Al Poder (talk) 09:30, 5 April 2018 (UTC)
Thank you, I need the $wgAllowUserCss setting. Well 213.61.254.67 (talk) 10:12, 5 April 2018 (UTC)
Only if you're going to add the CSS in your user's styles. You can add it to MediaWiki:Common.css and it will affect all users of your wiki Ciencia Al Poder (talk) 19:23, 5 April 2018 (UTC)
I have my own use css, but the changes doesn't affect. After set this setting, it works 213.61.254.68 (talk) 07:44, 6 April 2018 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Fatal Error Call to a member function

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


Hi

I keep getting the below fatal error>

Fatal error: Call to a member function getCode() on null in C:\xampp\htdocs\mediawiki\includes\user\User.php on line 1538

This is line 1538>But cannot see a problem? Can anyone assist?

$defOptLang = $wgContLang->getCode();

Product Version
MediaWiki 1.28.2
PHP 5.6.30 (apache2handler)
MariaDB 10.1.21-MariaDB
Ron Barker (talk) 10:46, 4 April 2018 (UTC)
We'd need a full stacktrace on a supported MediaWiki version - Manual:How to debug
Version 1.28 is unsupported, insecure and has security vulnerabilities - Manual:Upgrading Malyacko (talk) 12:42, 4 April 2018 (UTC)
Thanks but that is far too complicated for me. Anyhow, I have figured it out. It is Malwarebytes protection and it will not allow me to exclude the wiki. It say address not valid, only way it works is by turning it off. Ron Barker (talk) 15:12, 4 April 2018 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

DatabaseBase::factory no viable database extension found for type 'mysql'

Hi,

I have upgraded to Debian 9 Stretch and am unable to access mediawiki.I get the following error:

[4e49bd3d5b498d4b4a69bfea] /mediawiki/index.php/Main_Page MWException from line 612 of /usr/share/mediawiki/includes/db/Database.php: DatabaseBase::factory no viable database extension found for type 'mysql'

Backtrace:

#0 /usr/share/mediawiki/includes/db/loadbalancer/LoadBalancer.php(828): DatabaseBase::factory(string, array)

#1 /usr/share/mediawiki/includes/db/loadbalancer/LoadBalancer.php(681): LoadBalancer->reallyOpenConnection(array, boolean)

#2 /usr/share/mediawiki/includes/db/loadbalancer/LoadBalancer.php(561): LoadBalancer->openConnection(integer, boolean)

#3 /usr/share/mediawiki/includes/GlobalFunctions.php(3155): LoadBalancer->getConnection(integer, array, boolean)

#4 /usr/share/mediawiki/includes/objectcache/SqlBagOStuff.php(165): wfGetDB(integer)

#5 /usr/share/mediawiki/includes/objectcache/SqlBagOStuff.php(247): SqlBagOStuff->getDB(integer)

#6 /usr/share/mediawiki/includes/objectcache/SqlBagOStuff.php(225): SqlBagOStuff->getMulti(array)

#7 /usr/share/mediawiki/includes/objectcache/SqlBagOStuff.php(221): SqlBagOStuff->getWithToken(string, NULL, integer)

#8 /usr/share/mediawiki/includes/libs/objectcache/CachedBagOStuff.php(52): SqlBagOStuff->doGet(string, integer)

#9 /usr/share/mediawiki/includes/libs/objectcache/BagOStuff.php(179): CachedBagOStuff->doGet(string, integer)

#10 /usr/share/mediawiki/includes/session/SessionManager.php(929): BagOStuff->get(string)

#11 /usr/share/mediawiki/includes/session/SessionInfo.php(149): MediaWiki\Session\SessionManager->generateSessionId()

#12 /usr/share/mediawiki/includes/session/SessionProvider.php(175): MediaWiki\Session\SessionInfo->__construct(integer, array)

#13 /usr/share/mediawiki/includes/session/SessionManager.php(261): MediaWiki\Session\SessionProvider->newSessionInfo(NULL)

#14 /usr/share/mediawiki/includes/session/SessionManager.php(235): MediaWiki\Session\SessionManager->getEmptySessionInternal(WebRequest)

#15 /usr/share/mediawiki/includes/session/SessionManager.php(185): MediaWiki\Session\SessionManager->getEmptySession(WebRequest)

#16 /usr/share/mediawiki/includes/WebRequest.php(700): MediaWiki\Session\SessionManager->getSessionForRequest(WebRequest)

#17 /usr/share/mediawiki/includes/session/SessionManager.php(121): WebRequest->getSession()

#18 /usr/share/mediawiki/includes/Setup.php(747): MediaWiki\Session\SessionManager::getGlobalSession()

#19 /usr/share/mediawiki/includes/WebStart.php(137): require_once(string)

#20 /usr/share/mediawiki/index.php(40): require(string)

#21 {main}

PHP version : PHP 7.0.27-0

Please could someone give me pointers to the issue.

Thanks,

Geetika GeetikaCS (talk) 11:34, 4 April 2018 (UTC)

you need to install the php7.0-mysql package https://packages.debian.org/stretch/php7.0-mysql
If it's already installed, you may need to enable it in php.ini. In that case, remember to restart the webserver after editing php.ini Ciencia Al Poder (talk) 09:29, 5 April 2018 (UTC)
Hi,
I have already installed the php-mysql package and enabled it in php.ini
php7.0-mysql is already the newest version (7.0.27-0+deb9u1).
extension=/usr/lib/php/20151012/mysqlnd.so
extension=/usr/lib/php/20151012/mysqli.so
even after these and restarting Apache, I get the below error.
[8f25d88d9d5800b9516be5ab] /mediawiki/ MWException from line 612 of /usr/share/mediawiki/includes/db/Database.php: DatabaseBase::factory no viable database extension found for type 'mysql'
php --ini
PHP Warning:  Module 'mysqlnd' already loaded in Unknown on line 0
PHP Warning:  Module 'mysqli' already loaded in Unknown on line 0
Configuration File (php.ini) Path: /etc/php/7.0/cli
Loaded Configuration File:         /etc/php/7.0/cli/php.ini
Scan for additional .ini files in: /etc/php/7.0/cli/conf.d
Additional .ini files parsed:      /etc/php/7.0/cli/conf.d/10-mysqlnd.ini,
/etc/php/7.0/cli/conf.d/10-opcache.ini,
/etc/php/7.0/cli/conf.d/10-pdo.ini,
/etc/php/7.0/cli/conf.d/15-xml.ini,
/etc/php/7.0/cli/conf.d/20-apcu.ini,
/etc/php/7.0/cli/conf.d/20-apcu_bc.ini,
/etc/php/7.0/cli/conf.d/20-bz2.ini,
/etc/php/7.0/cli/conf.d/20-calendar.ini,
/etc/php/7.0/cli/conf.d/20-ctype.ini,
/etc/php/7.0/cli/conf.d/20-curl.ini,
/etc/php/7.0/cli/conf.d/20-dom.ini,
/etc/php/7.0/cli/conf.d/20-exif.ini,
/etc/php/7.0/cli/conf.d/20-fileinfo.ini,
/etc/php/7.0/cli/conf.d/20-ftp.ini,
/etc/php/7.0/cli/conf.d/20-gd.ini,
/etc/php/7.0/cli/conf.d/20-gettext.ini,
/etc/php/7.0/cli/conf.d/20-iconv.ini,
/etc/php/7.0/cli/conf.d/20-intl.ini,
/etc/php/7.0/cli/conf.d/20-json.ini,
/etc/php/7.0/cli/conf.d/20-mbstring.ini,
/etc/php/7.0/cli/conf.d/20-mysqli.ini,
/etc/php/7.0/cli/conf.d/20-pdo_mysql.ini,
/etc/php/7.0/cli/conf.d/20-phar.ini,
/etc/php/7.0/cli/conf.d/20-posix.ini,
/etc/php/7.0/cli/conf.d/20-readline.ini,
/etc/php/7.0/cli/conf.d/20-shmop.ini,
/etc/php/7.0/cli/conf.d/20-simplexml.ini,
/etc/php/7.0/cli/conf.d/20-sockets.ini,
/etc/php/7.0/cli/conf.d/20-sysvmsg.ini,
/etc/php/7.0/cli/conf.d/20-sysvsem.ini,
/etc/php/7.0/cli/conf.d/20-sysvshm.ini,
/etc/php/7.0/cli/conf.d/20-tokenizer.ini,
/etc/php/7.0/cli/conf.d/20-wddx.ini,
/etc/php/7.0/cli/conf.d/20-xmlreader.ini,
/etc/php/7.0/cli/conf.d/20-xmlwriter.ini,
/etc/php/7.0/cli/conf.d/20-xsl.ini,
/etc/php/7.0/cli/conf.d/20-zip.ini GeetikaCS (talk) 13:23, 5 April 2018 (UTC)
What you're displaying are the enabled modules for the php cli. You must enable it on the web server (it depends if it's php-fpm or mod_php). See Manual:Php.ini Ciencia Al Poder (talk) 21:26, 5 April 2018 (UTC)
please help iam having the same issue here is my log , can someone explain step by step how to do this
[YK1U@oO@6qFjnLoHvurciwAAAAU] /mediawiki/ InvalidArgumentException from line 536 of /opt/rh/httpd24/root/var/www/mediawiki-1.31.0/includes/libs/rdbms/database/Database.php: Wikimedia\Rdbms\Database::getClass no viable database extension found for type 'mysql'
Backtrace:
#0 /opt/rh/httpd24/root/var/www/mediawiki-1.31.0/includes/libs/rdbms/database/Database.php(482): Wikimedia\Rdbms\Database::getClass(string, NULL)
#1 /opt/rh/httpd24/root/var/www/mediawiki-1.31.0/includes/libs/rdbms/loadbalancer/LoadBalancer.php(1013): Wikimedia\Rdbms\Database::attributesFromType(string, NULL)
#2 /opt/rh/httpd24/root/var/www/mediawiki-1.31.0/includes/libs/rdbms/loadbalancer/LoadBalancer.php(697): Wikimedia\Rdbms\LoadBalancer->getServerAttributes(integer)
#3 /opt/rh/httpd24/root/var/www/mediawiki-1.31.0/includes/objectcache/SqlBagOStuff.php(184): Wikimedia\Rdbms\LoadBalancer->getConnection(integer, array, boolean, integer)
#4 /opt/rh/httpd24/root/var/www/mediawiki-1.31.0/includes/objectcache/SqlBagOStuff.php(267): SqlBagOStuff->getDB(integer)
#5 /opt/rh/httpd24/root/var/www/mediawiki-1.31.0/includes/objectcache/SqlBagOStuff.php(245): SqlBagOStuff->getMulti(array)
#6 /opt/rh/httpd24/root/var/www/mediawiki-1.31.0/includes/objectcache/SqlBagOStuff.php(241): SqlBagOStuff->getWithToken(string, NULL, integer)
#7 /opt/rh/httpd24/root/var/www/mediawiki-1.31.0/includes/libs/objectcache/CachedBagOStuff.php(56): SqlBagOStuff->doGet(string, integer)
#8 /opt/rh/httpd24/root/var/www/mediawiki-1.31.0/includes/libs/objectcache/BagOStuff.php(185): CachedBagOStuff->doGet(string, integer)
#9 /opt/rh/httpd24/root/var/www/mediawiki-1.31.0/includes/session/SessionManager.php(550): BagOStuff->get(string)
#10 /opt/rh/httpd24/root/var/www/mediawiki-1.31.0/includes/session/SessionManager.php(507): MediaWiki\Session\SessionManager->loadSessionInfoFromStore(MediaWiki\Session\SessionInfo, WebRequest)
#11 /opt/rh/httpd24/root/var/www/mediawiki-1.31.0/includes/session/SessionManager.php(191): MediaWiki\Session\SessionManager->getSessionInfoForRequest(WebRequest)
#12 /opt/rh/httpd24/root/var/www/mediawiki-1.31.0/includes/WebRequest.php(736): MediaWiki\Session\SessionManager->getSessionForRequest(WebRequest)
#13 /opt/rh/httpd24/root/var/www/mediawiki-1.31.0/includes/session/SessionManager.php(130): WebRequest->getSession()
#14 /opt/rh/httpd24/root/var/www/mediawiki-1.31.0/includes/Setup.php(847): MediaWiki\Session\SessionManager::getGlobalSession()
#15 /opt/rh/httpd24/root/var/www/mediawiki-1.31.0/includes/WebStart.php(88): require_once(string)
#16 /opt/rh/httpd24/root/var/www/mediawiki-1.31.0/index.php(39): require(string)
#17 {main} 204.115.183.4 (talk) 20:48, 25 May 2021 (UTC)

Could not create directory problem

Hello,

when uploading a file I get the error message: Could not create directory "mwstore://local-backend/local-public/8/83".

Permission rights to image folder is 755.

Do you maybe know a solution for it. I am not super advanced in programming, so anything simply described would be greatly appreciated.

Thank you, Klemen 80.110.33.184 (talk) 11:54, 4 April 2018 (UTC)

755 permissions will only allow create files and folders to the owner of that folder. Maybe the owner is not correct.
You can try to set 777 permissions (to folders only! not files), see who's the owner of the new created files/folders, and then reset it back to 755 and change the owner accordingly.
For example, set 777 to folders:
find /path/to/images -type d -exec chmod 777 {} \;
Set 755 permissions to folders:
find /path/to/images -type d -exec chmod 755 {} \;
Change owner
chown -R wikiuser /path/to/images Ciencia Al Poder (talk) 09:27, 5 April 2018 (UTC)
Thank you for your help!
I followed the steps and entered my username instead of wikiuser and it says that the user can't be found. I am probably doing something wrong :) 80.110.33.184 (talk) 15:22, 11 April 2018 (UTC)

Infobox

Does someone know how to install the right floating infobox in the WikiMedia, like this green box on the right side: Extension:Capiunto

I searched everywhere and couldn't find the solution.

Thank you! 80.110.33.184 (talk) 13:05, 4 April 2018 (UTC)

The "right floating infobox" uses Template:Extension. AhmadF.Cheema (talk) 15:22, 4 April 2018 (UTC)
Thank you. I don't really understand this page. Is this a extension I have to install?
I tried to copy the code they asked on the top of the page and nothing happens... 80.110.33.184 (talk) 07:47, 5 April 2018 (UTC)
Manual:Importing Wikipedia infoboxes tutorial Ciencia Al Poder (talk) 09:15, 5 April 2018 (UTC)
Resolved by replacing
.mw-body-content a:link { color: #0000FF; } /* normal unvisited links */
.mw-body-content a:link:active { color: #FF0000; } /* active links */
.mw-body-content a:link.new { color: #FF0000; } /* new links */
.mw-body-content a:link.interwiki { color: #3366BB; } /* interwiki links */
.mw-body-content a:link.external { color: #3366BB; } /* external links */
.mw-body-content a.interwiki:visited { color: #3366BB; }
.mw-body-content a.external:visited { color: #3366BB; }

with

.mw-body-content a:visited { color: #0645AD !IMPORTANT; }
.mw-body-content a.new:link { color: #cc2200 !IMPORTANT; }
.mw-body-content a.new:visited { color: #a55858 !IMPORTANT; }

Hey all. I want to make it so that my external links and interwiki links stay the same color regardless of whether they've been clicked on or not.

I've looked through Help:Link color and this old Support desk topic and came up with the following code to add to my MediaWiki:Common.css page. However, my visited links are still a different color. What am I missing?

.mw-body-content a:link { color: #0000FF; } /* normal unvisited links */
.mw-body-content a:link:active { color: #FF0000; } /* active links */
.mw-body-content a:link.new { color: #FF0000; } /* new links */
.mw-body-content a:link.interwiki { color: #3366BB; } /* interwiki links */
.mw-body-content a:link.external { color: #3366BB; } /* external links */
.mw-body-content a.interwiki:visited { color: #3366BB; }
.mw-body-content a.external:visited { color: #3366BB; }

Ttwinic (talk) 14:18, 4 April 2018 (UTC)

One messy but effective way that I have found to work for achieving this, would be:
a:visited { color: #0645AD !IMPORTANT; }
a.new:link { color: #cc2200 !IMPORTANT; }
a.new:visited { color: #a55858 !IMPORTANT; }
The above rules appear to be enough for visited interwiki links too. AhmadF.Cheema (talk) 14:41, 4 April 2018 (UTC)
Cool! That helps, though I don't yet know enough about CSS to understand how. What's the purpose of the !IMPORTANT part? Ttwinic (talk) 15:04, 4 April 2018 (UTC)
The !IMPORTANT (or !important) part forces the rule to override all other relevant rules. For example, at one place an object is defined in red colour, while at another place it is orange, the CSS rule with the !important will have a higher priority over all other colour definitions.
These should be used sparingly as they can cause much confusion in large projects. AhmadF.Cheema (talk) 15:15, 4 April 2018 (UTC)

Memorializing the lives of a couple who were actively involved in the civil rights movement of the 50s and later as well as the stopping the Vietnam Was

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


The couple is my parents who passed away in 1993 and 1994, Starting in the 1940s they were active in in helping Black people move to their town of Baldwin New York, which was all White. Later, they demonstrated against the Vietnam War. Their most notable accomplishment occurred in 1967-68 when a Black teacher in their high school of all White teachers and all White students was accused by a White female student of sexually molesting her. During those times, one might expect that the outcome would not turn out well for the Black teacher, regardless of whether or not it was true. My parents knew the Black teacher and after confirming that the allegations had to be false, mobilized the community and other teachers in the school to expose the falsehood and save his job. In the end, the accuser admitted that she made it all up in an attempt to get the Black teacher out of her school. This was featured on the cover and in an article in the March 1968 issue of The Ladies Home Journal.

Currently there are six (6) people who have firsthand knowledge of their lives and work. These include myself (their oldest son (my brother passed away in 2000), my sister-in-law, and their four grandchildren. We have decided to create something on the Internet to memorize their lives, and the difference they made in other people's lives, for future generations and others. We think Wikipedia would be the best platform to present this information, which would include essays about them written by the six of us, their writings, The Ladies Home Journal cover and article, and pictures. However, I do not know if this would be appropriate under Wikipedia's guidelines and rules. I am sending this to the Support Desk to help determine whether or not we could put this on Wikipedia. I would appreciate a response as we begin to write, gather information, scan put everything together as to using Wikipedia.

Thank you. Bmperlman39 (talk) 14:45, 4 April 2018 (UTC)

This support desk is primarily for technical queries regarding the software which runs Wikipedia. For content on Wikipedia, you will get a much quicker and informed response at w:Wikipedia:Teahouse. AhmadF.Cheema (talk) 15:18, 4 April 2018 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

i cant join for free ???

i cant join for free keeps rejecting all my passwords i try to set? 66.171.106.235 (talk) 15:10, 4 April 2018 (UTC)

Please tell us which website (a full link, please) you refer to, and why you think that some website rejects all your passwords - is there some error message, or what happens? Malyacko (talk) 15:24, 4 April 2018 (UTC)

Media Wiki Logon issue

I have Media Wiki installed on server 2016. When I access the webpage and try to login as Admin, or try to create an account I get Fatal Exception of type "BadMethodCallException" Any ideas on how to fix this? 208.38.247.133 (talk) 15:25, 4 April 2018 (UTC)

We'll need a stack trace of the error to see where the error is being producing. See Manual:How to debug to see what do you need in order to improve the verbosity of that error message. Ciencia Al Poder (talk) 09:21, 5 April 2018 (UTC)

Mobile editing

Hi,

on only one page of my site, there ist no "pencil" to edit the text with smartphones. I don´t know why. Have u any idea?

Thanks, Mitch Evetro (talk) 19:20, 4 April 2018 (UTC)

The page may be protected Ciencia Al Poder (talk) 09:19, 5 April 2018 (UTC)
On Desktop i can edit the page Evetro (talk) 09:37, 5 April 2018 (UTC)
In Console section of the browser developer tools (F12), is there any error displayed? AhmadF.Cheema (talk) 17:02, 5 April 2018 (UTC)
I can only test the desktop version...everything is fine.
I can edit mobile Pages, but the only one i want not :-( Evetro (talk) 18:08, 7 April 2018 (UTC)
Why can you "only test the desktop version"?
On desktop, add ?useformat=mobile at the end of the URL, to open the mobile version of the page and then press F12. AhmadF.Cheema (talk) 18:15, 7 April 2018 (UTC)
Ahhh :-)
No Errors
In Desktop Version there was:
span class="[null mw-editsection]"><span class="[null mw-editsection-bracket]"
That missing in mobile Source Code Evetro (talk) 18:47, 10 April 2018 (UTC)
Can you post a link to the page having this problem? Ciencia Al Poder (talk) 09:41, 11 April 2018 (UTC)
Removed link Evetro (talk) 15:10, 12 April 2018 (UTC)
That "one" page is the main page. I'm not sure, but MobileFrontend may restrict editing the main page on purpose. Ciencia Al Poder (talk) 21:54, 12 April 2018 (UTC)
Seems to be so.
The <div class="pre-content heading-holder"> renders different content -such as the page-actions list which include edit, watch and language switcher icons - for the Main Page as compared to other pages.
However, the Main page can apparently still be edited by a direct link, i.e. &action=edit. AhmadF.Cheema (talk) 05:27, 13 April 2018 (UTC)
Thank u very much!
is that correct, that there is no way to enable mobile editing on the mainpage.
The only "hack" is a direct link &action=edit Evetro (talk) 13:18, 13 April 2018 (UTC)
Maybe the missing page action buttons can be included through MediaWiki:Common.css too. AhmadF.Cheema (talk) 17:10, 13 April 2018 (UTC)

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

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. Newman2 (talk) 21:42, 4 April 2018 (UTC)

It depends... In order to help you further, please answer the following questions:
-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' ); Newman2 (talk) 22:16, 4 April 2018 (UTC)
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 Ciencia Al Poder (talk) 09:19, 5 April 2018 (UTC)
By the way, I could not find enough information on the error 500. Newman2 (talk) 13:24, 5 April 2018 (UTC)
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. 2001:16B8:10A0:DB00:198F:24E4:C3ED:88E5 (talk) 15:46, 5 April 2018 (UTC)
Candy is a copy of the MonoBook skin. And yes, the error happens for both Candy and Monaco. Newman2 (talk) 17:10, 5 April 2018 (UTC)
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. 2001:16B8:10AE:AE00:88E9:486B:2ED1:A316 (talk) 17:52, 7 April 2018 (UTC)
Okay. How do I debug the error then? Newman2 (talk) 18:13, 7 April 2018 (UTC)
I also get an error 500 when attempting to debug and log the errors. Newman2 (talk) 18:19, 7 April 2018 (UTC)
The error log of the webserver should contain the information about the error. Ciencia Al Poder (talk) 10:39, 8 April 2018 (UTC)
How do you open the error log then? It wouldn't show up on my wiki. Newman2 (talk) 15:32, 8 April 2018 (UTC)
The error log is on your wiki. It's somewhere on the filesystem.
http://lmgtfy.com/?q=location+of+apache+error+logs Ciencia Al Poder (talk) 16:17, 8 April 2018 (UTC)
What do I need to type in to debug the error? Newman2 (talk) 20:53, 8 April 2018 (UTC)
^^Look at the post above Newman2 (talk) 21:53, 9 April 2018 (UTC)
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. Ciencia Al Poder (talk) 09:20, 10 April 2018 (UTC)
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 Newman2 (talk) 23:21, 10 April 2018 (UTC)
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 Ciencia Al Poder (talk) 09:19, 11 April 2018 (UTC)
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 (talk) 12:35, 11 April 2018 (UTC)
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 Newman2 (talk) 12:38, 11 April 2018 (UTC)
Does your Skin:Modern version correspond to your MediaWiki core version? How did you download this skin? AhmadF.Cheema (talk) 14:02, 11 April 2018 (UTC)
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. Newman2 (talk) 21:04, 11 April 2018 (UTC)
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. 2001:16B8:10A1:2100:3C43:EE16:CDE1:BE37 (talk) 01:57, 13 April 2018 (UTC)
Thanks for the info. But what software that is easy to download can debug any error including these ones? Newman2 (talk) 12:34, 13 April 2018 (UTC)
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! 2001:16B8:106D:2800:50C0:AF40:FC95:293B (talk) 12:51, 13 April 2018 (UTC)
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. Newman2 (talk) 18:25, 14 April 2018 (UTC)
See debug. 星耀晨曦 (talk) 07:29, 15 April 2018 (UTC)
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. Newman2 (talk) 21:44, 17 April 2018 (UTC)
Nobody asked you to set HHVM or Vagrant. We only asked you to Manual:How_to_debug#Setting_up_a_debug_log_file Ciencia Al Poder (talk) 09:13, 18 April 2018 (UTC)
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. Newman2 (talk) 21:00, 19 April 2018 (UTC)
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. 星耀晨曦 (talk) 15:55, 24 April 2018 (UTC)
How would I have misconfigured? If so, then how do I fix the error that occurred with adding the debug log file? Newman2 (talk) 20:41, 24 April 2018 (UTC)
Normally, $wgDebugLogFile does not cause 404 error. May be due to other reasons. After removing $wgDebugLogFile, does 404 error still exist? 星耀晨曦 (talk) 05:08, 25 April 2018 (UTC)
Yes, there was still a 404 error. And by the way, where are the debug log and debugging software located? Newman2 (talk) 14:41, 25 April 2018 (UTC)
This means that it is not caused by $wgDebugLogFile. You should think about what you did when you adding $wgDebugLogFile before. In this case, it is most likely that you have modified the config of your web server. You can check your web server for error log and access log. 星耀晨曦 (talk) 15:03, 25 April 2018 (UTC)
Do you know how I get around that uncaught exception? Newman2 (talk) 20:39, 5 May 2018 (UTC)
  1. Find a relevant error message: a plain "uncaught exception", "unhandled exception", "internal error" is not useful. A "parse error" may indicate a typo in a PHP file. "internal error: unable to contact the database" can be useful.
  2. Go to http://www.google.com/ and paste the detailed error message. Try to open several results and see if something may be applicable to you.
    • Don't try to apply fixes without first understand if the fix may be relevant to you. If you have doubts about some concepts, try to search it in http://www.google.com/ to better understand it.
  3. If a cause described on those results seem relevant, try to apply a fix.
  4. If you come here for support, be sure to give us enough information to be able to help you Ciencia Al Poder (talk) 10:10, 6 May 2018 (UTC)
I fixed this error by adding a skin.json file. I fixed everything to make my Candy skin up and running. Now I get this error:
PHP Fatal error:  Class 'SkinCandy' not found in /home/gjlxrtap/public_html/mw19/includes/ServiceWiring.php on line 142
How do I fix this? Newman2 (talk) 14:16, 20 May 2018 (UTC)
Looks like you didn't fixed everything to make my Candy skin up and running Ciencia Al Poder (talk) 16:22, 21 May 2018 (UTC)
What needs to be added if the 'SkinCandy' class isn't found in the ServiceWiring? Newman2 (talk) 00:36, 22 May 2018 (UTC)
  • You need to download the SkinCandy code again and ensure all files are present.
  • If that's not possible because you're the developer, well... I'm not gonna tell you what to put on that class, because I'm not developing that skin.
  • If neither options are possible, just give up and remove the Candy skin from LocalSettings.php Ciencia Al Poder (talk) 09:22, 22 May 2018 (UTC)
I am not going to download the code again because on the GitHub download there are missing json files. If the class isn't found in ServiceWiring.php, then is there something wrong with the files in the skin? Or is there something wrong with ServiceWiring.php? Newman2 (talk) 20:47, 23 May 2018 (UTC)
There's something wrong with the skin Ciencia Al Poder (talk) 21:28, 23 May 2018 (UTC)
I really haven't noticed anything that could be fixed. Here is a link to the updated download of the Candy skin:
https://github.com/Newman22/MediaWiki-Candy/tree/Newman22-patch-1 Newman2 (talk) 00:53, 24 May 2018 (UTC)
^Read above. Newman2 (talk) 16:03, 25 May 2018 (UTC)
I am currently having a similar issue on my windows machine, only it's with the Pivot skin. I created the folder, extracted the files to there. Checked to make sure I followed directions, that I had the right updated files for both media wiki and the download it directed me to. I read the README files and followed the directions. Only when I had it in place did I receive my fatal error:
Fatal error: Uncaught Exception: Unable to open file /home/customer/www/wikipage.com/public_html/wiki/skins/Pivot/skin.json: filemtime(): stat failed for /home/customer/www/.com/public_html/wiki/skins/Pivot/skin.json in /home/customer/www/wikipage.com/public_html/wiki/includes/registration/ExtensionRegistry.php:177 Stack trace: #0 /home/customer/www/wikipage.com/public_html/wiki/includes/GlobalFunctions.php(88): ExtensionRegistry->queue('/home/customer/...') #1 /home/customer/www/wikipage.com/public_html/wiki/LocalSettings.php(134): wfLoadSkin('Pivot') #2 /home/customer/www/wikipage.com/public_html/wiki/includes/Setup.php(143): require_once('/home/customer/...') #3 /home/customer/www/wikipage.com/public_html/wiki/includes/WebStart.php(89): require_once('/home/customer/...') #4 /home/customer/www/wikipage.com/public_html/wiki/index.php(44): require('/home/customer/...') #5 {main} thrown in /home/customer/www/wikipage.com/public_html/wiki/includes/registration/ExtensionRegistry.php on line 177
Right now I'm trying to figure out if each of these locations exists, or of I am dealing with a permissions error. I'm also downloading the core skins and replacing them entirely. This was initially installed via my web host. 174.131.46.189 (talk) 02:44, 24 May 2021 (UTC)
You maybe set wfLoadSkin( 'Pivot' ); in your LocalSettings.php. Note that this is case sensitive. Try to use wfLoadSkin( 'pivot' ) instead of it. 星耀晨曦 (talk) 04:36, 24 May 2021 (UTC)

How to Include Page Sections in DPL?

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


I'm looking at these three DPL extensions. Supposedly, some of or all them can display page sections, but i can't see how that's done. Ideally, i'd like to get that working with all of 'em, so i can compare performance and other features.

Can anyone share section-inclusion examples?

-thx

Extension:DynamicPageList3

Extension:DynamicPageListEngine

Extension:DynamicPageList (Wikimedia) Johnywhy (talk) 02:28, 5 April 2018 (UTC)

For Extension:DynamicPageList3, see DPL:Parameters:_Criteria_for_Page_Selection#Select_articles_based_on_TITLE. AhmadF.Cheema (talk) 17:11, 5 April 2018 (UTC)
Thx! Your link is for page-selection, but I'm actually looking to include page SECTION.
Your link led me to the right place:
https://help.gamepedia.com/DPL:Example_-_Show_Sections_from_an_Article Johnywhy (talk) 21:06, 5 April 2018 (UTC)
The link I gave also uses the exact same example (with different variable names) for including page SECTION. AhmadF.Cheema (talk) 22:17, 5 April 2018 (UTC)
Fantastic. This works great! Here's my transclude:
{{#dpl:
  |category = Rebuttal_Deep-Dives
  |include = #Rebuttal
}}
It returns a bulleted list of all page titles in category "Rebuttal_Deep-Dives", including all body text in page section called "Rebuttal".
It displays a link to a non-existent Template at the top of the list. This can be suppressed by creating "Template:Extension DPL" and saving it as blank. It can even be deleted at this point, and it's display will continue to be suppressed in the DPL. More info.
Since Extension:DynamicPageList3 description says it's re-written from the ground up, with improved performance, i don't see a strong reason to investigate the other two DPL extensions. Johnywhy (talk) 22:50, 5 April 2018 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Upgrade MySQL to version 5.5.8

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


MediaWiki 1.30 needs MySQL version 5.5.8. At the moment we use 5.5.59. How can I update our MySQL installation? We use Ubuntu 14. Waanders (talk) 11:37, 5 April 2018 (UTC)

Oops, 5.5.8 is older than 5.5.59 I see. Thought version 5.5.59 was in between 5.5.5 and 5.5.6 ... Waanders (talk) 11:42, 5 April 2018 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

customer service ticket or help request?

Hello, how would I put in a customer service ticket or help request? 192.31.106.35 (talk) 15:21, 5 April 2018 (UTC)

You are already on the Support Desk for the MediaWiki software here, if your question is about the MediaWiki software itself. :) Malyacko (talk) 17:05, 5 April 2018 (UTC)

Create Administration account

How do I create multiple administration accounts in media wiki? 208.38.247.133 (talk) 15:57, 5 April 2018 (UTC)

The easiest way is to log in with a bureacrat account and to grant user rights through the wiki page Special:UserRights of your wiki.
Using the maintenance script Manual:createAndPromote.php from the shell is the second way I know of. 2001:16B8:10A0:DB00:84B7:451E:1D50:3CA1 (talk) 16:50, 5 April 2018 (UTC)

Why many wikis running a outdated version?

Many wiki (about 90%) is running a outdated version of Mediawiki. Why the webmasters of sites won't update Mediawiki? 2A02:C7F:963F:BA00:5DF7:13F1:AFD3:B4B2 (talk) 18:49, 5 April 2018 (UTC)

Because there is no need to update if everything works fine Fokebox (talk) 06:46, 6 April 2018 (UTC)
the release manager issued that only up-to-date version should be used in production wikis but the wiki owners says no. 2A02:C7F:963F:BA00:78E9:F008:425B:BC2A (talk) 06:49, 6 April 2018 (UTC)
What was probably meant was that most Wiki administrators don't bother to upgrade their Wikis until something gets broken. A lot of them can't be bothered because they don't have the time, or are not paid for it, or not have many users depend on their Wiki. In some cases, the core MediaWiki package has been heavily modified which requires just too many resources to keep on updating for newer MediaWiki versions. AhmadF.Cheema (talk) 09:50, 6 April 2018 (UTC)
The current MediaWiki version is 1.30, but many wikis are running a unsupported version of MediaWiki. A auto-update feature for MediaWiki is helpful. 2A02:C7F:963F:BA00:7191:7D1F:2C3:4FA2 (talk) 19:00, 6 April 2018 (UTC)
There is also an LTS (long-term support) version, which is currently 1.27. It has an advantage of being supported (security fixes are always added into it) for a very long time (at least 2 years).
Using latest versions like 1.30 is sometimes not preferable for organizations, because non-LTS versions may be declared obsolete pretty quickly, so you have to keep the pace updating them.
Auto-update of MediaWiki is absolutely out of the question. MediaWiki is not Wordpress, lots of things undergo breaking changes between versions of MediaWiki, and many user-written JavaScript gadgets and third-party extensions may require changes before you can use them in the new version. Edward Chernenko (talk) 21:16, 6 April 2018 (UTC)
WordPress is for blogs and website, while MediaWiki is for wikis. Updated version of MediaWiki will fix security flaws and bugs. 2A02:C7F:963F:BA00:D9DE:EDCC:B34F:7AEC (talk) 18:13, 14 April 2018 (UTC)
The release manager recommends that only current or LTS version to be run on new wikis. Unsupported/outdated versions of MediaWiki won't get security fixes and may contains high-risk, critical security vulnerabilities, bugs and other major bugs, including security leaks, data loss, wiki hacks, security issues and risk of corruption. Wikia wikis is running a 2012 version of MediaWiki which means that all Wikia wikis at risk of unfixed security issues and bugs. Wiki owners needs to get on to updating MediaWiki or get risks of security vulnerabilities and bugs. 2A02:C7F:963F:BA00:6D64:5FC8:F12F:8F1C (talk) 10:55, 7 April 2018 (UTC)
> Auto-update of MediaWiki is absolutely out of the question. [...]
I don't think so: Auto-updating can be implemented just like it has been implemented in WordPress. WordPress also has other parts, which - separately from the WordPress Core itself - need updates, e.g. themes or plugins. Actually, while I don't know how the WordPress guys update their themes, for MediaWiki one can say that extensions often get updated "automatically": They are updated together with the breaking changes in the Core.
I think a MediaWiki auto-update would be good to have - and for minor updates it should be pretty save, too. 2001:16B8:10AE:AE00:A5BA:CA1:F0F4:A0B6 (talk) 11:45, 7 April 2018 (UTC)
Technically, we can do auto-update. 星耀晨曦 (talk) 02:29, 8 April 2018 (UTC)
See the 7th comment here. The wiki owners needs to get started updating or get security risks and bugs. 2A02:C7F:963F:BA00:117B:604A:818E:8B70 (talk) 07:03, 8 April 2018 (UTC)
te about wikia: They are running a significantly modified fork of an old version of MediaWiki. At this point its not fair to say they are running an old-dated version of MediaWiki. They are using their own thing that is based on an old version of MediaWiki, but significantly different. I have no idea if they are backporting security fixes to their fork, but its entirely possible that they are.o Bawolff (talk) 15:34, 9 April 2018 (UTC)
Read this comment here that reads:
"The release manager recommends that only current or LTS version to be run on new wikis. Unsupported/outdated versions of MediaWiki won't get security fixes and may contains high-risk, critical security vulnerabilities, bugs and other major bugs, including security leaks, data loss, wiki hacks, security issues and risk of corruption."
and:
"Wiki owners needs to get on to updating MediaWiki or get risks of security vulnerabilities and bugs." 2A02:C7F:963F:BA00:D1AA:6B7B:FE31:F56 (talk) 17:52, 9 April 2018 (UTC)
We don't control what other people do.
It is of course highly reccomended to always update to a supported MediaWiki version. It is also very important to update your extensions if any of them have security releases.
However, if some people don't do that, it is not in our power to force them. Bawolff (talk) 09:49, 10 April 2018 (UTC)
OK but asking the wiki owners is the thing. About the auto-update thing, all WMF wikis does auto-updates. 2A02:C7F:963F:BA00:F537:42EC:3DD6:A970 (talk) 17:02, 10 April 2018 (UTC)
No, WMF wikis do not do auto-updates. There is an entire team of people dedicated to updating them. Bawolff (talk) 19:26, 10 April 2018 (UTC)
After all, MediaWiki auto-update feature will be made anytime. About the Wikia thing, it was discussed before but there are no plans for Wikia to "update MediaWiki". Both 1.27 and 1.30 versions is supported by MediaWiki. 2A02:C7F:963F:BA00:6978:E68F:A981:8B0D (talk) 09:36, 11 April 2018 (UTC)
MediaWiki development community cannot intervene the internal affair of Wikia. We can't ask a site to upgrade their mediawiki. 星耀晨曦 (talk) 10:33, 11 April 2018 (UTC)
who is mediaWiki development community? 2A02:C7F:963F:BA00:6978:E68F:A981:8B0D (talk) 10:45, 11 April 2018 (UTC)
The community composed of mediawiki (core and extensions) code contributors. 星耀晨曦 (talk) 10:50, 11 April 2018 (UTC)
Outdated versions contain security vulnerabilities and other major bugs. 2A02:C7F:963F:BA00:6978:E68F:A981:8B0D (talk) 11:20, 11 April 2018 (UTC)
Auto-update feature of MediaWiki and extension is yet to be made. 2A02:C7F:963F:BA00:419E:5652:917D:2F86 (talk) 20:37, 12 April 2018 (UTC)
yet again, mediawiki is free software so there are must be lists of updates. 2A02:C7F:963F:BA00:D054:D024:D525:E84C (talk) 15:10, 13 April 2018 (UTC)
What is the list as you said? 星耀晨曦 (talk) 15:17, 13 April 2018 (UTC)
Release notes page 2A02:C7F:963F:BA00:D054:D024:D525:E84C (talk) 18:36, 13 April 2018 (UTC)
An old thread and still no Auto-Update available. I think most part-time webmasters just dont upgrade because it costs a lot of time and is difficult to do for a non-programmer Balloonhead666 (talk) 15:04, 6 May 2022 (UTC)
@Balloonhead666 An old thread and still everything that has been written before in this thread still applies. "Errors" will not magically vanish because of some non-working "auto-update" wishes as long as random extensions etc might be installed. Malyacko (talk) 19:33, 6 May 2022 (UTC)
Oh and I forgot when I update my wiki it always ends up in errors :D Balloonhead666 (talk) 15:51, 6 May 2022 (UTC)
Can composer be used to update MediaWiki (not just the extensions) ? Also there must be scripts and tools out there that can simply/streamline the process. Also the LTS. I'm running one of the latest releases and I'm considering switching to LTS. Is that problematic as that would be a downgrade ? Michael Z Freeman (talk) 12:10, 9 July 2022 (UTC)

integrate MW login with project

How do I make logged in users from my project automatically also logged in in MediaWiki? 91.51.216.67 (talk) 20:09, 5 April 2018 (UTC)

I'm thinking about writing a php file that will check if the user has the cookies from my site then give the wiki cookies to the user and adding this file as an extension. will this work?
I mean if I added a php file as an extension will it run before loading any page from the wiki? does MediaWiki have a class that I can use in my extension to log the users in? 91.51.216.67 (talk) 14:30, 6 April 2018 (UTC)
I don't think this is actually possible. Each application/website has their "sense" of user being logged in. Usually, it's an object stored in session, with information about the user logged in (user name, internal user id, etc). One application can't know the structure of the object stored in a session for a different application, and/or it would lack critical information required for the current application. Ciencia Al Poder (talk) 15:25, 6 April 2018 (UTC)
I mean wouldn't something like this work?
<?php require_once("../includes/class.user.php"); if (!isUserLoggedIn()){ //user is not logged in //redirect to login page and stop MediaWiki from running header("Location: http://localhost/login.php"); die(); }else{ //the user is logged in // call a function to check if the user is already in mediawiki's database if(true){ give the user the needed cookies to appear logged into the wiki }else{ // get the user data from main application $userdata = $loggedInUser->getData(); //register the user in the wiki database and give them the cookies } ?> 91.51.216.67 (talk) 16:26, 6 April 2018 (UTC)
I screwed up the formatting and can't edit. Sorry!
<?php
//load the user class from main application
require_once("../includes/class.user.php");
if (!isUserLoggedIn()){
//user is not logged in
//redirect to login page and stop MediaWiki from running
header("Location: http://localhost/login.php");
die();
}else{ //the user is logged in
// call a function to check if the user is already in mediawiki's database
if(true){
give the user the needed cookies to appear logged into the wiki
}else{
// get the user data from main application
$userdata = $loggedInUser->getData();
//register the user in the wiki database and give them the cookies
}
?> Salehtahini (talk) 16:32, 6 April 2018 (UTC)
This may work. Note, however, that you won't have access to the password from your main application. This means the user should login on your application and not on MediaWiki. Ciencia Al Poder (talk) 10:42, 8 April 2018 (UTC)
ok it's kind of working now.
I added Auth_remoteuserand my code now is:
require_once("../includes/class.user.php");
if (!isUserLoggedIn){ header("Location: http://localhost/login.php"); die(); }
else{ //use MediaWiki\Auth\AuthManager;
$wgAuthRemoteuserUserName = ucfirst( strtolower( $loggedInUser->username ) );
$wgAuthRemoteuserUserPrefs = [ 'realname' => $loggedInUser->displayname, 'language' => 'de', 'disablemail' => 0 ]; }
but because my code starts the PHP Session somehow MediaWiki is not able to set the cookies.
I set up a debug log and now im getting [session] SessionBackend "lucupuj3inlt0lq6ipf61kk8fhcrvcht" is unsaved, marking dirty in constructor
[session] SessionBackend "lucupuj3inlt0lq6ipf61kk8fhcrvcht" save: dataDirty=1 metaDirty=1 forcePersist=0 Salehtahini (talk) 16:11, 8 April 2018 (UTC)
See the session manager docs at Manual:SessionManager and AuthManager Bawolff (talk) 15:32, 9 April 2018 (UTC)

Cannot log in after mediawiki installation

I have 4 themed wikis under my multimedia company. I recently wanted to start a 5th about the open movements. I bought the domain and installed mediawiki to find that I cannot log into the admin account. I have reinstalled it and had the same problem. I make it to the password page, i enter my password, and a white screen with a 403 error and a message saying i do not have access comes up. I am afraid I will be cut off from my other 4 wikis in the same fashion once i lose my cookies.

this is the wiki location: https://openmovement.wiki/

Here is a screen of the message I get: https://openmovement.wiki/images/forbidden-wiki-message.png

I am using mediawiki version 1.29.2 PW1984 (talk) 20:14, 5 April 2018 (UTC)

I ended up gaining access by requesting a password change, I was able to log in through such into the open movement wiki. I know my password was accurate. So something is going on. I have tried to change my email on my current wikis on my admin account, getting the same error I have since changed emails so this is pretty alarming... PW1984 (talk) 21:07, 5 April 2018 (UTC)
That "Forbidden" error is not triggered by MediaWiki. It's triggered by the webserver itself. It seems to have some special anti-spam rule or similar like ModSecurity. Ciencia Al Poder (talk) 21:21, 5 April 2018 (UTC)

my cities are gone

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


My cities are gone when I sign in to Elvenar

I've logged out of my server and logged out of the game with not finding my cities. I have tried all three of the cities listed and they are the starting cities. 2601:603:1E7F:C928:2579:FC6:A162:D0E7 (talk) 02:00, 6 April 2018 (UTC)

Wrong support forum. AhmadF.Cheema (talk) 09:51, 6 April 2018 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

How to Refresh DPL3 when Referenced Category is Edited?

Extension:DynamicPageList3,

The DPL does not refresh unless i enter source-edit mode and resave.Others report same.

This has two sub-topics:

  • How to refresh.
  • When to refresh

.

How to refresh:

  • Set the url parameter "?DPL_refresh=yes"
    • Does not seem to work.
    • Would require a redirect (which to me feels like a patch).
  • Some global process: eg will it refresh on runJobs.php?
  • What's the DPL3 php updater-function? in DynamicPageList.php, i see:

public function updateArticleByRule($title, $text, $rulesText) {

public function updateArticle($title, $text, $summary) {

public function updateTemplateCall(&$matchCount, $text, $template, $call, $parameter, $value, $afterParm, $optional) {

.

When to refresh:

Editing Wiki Pages

It seems I was able to log into here with out problems. I would like to help edit some of the wiki pages I frequent, but when it tells me to log in, it won't let me. I enter my username and it tells me there is no username like mine. Can someone please help? BrienneTheBlue112 (talk) 22:49, 6 April 2018 (UTC)

On what wiki? Can you find on Special:ListUsers on target wiki? wargo (talk) 23:51, 6 April 2018 (UTC)

Assign Category to New-Page Link?

Assuming that Draft:MyPage does not exist,

and given that a link made with

[[Draft:MyPage]]

will, when clicked, create a new page called "MyPage" in the "Draft" namespace,

is there a way to include a category in that link, such that the newly created page will automatically be added to the specified category? Johnywhy (talk) 02:06, 7 April 2018 (UTC)

See Manual:Creating pages with preloaded text. AhmadF.Cheema (talk) 13:27, 7 April 2018 (UTC)
that one seems to require a load-file, containing the pre-load text. Was hoping for a way to put the category in a simple page-link.
you can do a url which preloads a section-header, but not text:
https://gunretort.xyz/index.php?title=Meta:Sandbox&action=edit&section=new&preloadtitle=New_Header
Here are more neat url parameters:
Manual:Parameters to index.php
https://en.wikipedia.org/wiki/Template:Edit
But Surprisingly, you can't embed pre-load text in the url itself.
no probs, i'm now opting in favor of a page-creation extension, with form-based entry and (hopefully) predetermined category: Category:Page creation extensions Johnywhy (talk) 20:01, 7 April 2018 (UTC)

Extension:PageTriage vs Extension:ApprovedRevs vs Hooks/NewRevisionFromEditComplete?

Extension:PageTriage mentions "page-reviews". Are those the same as ApprovedRevs revisions? How is "Hooks/NewRevisionFromEditComplete" different? Johnywhy (talk) 08:15, 7 April 2018 (UTC)

No.
PageTriage does its own post edit review system that's most similar to "patrolled edits".
approve rev you have to approve a revision before its shown
NewRevisionFromEditComplete is a "hook" which is an extension concept allowing you to write extensions that do something anytime somebody edits a page. Its not an extension itself but is a building block for making extensions. Bawolff (talk) 15:27, 9 April 2018 (UTC)

inerting auto ads for google adsense

Hello, I am trying to insert the new google auto ads to my media wiki. Auto ads automatically generate and appear themselves on pages. I have to add the load script between the <head> tags of my main template. Where can I find the main template index.php to do this?

Also, the plugins available for adsense and media wiki are not what I am looking for. 73.110.29.109 (talk) 11:22, 7 April 2018 (UTC)

Sorry, Auto Ads is too new so there are no add on that works on MediaWiki. Also, why you are putting ads? 2A02:C7F:963F:BA00:DF0:89AF:E1D:BDC4 (talk) 11:13, 8 April 2018 (UTC)
Thanks. What about being able to insert ads into articles?
I'm interested in adding ads to certain articles only. 73.247.118.154 (talk) 15:05, 8 April 2018 (UTC)

How to Make Multiline Section-Fields in Extension:Page Forms?

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


@Yaron Koren

hi, the freetext field is multiline, but the named fields are not.

i want the named fields to be multiline.

This fails:

{{{for template|TPlate DeepDive}}}
{| class="formtable"
  ! Short Retort: 
  | {{{field|Short Retort|rows=10}}}

How to fix? Johnywhy (talk) 06:27, 8 April 2018 (UTC)

You just need to add "|input type=textarea" to any such field. Yaron Koren (talk) 16:32, 8 April 2018 (UTC)
Thanks!
Setting "rows" also works:
{{{section|Short Retort|level=2|rows=4|cols=150|autogrow}}}
Could that mean that "textarea" is the default input type? Johnywhy (talk) 20:55, 8 April 2018 (UTC)
For sections it is, yes. Yaron Koren (talk) 22:02, 8 April 2018 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


When creating a new page, using [Extension:Page Forms], with page-sections, each section in the create-page screen has it's own [ edit ] links.

If you click them, that breaks the form-- you just get a blank edit-screen of entire page. You lose the sections defined by the form.

The 'edit' links seem to have no purpose in the form. They just break the form.

How to remove the [ edit ] links on the sections in the form?

@Yaron Koren Johnywhy (talk) 08:06, 8 April 2018 (UTC)

I'm surprised that this is happening - it sounds like a bug. However, you can probably get around it by adding "" on a line by itself at the top of the "<includeonly>" section.
By the way, Page Forms-related questions are probably better placed at the page Extension talk:Page Forms. Yaron Koren (talk) 17:57, 8 April 2018 (UTC)
  • This is a very useful feature for Extension:Page Forms.
    • It works when editing a page that already exists. An edit-screen opens on the section (not the whole page), which is very handy.
    • The problem is only when creating a new page. That's when The links should be hidden.
  • Where should i add ""? I don't see " in the form or template. Johnywhy (talk) 20:20, 8 April 2018 (UTC)
Oh, I didn't realize that Flow/StructuredDiscussions would parse out all the syntax; let's try that again...
you can probably get around it by adding "__NOEDITSECTION__" on a line by itself at the top of the "<includeonly>" section.
I think the distinction you're talking about isn't between editing an existing page vs. a new page; it's between viewing a page and viewing the form. Yaron Koren (talk) 22:06, 8 April 2018 (UTC)
"the distinction you're talking about isn't between editing an existing page vs. a new page"
I believe it is the distinction between editing an existing page vs. a new page.
Here's a screenshot of your edit form, creating a new page. The 'edit' links are visible, and when clicked they break the page section-structure.
<figure-inline class="mw-default-size"></figure-inline>
But if the page already exists, then they don't break the page structure when clicked.
Your fix works! __NOEDITSECTION__
Your fix also removes the edit links when editing an existing page with the form, but that's fine. They really aren't needed.
Suggestion: put the __NOEDITSECTION__ fix into your extension (special pages create-class and create-form).
Thx! Johnywhy (talk) 22:25, 8 April 2018 (UTC)
I know; as I said in the beginning, that sounds like a bug. (And now looks like a bug too.) Yaron Koren (talk) 22:33, 8 April 2018 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

How to Restrict CategoryTree to a Particular Namespace?

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


This works, but gives all namespaces:
{{#categorytree:TOC|hideroot|mode=pages}}

Doc says:

a list of namespaces from which pages should be shown in the tree (since rev:36864, July 2008). The entries in the list must be namespace names, separated by spaces. The main namespaces can be represented by "-" or "0". This overrides the mode option. 
But, none of these work-- i get an empty tree
{{#categorytree:TOC|hideroot|mode=pages|namespaces=Main}}
{{#categorytree:TOC|hideroot|mode=pages|namespaces=-}}
{{#categorytree:TOC|hideroot|mode=pages|namespaces=0}}
{{#categorytree:TOC|hideroot|namespaces=Main}}
{{#categorytree:TOC|hideroot|namespaces=-}}
{{#categorytree:TOC|hideroot|namespaces=0}}
Johnywhy (talk) 12:48, 8 April 2018 (UTC)
Here's the solution:
"Category" is a namespace. When you don't use the namespaces parameter, then "namespaces=Category" is implied.
But, when you use "namespaces" parameter, then "namespaces=Category" is no longer implied. Thus, if you want subcategories to show up in the result, then you must include Category in namespaces explicitly:
Example:
{{#categorytree:TOC|hideroot|namespaces=Main Category}}
"Main" above returns the content pages. "Category" returns the category-pages.
The "mode" parameter is disabled by the "namespaces" parameter-- the default mode is pages. This makes sense, because if you don't want pages, then the namespaces parameter isn't relevant: the default "Category" is the only namespace you need. Thus, you can achieve categories mode by leaving out "namespaces" and leaving out "mode=categories". Subcategories will appear, but not pages.
{{#categorytree:TOC}}
Notes added to the Extension documentation:
https://www.mediawiki.org/wiki/Extension:CategoryTree#Notes_on_the_'namespaces'_parameter Johnywhy (talk) 05:52, 11 April 2018 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Change namespace name

Hello, how can I change the the namespace name/definition. For example, instead of User talk, change it to User messages.

Thank you. 190.218.206.224 (talk) 15:22, 8 April 2018 (UTC)

Try $wgExtraNamespaces[NS_USER_TALK] = 'User_messages';
If you want to do gender distinction, you also have to set $wgExtraGenderNamespaces Bawolff (talk) 15:25, 9 April 2018 (UTC)

How to Prepend Namespace to Pages Created by Extension:Page Forms?

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


Eg "Draft:"

If linking to the form, you can use target=Draft:MyPage.

But how to specify Namespace or prefix when opening the form directly?

https://cdn.pbrd.co/images/HfJmhoG.jpg

@Yaron Koren Johnywhy (talk) 22:51, 8 April 2018 (UTC)

See here: Extension:Page Forms/Linking to forms#Adding pages of a specific namespace
Though again, these kinds of questions are better asked on the Page Forms talk page. Yaron Koren (talk) 23:38, 8 April 2018 (UTC)
tried that, no luck.
question posted here:
https://www.mediawiki.org/wiki/Extension_talk:Page_Forms#How_to_link_to_form_that_creates_pages_in_a_namespace?
also this
Extension talk:Page Forms#namespace query parameter doesn't work Johnywhy (talk) 00:05, 9 April 2018 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

oh man.... what did i do....?

I just launched a wiki for (I erased this because im too embarassed to reveal my identity). But the honest to God truth is i am in way way way over my head, and now on the second day of the site being live I can see that I had ZERO idea what I have gotten myself into. This is not good..... what in the world am I going to do? To say I was overwhelmed would be unfair top the word overwhelmed!!!! 72.192.145.157 (talk) 02:29, 9 April 2018 (UTC)

As this is the MediaWiki support desk, do you have an actual question that someone could help with? Malyacko (talk) 07:51, 9 April 2018 (UTC)
https://en.wikipedia.org/wiki/Phonetics This page has Errors 2405:204:D301:9263:94B7:D885:1166:D10F (talk) 13:08, 9 April 2018 (UTC)
See https://meta.wikimedia.org/wiki/Help:Editing how you can fix them. Malyacko (talk) 17:14, 10 April 2018 (UTC)
This is a wiki page that anyone can edit. Feel free to edit the page and correct the errors yourself! Ciencia Al Poder (talk) 09:27, 10 April 2018 (UTC)

Uploaded an image but need to replace it: the upload was corrupted

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


I uploaded an image to an article and the image file uploaded fully but when it was displayed it was clear the upload was corrupted (the image loads part of the way and then is greyed-out half way down).

I want to replace the file with the full image (re-uploaded) but wikipedia won't let me delete the image and is detecting a duplicate.

I uploaded to this article: https://en.wikipedia.org/wiki/Zion_Nuclear_Power_Station 2601:243:D00:3FAE:D519:510D:BE3C:F482 (talk) 04:29, 9 April 2018 (UTC)

The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Не получается привязать аутентификацию доменных пользователей

Устанавливаю новую 1.30 на чистом сервере. Все настроил, но привязать вход к доменным учетным записям не получается.

Что я где делаю не так? Простите сразу нуба неразумного, партия сказала надо, комсомол ответил есть :( 194.59.184.240 (talk) 11:51, 9 April 2018 (UTC)

My bad. Question in english
I've install a new 1.30 on a clean server. Everything is configured, but it is not possible to configure login with domain accounts.
What am I doing wrong? 194.59.184.240 (talk) 11:55, 9 April 2018 (UTC)
MediaWiki doesn't support "domain accounts" by default. What extension are you using to allow domain accounts? Can you describe what errors do you get? Have you tried to set a debug log to see if there's some error there about authentication? Ciencia Al Poder (talk) 09:30, 10 April 2018 (UTC)
I've tried to configure LDAP extension as it was configured on another our server (copied extension folder and it's config to seting php file) 194.59.184.240 (talk) 07:41, 11 April 2018 (UTC)
I've tried to configure LDAP extension as it was configured on another our server (copied extension folder and it's config to seting php file) 194.59.184.240 (talk) 07:41, 11 April 2018 (UTC)
Try to describe the errors you are getting. A plain "it does not work" is not useful Ciencia Al Poder (talk) 09:41, 11 April 2018 (UTC)

Ego-Search on MediaWiki.org?

Special:EditWatchlist is the closest thing for now. It has some issues:
  • Doesn't show Open/Closed status.
  • the "Watchlist" link in toolbar links to Special:Watchlist, which again is more like an activity log than subscription list.Would be more helpful if it linked to Special:EditWatchlist instead.
  • Mobile view is different-- sorted by date, like an activity log, so cases are repeated for each edit, like a log. Not really functional as a list of subscriptions.
  • Also, mobile view shows ID numbers instead of titles, so that's less useful.

Where can i find a list of my subscribed pages?

the Watchlist seems more like an activity log. Johnywhy (talk) 13:40, 9 April 2018 (UTC)

Special:MyContributions is your "activity log".
Is Special:EditWatchlist what you're looking Bawolff (talk) 15:22, 9 April 2018 (UTC)
Yes, Special:EditWatchlist seems as close as i'll get.
I just want to see my open cases.
  • Special:EditWatchlist doesn't show Open/Closed status.
  • Mobile view is different-- sorted by date, like an activity log, so cases are repeated for each edit, like a log. Mobile view is not really functional as a list of subscriptions.
  • Another prob with mobile view-- it's lists incident ID numbers, instead of titles. That's less useful.
  • the "Watchlist" link in toolbar links to Special:Watchlist, which again is more like an activity log than subscription list.It would be more helpful if it linked to Special:EditWatchlist instead.
thx Johnywhy (talk) 19:05, 9 April 2018 (UTC)
Yes, Special:Watchlist is some kind of "Recent Changes" but only for pages that you are watching so you can changes on them - this is for watchlists are for. wargo (talk) 19:35, 9 April 2018 (UTC)
i think an activity log is different than a watchlist. An activity log will list each case multiple times, for each update. Imo, a watchlist should list each case just once. "Watchlist" means "list of items you're watching", not "list of your activity".
By that definition, Special:Watchlist is more of an activity log than a watchlist.
https://phabricator.wikimedia.org/T191832 Johnywhy (talk) 19:45, 9 April 2018 (UTC)
You are watching to monitor changes. Youa are notified both on e-mail and in "activity". Link is for quick view last changes of watched pages. wargo (talk) 20:48, 9 April 2018 (UTC)
I just want to see a list of my open cases, similar to a forum or support ticket system.
This thread is not about notifications or changes. Johnywhy (talk) 20:58, 9 April 2018 (UTC)
If you mean this site there is no list of opened threads. You can see all your topics in Special:Contribs. wargo (talk) 06:26, 10 April 2018 (UTC)
Special:Contribs is giving me:
User contributions
Bad username given
Cannot look for contributions without a user or with a user that does not exist.
Johnywhy (talk) 11:13, 10 April 2018 (UTC)
Maybe mobile does something weird to that page. Normally you are prompted for what username to look at.
Special:MyContributions will give you your own contribs. Bawolff (talk) 12:05, 10 April 2018 (UTC)
ok, i got results with Special:Contributions. Again, it's an activity log, with each item listed multiple times for each edit. Not a subscription-list. Johnywhy (talk) 01:18, 11 April 2018 (UTC)
Special:Watchlist / Special:Contribs isn't really designed around the flow (aka StructuredDiscussion) usecase. They are designed around the normal wikipage use case where pages aren't "owned" by any particular person, and they don't have an open/close status.
Having some special page that lists what topic you've started and filterable by open/close status seems like a decent feature request for Flow.
Regarding mobile watchlist view - yeah. I'm personally not a fan of what MobileFrontend does to watchlists. Bawolff (talk) 09:45, 10 April 2018 (UTC)
Thx, would I make that request on phabricator? Johnywhy (talk) 11:04, 10 April 2018 (UTC)
Yes.
Please of course note, that just because its a good idea for a feature, doesn't neccesarily mean anyone will work on it or do it. Bawolff (talk) 12:06, 10 April 2018 (UTC)
@Bawolff, does this seem appropriate as a mod of the flow (aka StructuredDiscussion) extension? Johnywhy (talk) 01:20, 11 April 2018 (UTC)

VisualEditor not working

Hello folks,

I'm having a problem with my wikipedia page. I haven't had a chance to edit mine since at least Christmas. Anyways, I found out that the new version 1.30 of Mediawiki was actually released. Without a second doubt, I downloaded and installed it. Well, everything is great except for my VisualEditor. Before 1.30 I had it working fine. It did its job. Moreover, I haven't had to put any of those parsoid, nodes or whatever it is - it worked fine after I installed this extension and put the line at the bottom of LocalSettings. Now, I give up, I don't have such programming knowledge in this area. Nor do I want to dig into php and this whole stuff as I have my time to spend what I'm good at.

This is the page: http://www.wiki-power-and-revolution.com

I'd be so thankful if anyone could help me to enable my editor. I installed (can't find it even though cmd said it was complete) parsoid, Git, nodejs and don't have idea how to merge everything into one thing. I believe this parsoid, which is required to run VisualEditor, must be an extension or a single file to upload it your wiki, no?

I'm using Windows 10

EDIT: Oh, and whenever I try to go to create/edit page, I have an option to change from WikiEditor to VisualEditor. Obviously, I agree. Few pop pups show about lacking something, I click continue anyway. After this, message "Error loading data from server: HTTP 200." won't let me get any futher. Klaipeda city (talk) 14:51, 9 April 2018 (UTC)

With the MediaWiki core upgrade, did you also remember to upgrade Extension:VisualEditor? AhmadF.Cheema (talk) 15:34, 9 April 2018 (UTC)

Project root

Iwoldlike wiki and sister wikiplease help projact rooting LGk430 LGE 164.132.111.207 (talk) 17:20, 10 April 2018 (UTC)

Question regarding editing

What is the parameter to skip edit previews if we have editing previews on by default? Ups and Downs () 18:27, 10 April 2018 (UTC)

New Install (By OneClick on Hostgator): Images do not appear??

Hello Everyone,

I need to migrate my large wiki http://ArduinoInfo.Info as Wikispaces is going away. I was very familiar with that environment.

I have installed MediaWiki 1.23.9

I have enabled file upload with $wgEnableUploads = true;

I have edited in a desired image like this: <figure-inline class="mw-default-size">File:EngineeringSetRoboRED-350.jpg</figure-inline> (With 2 square brackets]]

End edit and I see the image name in RED. I click on it.

Upload file page opens, I select the file on local machine. No Copyright is available (only one pulldown?),File uploads.

Close edit. Now I see the image filename and to it's left a little greenish "broken image"..

PLEASE help me figure this out; I have a LOT of viewers (12000 hits a day) on the existing wiki I have to migrate.

Current MediaWiki site: http://arduino-direct.com/mediawiki

Example Page:

http://arduino-direct.com/mediawiki/index.php?title=ABOUT_ERECTOR_SETS_AND_SONGS#ABOUT_ERECTOR_SETS_AND_SONGS

Thanks!

Regards, Terry King

...In The Woods in Vermont, USA

terry@yourduino.com TerryKing (talk) 19:51, 10 April 2018 (UTC)

Welcome to help.
@TerryKing - Sorry, but your MediaWiki version is outdated. We will won't get help if you running a outdated MediaWiki version.
First, please update your MediaWiki version to current version. Right now, you can upgrade your MediaWiki version to the latest one (right now the latest version is 1.30). If you can't update your MediaWiki version please let us know. 2A02:C7F:963F:BA00:6978:E68F:A981:8B0D (talk) 09:43, 11 April 2018 (UTC)
If you don't update your MediaWiki installation, we will won't get help and your wiki at risk of high-risk and critical security vulnerabilities, bugs and other major bugs. Please update your MediaWiki installation. 2A02:C7F:963F:BA00:6978:E68F:A981:8B0D (talk) 13:57, 11 April 2018 (UTC)
Hi, I believe my host 'mywikis.net' has updated...
OTHER: Thanks, my host has fixed the original problem.. Sorry for my confusion... TerryKing (talk) 16:30, 16 April 2018 (UTC)

Can I Use Built-In Groups with $wgNamespaceProtection?

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


The only examples given in the doc seem to be only new, custom-created groups. Eg "'edit-main'". But i just want to use built-in groups, eg "Administrators".

Specifically, i want only Admins to be able to edit Project, Help, Category, and Form namespaces. Is that allowed? Johnywhy (talk) 04:42, 11 April 2018 (UTC)

Still testing, but I think it works. Johnywhy (talk) 05:33, 11 April 2018 (UTC)
Try "sysop" for admins. wargo (talk) 09:57, 11 April 2018 (UTC)
thx, but that didn't work. Seems you apply rights by referring to other rights
Project:Support desk/Flow/2018/04#h-What's_wrong_with_this_$wgNamespaceProtection_statement_for_Admins?-2018-04-11T07:51:00.000Z Johnywhy (talk) 16:46, 11 April 2018 (UTC)
Oh, yes.
First, you need to assign "permission" to group. See examples with $wgGroupPermissions on the same page.
$wgNamespaceProtection[NS_BLABLA] = array( 'blabla-edit' );
$wgGroupPermissions['sysop']['blabla-edit'] = true;
wargo (talk) 07:03, 12 April 2018 (UTC)
great!
or one could reference an existing permission. Eg, i'm using this:
$wgNamespaceProtection[NS_FORM] = array( 'editprotected' );
editprotected makes sense here, cuz:
  • Only admins have editprotected by default, and i want to target admins.
  • "wgNamespaceProtection" is all about, well, editing something that's protected :)
  • saves me the trouble of creating a new protection and applying to admins.
It seems to be working, so far. Johnywhy (talk) 07:30, 12 April 2018 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

How to disable "You made an edit!" Notifications on WikiMedia.org

i don't see it in notifications config. Johnywhy (talk) 06:58, 11 April 2018 (UTC)

How to combine config options in Extension:CategoryTree?

Can, or should i, combine these?

$wgCategoryTreeSidebarOptions['namespaces'] = 'Category Main';
$wgCategoryTreeSidebarOptions['hideroot'];

Extension:CategoryTree#Configuration Johnywhy (talk) 07:27, 11 April 2018 (UTC)

If "sysop" is an alias for "Administrators", What other aliases are there?

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


I discovered LocalSettings.php wants "sysop", not "Administrators". Eg
$wgNamespaceProtection[NS_CATEGORY] = array( 'sysop' );
Above doesn't work with "Administrators".

Is there a list of other aliases? eg Bureaucrats etc Johnywhy (talk) 07:42, 11 April 2018 (UTC)

There might be a quicker way to do this, but one method is to add ?uselang=qqx to the end of Special:ListGroupRights (i.e. https://www.mediawiki.org/wiki/Special:ListGroupRights?uselang=qqx).
This will show the internal MediaWiki message IDs for the different groups. For example, "Administrators" will be shown as "group-sysop". AhmadF.Cheema (talk) 08:46, 11 April 2018 (UTC)
Wow, ninja! Johnywhy (talk) 16:44, 11 April 2018 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

What's wrong with this $wgNamespaceProtection statement for Admins?

the following is expected to give admins edit permission in the Help namespace.

But instead, it blocks admins from editing.

$wgNamespaceProtection[NS_HELP]      = array( 'sysop' );

This also blocks admins from editing the Help namespace:

$wgNamespaceProtection[NS_HELP]      = array( 'Administrators' ); Johnywhy (talk) 07:51, 11 April 2018 (UTC)

I think the array should include User rights, instead of User groups.
Try with:
$wgNamespaceProtection[NS_HELP] = array( 'editinterface' );
"editinterface" being a User right, which by default is exclusive to the Administrators. AhmadF.Cheema (talk) 08:38, 11 April 2018 (UTC)
so, the logic is: "give ns-help edit rights to users who have editinterface rights". Correct?
That seems really convoluted. Seems more intuitive to apply rights to users by their group, not their other rights.
This means, to apply a right to a group, i must first study the rights of all the other groups, to make sure no other group has the associated right. Correct? That's weird.
And if by chance some other admin applies the associated right to a group that didn't have it before, that group will now also have the new right that i applied-- the one i didn't intend for them to have. Correct?
Like for example, say i do
$wgNamespaceProtection[NS_HELP] = array( 'editinterface' );
because at the moment, only Admins have editinterface. But then some other admin (or even me) decides to give editinterface to bureaucrats. Now suddenly bureaucrats have edit rights on NS_HELP.
I must missing something, cuz that makes no sense to me. Johnywhy (talk) 16:42, 11 April 2018 (UTC)
I think you're supposed to create a separate right and give that right to the groups that should have it, rather than bolt your new functionality on to an existing right. 110.149.117.24 (talk) 12:31, 14 April 2018 (UTC)
thx, that is clearer. I'm understanding this better now. But in some cases, i think it might make sense to match an existing right, as here:
https://www.mediawiki.org/w/index.php?title=Project%3ASupport%20desk/Flow/2018/04#c-Johnywhy-2018-04-12T07%3A30%3A00.000Z-Johnywhy-2018-04-11T04%3A42%3A00.000Z Johnywhy (talk) 18:50, 14 April 2018 (UTC)

Can't login or create user after migration+upgrade to 1.30

We went from wiki.example.com to www.example.com/wiki, but now the wiki is on another server.

After moving, importing the DB and doing the maintenance-update, wiki looks exactly the same in both places (yay!) but when trying to log in..

"There seems to be a problem with your login session; this action has been canceled as a precaution against session hijacking. Go back to the previous page, reload that page and then try again."

I've checked a few of the help pages and now I have the following cache settings:

## Shared memory settings

$wgMainCacheType    = CACHE_ANYTHING;

$wgSessionCacheType = CACHE_DB;

$wgMessageCacheType = CACHE_ACCEL;

$wgCacheDirectory = "tmp/";

$wgMemCachedServers = [];

$wgUseLocalMessageCache = true;

$wgParserCacheType = CACHE_DB;

$wgUseGzip = true;

$wgEnableSidebarCache = true;

Plus the following at the bottom of the LocalSettings:

$wgShowDBErrorBacktrace = true;

$wgShowExceptionDetails = true;

$wgDebugLogFile = "tmp/debug-{$wgDBname}.log";

The log file after trying to log in:

CONNECTION: keep-alive

UPGRADE-INSECURE-REQUESTS: 1

[caches] cluster: SqlBagOStuff, WAN: mediawiki-main-default, stash: db-replicated, message: EmptyBagOStuff, session: SqlBagOStuff

[caches] LocalisationCache: using store LCStoreCDB

[CryptRand] mcrypt_create_iv generated 20 bytes of randomness.

[CryptRand] 0 bytes of randomness leftover in the buffer.

[DBReplication] Wikimedia\Rdbms\LBFactory::getChronologyProtector: using request info {

   "IPAddress": "88.2.242.238",

   "UserAgent": "Mozilla\/5.0 (Windows NT 10.0; Win64; x64; rv:59.0) Gecko\/20100101 Firefox\/59.0",

   "ChronologyProtection": false

}

[DBConnection] Wikimedia\Rdbms\LoadBalancer::openConnection: calling initLB() before first connection.

[DBConnection] Connected to database 0 at '192.168.250.106'.

[SQLBagOStuff] Connection 241 will be used for SqlBagOStuff

[session] SessionBackend "ac7q4vicl2g1hnk3iuisagqbskgc4p8l" is unsaved, marking dirty in constructor

[session] SessionBackend "ac7q4vicl2g1hnk3iuisagqbskgc4p8l" save: dataDirty=1 metaDirty=1 forcePersist=0

[cookie] already deleted setcookie: "wiki_ne_session", "", "1491903551", "/", "", "1", "1"

[cookie] already deleted setcookie: "wiki_neUserID", "", "1491903551", "/", "", "1", "1"

[cookie] already deleted setcookie: "wiki_neToken", "", "1491903551", "/", "", "1", "1"

[cookie] already deleted setcookie: "forceHTTPS", "", "1491903551", "/", "", "", "1"

[session] SessionBackend "ac7q4vicl2g1hnk3iuisagqbskgc4p8l" force-persist due to persist()

[session] SessionBackend "ac7q4vicl2g1hnk3iuisagqbskgc4p8l" save: dataDirty=0 metaDirty=1 forcePersist=1

[cookie] setcookie: "wiki_ne_session", "ac7q4vicl2g1hnk3iuisagqbskgc4p8l", "0", "/", "", "1", "1"

[cookie] already deleted setcookie: "wiki_neUserID", "", "1491903552", "/", "", "1", "1"

[cookie] already deleted setcookie: "wiki_neToken", "", "1491903552", "/", "", "1", "1"

[cookie] already deleted setcookie: "forceHTTPS", "", "1491903552", "/", "", "", "1"

[session] SessionBackend "ac7q4vicl2g1hnk3iuisagqbskgc4p8l" Taking over PHP session

[session] SessionBackend "ac7q4vicl2g1hnk3iuisagqbskgc4p8l" save: dataDirty=0 metaDirty=1 forcePersist=1

[cookie] already set setcookie: "wiki_ne_session", "ac7q4vicl2g1hnk3iuisagqbskgc4p8l", "0", "/", "", "1", "1"

[cookie] already deleted setcookie: "wiki_neUserID", "", "1491903552", "/", "", "1", "1"

[cookie] already deleted setcookie: "wiki_neToken", "", "1491903552", "/", "", "1", "1"

[cookie] already deleted setcookie: "forceHTTPS", "", "1491903552", "/", "", "", "1"

[DBConnection] Connected to database 0 at '192.168.250.106'.

[MessageCache] MessageCache::load: Loading en... local cache is empty, global cache is empty, loading from database

Unstubbing $wgParser on call of $wgParser::firstCallInit from MessageCache->getParser

Parser: using preprocessor: Preprocessor_DOM

Unstubbing $wgLang on call of $wgLang::_unstub from ParserOptions->__construct

QuickTemplate::__construct was called with no Config instance passed to it

[CryptRand] mcrypt_create_iv generated 7 bytes of randomness.

[CryptRand] 0 bytes of randomness leftover in the buffer.

[CryptRand] mcrypt_create_iv generated 16 bytes of randomness.

[CryptRand] 0 bytes of randomness leftover in the buffer.

[session] SessionBackend "ac7q4vicl2g1hnk3iuisagqbskgc4p8l" data dirty due to dirty(): LoginSignupSpecialPage->getFakeTemplate/SpecialUserLogin->getToken/MediaWiki\Session\Session->getToken/MediaWiki\Session\Session->set/MediaWiki\Session\SessionBackend->dirty

[session] SessionBackend "ac7q4vicl2g1hnk3iuisagqbskgc4p8l" save: dataDirty=1 metaDirty=0 forcePersist=0

User::getBlockedStatus: checking...

MediaWiki::preOutputCommit: primary transaction round committed

MediaWiki::preOutputCommit: pre-send deferred updates completed

[cookie] setcookie: "cpPosTime", "1523439553.6989", "1523439613", "/", "", "1", "1"

[DBReplication] Wikimedia\Rdbms\ChronologyProtector::shutdownLB: DB '192.168.250.106' touched

MediaWiki::preOutputCommit: LBFactory shutdown completed

[cookie] setcookie: "UseDC", "master", "1523439563", "/", "", "1", "1"

[cookie] setcookie: "UseCDNCache", "false", "1523439563", "/", "", "1", "1"

OutputPage::sendCacheControl: private caching;  **

Request ended normally

Any ideas/suggestions?

Thanks! 88.2.242.238 (talk) 09:47, 11 April 2018 (UTC)

Issue found/fixed.
If I access through https the credentials work without any issues; http login keeps crashing though.. 88.2.242.238 (talk) 10:12, 11 April 2018 (UTC)

Module:Message_box does not draw a border

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


Having imported the mbox template and all its dependencies, whenever I use mbox no border is drawn and the box is not centered on the page (the text within is centered properly).

As far as I have determined, it appears that the Message_box module does not set a border for its style. I can only get a border when I manually add a style: {{#invoke:Message box|mbox|style = border: solid|text = ...}}.

Thus, I believe that there is some default CSS setting that sets the box properties that I do not have because it is not imported automatically.

How do I edit the CSS of the Module:Message_box objects? VOIstri (talk) 14:11, 11 April 2018 (UTC)

You will also need to include the relevant CSS rules from MediaWiki:Common.css, into your site's version of MediaWiki:Common.css. Can't say for sure which ones would be relevant in this case. Probably start with those including border: 1px solid #a2a9b1;.
Update:
It's probably the following:
table.ombox {
	margin: 4px 10%;
	border-collapse: collapse;
	border: 1px solid #a2a9b1;       /* Default "notice" gray */
	background: #f8f9fa;
}
But better get all the related ones, in case Mbox-similar templates are also going to be used. AhmadF.Cheema (talk) 14:55, 11 April 2018 (UTC)
Ah, I see. Thank you very much. I think that will solve the problem exactly.
I will ask at the relevant template pages to mention this because it will not be obvious to people who don't already know this. Perhaps everybody does know this, and it was just I who was ignorant, but I will request it anyway :)
Thank you very much again. VOIstri (talk) 16:20, 11 April 2018 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Moved wiki - User Contributions are 'lost' once a user logs in for the first time on the new wiki

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


We had a mediawiki that was on 1.15 on Debian 6, and decided it would be easiest/best to start fresh on 1.30/Debian 9 and use the XML export/import method. We've got everything working as we had hoped, except for one annoyance.

Our users are logged in to mediawiki via LDAP/Auth_remoteuser extension. As it stands, we can look at the User Contributions page for a particular user, and it shows their list of contributions. At the top of the page it says "User account "Bobby.Black" is not registered." This part was expected. However, once "Bobby.Black" logs in for the first time on our new wiki, the content of that page are lost. His name still shows up in the History tab of individual pages, but when we search for his contributions on the Special:Contributions page, it does not have any results. Presumably it will show all future contributions.

I'm guessing something is happening where once the user signs in, they are registered, but given a new unique identifier or something. Is there a way to prevent this, or fix it after the fact? We have not made the new wiki our production version yet, so I can revert changes and whatnot if I need to.

And perhaps to better illustrate/break this down:

Old Wiki

https://old-wiki/wiki/Special:Contributions/Bobby.black

- history of contributions are listed.

- user is registered

New Wiki - Before Bobby logs in

https://new-wiki/wiki/Special:Contributions/Bobby.black

- history of contributions are listed.

- user is NOT registered. (as expected)

New Wiki - After Bobby logs in

https://new-wiki/wiki/Special:Contributions/Bobby.black

- history of contributions are no longer listed.

- user is registered

Product Version
MediaWiki 1.30.0 (4c97eee)

19:35, 2 March 2018

PHP 7.0.27-0+deb9u1 (apache2handler)
MariaDB 10.2.14-MariaDB-10.2.14+maria~stretch-log
ICU 57.1
SoftekIS (talk) 17:50, 11 April 2018 (UTC)
Can you explain how the user has contributions before logging in for the first time? My theory is that pages were imported somehow before the user exists on the database, and the revision table attribute those revisions to a rev_user = 0, but rev_user_text is set with the name of the user. Special:Contributions sees that the user doesn't exist, and queries the table by rev_user_text instead of rev_user. Once the user exists, the query changes by rev_user and then it no longer lists past contributions.
This, however, is probably expected. Imported revisions before the user exists may not be made by the same user (they may be imported from a different wiki that coincidentally the user name is the same) Ciencia Al Poder (talk) 14:02, 15 April 2018 (UTC)
I believe you are correct in your line of thinking, and I actually went down that path of logic last Friday. Our 'fix' was to have all our users login to the new wiki so that their account was registered, and then we wiped and re-imported all of the pages. Now all our users have retained their contribution history.
Thanks! SoftekIS (talk) 17:00, 16 April 2018 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

How to stop getting notifications for threads i'm not subscribed to?

i keep getting notifications for something i never starred. Johnywhy (talk) 19:53, 11 April 2018 (UTC)

You probably have the page or talk page in your watchlist. This causes that every new thread added to the board (the page or talk itself) will trigger a notification. Unwatch the page and you should be done. Ciencia Al Poder (talk) 14:15, 15 April 2018 (UTC)
it's not starred. That means it's not watched, correct? Johnywhy (talk) 23:44, 16 April 2018 (UTC)
Do you mean the page or the thread? You won't get notifications if neither the page nor the thread is starred. Ciencia Al Poder (talk) 10:12, 17 April 2018 (UTC)

How to apply $egApprovedRevsNamespaces to multiple namespaces?

The example given in the doc shows only one namespace:

$egApprovedRevsNamespaces[] = NS_USER_TALK;

but i want to add more than one namespace. How's it done?

@Yaron Koren Johnywhy (talk) 21:58, 11 April 2018 (UTC)

I believe this is correct:
$egApprovedRevsNamespaces[] = array( NS_MAIN, NS_DRAFT);
This syntax is php syntax, and not specific to ApprovedRevs.
NS_MAIN is included in ApprovedRevs by default, so the above statement is technically unnecessary. The following is will not override NS_MAIN for ApprovedRevs:
$egApprovedRevsNamespaces[] = NS_DRAFT;
Johnywhy (talk) 22:46, 11 April 2018 (UTC)
The easiest solution is to just have one line for each such namespace. Yaron Koren (talk) 23:49, 11 April 2018 (UTC)
Great! But will the `array` syntax also work? -thx Johnywhy (talk) 23:52, 11 April 2018 (UTC)
I doubt it, but I'm not sure. Yaron Koren (talk) 00:48, 12 April 2018 (UTC)
seemed to work, but only tried example above (which includes NS_MAIN). So not a strong test. Johnywhy (talk) 01:52, 12 April 2018 (UTC)

How to search this page?

  • I can't do a browser page-search, cuz the page loads progressively as you scroll.
  • Can't do archive-search (on the right), cuz i want to search recent topics, not archived.
  • Only option i can see: site-wide search with `intitle:Support_desk`, but not too convenient, and includes archives. Johnywhy (talk) 23:44, 11 April 2018 (UTC)
See https://phabricator.wikimedia.org/T62493 AKlapper (WMF) (talk) 12:33, 12 April 2018 (UTC)
ah, so Project:Support desk isn't even indexed in builtin search.
Seems like a job for StructuredDiscussions team.
maybe google would work. Johnywhy (talk) 16:08, 12 April 2018 (UTC)

How To Hide a Namespace from a Group?

all extensions i've found for this are unmaintained/abandonded/obsolete.

here's a CSS method from 2017-- any downside to it?

this isn't for security purpose, just visibility. Not "sensitive' content. Johnywhy (talk) 23:46, 11 April 2018 (UTC)

There's a thing called "hidden categories". See Help:Categories#Hidden categories. It doesn't work by user group, but there's a user preference to display hidden categories. If the purpose is to hide those categories from the general reader, this is the most effective way. Ciencia Al Poder (talk) 14:14, 15 April 2018 (UTC)
Thx! But want to hide a namespace, not category. Johnywhy (talk) 23:43, 16 April 2018 (UTC)

Critical Bug: Can't Save Pages. Intermittent.

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


MW 1.30

gunretort.xyz

When i try to save or create a page containing the following raw link (not wrapped in link characters), i get an error:

http://www.nationmaster.com/country-info/stats/Government/Government-corruption-rating#-amount
Forbidden
You don't have permission to access /index.php on this server.
Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.
It doesn't happen if it's the very first line in the body, but happens if in middle or end of article.

I checked length, and was able to increase length of article, no problem as long as didn't include that link.

I'm able to save this and other pages, no problem, as long as that url is not included. Johnywhy (talk) 02:26, 12 April 2018 (UTC)

Update: now getting the same error trying to save a page containing no url. The body is not excessively long either.
I could start disabling extensions until it goes away. But before going down that road, are there some logs I can check?
I have verbose errors enabled, but the above error is all I got.
Again, it's intermittent, which is weird. Johnywhy (talk) 04:09, 12 April 2018 (UTC)
I'll try this possible fix at next opportunity
https://www.mediawiki.org/wiki/Project%3ASupport%20desk/Flow/2012/02#h-%5BRESOLVED%5D_index_file_exception_on_save-2012-02-06T02%3A20%3A00.000Z
or
https://www.mediawiki.org/w/index.php?title=Extension%20talk%3ALiquidThreads/2011#c-129.70.125.17-2011-05-18T10%3A11%3A00.000Z-Mottavibrannon-2011-03-30T06%3A29%3A00.000Z Johnywhy (talk) 04:37, 12 April 2018 (UTC)
My shared host has confirmed that ModSec rules were triggered. I'm first trying to whitelist just the triggered rules, instead of disabling modsec completely. Seems wise to retain some security if possible. Johnywhy (talk) 07:04, 12 April 2018 (UTC)
ID of the triggered rules are "243420" and "211050". Since it's shared hosting, they had to whitelist on the server side.
It might be possible to whitelist by .htaccess, but namecheap does not allow .htaccess modsec config, they must do it server-side. i've read "for ability to mitigate modsec via htaccess compile modsec with the --enable-htaccess-config flag."
On hosts that allow modsec via .htaccess, some tips here: https://stackoverflow.com/questions/12928360/how-can-i-disable-mod-security-in-htaccess-file
i'm curious of english description of rules triggered, but i cannot find a reference list of modsec rule ID's. Johnywhy (talk) 05:35, 12 April 2018 (UTC)
Trying to post js to common.js triggered modsec rules of types HTTP, XSS, and SQL (?).
So I opted to disable ModSec completely for my mediawiki. Johnywhy (talk) 19:54, 13 April 2018 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Active User's List not listing all active members

I have recently noticed that the active user's list on a Wiki I work on occasionally excludes people who have been active for some reason.

https://wikia.lordofthecraft.net/index.php?title=Special:ActiveUsers

https://wikia.lordofthecraft.net/index.php?title=Special:Contributions/TheMostGinger

https://wikia.lordofthecraft.net/index.php?title=Special:Contributions/SandergamingNL

As you can see, these two users who have made a few edits within the last 30 days are not included on the list. There is probably something I am missinghere, however to me this looks like a bug. Any help in figuring this out would be greatly appreciated. 2samspan (talk) 03:11, 12 April 2018 (UTC)

You may try running updateSpecialPages.php manually. Ciencia Al Poder (talk) 14:11, 15 April 2018 (UTC)

Bugs when commenting on this page

I'm getting incorrect behavior in Flow, here at Project:Support desk

  • Textbox autogrows too far. when text is still short.
  • Entire paragraphs mysteriously disappear while typing.

Experienced this on 2 different computers today.

i'm guessing StructuredDiscussions or some related component was updated recently on MediaWiki.org?

Reported here: https://phabricator.wikimedia.org/T192054 Johnywhy (talk) 06:02, 12 April 2018 (UTC)

How to hide wikiEditor when TinyMCE is active?

it's confusing to show both, and if you click a dropdown on the wikiEditor , it goes behind TinyMCE.

i tried some CSS, but this doesn't work for unknown reason:

.wikiEditor-ui-top{display:none}

wikiEditor remains visible with above CSS.

Other problem with using CSS is, if user goes to "edit source", then they won't get TinyMCE, in which case we want wikiEditor to be visible. Maybe can do a conditional with CSS3? Johnywhy (talk) 07:00, 12 April 2018 (UTC)

Syntax Highlighting <source lang="perl" line> doesn't work

Hi Guys,

Below are the MediaWiki version and the SyntaxHighlight Extension version we are using in our wiki.

Product Version
MediaWiki 1.26.4
PHP 5.6.14 (cgi-fcgi)
MySQL 5.6.25-log
SyntaxHighlight 2.0 GPL-2.0+

In the wiki markup, the following:

<source lang="perl" line>

...

...

</source>

Should result in a code block rendered with perl syntax highlighting and line numbers down the left hand side. However, now it is a simple black text block without line numbers.

Can this be remedied?

Please help me with this. Thanks in advance.

@Zewas

@Egon.allison

@MarkAHershberger

@Ashni rai Sethu S P (talk) 11:54, 12 April 2018 (UTC)

Did you insert the text while editing through the VisualEditor or while editing the source code directly? AhmadF.Cheema (talk) 12:37, 12 April 2018 (UTC)
Hi @AhmadF.Cheema
Thanks for the response.
I inserted the text while editing through the VisualEditor(Rich text). Even the code you gave above renders like below.
<br/> def quickSort(arr):<br/>     less = []<br/>     pivotList = []<br/>     more = []<br/>     if len(arr) <= 1:<br/>         return arr<br/>     else:<br/>         pass<br/>
Not sure what am doing wrong here
Thanks & Regards,
SethuSP Sethu S P (talk) 06:14, 13 April 2018 (UTC)
@AhmadF.Cheema - but the @Sethu S P wiki version is so out of date so it currently at risk of bugs and security flaws.
@Sethu S P - please update your MediaWiki version first before getting help. If you update it then your wiki will be better protected against vandals and hackers.
We will wait until @Sethu S P reply to @AhmadF.Cheema comment. 2A02:C7F:963F:BA00:419E:5652:917D:2F86 (talk) 20:48, 12 April 2018 (UTC)
Hi,
Thanks for the suggestion. This is our organisation's wiki site. We currently have a proposal going on for upgrading the application but it might take ages. So we are looking for a quick fix for this issue.
Thanks & Regards,
SethuSP Sethu S P (talk) 08:56, 13 April 2018 (UTC)
@Sethu S P - so you has a private wiki with unsupported mediawiki version and you claim it "take ages" to update.
On Version lifecycle: "Versions included in the above table that are marked as obsolete as well as versions not listed at all will not receive any security fixes. They may contain critical security vulnerabilities and other major bugs, including the threat of possible data loss and/or corruption. The release manager has also issued a strong recommendation that only versions listed above as current version or legacy version should be used in a production environment."
So, the latest version of MediaWiki (1.30) will be supported until December 2018 (one year), while the LTS version of MediaWiki (1.27) is supported until June 2019. Right now, everyone should update MediaWiki into supported version. 94.192.219.200 (talk) 12:40, 13 April 2018 (UTC)
Hi,
It takes ages for the proposal to be approved and into process. In the meantime we are trying to fix this bugs so that our users will still be able to use it without any issues. Thanks for your suggestion again and please let us know if there's any work around for the same.
Thanks & Regards,
Sethu S P Sethu S P (talk) 10:40, 16 April 2018 (UTC)
  • Start the process now for upgrading to the next LTS. The next LTS is coming out in June and will be supported until June 2021. If you do that, you should be able to plan and always have a supported version of MediaWiki installed.
  • I haven't tried using the syntax highlighting with perl, so I just confirmed that it works in the latest version. Your choices to get it working are:
    • upgrade to a supported version, or
    • do the work to backport the current version of the syntax highlighter for your current wiki yourself.
I think you have a compelling case for an upgrade in June to bring to anyone who wants support for perl syntax highlighting in wiki. MarkAHershberger(talk) 16:40, 16 April 2018 (UTC)

unable to use imagemagick with MW 1.23

thumbnail is not generated. I granted guest acount, entered required entries in localsettings file. Since there is no Image.php file, i skipped this step.

I ran it on Windows with IIS.

Please help 88.255.123.50 (talk) 16:13, 12 April 2018 (UTC)

Welcome to MediaWiki Support desk.
Since you are running a outdated version of MediaWiki, you are going to run into bugs and security flaws. We will won't get help if you run a outdated version of MediaWiki,
Please update your MediaWiki version before getting help. 2A02:C7F:963F:BA00:419E:5652:917D:2F86 (talk) 20:33, 12 April 2018 (UTC)

Fatal Error when logging in after update

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


I just updated to version 1.3, and followed the direction to fix the infophp to fix that error, and now the wiki will load when I'm not logged in, but as soon as I try to log in it gives me this page: "i.is.cc/10wPSoeo.jpg"

How do I fix this, or how do I restore my previous version?

Thanks. PelicanGaming (talk) 16:52, 12 April 2018 (UTC)

1.3 is too old, may contain security issues and bugs, it is recommended to upgrade to 1.30. 星耀晨曦 (talk) 16:56, 12 April 2018 (UTC)
Oh, well, I mean 1.30...thinking normal decimal rules of dropping the zero... PelicanGaming (talk) 16:58, 12 April 2018 (UTC)
Have you run update.php after the upgrade? If you ran, we need detailed error message. Add to your LocalSettings.php:
$wgShowExceptionDetails = true;
$wgShowDBErrorBacktrace = true;
星耀晨曦 (talk) 17:14, 12 April 2018 (UTC)
From the error message thrown by PHP, PHP may not have permission to write /tmp? 星耀晨曦 (talk) 17:15, 12 April 2018 (UTC)
YEY! it's working! Thank you. PelicanGaming (talk) 17:55, 12 April 2018 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Visual Editor help!

Hello, I'm trying to install Visual Editor on my wiki. But it just does not make sense to me... Could someone please provide some kind of easy step by step guide for installing Parsoid and Node.js on my server?

Many thanks :) Ztiruam (talk) 18:31, 12 April 2018 (UTC)

Extension:VisualEditor provides installation instructions. Malyacko (talk) 09:01, 13 April 2018 (UTC)
So I got to the stage where you need to run npm install in the parsoid directory, but it gives me tons and tons of "fetch failed" errors. I tried npm install package.json and I got no errors. But it still didnt install? Im on a web hosting server so I cant use sudo... What is the problem? Ztiruam (talk) 10:01, 13 April 2018 (UTC)

embed chat

Hi. I would like to add a chatango chat to my wiki, similar to what the LM Wiki has (https://lostmediawiki.com/Home), but I don't know where to embed the code. I have seen that on that site, it works perfectly, but I couldn't find the source code to see how it was implemented and I even asked the staff there, but I got no response. Would anyone please point me in the right direction?

I do have the chatango code. That is not the issue. The issue is that I do not know where to place the code on my wiki. Common.js was my first thought, but it didn't work. I have tried looking up the code on their site, but couldn't find any trace of it. I have tried looking it in their common.js, skin.js, tweeki.js, common.css, skin.css, tweeki.css. No luck. 2001:16B8:2B5D:8F00:816A:C418:8D9B:7542 (talk) 20:29, 12 April 2018 (UTC)

Since it requires a script tag (I guess the chat will be loaded in the exact place the script is put on the page), you'll need to add it directly to the wiki page you want. Since <script> tags aren't allowed in wiki text, you should install Extension:Widgets, create a widget with the script tag, and add the widget on the page you want. Ciencia Al Poder (talk) 09:33, 13 April 2018 (UTC)
But if you check that wiki, you will see that the chat is across the entire wiki, not just in one page. How do I make it global? 2001:16B8:2B63:1700:84FF:3121:F065:1A83 (talk) 17:52, 13 April 2018 (UTC)
See the page source of your link: Looks like they load that code in the footer so you could try to edit your footer: Manual:Footer Malyacko (talk) 20:21, 13 April 2018 (UTC)
I really don't see how it can fit in there since this is a script not a page on the wiki. This is the code that I need to embed: https://pastebin.com/8i3Gk7Y2 2001:16B8:2B2B:1F00:84FF:3121:F065:1A83 (talk) 19:08, 14 April 2018 (UTC)
No, this is not a script. It's HTML code, because it requires a <script> tag with an ID and style properties that you won't get if you only add the script code itself to MediaWiki:Common.js.
You may try to add the script tag dynamically with JavaScript, but I'm not sure if it will work. Ciencia Al Poder (talk) 09:48, 15 April 2018 (UTC)
So is there a definitive solution to embedding this chat? 2001:16B8:2BEE:2D00:70AE:C5A1:3FBD:4F6B (talk) 13:00, 15 April 2018 (UTC)
No. Malyacko (talk) 17:54, 16 April 2018 (UTC)

How to debug with HHVM?

Hello. I have been trying to debug several errors related to skins in the my wiki. The wiki uses MediaWiki 1.30 on a Webhostface server. How can I install XDebug onto HHVM and where are debug files located in the MediaWiki directory? By the way the errors looked like this:

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

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 Newman2 (talk) 21:34, 12 April 2018 (UTC)

sending music how can i send a recording

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


would like to post a recording to colledge radio Fast408jack (talk) 23:22, 12 April 2018 (UTC)

Wrong support forum. AhmadF.Cheema (talk) 05:16, 13 April 2018 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Mediwiki with https makes [//site.com to https://site.com

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


After my provider offered https i installed this - and now all weblinks in the footer with : [//site.com

result in https://site.com - even thought the external sites may not offer https..

I must now change (my wiki has over 1500 sites) [// to [http:// Who knows a solution for // , eventually in the localsettings. Manbu (talk) 11:54, 13 April 2018 (UTC)

What exactly is "this" in "I installed this"? Malyacko (talk) 14:04, 13 April 2018 (UTC)
That's exactly what `//` links are for, it will use the protocol of the current page. If you don't want a link automatically using the protocol of the current page, then specify a protocol. 110.149.117.24 (talk) 12:04, 14 April 2018 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

How To Enable Beta Features for All Users?

How to enable all beta features, including page previews, for all users?

The extension below was supposed to do that, but it is archived.

Extension:UsabilityInitiative Johnywhy (talk) 21:54, 13 April 2018 (UTC)

Don't know how all beta features can be enabled, they probably will be required to be done so, individually.
By "page previews", do you mean the "Preview" tab in Extension:WikiEditor?
If so, use the following:
$wgDefaultUserOptions['wikieditor-preview'] = 1;
You might also need to add the following or the Editor might be buggy (probably because of some of the features being deprecated and no longer maintained):
$wgDefaultUserOptions['usebetatoolbar'] = 1;
$wgDefaultUserOptions['usebetatoolbar-cgd'] = 1;
AhmadF.Cheema (talk) 11:09, 14 April 2018 (UTC)
(For the records, "Page Previews" is an old name for Extension:Popups) Malyacko (talk) 08:09, 16 April 2018 (UTC)

The version of Recaptcha used for anon edits has been shut down.

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


The Recaptcha box shows this instead of an actual captcha (interestingly, it still works if you type the text, heh):

https://www.gstatic.com/recaptcha/images/v1_unsupported.png

-Graptor ~ 72.49.219.101 (talk) 22:06, 13 April 2018 (UTC)

The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Almost Nothing work

I don't know how it's possible but I installed MediaWiki and nothing work fine,

When I try to edit page I have 99% time this error "Certaines parties du formulaire de modification n’ont pas atteint le serveur, vérifiez que vos modifications sont intactes et essayez à nouveau." ( And that's really 99% of the time, can go up to 154 times tried until the edit work ).

Mail don't work, can't get back my password or validate my e-mail.

Can't upload files, ...

I'm really tired to try 81.67.239.29 (talk) 15:42, 14 April 2018 (UTC)

I tried under WIN10 instead and ( currently ) no problem. 81.67.239.29 (talk) 15:59, 14 April 2018 (UTC)
First, please tell your MediaWiki version, PHP version and MySQL/MariaDB version so i can help you. 2A02:C7F:963F:BA00:D9DE:EDCC:B34F:7AEC (talk) 18:14, 14 April 2018 (UTC)

Where to put TRIM in Extension:Page_Forms?

Extension :Page Forms breaks when user-entered name ends in a trailing space.

To fix, where in the extension code would one place a PHP trim() Function?

=== Internal error ===
[Ws67PpT2BBCEdzFEIF@mHwAAAVQ] /index.php/Special:FormStart?page_name=All+governments+are+tyrannical+by+nature.+&form=Retort&namespace=Draft Wikimedia\Assert\ParameterAssertionException from line 63 of /home/gunsywtx/public_html/vendor/wikimedia/assert/src/Assert.php: Bad value for parameter $dbkey: invalid DB key 'FormEdit/Retort/Draft:All_governments_are_tyrannical_by_nature._'
Backtrace:
#0 /home/gunsywtx/public_html/includes/title/TitleValue.php(82): Wikimedia\Assert\Assert::parameter(boolean, string, string)
#1 /home/gunsywtx/public_html/includes/specialpage/SpecialPage.php(100): TitleValue->__construct(integer, string, string)
#2 /home/gunsywtx/public_html/includes/specialpage/SpecialPage.php(84): SpecialPage::getTitleValueFor(string, string, string)
#3 /home/gunsywtx/public_html/includes/specialpage/SpecialPage.php(629): SpecialPage::getTitleFor(string, string)
#4 /home/gunsywtx/public_html/extensions/PageForms/specials/PF_FormStart.php(130): SpecialPage->getPageTitle(string)
#5 /home/gunsywtx/public_html/extensions/PageForms/specials/PF_FormStart.php(164): PFFormStart::getFormEditURL(string, string)
#6 /home/gunsywtx/public_html/extensions/PageForms/specials/PF_FormStart.php(81): PFFormStart->doRedirect(string, string, NULL)
#7 /home/gunsywtx/public_html/includes/specialpage/SpecialPage.php(522): PFFormStart->execute(NULL)
#8 /home/gunsywtx/public_html/includes/specialpage/SpecialPageFactory.php(578): SpecialPage->run(NULL)
#9 /home/gunsywtx/public_html/includes/MediaWiki.php(287): SpecialPageFactory::executePath(Title, RequestContext)
#10 /home/gunsywtx/public_html/includes/MediaWiki.php(851): MediaWiki->performRequest()
#11 /home/gunsywtx/public_html/includes/MediaWiki.php(523): MediaWiki->main()
#12 /home/gunsywtx/public_html/index.php(43): MediaWiki->run()
#13 {main}
Solved: Page_Forms doesn't like trailing spaces in article name.

https://www.mediawiki.org/wiki/Extension_talk:Page_Forms#Bug?_Form_doesn't_like_an_article-name.

@Yaron Koren Johnywhy (talk) 19:39, 14 April 2018 (UTC)

Template doc not showing on template page

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


I have imported a template which includes its doc page, but on my wiki once I imported it all, it does show the doc on the template page, it doesnt work for any templates, how can I fix this?

All it shows is:

"{{ {{#if:|{{{template}}}|documentation}} }} [[Category:Mbox templates{{#translation:}}]]" Quinnj09 (talk) 20:58, 14 April 2018 (UTC)

- Quinnj09 (talk) 21:21, 14 April 2018 (UTC)
Managed to resolve it. Was as simple as ParserFunctions needed to be enabled in localsettings Quinnj09 (talk) 11:09, 15 April 2018 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Creating multiple new pages /templates from a single txt file

Version: mediawiki 1.30 Sql./apache up to date (upgraded today)

Url https://jollycontrarian.com

Hi I have a long (80pp) wikified text document that I would like to upload and automatically split into series of template articles (say 200 or more), each with a systematic title as set out in the document.

I would also like to batch create 200 mainspace pages, similarly systematically titled, calling to those templates.

Is there an automated way of doing that? None of the extensions seem to quite address this scenario. ElectricRay (talk) 12:40, 15 April 2018 (UTC)

API:Main page (and/or use a bot to contact the API) Malyacko (talk) 08:06, 16 April 2018 (UTC)
Thanks for that. I'm not a programmer and it's a bit beyond my comprehension/capability to implement. ElectricRay (talk) 13:32, 16 April 2018 (UTC)
You can also use the manual:edit.php maintenance script in say a bash scripting file (Which might require less programming, but probably still some).
Something like (Assuming the files are in a myfiles directory of your home directory on the server mediawiki is on):
cd mywiki/maintenance
for i in ~/myfiles/*
do php edit.php "`basename $i`" < "$i"
done
Bawolff (talk) 08:40, 23 April 2018 (UTC)

Created a new portal but all new pages come up with template:

I created a new portal namespace, but all the pages to be created on the main page for portal starts with 'template:' Quinnj09 (talk) 16:14, 15 April 2018 (UTC)

Show your namespace configuration. wargo (talk) 17:13, 15 April 2018 (UTC)
Templates are transcluded from the Template: namespace by default. If you want to transclude pages from other namespaces (for example, a subpage or similar) you'll need to add a colon at the start of the page name. See Help:Templates#Usage Ciencia Al Poder (talk) 18:42, 15 April 2018 (UTC)
Namespace config in localsettings.php:
// Load extra namespaces
// Define constants for my additional namespaces.
define("NS_My_NameSpace", 3000); // This MUST be even.
// Add namespaces.
$wgExtraNamespaces[NS_My_NameSpace] = "My NameSpace";
$wgNamespacesWithSubpages[NS_My_NameSpace] = true;
I then created 'Main Page' in namespace 'My NameSpace'
In the source added {{{{FULLPAGENAME/INTRO}}
But it displays on the page when saved as: Template:My NameSpace:Main Page/Intro
When Im expecting to see: My NameSpace:Main Page/Intro
I had a look at the page Ciencia Al Poder mentioned but cannot work out what I have done wrong. Quinnj09 (talk) 10:02, 17 April 2018 (UTC)
try {{:{{FULLPAGENAME}}/Intro}} Ciencia Al Poder (talk) 10:08, 17 April 2018 (UTC)
Yeh that works, but I don't understand why {{{{FULLPAGENAME}}/Intro}} doesn't work, when it works on this wiki: https://en.wikipedia.org/wiki/Portal:San_Diego%E2%80%93Tijuana Quinnj09 (talk) 10:14, 17 April 2018 (UTC)
Just a guess, but maybe FULLPAGENAME is encoding the space in some way, thus making the template call think it doesn't contain the correct namespace?
Also check that your page is legit using a namespace, and not just a page title which looks like a namespace, by using {{NAMESPACE}}. If you created the page prior to creating the namespace, it will still actually be a page in the mainspace still, which could cause issues. 121.214.61.173 (talk) 13:51, 17 April 2018 (UTC)
Or simply {{/INTRO}} wargo (talk) 19:51, 17 April 2018 (UTC)
For debugging purposes, what is the output of {{subst:FULLPAGENAME}} on that page?
Also, I think $wgExtraNamespaces[NS_My_NameSpace] = "My NameSpace"; should be $wgExtraNamespaces[NS_My_NameSpace] = "My_NameSpace"; (I'm not sure if that's actually required or just a convention, but worth checking to see if it fixes things) Bawolff (talk) 08:35, 23 April 2018 (UTC)

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


Hello! Beginner user here. I am facing an issue with my MediaWiki installation that I cannot find any solution to on Google. I hope you can give me a hand or at least put me in the right direction.

Basically, anchor links seem to work seamlessly since I can navigate to sections of any article by clicking on the TOC's links. However, in the Special:Preferences sections, I am not able to navigate to any of the other four sections that are accessed, for example, as Special:Preferences#mw-prefsection-rendering or Special:Preferences#mw-prefsection-rc. The URL on the browser would change to include the #... part, but nothing would happen.

I just installed a clean MediaWiki:
MediaWiki: 1.30.0
PHP: 5.6.32 (fpm-fcgi)
MariaDB: 10.1.29-MariaDB-1~jessie
ICU: 52.1
Any tips would be extremely appreciated! Thank you so much :) Parlance (talk) 12:19, 16 April 2018 (UTC)
Additionally, the arrows to sort tables also do not appear. I assume this is related to some JavaScript error preventing the load of the scripts. How should I proceed towards solving this? Parlance (talk) 04:18, 18 April 2018 (UTC)
See Manual:Errors and symptoms#Missing edit toolbar, JavaScript not working Ciencia Al Poder (talk) 09:40, 18 April 2018 (UTC)
Indeed, it was due to some settings on the Apache server that prevented some connections and running of the phps, which resulted in a few functionalities not working for some users. Cheers! Parlance (talk) 06:37, 27 April 2018 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

multiple text/content columns on a mediawiki page??

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


Hi Everyone,

I am migrating a popular wiki to MediaWiki: http://ArduinoInfo.Info

I have done a LOT of searching for this and I'm not finding a solution.

I simply want to create 3 columns on a wiki page, and be able to put content in them. The reason is I have 3 major categories in my main introduction page and I want to add content and links to each column.

How can I do this? What am I missing? Trying to use a table seems very difficult to manage.

Text oriented software like WORD handles this, of course, as does DreamWeaver etc..

WikiPedia seems to support this: https://en.wikipedia.org/wiki/Help:Columns

Suggestions and comments welcome!! Here's my start on the main page:

http://arduinoinfo.mywikis.net/wiki/HOME

Regards, Terry King

...In The Woods in Vermont, USA

terry@yourduino.com TerryKing (talk) 16:44, 16 April 2018 (UTC)

English Wikipedia uses templates for that, so you could (try to) copy these templates to your wiki. I don't think that MediaWiki itself currently offers some markup command to create such CSS based, non table based layouts. Malyacko (talk) 17:48, 16 April 2018 (UTC)
Hi.
Thanks@Malyacko ! I have it basically working using tables. See: http://arduinoinfo.mywikis.net/wiki/HOME
I THINK it will be OK; It took a while to understand how to control the column widths, and to 'discover' that the widths are RELATIVE to the "Available screen width" of the particular user.
Wow. I feel 10% less stupid than I did this morning....
Regards, Terry King
...In The Woods in Vermont, USA
terry@yourduino.com TerryKing (talk) 19:55, 16 April 2018 (UTC)
Off-topic comment: @TerryKing - Sorry, some parts of your wiki is in Comic Sans! Please don't use Comic Sans! 2A02:C7F:963F:BA00:4C36:2018:2EAF:66C5 (talk) 07:16, 17 April 2018 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Beyond my skill set

I have 'purchased' space from a hosting service and they have installed the basic mediawiki software onto their server. I need to add extensions to my personal wiki so that I can properly format in-line references and citations. They informed me that I would have to find a 'developer' to install extensions. If this is the wrong forum to post this problem, please forgive me. How do I find a person who can install the extensions for me. What extensions do I need?
Barbara Page Barbara (WVS) (talk) 17:13, 16 April 2018 (UTC)
The statement by that hosting service surprises me - in my opinion and generally speaking, to install software you won't need 'developers' (as you don't want to change the software) but sufficient permissions on the system to install the software (the term "system administrator" is used in this context), as far as I know. Malyacko (talk) 17:51, 16 April 2018 (UTC)
Some hosting services will install extensions as part of normal services. See: http://mywikis.net They do it for me... TerryKing (talk) 17:36, 16 April 2018 (UTC)
Great Responses, thank you. I'll bug my hosting provider. What extensions do you think I need to create inline citations?
Thanks again,
Barbara Page Barbara (WVS) (talk) 20:39, 16 April 2018 (UTC)
See Manual:Extensions for information about installing extensions Ciencia Al Poder (talk) 10:11, 17 April 2018 (UTC)
Perhaps they thought you meant you wanted custom extensions created for your wiki, not just installing existing ones (which is very simple), hence them saying you need a developer? 121.214.61.173 (talk) 13:53, 17 April 2018 (UTC)
The most common extension for inline citations is Extension:Cite. It is what's used on Wikipedia.
Since MediaWiki 1.21 its included in the default install (You have to enable it during install though), so you may possibly already have it. Bawolff (talk) 08:31, 23 April 2018 (UTC)

Bug? Error on Upload PDF

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


Received unknown error on attempting to upload PDF file to page editor, using WikiEditor and (i believe) UploadWizard.

[WtVQMHPpoT-HKx555YFusQAAABc] Exception caught: No specifications provided to ArchivedFile constructor.

My LocalSettings.php includes the following settings:
$wgStrictFileExtensions = false;
$wgCheckFileExtensions = false;
Any fix?

Reported here.

This may be a php file-size limit. The file is 4.5 MB. Johnywhy (talk) 01:44, 17 April 2018 (UTC)

The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Short URL Problem

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


I have been trying, for some days now, to setup ShortURL

My Server is running Windows 2008, IIS 6.1, Mediawiki 1.28 (installed in C:\inetpub\wwwroot\wiki)

I have setup URL Rewrite as follows:

Requested URL: Matches the pattern

Using: Regular Expressions

Pattern: ^wiki/(.*)$

Ignore case: Ticked

Action:

Action type: Reqrite

Rewrite URL: wiki/index.php?title={UrlEncode:{R:1}}

Append query string: Ticked

And have added the following to LocalSettings.php:

$wgScriptPath = "/wiki";

$wgArticlePath = "/wiki/$1";

$wgUsePathInfo = true;

But when I browse to my wiki using URL http://mywebsite/wiki/, the URL changes to http://mywebsite/wiki/Main_Page as expected, but then I get the following error:

"404 - File or directory not found.

The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable."

Can anyone help? Quinnj09 (talk) 08:50, 17 April 2018 (UTC)

Unrelated: Please upgrade to supported software without security vulnerabilities. See Download and Manual:Upgrading. Malyacko (talk) 08:52, 17 April 2018 (UTC)
Whats wrong with using MediaWiki 1.28? Quinnj09 (talk) 09:18, 17 April 2018 (UTC)
Did you read the first link I posted? :) It is an ancient insecure unsupported MediaWiki version. Malyacko (talk) 11:45, 17 April 2018 (UTC)
Yes it says To MediaWiki ≤ 1.26.x and 1.28.x users: Support of these branches was discontinued. but doesnt say whats wrong with 1.28.
For me to upgrade, I need to convince my manager that its needed.
And do we know if ShortURL should work or not in 1.28? Quinnj09 (talk) 11:52, 17 April 2018 (UTC)
Please upgrade MediaWiki from 1.28 to 1.30. @Quinnj09 is at risk of over 200+ bugs and security flaws. 2A02:C7F:963F:BA00:E969:5558:45CD:1422 (talk) 12:38, 17 April 2018 (UTC)
Any chance of being supplied a list of the top bugs and security flaws that 1.28 to 1.30 fixes? Quinnj09 (talk) 12:40, 17 April 2018 (UTC)
https://phabricator.wikimedia.org/source/mediawiki/browse/REL1_30/RELEASE-NOTES-1.30 2A02:C7F:963F:BA00:E969:5558:45CD:1422 (talk) 12:47, 17 April 2018 (UTC)
I have updated to mediawiki 1.30, but still have the same problem with ShortURL where I get
"404 - File or directory not found.
The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable."
Now that im on the latest version of mediawiki, does anyone know why I would be having this problem? Quinnj09 (talk) 13:21, 17 April 2018 (UTC)
I'm not familar with IIS, but maybe its because the source and target of the rewrite rule overlap? This definitely sounds more like an issue with the rewrite rule config in IIS (as opposed to mediawiki config in LocalSettings.php). I would suggest seeing if IIS has any error logs related to the rewrite rule, and make sure it really is matching what you think its matching.
The behaviour you describe is what would happen in that situation if you had mediawiki configured as you did, but no rewrite rules configured.
p.s. In regards to what's wrong with 1.28 - nothing in particular - its just old, and we can't support everything forever. 1.27 gets supported for a longer time because its an LTS release. Bawolff (talk) 08:29, 23 April 2018 (UTC)
So I finally got our test wiki upgraded to 1.31 (this had to be put on the back burner till time freed up)
and I've got ShortURL working, by using this in localsettings.php:
$wgScriptPath = "/wiki";
$wgArticlePath = "/wiki/$1"; # tells MediaWiki how IIS will be rewriting URLs
$wgUsePathInfo = true;
And this in web.config:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <rewrite>
            <rules>
                <rule name="RedirectUserFriendlyURL1" stopProcessing="true">
                    <match url="^index\.php$" />
                    <conditions>
                        <add input="{REQUEST_METHOD}" pattern="^POST$" />
                        <add input="{QUERY_STRING}" pattern="^title=([^=&amp;]+)$" />
                    </conditions>
                    <action type="Redirect" url="{C:1}" appendQueryString="false" />
                </rule>
                <rule name="RewriteUserFriendlyURL1" stopProcessing="true">
                    <match url="^([^/]+)/?$" />
                    <conditions>
                        <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
                        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
                    </conditions>
                    <action type="Rewrite" url="index.php?title={R:1}" />
                </rule>
            </rules>
        </rewrite>
    </system.webServer>
</configuration> Quinnj09 (talk) 19:44, 14 August 2018 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

[DE] customized replacement of Pppery (alt) (talk) 16:51, 15 March 2025 (UTC)

In German Wikipedia there is a discussion about restricting the content and form of signatures. Currently there is a feature, which allows to add individually customized signatures. The customized signature will only be used and inserted, when a checkbox in the user settings is checked. There are couple of ideas being discussed and one of them is to change the corresponding wikimedia software such that it will not only take into the account the status of this checkmark, but also the namespace in DE-wikipedia, and in specified namespaces just insert the standard signature just as if the checkmark was not set.

Would such a solution be feasible? I'd be willing to provide a patch to discuss further. Could anybody refer me to a file that I should look at or a person who is knowledgeable about the wikimedia software internals? Alturand (talk) 12:43, 17 April 2018 (UTC)

Just a small addition/summary: Would it be easily feasible that checking MediaWiki:Tog-fancysig wouldn't have an effect for certain name spaces, e.g. article name space? Leyo 14:02, 17 April 2018 (UTC)
That's kind of a very specific feature, but if there was demand from a major Wikipedia, like de, it would perhaps be implemented.
Note, that disabling custom signatures totally is currently do-able by doing $wgHiddenPrefs[] = 'nickname'; $wgHiddenPrefs[] = 'fancysig';. However there is no per-namespace support
Code wise, you'd probably want to start looking at Parser::getUserSig() (in includes/parser/Parser.php around line 4558)
For future reference, this is probably not the best place to discuss this. It would probably be better to file a ticket in phabricator maybe, or start a thread on the wikitech-l mailing list. Bawolff (talk) 08:23, 23 April 2018 (UTC)
Thank you Bawolff for this response. I will open a ticket, as soon as the requirement becomes more firm. 194.39.218.10 (talk) 11:20, 23 April 2018 (UTC)

Problem with User URLs

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


When creating a User URL, (by clicking on the red link on the top right), my Wiki returns a 403 Forbidden. This occurs no matter what. User_talk: works as normal, but User: is not working. Other namespaces such as Special: and Talk: are unaffected.

Info: Shared Hosting, Apache Jerryzhu2004 (talk) 13:37, 17 April 2018 (UTC)

The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Extensão para relatório de acessos

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


Bom dia amigos.

Preciso saber quantos acessos foram realizados por página. Existe alguma extensão que faça isso? Caio martins2011 (talk) 15:47, 17 April 2018 (UTC)

Extension:HitCounters Malyacko (talk) 14:01, 18 April 2018 (UTC)
Very thanks my friend. It worked with his tip Caio martins2011 (talk) 18:03, 18 April 2018 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


Is there a way I can generate a list of :

1) all pages with broken internal links

2) all pages with broken external links Quinnj09 (talk) 15:53, 17 April 2018 (UTC)

  1. Not exactly but may be useful: Special:WantedPages
  2. MediaWiki doesn't track if external websites are alive. You would need to run a bot for this. Ciencia Al Poder (talk) 09:42, 18 April 2018 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

MediaWiki Homepage Template/Text Boxes

Is there a step-by-step set of instructions that I can use to implement the mediawiki.com homepage on my recently installed instance of MediaWiki?

I'm specifically looking to add the "Using MediaWiki", "System Administration", and Developing & Extending" boxes to my homepage.

Any help is appreciated. 209.65.131.178 (talk) 17:30, 17 April 2018 (UTC)

not precisely what you're looking for, but Manual:Importing_XML_dumps, is probably in the right direction. Bawolff (talk) 08:15, 23 April 2018 (UTC)

How To Locate an Edit in PHP?

When making or moderating edits, how does php locate the edit in a page?

Eg., i cannot find location info here

API:Edit

It seems the revision history page only does a diff on the entire page. But moderation extension seems to know the precise location-- or is that also just a dif?

Thx Johnywhy (talk) 19:11, 17 April 2018 (UTC)

For each edit, MediaWiki is storing the complete text of a page. The different texts can later be compared - the difference is what you are e.g. seeing in page histories. These diffs however are based on the differences of the two complete texts. 2001:16B8:106D:1200:A41F:2ABD:2909:890B (talk) 21:09, 17 April 2018 (UTC)
Thx. Johnywhy (talk) 23:08, 17 April 2018 (UTC)

User Namespace being Forbidden

When creating a User URL, (by clicking on the red link on the top right), my Wiki returns a 403 Forbidden. This occurs no matter what. User_talk: works as normal, but User: is not working. Other namespaces such as Special: and Talk: are unaffected.

Info: Shared Hosting, Apache Jerryzhu2004 (talk) 05:50, 18 April 2018 (UTC)

Any Ideas? Jerryzhu2004 (talk) 07:40, 18 April 2018 (UTC)
A 403 error is delivered by the webserver, not by MediaWiki itself. You must have some rule configured that's blocking such requests. Look at the error logs of your webserver to find more information about what triggered the error Ciencia Al Poder (talk) 09:39, 18 April 2018 (UTC)
eck also for pseudo-"security" features of your webserver like mod_security.h Bawolff (talk) 08:12, 23 April 2018 (UTC)

Delete Profile

How do I totally delete my profile?!! I want to make sure that everything is completely gone. Any help on the steps please :) NikD11 (talk) 13:06, 18 April 2018 (UTC)

See https://www.mediawiki.org/wiki/Project%3ASupport%20desk/Flow/2012/01#h-%5BRESOLVED%5D_How_i_can_delete_User%3F-2012-01-08T05%3A05%3A00.000Z and https://www.mediawiki.org/wiki/Extension:UserMerge/DeleteAccount if you are an administrator of your own wiki.
If you refer to some third party website that you do not maintain you will have to contact that third party website. Malyacko (talk) 13:59, 18 April 2018 (UTC)

BadBehavior extension still use require_once command in localsettings.php?

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


As I found with most MediaWiki extensions during installation the localsettings.php input is wgLoadExtension for MediaWiki newer versions (>1.17 versions). But I found in installation instruction page of BadBehavior extension they suggested to put require_once command to the localsettings.php. Is it okay to use this command (my MediaWiki version is 1.30.0)? or is the BadBehavior installation instruction page outdated? Biologically (talk) 14:26, 18 April 2018 (UTC)

Newer extensions use the newer wfLoadExtension method after they are updated with an extension.json file. Since Extension:Bad Behavior does not have an included extension.json file, it means it has not been updated to use the newer extension activation method. Therefore, using the require_once command is the up-to-date method for this extension. AhmadF.Cheema (talk) 14:50, 18 April 2018 (UTC)
Thank you so much. I now understood. Biologically (talk) 11:42, 1 May 2018 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Easy way to know if an extension is working properly

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


MediWiki version 1.30.0

Is there any easy way to know if an extension installed on MediaWiki working properly? Or do I have to check all the extensions one by one?

I am particularly concerned about the BadBehavior extension. I had some doubt during its installation. So, I wanted to confirm if it is running properly after the installation or not... Could not find an easy way to know it after reading the support page of the extension.

Please help. Biologically (talk) 14:30, 18 April 2018 (UTC)

You can see if the extension loads properly by looking at Special:Version on your wiki. This of course does not show if the extension is working as "intended".
Ultimately, the only way to know if any computer program is working as you intend it, is to test it. If there was a way to have a computer program tell if another computer program was bug free, a lot of programmers would be out of a job Bawolff (talk) 08:09, 23 April 2018 (UTC)
Thank you so much for the explanation. Biologically (talk) 11:44, 1 May 2018 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

AccessControl error: Invalid or virtual namespace -1 given.

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


I have installed the extension AccessControll for my mediawiki and it works just fine.

But since then i get this message:

[WtdYLOssQC770IFd1RAyBAAAAEM] 2018-04-18 14:37:32: Fatal exception of type MWException

When i try to excess the sidebar links except for Main Page, Help, Print version and page information. Does anybody know what i did wrong? 109.90.189.89 (talk) 14:56, 18 April 2018 (UTC)

See Manual:How to debug how to provide a stacktrace. 86.49.16.183 (talk) 16:07, 18 April 2018 (UTC)
Sorry, here is it:
[WthPfiLU0@olqFqxErNatAAAAEM] /index.php?title=Spezial:Zuf%C3%A4llige_Seite MWException from line 127 of /var/www/vhosts/web81.c10.webspace-verkauf.de/samaywiki.peulings.eu/includes/page/WikiPage.php: Invalid or virtual namespace -1 given.
Backtrace:
#0 /var/www/vhosts/web81.c10.webspace-verkauf.de/samaywiki.peulings.eu/extensions/AccessControl/AccessControl.hooks.php(86): WikiPage::factory(Title)
#1 /var/www/vhosts/web81.c10.webspace-verkauf.de/samaywiki.peulings.eu/extensions/AccessControl/AccessControl.hooks.php(294): AccessControlHooks::getContentPage(integer, string)
#2 /var/www/vhosts/web81.c10.webspace-verkauf.de/samaywiki.peulings.eu/includes/Hooks.php(177): AccessControlHooks::onUserCan(Title, User, string, string)
#3 /var/www/vhosts/web81.c10.webspace-verkauf.de/samaywiki.peulings.eu/includes/Hooks.php(205): Hooks::callHook(string, array, array, NULL)
#4 /var/www/vhosts/web81.c10.webspace-verkauf.de/samaywiki.peulings.eu/includes/Title.php(2194): Hooks::run(string, array)
#5 /var/www/vhosts/web81.c10.webspace-verkauf.de/samaywiki.peulings.eu/includes/Title.php(2636): Title->checkPermissionHooks(string, User, array, string, boolean)
#6 /var/www/vhosts/web81.c10.webspace-verkauf.de/samaywiki.peulings.eu/includes/Title.php(2060): Title->getUserPermissionsErrorsInternal(string, User, string)
#7 /var/www/vhosts/web81.c10.webspace-verkauf.de/samaywiki.peulings.eu/includes/MediaWiki.php(206): Title->getUserPermissionsErrors(string, User)
#8 /var/www/vhosts/web81.c10.webspace-verkauf.de/samaywiki.peulings.eu/includes/MediaWiki.php(851): MediaWiki->performRequest()
#9 /var/www/vhosts/web81.c10.webspace-verkauf.de/samaywiki.peulings.eu/includes/MediaWiki.php(523): MediaWiki->main()
#10 /var/www/vhosts/web81.c10.webspace-verkauf.de/samaywiki.peulings.eu/index.php(43): MediaWiki->run()
#11 {main} 212.201.7.58 (talk) 08:14, 19 April 2018 (UTC)
> I have installed the extension AccessControll for my mediawiki and it works just fine.
> But since then i get this message:
Looks like it doesn't work "just fine" after all :)
There's the same problem reported in Extension talk:AccessControl, with a possible fix. And it doesn't look like a user error, but a bug in the extension. However, I don't see the bug reported on phabricator. Ciencia Al Poder (talk) 09:20, 19 April 2018 (UTC)
@Ciencia Al Poder Thank you very much i got it to work 109.90.189.89 (talk) 16:48, 19 April 2018 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Nice way to change default thumb image align to center in "Visual Editor"?

I'm a admin of a private wiki site.

---

In default setting,

... text text text [[File:example.jpg|'''thumb'''|caption]]  text text text ...

Rendered as a floating block: yes

Rendered inline: no

Rendered caption: yes

---

I wanted to change the default thumb image align to center

so I added my servers's "mediawiki:common.css" following lines.

---

table.wikitable { margin: 0px auto !important; } div.thumb { float:none !important; } div.thumbinner { margin: 0px auto !important; } div.embedvideowrap{ margin: 0px auto !important; }

---

works well. Images, Videos, Table goes to center. Except when I am editing on VE.

Is there any Nicer way to change default thumb image align to center in VE? Libattery (talk) 17:04, 18 April 2018 (UTC)

Mediawiki Buttons

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


I have a wiki running MediaWiki 1.30, but the buttons show like this:

<figure-inline class="mw-default-size"></figure-inline>

but other wiki sides they look like this:

<figure-inline class="mw-default-size"></figure-inline>

How do I make my buttons display like this? Quinnj09 (talk) 20:34, 18 April 2018 (UTC)

Your second screenshot shows what buttons look like, if styled using the default styles and the Vector skin.
I have two questions:
I am using Vector, I see the buttons in the second image on Visual Editor, but not anywhere else. Unfortunately its not public. How can I check the styles? Quinnj09 (talk) 21:34, 18 April 2018 (UTC)
You'd need to adapt things to the OOUI style. This is work in progress. Some parts of MediaWiki already apply the style in the second screenshot, some do not yet. See https://phabricator.wikimedia.org/T107037 and https://phabricator.wikimedia.org/T122014 if you'd like to help. Malyacko (talk) 09:01, 19 April 2018 (UTC)
The purge action is already converted to OOUI. Maybe it's failing to load some resources or JavaScript. Open the developer console of your browser (F12), reload the page and see if there are any errors. Ciencia Al Poder (talk) 09:23, 19 April 2018 (UTC)
The problem was someone had moved an old version of the skin into the sounds folder Quinnj09 (talk) 18:26, 19 April 2018 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Mac 64-bit version

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


Wrong support forum. AhmadF.Cheema (talk) 00:44, 19 April 2018 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

How to make the pictures in MediaWiki adaptive

How to make the pictures in MediaWiki adaptive? 112.20.98.18 (talk) 08:38, 19 April 2018 (UTC)

What do you mean by "adaptive"? Ciencia Al Poder (talk) 09:24, 19 April 2018 (UTC)
If you mean responsive dpi (Where the size of the picture depends on the dpi of the viewing device) that alredy exists.
If you mean automatically changing the image size depending on the width of the browser/etc, try out the Extension:TemplateStyles Bawolff (talk) 08:08, 23 April 2018 (UTC)

Is there a way to disable manual login?

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


I have SAML login enabled with the button "Log in with Google." I want to remove the normal username/password fields with their blue log in button, but haven't been able to figure out. Can this be done? Djkcel (talk) 14:47, 19 April 2018 (UTC)

Go to defaultsettings.php file and set false for non for non login users. Login button disabled. 2405:204:311F:6904:5C7E:BD6:DE7A:9D7 (talk) 14:58, 19 April 2018 (UTC)
The previous comment does neither seem clear nor helpful. Note that defaultsettings.php should not be edited - I don't even know, if a file with that name exists. Local configuration however always belongs into the file LocalSettings.php.
How did you nable SAML login? If that is happening with an extension: Doesn't that extension have a way to remove the superfluous things? If not, you could hide them with CSS... 2001:16B8:1081:F100:C022:FFBF:E50:3889 (talk) 16:49, 19 April 2018 (UTC)
Thank you! I was using the Google Login extension, but I didn't see a way in this module to disable manual logins. I was able to use the CSS by hiding a few fields, wpLoginAttempt etc. Now it only enables Google Login. Djkcel (talk) 15:58, 20 April 2018 (UTC)
Thank you, but I can't find a defaultsettings.php in /includes. I found a copy of it online but it said never to edit, I guess I could copy whatever part I need into localsettings.php. But I can't find the exact field you were referring to, do you know what it's called? Djkcel (talk) 20:18, 19 April 2018 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Is UploadWizard Available in Page Editor?

Or is it only available on a separate "Upload" page? Johnywhy (talk) 17:07, 19 April 2018 (UTC)

WikiEditor offers an "Embedded file" button in its toolbar, VisualEditor offers an "Insert > Media" item. AKlapper (WMF) (talk) 17:57, 20 April 2018 (UTC)
Thx! I appreciate the suggestions.
I'm having licensing issues with WikiEditor, and my webhost doesn't support VisualEditor. Looking for alternatives which are integrated with page-editor. Johnywhy (talk) 18:24, 20 April 2018 (UTC)

Is SemanticWiki the only way to get Topic Tagging?

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


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 Johnywhy (talk) 19:22, 19 April 2018 (UTC)

Categories is the way to go if you don't want SMW. This is exactly the purpose of categories, group similar pages. Ciencia Al Poder (talk) 09:43, 20 April 2018 (UTC)
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. Johnywhy (talk) 18:12, 20 April 2018 (UTC)
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". Bawolff (talk) 08:06, 23 April 2018 (UTC)
> "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 Johnywhy (talk) 17:54, 23 April 2018 (UTC)
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. Bawolff (talk) 02:41, 24 April 2018 (UTC)
I tried your suggestion, but without involving Categories.
  1. Create a namespace called Tag in localsettings.php
  2. Create page Template:Tag containing:
    {{Special:WhatLinksHere/Tag:{{PAGENAME}}|hideredirs=1|hidetrans=1}}
    
  3. Create page Tag:Banana, containing {{Tag}}
  4. Create several pages containing [[Tag:Banana]]
  5. In any page, click the Tag:Banana link, to get a page listing all pages with that tag.
- What's the advantage of your method, involving categories, over this method? Seems to me that, since Tag, like Category, is a namespace, doing Tag:Banana is no different than doing Category:Tag:Banana, except less typing.
- "Cross-reference", meaning: transclude the full list of pages with same tag at bottom of each of them. If i can solve
-> this other issue <-, then i'll have that. Johnywhy (talk) 11:56, 28 April 2018 (UTC)
The only advantage with category pages, is you can distinguish between linking to a page vs including a page. Some people also find the lists of things in categories to be prettier, but if Special:Whatlinkshere works for you, that's great. :)
For cross-reference, you may want to look at the DynamicPageList extension. Bawolff (talk) 16:54, 28 April 2018 (UTC)
"with category pages, is you can distinguish between linking to a page vs including a page"
How? Johnywhy (talk) 17:16, 28 April 2018 (UTC)
If you type [[Category:Foo|What to sort page under]] it just puts the page in the category.
If you type [[:Category:Foo|Text to show for link here]] it will link to the category page, but not include the current page in the category (The current page will be on Special:Whatlinkshere for the category though) Bawolff (talk) 18:07, 28 April 2018 (UTC)
Thx. I don't need to link without including, tho.
Your Category method is a big help!
DPL might help, but Whatlinkshere works well enough.
Getting close to solution, I think. Trying to solve https://m.mediawiki.org/wiki/Extension_talk:Page_Forms#How_to_Pass_forminput_to_Template? Johnywhy (talk) 20:50, 28 April 2018 (UTC)
I've built a topic-tagging system, for inline tags, with some nice features like anchors, descriptions, tag-list, and highlighting. Extension:TopicTags
You can view a demo here. Johnywhy (talk) 19:09, 19 June 2018 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Extension:CategoryTree Not Updating with Cache Enabled

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 (talk) 20:09, 19 April 2018 (UTC)

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. Johnywhy (talk) 21:07, 19 April 2018 (UTC)
Are those old pages still present in the categorylinks table? This can be queried with the API:Categorymembers. If those old pages are still there, then there's a problem with the Manual:Job queue. Ciencia Al Poder (talk) 09:25, 20 April 2018 (UTC)
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). Bawolff (talk) 08:01, 23 April 2018 (UTC)
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 Johnywhy (talk) 17:38, 23 April 2018 (UTC)
There is another place for caching: https://phabricator.wikimedia.org/T35608
We can do something stupid like turn off Ajax if $wgCategoryTreeDisableCache == true. That will work only for newly created pages. If you want a better fix you can skip all cache operations for the case cache is turned off.
extensions/CategoryTree/includes/ApiCategoryTree.php
private function getHTML( $ct, $title, $depth, $ctConfig ) {
global $wgContLang, $wgMemc;
//Added global cache
global wgCategoryTreeDisableCache;
$mckey = wfMemcKey(
'ajax-categorytree',
md5( $title->getDBkey() ),
md5( $ct->getOptionsAsCacheKey( $depth ) ),
$this->getLanguage()->getCode(),
$wgContLang->getExtraHashOptions(),
$ctConfig->get( 'RenderHashAppend' )
);
$touched = $this->getConditionalRequestData( 'last-modified' );
if ( $touched ) {
$mcvalue = $wgMemc->get( $mckey );
if ( $mcvalue && $touched <= $mcvalue['timestamp'] ) {
$html = $mcvalue['value'];
}
}
if ( !isset( $html ) ) {
$html = $ct->renderChildren( $title, $depth );
//Skip cache update if $wgCategoryTreeDisableCache == true
if( $wgCategoryTreeDisableCache != true ){
$wgMemc->set(
$mckey,
[
'timestamp' => wfTimestampNow(),
'value' => $html
],
86400
);
}
}
return trim( $html );
} Urfiner (talk) 17:32, 27 February 2019 (UTC)

If I Cache to Database, then What's Purpose of Cache Directory?

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


If I Cache to Database, then What's Purpose of Cache Directory? Johnywhy (talk) 21:48, 19 April 2018 (UTC)

There are lots of caches used for lots of purposes. There are only two currently that mostly use disk. Localization cache, which uses Manual:$wgCacheDirectory and Manual:File cache which can use Manual:$wgFileCacheDirectory. —TheDJ (Not WMF) (talkcontribs) 08:24, 20 April 2018 (UTC)
Thx! What cache is Extension: CategoryTree likely to use? Purging pages seems to have no effect on it. Johnywhy (talk) 18:04, 20 April 2018 (UTC)
Category structure is stored in database. See Manual:Categorylinks table. If the information in database is incorrect, the problem is not with caching, but with probably Manual:Job queue or some extension causing jobs inserting to database to fail. Ciencia Al Poder (talk) 14:00, 21 April 2018 (UTC)
It seems my CategoryTrees are showing both the old version and new version of moved pages, and there are no unfinished jobs. Maybe not a caching issue. Johnywhy (talk) 15:44, 21 April 2018 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Mysterious skin appearing for those with poor or bad bandwidth

When I was using Firefox v59 (codenamed Quantum) at Windows 7, I encountered this skin at any wiki, like MediaWiki, whenever my bandwidth is poor or bad. What skin is that, and is it useful for those with poor or bad bandwidth and those using dial-up? George Ho (talk) 22:08, 19 April 2018 (UTC)

It's not a skin, just the unstyled HTML. The fact that it is showing that seems like a bug though, as nothing on the page should be displayed until the stylesheet is loaded or failed to load (in which case there would be a significant delay). 121.214.61.173 (talk) 06:57, 20 April 2018 (UTC)
"as nothing on the page should be displayed until the stylesheet is loaded"
That's not entirely true. After all requests have finished, successful or otherwise (and maybe even immediately after the CSS request failed), the browser will basically do best effort presentation if I remember correctly. —TheDJ (Not WMF) (talkcontribs) 07:45, 20 April 2018 (UTC)
"or failed to load" 121.214.61.173 (talk) 11:42, 21 April 2018 (UTC)
But if CSS not loaded, browser don't know how pages would like. wargo (talk) 07:59, 20 April 2018 (UTC)
HTML already has presentation attributes, the browser is able to represent a page even without CSS.
To reply the first question: This is not a skin. This is, in fact, a lack of skin. Ciencia Al Poder (talk) 09:20, 20 April 2018 (UTC)

Search: How to Set Default To "Everything"? and other questions

  • Mediawiki Search: how to set default to "Everything" or "All"?
  • How to set results-per-page to 500 instead of 20?
  • How to prevent search from redirecting to page of same name, and show all results instead?

v 1.30 Johnywhy (talk) 22:28, 19 April 2018 (UTC)

1: You can intercept the search profiles with the SpecialSearchProfiles hook, and change the default, or you need to rewrite the code where that actually gets used.
2: Change this line
3: i don't have a ready proper solution for that. —TheDJ (Not WMF) (talkcontribs) 08:18, 20 April 2018 (UTC)
@Johnywhy, @TheDJ
I figured this out through trial and error for question number 1.
To set Everything as default and remove content pages as a tab option do the following:
Edit SpecialSearch.php which is probably located in "includes\specials" folder.
Go to this section below:
protected function getSearchProfiles() {
// Builds list of Search Types (profiles)
$nsAllSet = array_keys( $this->searchConfig->searchableNamespaces() );
$defaultNs = $this->searchConfig->defaultNamespaces();
$profiles = [
'default' => [
'message' => 'searchprofile-articles',
'tooltip' => 'searchprofile-articles-tooltip',
'namespaces' => $defaultNs,
'namespace-messages' => $this->searchConfig->namespacesAsText(
$defaultNs
),
],
'images' => [
'message' => 'searchprofile-images',
'tooltip' => 'searchprofile-images-tooltip',
'namespaces' => [ NS_FILE ],
],
'all' => [
'message' => 'searchprofile-everything',
'tooltip' => 'searchprofile-everything-tooltip',
'namespaces' => $nsAllSet,
],
'advanced' => [
'message' => 'searchprofile-advanced',
'tooltip' => 'searchprofile-advanced-tooltip',
'namespaces' => self::NAMESPACES_CURRENT,
]
];
Hooks::run( 'SpecialSearchProfiles', [ &$profiles ] );
Now edit the following lines to look like this below (in bold) I recommended typing it in and not copying this entry:
protected function getSearchProfiles() {
// Builds list of Search Types (profiles)
$nsAllSet = array_keys( $this->searchConfig->searchableNamespaces() );
$defaultNs = $this->searchConfig->defaultNamespaces();
$profiles = [
'default' => [
'message' => 'searchprofile-everything',
'tooltip' => 'searchprofile-everything-tooltip',
'namespaces' => $nsAllSet,
'namespace-messages' => $this->searchConfig->namespacesAsText(
$nsAllSet
),
],
'images' => [
'message' => 'searchprofile-images',
'tooltip' => 'searchprofile-images-tooltip',
'namespaces' => [ NS_FILE ],
],
# 'all' => [
# 'message' => 'searchprofile-everything',
# 'tooltip' => 'searchprofile-everything-tooltip',
# 'namespaces' => $nsAllSet,
# ],
'advanced' => [
'message' => 'searchprofile-advanced',
'tooltip' => 'searchprofile-advanced-tooltip',
'namespaces' => self::NAMESPACES_CURRENT,
]
];
Hooks::run( 'SpecialSearchProfiles', [ &$profiles ] );
Next to avoid automatically going to the Advanced tab after this change enter the following in "LocalSettings.php"
$wgNamespacesToBeSearchedDefault = $nsAllSet;
The reason I removed content pages tab is because its basically useless after these changes. Also this will probably resolve question number 3 and TheDJ answered question number 2. Bruceillest (talk) 17:55, 30 October 2019 (UTC)
So I've tried this, and all in all it seems to work, the problem being that the change in LocalSettings.php file does not work, as in even after entering $wgNamespacesToBeSearchedDefault = $nsAllSet; still defaults to the advanced search option and not "all".
Even further, it defaults to searching basic and CommentStreams namespaces under advanced.
Do you have any idea why this might be? Samoridon (talk) 09:50, 24 January 2020 (UTC)
It worked for me, thanks! 24.208.13.210 (talk) 05:04, 4 February 2020 (UTC)
MediaWiki has a variable for it. This should be a better option than editing the source code and will provide updating the wiki to later versions.
Here is the use:
$wgNamespacesToBeSearchedDefault = [
   NS_MAIN => true,
   2 => true,
   3 => true,
   10 => true,
   11 => true,
   184 => true,
   185 => true,
   186 => true,
   187 => true,
   188 => true,
   189 => true,
   190 => true,
   191 => true,
   192 => true,
   193 => true,
   194 => true,
   195 => true,
   196 => true,
   197 => true,
   198 => true,
   199 => true,
   200 => true,
   201 => true,
   "_merge_strategy" => "array_plus"
];
Add all the numbered Namespaces and set to true just like in the Visual Editor
Cheers

195.122.188.72 (talk) 09:47, 9 April 2020 (UTC)
A number of Content: pages in my wiki have content in addition to serving as containers for sub-categories/pages. Even when setting the following in LocalSettings.php:
$wgNamespacesToBeSearchedDefault = [
   NS_MAIN => true,
NS_CATEGORY => true
];
Searches executed from the searchbar fail to discover the sought-for content; the Special:Search UI also fails to discover this content unless I manually click "Everything" instead of "Content" under the Special:Search text field.
Interestingly, I do get the behavior I want if I declare:
$wgNamespacesToBeSearchedDefault=$nsAll
In which case searches from the search bar correctly discover all content (even though "$nsAll" itself is undefined at least within the scope of LocalSettings.php). The disadvantage here is that since "$nsAll" is undefined, runJob.php complains about "$nsAll" being an unknown variable. This doesn't appear to break runJob.php, but the whole affair seems messy, and I'd much prefer the wgNamespacesToBeSearchedDefault to work out of the box as advertised. 144.51.12.38 (talk) 19:37, 2 November 2020 (UTC)
Sorry, this is in reference to "Category:" pages, not "Content:" pages. 144.51.12.38 (talk) 19:38, 2 November 2020 (UTC)

How to auto-load a template into a page created with inputbox?

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


How to auto-load a template into a page created with inputbox?

I can't find this in Extension:InputBox Johnywhy (talk) 22:58, 19 April 2018 (UTC)

like this:
preload=Template:MyTemplate
eg
<inputbox>
 type=create
 buttonlabel=Create new page
 preload=Template:MyTemplate
 </inputbox>
Johnywhy (talk) 23:17, 19 April 2018 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Banners Skin:Minerva Neue

Hi! How do I add banner or code to the Minerva Neue skin, for example to add ads on the header? 2003:DF:DBC7:1447:9907:7F79:F46F:8C80 (talk) 04:59, 20 April 2018 (UTC)

If $wgMinervaEnableSiteNotice is true, than you can use the page MediaWiki:Sitenotice to add a banner.
You can also use the MinervaPreRender hook to populate the 'banners' (or 'internalBanners' data key (untested but something like $wgHooks['MinervaPreRender'][] = function( $template ) { $template->data['banners'][] = 'Put html here'; }; ) Bawolff (talk) 07:52, 23 April 2018 (UTC)

Help with math rendering

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' ); Ag3dvr (talk) 13:52, 20 April 2018 (UTC)

Please upgrade your MediaWiki version first before getting help. 2A02:C7F:963F:BA00:4C5F:68F5:DDC5:BCED (talk) 16:05, 21 April 2018 (UTC)
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. Bawolff (talk) 07:45, 23 April 2018 (UTC)
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 (talk) 16:57, 23 April 2018 (UTC)
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. Ag3dvr (talk) 20:23, 23 April 2018 (UTC)
Looks like http://wiki.glennersterlab.com/extensions/SimpleMathJax/modules/MathJax/MathJax.js doesn't exist on the server. Can you check if that's correct? If SimpleMathJax is installed, it should contain that file in that location. Ciencia Al Poder (talk) 09:18, 24 April 2018 (UTC)
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. Ag3dvr (talk) 12:32, 24 April 2018 (UTC)

Private Wiki Requires Two Logins

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


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/ 67.131.21.67 (talk) 20:22, 20 April 2018 (UTC)

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 Ciencia Al Poder (talk) 10:23, 21 April 2018 (UTC)
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 (talk) 15:52, 23 April 2018 (UTC)
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. 67.131.21.67 (talk) 15:47, 23 April 2018 (UTC)
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. Ciencia Al Poder (talk) 20:28, 23 April 2018 (UTC)
Is there any way to fix this? 67.131.21.67 (talk) 19:45, 25 April 2018 (UTC)
Hi,
When I did that, it said the following message when I tried logging in: "There seems to be a problem with your login session; this action has been canceled as a precaution against session hijacking. Go back to the previous page, reload that page and then try again." 67.131.21.67 (talk) 20:22, 24 April 2018 (UTC)
Check if you have set $wgMainCacheType in LocalSettings.php. In case it's set to CACHE_ACCEL, you should set $wgSessionCacheType to CACHE_DB. Ciencia Al Poder (talk) 20:06, 25 April 2018 (UTC)
Hey,
I managed to fix the issue by adding $wgCookiePath = "/"; and $wgCookieSecure = false; to LocalSettings.php.
Thanks! 67.131.21.67 (talk) 20:12, 25 April 2018 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Can Flow Use PHP Pear:Cache, Pear:Cache_Lite, opcache, or apcu?

Flow requires "object caching" such as memcache.

Extension:StructuredDiscussions#Dependencies

My host doesn't offer memcache, but does offer Pear:Cache, Pear:Cache_Lite, opcache, and apcu. Would any of those work? Johnywhy (talk) 17:51, 21 April 2018 (UTC)

According to my personal experience, APCu is OK, preferably memcached. Memcached installation is not so difficult. 星耀晨曦 (talk) 11:44, 22 April 2018 (UTC)
my hosting doesn't support memcache Johnywhy (talk) 13:26, 22 April 2018 (UTC)
Use APCu.(Simply make sure its installed, then set $wgMainCacheType = CACHE_ACCEL , and it should all work. The MediaWiki installer will usually do this as the default if you have apcu installed.)
You only really need to move to memcached if you have multiple apache servers. If you only have a single apache server (almost certainly the case if you are on shared hosting like you describe), then there's not a whole lot of benefit of using memcached. Bawolff (talk) 07:42, 23 April 2018 (UTC)

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

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? Johnywhy (talk) 18:29, 21 April 2018 (UTC)

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. 星耀晨曦 (talk) 01:12, 23 April 2018 (UTC)
Thx!
> To enable Flow for all namespaces is a bad idea.
Why? Johnywhy (talk) 17:05, 23 April 2018 (UTC)
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 (talk) 02:20, 24 April 2018 (UTC)
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)] Bawolff (talk) 07:39, 23 April 2018 (UTC)

Visual Editor not respecting custom image size

I am running:

MediaWiki 1.30.0
PHP 5.6.30 (cgi-fcgi)
MySQL 5.7.17-log
Lua 5.1.4

If I use visual editor to put an image on a page, and set a custom size on the image, for example 60 x 60, then save the page, then click edit again, when the visual editor loads again it loads the image at the original size, not the custom size

How can I debug this issue? Or have anyone seen this strange behavior before? Quinnj09 (talk) 08:03, 22 April 2018 (UTC)

Help needed posting new entry

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


I am trying to post a new entry, on poet Philip Milito. Can some please send the correct link for new articles. I tried posting it but was told it was being reported as spam.

Thank you for your help. Sianb1234 (talk) 16:57, 22 April 2018 (UTC)

I am afraid that you will have to ask on whatever website you refer to (maybe some Wikipedia?), about their rules and setup. Malyacko (talk) 17:28, 22 April 2018 (UTC)
Isn't this Wikipedia? Sianb1234 (talk) 20:28, 22 April 2018 (UTC)
No. This is mediawiki.org. See the URL in the address bar of your browser.
You may want to ask on https://en.wikipedia.org/wiki/Wikipedia:Village_pump if you refer to English Wikipedia. Malyacko (talk) 20:43, 22 April 2018 (UTC)
Thanks for your reply, much appreciated. Sianb1234 (talk) 23:42, 22 April 2018 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

I want to Populate my Media Wiki with Content from WIKIpedia ?

Howdy

My Name is Anwar Salim Kamal a Pakistani is working to establish my Media Wiki and want to use Wikipedia content not only links? Anwar Salim Kamal (talk) 20:45, 22 April 2018 (UTC)

You're allowed to do that as long as you follow the license conditions. See https://en.wikipedia.org/wiki/Wikipedia:Reusing_Wikipedia_content for more details.
A copy of all articles on (english) wikipedia can be found at https://dumps.wikimedia.org/enwiki/20180420/ Bawolff (talk) 07:35, 23 April 2018 (UTC)

Отсутствие возможности редактирования моих статей

Добрый день. Некоторое время назад я размещал на ресурсе https://allll.net две статьи. После чего другими участниками в них была добавлена недостоверная информация и статьи закрыли без возможности редактирования. Между тем, в статьях размещена клевета, что противоречит законодательству РФ. Кроме того, по правилам вашего ресурса "Материалы принадлежат их авторам". Но я как автор не имею доступа. Прошу предоставить мне права на редактирование моих статей, чтобы устранить в них противоречия законодательству и удалить с данного ресурса. Oleg Markin (talk) 12:06, 23 April 2018 (UTC)

If you edit on a third-party website (like allll.net) and your edits are changed on a third-party website, you will have to discuss that on the third-party website. We at mediawiki.org have no control over what happens on third-party websites. Malyacko (talk) 13:03, 23 April 2018 (UTC)

MobileDetect with images

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:

File:Trocanumero.png

Are there any other items that should be parameterized in the extension? Or should I change the inclusion of the images? Analistacavanha (talk) 17:23, 23 April 2018 (UTC)

Adding members to my privat wiki

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. 84.107.176.74 (talk) 10:07, 24 April 2018 (UTC)

Bots Uploading images on MW Projects

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! Andrea.bozzano87 (talk) 12:12, 24 April 2018 (UTC)

Why can't you upload files? Is there an error? Since it looks like you're using a URL to upload the file, have you enabled url upload, and given your bot permission? 110.149.125.240 (talk) 14:05, 27 April 2018 (UTC)
Thank you for your answer,
I'm still working on it, maybe I'll figure out how to upload..
My bot's user group rights grant him to upload files and upload by url, edited in LocalSettings.php, the directory of destination is also writeable by my scripts...
I tried to see the response of my webserver, it just states NULL. Maybe it's some error occurring during connection. The thing is, i'm using the same post request function for login and it works pretty well... Andrea.bozzano87 (talk) 10:53, 2 May 2018 (UTC)
multipart/form-data is only required if you are doing a direct upload. It is not required if doing upload by url Bawolff (talk) 17:30, 28 April 2018 (UTC)

Content is not displayed

In my wiki, I can search for topics but the content ist not displayed. I only can see my text in the edit mode.

Does anyone has an idea what the problem could be? 91.138.68.153 (talk) 20:50, 24 April 2018 (UTC)

By "can see my text in the edit mode", do you mean to say the content part in the search results shows up in Wikitext, such as showing square brackets for links etc?
If so, I think this is the default behaviour. To obtain results in the form of Wikimedia Foundation Wikis you will have to install Extension:CirrusSearch. AhmadF.Cheema (talk) 22:46, 24 April 2018 (UTC)

Fatal exception of type "Error"

What does this mean? It's the only thing that comes up on jacksonheights.ntyc.

[5c71f88d6e028ee8490d90c0] 2018-04-24 23:39:32: Fatal exception of type "Error" Tomlzz1 (talk) 23:43, 24 April 2018 (UTC)

sorry, that's https://wiki.jacksonheights.nyc/ Tomlzz1 (talk) 23:45, 24 April 2018 (UTC)
This is a brief error message, so you must get more detailed error message. Add
error_reporting( -1 );
ini_set( 'display_errors', 1 );
$wgShowExceptionDetails = true;
$wgShowDBErrorBacktrace = true;
to your LocalSettings.php. 星耀晨曦 (talk) 05:14, 25 April 2018 (UTC)

SAPI Install not working

I do a lot of proof reading. So I need TextAloud or Balabolka (Text-To-Speech) working on my Wine Setup in Linux Mint 18. All the instructions for something supposedly so simple have not worked at all. And I have tried dozens of so-called solutions. The helps are also desparatley out of date!

Your App seemed like a chance at success. But so far only maximum frustration.

Can you give me a simple leg up? And if so, the sale is yours for sure!

Larry 174.45.56.60 (talk) 00:48, 25 April 2018 (UTC)

Incorrect support forum for your question, this place is for queries related to MediaWiki software. AhmadF.Cheema (talk) 05:12, 25 April 2018 (UTC)

Version number not updating on Special:Version

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


When I update extensions sometimes the version number of that extension is not updated on Special:Version. Just now I updated from Replace Text 1.1.1 (e2aa327) to 1.4.1 (7676bf8), but my Special:Version still shows 1.1.1 (e2aa327).

How can I force a update of Special:Version? I'm on MediaWiki 1.27.4. Stefahn (talk) 08:08, 25 April 2018 (UTC)

Try with $wgExtensionInfoMTime, although the problem may be that your Special:Version page is cached, either in your browser (try opening it from incognito mode) or on the server if you have file cache enabled. Ciencia Al Poder (talk) 09:31, 25 April 2018 (UTC)
I am updating from 1.27.4 to 1.31.0 and have the same problem. @Ciencia Al Poder thank you for identifying the cache as causing this problem.
First, I confirm this is a cache problem. I can reproduce this problem using the Math extension as an example. All of my testing is on localhost.
In ($IP)/extensions, clone the extension from the git repository.
Install this new version:
#git clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions/Math.git --branch wmf/1.32.0-wmf.14
My LocalSettings.php has:
$wgMainCacheType = CACHE_MEMCACHED; #memcached
The reported Special:Version of 3.0.0 (20f8d16) 12:39, 23 July 2018 is correct.
Install the 1.31.0 release:
#rm -rf Math/
#git clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions/Math.git --branch REL1_31
Using the same LocalSettings.php as before (memcached), I refreshed my web browser to show:
The Special:Version reported version: 3.0.0 (20f8d16) 12:39, 23 July 2018 has not changed (not correct)
I then modified LocalSettings.php to disable the cache.
$wgMainCacheType = CACHE_NONE;
I refreshed by web browser to show:
The Special:Version reported version 3.0.0 (a1263db) 22:54, 16 April 2018 (correct)
Changing nothing but LocalSettings.php to (enable memcached) or (use no cache), the reported version follows the cache (incorrect when used), correct version is shown with no cache.
Inspection of the source code shows suggests a git API is extracting the status information in real-time. The variable $wgExtensionInfoMTime is for a different purpose as you suggest and does not fix this problem.
It is important to have the correct information when displaying this page. Is there a way to clear the cache (or disable the cache) for Special:Version? Lady G2016 (talk) 02:10, 31 July 2018 (UTC)
Since you did detailed testing, you could report a bug in https://phabricator.wikimedia.org/ for this. Stefahn (talk) 09:06, 13 August 2018 (UTC)
I have created create bug report T202770. Lady G2016 (talk) 20:33, 24 August 2018 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Password recovery: Must change password; May not change password

Would love to log in to show you screenshots.

Click log in,

Try to recover forgotten password,

Log in with emailed temporary password [this is dodgy AF, by the way, emailing a password is naughty]

Told must change password

Try to change password

Receive message that authentication plugin does not allow changing passwords.

Try not to cry

Cry a lot 79.171.146.4 (talk) 09:34, 25 April 2018 (UTC)

This seems to relate to the services of a particular company delivering MediaWiki as a service. Please direct your questions at the specific company, this help desk is for questions of the MediaWiki software, not specific installations maintained by 3rd parties. —TheDJ (Not WMF) (talkcontribs) 09:56, 25 April 2018 (UTC)

Few question

Hello

I am new user, and i am still facing few questions about using the wiki, so i hope someone can help me

1- How to add more items to the editor box? because its shows only this now

https://www.screencast.com/t/h5ei5OJGk

2-is it ok to use the wiki software to publish news like news websites, and information like Wikipedia ?

3- Is there a control panel?? How to manege the website?

4- IS there a program or plugin that can update wiki articles automatically?

5- How to add this kind of information box?

https://www.screencast.com/t/sV0BdiunEcM

https://www.screencast.com/t/czVmKVqjWF1

This is for now, thanks in advance Raied85 (talk) 09:38, 25 April 2018 (UTC)

1 - You could install Extension:WikiEditor and follow Extension:WikiEditor/Toolbar customization
2 - I'd say that depends on the license of the content that you (re)use, not on the software to display the content.
3 - You can adjust settings in the file LocalSettings.php
4 - "Automatically" based on which criteria?
5 - The first is a template that you could import, the second is Manual:Table of contents Malyacko (talk) 12:36, 25 April 2018 (UTC)
Thanks a lot my friend.
regarding #4, lets say i have article or page that contain information about football team, and that team win the league, or formula 1 team win a race, is there any plugin that able to update teams status Automatically? biased on settings i saved earlier?
I hope you get the point.
what makes me ask about that is what i see on Wikipedia itself after the event finished, the status updated Automatically in seconds, that why i think its a plugin or something
Thank you again Raied85 (talk) 15:30, 25 April 2018 (UTC)
The status is updated manually by someone that edits the article, that's why anyone can edit. Ciencia Al Poder (talk) 09:18, 26 April 2018 (UTC)
The closest thing to a control panel is the page Special:SpecialPages Bawolff (talk) 17:26, 28 April 2018 (UTC)

Export sql file, modify offline, import again = good idea?

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


I need to do complex regex replacements in my wikitext (which I can't do via Extension:ReplaceText). Is it a good idea to export the sql file, modify it offline (via Notepad++), and import the altered file again in my database?
Or do I corrupt the database doing so? Stefahn (talk) 13:03, 25 April 2018 (UTC)

You're going to corrupt your database. Also, that massive replace will do the replaces also on old versions of pages, not only the current one, without giving any hint on the page history.
You should try to use Pywikibot. It's relatively easy to set up and comes with scripts to do replacements. Ciencia Al Poder (talk) 09:20, 26 April 2018 (UTC)
Thanks for the clear advice!
I ended up using Extension:MassEditRegex, which worked fine. Stefahn (talk) 21:59, 28 April 2018 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Flow Without Parsoid?

How does Flow behave Without Parsoid? It doesn't seem to do anything. Pages don't look or act differently. Johnywhy (talk) 19:08, 25 April 2018 (UTC)

I think Parsoid allows for Visual Editing such as using Ctrl+I for italics and Ctrl+B for bold. AhmadF.Cheema (talk) 20:02, 25 April 2018 (UTC)
i think i won't get the VisualEditor, correct?
what's left? Johnywhy (talk) 21:21, 25 April 2018 (UTC)

Best URL for Namespace Pages?

I'm making hub-pages for each namespace.

Which URL is best?

  • MyWiki/MyNamespace (this one's my favorite. Why not?)
  • MyWiki/MyNamespace:MyNamespace
  • MyWiki/Namespace:MyNamespace
  • MyWiki/MyNamespace:Namespace
  • MyWiki/MyNamespace:Hub Johnywhy (talk) 21:32, 25 April 2018 (UTC)

Transclude All Namespaces?

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


How to transclude all namespaces (including custom namespaces)?

thx Johnywhy (talk) 21:48, 25 April 2018 (UTC)

You transclude pages, not namespaces. Do you mean transcluding a page on a specific namespace? Or transclude a list of namespace names? Ciencia Al Poder (talk) 09:14, 26 April 2018 (UTC)
A list of namespace names Johnywhy (talk) 18:13, 26 April 2018 (UTC)
You can use Lua for that: Extension:Scribunto/Lua reference manual#mw.site.namespaces Ciencia Al Poder (talk) 09:07, 27 April 2018 (UTC)
is that the only way to query MySql tables, and display result on a wiki page? Johnywhy (talk) 16:31, 27 April 2018 (UTC)
Namespaces are not in the database. They're configured in PHP. This is one option. Another option is to code a parser extension yourself to do that. Ciencia Al Poder (talk) 17:46, 27 April 2018 (UTC)
the page you linked says "mw.site.namespaces - Table holding data for all namespaces"
Is that a text file, and not a table?
I do have some custom namespaces in my localsettings.php, but are you saying all default namespaces are defined in localsettings.php? Johnywhy (talk) 18:19, 27 April 2018 (UTC)
It's a Lua table, not an SQL table, like there are HTML tables and such. Ciencia Al Poder (talk) 09:07, 29 April 2018 (UTC)
Default namespaces are in core code and your namespaces in LocalSettings. wargo (talk) 20:55, 27 April 2018 (UTC)
what is "mw.site.namespaces"? Johnywhy (talk) 21:32, 27 April 2018 (UTC)
If you install Extension:Scribunto you can use Lua to give more functions to templates. It is one of variables, arrays you can acces to read certain data. wargo (talk) 21:55, 27 April 2018 (UTC)
If you have a specific namespace you want to get the name of and you have its id number, you can do {{ns:number here}}
There is no way in MediaWiki core to get a full list of defined namespaces from wikitext. As others have mentioned above, the information can be obtained using the scribunto extension, which adds Lua as an alternative language for writing templates. Bawolff (talk) 17:22, 28 April 2018 (UTC)
This isn't a transclude, but does return a list of all namespaces:
/api.php?action=query&meta=siteinfo&siprop=namespaces
API:Siteinfo#Namespaces Johnywhy (talk) 19:49, 21 June 2018 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

After upgrading the WikiEditor toolbar is gone

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


Mediawiki version 1.30.0

PHP 7.2.4

SQLite version 3.23.0

After upgrading from 1.27.4 and PHP56 the WikiEditor toolbar does no more appear.

In LocalSettings.php I have

# WikiEditorwfLoadExtension( 'WikiEditor' );$wgDefaultUserOptions['usebetatoolbar'] = 1;$wgDefaultUserOptions['usebetatoolbar-cgd'] = 1;$wgDefaultUserOptions['wikieditor-preview'] = 1;$wgDefaultUserOptions['wikieditor-publish'] = 1;

I scanned logfiles and enabeled debugging, but cannot find any hints. 62.224.139.109 (talk) 09:26, 26 April 2018 (UTC)

Are these configurations on the same line?
{{{1}}}
Because # at the beginning of the line, the code after # will not work. 星耀晨曦 (talk) 16:15, 26 April 2018 (UTC)
No. That have been scrumbled after sending the form. 62.224.139.109 (talk) 17:08, 26 April 2018 (UTC)
Did you check Manual:Errors_and_symptoms#Missing edit toolbar, JavaScript not working? Ciencia Al Poder (talk) 09:13, 27 April 2018 (UTC)
JavaScript is functionable.
The legacy editing toolbar is usable, but the more advanced WikiEditor does not show up.
And I do not want to install the visual-editor. 62.224.131.130 (talk) 10:09, 27 April 2018 (UTC)
Along with the MediaWiki core, have you also updated Extension:WikiEditor? AhmadF.Cheema (talk) 12:58, 27 April 2018 (UTC)
WikiEditor here has version 0.5.1 which is the latest available.0.5.1 62.224.131.130 (talk) 20:27, 27 April 2018 (UTC)
Check that it didn't get disabled in your Special:Preferences on your wiki
Also verify that the extension is installed at Special:Version on your wiki Bawolff (talk) 17:19, 28 April 2018 (UTC)
It is not disabled and it is listed in Special:Version. 62.224.140.238 (talk) 18:06, 28 April 2018 (UTC)
If The legacy toolbar is showing up, that means that MediaWiki is choosing not to display the WikiEditor (vs no toolbar, which would mean some sort of error).
I can't think of any way for that to happen when the extension is installed, except for disabling in special:Preferences. Bawolff (talk) 18:09, 28 April 2018 (UTC)
To be more precise: WikiEditor is not explicitely named in the user preferences. 62.224.140.238 (talk) 18:17, 28 April 2018 (UTC)
Is there an option named "Enable enhanced editing toolbar" in the editing tab? Bawolff (talk) 18:53, 28 April 2018 (UTC)
No. There is only "Show edit toolbar" which is selected. 62.224.140.238 (talk) 21:31, 28 April 2018 (UTC)
Page Special:Version throws this error:
<
 /mediawiki/index.php?title=Spezial:Version   ErrorException from line 206 of /usr/local/www/mediawiki/includes/MagicWordArray.php: PHP Deprecated: The each() function is deprecated. This message will be suppressed on further calls
#0 [internal function]: MWExceptionHandler::handleError(integer, string, string, integer, array)
#1 /usr/local/www/mediawiki/includes/MagicWordArray.php(206): each(array)
#2 /usr/local/www/mediawiki/includes/MagicWordArray.php(293): MagicWordArray->parseMatch(array)
#3 /usr/local/www/mediawiki/includes/parser/Parser.php(3955): MagicWordArray->matchAndRemove(string)
#4 /usr/local/www/mediawiki/includes/parser/Parser.php(1299): Parser->doDoubleUnderscore(string)
#5 /usr/local/www/mediawiki/includes/parser/Parser.php(451): Parser->internalParse(string)
#6 /usr/local/www/mediawiki/includes/OutputPage.php(1782): Parser->parse(string, Title, ParserOptions, boolean, boolean, NULL)
#7 /usr/local/www/mediawiki/includes/OutputPage.php(1725): OutputPage->addWikiTextTitle(string, Title, boolean, boolean, boolean)
#8 /usr/local/www/mediawiki/includes/specials/SpecialVersion.php(140): OutputPage->addWikiText(string)
#9 /usr/local/www/mediawiki/includes/specialpage/SpecialPage.php(522): SpecialVersion->execute(NULL)
#10 /usr/local/www/mediawiki/includes/specialpage/SpecialPageFactory.php(578): SpecialPage->run(NULL)
#11 /usr/local/www/mediawiki/includes/MediaWiki.php(287): SpecialPageFactory::executePath(Title, RequestContext)
#12 /usr/local/www/mediawiki/includes/MediaWiki.php(851): MediaWiki->performRequest()
#13 /usr/local/www/mediawiki/includes/MediaWiki.php(523): MediaWiki->main()
#14 /usr/local/www/mediawiki/index.php(43): MediaWiki->run()
#15 {main}
Which points to a problem with php72. 62.224.140.238 (talk) 18:15, 28 April 2018 (UTC)
MW 1.30 is not yet fully compatible with PHP 7.2, MW 1.31 will compatible with PHP 7.2. 星耀晨曦 (talk) 02:14, 29 April 2018 (UTC)
You should disable E_DEPRECATED errors from PHP from any production site. Ciencia Al Poder (talk) 09:02, 29 April 2018 (UTC)
Problem solved after cleaning LocalSettings.php 62.224.140.216 (talk) 21:50, 29 April 2018 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

API, userrights, RestSharp

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


I have MW ver. 1.26.2 and become problems with api.php?action=userrights&user=aaTestname3&add=moderator&format=json

Response says: {"userrights":{"user":"AaTestname3","userid":515,"removed":[],"added":[]}}

But no moderator right was added when i look in User-admin. I am currently logged in with a sysop user. I am pretty sure I have enough access in the RestSharp context.

Is that a well known problem in 1.26.2?

The token did not work from the querystring for action=userrights. This was not documentet in API documentation. For other methods it worked direct in querystring.

I got thist result: And in order to remove:

<error code="mustposttoken" info="The token parameter was found in the query string, but must be in the POST body" xml:space="preserve">

...i tried adding the token to request body, but that did not work.

After testing different methods, I found this method that worked:

request.AddParameter("token", userrightstoken.ToLower(), ParameterType.GetOrPost);

Here is also my HTTP Request and Response

-############### = censored

RestSharp request:

Postman-Token=c50a89a4-7738-###############

Cache-Control=no-cache

Accept=application/json, application/xml, text/json, text/x-json, text/javascript, text/xml

Postman-Token=d67f0f62-a98b-4f9b-#################

Cache-Control=no-cache

token=267de0fd01f191498#################

RestSharp response:

X-Content-Type-Options=nosniff

X-Frame-Options=SAMEORIGIN

Content-Encoding=

Vary=Accept-Encoding

Transfer-Encoding=chunked

Cache-Control=private, must-revalidate, max-age=0

Content-Type=application/json; charset=utf-8

Date=Thu, 26 Apr 2018 07:22:15 GMT

Server=Apache JohnTreeHunt (talk) 11:36, 26 April 2018 (UTC)

I found the solution my self. I had to be bureaucrat. sysop was not enought. JohnTreeHunt (talk) 13:03, 26 April 2018 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

change the user name

How could i change my username? Or delete my user account? PWRBET (talk) 11:43, 26 April 2018 (UTC)

See Extension:Renameuser.
If you are asking about your wikipedia account see https://meta.wikimedia.org/wiki/Global_rename_policy Bawolff (talk) 17:16, 28 April 2018 (UTC)

Sorting

Hello! How can I make my table sort much better?

https://yourosongcontest.miraheze.org/wiki/Julbrendsen_Isles_in_the_Youro_Song_Contest

On this page you see 12, 18 and 2, 21 etc. but i want it to be like 2, 12, 18 and 21.

Like it is on this page:

https://yourosongcontest.miraheze.org/wiki/Youro_Song_Contest_21

Here all numbers sort perfectl

When I try to do this:

!data-sort-type="number"| Place

!data-sort-type="number" |Points

!data-sort-type="number"|Semi

!data-sort-type="number"|Points

Then it sorts good but the text will be above and not on the bottom

http://escforumwiki.com/index.php?title=Kimmystan_in_the_Outernatia_Song_Contest

On this page it looks good but i dont know what is the difference in the tables :( Can anyone help?

Here is my wiki version

https://yourosongcontest.miraheze.org/wiki/Special:Version 37.191.228.227 (talk) 12:52, 26 April 2018 (UTC)

Add data-sort-value="9999" to the text cells so they have a high numerical value to be sorted by. 110.149.125.240 (talk) 13:55, 27 April 2018 (UTC)

Auto Page-Creation on Transclude?

Is it possible to automatically create a page (and load it with Template content), simply by transcluding the page?

I'd like this to happen only when a certain namespace is transcluded.

It's ok if extensions are required. Johnywhy (talk) 04:46, 27 April 2018 (UTC)

List All Pages That Transcluded a Page?

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


How can i display a list of all pages that transcluded a certain page?

This gives me the list i want:

https://gunretort.xyz/index.php?title=Special:WhatLinksHere/Template:Retort&hidelinks=1&hideredirs=1

Now how do i transclude that list, without the form, into another page?

Ideally, would prefer a simple {{transclude}} syntax.

thx Johnywhy (talk) 04:53, 27 April 2018 (UTC)

{{Special:WhatLinksHere/Template:Retort|hidelinks=1|hideredirs=1}}
(work around dumb spam filter) 110.149.125.240 (talk) 13:49, 27 April 2018 (UTC)
Fantastic!
Any way to suppress this part?
 (transclusion) ‎ (← links | edit)
Update:
"(← links | edit)" can be suppressed by placing the following in Common.css
.mw-whatlinkshere-tools{
    display:none;
}
Johnywhy (talk) 15:57, 27 April 2018 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Search Bar in Main Page

Hi, i'm using MonoBook as theme and I thought it was cool to only have search box and display categories in Alphabetical order in home page.

But when I use :SEARCH it is displayed very small in corner. How do I align that to center and change the size of the search bar? please help Divya0801 (talk) 08:51, 27 April 2018 (UTC)

Use Extension:InputBox to place a search box anywhere on a page. Ciencia Al Poder (talk) 09:05, 27 April 2018 (UTC)

How to parse magic words before transclusion?

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


hi

my source-page, called "MyNS:SourcePg", contains
{{PAGENAME}}
MyNS:SourcePg gets transcluded into destination page with:

{{MyNS:SourcePg}}

i'd like {{PAGENAME}} to render as the source-page name , and not the destination page-page. Meaning, the magic word {{PAGENAME}} should get rendered before it gets transcluded.

Is that possible? Johnywhy (talk) 16:49, 27 April 2018 (UTC)

Don't surround {{PAGENAME}} with <noinclude>, in the source-page. Johnywhy (talk) 20:47, 27 April 2018 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Hard drive full

My hard drive is full and the SQL database can't start. What is the best way to clear some space? We have a bunch of PDF files that get uploaded regularly and they "replace" the old files. Would it be possible to delete all replaced files older than a year? CaseyMills (talk) 18:05, 27 April 2018 (UTC)

If these are part of the Wiki content/reference i do not have a clue, If not you should be able to backup all PDF data, on an external HD/Memorystick - and then delete what is older? AssetDenmark (talk) 20:45, 27 April 2018 (UTC)
First step would be to see what is using most space (no point in deleting things that aren't using space).
If indeed old versions of pdfs are taking up a lot of room, you could potentially delete them, although that's not where I would start.
  • You can delete old thumbnails potentially. If you have 404 handling set up, they will be regenerated again on demand so it won't break anything (If you don't have 404 thumbnailing setup, pages using the thumbs will be broken until next time someone edits the page using it)
  • Sometimes the objectcache table of the database can grow really big. You can TRUNCATE objectcache to delete it entirely to clear some space (Everything in objectcache should be regenerated if its needed)
  • If you have a lot of page content, you can compress page revisions in the db. Usually page revisions aren't that much space, but you can try setting $wgCompressRevisions = true; There are also maintenance scripts that allow you to get even better compression ratios. Bawolff (talk) 17:13, 28 April 2018 (UTC)
Thank you @Bawolff, you are right. I'm only speculating on what might be taking up all the space. Would you be so kind to point me in the right direction? How can I find out what is taking up so much space? CaseyMills (talk) 13:06, 1 May 2018 (UTC)
On unix based systems, you can use the command
du -h | sort -h
to get a list of what directories are using the most space. Bawolff (talk) 16:19, 1 May 2018 (UTC)

Export/import vs upgrade

Please advise - I plan to reinstall my wiki at a new computer, and move the content to that.

What would be the easy way, upgrade and move the MySQL or using the export/import. I want to upgrade to the latest version and my current specs. are:

Product Version

MediaWiki 1.18.1

PHP 5.3.10 (cgi-fcgi)

MySQL 5.1.59-community

What other concerns would i need to take? AssetDenmark (talk) 20:20, 27 April 2018 (UTC)

Naturally I would like to export/import user data, any tips on that would also be appreciated! AssetDenmark (talk) 20:42, 27 April 2018 (UTC)
I would say do it in 2 separate steps (Either move first, then upgrade, or upgrade first then move) Doing at the same time will complicate matters.
The easiest way to move a wiki, is simply copy the database (use mysqldumpbackup to create an sql backup of your wiki (This is very different from MediaWiki's import/export. Most importantly it contains all private user data), then import the sql dump into mysql on the new host).
Then copy over your MediaWiki folder. In LocalSettings.php, adjust the value of $wgServer, $wgCanonicalServer, $wgArticlePath, $wgScriptPath (If any of these are not set, don't worry about it). And that should be that. Bawolff (talk) 17:09, 28 April 2018 (UTC)
Thanks for the reply, the move operations you suggest would still - i think - include some issues regarding the SQL upgrade. Sorry for this late response.
I found that you can run a Wiki from a NAS, and that is what i chose to do. I will post here regarding that, as it seems like an neat/"cheap" way to get something going.. AssetDenmark (talk) 18:17, 7 October 2018 (UTC)
While Bawolff is correct that doing both MediaWiki and MySQL/PHP upgrades in one go might complicate things, I want to point to Compatibility:
If you want to do the upgrades separately, then you will have to use some versions inbetween: MediaWiki 1.18 is not compatible with any PHP version, which would be compatible with MediaWiki 1.31. So you would have to update to e.g. MediaWiki 1.23 inbetween, then upgrade PHP, then upgrade MediaWiki again. And I have not yet checked MySQL,where you might have the same kind of issue.
I personally would try doing all updates in one go. ;-) 2001:16B8:10BC:2500:7D1F:437:8B0B:26C7 (talk) 20:58, 7 October 2018 (UTC)

How to Freeze MagicWords (or the whole transclude) in a Sequential Transclude?

Template:Tag contains a transclusion to a Special page, with magicwords:

{{Special:WhatLinksHere/Tag:{{PAGENAME}}}}

Page Tag:Banana transcludes Template:Tag.

{{Tag}}

It renders correctly.

Pies (transclusion) ‎ (← links | edit) Draft:Milkshakes (transclusion) ‎ (← links | edit) Draft:Ice-Cream Sundaes (transclusion) ‎ (← links | edit)

The desire is to "freeze" the transclude (or just the magicword) at that page, so subsequent transcludes will not re-parse the original transclude or magicWords.

But that's not what happens.

Page3 transcludes page Tag:Banana.

{{Tag:Banana}}

Page3 doesn't render correctly. I get a blank. I believe the reason is that {{PAGENAME}} gets re-parsed as "Page3", which then is used as the original Special page parameter.

We don't want that to happen at Page3. We want the Page3 render to look just like the page Tag:Banana render.

Is that possible? Johnywhy (talk) 21:21, 27 April 2018 (UTC)

Not really, but what you can do:
Make Template:DisplayTag be
{{Special:WhatLinksHere/Tag:{{{1}}}}}
Then make Template:Tag be:
{{DisplayTag|{{<includeonly>safesubst:</includeonly>PAGENAME}}}}
And any time you use {{tag}}, instead use {{subst:tag}}, which at save will get magically turned into {{DisplayTag|CURRENT PAGE NAME HERE}} Bawolff (talk) 17:06, 28 April 2018 (UTC)

How to Transclude Rendered Page, Instead of Page Source?

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


i believe this is similar to wgEnableScaryTranscluding with the `wiki:` prefix. But wgEnableScaryTranscluding is intended to include pages from external wikis, and i want to include a page from the same wiki.

Can this help? Extension:Labeled Section Transclusion

related to Project:Support desk/Flow/2018/04#h-How_to_Freeze_MagicWords_(or_the_whole_transclude)_in_a_Sequential_Transclude?-2018-04-27T21:21:00.000Z Johnywhy (talk) 21:57, 27 April 2018 (UTC)

Its generally not possible to transclude a page so that its rendered in the context of its original name instead of the current name (If that's what is meant).
The usual approach to this is to instead of using things like {{PAGENAME}} use {{subst:PAGENAME}}, or pass the page name you want explicitly as a parameter, e.g. {{mytemplate|page={{PAGENAME}}}} Bawolff (talk) 16:57, 28 April 2018 (UTC)
Are you saying wgEnableScaryTranscluding cannot be used for this? Nor the following extensions?
Extension:IncludeArticle
Extension:PageEval
Thx for {{subst:PAGENAME}}, but i think that won't help in this scenario. Johnywhy (talk) 17:15, 28 April 2018 (UTC)
You could in theory set up $wgEnableScaryTransclude using an interwiki link that points to the current wiki, to solve this problem. You would have to add an interwiki prefix that points to the current wiki. Bawolff (talk) 18:10, 28 April 2018 (UTC)
Thx. Johnywhy (talk) 20:53, 28 April 2018 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

How to store in the database not only pages with text, but all the content

How to make the mediawiki store in the database not only pages with text, but all the content: files, images, templates, etc. Is it even possible?

It is necessary to store all the content (video, images, archives, etc.) in the database, and not in the file system. 94.245.183.37 (talk) 13:26, 28 April 2018 (UTC)

It would be possible to write an extension to do this (Making a custom subclass of FileBackend - https://doc.wikimedia.org/mediawiki-core/master/php/classFileBackend.html ). However, I'm not aware of anyone who has done this.
Note: files are the only thing currently in the filesystem (Along with some caching in certain non-default configs. File system access is sometimes required for temporary files, but the temp files don't have to last for very long). Templates are already fully in the db. Bawolff (talk) 17:03, 28 April 2018 (UTC)

How to Pass Page_Forms Page-Name (forminput) to Template?

My template is called Template:Thing. It contains: {{{MyParam}}}

My PageForm contains:

...
{{#forminput:form=Thing}}
...
{{{for template|Thing}}}
{| class="formtable"
       |}
{{{end template}}}
...

How to load the user-entered name of the new page into the `MyParam` parameter of the template? -thx

@Yaron Koren Johnywhy (talk) 17:23, 28 April 2018 (UTC)

i noticed that, on Submit, "page_name" gets passed as query parameter to form in url. So, is "page_name" the variable i need to pass to the Template?
I tried using that variable in the Form, but didn't work. I'm doing something wrong:
{{{for template|Thing}}}
{| class="formtable"
! page_name:
| {{{field|MyParam}}}
|}
{{{end template}}}
This causes a "page_name" field to appear in the form, but don't want that. Just want to get value from default text-field. Johnywhy (talk) 17:42, 29 April 2018 (UTC)
anyone have any ideas for this? Johnywhy (talk) 13:51, 8 May 2018 (UTC)

How To Transclude Without Parsing Wikitext?

Safesubst would suffice :
{{safesubst:PAGENAME}}

i'd like the wikitext to get parsed in the context of the host page. Is that possible?

Eg, if source page contains {{PAGENAME}}, i'd like that to get loaded with the pagename of the page that contains the transclusion: {{SourcePage}}

Moreover, i want the parsing to act like it has the subst: prefix. Ie, the pagename of the host page should get hardcoded in the host page. So if the host page is itself transcluded in another host page, it's hardcoded pagename will get forward to the new host.

SourcePage -> HostPage -> AnotherHostPage

{{PageName}} -> "HostPage" -> "HostPage"

Update: This might help, but i don't understand how to do it:

Help:Substitution#Multilevel substitution with independent control of each substitution separately Johnywhy (talk) 17:38, 28 April 2018 (UTC)

I don't think that's possible. What's the point of using {{PageName}} instead of writing down the page name? Ciencia Al Poder (talk) 09:18, 30 April 2018 (UTC)
i want to each 1st generation host to contain it's own page-name in the wikitext, hardcoded.
Where MyTemplate says "PAGENAME", the Green host should say "Green", not "MyTemmplate".
If a 2nd generation host called "Paint" transcludes page {{Green}}, the transcluded wikitext should say "Green", NOT "Paint".
In other words, i want the Template to contain a placeholder for pagename, and 1st-generation hosts should contain their OWN pagename. Any 3nd-generation hosts should contain the 1st-generation page name. Johnywhy (talk) 17:40, 30 April 2018 (UTC)
Safesubst would suffice :
{{safesubst:PAGENAME}}
197.218.92.61 (talk) 07:47, 1 May 2018 (UTC)

About changing the content model on a per-namespace basis

I've given a concrete example here - Manual:$wgNamespaceContentModels#JSON - but by all means go ahead and correct me if I'm wrong or if anyone has anything to add. Cavila 19:43, 28 April 2018 (UTC)

retrieve kit associated with old email to new account

I have an old account with an email address but it no longer is associated with my DNA information. I have created a new account and would like you to transfer over my DNA information to my new account.

My email address of the old account is: lshaw7878@gmail.com

new account user name: lshaw7878

Thanks, Larry J. Shaw Lshaw7878 (talk) 23:25, 28 April 2018 (UTC)

Looks like you came here from another wiki. This is a general support desk for the MediaWiki software. Please contact the support desk of the site you're coming from. Ciencia Al Poder (talk) 09:20, 30 April 2018 (UTC)

Bug? includeonly overrides comment tags in transclusion

Apparently not a bug, just the intended behavior. Use <nowiki> or <pre> to escape wikitext markup.

When i wrap comment tags around a section marked "includeonly", the section marked "includeonly" gets transcluded.

<!-- <includeonly>This should not get transcluded</includeonly> -->

Johnywhy (talk) 04:07, 29 April 2018 (UTC)

Because you commented the tags out. They're just plain text. Comments aren't output anyway, so it really doesn't matter unless you're doing some funky stuff. 110.149.125.240 (talk) 12:32, 29 April 2018 (UTC)
I think you've misunderstood the problem.
Stuff in comments is supposed to be ignored. It's not ignored. Johnywhy (talk) 16:46, 29 April 2018 (UTC)
I'd say that you misunderstand wikitext instead. No 1 rule about wikitext is that it is not html , 2 it is downright insane. The answer to this particular question is simply that you misunderstand what includeonly does , it is certainly not a bug.
It also seems like you're asking tons of questions. It is a good idea to read the help page and search a bit before asking them.
Tons of these questions have been asked and answered several times before. I had some of these questions myself when I learnt about wikitext, and wikis 197.218.80.152 (talk) 20:39, 29 April 2018 (UTC)
so, is your previous statement correct or not?
"you commented the tags out. They're just plain text. Comments aren't output anyway"
i always consult help pages before asking questions. This Help page says:
"Comment tags and what is between them are removed on expansion of the wikitext."
Johnywhy (talk) 20:44, 29 April 2018 (UTC)
The 2 sibling tags, include only, onlyinclude decide what gets transcluded. They also override the default parsing order. If one wants only includes to be ignored then it needs to be "escaped".
One needs to do considerable reading to understand that. There's simply no shortcut. 197.218.82.188 (talk) 02:31, 30 April 2018 (UTC)
sounds like the prior statement "Comments aren't output" wasn't quite correct.
are "<syntaxhighlight lang='text'>" and "<nowiki>" the only escapes? https://en.wikipedia.org/wiki/Help:Wikitext#Limiting_formatting_/_escaping_wiki_markup

if possible, plz share docs about other escapes (aside from extensions like Extension:Character Escapes). thx Johnywhy (talk) 02:35, 30 April 2018 (UTC)

Escaping is complicated. Those two are certainly the primary ways of escaping, but they don't always do what one would expect. There is simply no 100% foolproof escape method. For instance trying to escape a number of nested nowiki tags will be problematic, e.g.:
<pre><nowiki></nowiki><nowiki></nowiki></pre>
The other alternative is using html entities. Also for historical reasons a good amount of documentation about wikitext is stored in meta https://meta.wikimedia.org/wiki/Help:Wikitext_examples#Limiting_formatting_/_escaping_wiki_markup.
Generally, extensions like syntaxhighlight are a good way of escaping most wikitext. 197.218.91.250 (talk) 09:08, 30 April 2018 (UTC)
>i always consult help pages before asking questions. This Help page says:
Also consult the related talk pages of each of the relevant functionality. In many cases issues are discussed and explained there. But nobody bothers to update the help page "because its a wiki" and everybody expects somebody else to do it.
A good starting point, aside from help pages here, is the meta page about wikitext:
https://meta.wikimedia.org/wiki/Help:Contents
Also, it is a good idea to consult the manuals for html4 /html5 on w3c or related sites because while wikitext isn't html, it does whitelist some of its constructs, and lets it mostly behave as html would.
That partial implementation creates the confusion that brings up a lot of threads with questions like these. 197.218.91.250 (talk) 11:52, 30 April 2018 (UTC)
thx Johnywhy (talk) 17:48, 30 April 2018 (UTC)

Suppress HTML, and Preserve Format, in Transcluded DPL?

The following DPL displays correctly on it's own page:

{{#dpl: linksto=Banana|columns=6}}

But, when transcluded to another page, the format is lost, and raw HTML is displayed:

|valign=top|

How to fix? Johnywhy (talk) 06:19, 29 April 2018 (UTC)

How to force social media to show prewiev of my wiki?

I see that when I link a page from my wiki (1.30.0) only a short url appears. No custom information about my wiki nor any image appears.

I tried to search the topic on my own, but it appears that I don't even know the key word for it.

How can I add the "prewiev" for my page or what should I look for?

Link to the wiki
What is the result when I link a page now and what I would like to get ZielonaMrowka (talk) 08:21, 29 April 2018 (UTC)
You need Extension:TextExtracts, Extension:PageImages and possibly mw:Extension:TwitterCards. —TheDJ (Not WMF) (talkcontribs) 08:00, 30 April 2018 (UTC)
Extension:PageImages, Extension:Description2 and Extension:OpenGraphMeta work for me. Ciencia Al Poder (talk) 09:16, 30 April 2018 (UTC)
Thanks for the answers!
I tried those proposed by @Ciencia Al Poder first and those proposed by @TheDJ then, but after installing them through LocalSettings.php and trying a link in https://developers.facebook.com/tools/debug/sharing/ it shows me code 400 for all pages that use polish diacritic characters. The code does not appear for the main page ("Strona główna") and others that do not use polish diacritic characters (why the main page works then?).
I also don't see any images for other pages than the main page.
Not sure if I have to do something more to run those...
Polskie gatunki mrówek page might serve as a reference for the 400 code. ZielonaMrowka (talk) 09:08, 1 May 2018 (UTC)
Looking at the code, the URL seems correct, and it doesn't point to a 404 error.
About the images, after installing PageImages you'll need to run the initImageData.php maintenance script for the extension (or manually edit each page) Ciencia Al Poder (talk) 15:02, 1 May 2018 (UTC)
Is there a way to remove diacritic letters from URLs? When I create redirect without special charactersin the name of a page and point to a page I want to share with special characters in the URL, Facebook does not display error 400.
It would be nice to change all those special characters to their closest relatives in Latin (ąęźżśćół -> aezzscol). ZielonaMrowka (talk) 15:11, 1 May 2018 (UTC)
It's not possible. Also, I fail to see what's the problem here, because the code it generates is perfectly valid and points to the URL with diacritics (note: the URL is url-encoded)
<meta property="og:url" content="http://wiki.mrowki.ovh/index.php?title=Polskie_gatunki_mr%C3%B3wek" /> Ciencia Al Poder (talk) 15:17, 1 May 2018 (UTC)
Hmm... So it is browser which codes %C3%B3 to display "ó" in my url bar? ZielonaMrowka (talk) 15:36, 1 May 2018 (UTC)
Yes, non-ASCII characters and some other special characters can be URL-encoded, so systems that aren't unicode-compatible can display them properly. ó is encoded as %C3%B3 Ciencia Al Poder (talk) 17:06, 1 May 2018 (UTC)
This explains much. I've spent ~8hours trying to find the cause and the solution and it appears that I didn't have to...
Many thanks! ZielonaMrowka (talk) 18:32, 1 May 2018 (UTC)

Suppress Extra Bullets, In Flow?

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


That's how nested bullets work in general. If you want to increase the indentation of a bullet you can abuse definition lists (like what is done on talk pages), or use CSS to increase the margin. ::* Example

  • Example
OR
<div style="margin-left:3.2em">
* Example
</div>
  • Example
110.149.125.240 (talk) 12:30, 29 April 2018 (UTC) in visualediting preview mode, this displays as expected-- a single, indented bullet
*** Test
Imo, it should display the same when submitted as it looks in preview-- a single, indented bullet.

(In preview, there are empty paragraphs above it, i think because visualeditor is looking for it's non-existent parent-bullets. That's no problem.)

Sequential stars is the normal way to indent bullets when all levels are present
* Top
** Second
*** Third
Therefor, IMO, the same syntax should work to create an indented bullet without parents. No CSS should be needed:
      • No parent
. In reality, the indented bullet does have parents in my usage. The real problem is the child bullet loses it's relationship to a child bullet, because the text is broken up with a "pre" block.
* Parent
<pre>some code</pre>
** Child
renders as:
  • Parent
Some code
    • Child

.

So that's the real problem-- "pre" breaks bullets. It's actually the new-paragraphs which break the bullets. In other editors, i can use SHIFT-ENTER to get a line break without new-paragraph. That's not available in VisualEditor. https://phabricator.wikimedia.org/T193351

(Btw, In mobile view, your first example displays incorrectly.) Johnywhy (talk) 17:50, 29 April 2018 (UTC) This has nothing to do with VE or even MediaWiki, this is just how HTML lists work. You can go and write the HTML out yourself in a blank HTML document and you'll see the exact same result. (Also I don't see how you're seeing it work in VE's preview. It spaces the dots out, because of the boxes to let you add text to each list item, but all of the dots are still there.)

The issue with the lists being broken by text in-between also isn't related to VE, it's just wikitext list items only apply to a single line, and anything in-between will start a new list. The solution is to either comment out the line breaks, or just use HTML instead.

*Parent<!--
--><pre>some code</pre>
**Child
  • Parent
    some code
    • Child
<ul>
<li>Parent
<pre>some code</pre>
<ul>
<li>Child
</ul>
</ul>
  • Parent
    some code
    • Child
110.149.125.240 (talk) 10:18, 30 April 2018 (UTC)

I prefer to keep things in wikitext, instead of embedding HTML.

This also works. The trick, in wikitext, seems to be to begin the code on the Parent line:
*Parent<pre>Some code</pre>
**Child
renders:
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Parser Function Not Working

Make it anonymous.
{{#if: {{{1|}}} |  Yes | No}}
{{Cond | DoIt | }}

I can do anonymous parameters no prob, but can't figure out how to do "there or not" parameters.

I consulted Help:Extension:ParserFunctions and Help:Templates. i know i'm using the wrong syntax, but just can't figure out the help docs.

Here's my conditional, in MyTemplate:

{{#if: DoIt |  Yes }}

Triple-braced {{{DoIt}}} makes more sense to me, since it's a parameter, but Help:Extension:ParserFunctions##if doesn't show it that way:

{{#if: test string | value if test string is not empty | value if test string is empty (or only white space) }}

Here's my transclude:

{{MyTemplate | DoIt}}

i expect to see "Yes" in the output. Not seeing "Yes", just getting the raw wikitext in my output:

{{#if: DoIt | Yes }}

I don't see any conditional examples on Help:Templates Johnywhy (talk) 18:42, 29 April 2018 (UTC)

The documentation for #if is correct. It tests strings. Whether that is a string you wrote out initially, or a string provided by a template parameter.
A common usage would thus be:
{{#if: {{{1|}}} | Yes }}
(If the first (optional) parameter of the template call has a value, then output "Yes". Which coincidentally is the last example in the documentation of #if.
I think you are confusing named parameters with unnamed parameters, and mistaking parameters as an essiential part of the template, but parameters exist at the level of a template call. —TheDJ (Not WMF) (talkcontribs) 07:57, 30 April 2018 (UTC)
i can't figure out how to code this. Can you plz share a working "there or not" example conditional?
"There or not" meaning, i can call the template 2 ways:
{{MyTemplate | DoIt}}
or
{{MyTemplate}}
If "DoIt" is present in the transclude, then return "Yes".
thx Johnywhy (talk) 17:54, 30 April 2018 (UTC)
Try with, MyTemplate:
{{#if: {{{DoIt|}}} |  Yes }}
Then, transclude the template as:
{{MyTemplate | DoIt = foo}} AhmadF.Cheema (talk) 00:15, 1 May 2018 (UTC)
i tried your code.
i must be missing something basic here. Instead of just getting "Yes", I'm seeing the following on the host-page.
{{#if: foo | Yes }}
You can see that {{{DoIt|}}} is getting resolved to "foo", but then we're also getting the entire statement.
Do i need to install an extension for parser function? Johnywhy (talk) 02:13, 1 May 2018 (UTC)
Extension:ParserFunctions AhmadF.Cheema (talk) 06:01, 1 May 2018 (UTC)
ok, i had to enable the extension in localsettings.php. your code works now :)
But isn't there a "there or not" syntax?
i want to call it with {{MyTemplate | DoIt}}
without "= foo".
thx Johnywhy (talk) 14:12, 1 May 2018 (UTC)
Remove the "foo", it is present only to indicate that portion has some value and is not empty. AhmadF.Cheema (talk) 16:23, 1 May 2018 (UTC)
Thx, but this doesn't return 'Yes'
 {{MyTemplate | DoIt}}
Johnywhy (talk) 18:30, 1 May 2018 (UTC)
In this case, since no value has been set for "DoIt", meaning it is empty and therefore "Yes" is not showing up.
"DoIt" will have to be equal to some value for the condition to be true and for "Yes" to display.
OR, you can have MyTemplate as:
{{#if: {{{DoIt|{{{1|}}}}}} |  Yes }}
Then, transclude the template as:
{{MyTemplate | DoIt=anytext}}
OR
{{MyTemplate | 1=anytext}}
OR
{{MyTemplate | anytext}}
AhmadF.Cheema (talk) 04:13, 2 May 2018 (UTC)
Fantastic! Make it anonymous. Thx!
This simpler also works
{{#if: {{{1}}} |  Yes }}
Call:
{{Cond | DoIt }}
But why doesn't this work?
{{#if: {{{1}}} = DoIt |  Yes }}
Johnywhy (talk) 02:17, 3 May 2018 (UTC)
because #if is an "if exists", not a comparative if. For that case, see Help:Extension:ParserFunctions##ifeq. And then we have an #ifexists, which checks for page existence, just to keep things very simple... ;) —TheDJ (Not WMF) (talkcontribs) 03:04, 3 May 2018 (UTC)
why does this work
{{#if: {{{1|}}} |  Yes }}
but not this?
{{#if: {{{1}}} |  Yes }}
Johnywhy (talk) 11:05, 3 May 2018 (UTC)
Help:Parser functions in templates is supposed to explain the peculiarity, that is if one can mange to understand it. AhmadF.Cheema (talk) 11:20, 3 May 2018 (UTC)
Because if you don't specify a fallback value (empty in the first case), then it just outputs {{{1}}} literally, which is of course interpreted as true. 121.219.34.186 (talk) 13:57, 3 May 2018 (UTC)

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


I don't speak the language of father russia... there is nothing that allows me to change the language... very unhelpful... 185.206.172.129 (talk) 11:26, 30 April 2018 (UTC)

Welcome to the support desk for the MediaWiki software. If your posting is somehow related to MediaWiki: Feel free to ask a question if you have one, and please provide clear steps that would allow someone else to understand and reproduce any problem. Malyacko (talk) 13:34, 30 April 2018 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

How to change account name?

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


Can i do this? Alex Tagirov (talk) 13:39, 30 April 2018 (UTC)

Install the Renameuser extension on your wiki and follow the instructions on using it. [[kgh]] (talk) 14:58, 30 April 2018 (UTC)
Thanks for the help!
Not specified: I'm interested in changing the username on wikipedia.org 192.40.95.20 (talk) 12:01, 2 May 2018 (UTC)
Just ask on the relevant page on your local wiki. [[kgh]] (talk) 12:22, 2 May 2018 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Minimum privileges for MySQL-database?

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


The instructions advise to grant all privileges to the database user defined with "$wgDBuser". However in the light of the user defined with configuration parameter "$wgDBadminuser" who may get all privileges instead: What are the minimum privileges for the user defined by configuration parameter "$wgDBuser" required to run MediaWiki without issues? [[kgh]] (talk) 15:06, 30 April 2018 (UTC)

Note, that granting all privledges on a specific DB is different from granting all privledges in general (e.g. It doesn't include SUPER or FILE privleges), so that's not quite as scary as it sounds (You are still right though, the user should have the minimum privledges neccessary)
Anyways, I believe the normal user needs the following:
  • DELETE
  • SELECT
  • INSERT
  • UPDATE
  • REPLICATION CLIENT (Strictly speaking, only needed if you are using replication)
Additionally, the DBAdminUser needs the following in addition to the normal privs:
  • ALTER
  • CREATE
  • DROP
  • INDEX
  • LOCK TABLES
  • REFERENCES (probably not strictly needed, but could be in the future)
  • TRIGGER (Not needed currently. But possibly in the future)
I believe that's all, but I haven't really tested this.
Additionally, you want to make sure you're only granting these permissions on the database the wiki uses - you don't need to grant them globally.
Note: Some extensions (e.g. SMW, Cargo) may require more permissions. If you're running unit tests, you may need the normal user to have some of the DBAdmin privs, I'm not sure. Bawolff (talk) 19:20, 1 May 2018 (UTC)
Thanks a lot for your elaborate answer! I appreciate this a lot and I will see to it in the next days that I document it here.
Indeed, privileges should only be granted to a specific database, so the documentation is ok.
I am not absolutely sure but the installer however suggests "root" as normal user. In this case things are probably a bit more scary.
Affirmative, there are extensions that need more privileges than MediaWiki core. I do not know about Cargo, but Semantic MediaWiki additionally needs CREATE TEMPORARY TABLES. [[kgh]] (talk) 20:22, 1 May 2018 (UTC)
So if the installer is given the root user, it will try to create a new user with more limitted permissions (but still not as limitted as it can be. I just filed https://phabricator.wikimedia.org/T193552 about that) Bawolff (talk) 20:47, 1 May 2018 (UTC)
Ah, ok, I am with you. Cool, you foresaw my answer. :) I will wait what happens to the task before updating docu here. [[kgh]] (talk) 07:47, 2 May 2018 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Script error: Lua error: Internal error: The interpreter exited with status 1.

Hello, for some reason i get this error, i was exporting a page from wikipedia, and then i imported in my wiki(with all the templates and modules selected), and i got all this errors.

Thanks is advance!!

file/usr/bin/lua5.3: .../extensions/Scribunto/engines/LuaStandalone/MWServer.lua:526: attempt to call a nil value (global 'loadstring')

stack traceback:

.../extensions/Scribunto/engines/LuaStandalone/MWServer.lua:526: in function 'MWServer.unserialize'

.../extensions/Scribunto/engines/LuaStandalone/MWServer.lua:410: in function 'MWServer.receiveMessage'

.../extensions/Scribunto/engines/LuaStandalone/MWServer.lua:295: in function 'MWServer.dispatch'

.../extensions/Scribunto/engines/LuaStandalone/MWServer.lua:40: in function 'MWServer.execute'

...i/extensions/Scribunto/engines/LuaStandalone/mw_main.lua:7: in main chunk

[C]: in ? 2A02:2149:8897:D800:2C0B:2125:2125:D942 (talk) 15:17, 30 April 2018 (UTC)

by changing the lua into lua5.1 i dont get the errors, should i now post the page again and the templates and modules? to take effect? 2A02:2149:8897:D800:2C0B:2125:2125:D942 (talk) 15:56, 30 April 2018 (UTC)
Viewing pages should probably clear the errors. If because of caching they don't, you can make an edit on the affected modules (a null edit may not work, you'll need to change something), and pages using that module should be reparsed again. Ciencia Al Poder (talk) 09:29, 2 May 2018 (UTC)

Edit <tags> in all wiki pages

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


I have to cleanup a wiki with hundreds "Pages with syntax highlighting errors". Is there a way of "bulk editing"?

I need to cange '<source lang="text">' to '<pre>' wiki-wide. And of course the closing tags too :) 62.224.137.113 (talk) 16:25, 30 April 2018 (UTC)

Try Extension:ReplaceText Bawolff (talk) 18:48, 1 May 2018 (UTC)
Done! Thank you very much! 62.224.133.49 (talk) 11:45, 3 May 2018 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Is the mediawiki works in a raspberry pi or its just not worth the time?

this is my mediawiki https://opaaa.ddns.net/wiki/index.php/%CE%91%CF%81%CF%87%CE%B9%CE%BA%CE%AE_%CF%83%CE%B5%CE%BB%CE%AF%CE%B4%CE%B1 and i get thousand of errors, and the loading isincredible long, while it was way faster in windows using xampp. 2A02:2149:8897:D800:2C0B:2125:2125:D942 (talk) 20:09, 30 April 2018 (UTC)

To debug errors, see Manual:How to debug Malyacko (talk) 17:51, 1 May 2018 (UTC)
There are definitely people who use rasberry pi with MediaWiki. Your errors are likely not specificly due to raspberry pi, but something wrong with how MW is setup. Usually the biggest problem with a raspberry pi is lack of real time clock, so edit timestamps overlap on reboot.
raspberry pi's are low-power machines, so are going to be slower than "real" servers. That said, if loading is excessively long, it probably points to misconfigured caching or DB (The type of config appropriate to a server is probably not appropriate on a raspberry pi). Bawolff (talk) 18:47, 1 May 2018 (UTC)

Image thumbnails broken

Image thumbnails do not work when the thumbnail ends up being the same as the image size. Version Info: Windows Server 2012 R2, IIS 8, MySQL 5.7.22, PHP 7.2.5, MediaWiki 1.30.0, ICU 61.1, ImageMagick 7.0.7-Q8. The following were tried: Verified correct filesystem permissions, verified $wgTmpDirectory, verified Image Magick settings. Thumbnails work as long as the thumbnail is not the same size as the original image. This is particularly troublesome for small images, such as one I have that is 216px by 92px.

## To enable image uploads, make sure the 'images' directory

## is writable, then set this to true:

$wgEnableUploads = true;

$wgUseImageMagick = true;

$wgImageMagickConvertCommand = "C:\Program Files\ImageMagick-7.0.7-Q8\convert.exe";

$wgUseImageResize = false; had no effect.

Thank you for any help! 208.73.132.195 (talk) 21:53, 30 April 2018 (UTC)

So if thumbnail is same size as original, that means that MediaWiki is using the original and not a thumbnail - so your image magick config is not at fault.
Most likely its a permission error. Make sure that your webserver is allowed to read/output files in the numbered subdirectories of the images directory (e.g. Things like images/3/3a/My_file.jpg ) Bawolff (talk) 18:44, 1 May 2018 (UTC)
Permissions does not seem to be the issue, unless it's not the images or temp folders that matter. I tried granting "everyone", "authenticated users", "anonymous", and "IIS_IUSR" all full control to no effect. When going into Visual Editor, the images appear. When editing and saving, the thumbnails disappear again. 208.73.132.195 (talk) 22:10, 1 May 2018 (UTC)
If you go to view source in your browser to look at the html, find <img tag, look at the src attribute to find where its pointing, and go to that url, what happens?
Alternatively, if you go to the file description page, and click on the link to the original file, what happens when you go there. Bawolff (talk) 22:22, 1 May 2018 (UTC)
This is in the document, it does not give the file link.
<div class="MediaTransformError" style="width: 216px; height: 0px; display:inline-block;">Error creating thumbnail: Unable to save thumbnail to destination</div>
Alternatively in VisualEditor:
<div class="ve-ce-focusableNode-highlight" title="Installer1.png" draggable="false" style="top: 549.609px; left: 476.5px; width: 218px; height: 71px;"><img class="ve-ce-focusableNode-highlight-relocatable-marker" src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="></div>
In the Special page for files:
Thumbnail is: Error creating thumbnail: Unable to save thumbnail to destination
If I click the link in Date/Time the image shows up fine. Dimensions are 216 × 69 (2 KB) (I recreated the file to no effect).
Thank you for helping with this (even though it's still ongoing)! 208.73.132.195 (talk) 13:22, 2 May 2018 (UTC)
Hmm. It'd be odd to get the Error creating thumbnail: Unable to save thumbnail to destination error when thumb is same size as original (unless file has exif rotation info) as normally mediawiki just uses the original thumb in that case.
Typically, Error creating thumbnail: Unable to save thumbnail to destination would indicate that either:
  • MediaWiki doesn't have permission to create the thumb file (e.g. doesn't have write permission to the thumbs subdirectory of images
  • The file repo is in read only mode
  • MediaWiki doesn't have permission to create temporary files. Normally I think it uses the system temporary directory. Make sure MEdiaWiki has permission to create files there. You could also try adjusting $wgTmpDirectory Bawolff (talk) 16:51, 2 May 2018 (UTC)
I do have $wgTmpDirectory specified, and all permissions are enabled there. There are less permissions on the system tmp directory, but that subset is in the directory specified in localsettings.php. Commenting out the $wgTmpDirectory line resolves the image thumbnail problem for my user and a few others, however about half of the users then get Server Error 500 when trying to go to the site (adding all permissions to the system temp directory did not resolve the error 500). The site worked perfectly fine with mediawiki 1.29, and initially with 1.30 but broke about a month later. When mediawiki 1.31 comes out I will try a fresh install and migrate the database to see if this resolves the issue. 208.73.132.195 (talk) 18:57, 2 May 2018 (UTC)
Usually, Setting up a debug log file should provide more information in the debug log. Ciencia Al Poder (talk) 09:36, 3 May 2018 (UTC)