Project:Support desk/Flow/2018/06

This page is an archive.
Please ask questions on the current support desk.
Category:Support desk archives#Flow%20Archive%20Support%20desk/Flow/2018/06

Bug in CentralAuth

[This]. It appears that the account is registered on 0 wikis. I think it is supposed to show it being registered on one or more wikis. ~ Cæsey (talk) 01:24, 2 June 2018 (UTC)

Do you know which wiki does that account exist on? (I'd also be a bit surprised if "User:" was allowed as part of an account name.) Malyacko (talk) 20:51, 2 June 2018 (UTC)
Yes, but the account shouldn't exist. Cæsey (talk) 02:15, 3 June 2018 (UTC)
I see. Feel free to report a bug: https://mediawiki.org/wiki/How_to_report_a_bug Malyacko (talk) 14:59, 3 June 2018 (UTC)

Probleem met inloggen

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.


Gebruikers van mijn wiki kunnen niet inloggen en nu kom ik er zelf ook niet meer in. Ik heb het op Chrome en Firefox geprobeerd. Wat is er aan de hand? Indrik2 (talk) 08:28, 2 June 2018 (UTC)

Het gaat om indrik.miraheze.org Indrik2 (talk) 08:29, 2 June 2018 (UTC)
Nu zit ik er na vele malen proberen met dezelfde inloggegevens ineens wel weer in. Vervelend dat het inloggen steeds problemen geeft met dit verder zo mooie programma.
Ik had al steeds dat je twee keer moest inloggen voor je binnen was. Wat kan dit zijn? Indrik2 (talk) 08:39, 2 June 2018 (UTC)
Nu maak ik een klik in het programma en hup, lig ik er weer uit en kan ik er weer niet meer in. Indrik2 (talk) 08:41, 2 June 2018 (UTC)
De foutmelding die ik steeds krijg is: Er is geen actieve aanmeldpoging voor uw sessie.
Daarna kom ik niet verder. Jammer. Cookies gewist, maar dat helpt ook niet. Heeft iemand nog een tip? Klaas7 (talk) 13:53, 2 June 2018 (UTC)
Klaas7 en Indrik2 zijn dezelfde persoon ;-) Klaas7 (talk) 13:53, 2 June 2018 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Unstyled Login-Page

After having upgraded my mw to 1.30 (php=7.0.2, mySQL=5.6.36) all went perfect except my Login-Page remains unstyled. Whatever I did (wgallowSiteCSSonrestrictedPages in localsettings, add a wgResourceModule-patch in localsettings, external addressing of wgServer in localsettings and also altering the .htaccess-File) showed no effect. How can I resolve this problem? Patrik-ssptop (talk) 14:19, 2 June 2018 (UTC)

Did you check the necessary resources via the console (F12>NetWork) of your browser? 星耀晨曦 (talk) 19:39, 2 June 2018 (UTC)

my annotation has been removed, why ??

Hello, this is the second time that I want to add an annotationi and a link on a page, before it is erased. I would like to add on the page "List of swords of fiction" in French, the sword (the sword of Fierbois) of Joan of Arc. The links are external links.

I would like to know who and why this annotation is deleted. Who do I write to ?

Thanks in advance for your answer

Lilyane 2A02:120B:C3E5:9550:50C9:1FC9:EE1F:761A (talk) 08:29, 3 June 2018 (UTC)

This support forum is primarily for questions related to MediaWiki, the software that runs Wikipedia.
For queries related to the content of English Wikipedia, please ask at Wikipedia:Teahouse; for French Wikipedia kindly ask at Forum_des_nouveaux. AhmadF.Cheema (talk) 17:59, 3 June 2018 (UTC)

How to embed nbsp inside pre tags (without losing newlines)?

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.


<pre>&nbsp;</pre>

doesn't work.

<nowiki><pre>&nbsp;</pre><nowiki>

works here, but doesn't seem to work on a wikipage. (confused, cuz this is a wikipage... :) Johnywhy (talk) 09:49, 3 June 2018 (UTC)

That might be a general HTML / web browser question and not a MediaWiki question?
If I put <pre>&nbsp;</pre> into an HTML file and open that file in Firefox it does not display &nbsp; either... Malyacko (talk) 19:04, 3 June 2018 (UTC)
Do you try to insert a literal "&nbsp;"?
You'll need to escape "&" as "&amp;". Basically, write "&amp;nbsp;" Ciencia Al Poder (talk) 09:34, 4 June 2018 (UTC)
Your solution works! Johnywhy (talk) 09:56, 4 June 2018 (UTC)
But <nowiki><pre>&nbsp;</pre><nowiki> works here on Support Desk. If browser issue, wouldn't work here either, right? Johnywhy (talk) 09:38, 4 June 2018 (UTC)
Structured Discussions is not using the normal parser, hence things may work a bit different Ciencia Al Poder (talk) 09:40, 4 June 2018 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Unexpected API OpenSearch Results

Two pages on my wiki contains Anteater

But the following

https://gunretort.xyz/api.php?action=opensearch&format=jsonfm&search=Anteater

returns nothing

[
    "Anteater",
    [],
    [],
    []
]

On the other hand, the following:

https://gunretort.xyz/api.php?action=opensearch&format=jsonfm&search=WhatTag|Anteater

returns numerous pages which contain none of the search string:

[
    "WhatTag|Anteater",
    [
        "A good guy with a gun will stop a bad guy with a gun.",
        "Active Shooter",
        "Country Comparisons",
        "Courts ruled the National Firearms Act \"unconstitutional\".",
        "Debate Tips",
        "Domestic Terrorism in the U.S.",
        "Draft",
        "Grits",
        "Heavy trucks are being used in relatively gun-free Europe to commit mass murders.",
        "How to Report Domestic Terrorism"
    ],
    [
        "",
        "",
        "",
        "",
        "",
        "",
        "",
        "",
        "",
        ""
    ],
    [
        "https://gunretort.xyz/index.php/A_good_guy_with_a_gun_will_stop_a_bad_guy_with_a_gun.",
        "https://gunretort.xyz/index.php/Active_Shooter",
        "https://gunretort.xyz/index.php/Country_Comparisons",
        "https://gunretort.xyz/index.php/Courts_ruled_the_National_Firearms_Act_%22unconstitutional%22.",
        "https://gunretort.xyz/index.php/Debate_Tips",
        "https://gunretort.xyz/index.php/Domestic_Terrorism_in_the_U.S.",
        "https://gunretort.xyz/index.php/Draft",
        "https://gunretort.xyz/index.php/Grits",
        "https://gunretort.xyz/index.php/Heavy_trucks_are_being_used_in_relatively_gun-free_Europe_to_commit_mass_murders.",
        "https://gunretort.xyz/index.php/How_to_Report_Domestic_Terrorism"
    ]
]

What am i doing wrong? Johnywhy (talk) 13:44, 3 June 2018 (UTC)

RegEx API Search Without Cirrus?

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 perform API regex search? Is Cirrus required? I think insource is used for this

https://en.wikipedia.org/wiki/Help:Searching#insource:

not recognized here:

https://gunretort.xyz/index.php?search=insource%3A%22tag%22&title=Special%3ASearch&profile=advanced&fulltext=1&ns0=1 Johnywhy (talk) 15:11, 3 June 2018 (UTC)

https://www.mediawiki.org/wiki/Help:Searching covers what the default search in the MediaWiki software offers.
The website en.wikipedia.org uses the CirrusSearch extension. See https://www.mediawiki.org/wiki/Help:CirrusSearch instead. Malyacko (talk) 10:07, 4 June 2018 (UTC)
All i've read so far indicates that core does not include Cirrus, and Cirrus is required for regex searches. Johnywhy (talk) 10:25, 4 June 2018 (UTC)
yes, you need cirrus for insource://
Some people also like extension:ReplaceText Bawolff (talk) 16:34, 4 June 2018 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Wikidata Query Service in core?

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 Wikidata Query Service available in core, on all MediaWiki 1.30 install? Johnywhy (talk) 16:48, 3 June 2018 (UTC)

Wikidata extensions and Wikibase extensions are not included in MediaWiki tarballs by default. Malyacko (talk) 18:58, 3 June 2018 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Does API query-action Search Wikitext or HTML?

Does API query-action Search Wikitext or HTML? Johnywhy (talk) 19:46, 3 June 2018 (UTC)

See the very first sentence of API:Query. Malyacko (talk) 10:09, 4 June 2018 (UTC)
Indicates wikitext.
But this parameter can return HTML of page, suggesting query may have some HTML ability.
extracts - Returns plain-text or limited HTML extracts of the given pages.
https://www.mediawiki.org/w/api.php?action=help&modules=query
Johnywhy (talk) 10:28, 4 June 2018 (UTC)

Importing text files as new mediawiki pages

Hello,

I'm trying to use the pagefromfile.py script from pywikibot to import text files as new pages in my mediawiki server. I am able to login and do some basic maintenance, but this specific bot gives me an error: https://pastebin.com/WDTfuLLH.

Anyone have an idea on how to fix this or an easier method/tutorial on how to import text files into mediawiki as separate pages? Sc4s2cg (talk) 20:41, 3 June 2018 (UTC)

Looks like an error of the python script. Try updating to latest version of pywikibot. If that doesn't fix the error, you should report that bug Ciencia Al Poder (talk) 09:32, 4 June 2018 (UTC)

Can't find API Query Snippet on Found Page?

This query:

https://gunretort.xyz/api.php?action=query&list=search&srsearch=TopicTag&srwhat=text

Returns this snippet:

"snippet": "<!-- This is a <span class='searchmatch'>TopicTag</span> -->\n",

which decodes to:

"<!-- This is a <span class='searchmatch'>TopicTag</span> -->\n",

However, the found page does not contain the above string, in rendered text or in HTML source.

https://gunretort.xyz/index.php/Scrap

An older version of the page probably contains that text. So, I turned off caching, purged the page cache, and ran both rebuildall.php and rebuildtextindex.php.

But the API still returns the same thing.

Where is that snippet coming from? Johnywhy (talk) 09:35, 4 June 2018 (UTC)

What is "u800" in SearchIndex Table?

i notice the si_text field in SearchIndex table is littered with u800.

What is u800?

How can i query the table for contiguous text, if it's littered with u800? Johnywhy (talk) 09:50, 4 June 2018 (UTC)

https://www.mail-archive.com/mediawiki-api@lists.wikimedia.org/msg01313.html
Project:Support desk/Flow/2013/01#h-Corrupted_database_-_where_to_from_here?-2013-01-21T12:37:00.000Z Malyacko (talk) 10:11, 4 June 2018 (UTC)
Your first link suggests it's normal:
[u800 is] a character outside of ascii which are escaped so mysql search can find it.
But your second link suggests it's a corruption.
The first one seems more plausible. Does this mean mysql search will ignore u800?
i'm unclear what "mysql search" means. Does that just mean a sql query with a WHERE clause? Or some special script? (a google of this question suggests could be either, so i don't know which they mean in your link) Johnywhy (talk) 10:37, 4 June 2018 (UTC)
                // And to add insult to injury, the default indexing
                // ignores short words... Pad them so we can pass them
                // through without reconfiguring the server...
                $minLength = $this->minSearchLength();
                if ( $minLength > 1 ) { 
                        $n = $minLength - 1;
                        $out = preg_replace(
                                "/\b(\w{1,$n})\b/",
                                "$1u800",
                                $out );
                }
So its just to make sure that words are long enough so they aren't ignored by mysql internal search Bawolff (talk) 16:29, 4 June 2018 (UTC)
Thx. Does "mysql internal search" mean a sql query with a WHERE clause? Johnywhy (talk) 17:51, 4 June 2018 (UTC)

How to share new extension under-development?

New Extension:TopicTags

This extension provides inline topic-tags, which are completely independent of Categories.

The new, unique feature of these topic-tags, is they are not just page-level tags. They can be scoped to specific locations within the body of a page. Categories can't do that.

This extension is under-development, and seeking feedback/suggestions.

Nearly all of my many questions all over mediawiki.org over the past few months have been related to this extension. Johnywhy (talk) 11:11, 4 June 2018 (UTC)

Hi, Manual:Developing extensions#Publishing (and Gerrit/New repositories if you'd like to host the code on Wikimedia infrastructure). AKlapper (WMF) (talk) 18:11, 4 June 2018 (UTC)
Thx, but not ready to publish. Just seeking pre-release feedback.
Also, this extension has no php code to host. It's pure wikitext. Johnywhy (talk) 20:08, 4 June 2018 (UTC)

Dokuwiki to Mediawiki Image converter?

is there a converter or KB article which can convert/import Dokuwiki images to Mediawiki?

If not, is there a way to do this which doesn't involve manually copying/importing the images across?

Thanks 80.231.216.12 (talk) 11:55, 4 June 2018 (UTC)

Manual:importImages.php is the only option I know. Ciencia Al Poder (talk) 09:36, 5 June 2018 (UTC)

problem after the pages import

I have migrated all pages of a existing site to another site using export and import pages but now i came to know i don't need to import all pages, only the pages from one category needs to be imported.

Here are the things, I have to do now.

1) Categories didn't get imported from the pages. At the end of all imported pages category are in red. There is no category in special: category page. So i need to add/import category.

2) Delete the pages in all other categories which are not required. Ahsan96 (talk) 13:31, 4 June 2018 (UTC)

Categories don't need to be imported, you need to run the Job queue.
For deleting pages in a category, you can make use of Extension:DeleteBatch or Extension:NukeDPL. AhmadF.Cheema (talk) 13:43, 4 June 2018 (UTC)
Thanks for the update.
Still I don’t see the categories when I go special ---all pages and then select namespace category. However, the source system shows multiple categories Ahsan96 (talk) 14:22, 4 June 2018 (UTC)
Categories also are pages, and they need to be exported as well.
Categories have 2 contents:
- The category page itself, which is wikitext like any other page
- A list of members of that category (which can be pages, other categories or files)
When importing pages that have categories, you are populating the category members, but you also need to import the category page for it to be presented as an "existing" category and to avoid the link appear as red. Ciencia Al Poder (talk) 09:24, 5 June 2018 (UTC)

Refering current page to an item in the sidebar

Hi, when I click on "Members" in our navigation, the sidebar is expanded and members is bold and everything works properly. There we have a list off all members. Also each member has its own page like member1, member2 etc. My problem is when I visit the page of e.g. member1 the sidebar collapses. How can I visit the member1 page and the sidebar is expanded and members is highlighted.

We have following navigation structure:

<code>

*People|People

**Administration|Administration

**Members|Members

**Former Members|Former Members

</code>

In a previous version of mediawiki(1.16), we used <menu>Members</menu> on the end of the page to refer member1 to members, but this doenst work anymore.

We upgraded to MediaWiki 1.29.1 and we are using a custom skin.

Thanks in advance! 2001:16B8:2ECD:A600:C9B4:C1C8:7E0E:7FDB (talk) 19:41, 4 June 2018 (UTC)

DPL3: How to suppress display of matched parameters?

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 trying to match
{{Tag|Anteater}}

Regarding https://help.gamepedia.com/DPL:Parameters:_Criteria_for_Page_Selection#includematch, and https://help.gamepedia.com/DPL:Parameters:_Controlling_Output_Volume#include

The DPL statement

   {{#dpl: 
         |uses=Template:Tag
         |includematch=/Anteater/
         |include={Tag}:1
     }}

returns the expected page list:

ScrapAnteater 
Scrap3Anteater

Problem is, it also displays the parameter "Anteater" after every page-name.

How to show only the pagenames, and suppress display of matched parameters, while still matching the parameters? Johnywhy (talk) 20:28, 4 June 2018 (UTC)

Solved. I use #dplreplace to remove the matching text put there by the include statement. The format statement isn't normally required-- page-names will get listed in the output by default. I use the format statement only to append an arbitrary delimiter character before the output of the include statement, to ensure dplreplace doesn't accidentally affect any page-names (in case any page names contain the same string). I use · as delimiter, but it can be any character you want. The format parameter by itself it's insufficient to remove the matching text, because the matching text is added to the output (by the include statement) after the output of the format statement. The format statement has no effect on the output of the include statement.
{{#dplreplace:
{{#dpl: 
    |uses = Template:Tag
    |format = ,\n* %PAGE%·,,
    |includematch = /Anteater/
    |include = {Tag}:1
}}
|·Anteater}}
Johnywhy (talk) 12:58, 5 June 2018 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

default settings for bindings

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.


Somehow an axis Y got set in the "Interact" function on the bindings page. I have no idea how to undo that.

nothing I have tried has worked. Is there a way to return to a default setting? 75.71.202.240 (talk) 01:02, 5 June 2018 (UTC)

Looks like you're on the wrong support forum Ciencia Al Poder (talk) 09:36, 5 June 2018 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Question about translation

I do contribute on the translate wiki. I was wondering if i translated wikimedia messages, such as this one:

Note: After saving, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Internet Explorer: Hold Ctrl while clicking Refresh, or press Ctrl-F5
  • Opera: Go to Menu → Settings (Opera → Preferences on a Mac) and then to Privacy & security → Clear browsing data → Cached images and files.

would it be localized on my local wiki? Because there a lot of such messages n stuff that needs to translated. I'm sorry if this is not the place to ask this? Thanks for any help! Glacious (talk) 04:17, 5 June 2018 (UTC)

If you translate it on translatewiki.net, they'll become available on the next MediaWiki release.
If you want to fetch the updated translations without waiting to upgrade to the next version, you can install Extension:LocalisationUpdate Ciencia Al Poder (talk) 09:17, 5 June 2018 (UTC)
Can you please provide me with additional details how to do this on a local wikipedia? Glacious (talk) 10:00, 5 June 2018 (UTC)
I have never used that extension, but the page Extension:LocalisationUpdate should give you all details. If not please ask specific questions. Ciencia Al Poder (talk) 13:58, 5 June 2018 (UTC)

Error on requesting new account

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.


http://www.polanimal.com/wiki

MediaWiki 1.30.0
PHP 5.6.36 (cgi-fcgi)
MySQL 5.6.38
ICU 4.2.1

I installed short URLs and Confirm User Accounts. When I try to request a new account I get the following error:

A database query error has occurred. This may indicate a bug in the software.

[WxZIV3hWO1jbu@2H2h2B-QAAAEM] 2018-06-05 08:22:47: Fatal exception of type "Wikimedia\Rdbms\DBQueryError"

    Fatal error: Uncaught exception 'Wikimedia\Rdbms\DBTransactionError' with message 'Explicit transaction still active. A caller may have caught an error.' in /home/ozpolit/polanimal.com/w/includes/libs/rdbms/loadbalancer/LoadBalancer.php:1200 Stack trace: #0 [internal function]: Wikimedia\Rdbms\LoadBalancer->Wikimedia\Rdbms\{closure}(Object(Wikimedia\Rdbms\DatabaseMysqli)) #1 /home/ozpolit/polanimal.com/w/includes/libs/rdbms/loadbalancer/LoadBalancer.php(1546): call_user_func_array(Object(Closure), Array) #2 /home/ozpolit/polanimal.com/w/includes/libs/rdbms/loadbalancer/LoadBalancer.php(1223): Wikimedia\Rdbms\LoadBalancer->forEachOpenMasterConnection(Object(Closure)) #3 [internal function]: Wikimedia\Rdbms\LoadBalancer->approveMasterChanges(Array) #4 /home/ozpolit/polanimal.com/w/includes/libs/rdbms/lbfactory/LBFactory.php(183): call_user_func_array(Array, Array) #5 [internal function]: Wikimedia\Rdbms\LBFactory->Wikimedia\Rdbms\{closure}(Object(Wikimedia\Rdbms\LoadBalancer), 'approveMasterCh...', Array) #6 /home/ozpolit/p in /home/ozpolit/polanimal.com/w/includes/libs/rdbms/loadbalancer/LoadBalancer.php on line 1200 Oz freediver (talk) 08:27, 5 June 2018 (UTC)

    I reinstalled the wiki from scratch and the problem is fixed. Oz freediver (talk) 00:57, 6 June 2018 (UTC)
    The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

    What are "modules"?

    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.


    What are "modules", like this one?

    I'm guessing that, to install, i can just copy this page to my wiki, and it's functions will immediately become available.

    Correct?

    Or can modules only be used by php code? Johnywhy (talk) 10:19, 5 June 2018 (UTC)

    Modules are used by Extension:Scribunto. You'll need that extension installed for modules to work (with the #invoke parser function) Ciencia Al Poder (talk) 14:07, 5 June 2018 (UTC)
    The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

    Please update translation source

    In the page Download from Git, I am not sure how to update the param link. The [https://www.mediawiki.org/w/index.php?title=Translations:Download_from_Git/46/en source] says;

    #"Nightlies, an alternate to downloading from Git".

    #It actually redirects to Hourlies. Omotecho (talk) 13:19, 5 June 2018 (UTC)

    How does that create a problem? Why does the translation source needs to be updated? If you think it needs to, feel free to edit the wiki page. Malyacko (talk) 10:50, 6 June 2018 (UTC)
    Malyacko, Could you advise me if we change from <code><nowiki>$nightlies to</nowiki></code> to <code><nowiki>$hourlies</nowiki></code>? Omotecho (talk) 13:15, 6 June 2018 (UTC)
    Advise how? :) It's a wiki, feel free to edit it. I'm not a specialist in translate stuff, sorry... Malyacko (talk) 12:43, 7 June 2018 (UTC)
    No, you can't go away yet please. It's not about translation, but my problem is how to deal with a redirect. Do we just overwrite from _nightlies to _hourlies? What will be your edit in a case like below?
    1. Open Download from Git#See also.
    2. Push <code><nowiki>$nightlies</nowiki></code>, and
    3. as you see, it redirects to <code><nowiki>$hourlies</nowiki></code>. Omotecho (talk) 13:32, 7 June 2018 (UTC)
    What exactly stops you from avoiding a redirect? Why exactly is that a "problem"?
    If something is wrong, someone will fix or revert. It's a wiki. Malyacko (talk) 14:03, 7 June 2018 (UTC)

    How to pass pipe as secseparators, in DPL3?

    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 pass pipe as secseparators, in DPL3?

    {{!}} doesn't seem to work, eg
    {{MyTemplate|abc{{!}}123}}
    Johnywhy (talk) 13:57, 5 June 2018 (UTC)
    In what sense it does not work? Ciencia Al Poder (talk) 09:19, 6 June 2018 (UTC)
    i've since worked around this, but i believe i was trying to use pipe for secseparators or multisecseparators parameter, in DPL3.
    https://help.gamepedia.com/DPL:Parameters:_Controlling_Output_Format#secseparators
    Actual pipe char of course was interpreted as parameter delimiter instead of string.
    {{!}} didn't show up in output as expected string.
    I switched to a different character to avoid the problem. Johnywhy (talk) 09:27, 6 June 2018 (UTC)
    The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

    Unable to connect to database during upgrade from 1.20

    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.


    Attempting to upgrade from media wiki version 1.20.3 to 1.30.0 and after browsing to n/mw-config/ ("n" is the directory in webroot which I have uploaded version 1.30.0 to. "w" still contains the active working version), selecting language, and providing the $wgUpgradeKey value, I receive a message stating:

    An error was encountered when connecting to the database using the settings specified in LocalSettings.php. Please fix these settings and try again.

    Cannot access the database: Unkonown Error (serverhost.at.place)

    (The misspelling of "Unknown" appears to be returned from mysqli_connect_error()).

    The credentials are correct and are exactly what the current installation is using to connect without any issue. I even dug into the internals down to where the actual call to `$mysqli->real_connect()` is being called in `includes/libs/rdbms/database/DatabaseMysqli.php` and verified that the correct credentials are being passed to this function.

    I'm at a lose as to why this is happening. Has anyone else ever stumbled across this issue? 168.166.80.241 (talk) 20:34, 5 June 2018 (UTC)

    Although I have not stumpbled over this issue, I still have some ideas:
    • Note that you should install MediaWiki into a new folder.
    • You should not use the old and the new version simultaneously. Instead, you should remove the files of the old version and put the files of the new version into a folder with the same name.
    Some more details are at Upgrading - one of them is to make sure you have a working backup before you start! 2001:16B8:1084:1400:A594:FE38:577F:D1C1 (talk) 21:19, 5 June 2018 (UTC)
    Ahh, and which versions of MySQL and of PHP are you using?
    This issue was being caused by lines 106-112 (where database character set is defaulted to binary if property `utf8Mode` is not set) of file '/includes/libs/rdbms/database/DatabaseMysqli.php'. After commenting these lines, everything functioned as expected 168.166.80.241 (talk) 13:36, 6 June 2018 (UTC)
    The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

    Get Unique List Items?

    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.


    Say i have a list of items, with repeats, and i want a list of the unique items:

    Chocolate·Ostrich·Ostrich·Apples·Pears·Green·Chocolate·Ostrich·Apples·Blue·CommonGround·Blue·CommonGround

    It seems there are two stable, but unmaintained, extensions that may be able to do it.

    Extension:HashTables#hashdefine

    Extension:Arrays#arrayunique

    Is there any other method or extension that can do this? Johnywhy (talk) 22:34, 5 June 2018 (UTC)

    The handy thing about Extension:Arrays is, you can achieve uniques in one step, when the array is defined, by using the 'unique' option. You don't have to perform #arrayunique as a separate step. Johnywhy (talk) 07:55, 6 June 2018 (UTC)
    The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

    How can check the detail who has submitted form already in Joomla?

    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 my website already a contact form but i want to know how can we check who has submitted the form on our Joomla website? 45.119.132.230 (talk) 07:21, 6 June 2018 (UTC)

    Welcome to the support desk for MediaWiki. MediaWiki is not Joomla so I am afraid that you are wrong here. Malyacko (talk) 10:48, 6 June 2018 (UTC)
    The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

    Error on Adding Topic to Talk Page

    Tried to add a topic to:

    Extension_talk:Labeled_Section_Transclusion

    Got:

     [Wxe9GQpAIDUAAHmXfaYAAAAE] Exception caught: Call to a member function getPrefixedText() on a non-object (null)

    Any fix? Johnywhy (talk) 10:55, 6 June 2018 (UTC)

    works for me. Try again. Ciencia Al Poder (talk) 19:03, 6 June 2018 (UTC)
    Thx for testing. But it looks like your test was a revision of something you already posted?
    I'm still getting error. But on a new post, not a revision.
    https://image.ibb.co/ekr5DT/Screenshot_311.png
    (how to embed image here?) Johnywhy (talk) 22:31, 6 June 2018 (UTC)
    My test was adding a new section with the normal link of "add a new section"
    Looks like you're using Visual Editor. In that case you should report a bug Ciencia Al Poder (talk) 10:12, 7 June 2018 (UTC)

    Page_Forms: How To Retrieve Query String Parameters?

    i see some examples here of how to load query string. eg

     query string=namespace=User&User[Is_employee]=yes 

    and

    |namespace=User|User[Is_employee]=yes

    But i don't see how to retrieve the value of Query String parameters inside the form def.

    This Page mentions Url parameters and values from url, but not sure if it's related. Might be associated with only certain inputs? Looks like LocalSettings.php might be involved. Maybe just for auto complete?

    This page says

     values from url=URL identifier - Used only for autocompletion. Specifies that autocompletion should be based on the values retrieved from an outside URL. Johnywhy (talk) 07:16, 7 June 2018 (UTC)
    The values_from_url parameter belongs to a {{{field}}}-definition in a PageForms form. It specifies the datasource from which the values of that specific field are being loaded.
    But I have more the impression that you want to retrieve a GET parameter value from the ''current'' location of your browser. If this is true you can use Extension:UrlGetParameters. Osnard (talk) 05:55, 14 June 2018 (UTC)

    hide realnames

    Moin,
    my wiki has grown for years. First it was only in the intranet and only two people had access. Now i have renamed the realname into aliase and rolled it out to the internet.
    Unfortunately the realnames are shown at the discussion sites. It's a result of using the tilde (~ ~ ~) to sign the comment. How can i change the realname strings in every discussion site easily?
    Thanks,
    Paul Paul Hema (talk) 11:19, 7 June 2018 (UTC)
    Fixed the Problem with Extension:Replace Text Paul Hema (talk) 11:45, 7 June 2018 (UTC)

    Improvements coming soon on Watchlists

    Hello

    Sorry to use English. Please help translate to your language! Thank you.

    In short: starting on June 18, New Filters for Edit Review (now in Beta) will become standard on Watchlists. They provide an array of new tools and an improved interface. If you prefer the current page you will be able to opt out. Learn more about the New Filters.

    What is this feature again?

    This feature is used by default on Special:RecentChanges, Special:RecentChangesLinked and as a Beta feature on Special:Watchlist.

    Based on a new design, that feature adds new functions to those pages, to ease vandalism tracking and support of newcomers:

    • Filtering - filter recent changes with easy-to-use and powerful filters combinations, including filtering by namespace or tagged edits.
    • Highlighting - add a colored background to the different changes you are monitoring. It helps quick identification of changes that matter to you.
    • Bookmarking to keep your favorite configurations of filters ready to be used.
    • Quality and Intent Filters - those filters use ORES predictions. They identify real vandalism or good faith intent contributions that need help. They are not available on all wikis.

    You can know more about this project by visiting the quick tour help page.

    About the release on Watchlists

    Over 70,000 people have activated the New Filters beta, which has been in testing on Watchlist for more than eight months. We feel confident that the features are stable and effective, but if you have thoughts about these tools or the beta graduation, please let us know on the project talk page. In particular, tell us if you know of a special incompatibility or other issue that makes the New Filters problematic on your wiki. We’ll examine the blocker and may delay release on your wiki until the issue can be addressed.

    The deployment will start on June 18 or on June 25, depending on the wiki (check the list). After the deployment, you will also be able to opt-out this change directly from the Watchlist page and also in your preferences.

    How to be ready?

    Please share this announcement!

    If you use local Gadgets that change things on your Watchlist pages, or have a customized scripts or CSS, be ready. You may have to make some changes to your configuration. Despite the fact that we have tried to take most cases into consideration, some configurations may break. The Beta phase is a great opportunity to have a look at local scripts and gadgets: some of them may be replaced by native features from the Beta feature.

    Please share your questions and comments on the feedback page.

    On behalf of the Collaboration team, Trizek (WMF) 13:14, 7 June 2018 (UTC)

    MediaWiki message delivery (talk) 13:14, 7 June 2018 (UTC)

    Error Fatal exception of type "DBQueryError" when try to use InviteSignup extension

    Hello everyone,

    I recently installed the InviteSignup extension,but every time I click on the page to open the extension it gives me the following error:

    [a8a3258eda28654751297f32] 2018-06-07 14:59:59: Fatal exception of type "DBQueryError"

    I am using MediaWiki 1.28.0

    PHP 7.0

    Database: phpmyadmin

    ctlcsrwiki.byu.edu

    I already run php update.php script in my server, I have added the extension files to my extension directory, and I have also recreated the localsettings.php file with the new extension "InviteSignup" code. Has anyone here used this extension before that can give me a hand with it? Any help would be greatly appreciated

    Extension:InviteSignup Cordova007 (talk) 16:12, 7 June 2018 (UTC)

    Which exact version and git branch of InviteSignup? MediaWiki branch and extension branch must match. Also note that you run an old unsupported insecure version of MediaWiki which you should update. Malyacko (talk) 10:18, 8 June 2018 (UTC)

    I have an account but Can't Log In

    I keep trying to log in and was given 2 temporary passwords and neither of them work with my log in name Joanne Belknap.

    Thanks!!!! 198.11.31.194 (talk) 16:17, 7 June 2018 (UTC)

    The "Log in" page offers a "Forgot your password?" link. Not much else we can do. Malyacko (talk) 10:17, 8 June 2018 (UTC)

    Reset Page Hits Counter

    Is there a way to reset the hits count at the bottom of a page?

    "This page has been accessed X times." 208.90.130.238 (talk) 19:58, 7 June 2018 (UTC)

    Depending on your MediaWiki version, hit counter data is stored either in the column page_counter of the database table page or in the column page_counter of database table hit_counter_extension.
    By setting all values in the mentioned columns to 0, you can effectively reset hitcounter data.
    Btw. it is also possible to deactivate hitcounters completely by setting $wgDisableCounters or by not using Extension:HitCounters. 2001:16B8:1099:BE00:484A:73FC:F023:D7CC (talk) 22:37, 7 June 2018 (UTC)

    Hide Database Name from the Public

    I noticed the Special:Export tool adds the database name to the files it creates. Is this necessary? I'd like to not provide this information if possible here or any other place where this information is publicly accessible. Is that possible? Jer Hughes (talk) 05:12, 8 June 2018 (UTC)
    It's not necessary, and shouldn't be a concern. I'm not aware of how to purposely hide it, though. You may want to open a bugreport for that (if none already exists) Ciencia Al Poder (talk) 09:38, 8 June 2018 (UTC)
    Its difficult, as db name is also used inside the cookie (And many other places) to distinguish between multiple wikis on the same domain. Bawolff (talk) 14:45, 11 June 2018 (UTC)
    Does import requires to the db name? 星耀晨曦 (talk) 14:50, 11 June 2018 (UTC)
    FYI: If you have "$wgEnableAPI= true;" in your LocalsSttings.php, https://wikiapiary.com will list your wiki's DB name as well. I'm also not very comfortable with that for security reasons. CayceP (talk) 08:13, 12 June 2018 (UTC)
    What's the security issue of knowing a database name? Ciencia Al Poder (talk) 09:03, 12 June 2018 (UTC)
    IMO, exposing the database name, there is no security risk. Assuming the destroyer knows the name, he can't do anything before he knows your database username and password. The best example: the database name of WMF sites are exposed. 星耀晨曦 (talk) 09:10, 12 June 2018 (UTC)
    Knowing just the database name isn't going to cause any security issues, but passively collecting this type of information is an early step of computer hacking called enumeration. Jer Hughes (talk) 05:26, 13 June 2018 (UTC)

    Hello, Can anyone please help w.r.t how can we search for text in an uploaded document in Media Wiki? Sneha.1812 (talk) 14:25, 8 June 2018 (UTC)

    What kind of "uploaded document"? Which MediaWiki version? Malyacko (talk) 16:28, 8 June 2018 (UTC)
    Uploaded documents can be Word Documents, pdfs, Excels, Popwer points. Mediawiki 1.3.0.
    Pls let me know for any further queries. Sneha.1812 (talk) 11:26, 11 June 2018 (UTC)
    Hello , Can someone pls respond to the query, using Media wiki version 1.30. Sneha.1812 (talk) 17:02, 18 June 2018 (UTC)
    You'll need Extension:CirrusSearch, and other extensions that provide the search within documents, see Help talk:CirrusSearch/2018#h-Can_CirrusSearch_search_in_contents_of_uploaded_files?-2018-05-15T17:57:00.000Z Ciencia Al Poder (talk) 09:16, 19 June 2018 (UTC)

    Bug? Lost mucho edits on switching from Visual Editor to Source Editor

    1. On this page, performed edits in Visual Editor.
    2. Then switched to Source Editor. Was not asked to save edits, was not warned i would lose edits.
    3. Then got "diff" page. Why?
    4. Clicked browser Back-button.
    5. Got source-editor with last-saved version. All edits gone.
    6. Then switched back to Visual Editor
    7. and new edits were back! Johnywhy (talk) 18:33, 8 June 2018 (UTC)
    Please use the toolbar button to switch between VE and source editor, don't use the browser history nor navigate away from the page if you don't want to lose your changes. Ciencia Al Poder (talk) 09:26, 9 June 2018 (UTC)
    Yep. using the toolbar button to switch between VE and source editor is how i lost my edits (see step 2).
    And how i recovered my edits (see step 6). Johnywhy (talk) 13:49, 9 June 2018 (UTC)

    How to include a custom CSS-type page globally?

    If i create a page called MediaWiki:MyStyle.css, how can i apply that css to just a single page? Globally?

    Answer: Extension:CSS

    Single page: Add to the page: {{#css:MyStyles.css}}

    Globally: This page implies we may be able to do something like

    importStylesheet command in your common.js:
    
     importStylesheet( 'MyGlobalStyles.css' );

    Possible alternate answer: Add to MediaWiki:Common.css:

    @import url("WIKI-URL/MyStyles.css?action=render");

    Maybe even:

    @import url("MyStyles.css");

    Also, i wonder if subpages of Common.css will be applied globally. Johnywhy (talk) 19:16, 8 June 2018 (UTC)

    > WIKI-URL/MyStyles.css?action=render
    If you're including as CSS, you should do index.php?action=raw&title=MyStyles.css&ctype=text/css
    You can also have per-page css rules by targetting the body classes that are per-page.
    Additionally, your page name should start with MediaWiki: to ensure that only admins can edit it.
    Consider also using Extension:TemplateStyles instead of Extension:CSS. Keep in mind that allowing people to edit CSS pages can cause privacy issues. Bawolff (talk) 14:44, 11 June 2018 (UTC)
    Your url works great in Common.css as follows:
    @import url("/index.php?action=raw&ctype=text/css&title=MediaWiki:TopicTags.css");
    
    That's great, for a generic url for a pluglet :)
    TemplateStyles seems to break my wiki. Extension talk:TemplateStyles/2018#h-Breaks_Wiki-2018-06-12T03:05:00.000Z Johnywhy (talk) 03:18, 12 June 2018 (UTC)
    @Bawolff What benefit will TemplateStyles give my wiki?
    i'm not using extension CSS, and we don't allow people to edit our CSS pages.But what privacy concerns? -thx Johnywhy (talk) 10:52, 15 June 2018 (UTC)

    Example of Page Form Query with Custom Table Row Output (truncate with ellipsis and expand option)

    I'm creating a search page using the Semantic Page Forms. The output of the #ask inline query is a table of items. Some of the text in some cells is very long, though, making the row height pretty huge. I'd like to truncate the cell content or rather, put a limit on each of the cells in the table to make sure if the text exceeds the limit, a hyperlinked ellipsis appears with the option to expand the row to show the full context in the cell (so it would expand only that row). I've only seen documents on how to customize the row headers, which really isn't applicable. Recently, I moved to the templates-approach, by creating templates for the table header, footer, and rows, but I cannot get the values in the cells to truncate. Any help or good examples would be appreciated. Kmaughs24 (talk) 21:23, 8 June 2018 (UTC)

    registration information

    how long does it take to get the registration information 96.66.202.5 (talk) 18:35, 9 June 2018 (UTC)

    Depends on the website you refer to and how the website maintainers have set up the mail servers used by their MediaWiki installation. Malyacko (talk) 13:49, 11 June 2018 (UTC)

    Is there plan for Mediawiki default skin to support Progressive Web Apps standard?

    It will be cool if MW do support. Deletedaccount4567435 (talk) 04:33, 10 June 2018 (UTC)

    It would be cool if you defined "Progressive Web Apps standard". Malyacko (talk) 13:16, 10 June 2018 (UTC)
    https://developers.google.com/web/progressive-web-apps/ Deletedaccount4567435 (talk) 19:37, 14 June 2018 (UTC)
    Why is that a "standard"? What does "support" mean in your question? Malyacko (talk) 11:08, 16 June 2018 (UTC)
    Well, to answer your question in the subject line: No.
    As noone knows what "support" means in your question. Malyacko (talk) 11:10, 16 June 2018 (UTC)

    need to schedule an upload file *.zip from a mapped network drive to my SFTP site using a

    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.


    need to schedule an upload file *.zip from a mapped network drive to my SFTP site uploading every 30 minutes... I know how to use windows scheduler I just do not know how to write a script Clundt6188 (talk) 00:51, 11 June 2018 (UTC)

    Looks like you're on the wrong support forum. This question doesn't look related to MediaWiki. Ciencia Al Poder (talk) 09:28, 11 June 2018 (UTC)
    The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

    I'm working with a lot of scientific names which have specific conventions for styling which I'm trying to adopt as best I can.

    I have an article, such as Olearia macrodonta. I have the article title italicized using {{DISPLAYTITLE:''Olearia macrodonta''}}, this works fine, but I'm having issues with categories.

    I'm trying to add this article into a category called "Oleria spp.". On the category page I use {{DISPLAYTITLE:Category:''Olearia'' spp.}} which (kind of) works, but is it possible to:

    • Have the category link on the article be partially italicized too?
    • Have the article links on the category be italicized?
    • Have the Pages in category "Olearia spp." text show as Pages in category "Olearia spp."
    • Alter the article links on that category page to show something else, like O. macrodonta?
    • Alter the alphabetizing of article links so O. macrodonta is listed under "M" instead of "O"? Jer Hughes (talk) 02:02, 11 June 2018 (UTC)
    {{DISPLAYTITLE:}} only works on the displayed title of the affected page, not on links, categories, etc that link to that page. However, you can install Extension:Display Title to allow this to replicate in default links. I'm not sure if it covers categories (per T183088).
    • Have the Pages in category "Olearia spp." text show as Pages in category "Olearia spp."
    This one should work, since that's part of the title of the same page. If not, I encourage you to report a bug.
    • Alter the alphabetizing of article links so O. macrodonta is listed under "M" instead of "O"?
    You can do this when specifying the category in the O. macrodonta page. For example, [[Category|Macrodonta]]. See Help:Categories#Sort key Ciencia Al Poder (talk) 09:26, 11 June 2018 (UTC)

    Make a list from a category

    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.


    Dear all,

    I'd appreciate two features:

    • I'd like to process a list of category entries
    • I'd like to draw some data from the categorized articles

    with respect to the second, I could imagine a template in each article where I enter some essential data; the template produces a view of the data and some structured hidden category entry. If the first feature is possible, the result could be a list with all the data ...

    Can this somehow be achieved?

    Thank you in advance!

    Yours, Ciciban (talk) 12:36, 11 June 2018 (UTC)

    Have a look at DPL. Clump (talk) 13:28, 11 June 2018 (UTC)
    Thanks so far.
    I'l have a glance at it.
    Yours, Ciciban (talk) 15:57, 11 June 2018 (UTC)
    The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

    Editing text

    MediaWiki version: 1.28.3

    PHP version: 7.1.17 (litespeed)

    MariaDB version: 10.0.34-MariaDB-cll-lve

    So you know those buttons? The buttons people can place on their userpages. Yes, those. Bearing in mind that you can add a section with them and preload them, is it possible to remove the phase between clicking the button and saving the page, where you can edit the text? Banana439monkey (talk) 20:14, 11 June 2018 (UTC)

    Please provide an example for "those buttons" with a link.
    Please also update your old unsupported MediaWiki version 1.28.3 which has unresolved security vulnerabilities. Malyacko (talk) 07:27, 12 June 2018 (UTC)

    Update on page issues on mobile web

    CKoerner (WMF) (talk) 20:58, 12 June 2018 (UTC)

    MediaWiki message delivery (talk) 20:58, 12 June 2018 (UTC)

    Can someone please help me?

    I wrote a long piece on [Carmel Snow] a while back that put her in the context of her time and place, explaining her significance.

    It was replaced in its entirety today by someone who eliminated this context, replacing it with such details as the color of her wedding gown etc,

    I'm saddened to have worked hard on a scholarly entry, only to see it replaced by a far less informative one. I don't think that readers will be well served. I can see adding to the original material, but to delete all of it, altogether? Including footnotes, etc. etc.?

    I'm not a frequent contributor here and, given my professional obligations, cannot take that on. I'd so appreciate it if someone could help me undo this new version, and create a fairer portrait of this subject?

    Thank you, [[Biographer1]] Biographer1 (talk) 02:10, 13 June 2018 (UTC)

    This support forum is primarily for questions related to the technical side of MediaWiki. For Wikipedia content, kindly make your queries at Wikipedia:Teahouse. AhmadF.Cheema (talk) 06:30, 13 June 2018 (UTC)

    How to set some pages not visible?

    All pages in the default auto-login user's wiki are visible. Now there is a need to set some pages to be invisible to some users. How do you do this? 180.138.76.103 (talk) 10:03, 13 June 2018 (UTC)

    See Manual:Preventing access Malyacko (talk) 19:17, 13 June 2018 (UTC)

    GeSHi Syntax Highlighter

    MediaWiki 1.30.0
    PHP 5.6.35 (cgi-fcgi)
    MySQL 5.5.51-38.2
    ICU 4.2.1

    http://wiki.sierrahelp.com/index.php?title=Main_Page

    After solving an issue that prevented me from updating my Wiki I finally updated it from 1.25.2 to 1.30.0. It uses GeSHi for highlighting a couple of custom languages. It no longer works after the update since the extension was "updated" to Pygments. As near I can figure I would need to have the hosting provider install it. Since the provider was bought the support they provide is next to nil.

    Not only can I not get Pygments working I really do not want to have to recreate the highlighting for these two language highlighters, especially since I do not know Python. Is there anyway to restore the functionality of the old GeSHi version with 1.30.0? Andrew Branscom (talk) 18:03, 13 June 2018 (UTC)

    No suggestions? Andrew Branscom (talk) 00:58, 16 June 2018 (UTC)
    Hum.. pygmentize depend on python3, you must make sure your server installed python3. 星耀晨曦 (talk) 05:57, 16 June 2018 (UTC)
    I have requested it be installed. We shall see. Andrew Branscom (talk) 20:34, 16 June 2018 (UTC)

    ISFDB unsecure site

    Hi, I'm interested in creating an account at ISFDB. But when I start the process my browser, Firefox, gives me this message: This connection is not secure. Logins entered here could be compromised.

    I'm not very knowledgeable about browsing, etc., so I'd like to know if it's safe to start an account at ISFDB.

    Thanks very much.

    Samuel Finn MWMilo (talk) 19:05, 13 June 2018 (UTC)

    Hi Samuel, we don't know what ISFDB is. Maybe "ISFDB" uses the MediaWiki software for their services and that's why you ended up here? The message provided by Firefox is pretty self-explanatory I'd say. You may want to ask "ISFDB" to provide secure encryption (simplified: a website address that starts with "https://") to their users. Malyacko (talk) 19:16, 13 June 2018 (UTC)

    Error loading data from server: apierror-visualeditor-docserver-http-error: (curl error: 28)

    Hey,

    I am trying to set up the Visual Editor. I followed all the steps at this page Parsoid/Setup#Windows but I am still getting this error (Error loading data from server: apierror-visualeditor-docserver-http-error: (curl error: 28)). I don't understand this whole thing enough to know what I can do now. Can somebody help me?

    Thank you so much! Timmiboysuperschurke (talk) 19:19, 13 June 2018 (UTC)

    A quick search in google shows cURL error 28 means "Operation timeout". Ensure all services are up and running (parsoid and RESTBase), port numbers are correct, and your firewall is not blocking those ports. Ciencia Al Poder (talk) 08:44, 14 June 2018 (UTC)

    Missing editor buttons after upgrade

    MediaWiki 1.30.0
    PHP 5.6.35 (cgi-fcgi)
    MySQL 5.5.51-38.2
    ICU 4.2.1

    http://wiki.sierrahelp.com/index.php?title=Main_Page

    Also another upgrade glitch I can't seem to solve. I had a number of custom buttons I had added that no longer show after the upgrade from 1.25.2 to 1.30.0. The entries I made to the common.js are still there. Example:

    // Underscore
    mw.toolbar.addButton({
            imageId: 'mw-customeditbutton-Underscore',
            imageFile: '/buttons/FormatUnderscore.png',
            speedTip: "Underscore",
            tagOpen: "<u>",
            tagClose: "</u>",
            sampleText: "Text here"
    });
    

    and the button images are still there, but are not displayed in the editor. Andrew Branscom (talk) 21:36, 13 June 2018 (UTC)

    See Manual:Custom edit buttons (and potential ResourceLoader changes). Malyacko (talk) 06:32, 14 June 2018 (UTC)
    Still no show. Worked perfectly before the upgrade. I even tried a fresh install of 1.30.0 and the old JS I used before that worked does not work with the new Wiki. I even tried adding complete URIs to the images rather than just relative paths, still no go. Are there new permissions required for access to the common.js with 1.30.0? Andrew Branscom (talk) 00:58, 16 June 2018 (UTC)
    See Help:Locating broken scripts Malyacko (talk) 11:10, 16 June 2018 (UTC)
    Check your console (F12) for errors. You're probably not waiting for the toolbar to load before trying to add the extra buttons. 137.147.0.130 (talk) 05:59, 16 June 2018 (UTC)
    I have noticed that the toolbar takes a while to load after opening a page edit. It used to load with no hesitation. Andrew Branscom (talk) 22:21, 16 June 2018 (UTC)
    This is what I get:
    JQMIGRATE: Migrate is installed with logging active, version 3.0.1-pre
    TypeError: mw.toolbar is undefined
    <anonymous>
    index.php:1
    DOMEval()
    load.php:1
    .globalEval()
    load.php:4
    execute/runScript()
    load.php:162
    execute/</checkCssHandles()
    load.php:162
    execute()
    load.php:163
    mw.loader.implement()
    load.php:169
    <anonymous>
    
    Use of "mw.toolbar" is deprecated. Andrew Branscom (talk) 19:56, 16 June 2018 (UTC)
    Yes, so follow the previously mentioned recommendations on the Manual:Custom edit buttons page to load the script properly. 137.147.0.130 (talk) 09:27, 17 June 2018 (UTC)

    which PHP vesion for 1.31.0

    PHP 7.0+

    previously run my wiki 1.30.0 on Debian 8, PHP 5.6.33

    now try to upgrade for 1.31.0, but geterror warnings, that I need PHP 7

    in

    Download

    System Requirements

    MediaWiki requires PHP 5.5.9+ 81.198.222.39 (talk) 21:36, 13 June 2018 (UTC)

    MW 1.31 requires PHP 7.0+. See https://github.com/wikimedia/mediawiki/blob/REL1_31/RELEASE-NOTES-1.31#L433. 星耀晨曦 (talk) 06:27, 14 June 2018 (UTC)
    See https://www.mediawiki.org/wiki/Release_notes/1.31 Malyacko (talk) 06:30, 14 June 2018 (UTC)
    I updated Template:MW stable php requirement, now, the system requirements are match with the actual situation. 星耀晨曦 (talk) 06:35, 14 June 2018 (UTC)

    Can I edit the categories on the left? Press to get the document.

    I am creating a personal wiki. Can I change the main page item to a document name and make it open? Jangst15 (talk) 02:27, 14 June 2018 (UTC)

    Do you mean to link directly e.g. to an uploaded PDF? If so, you can do this with the Media prefix, e.g. [[Media:Test.pdf]] gives Media:Test.pdf. Sam Wilson 03:03, 14 June 2018 (UTC)
    That document is not a wiki document. Jangst15 (talk) 03:50, 14 June 2018 (UTC)
    It is unclear what "change the main page item to a document name and make it open" means, especially what "open" means and what "turning an item into a name" means. And how that is related to categories in the topic. And which underlying problem you'd like to solve... Malyacko (talk) 14:15, 14 June 2018 (UTC)

    Problems after change to Ubuntu 18.04 from 17.10

    mediawiki-1.30.0

    PHP7.2.5

    MySQL

    After upgrading Ubuntu from 17.10 to 18.04 my private wiki running on localhost stopped working correctly.

    With Firefox only run(); is displayed instead of the Main page, with Chromium the following is displayed

    <?php /** * This is the main web entry point for MediaWiki. * * If you are reading this in your web browser, your server is probably * not configured correctly to run PHP applications! * * See the README, INSTALL, and UPGRADE files for basic setup instructions * and pointers to the online documentation. * * https://www.mediawiki.org/wiki/Special:MyLanguage/MediaWiki * * ---------- * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * http://www.gnu.org/copyleft/gpl.html * * @file */ // Bail on old versions of PHP, or if composer has not been run yet to install // dependencies. Using dirname( __FILE__ ) here because __DIR__ is PHP5.3+. // @codingStandardsIgnoreStart MediaWiki.Usage.DirUsage.FunctionFound require_once dirname( __FILE__ ) . '/includes/PHPVersionCheck.php'; // @codingStandardsIgnoreEnd wfEntryPointCheck( 'index.php' ); require __DIR__ . '/includes/WebStart.php'; $mediaWiki = new MediaWiki(); $mediaWiki->run();

    I know I have encountered this problem earlier when upgrading, but I can't remember the solution.

    What should I do?

    tpollak@bredband.net 85.228.26.161 (talk) 14:52, 14 June 2018 (UTC)

    If you are reading this in your web browser, your server is probably * not configured correctly to run PHP applications! 星耀晨曦 (talk) 15:31, 14 June 2018 (UTC)
    Hi, i have the same problem. Did you ever find a solution? 173.177.247.221 (talk) 16:57, 17 April 2020 (UTC)
    You need to make sure that .php files are parsed by PHP. Currently, PHP is not active on your server (at least not for .php files obviously). 2001:16B8:10E8:A100:41AB:EF9:4CCA:6FFD (talk) 00:42, 18 April 2020 (UTC)

    If there is a common keyword which is searched in media wiki and retrieves multiple records since the keyword is common, can you pl help in clarifying what is the logic for search results? Is the most recently edited page comes first in the list of the page with most hits comes first. 46.235.152.9 (talk) 16:52, 14 June 2018 (UTC)

    Hello,
    Can anyone pls throw some light on this query.
    Thanks Sneha.1812 (talk) 17:00, 18 June 2018 (UTC)
    It will largely depend on the search backend used for the search. CirrusSearch can be controlled by modifiers. I'm not really sure about the default search backend, thought. Ciencia Al Poder (talk) 09:19, 19 June 2018 (UTC)

    Draft page lost

    I created a draft page on a new topic, included links and citations. Getting ready to publish.

    Now I can't find my draft. Any suggestions? Wnhpreservation (talk) 18:41, 14 June 2018 (UTC)

    Check the user contributions ("Special:Contributions") for your account on the wiki site that you refer to. If there is nothing listed, please contact the wiki site that you refer to. Malyacko (talk) 11:05, 16 June 2018 (UTC)

    How to add disclaimer at the bottom of each page.

    How to add disclaimer at the bottom of each page., so when the user printer the page disclaimer also gets printed, footers and headers extension is giving error, so it is not working . 170.93.140.42 (talk) 19:12, 14 June 2018 (UTC)

    Perhaps use MediaWiki:retrievedfrom ? —TheDJ (Not WMF) (talkcontribs) 11:38, 15 June 2018 (UTC)

    Template no working since my last install extension

    Hi everybody,

    i face on issue let me explain the context.

    i have add extension bluespice for manage the right on my wiki but since this install the template not working and you can see the error that i have.

    Have you any idea about this issue ?

    [Fri Jun 15 09:45:34.830225 2018] [:error] [pid 7725] [client 192.168.1.65:62250] PHP Warning:  array_search() expects parameter 2 to be array, null given in /var/www/html/w/extensions/BlueSpiceDistributionConnector/includes/BlueSpiceDistributionHooks.php on line 240, referer: https://wiki.emm.digital/w/index.php/Oracle_BI_Mobile_iOS_AppConfig

    [Fri Jun 15 09:45:38.847936 2018] [:error] [pid 7728] [client 192.168.1.65:10183] PHP Notice:  Undefined index: SkinTemplateToolboxEnd in /var/www/html/w/extensions/BlueSpiceDistributionConnector/includes/BlueSpiceDistributionHooks.php on line 223, referer: https://wiki.emm.digital/w/index.php?title=Oracle_BI_Mobile_iOS_AppConfig&action=edit

    [Fri Jun 15 09:45:38.848024 2018] [:error] [pid 7728] [client 192.168.1.65:10183] PHP Warning:  array_search() expects parameter 2 to be array, null given in /var/www/html/w/extensions/BlueSpiceDistributionConnector/includes/BlueSpiceDistributionHooks.php on line 223, referer: https://wiki.emm.digital/w/index.php?title=Oracle_BI_Mobile_iOS_AppConfig&action=edit

    [Fri Jun 15 09:45:38.848080 2018] [:error] [pid 7728] [client 192.168.1.65:10183] PHP Notice:  Undefined index: SkinTemplateToolboxEnd in /var/www/html/w/extensions/BlueSpiceDistributionConnector/includes/BlueSpiceDistributionHooks.php on line 240, referer: https://wiki.emm.digital/w/index.php?title=Oracle_BI_Mobile_iOS_AppConfig&action=edit

    [Fri Jun 15 09:45:38.848132 2018] [:error] [pid 7728] [client 192.168.1.65:10183] PHP Warning:  array_search() expects parameter 2 to be array, null given in /var/www/html/w/extensions/BlueSpiceDistributionConnector/includes/BlueSpiceDistributionHooks.php on line 240, referer: https://wiki.emm.digital/w/index.php?title=Oracle_BI_Mobile_iOS_AppConfig&action=edit 185.29.149.224 (talk) 10:02, 15 June 2018 (UTC)

    What is your exact BlueSpice version and/or git branch that you use? What is your exact MediaWiki version and/or git branch that you use? Malyacko (talk) 11:02, 16 June 2018 (UTC)

    Page-Specific JS?

    It's unclear from this article how to apply page-specific js. Any examples available?

    Manual:Interface/JavaScript#Page-specific Johnywhy (talk) 11:20, 15 June 2018 (UTC)

    if (mw.config.get('wgPageName') == 'Specific page') {
        // Your page-specific js goes here
    }
    
    Ciencia Al Poder (talk) 14:42, 15 June 2018 (UTC)
    so, i put this in my LocalSettings.php?
    if (mw.config.get('wgPageName') == 'Template:ListEditor') {
        Template:ListEditor/ListEditor.js
    }
    
    Johnywhy (talk) 21:12, 17 June 2018 (UTC)
    No. This is Javascript code, not PHP. It should go in Manual:Interface/JavaScript.
    Also, the contents of // Your page-specific js goes here should be valid JavaScript. Ciencia Al Poder (talk) 21:20, 17 June 2018 (UTC)

    Jquery Post Issue

    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 jquery
          $.post( 
    	"../api.php?action=edit&title=Portal:TagDescriptions&section=2&summary=Hello%20World",
    	{ Text: "Hello, world.",
              token:"c30460d9159a5e2eccca60944ef286405b2393d1%2B%5C" },
    	function(data) {
       		$('#lblDescription').html(data);
    	}
          ); 
    
    returns
    {    "error": {
            "code": "badtoken",
            "info": "Invalid CSRF token.",
    
    Possible causes:
    • Bad token: doc says
      The token that you received is terminated with +\, this needs to be urlencoded (so it will end with %2B%5C) before it is passed back. 
      https://www.mediawiki.org/wiki/API:Edit#Example
      
      However, the token i receive from API is different: it is terminated with +\\.
      {"batchcomplete":"","query":{"tokens":{"csrftoken":"c938a18aa0572264fe2d1c206b3e20395b23affd+\\"}}}
      
      Which termination should i use?
    • Missing content type. Talk says i need content type. This post suggests to apply content type with `$.ajax` instead of `$.post`, but the following does not return anything:
          $.ajax({
          url:"../api.php?action=edit&title=Portal:TagDescriptions&section=2&summary=Hello%20World",
          type:"POST",
          data:{ Text: "Hello, world.",
                token:"c30460d9159a5e2eccca60944ef286405b2393d1%2B%5C" },
          contentType:"application/x-www-form-urlencoded",
          dataType:"json",
          success: function(data) {
         		$('#lblDescription').html(data);
      	}
        })
      
      Johnywhy (talk) 12:41, 15 June 2018 (UTC)
    Well if you can (run from inside MediaWiki page) you should use the mediawiki.api library and use postWithToken, since it does all this magic for you.
    Note that \ is an escape character for javascript strings, so when you read in raw text \\, then this is actually a \ when interpreted with javascript.
    You do need to uriencode content you submit, but if you use jQuery directly with post and pass it a data array (as u seem to do), then the jquery lib will uriencode on the fly for you. —TheDJ (Not WMF) (talkcontribs) 14:03, 15 June 2018 (UTC)
    i attempted to run code adapted from here:
        $.ajax({
            url: mw.util.wikiScript( 'api' ),
            data: {
                format: 'json',
                action: 'edit',
                title: 'Portal:TagDescriptions',
                section: 'new',
                summary: '',
                text: 'hello',
                token: '4286f5f1c36e6d44708af349539985f55b242627%2B%5C'
            },
            dataType: 'json',
            type: 'POST',
            success: function( data ) {
                if ( data && data.edit && data.edit.result == 'Success' ) {
                    window.location.reload(); // reload page if edit was successful
                } else if ( data && data.error ) {
                    alert( 'Error: API returned error code "' + data.error.code + '": ' + data.error.info );
                } else {
                    alert( 'Error: Unknown result from API.' );
                }
            },
            error: function( xhr ) {
                alert( 'Error: Request failed.' );
            }
        });
    
    i got "bad Token" error. Johnywhy (talk) 20:52, 15 June 2018 (UTC)
    Because you're still manually encoding the token, causing it to be encoded twice. 137.147.0.130 (talk) 06:25, 16 June 2018 (UTC)
    why twice?
    if you're talking about the mediaWiki postWithToken function, that retrieves the token automatically. The code above does not retrieves the token automatically-- it's not a mediaWiki ajax call, it's a jquery ajax call. It doesn't know about tokens. Johnywhy (talk) 06:49, 16 June 2018 (UTC)
    The documentation says the token has to be url encoded (as would any parameter containing special characters), but any half-decent API for dealing with sending requests will url encode it for you, as $.ajax does, which is why you don't need to urlencode it. Since you have, $.ajax is going and urlencoding it a second time, which of course breaks the token. 137.147.0.130 (talk) 09:52, 17 June 2018 (UTC)
    ok, i see. i'm now using the mediawiki api postWithToken, so i don't have to bother with the token
        var api = new mediaWiki.Api(); 
        api.postWithToken( "edit", {
            action: "edit",
            title: "Portal:TagDescriptions",
            section: "new",
            text: sNewDescription,
            sectiontitle: sTag
        } ).done( function( result, jqXHR ) {
            alert( "Saved successfully" );
        } ).fail( function( code, result ) {
            if ( code === "http" ) {
                alert( "HTTP error: " + result.textStatus ); // result.xhr contains the jqXHR object
            } else if ( code === "ok-but-empty" ) {
                alert( "Got an empty response from the server" );
            } else {
                alert( "API error: " + code );
            }
        })
    
    Johnywhy (talk) 10:32, 17 June 2018 (UTC)
    The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

    Activation of newly registered accounts only through admins possible?

    Hey there,

    I've just started my first MediaWiki and because it's going to be for our kindergarten I want to make sure that not everyone can register and thus edit its content (for example bots or random "users" who somehow found their way to the wiki and are trying to be destructive there...). I want to have control over the registration by only allowing new users that have been verified/activated by me in my function as the page admin.

    I've already looked up for this option on the help sites for a while and couldn't figure out if this is possible or not so you may be of help here?! ;-)

    Cheers,

    Marius Schynderhannes (talk) 19:37, 15 June 2018 (UTC)

    See Extension:ConfirmAccount. AhmadF.Cheema (talk) 03:18, 16 June 2018 (UTC)
    Heyho,
    thanks a lot for your reply.
    Unfortunately I can't handle the extension correctly it seems... I either have one of these problems:
    A) If I want to register a new account the wiki says that I have to have the right to read pages on the wiki in order to visit this (registration) site
    or
    B) after I filled in my account name (to be newly created) and e-mail address and confirm my wish for registration it says: "
    =This page isn’t working=
    wiki.rudolfsteinerkindergarten.de is currently unable to handle this request.
    HTTP ERROR 500"
    I am using these settings at the moment (while case B) is appearing):
    $wgGroupPermissions['*']['createaccount'] = true;
    $wgGroupPermissions['*']['read'] = true;
    (( $wgGroupPermissions['sysop']['block'] = true; ))
    $wgGroupPermissions['sysop']['createaccount'] = false;
    Before I had installed the "ConfirmAcc" extension successfully... (at least the special:version page tells me so)
    What am I missing here? :-/
    PS: If I set $wgGroupPermissions['*']['read'] = true; to false, of course, case A) is happening...
    Regards,
    Marius Schynderhannes (talk) 19:30, 2 April 2019 (UTC)
    The line (( $wgGroupPermissions['sysop']['block'] = true; )) might be incorrect from a PHP syntax point of view and the permission also appears to be redundant. Remove that line.
    Regarding A, as mentioned in Manual:Preventing access#Simple private wiki, when using Extension:ConfirmAccount you will need to whitelist the Special:RequestAccount page:
    $wgWhitelistRead = array( 'Special:RequestAccount', 'Main Page' );
    In other languages you have to replace "Main Page" and "Special:RequestAccount" with their local names, for instance "Hauptseite" and "Spezial:Benutzerkonto_beantragen" in a German wiki.
    For details, see Manual:$wgWhitelistRead. AhmadF.Cheema (talk) 20:46, 2 April 2019 (UTC)
    Thanks again for your reply :-)
    Unfortunately I still seem to be running in circles: Now I have the problem that (after allowing to access the necessary pages, which you translated correctly into German ;-)) I only get to a blank page after trying to register (while accepting the terms of service). No mail ever appears that someone's trying to register or any other message :-/
    Regards,
    Marius Schynderhannes (talk) 19:39, 10 May 2019 (UTC)
    To troubleshoot the blank page, in LocalSettings.php, set:
    $wgShowExceptionDetails = true;
    $wgDevelopmentWarnings = true; error_reporting( -1 ); ini_set( 'display_errors', 1); error_reporting(E_ALL);
    
    and then redo the steps which got you the blank page. Maybe an error description will show up. AhmadF.Cheema (talk) 23:12, 10 May 2019 (UTC)

    How to prevent unauthorized scraping?

    Given that disabling the API is deprecated and is going to be removed in a future release, what methods are available for preventing unauthorized scraping of our copyrighted content? A lot of the unauthorized scrapers are coming in via the API and clone entire websites for their spam farm or unauthorized "backup" operations.

    Short of firewalling off /api.php and DMCAing infringements, is there an easier way? Hanstiser (talk) 21:14, 15 June 2018 (UTC)

    Allowing, not preventing access is one of the main goals MediaWiki is written for. There surely are some crutches, which more or less well try hiding content inside MediaWiki, but the "correct" answer to your question is this:
    If you do not want your content to be publicly available, do not use MediaWiki, at least not at a place, which is publicly accessible. 2001:16B8:10A6:ED00:BDCF:7E0F:E372:9C20 (talk) 21:52, 15 June 2018 (UTC)
    i disagree. MediaWiki is a software platform, to be used however people want. That's what open source means. Once the software is in the wild, people can and should apply it to their own purposes.
    For example, some companies use MediaWiki as an internal knowledge-base, for employees only.
    There are a variety of extensions available providing various kinds of privacy or information-hiding.
    MediaWiki core includes some information hiding, for example certain admin pages are not accessible to non-admins. Johnywhy (talk) 15:06, 19 June 2018 (UTC)
    What was probably, only meant was that MediaWiki, by default, is not designed for access control. Most, if not all, access control extensions here, have some drawbacks.
    If content privacy is really important, then either not use MediaWiki or use a much more customized version of it (which might not even exist yet). Enterprise MediaWiki solutions (such as BlueSpice Pro) probably include some robust access control options. AhmadF.Cheema (talk) 15:21, 19 June 2018 (UTC)
    That is true. As I said, using MediaWiki at a public place <b>will</b> make the content within the installation public. Sure, using MediaWiki inside an internal network is possible - after all it is not publicly accessible then. 2001:16B8:10A4:2700:88F4:955F:8894:E7B9 (talk) 19:30, 19 June 2018 (UTC)
    If your content is publicly accessible, it can easily be copied, there's no way to prevent this. What you want is fundamentally incompatible with the public web. The API doesn't even really make it easier, as they would then need a functional MW install configured with the same extensions and templates in order to reuse your content, whereas just HTML scraping will mostly work as is on any server. 137.147.0.130 (talk) 06:18, 16 June 2018 (UTC)
    easier doesn't seem to matter to them, If the OP is correct. Johnywhy (talk) 15:15, 19 June 2018 (UTC)
    Rather than changing the software, change the environment. Eg, it might work to put the wiki behind a corporate firewall. Or change something in the hosting environment (ask your webhost).
    The following might be of interest:
    API:Restricting API usage
    Project:Support desk/Flow/2014/11#h-Disable_API_access_for_external_sites?-2014-11-10T16:15:00.000Z
    Manual:Preventing access
    Extension:AccessControl
    https://webmasters.stackexchange.com/questions/88194/mediawiki-is-it-possible-to-restrict-view-access-to-a-certain-page-an-uploaded Johnywhy (talk) 15:13, 19 June 2018 (UTC)

    js mediaWiki.api fails on retrieving contents of textarea during click

    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 code in Common.js works fine

     var api = new mediaWiki.Api(); 
    	api.postWithToken( "edit", {
    		action: "edit",
    		title: "Portal:TagDescriptions",
    		section: "new",
    		summary: "",
    		text: "Hello, World!",
                    sectiontitle: "MySection2"
    	} ).done( function( result, jqXHR ) {
    		mw.log( "Saved successfully" );
    		//location.reload();
    	} ).fail( function( code, result ) {
    		if ( code === "http" ) {
    			alert( "HTTP error: " + result.textStatus ); // result.xhr contains the jqXHR object
    		} else if ( code === "ok-but-empty" ) {
    			alert( "Got an empty response from the server" );
    		} else {
    			alert( "API error: " + code );
    		}
    	} );

    But this code fails with `API error: missingcommenttext`. The only difference is the content is retrieved from a textarea:

     var api = new mediaWiki.Api(); 
    	api.postWithToken( "edit", {
    		action: "edit",
    		title: "Portal:TagDescriptions",
    		section: "new",
    		summary: "",
    		text: $('#txtBox').val(),
                    sectiontitle: "MySection2"
    	} ).done( function( result, jqXHR ) {
    		mw.log( "Saved successfully" );
    		//location.reload();
    	} ).fail( function( code, result ) {
    		if ( code === "http" ) {
    			alert( "HTTP error: " + result.textStatus ); // result.xhr contains the jqXHR object
    		} else if ( code === "ok-but-empty" ) {
    			alert( "Got an empty response from the server" );
    		} else {
    			alert( "API error: " + code );
    		}
    	} );

    How to fix?

    Update: Further testing seems to indicate that `$('#txtBox').val()` returns nothing, even if the textarea contains text. Any ideas?

    This page suggests the problem may be related to `X-XSS-Protection`.

    Update: A workaround is to make the div `contentEditable`. Then it's value can be retrieved with `.text()`.
    $('#txtBox').html('<div contenteditable="true">I'm editable.</div>');
    ...
    var sNewDescription =   $('#txtBox').text();
    
    This works in my case, cuz i wanted a contentEditable div. However, still not solved for `textarea`. Johnywhy (talk) 21:34, 15 June 2018 (UTC)
    Does `#txtBox` actually exist? If you're getting text from the edit box, then `val()` cannot reliably retrieve text, as certain editors won't actually use the textarea to keep the text. You supposed to use jQuery.textSelection instead.
    var $textbox = $( '#wpTextbox1' );
    var sNewDescription = $textbox.textSelection( 'getContents' );
    
    137.147.0.130 (talk) 06:05, 16 June 2018 (UTC)
    yes, #txtBox exists. If it didn't exist, i wouldn't be able to retrieve its text().
    .textSelection page says it's to `Do things to the selection in a <textarea>`. I'm not trying to "Do things to the selection". I'm trying to retrieve data entered by the user into a contentEditable textarea.
    What do you mean, "certain editors won't actually use the textarea to keep the text". Why?
    What do you mean "keep"? Johnywhy (talk) 06:53, 16 June 2018 (UTC)
    I was talking about your initial example, as val will return undefined if the element doesn't exist.
    Yes, its naming isn't very good, but that it works with textarea contents in general, and is what you're meant to use for the editbox at least.
    Editors such as CodeEditor don't use a textarea for the content, so trying to use val won't do anything, which is what the textSelection accounts for. 137.147.0.130 (talk) 09:50, 17 June 2018 (UTC)
    i'm now using a div, and getting it's html content with $('#txtBox').html();
    That's working for me, so not going to bother with textarea. -thx Johnywhy (talk) 10:28, 17 June 2018 (UTC)
    The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

    Blank Mediawiki

    I've tried to load the FAQ of a Price Is Right fan page, the links to the various sections do not load and this has been going on since the site's software was updated a few weeks ago.

    The FAQ Page: http://www.golden-road.net/faq

    The forum post that details the site upgrades: http://www.golden-road.net/index.php/topic,28666.msg458765.html

    Is there a way for Chelsea (who is the "Emeritus Producer") of the site to fix this or is she out of luck here? Pahiy (talk) 21:52, 15 June 2018 (UTC)

    Considering it's using an ancient, insecure, and unsupported version of MW (1.16 came out 8 years ago), it's unlikely to work on any supported version of PHP, and it probably shouldn't even be publicly accessible. I would recommend taking the site down or upgrading immediately. 137.147.0.130 (talk) 06:12, 16 June 2018 (UTC)
    This is the problem, which the site is having: Manual:Errors_and_symptoms#All_pages_have_no_content.2C_but_when_editing_a_page_the_wiki_text_is_there.
    A MediaWiki upgrade should solve this issue! 2001:16B8:106B:1200:6904:9126:CFA:7158 (talk) 07:50, 16 June 2018 (UTC)

    How to execute api.parse in javascript?

    This says i should be able to retrieve the parsed contents of a page section, using the API.

    API:Parsing wikitext

    The API reference doesn't give much info about the API parameter, nor any examples with page-sections.

    https://doc.wikimedia.org/mediawiki-core/master/js/#!/api/mw.Api.plugin.parse

    I tried this, and it didn't work:

    var api = new mediaWiki.api(); 
    var sDescription = api.parse( 
      page = 'Portal:MyPage', 
      section = 'Dogs');
    

    Johnywhy (talk) 00:16, 16 June 2018 (UTC)

    Well the JS snippet you showed is invalid JS, and also doesn't at all match what the documentation pages you linked to stated to do.
    var api = new mw.Api();
    var sDescription = api.parse(
        new mw.Title( 'API:Main page' ),
        { section: 1 }
    );
    
    Special:ApiSandbox#action=parse&format=json&page=API:Main page&section=1 137.147.0.130 (talk) 05:55, 16 June 2018 (UTC)
    i tried the following, and seem to be creating the mw Title object correctly.
    var apix = new mediaWiki.Api;
    var mwTitle = new mediaWiki.Title( 'Portal:Welcome', 3004);
    alert (mwTitle.getName());
    
    Returns "Welcome", as expected.
    But this line breaks JS:
    var sTest= apix.parse(mwTitle, {section: 1} );
    
    Johnywhy (talk) 01:31, 17 June 2018 (UTC)
    i'm already doing api.postWithToken successfully, and it's declared with
    var api = new mediaWiki.Api();
    
    Your code won't run for me. It seems to break the rest of my code. Johnywhy (talk) 06:33, 16 June 2018 (UTC)
    Removing the whitespace seems to fix your code:. This does not break JS:
    var sTest= apix.parse(mwTitle,{section:1});
    
    Now to get the data out. The following all fail:
    alert(sTest);
    alert(sTest.data);
    alert(sTest(data));
    alert(sTest.text());
    
    According to the doc, .parse returns a jQuery `promise object`. That doesn't sound like the data we want. Maybe we need a callback function? Maybe something called `.done`? :) Will get back... Johnywhy (talk) 01:38, 17 June 2018 (UTC)
    Getting closer, i think, but this breaks JS.
    apix.parse(mwTitle,{section:1}).done( function( result, jqXHR ){alert( 'done');})
    
    Prolly my parens or curlies or semicolons. Or the whole thing is completely wrong :D Johnywhy (talk) 02:01, 17 June 2018 (UTC)
    Whitespace doesn't make a difference, so something else was broken, perhaps try looking at the error messages instead of just saying it's "broken". I was assuming you knew how to use async JS.
    var api = new mw.Api();
    var sDescription = api.parse(
        new mw.Title( 'API:Main page' ),
        { section: 1 }
    );
    sDescription.then( function( text ) {
        console.log( text );
    } );
    
    137.147.0.130 (talk) 09:25, 17 June 2018 (UTC)

    How to Render Template in Javascript?

    Can javascript retrieve the rendered, rich-text output of a template? Ie, formatted text, not raw HTML. Johnywhy (talk) 01:45, 16 June 2018 (UTC)

    API:Parsing wikitext 137.147.0.130 (talk) 05:37, 16 June 2018 (UTC)
    The Parse API doesn't get rendered output. It gets the HTML parsed from wikitext. Tho' for my purpose, that would be fine. This works
    https://gunretort.xyz/api.php?action=parse&text={{Tag|Pie|}}&contentmodel=wikitext
    
    Of course, then returned json or xml has to be parsed or queried. I'm pretty sure jquery can handle that. Johnywhy (talk) 07:18, 16 June 2018 (UTC)
    Here's one method. Kinda hacky, but it works. Might be slow too. This is for parameterized templates:
    1. Install Extension:UrlGetParameters
    2. Replace the parameters in your template with a query string.
      replace:
      {{{1}}}
      with:
      {{#urlget:Tag}}
      
    3. instead of getting called as an internal transclude with pipes, it will be called as a fully-qualified url with url-parameters:
      instead of:
      {{MyTemplate|MyParameter}}
      call with
      https://MyWiki.xyz/index.php/Template:MyTemplate?MyParameter=SomeValue
      
    4. append &action=render to the url, so you exclude the headers and sidebar, and only get the rendered body of the template (the part that would normally be transcluded).
      https://MyWiki.xyz/index.php/Template:MyTemplate?MyParameter=SomeValue&action=render
      
    5. Retrieve this url in your javascript, with an XMLHttpRequest.
      xmlhttp=new XMLHttpRequest();
      xmlhttp.open("GET", "/index.php/Template:MyTemplate?action=render&MyParameter=" + sSomeValue, false);
      xmlhttp.send();
      var sTemplateOutput = xmlhttp.responseText;
      // optional strip HTML formatting, and get just the plain text
      var sPlainText = $(sDescription).text();
      
      Johnywhy (talk) 08:52, 17 June 2018 (UTC)
    The Parse API returns the HTML parsed from wikitext, which IS the rendered output. And your solution does exactly the same thing... so what's the actual problem here? 137.147.0.130 (talk) 09:09, 17 June 2018 (UTC)
    It seems the parse api can only return json or xml structured data.
    My solution returns just the rendered page body. Johnywhy (talk) 10:10, 17 June 2018 (UTC)
    Yeah, and the JSON contains the HTML. If you really don't want to work with JSON for some reason, the mw.Api.parse plugin just returns the HTML. 137.147.0.130 (talk) 16:48, 17 June 2018 (UTC)
    "the mw.Api.parse plugin just returns the HTML"
    How?
    I found these output formats. Seems not well documented.
    json, jsonfm, php, phpfm, wddx, wddxfm, xml, xmlfm, yaml, yamlfm, rawfm
    http://eom.byu.edu/api.php?action=options&reset=&token=123ABC
    One must also turn off the stats and extra info. I think that's done with prop, but no luck yet. Johnywhy (talk) 17:15, 17 June 2018 (UTC)
    See ResourceLoader/Core_modules#mediawiki.api.parse Ciencia Al Poder (talk) 09:29, 18 June 2018 (UTC)
    page says (removed in 1.32) Gerrit change 434179
    • Unclear if that means the given JS is deprecated in 1.32
    • Is something replacing it?
    var api = new mw.Api();
    api.parse( "'''Hello world'''" )
    .done( function ( html ) {
    	console.log( 'Parsed result:', html );
    } );
    
    • What's difference between new mw.Api() and new mediaWiki.Api()? Johnywhy (talk) 10:21, 18 June 2018 (UTC)
    The resource loader module mediawiki.api.parse is deprecated. In this case, the code is merged into mediawiki.api, which means you only need to have the mediawiki.api resource loader module loaded for using this.
    mw is a shorthand alias for mediaWiki, so basically both constructs are equivalent. Ciencia Al Poder (talk) 19:10, 18 June 2018 (UTC)
    "you only need to have the mediawiki.api resource loader module loaded for using this."
    Do i need to do something to have that? Or is it available in a core install by default? v1.30
    Does the given Javascript represent the non-deprecated style?
    Sorry if these questions are already answered in the doc, it's unclear to me. Johnywhy (talk) 19:16, 18 June 2018 (UTC)
    To make sure the module loads before your code runs, there's mw.loader.using.
    mw.loader.using( 'mediawiki.api' ).then( function () {
        var api = new mw.Api();
        api.parse( "'''Hello world'''" )
            .done( function ( html ) {
        console.log( 'Parsed result:', html );
        } );
    } );
    
    That Javascript is totally fine. Ciencia Al Poder (talk) 19:39, 18 June 2018 (UTC)
    do i definitely need to do `using` statement?
    i can already run the following code without the using statement. Doesn't that prove the mw module is loaded, and therefor parse will work out-of-the-box, without `using`?
    var api = new mediaWiki.Api();
        api.postWithToken( "edit", {
            action: "edit",
            title: "Portal:TagDescriptions",
            section: "new",
            text: sNewDescription,
            sectiontitle: sTag
        } )
    
    Johnywhy (talk) 19:43, 18 June 2018 (UTC)
    This will only work if the mediawiki.api module is loaded at the time your code runs. It may work because there may be some features on the page already using it and loading it before your code runs. However, this may not work on other pages. To be safe, wrap your code in mw.loader.using statements when using modules that are not loaded by default. Ciencia Al Poder (talk) 19:48, 18 June 2018 (UTC)
    is there a list of modules that are loaded by default?
    This page states
    "The modules jquery and mediawiki together form the base environment ("startup") and are always present. They should not (and in fact, can not) be loaded as modules or dependencies."
    Doesn't that mean mediawiki.api is automatically loaded? Johnywhy (talk) 19:56, 18 June 2018 (UTC)
    No, mediawiki.api is a different module than mediawiki. Hence, you usually need to load it explicitly. Ciencia Al Poder (talk) 20:05, 18 June 2018 (UTC)

    Update failed 1.31

    MediaWiki 1.31.0

    PHP 7.0

    MySQL 5.5+

    ICU Mutuel

    Hey,

    Since update from 1.30, my site is down.

    Message : Fatal error: Uncaught Error: Call to undefined method ModernTemplate::cactions() in /wiki/skins/Modern/SkinModern.php:75 Stack trace: #0 /wiki/includes/skins/SkinTemplate.php(251): ModernTemplate->execute() #1 /wiki/includes/OutputPage.php(2388): SkinTemplate->outputPage() #2 /wiki/includes/exception/MWExceptionRenderer.php(135): OutputPage->output() #3 /wiki/includes/exception/MWExceptionRenderer.php(54): MWExceptionRenderer::reportHTML(Object(Error)) #4 /wiki/includes/exception/MWExceptionHandler.php(75): MWExceptionRenderer::output(Object(Error), 2) #5 /wiki/includes/exception/MWExceptionHandler.php(149): MWExceptionHandler::report(Object(Error)) #6 /wiki/includes/exception/MWExceptionHandler.php(121): MWExceptionHandler::handleException(Object(Error)) #7 [internal function]: MWExceptionHandler::handleUncaughtExcep in /wiki/skins/Modern/SkinModern.php on line 75

    This is the 5 or 6st update of this site and never problem.

    It seems the problem would be from template, but I'm not sure and don't know where is the key of this problem.

    Any idea ?

    R Coyotte33 (talk) 13:48, 16 June 2018 (UTC)

    Which exact version and git branch of the Modern skin do you use? Malyacko (talk) 14:14, 16 June 2018 (UTC)
    I'm not sure.. I use the last version because update directly from my hosting panel .
    I'm only sure from Mediawiki version and Php version
    ============ edit======
    Apache 2.4.33
    PHP 7.2.6
    MySQL 5.6.39-cll-lve
    Archi x86_64
    OS linux
    ============next edit======
    I upload a new setup
    i move extension, image directories en localsetting
    I see the template modern is "noway" so I've modify in localsetting moderm vs vector
    now I can access to the site
    but after login the error message come back.
    Where is needing a next modif ?
    ============last edit======
    from localsetting, erase all reference from "modern" and mediawiki is alive
    is less beautifull but is alive ..
    Regards ! Coyotte33 (talk) 21:23, 16 June 2018 (UTC)
    I reproduce this error, this is very likely a bug. 星耀晨曦 (talk) 16:26, 17 June 2018 (UTC)
    Please make sure your version of Modern skin matches the version of your MW core. You may not upgraded your skin while upgrading MW core. 星耀晨曦 (talk) 16:38, 17 June 2018 (UTC)
    The important thing is this:
    The Modern skin always has been part of the MediaWiki package - but it no longer is in MediaWiki 1.31!
    Since MediaWiki 1.31, if you still want to use this skin, you have to update it manually, which has not been necessary in older versions. This is something, other users did not know as well... 87.123.197.1 (talk) 19:20, 17 June 2018 (UTC)
    Note also that the recommended way to upgrade is to unpack the new files on a new, empty directory, and not over the old one, which can cause conflicts with leftover files. That way you'll get also a clear error when a skin is missing.
    I've added a note about that missing skin on MediaWiki 1.31. If you detect other missing ones feel free to edit. Ciencia Al Poder (talk) 21:16, 17 June 2018 (UTC)
    Fatal error: Uncaught Error: Call to undefined method ModernTemplate::cactions() in /wiki/skins/Modern/SkinModern.php:75 Stack trace: #0 /wiki/includes/skins/SkinTemplate.php(251): ModernTemplate->execute() #1 /wiki/includes/OutputPage.php(2388): SkinTemplate->outputPage() #2 /wiki/includes/exception/MWExceptionRenderer.php(135): OutputPage->output() #3 /wiki/includes/exception/MWExceptionRenderer.php(54): MWExceptionRenderer::reportHTML(Object(Error)) #4 /wiki/includes/exception/MWExceptionHandler.php(75): MWExceptionRenderer::output(Object(Error), 2) #5 /wiki/includes/exception/MWExceptionHandler.php(149): MWExceptionHandler::report(Object(Error)) #6 /wiki/includes/exception/MWExceptionHandler.php(121): MWExceptionHandler::handleException(Object(Error)) #7 [internal function]: MWExceptionHandler::handleUncaughtExcep in /wiki/skins/Modern/SkinModern.php on line 75
    This is the 5 or 6st update of this site and never problem.
    It seems the problem would be from template, but I'm not sure and don't know where is the key of this problem. 36.70.59.254 (talk) 02:14, 17 April 2019 (UTC)
    After your MediaWiki core update, did you also update Skin:Modern? AhmadF.Cheema (talk) 07:53, 17 April 2019 (UTC)

    Dear sir could you please transform the fist column into a sidbar sliding drawer widget.

    The user can then hide or pop-up the column again and we will win space for the text.

    Thanks for your help,

    Gerard Coppejans Gery51 (talk) 14:41, 16 June 2018 (UTC)

    Losing Section-Titles on API 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.


    When i edit an existing section with javascript, the section-title gets overwritten by the new text.

        sNewSectionContent = 'Hello, World.';
        iSectionID = 2;
        var api = new mediaWiki.Api(); 
        api.postWithToken( "edit", {
            action: "edit",
            title: "Portal:MyList",
            section: iSectionID,
            text: sNewSectionContent
        } )
    

    turns this

    MySection
    The section content.
    
    AnotherSection
    More stuff here.

    into this

    MySection 
    The section content. 
    
    Hello, World. 

    Any way to prevent this?

    Why not writing to source?

    I tried including the title in the new text, but that gets rendered on the page as raw wikitext, instead of getting written to the source.
    sSectionName = "AnotherSection";
    text: "== " + sSectionName + " ==" + sNewSectionContent;
    renders as raw wikitext on the page:
    MySection 
    The section content. 
    
    == AnotherSection ==Hello, World.

    I tried changing the contentformat and contentmodel, but no setting seemed to fix the problem.

    I tried wrapping the title in the same class it's wrapped in, by default on wiki pages.
    text: "<span class='mw-headline' id='This_is_a_test.3F'>This is a test</span><br>" + sNewDescription
    
    The title wasn't formatted. Johnywhy (talk) 17:46, 16 June 2018 (UTC)
    The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

    Upgrade from 1.27.4 to 1.31.0 fails during database 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.


    Current: MediaWiki 1.27.4 Upgrade to: MediaWiki 1.31.0

    PHP 7.1.17 (fpm-fcgi) MariaDB 10.2.14 URL - localhost (test environment)

    Running the maintenance script update.php produces a privilege error:

    =

    Turning off Content Handler DB fields for this part of upgrade. Adding ipb_id field to table ipblocks ...[06a6bcb5ba7a28f0640c1c8d] [no req] Wikimedia\Rdbms\DBQueryError from line 1457 of /var/www/html/w/includes/libs/rdbms/database/Database.php: A database query error has occurred. Did you forget to run your application's database schema updater after upgrading? Query: ALTER TABLE `mediawiki`.`ipblocks`

    ADD ipb_auto tinyint NOT NULL default '0',
    ADD ipb_id int NOT NULL auto_increment,
    ADD PRIMARY KEY (ipb_id)

    Function: Wikimedia\Rdbms\Database::sourceFile( /var/www/html/w/maintenance/archives/patch-ipblocks.sql ) Error: 1142 ALTER command denied to user 'wiki'@'localhost' for table 'ipblocks' (localhost)

    Backtrace:

    1. 0 /var/www/html/w/includes/libs/rdbms/database/Database.php(1427): Wikimedia\Rdbms\Database->makeQueryException(string, integer, string, string)
    2. 1 /var/www/html/w/includes/libs/rdbms/database/Database.php(1200): Wikimedia\Rdbms\Database->reportQueryError(string, integer, string, string, boolean)
    3. 2 /var/www/html/w/includes/libs/rdbms/database/Database.php(4194): Wikimedia\Rdbms\Database->query(string, string)
    4. 3 /var/www/html/w/includes/libs/rdbms/database/Database.php(4129): Wikimedia\Rdbms\Database->sourceStream(resource (closed), NULL, NULL, string, NULL)
    5. 4 /var/www/html/w/includes/installer/DatabaseUpdater.php(683): Wikimedia\Rdbms\Database->sourceFile(string)
    6. 5 /var/www/html/w/includes/installer/DatabaseUpdater.php(751): DatabaseUpdater->applyPatch(string, boolean, string)
    7. 6 /var/www/html/w/includes/installer/DatabaseUpdater.php(482): DatabaseUpdater->addField(string, string, string)
    8. 7 /var/www/html/w/includes/installer/DatabaseUpdater.php(446): DatabaseUpdater->runUpdates(array, boolean)
    9. 8 /var/www/html/w/maintenance/update.php(200): DatabaseUpdater->doUpdates(array)
    10. 9 /var/www/html/w/maintenance/doMaintenance.php(94): UpdateMediaWiki->execute()
    11. 10 /var/www/html/w/maintenance/update.php(245): require_once(string)
    12. 11 {main}
    ==

    Running the update script as a database user with administrator privileges produces this error:

    Function: Wikimedia\Rdbms\Database::sourceFile( /var/www/html/w/maintenance/archives/patch-ipblocks.sql ) Error: 1146 Table 'mediawiki.ipblocks' doesn't exist (localhost)

    (same backtrace)

    ==

    My database user account has "GRANT ALL PRIVILEGES ON `wiki`.* TO 'wiki'@'localhost'".

    There are no errors when I run the update script from a version 1.31 clean install.

    There are no errors when I run the update script from my current version 1.27.4.

    I am blocked upgrading to version 1.31.0.

    How can I debug this problem? I do not see any mention of this problem in Phabricator. Lady G2016 (talk) 18:10, 16 June 2018 (UTC)

    This is a problem with MySQL/MariaDB permissions. You are speaking about two different databases!
    > ALTER TABLE `mediawiki`.`ipblocks`
    > ALTER command denied to user 'wiki'@'localhost' for table 'ipblocks'
    > GRANT ALL PRIVILEGES ON `wiki`.* TO 'wiki'@'localhost'
    The correct database name obviously is "mediawiki", not "wiki". 2001:16B8:106B:1200:B5FB:6E29:5A6F:ED48 (talk) 21:21, 16 June 2018 (UTC)
    Thank you for the reply. I agree, the database name does not match. There is no mention of 'mediawiki' in my LocalSettings.php file; the correct database name is 'wiki'. Therefore, the database name has changed during the script execution.
    I was incorrect in my earlier statement of There are no errors when I run the update script from a version 1.31 clean install. The script did indeed run, but that was for a clean (new) database. The conditions which triggered my error did not occur - modification of an existing database.
    All maintenance scripts utilize the configurations in LocalSettings.php. Perhaps this is the source of my problem? I replaced my existing LocalSettings.php file with the version created from a clean install. It worked!
    I then modified the "clean" LocalSettings.php to align with my existing configuration. Extensions were added to the bottom of the file. (Previously, they were near the top of the file.) I don't know if the extension placement or a configuration setting was source of my problem.
    In any case, I have a working configuration and can proceed with my testing. Lady G2016 (talk) 00:44, 17 June 2018 (UTC)
    I had exactly the same error message as @Lady_G2016 indicated when upgrading from MW1.30 to MW1.31. So I asked for help from my University of Colorado colleague at the IT department, Karen. Karen indicated the following:
    It almost looks like there is a code error. In most cases, the settings use $wgDBname, which properly points to the mysql database "csdms_wiki" [the dbname of my wiki].   However, in Setup.php, there is a reference to $wgDBmwschema, which, per LocalSettings.php should only be used if you are using postgresql. In LocalSettings.php, $wgDBmwschema points to 'mediawiki'. So maybe try changing the value for $wgDBmwschema in LocalSettings.php from 'mediawiki' to 'csdms_wiki'?
    I did that and the update.php script runs smoothly. So could it be that the reference in the Setup.php to $wgDBmwschema shouldn't be there when running the wiki from a mysql database?
    Thanks,
    Albert. Albert Ke (talk) 21:38, 19 June 2018 (UTC)
    I had this exact issue as well. I use MySQL. My LocalSettings.php, which was originally generated quite a many versions ago, had this code:
    $wgDBmwschema       = 'mediawiki';
    I changed it to this, and the problem went away.
    $wgDBmwschema       = $wgDBname; lziobro (talk) 00:10, 16 July 2018 (UTC)
    I've updated Manual:$wgDBmwschema to reflect this situation, and mentioned this on MediaWiki 1.31#Configuration changes. Ciencia Al Poder (talk) 08:35, 16 July 2018 (UTC)
    The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

    horizontal and vertical cursor lines are not showing

    how do i get them back? I use the dark background 208.96.187.214 (talk) 23:13, 16 June 2018 (UTC)

    What are "horizontal and vertical cursor lines" in the MediaWiki software? You'll have to elaborate... Malyacko (talk) 10:56, 18 June 2018 (UTC)

    How to get the number of edits for anonymous users?

    Hello, how can I get the number of edits made by a certain IP address using API? Guycn2 (talk) 08:28, 17 June 2018 (UTC)

    What is this {{ }} Object and how can I edit it?

    http://wiki.wargaming.net/en/Ship:Consumables

    In the above page, the text blocks about the consumables are not contained in the actual page's source text like normal but somehow linked up from what seems to be a kind of database, using syntax like

    "Ship:Hydroacoustic Search Data" between double curly braces. Are these templates or what are these? And how can I access them to edit the text? 2003:C5:E70E:A900:5504:A9A:36A9:7899 (talk) 22:30, 17 June 2018 (UTC)

    They're normal templates, with a custom prefix 'Ship:' (but that could be anything; n.b. templates don't have to be in the Template namespace). To access them, there's a list under every page's edit box that links to every transcluded template. The content of the template can be anything. Sam Wilson 00:04, 18 June 2018 (UTC)

    When loggin in, there is a link that goes to Special:RessetPassword. Is it possible to change the destination of that link, to another page? 190.140.178.234 (talk) 02:53, 18 June 2018 (UTC)

    Filtered tables

    Is there a way to filter tables?

    Thank you in advance.

    Yours, Ciciban (talk) 07:56, 18 June 2018 (UTC)

    which table and filter on what ? —TheDJ (Not WMF) (talkcontribs) 09:46, 18 June 2018 (UTC)
    e.g. this table
    filter for lines, where a certain col has/contains a certain value
    e.g. only show the lines, where the first col =IS, and/or where the second col contains TT.
    Ciciban (talk) 16:07, 18 June 2018 (UTC)
    MediaWiki does not provide that functionality.
    You may need to install a jQuery plugin for this functionality and some code to activate this. You'll need some coding skills to make it work. Ciencia Al Poder (talk) 09:23, 19 June 2018 (UTC)
    O.k., thanks. That's beyond the frame – Ciciban (talk) 09:52, 19 June 2018 (UTC)

    Edit Office documents in the browser from my mediawiki page

    Hi there!

    I would like to store MS Office documents(*.docx, *.xlsx, ...) in my mediawiki.Since there are modified a lot, I would like to be able, to open them in the browser, modify them and store them directly in the mediawiki, without being forced to upload them again manually.

    Is there any extensions that fullfill this requirements?

    An alternative could be connecting mediawiki to alfresco. Bu I would prefer to use just meidawiki.

    Thanking you in advance

    P.L. 77.87.228.71 (talk) 09:36, 18 June 2018 (UTC)

    Not as far as I'm aware. It sounds like you are looking for a module to do OneDrive and Office365 integration. I'd say that using sharepoint with 365 is likely to be easier to implement in that case. —TheDJ (Not WMF) (talkcontribs) 09:46, 18 June 2018 (UTC)

    Filter photos

    It will be better to have a filter for photos for people less than 18 years like the one in facebook 93.169.214.245 (talk) 10:10, 18 June 2018 (UTC)

    You are free to write a MediaWiki extension for your MediaWiki installation that asks users to enter and lie about their age when they register their MediaWiki account... ;) Malyacko (talk) 10:55, 18 June 2018 (UTC)

    Restoring mediawiki downloaded from hosted server (company name: namecheap)

    Hello. I had all of my files on a hosted server downloaded to a large 4 gb zip file.
    In localsettings.php it says:
    ##Database settings
    $wgDBtype = "mysql";
    $wgDBserver = "localhost";
    $wgDBname = "travb_mw229";
    $wgDBuser = "travb_mw229";
    Where would this file be?
    --------
    The information on a new account (which would be the same as the previous downloaded account) is this:
    Server: Localhost via UNIX socket
    Server type: MariaDB
    Server version: 10.1.31-MariaDB-cll-lve - MariaDB Server
    Protocol version: 10
    User: ...@localhost
    Server charset: UTF-8 Unicode (utf8)
    Web server
    cpsrvd 11.70.0.48
    Database client version: libmysql - 5.1.73
    PHP extension: mysqli curl mbstring
    PHP version: 5.6.30 Flylikeaseagull (talk) 10:27, 18 June 2018 (UTC)
    In whatever folder you stored your database file. :) Malyacko (talk) 10:54, 18 June 2018 (UTC)
    hello @Malyacko where is the default database file on a mediawiki program? I just created a mediawiki using default program, Softaculous on namecheap cpanel. It was created with MediaWiki 1.23.3 Flylikeaseagull (talk) 11:15, 18 June 2018 (UTC)
    That depends on the database backend used (MySQL/MariaDB, Postgres, SQLite, MSSQL, to name a few) and how that database is configured. That's lower in the stack than MediaWiki... Malyacko (talk) 11:22, 18 June 2018 (UTC)
    thank you for your time sir!
    I am really a newbie at this kind of stuff.
    What is the database file usually called?
    mysql.php?
    Ok, I just dragged and dropped all of my files using winscp to my desktop then zipped them. @Malyacko
    Softaculous says:
    • Database-driven (MySQL and PostgreSQL are both supported)
    In localsettings.php it says:

    ## Database settings

    $wgDBtype = "mysql";

    $wgDBserver = "localhost";

    $wgDBname = "travb_mw229";

    $wgDBuser = "travb_mw229";

    Not sure what you mean by lower in the stack - going to assume not important for now :)
    Would the database be located in the folder for my mediawiki, which is automatically created when I used Softaculous to automatically create MediaWiki 1.23.3?
    THANK YOU FOR YOUR HELP! Flylikeaseagull (talk) 11:30, 18 June 2018 (UTC)
    Alright, that means that you use a MySQL/MariaDB database, and the database has the name "travb_mw229". I do not know what "Softaculous" or "namecheap" is and which operating system they are running and where they save databases by default.
    "Would the database be located in the folder for my mediawiki": Usually not, no. Malyacko (talk) 11:50, 18 June 2018 (UTC)
    @Malyacko
    Hello sir! I rewrote the original question, with a lot more details.
    Any suggestions where these databases would be? Flylikeaseagull (talk) 12:26, 18 June 2018 (UTC)
    https://mariadb.com/kb/en/library/default-data-directory-for-mariadb/ Malyacko (talk) 14:14, 18 June 2018 (UTC)
    I read this:
    Which does not help me much. Flylikeaseagull (talk) 10:27, 18 June 2018 (UTC)
    Hi Flylikeaseagull!
    Actually, you are not really having a MediaWiki question. :-)
    You already know that you are looking for a MySQL databse and that this database has the name travb_mw229.
    What you now need to know is the folder, in which MySQL databases are stored in your backup. Basically this is a question on where MySQL was configured to store databases in this system. 2001:16B8:10E0:B500:AC31:65A3:AD3F:9360 (talk) 17:08, 18 June 2018 (UTC)
    Manual:Backing up a wiki wargo (talk) 20:53, 18 June 2018 (UTC)
    For completeness, read Manual:Moving a wiki Ciencia Al Poder (talk) 09:10, 19 June 2018 (UTC)

    Gadgets vs Widgets?

    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.


    Its seems both support HTML/CSS/JS.

    Extension:Widgets

    Extension:Gadgets

    How to choose one over the other? How are they different?

    This page says:

    • Gadgets — Lets users select custom CSS and JavaScript gadgets in their preferences.
    • Widgets — Allows wiki administrators to add free-form widgets to the wiki by editing pages within the Widget namespace.

    Observations:

    • Not sure what "free-form" means. Both widgets and gadgets are added by admins, so that factor seems the same.
    • I believe widgets are a type of gadget, and the widget feature must be defined on the gadgets-definition page. But that doesn't help me understand the difference between them.
    • Sounds like either one could be a video-player, feed-reader, or any other visual toy embedded on the page. Johnywhy (talk) 17:19, 18 June 2018 (UTC)
    Gadgets is for adding scripts and CSS snippets that will be loaded on all pages, for all users or those users that choose to use them in their preferences.
    Widgets are HTML fragments that you define (including content that usually isn't allowed in wikitext, like HTML forms, iframes, etc) that can be included on specific pages. Ciencia Al Poder (talk) 20:11, 18 June 2018 (UTC)
    • A JS gadget may write HTML to a page, but gadgets start with a JS or CSS file (or page), and not an HTML file. Correct?
    • A JS gadget may write HTML that usually isn't allowed in wikitext (like forms, iframes, etc). Correct?
    • A widget starts with raw HTML. That HTML may load CSS or JS. Correct? Johnywhy (talk) 20:19, 18 June 2018 (UTC)
    All 3 points are correct Ciencia Al Poder (talk) 20:23, 18 June 2018 (UTC)
    nm Johnywhy (talk) 20:50, 18 June 2018 (UTC)
    The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

    Creating "Support desk"-style forum

    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 create forums like this MediaWiki Support desk?

    In other words what extensions, templates, etc. MediaWiki uses to create this Support desk?

    I tried to find related extensions in the Special:version page of MediaWIki, but couldn't find anything. Another problem I noted is that when I click the discussion link on the support desk (Project talk:Support desk) it opens the same topics posted in this main page (Project:Support desk). Can someone please tell me is this a bug? Biologically (talk) 17:56, 18 June 2018 (UTC)

    Extension:StructuredDiscussions
    The discussion page peculiarity shouldn't be a bug, it has a redirect link to this page, although am not sure why the redirect link works here slightly differently than normal. AhmadF.Cheema (talk) 19:05, 18 June 2018 (UTC)
    Understood. Thank you so much. Biologically (talk) 15:13, 19 June 2018 (UTC)
    The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

    'Internal Error' with 1.31 + Math Extension

    I have a wiki that was just upgraded to 1.31. For testing purposes, I am assuming the wiki has access to the internet.

    I downloaded the Math extension from:

    https://www.mediawiki.org/w/index.php?title=Special:ExtensionDistributor&extdistname=Math&extdistversion=REL1_31

    and de-tarred the file into the 'extensions' directory.

    I added to LocalSettings.php the two lines:

    wfLoadExtension( 'Math' );

    $wgShowExceptionDetails = true;

    When I created a page and inserted the code: '<math>ax^2</math>', I had a grievous error, the significance of which I don't understand because I'm not a MediaWiki developer. What's going on?

    MediaWiki internal error.

    Original exception: [617bcf9d596e3c187a4aad5d] /wiki3/index.php/Sandbox_and_Wiki_Samples Exception from line 420 of /var/www/html/wiki3/includes/libs/MultiHttpClient.php: PHP cURL extension missing. Check https://www.mediawiki.org/wiki/Manual:CURL

    Backtrace:

    #0 /var/www/html/wiki3/includes/libs/MultiHttpClient.php(149): MultiHttpClient->getCurlMulti()

    #1 /var/www/html/wiki3/includes/libs/virtualrest/VirtualRESTServiceClient.php(249): MultiHttpClient->runMulti(array)

    #2 /var/www/html/wiki3/extensions/Math/MathRestbaseInterface.php(151): VirtualRESTServiceClient->runMulti(array)

    #3 /var/www/html/wiki3/extensions/Math/MathMathML.php(61): MathRestbaseInterface::batchEvaluate(array)

    #4 /var/www/html/wiki3/extensions/Math/MathHooks.php(384): MathMathML::batchEvaluate(array)

    #5 /var/www/html/wiki3/includes/Hooks.php(177): MathHooks::onParserAfterTidy(Parser, string)

    #6 /var/www/html/wiki3/includes/Hooks.php(205): Hooks::callHook(string, array, array, NULL)

    #7 /var/www/html/wiki3/includes/parser/Parser.php(1428): Hooks::run(string, array)

    #8 /var/www/html/wiki3/includes/parser/Parser.php(446): Parser->internalParseHalfParsed(string, boolean, boolean)

    #9 /var/www/html/wiki3/includes/content/WikitextContent.php(323): Parser->parse(string, Title, ParserOptions, boolean, boolean, integer)

    #10 /var/www/html/wiki3/includes/content/AbstractContent.php(516): WikitextContent->fillParserOutput(Title, integer, ParserOptions, boolean, ParserOutput)

    #11 /var/www/html/wiki3/includes/poolcounter/PoolWorkArticleView.php(144): AbstractContent->getParserOutput(Title, integer, ParserOptions)

    #12 /var/www/html/wiki3/includes/poolcounter/PoolCounterWork.php(123): PoolWorkArticleView->doWork()

    #13 /var/www/html/wiki3/includes/page/Article.php(604): PoolCounterWork->execute()

    #14 /var/www/html/wiki3/includes/actions/ViewAction.php(68): Article->view()

    #15 /var/www/html/wiki3/includes/MediaWiki.php(500): ViewAction->show()

    #16 /var/www/html/wiki3/includes/MediaWiki.php(294): MediaWiki->performAction(Article, Title)

    #17 /var/www/html/wiki3/includes/MediaWiki.php(861): MediaWiki->performRequest()

    #18 /var/www/html/wiki3/includes/MediaWiki.php(524): MediaWiki->main()

    #19 /var/www/html/wiki3/index.php(42): MediaWiki->run()

    #20 {main}

    Exception caught inside exception handler: [617bcf9d596e3c187a4aad5d] /wiki3/index.php/Sandbox_and_Wiki_Samples Exception from line 420 of /var/www/html/wiki3/includes/libs/MultiHttpClient.php: PHP cURL extension missing. Check https://www.mediawiki.org/wiki/Manual:CURL

    Backtrace:

    #0 /var/www/html/wiki3/includes/libs/MultiHttpClient.php(149): MultiHttpClient->getCurlMulti()

    #1 /var/www/html/wiki3/includes/libs/virtualrest/VirtualRESTServiceClient.php(249): MultiHttpClient->runMulti(array)

    #2 /var/www/html/wiki3/extensions/Math/MathRestbaseInterface.php(151): VirtualRESTServiceClient->runMulti(array)

    #3 /var/www/html/wiki3/extensions/Math/MathMathML.php(61): MathRestbaseInterface::batchEvaluate(array)

    #4 /var/www/html/wiki3/extensions/Math/MathHooks.php(384): MathMathML::batchEvaluate(array)

    #5 /var/www/html/wiki3/includes/Hooks.php(177): MathHooks::onParserAfterTidy(Parser, string)

    #6 /var/www/html/wiki3/includes/Hooks.php(205): Hooks::callHook(string, array, array, NULL)

    #7 /var/www/html/wiki3/includes/parser/Parser.php(1428): Hooks::run(string, array)

    #8 /var/www/html/wiki3/includes/parser/Parser.php(446): Parser->internalParseHalfParsed(string, boolean, boolean)

    #9 /var/www/html/wiki3/includes/cache/MessageCache.php(1158): Parser->parse(string, Title, ParserOptions, boolean)

    #10 /var/www/html/wiki3/includes/Message.php(1244): MessageCache->parse(string, Title, boolean, boolean, LanguageEn)

    #11 /var/www/html/wiki3/includes/Message.php(869): Message->parseText(string)

    #12 /var/www/html/wiki3/includes/Message.php(922): Message->toString(string)

    #13 /var/www/html/wiki3/includes/skins/Skin.php(682): Message->parse()

    #14 /var/www/html/wiki3/includes/skins/SkinTemplate.php(462): Skin->printSource()

    #15 /var/www/html/wiki3/includes/skins/SkinTemplate.php(249): SkinTemplate->prepareQuickTemplate()

    #16 /var/www/html/wiki3/includes/OutputPage.php(2388): SkinTemplate->outputPage()

    #17 /var/www/html/wiki3/includes/exception/MWExceptionRenderer.php(135): OutputPage->output()

    #18 /var/www/html/wiki3/includes/exception/MWExceptionRenderer.php(54): MWExceptionRenderer::reportHTML(Exception)

    #19 /var/www/html/wiki3/includes/exception/MWExceptionHandler.php(75): MWExceptionRenderer::output(Exception, integer)

    #20 /var/www/html/wiki3/includes/exception/MWExceptionHandler.php(149): MWExceptionHandler::report(Exception)

    #21 /var/www/html/wiki3/includes/MediaWiki.php(551): MWExceptionHandler::handleException(Exception)

    #22 /var/www/html/wiki3/index.php(42): MediaWiki->run()

    #23 {main} 99.203.5.195 (talk) 20:24, 18 June 2018 (UTC)

    I am able to reproduce this on a freshly installed wiki. The extension is broken. Somebody who knows who's in charge of these sorts of problems needs to find out about this. 99.203.5.195 (talk) 20:48, 18 June 2018 (UTC)
    As the error messages mentions, "PHP cURL extension missing". You will need to enable the cURL extension in your PHP settings. AhmadF.Cheema (talk) 06:12, 19 June 2018 (UTC)

    Is importScript Deprecated?

    It is deprecated but not likely to disappear immediately. importScript is deprecated, because it loads scripts synchronously, whereas every script in MediaWiki should be expecting asynchronous behaviour. As long as your script can handle asynchronous loading, then you shouldn't have a problem. importScript is in a bit of a limbo due to its widespread use, so you can expect to at least find large announcements if at any point it will disappear.

    This page explains how to use importScript. But seems to fail on my MW 1.30.

    This page has some discussion about deprecation, but seems to conclude that importScript is not deprecated.

    This page says to migrate importScript to mw.loader.

    The nice thing about importScript is that you can pass a simple page refererence, eg importScript('MyScript.js'). It appears that mw.loader requires a more complicated url-syntax, eg

    mw.loader.load( '/w/index.php?title=MyScript.js&action=raw&ctype=text/javascript' );

    Is it deprecated, or soon to be? Johnywhy (talk) 21:00, 18 June 2018 (UTC)

    It is deprecated but not likely to disappear immediately. importScript is deprecated, because it loads scripts synchronously, whereas every script in MediaWiki should be expecting asynchronous behaviour. As long as your script can handle asynchronous loading, then you shouldn't have a problem.
    importScript is in a bit of a limbo due to its widespread use, so you can expect to at least find large announcements if at any point it will disappear. —TheDJ (Not WMF) (talkcontribs) 11:24, 19 June 2018 (UTC)
    Seems to me, it's preferable to have a choice between synchronous and asynchronous. No? Johnywhy (talk) 13:11, 19 June 2018 (UTC)
    Is it possible to create a form of the « loader » function that takes a pagename instead of a uri on a local wiki ? The url can be computed easily if needed. TomT0m (talk) 15:10, 22 June 2022 (UTC)
    @TheDJ: People seem to refer to this topic now, five years later, so I’ll summarize why what you said doesn’t stand today:
    • ResourceLoader/Migration guide (users) no longer marks importScript/importStylesheet as deprecated (diff), only their URI variants.
    • I don’t know if this was different half a decade ago, but now both importScript and mw.loader.load end up calling mw.loader.addScript. Same function, same behavior in regard to synchronicity. The only difference is that mw.loader.load returns a promise you can await, but the fact that you cannot wait for the result of importScript doesn’t make it more synchronous, the current script is not halted while the other script is downloaded and compiled. Tacsipacsi (talk) 02:14, 23 January 2023 (UTC)

    Font Picker?

    Any font-picker available for Mediawiki? Could be global or per-user.

    I don't want to change the whole skin, just pick a different font.

    Extension:FontAwesome does not seem created for that purpose. Johnywhy (talk) 02:26, 19 June 2018 (UTC)

    The font settings are part of the skin —TheDJ (Not WMF) (talkcontribs) 11:20, 19 June 2018 (UTC)
    Yes, i understand. I'm looking for a font-picker widget that's independent of the skin. Johnywhy (talk) 14:57, 19 June 2018 (UTC)
    If you want to have different fonts within a pages' content you may just use an HTML snippet like
    ... <span style="font-family:serif">My text</span>...
    You could also define CSS classes with the font settings in your Common.css. After that you could add an button to your WikiText-Editor: Manual:Custom edit buttons
    But there is not an actual font picker for WikiEditor of VisualEditor as far as I know. Osnard (talk) 05:59, 21 June 2018 (UTC)
    Thx, i'm familiar with the CSS.
    I don't mean a font-picker for the editor.
    i mean a font-picker for the site visitor. Johnywhy (talk) 07:48, 21 June 2018 (UTC)
    here's a font-picker:
    https://www.jqueryscript.net/demo/Easy-Google-Web-Font-Selector-With-jQuery-Fontselect/
    a "skin-switcher" widget is a similar idea. i have not seen that either. Johnywhy (talk) 03:41, 30 June 2018 (UTC)
    AFAIK there is nothing like this available, so you will have to implement it yourself. If you don't want to create a serverside extension (which I would recommend) you might got for MediaWiki:Common.js. A picker like the one from your example could be implemented that way. Osnard (talk) 05:59, 18 July 2018 (UTC)

    Pages are not updated!! If no body is maintaining it, this site needs to be taken down!!

    Pages are not updated!! If no body is maintaining it, this site needs to be taken down!! 99.166.69.111 (talk) 02:51, 19 June 2018 (UTC)

    Please provide more detailed information. What website? 星耀晨曦 (talk) 03:15, 19 June 2018 (UTC)

    Split Pages

    Hi there,

    Does anyone know if i can divide my page into 3, preferably horizontally.

    Thank you! Joshua Tan JT (talk) 08:51, 19 June 2018 (UTC)

    You could write custom CSS or use a table. Malyacko (talk) 12:45, 19 June 2018 (UTC)
    May I know how do i go about doing the custom CSS? Joshua Tan JT (talk) 01:12, 20 June 2018 (UTC)
    What you want divide? You want to make boxes or sections? Or make spearate pages? wargo (talk) 06:25, 20 June 2018 (UTC)
    Yeah sections... Joshua Tan JT (talk) 07:24, 20 June 2018 (UTC)
    See Manual:CSS Malyacko (talk) 19:53, 23 June 2018 (UTC)
    May I have an example of the css code that divides the pages into 3 horizontally?
    Thanks in advance. Joshua Tan JT (talk) 06:33, 26 June 2018 (UTC)
    That's a question for any random HTML/CSS forum and does not sound MediaWiki specific? Malyacko (talk) 09:17, 27 June 2018 (UTC)
    It is for use in mediawiki... Joshua Tan JT (talk) 02:44, 28 June 2018 (UTC)
    What is meant is that this support forum is primarily for queries related to the MediaWiki code. For HTML/CSS questions, someone might answer here, but you'll have better luck at a forum made for answering HTML/CSS questions. AhmadF.Cheema (talk) 17:29, 28 June 2018 (UTC)
    You need to specyfy what you mean divide. How it can look? Maybe you can draw it. wargo (talk) 20:00, 28 June 2018 (UTC)

    'lama-message-404.jpg' in adress bar when clicking picture

    Good day everybody,

    after moving my three wiki installations (German language version, English language version and central picture and media installation) to a new webspace the word 'lama-message-404.jpg' occurs inside the adress bar when clicking a random picture on a Wiki page. The picture's media page will not open instead a 404 error page loads. See example on this site: http://wiki-en.hacker-motor.com/index.php/DPSI_Micro_DualBat

    When copying the link behind the picture (http://wiki-en.hacker-motor.com/index.php/File:DPSI-Micro-DualBat_5.9-7.2_JR_Gesamt_640x400.jpg) and pasting it into a new browser tab the page will be desplayed without errors.

    Has anyone seen this error before?

    Best regards

    Marco Marco Köhler Augsburg (talk) 09:08, 19 June 2018 (UTC)

    To investigate, see the "Network" tab of your web browser's developer tools on http://wiki-en.hacker-motor.com/index.php/DPSI_Micro_DualBat?debug=true : The page loads http://wiki-en.hacker-motor.com/skins/common/images/magnify-clip.png which is not served as an image file but as 'text/html' and is shown as "initiator" for 'lama-message-404.jpg'... AKlapper (WMF) (talk) 12:44, 19 June 2018 (UTC)
    Thanks for the advice. I found several image files which are transmitted as text/html content type. Very courious. But I can't image which the one fact should influence the problem. Marco Köhler Augsburg (talk) 14:33, 19 June 2018 (UTC)
    OK, this was the problem indeed. It was caused by an .htaccess file which my former colleague put to the webserver. Tanks AKlapper.
    M. Marco Köhler Augsburg (talk) 05:22, 20 June 2018 (UTC)

    How to edit the personal links?

    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 edit the personal links (links to user page, talk page, Echo notifications...) in my wiki? I can't find an according MediaWiki system page, so I assume I have to edit them directly in a .php file in the Wiki installation? If yes, which file/class is it? Sturmjäger (talk) 09:46, 19 June 2018 (UTC)

    See Manual:Personal Urls Malyacko (talk) 12:36, 19 June 2018 (UTC)
    I already read that page before, but now I see how to edit them, so this question is done I think. Sturmjäger (talk) 11:18, 20 June 2018 (UTC)
    The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

    Fitness is required for private vehicles more than 5 seaters

    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.


    Fitness is required for private vehicles more than 5 seaters 42.106.19.176 (talk) 09:56, 19 June 2018 (UTC)

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

    Can't Style .mw-headline Top?

    The following CSS has no effect:

    .mw-headline{
        margin-top: 30px;
    }
    

    however, this does have effect:

    .mw-headline{
        margin-left: 100px;
    }
    

    Same problem with padding.

    How can i add margin or padding above headings? Johnywhy (talk) 14:15, 19 June 2018 (UTC)

    Apparently, the ".mw-headline" .CSS rule gets overridden by the more defined ".mw-headline h2" rule for "margin-top", already present in the skin.
    You will have to use something like:
    .mw-headline h2, .mw-headline h3 {
        margin-top: 30px;
    }
    
    AhmadF.Cheema (talk) 15:48, 19 June 2018 (UTC)
    That seems to have no effect as well. Johnywhy (talk) 16:41, 19 June 2018 (UTC)
    you mean ".mw-headline h2" in the skin, and ".mw-headline h3" , ".mw-headline h4" , etc? Johnywhy (talk) 16:17, 19 June 2018 (UTC)
    I think so (I'm not exactly sure what you meant there).
    In .CSS rules with higher specificity (i.e. ".mw-headline h2") overrides rules with lower specificity (i.e. just ".mw-headline"). As in this particular case higher specificity rules are already defined in the skin, you will need to add a rule with greater or equal specificity in your MediaWiki:Common.css. AhmadF.Cheema (talk) 16:39, 19 June 2018 (UTC)
    So far only this works:
    h2>span{
        padding-top: 30px;
    }
    
    But would be preferable if i could use the classname somewhere in that. Johnywhy (talk) 17:00, 19 June 2018 (UTC)
    Apologies, hadn't actually tested the rule.
    Another way to make this work, would be the following:
    #mw-content-text > div > h2,
    #mw-content-text > div > h3, 
    #mw-content-text > div > h4 {
        margin-top: 30px;
    }
    
    AhmadF.Cheema (talk) 17:57, 19 June 2018 (UTC)
    so, going roundabout way through a different named element?
    Should work, assuming the headings are the only element ever to fit that selector. Johnywhy (talk) 18:08, 19 June 2018 (UTC)

    Custom Fields on Edit Screen?

    We'd like to add a variety of custom entry-boxes on the edit screen, to add custom meta-data to pages.

    Is there a built-in or extension way? Johnywhy (talk) 15:26, 19 June 2018 (UTC)

    You will probably need to write an extension. Have a look at Manual:Hooks and Manual:Hooks/EditPage::showEditForm:fields. Osnard (talk) 05:54, 21 June 2018 (UTC)
    Is that related to this, or totally different? Is it still correct info? Johnywhy (talk) 19:37, 5 July 2018 (UTC)
    Completely different. I'd recommend to stick to Manual:Hooks/EditPage::showEditForm:fields. Osnard (talk) 05:56, 18 July 2018 (UTC)

    MediaWiki: Extension URLs are returning "404 Not Found"

    Hi there,

    We are getting 404 for all MediaWIki: URL paths

    /wiki//index.php/MediaWiki:Common.js

    /wiki/index.php/MediaWiki:Common.css

    also Imagery is having the same problem even though the Images do exist?

    when clicking on the image within a Page we get the following 404s

    e.g.

    https://huddletalk.wpengine.com/wiki/index.php/File:Management_Patterns.jpeg

    https://huddletalk.wpengine.com/wiki/index.php/File:Execution_Patterns.jpeg

    ScreenShot of Common.js here:

    http://prntscr.com/jwsml7

    Any Advice on what we may need to do, would be greatly appreciated

    Kind Regards Esconfs (talk) 15:53, 19 June 2018 (UTC)

    Might be incorrect script path or script name or...? See Manual:LocalSettings.php#Standard settings Malyacko (talk) 08:26, 20 June 2018 (UTC)

    TOC Collapsed Initial State?

    This method is said to no longer work since 1.29.

    This page explains how to set the initial state of a custom element. But the TOC is part of core, not custom.

    This works, but wondering if there's a recommended way to set initial collapsed state

    #toc > ul{display:none;}
    

    Ideally, i want the TOC to remember the user's preference. CSS would break that. Johnywhy (talk) 18:31, 19 June 2018 (UTC)

    Wikipedia stolen

    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 found a copy-cat website that is literally a wikipedia browser but with ads. Surely this is a copyright infringement or something, right? https://wikivisually.com 131.170.239.13 (talk) 00:50, 20 June 2018 (UTC)

    Welcome to MediaWiki.org. MediaWiki is not Wikipedia, see Differences between Wikipedia, Wikimedia, MediaWiki, and wiki. Feel free to discuss at https://en.wikipedia.org/wiki/Wikipedia:Mirrors_and_forks instead and also see https://en.wikipedia.org/wiki/Wikipedia:Mirrors_and_forks/Vwxyz#Wikivisually Malyacko (talk) 08:12, 20 June 2018 (UTC)
    The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

    Why Logged-In Admin Style Differs From Non-admin or Non-logged-in Style?

    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.


    All the CSS is in Common.css. Yet some of it seems to work only when logged in. This is the CSS in question:
    h2 > span { margin-top: 50px }
    
    h3 > span { margin-top: 40px }
    
    This page:

    https://gunretort.xyz/index.php/Portal:Welcome Johnywhy (talk) 07:25, 20 June 2018 (UTC)

    We don't know because we cannot log in to compare. Malyacko (talk) 08:23, 20 June 2018 (UTC)
    Plus see your thread "Can't Style .mw-headline Top?". Your h2 is also .mw-headline. Malyacko (talk) 08:27, 20 June 2018 (UTC)
    I created a test account, and i see that it looks same for a logged in non-admin as for a non-logged-in visitor. Both do not get certain CSS that a logged in Admin gets.
    Here's the only CSS related to h's and .mw-headline:
    .mw-headline{ font-family:Trebuchet MS }
    h2>span{ margin-top: 50px }
    h3>span{ margin-top: 40px }
    
    View CSS here:
    https://gunretort.xyz/index.php/MediaWiki:Common.css
    ===How it looks:===
    Logged-In Admin:
    Logged-In Non-Admin
    Not Logged-In
    Johnywhy (talk) 12:48, 20 June 2018 (UTC)
    Press Ctrl+Shift+C, which will open the select tool in browser developer tools. Use this tool to select the specific element on the page and view the CSS rules associated with that element.
    Try to see where the difference comes up between the different versions.
    BTW, have you tried the CSS rules I mentioned before, those appear to be working the same, for both admin and non-admin users. AhmadF.Cheema (talk) 18:21, 20 June 2018 (UTC)
    "CSS rules I mentioned...appear to be working the same, for both admin and non-admin"
    You mean <h2>span{ margin-top: 50px }? Yes, that's the CSS i shared above. That's specificially the CSS which is not working the same for admins and non-admins, as pics above show. Johnywhy (talk) 18:38, 20 June 2018 (UTC)
    No, I meant:
    #mw-content-text > div > h2,
    #mw-content-text > div > h3, 
    #mw-content-text > div > h4 {
        margin-top: 30px;
    }
    
    Or in this context:
    #mw-content-text > div > h2 {
        margin-top: 50px;
    }
    #mw-content-text > div > h3 {
        margin-top: 40px;
    }
    
    AhmadF.Cheema (talk) 19:41, 20 June 2018 (UTC)
    bingo, that gives same style for all. thx! Johnywhy (talk) 19:51, 20 June 2018 (UTC)
    The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

    Hide user IP address in anonymous editing

    Using Manual:Hooks/HtmlPageLinkRendererBegin - can be a solution.

    This may be a repeat question, but I read the answer to similar questions previously asked on Support desk and also read the MediaWiki manual - couldn't find the solution I was looking for.

    Is there any method to hide the IP address of the users from everyone except the administrators (or if required hide from the administrators too) in a website running on MediaWiki software while still letting users participate anonymously?

    Okay, so let me break it down -

    1. I am talking about any website running on MediaWiki software - and not only the mediawiki.org website.
    2. The anonymous editing is enabled - $wgGroupPermissions['*']['edit'] = true;
    3. Usually the "Recent changes", edit history shows the IP address of the editor when not logged in. This is where the problem is.

    Clearly, this is not what it means by anonymous editing, because the user have to give away the IP info publicly.

    So, I was thinking if there is a way to show a fixed username to all editor who are participating while not logged in - e.g. showing "Anonymous editor" or "Not logged in user" in place of their IP address. While at the same time it may allow the system to log the IP address (so that the admin can view and if required block a particular IP address). The thing is just not to make the IP available publicly.

    When I searched the previous threads the commonly suggested answers were -

    1. Disable anonymous contribution
    2. Delete the history altogether
    3. The $wgShowIPinHeader solution - which is not available in recent MediaWiki releases.

    Is there any way to do this? Biologically (talk) 07:38, 20 June 2018 (UTC)

    You may be able to do something by hooking HtmlPageLinkRendererBegin, when you detect the link is to an IP. Ciencia Al Poder (talk) 09:16, 21 June 2018 (UTC)
    is there an update on a good way to remove ip addresses from appearing for anonymous users? The HtmlPageLinkRenderedBegin page doesn't explain how it is possible to do this.
    Some medical wikis have users that are at threat from conspiracy theorists so it would be safer to allow them to edit anonymously without their ip addresses from showing up Mediabobedit (talk) 21:39, 15 August 2023 (UTC)
    Just to be clear this will hide it somewhat but not fully. If your users are facing threats of violence i would suggest going further than that or maybe just requiring people to create accounts. Bawolff (talk) 02:15, 16 August 2023 (UTC)
    I couldnt understand how to do it from that link as it doesn't have any instructions. Is there any page that explains it? Mediabobedit (talk) 06:37, 20 August 2023 (UTC)
    Add the following to LocalSettings.php.
    $wgHooks['HtmlPageLinkRendererBegin'][] = function ( $linkRenderer, $target, &$text, &$extraAttribs, &$query, &$ret ) {
    	if ( !defined( "MW_NO_SESSION" ) && RequestContext::getMain()->getUser()->isRegistered() ) {
    		return;
    	}
    	if (
    		( ( $target->getNamespace() === NS_USER ||
    		$target->getNamespace() === NS_USER_TALK ) &&
    		\Wikimedia\IPUtils::isValid( $target->getDBkey() ) ) || (
    		$target->getNamespace() === NS_SPECIAL &&
    		strpos( $target->getDBkey(), '/' ) !== false &&
    		\Wikimedia\IPUtils::isValid( substr( $target->getDBkey(), strpos( $target->getDBkey(), '/' ) + 1 ) ) )
    	) {
    		// Does not redact links to subpages.
    		$originalText = HTMLArmor::getHtml( $text );
    		$originalText = str_replace( [ '<bdi>', '</bdi>' ], [ '', '' ], $originalText ); 
    		if ( \Wikimedia\IPUtils::isValid( $originalText ) ) {
    			$text = "Anonymous user";
    		}
    		$ret = HTMLArmor::getHtml( $text );
    		return false;
    	}
    };
    
    PLEASE NOTE: This only obfuscates in a couple places. The IP address will still be visible in a bunch of places, such as the API or if you hit the undo link in the edit summary. Probably a bunch more. Use with caution. You may want to look into IP masking project whenever that is finished. Bawolff (talk) 13:12, 21 August 2023 (UTC)
    Got it. I shall try to do as you suggested. Thank you. Biologically (talk) 07:01, 22 June 2018 (UTC)

    Custom skin, user settings pages are displayed with default skin

    My wiki runs with a custom skin based on Vector (this means there's custom CSS code in the MediaWiki:Vector.css system page), but the user settings pages are still displayed using the default Vector theme instead of the customized one. What's the reason for that? Neither my own user:Vector.css nor my user:Common.css pages exist. Sturmjäger (talk) 10:20, 20 June 2018 (UTC)

    See the manual: Manual:CSS#Styles not working on Special:UserLogin or Special:Preferences? Malyacko (talk) 08:40, 21 June 2018 (UTC)

    Auth_remoteuser and wgAuth

    Hi ,

    We are trying to move from Wiki 1.15.0 to 1.31 .

    We have seen lot of changed that needs to be made to the localsettings.php file .

    One such place we see is on the authjentication part

    In our Old wiki version we have this -

    require_once('extensions/Auth_remoteuser.php');

    $wgAuth = new Auth_remoteuser(); ( Deprecated from 1.26 )

    Corressponding httpd.conf is like this

    <Location /wiki>

    AuthType SSPI

    AuthName "Company Internal Wiki - Login using your DOMAIN username and password"

    Require valid-user

    SSPIAuth On

    SSPIAuthoritative On

    # replace the IP address below with the IP of your domain controller:

    SSPIDomain 10.30.54.14

    SSPIOmitDomain On

    SSPIOfferBasic On

    SSPIBasicPreferred On

    SSPIofferSSPI On

    </Location>

    Please suggest us a way in which we can do this in our new system 131.165.63.132 (talk) 10:20, 20 June 2018 (UTC)

    Access Restriction basis Categories

    Hi,

    I have created some categories in media Wiki. I have users who should have access to view data of only one category of the set. Can you pls help in how do I attain this restriction.

    Thanks in advance! Sneha.1812 (talk) 11:35, 20 June 2018 (UTC)

    First be advised that MediaWiki was not designed for per-page access restriction, so any solution is likely going to have some loopholes. In case the data to be kept private is not too sensitive, see Project:Support desk/Flow/2017/09#h-Extension:Restrict_access_by_category_and_group-2017-09-25T19:36:00.000Z. AhmadF.Cheema (talk) 18:26, 20 June 2018 (UTC)

    Updating mediawiki through C# code

    We tried to update mediawiki site which we created for our project through code using the DotNetWikiBotFramework but we are getting error "this action has been canceled as a precaution against session hijacking.Go back to the previous page, reload that page and then try again."

    any help on this will be appriciated.

    Thanks

    Sagar V 2405:204:920A:F410:4B0:B7FD:B63F:8D3F (talk) 12:40, 20 June 2018 (UTC)

    Hard to help without more info how you "update" exactly... Malyacko (talk) 08:39, 21 June 2018 (UTC)
    Latest version is from February 2016 https://sourceforge.net/p/dotnetwikibot/svn/HEAD/tree/
    Maybe it's no longer compatible with recent MediaWiki versions. Ciencia Al Poder (talk) 09:21, 21 June 2018 (UTC)

    Exception encountered, of type "Error" [b0e71d8cb299650e8368cc76] /mediawiki/index.php?title=Special:Html2Wiki&action=submit Error from line 4617 of /usr/share/mediawiki/languages/Language.php: Using $this when not in object context

    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 encountering this exception when trying to use the Html2Wiki extension to import a plaintext html file. I have the rest of the Backtrace here:

    Backtrace:

    #0 /var/lib/mediawiki/extensions/Html2Wiki/specials/SpecialHtml2Wiki.php(814): Language::formatSize(integer)

    #1 /var/lib/mediawiki/extensions/Html2Wiki/specials/SpecialHtml2Wiki.php(857): SpecialHtml2Wiki->formatValue(integer)

    #2 /var/lib/mediawiki/extensions/Html2Wiki/specials/SpecialHtml2Wiki.php(964): SpecialHtml2Wiki->addFileToResults()

    #3 /var/lib/mediawiki/extensions/Html2Wiki/specials/SpecialHtml2Wiki.php(655): SpecialHtml2Wiki->processFile()

    #4 /var/lib/mediawiki/extensions/Html2Wiki/specials/SpecialHtml2Wiki.php(519): SpecialHtml2Wiki->doUpload()

    #5 /var/lib/mediawiki/extensions/Html2Wiki/specials/SpecialHtml2Wiki.php(220): SpecialHtml2Wiki->doImport()

    #6 /usr/share/mediawiki/includes/specialpage/SpecialPage.php(479): SpecialHtml2Wiki->execute(NULL)

    #7 /usr/share/mediawiki/includes/specialpage/SpecialPageFactory.php(577): SpecialPage->run(NULL)

    #8 /usr/share/mediawiki/includes/MediaWiki.php(282): SpecialPageFactory::executePath(Title, RequestContext)

    #9 /usr/share/mediawiki/includes/MediaWiki.php(735): MediaWiki->performRequest()

    #10 /usr/share/mediawiki/includes/MediaWiki.php(509): MediaWiki->main()

    #11 /usr/share/mediawiki/index.php(43): MediaWiki->run()

    #12 {main}

    What can I do to resolve this issue? P.R.S.D.T.D. (talk) 14:57, 20 June 2018 (UTC)

    Please ensure that Html2Wiki extension version matches MW core version. 星耀晨曦 (talk) 17:09, 20 June 2018 (UTC)
    I upgraded everything to 1.31, same error different line:
    [e51f192c19e9217fef6b5ed5] /mediawiki/index.php?title=Special:Html2Wiki&action=submit Error from line 4829 of /var/lib/mediawiki/languages/Language.php: Using $this when not in object context
    Backtrace:
    #0 /var/lib/mediawiki/extensions/Html2Wiki/specials/SpecialHtml2Wiki.php(814): Language::formatSize(integer)
    #1 /var/lib/mediawiki/extensions/Html2Wiki/specials/SpecialHtml2Wiki.php(857): SpecialHtml2Wiki->formatValue(integer)
    #2 /var/lib/mediawiki/extensions/Html2Wiki/specials/SpecialHtml2Wiki.php(964): SpecialHtml2Wiki->addFileToResults()
    #3 /var/lib/mediawiki/extensions/Html2Wiki/specials/SpecialHtml2Wiki.php(655): SpecialHtml2Wiki->processFile()
    #4 /var/lib/mediawiki/extensions/Html2Wiki/specials/SpecialHtml2Wiki.php(519): SpecialHtml2Wiki->doUpload()
    #5 /var/lib/mediawiki/extensions/Html2Wiki/specials/SpecialHtml2Wiki.php(220): SpecialHtml2Wiki->doImport()
    #6 /var/lib/mediawiki/includes/specialpage/SpecialPage.php(522): SpecialHtml2Wiki->execute(NULL)
    #7 /var/lib/mediawiki/includes/specialpage/SpecialPageFactory.php(568): SpecialPage->run(NULL)
    #8 /var/lib/mediawiki/includes/MediaWiki.php(288): SpecialPageFactory::executePath(Title, RequestContext)
    #9 /var/lib/mediawiki/includes/MediaWiki.php(861): MediaWiki->performRequest()
    #10 /var/lib/mediawiki/includes/MediaWiki.php(524): MediaWiki->main()
    #11 /var/lib/mediawiki/index.php(42): MediaWiki->run()
    #12 {main} P.R.S.D.T.D. (talk) 18:10, 20 June 2018 (UTC)
    Is there some other element I am missing? P.R.S.D.T.D. (talk) 19:58, 20 June 2018 (UTC)
    Did you also upgraded Html2Wiki as well? If you've also done that, the extension may not be compatible yet with the latest MediaWiki version. Ciencia Al Poder (talk) 09:10, 21 June 2018 (UTC)
    Mediawiki is on 1.31, HTML2wiki has a package for 1.31 which I have installed as well. These together are producing this error. I have updated all dependencies and packages to the best of my abilities in an attempt to resolve this error but have come up empty. P.R.S.D.T.D. (talk) 12:41, 21 June 2018 (UTC)
    If anyone has any more insight into this issue that would be awesome. P.R.S.D.T.D. (talk) 12:52, 25 June 2018 (UTC)
    Try to post on the talk page of the Html2Wiki extension, and/or open a bug about this. Ciencia Al Poder (talk) 19:26, 25 June 2018 (UTC)
    Where might I find a link to their talk page? P.R.S.D.T.D. (talk) 11:51, 26 June 2018 (UTC)
    Extension talk:Html2Wiki. Take note of the first two lines on that page too. AhmadF.Cheema (talk) 14:00, 26 June 2018 (UTC)
    Same error here with MediaWiki 1.31 and Html2Wiki up to date.
    I managed getting rid of it by editing line 814 in /path_to_my_wiki/extensions/Html2Wiki/specials/SpecialHtml2Wiki.php
    I commented out the faulty line and replaced it as bellow :
    //        return htmlspecialchars( $this->getLanguage()->formatSize( Language::formatSize( $value ) ) );
       return htmlspecialchars( $this->getLanguage()->formatSize( $value ) );</nowiki>
    
    Html2Wiki is now working fine.
    Just for the record, as mentioned in the error message, the "formatsize" function is defined into /path_to_my_wiki/languages/Language.php from line 4828 to 4830 :
    function formatSize( $size ) {</code> return $this->formatComputingNumbers( $size, 1024, "size-$1bytes" ); }
    Hope this helps. Kifit (talk) 16:45, 17 August 2018 (UTC)
    The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

    Implementing domain login with Wiki 1.31.0

    Hi ,

    We are trying to implement AD Integrated logons for our Wiki Website .

    Please let us know the steps and necessary procedures to accomplish it .

    We are running Mediawiki 1.31.0 .

    Regards 131.165.63.132 (talk) 15:51, 20 June 2018 (UTC)

    See Project:Support desk/Flow/2017/11#h-What_approach_to_use_for_Active_Directory_login?-2017-11-15T19:00:00.000Z Malyacko (talk) 08:39, 21 June 2018 (UTC)

    Searchindex table in wrong language

    Hi,

    Looking for some help as I feel I have exhausted my hunting skills and found no answer to my problem. I have stood up a new site using MediaWiki 1.27 LTS on Windows server 2016 with MSSQL, IIS7 and PHP 7.2.5 CGI. The site is mostly operational with a few issues, but the biggest obstacle is that the search feature is not returning any results unless you specify an exact page name in full. In digging into this issue I have tracked it as far as the SQL table the search query is hitting with a full text search statement, but the table values for title and text are stored in what looks like Chinese rather than English. I've looked through all the settings for language I can find in both my LocalSettings.php and php.ini files and everything configurable is set to "en". I have also run the rebuildtextindex and rebuildall maintenance scripts successfully but still have this problem. There are 4 users of this site all with either English selected as their preferred language or no preference selected and all of the content built to date is in English as well. I'm out of ideas on where to look and would appreciate some help.

    Thanks,

    Stephen Sb61408 (talk) 16:13, 20 June 2018 (UTC)

    See "MSSQL: Fulltext search doesn’t work" 90.187.68.5 (talk) 13:18, 16 July 2018 (UTC)
    That link has no solution and states that "We don't really support MSSQL" which is not what the [Manual:Installation requirements#Database server] page states. I am using the LTS release specifically so that I can use MSSQL. Sb61408 (talk) 17:52, 23 July 2018 (UTC)
    As a work around I created a trigger on this table that seems to work, although it is ugly:
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    -- =============================================
    -- Author:  Stephen Bradley
    -- Create date: 6/21/2018
    -- Description: Band-aide to get the searchindex table results in English not some double byte language
    -- =============================================
    CREATE TRIGGER [dbo].[trg_searchindex_A_IUP]
    ON [dbo].[searchindex]
    AFTER INSERT, UPDATE
    AS
     BEGIN
      SET NOCOUNT ON;
      UPDATE [searchindex]
      SET    [si_title] = [p].[page_title]
        , [si_text] = [t].[old_text]
      FROM   [inserted] [i]
          INNER JOIN [page] [p]
           ON [i].[si_page] = [p].[page_id]
          INNER JOIN [revision] [r]
           ON [p].[page_latest] = [r].[rev_id]
          INNER JOIN [text] [t]
           ON [r].[rev_text_id] = [t].[old_id]
      WHERE  [searchindex].[si_page] = [i].[si_page]
     END
    GO
    ALTER TABLE [dbo].[searchindex] ENABLE TRIGGER [trg_searchindex_A_IUP]
    GO
    
    Sb61408 (talk) 17:57, 23 July 2018 (UTC)
    https://phabricator.wikimedia.org/T166133 Also mentions this. In the code it mentions the "chinese" is expected, but in the end it doesnt work.
    Code Fix:
    D:\Websites\wiki\includes\search\SearchMssql.php (line:187) update()
    Comment this line:
    //$sql .= "INSERT INTO $table (si_page, si_title, si_text) VALUES ($id, $si_title, $si_text)";
    Add:
    $text = str_replace('\'', '', $text); //remove apostrophes
    $sql .= "INSERT INTO $table (si_page, si_title, si_text) VALUES ($id, '" . $title . "', '" . $text . "')";
    Should probably fix this too:
    D:\Websites\wiki\includes\search\SearchMssql.php (line:208) updateTitle()
    Comment this line:
    //$sql .= "INSERT INTO $table (si_page, si_title, si_text) VALUES ($id, $si_title, 0x00)";
    Add:
    $sql .= "INSERT INTO $table (si_page, si_title, si_text) VALUES ($id, '" . $title . "', 0x00)";
    Run this to fix index after making code change:
    "C:\Program Files\PHP\php.exe" rebuildtextindex.php Kevin71246 (talk) 06:55, 10 April 2019 (UTC)
    Actually I couldnt run the rebuildtextindex at first, but here was the fix: (SQL Script)
    update revision set rev_page=1 where rev_page=0 --was 0 Kevin71246 (talk) 06:56, 10 April 2019 (UTC)

    How to check if rollback succeeded?

    Hello, I want to rollback a page using JavaScript. for that, I use the following syntax:

    new mw.Api().postWithToken('rollback', {
       action: 'rollback',
       title: 'pageName',
       user: 'userName'
    });
    

    If the rollback has not succeeded (e.g., if the user does not have the necessary right), I would like to display an error message. How can I check if the rollback has been succeeded? Guycn2 (talk) 20:19, 20 June 2018 (UTC)

    You'll need to look at the returned parameters and possible errors in API:Rollback#Returned_fields. Ciencia Al Poder (talk) 09:08, 21 June 2018 (UTC)
    @Ciencia Al Poder: Thank you, but I didn't understand how can I get the returned parameters using JavaScript. I tried the following:
    new mw.Api().postWithToken('rollback', {
        action: 'rollback',
        title: 'pageName',
        user: 'userName'
    }).then(function (data) {
        if (data && data.error) {
            alert( data.error[info] );
        }
    });
    
    If the rollback fails, I expect to see an alert box with the error message; however, nothing happens... Guycn2 (talk) 19:21, 21 June 2018 (UTC)
    According to the documentation, you should use .done()
    Try to add console.log( data ); and see the console output for the details Ciencia Al Poder (talk) 19:47, 21 June 2018 (UTC)
    Thanks, I've succeeded! Guycn2 (talk) 21:50, 21 June 2018 (UTC)

    slideshare

    Hello, I want to embed a slideshare document. For that, I use Slideshare12 extension. I have one mediawiki where it works, and one another that don't works. Is there another solution that works all the time?

    Regards, Fabrice 2A01:E35:8B4F:8840:FDF1:532E:2692:5AF3 (talk) 20:59, 20 June 2018 (UTC)

    Which exact MediaWiki versions and extension versions are used on both wikis? Malyacko (talk) 08:38, 21 June 2018 (UTC)
    Thanks for the help!
    I think there is only one version of the Slideshare2012 extension : Extension:SlideShare2012
    The Mediawiki version which works is 1.31.0 : http://www.wikipratiquesnarratives.fr/index.php?title=Sp%C3%A9cial:Version
    The Mediawiki version which doesn't work is 1.30.0 : https://wikiagile.cesi.fr/index.php?title=Sp%C3%A9cial:Version
    Regards, Fabrice Faimetti (talk) 13:02, 21 June 2018 (UTC)
    Any help? Faimetti (talk) 13:12, 25 June 2018 (UTC)

    Seems when i hide TOC, headlines reposition correctly, but body text doesn't reposition correctly. But if i click a link in the body, text repositions itself on the click. Which is of course very disruptive-- click a link and the body text moves around!? Plus, the click fails-- you don't go to the link.


    Before collapsing, headline and body wrap around the TOC:


    After collapse, headline moved, but body-text didn't:


    After clicking link in body, body-text moved to right place:

    This vid shows that body text repositions correctly only after changing window size-- which doesn't make sense.

    http://pc.cd/TJIctalK

    Theory: My custom CSS creates taller margin-top for headlines. Maybe the core TOC code that forces text to reposition is confused by that?

    MW v1.30

    Chrome v67 Johnywhy (talk) 21:04, 20 June 2018 (UTC)

    A bus from Eupen to Eupen

    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.


    On a search for a bus from Signaal van Botrange to Bourheim, I came on the site:

    http://wiki.ovinnederland.nl/wiki/Lijn_710_Eupen_Bushof_-_Kelmis_B.B.L.

    And there stood it right in front of me:

    Lijn 710 rijdt van Eupen via ... naar Eupen.

    I think the last place has to be Kelmis_B.B.L.

    No hard feelings, the site is really ok.

    Gijsbert 143.176.191.196 (talk) 06:18, 21 June 2018 (UTC)

    Welcome to the support desk for the free MediaWiki software. ovinnederland.nl uses the MediaWiki software. If you want to discuss content on ovinnederland.nl you need to contact ovinnederland.nl instead. Malyacko (talk) 08:37, 21 June 2018 (UTC)
    The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

    Failed attempt to update from v.1.26.2 to 1.31.0

    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 MediaWiki installation that is currently on version 1.26 - https://www.informationtamers.com/WikIT/

    The present version has been running on php5.6, but I have now changed to php7.1.16 and it works on that as well.

    I want to update the installation to 1.31 but after trying various methods I can't get the update to do anything.

    What I have done is this:

    1. made full backups of the /WikIT/ directory and MySQL database

    2. downloaded mediawiki-1.31.0.tar.gz

    3. uploaded it to the server and expanded it in a temporary directory

    4. emptied the WikIT directory except for /images and LocalSettings.php

    (there are some skin customizations, but I'll apply those later once I've got the update done and working)

    5. copied all files from /mediawiki-1.31.0 to /WikIT excluding the /images directory

    6. changed the extension references in LocalSettings.php from

    require_once( $IP.'/extensions/Cite/Cite.php' );

    format to

    wfLoadExtension( 'Cite' );

    I use

    wfLoadExtension( 'Cite' );

    wfLoadExtension( 'ImageMap' );

    wfLoadExtension( 'PageNotice' );

    wfLoadExtension( 'HeadScript' );

    7. download latest .gz files for PageNotice and HeadScript and expand them in /extensions

    8. I try to update in PuTTY, using

    WikIT/maintenance/php7.cli update.php

    but this immediately returns to the prompt with no sign of anything happening, and

    https://www.informationtamers.com/WikIT/ shows "This page isn’t working

    www.informationtamers.com is currently unable to handle this request.

    HTTP ERROR 500"

    9. I then try the web update. To ensure I have a clean database, I copy that from backup again.

    10. I clear the cache (using CacheKiller)

    11. Open https://www.informationtamers.com/WikIT/mw-config/index.php

    This shows HTTP ERROR 500 again.

    12. Then I restored the site to version 1.26

    the server's php-errors log has many lines like this:

    [21-Jun-2018 04:42:49 America/New_York] PHP Warning:  Parameter 1 to HeadScript() expected to be a reference, value given in /home/informat/www/www/WikIT/includes/Hooks.php on line 201

    [21-Jun-2018 04:42:49 America/New_York] PHP Warning:  Parameter 1 to Cite::clearState() expected to be a reference, value given in /home/informat/www/www/WikIT/includes/Hooks.php on line 201

    [21-Jun-2018 04:42:49 America/New_York] PHP Warning:  Parameter 1 to Cite::clearState() expected to be a reference, value given in /home/informat/www/www/WikIT/includes/Hooks.php on line 201

    [21-Jun-2018 04:42:49 America/New_York] PHP Warning:  Parameter 2 to Cite::checkRefsNoReferences() expected to be a reference, value given in /home/informat/www/www/WikIT/includes/Hooks.php on line 201

    [21-Jun-2018 04:42:49 America/New_York] PHP Warning:  Parameter 2 to Cite::checkRefsNoReferences() expected to be a reference, value given in /home/informat/www/www/WikIT/includes/Hooks.php on line 201

    [21-Jun-2018 04:42:49 America/New_York] PHP Warning:  Parameter 1 to Cite::clearState() expected to be a reference, value given in /home/informat/www/www/WikIT/includes/Hooks.php on line 201

    These are produced by the live, working version 1.26

    13. Just out of interest, I tried doing update.php with v1.26 and it produced a 206-line report on the console with no errors.  Of course it did not make any changes, and the site still works.

    14. Finally, I should mention that I also tried to update to v1.27.4 with the same result.

    Any suggestions on what I might check to see where it's going wrong?

    Thanks Roygrubb (talk) 09:12, 21 June 2018 (UTC)

    Just to close this item down:
    I installed a fresh v.1.31, exported all pages from the 1.26 wiki, imported them to the new installation, then imported images from the old wiki, and made the customisation. Also took the opportunity to convert from Monobook to Vector.
    This was not entirely trouble-free as image importing left out about 100 images at random - they were present in v.1.26. They were shown as red links so I had to add them manually, one by one . Roygrubb (talk) 16:52, 28 June 2018 (UTC)
    Hi Roygrubb,
    I wanted to know if you could find a solution to your problem here.
    I have exactly the same issue: Old version in 1.26, with php5, I changed for php7, the old version working well, then I uploaded the version 1.31, copied /images and LocalSettings.php from the old version, and then I get an error 500.
    I've tried to run update from using ssh but i got exactly the same behavior than you: 1 second of nothing, then prompt again.
    I could reach mw-config, but then going to mw-config/?page=ExistingWiki gave me straight an error 500
    Now I get the error 500 even when reaching mw-config.
    Please let me know if you could resolve your issue!
    Thanks. Guiwald (talk) 17:28, 3 November 2018 (UTC)
    The 500 Internal Server Error, can be due to a problem with the permissions, incompatible extensions, or syntax error in LocalSettings.php.
    Check the server error logs, and insert the following in your LocalSettings.php file:
    $wgShowExceptionDetails = true;
    $wgDevelopmentWarnings = true; error_reporting( -1 ); ini_set( 'display_errors', 1);
    
    For details, see Manual:How to debug. AhmadF.Cheema (talk) 20:34, 3 November 2018 (UTC)
    Hi @AhmadF.Cheema,
    For information, I found what was the issue: It was related to the extensions that were not compatible with the new version of the wiki.
    Thank you for your help! Guiwald (talk) 16:56, 8 November 2018 (UTC)
    The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

    Wikidump and latest

    Hi, we are downloading wiki dump from https://dumps.wikimedia.org/cswiki/latest/, and checking if files are up to date using https://dumps.wikimedia.org/cswiki/latest/cswiki-latest-sha1sums.txt. Now (21.6.2018 12:54) is possible to see, that wikidump data are updating. But it is doing on the fly, and at the link /latest are both old and new data, but in file cswiki-latest-sha1sums.txt are only new files.

    So is it possible to make link /latest AFTER data dump is done ? Or is it possible to move https://dumps.wikimedia.org/cswiki/20180620/dumpstatus.json to pernament link for example https://dumps.wikimedia.org/cswiki/latest/dumpstatus.json, then i can check, if build is done and i can download dump.

    Thank you

    Roman 2A02:598:7001:102:C8E:15F5:AB2B:35A5 (talk) 11:09, 21 June 2018 (UTC)

    How to stretch the HTML <body> to the page bottom?

    I'm currently re-skinning my wiki and want both the main navigation and the page content to be seperated from the background image as "one unit", ie having the same background color and matching borders/box-shadows, so that it looks like one page and not like here in the default Vector, where the main menu is completely seperate on the left side.

    To do this I first tried to give both the content and the navigation the same background-color, but the problem was that I couldn't stretch the main navigation div all the way down to the bottom/footer. I tried several stuff, including the display:flex property, but nothing worked out.

    Then, I tried assigning the backgorund-image to html and the background-color and a reduced width to the body:

    html {
    background-image:url('https://domain.tld/background.jpg');
    background-size:cover;
    background-attachment:fixed;
    }
    body {
        background-color: #fdfdfd;
        width: 85%;
        margin-left: auto;
        margin-right: auto;
        box-shadow: 10px 0 10px -10px rgba(0,0,0,0.30), -10px 0 10px -10px rgba(0,0,0,0.30);
    margin-top:2em;
    }
    

    However, now the body doesn't go all the way down to the bottom, as you can see here: https://abload.de/img/mediawikic0sb5.png

    What's the problem there? How to stretch the body to the bottom? Sturmjäger (talk) 11:12, 21 June 2018 (UTC)

    You should be able to stretch the element by giving it a height, e.g. height: 100%;. You can use the developer tools of your webbrowser to directly see the change in rendering so that you immediately know, if what you did had the intended effect. 87.123.197.0 (talk) 22:25, 24 June 2018 (UTC)

    Extension Devs: Don't Say "bottom of localsettings.php"

    the phrase "put the declaration at the bottom of localsettings.php" is very UNhelpful, since MANY extensions say the same thing!

    It's more useful to explain exactly which declares must come before the extension, such as protections, etc. Example here under Important

    Or, if it doesn't matter, simply say "below the default settings". Johnywhy (talk) 19:38, 21 June 2018 (UTC)

    Developers, especially unexperienced developers often add duplicate code to LocalSettings.php. That is one of the reasons for saying "put it at the end". Then at least the newest lines are getting used. 2001:16B8:1020:6600:7C54:5D89:66FF:4271 (talk) 20:11, 21 June 2018 (UTC)
    that only works until some new declaration is placed under the last one, breaking the previous one. So, doesn't really make sense. Johnywhy (talk) 20:22, 21 June 2018 (UTC)
    Yeah, I think this is a good point!
    There aren't that many extensions that care too much where they get enabled in LocalSettings. The normal case should basically be that they can be enabled wherever, and those for which it does matter should get extra documentation.
    (Maybe worth posting a note to mediawiki-l?) Sam Wilson 04:42, 22 June 2018 (UTC)

    Missing Default "Project" Namespace?

    i noticed my wiki v1.30 didn't seem to contain a "Project" namespace. So i created one, in localsettings.php, using same index nums as mediawiki.org. Manual:Namespace_constants

    # PROJECT NAMESPACE
    define("NS_PROJECT", 4); 
    $wgExtraNamespaces[NS_PROJECT] = "Project";
    define("NS_PROJECT_TALK", 5); 
    $wgExtraNamespaces[NS_PROJECT_TALK] = "Project_Talk"; 
    

    But, i just discovered:

    all wikis have a "Project:" namespace, but the actual namespace name is normally changed to the name of the wiki (on Wikipedia for example, the "Project:" namespace is "Wikipedia:")"

    API:Siteinfo#Namespaces

    and i noticed the default localsettings.php contains:

    $wgMetaNamespace = 'Project';
    
    • Has my custom "Project" namespace broken anything?
    • If i remove my custom namespace declaration, will my pages with "Project:" prefix still load and work correctly? Should i change their prefix to my wiki-name? Currently, if i substitute MyWikiName for Project prefix, i get "page doesn't exist". Johnywhy (talk) 20:11, 21 June 2018 (UTC)

    "Change Protection" Tab Vs. wgNamespaceProtection?

    Do settings on "Change Protection" Tab override wgNamespaceProtection? Johnywhy (talk) 21:42, 21 June 2018 (UTC)

    Booty error

    I am attempting to upgrade from 1.23 to 1.30. I get this error: Fatal error: Class 'SkinSkinny' not found in ...skins/Booty/base/Skin.php on line 6

    Can anyone guide me on how to debug this? 71.163.111.232 (talk) 06:14, 22 June 2018 (UTC)

    Import crashing adding the npc file

    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've spent hours and hours tring to import the npc file to finish my follower and all it does is crash and wont load it. I made it in skyrim, exported it using spf built it all up and all that is left is import the character I made.

    I'm so discouraged wanted to make several male followers for my game and can't even do the first one...please help, thank you. 172.56.7.129 (talk) 06:45, 22 June 2018 (UTC)

    Wrong support forum. AhmadF.Cheema (talk) 06:58, 22 June 2018 (UTC)
    The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

    Assistance request for mobile interface

    A recent twitter post pointed out that this template (and some of the templates it transcludes, e.g. this) currently renders poorly in phone screens (example):

    1. menu tabs should stack vertically on narrow screens
    2. all menu tabs should be collapsed by default in the mobile view (like a heading2 section)
    3. div with article text should reflow underneath the infobox section
    4. the infobox should also collapse like a heading_2 section

    Any ideas on how to fix these (or a suggestion of who else I could pester) would be v. helpful. I'll start addressing point 1 this weekend, but I'm not certain how to implement the others.

    If there's any magicword (equivalent of {{SERVERNAME}}) that could be used to detect whether the mobile version of the site is being viewed, I could at least use some if functions to display differently:

    {{#ifeq:{{SERVERNAME}}|{{MOBILESERVERNAME}}|...}}

    Thanks in advance! T.Shafee(EvoEvo)talk 07:10, 22 June 2018 (UTC)

    Don't know of a magic word, but for hiding content from mobile view, you can use the nomobile class:
    <div class="nomobile">
    This text will not show in mobile format.
    </div>
    
    AhmadF.Cheema (talk) 10:13, 22 June 2018 (UTC)
    fantastic! Is there an opposite mobileonly? T.Shafee(EvoEvo)talk 10:40, 22 June 2018 (UTC)
    To apply .CSS rules to work only on the mobile version of the site, set those rules in MediaWiki:Mobile.css. AhmadF.Cheema (talk) 11:03, 22 June 2018 (UTC)
    @Evolution and evolvability Wow, i'm impressed you even got this far.
    Anyway. What you need is more flex box. Checkout this for instance:
    https://m.mediawiki.org/wiki/Wikimedia_Hackathon_2018
    Unfortunately, it seems that wikiversity doesn't support TemplateStyles just yet, so you might have to put some extra rules in MediaWiki:Mobile.css indeed. —TheDJ (Not WMF) (talkcontribs) 11:32, 22 June 2018 (UTC)
    Thank you! your flexbox advice helped me fix point 1, and will probably help (I think) with point 3. Control over collapsing sections (points 2 and 4) are trickier.
    Is there any way to book direct assistance time with a mediawiki expert? T.Shafee(EvoEvo)talk 13:51, 22 June 2018 (UTC)
    I've managed to make some progress on points 2 and 4 using a hidden H2 level heading. This is invisible (height=0) on desktop, but the height seems to be overruled on mobile devices and so
    <h2 style="line-height: 200%;
               margin:      -1px;
               padding:     0px;
               border:      0px; 
               height:      0px">{{{1|}}}</h2>
    
    See in action at https://en.m.wikiversity.org/wiki/WikiJournal_of_Science/Radiocarbon_dating T.Shafee(EvoEvo)talk 06:18, 23 June 2018 (UTC)

    Category list doesn't automatically rebuild imported pages

    I have imported over 50 pages which all have an existing category "Werk" defined.

    But this new pages are not shown in the list of this category, i have run the rebuildall.php script and other scripts but no change

    Any ideas? 2A00:A200:0:810:68:1FFC:53B0:6F45 (talk) 10:03, 22 June 2018 (UTC)

    Have you also run the Job queue? AhmadF.Cheema (talk) 10:09, 22 June 2018 (UTC)
    I run runJobs.php and set $wgJobRunRate = 1, but no success 2A00:A200:0:810:9E:F5AE:C620:6AF2 (talk) 12:36, 22 June 2018 (UTC)
    Any ideas on this? 134.95.94.82 (talk) 13:00, 3 July 2018 (UTC)

    Chasing down an unauthenticated scripts error

    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 trying to get rid of an unauthenticated scripts warning in a Mediawiki site.

    Chrome reports it as coming from a call to load http://toolserver.org/~dapete/ime/ime_loader.js

    If I could find the statement that attempts to load this, I'll just change it to https:, but I've searched the MySQL database and grepped the whole wiki directory for references to "toolserver" or "ime_loader.js" but cannot find any.

    If I load that manually, it redirects to https://tools.wmflabs.org/imagemapedit/ime_loader.js, so I know it is connected to the ImageMap extension.

    Next I removed both the ImageMap extension directory and  require_once("$IP/extensions/ImageMap/ImageMap.php");  from LocalSettings

    After purging the cache, I still see the message.

    I read that some extensions may leave residual entries in the database, so I did an update.php which appeared to run cleanly.

    The same message appears.

    How do I find where this reference is coming from?

    I'm running version 1.26.2 on php 7.1

    I tried to fix this first of all by doing an update to 1.31 and when that failed to 1.27.4, but that also failed.  This is another story, see https://www.mediawiki.org/wiki/Project%3ASupport%20desk/Flow/2018/06#h-Failed_attempt_to_update_from_v.1.26.2_to_1.31.0-2018-06-21T09%3A12%3A00.000Z

    The wiki is at https://www.informationtamers.com/WikIT/

    Any suggestions, please folks? Roygrubb (talk) 15:10, 22 June 2018 (UTC)

    Following the browser report in https://www.informationtamers.com/WikIT/index.php?title=Main_Page&debug=true it comes from https://www.informationtamers.com/WikIT/load.php?debug=true&lang=en&modules=site&only=scripts&skin=monobook&version=8e8809289b5a i.e. the bottom of https://www.informationtamers.com/WikIT/index.php?title=MediaWiki:Monobook.js. (The site module contains Common.js and Skin.js.) Jdforrester (WMF) (talk) 16:05, 22 June 2018 (UTC)
    Wonderful, that did it.
    Thanks very much! Roygrubb (talk) 03:44, 23 June 2018 (UTC)
    The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

    Mass Remove from Category?

    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.


    Any native or extension method to mass remove pages from a category? Johnywhy (talk) 16:03, 22 June 2018 (UTC)

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

    infobox problems

    Hello freinds

    I have set up a wiki on my website and wanted to get a infoboxes.

    After following the necessary steps of the extension installation and importing, I got a script error "Lua error. Unable to create process, proc_open unavailable. Check disable_functions in PHP settings"

    what is the problem ?

    i use MediaWiki 1.30.0 , PHP:5.6

    Thnx a lot 154.242.1.182 (talk) 22:23, 22 June 2018 (UTC)

    As described in the error message, Check disable_functions in PHP settings. Checks disable_functions field in your php.ini. 星耀晨曦 (talk) 11:02, 23 June 2018 (UTC)

    Extension:Translate magic word to get user language

    Hi, is there a simple way with the translate extension installed to get the user’s language in iso 639 ofrmat ? Thank you CreativeC (talk) 22:29, 22 June 2018 (UTC)

    Using special characters for page names in common.css ?

    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.


    Dear,

    I use some code referring to pagenames in common.css :
    body.page-Objets_d\27 hier.action-view h1.firstHeading, body.page-Objets_d\27 hier.action-submit h1.firstHeading { display: none; }
    body.page-Objets_d\27 hier.action-view, body.page-Objets_d\27 hier.action-submit content { background-color: #efefef; }
    
    body.page-Objets_d\'aujourd\'hui.action-view h1.firstHeading, body.page-Objets_d\'aujourd\'hui.action-submit h1.firstHeading { display: none; }
    body.page-Objets_d\'aujourd\'hui.action-view, body.page-Objets_d\'aujourd\'hui.action-submit content { background-color: #efefef; }
    
    body.page-Sur_le_web\.\.\..action-view h1.firstHeading, body.page-Sur_le_web\.\.\..action-submit h1.firstHeading { display: none; }
    body.page-Sur_le_web\.\.\..action-view, body.page-Sur_le_web\.\.\..action-submit content { background-color: #efefef; }
    
    body.page-Pourquoi_le_design_\?.action-view h1.firstHeading, body.page-Pourquoi_le_design_\?.action-submit h1.firstHeading { display: none; }
    body.page-Pourquoi_le_design_\?.action-view, body.page-Pourquoi_le_design_\?.action-submit content { background-color: #efefef; }
    
    
    While the same code works on pages without special characters, it does not work on pages with special characters like '  ? ....

    It seems I'm not escaping correctly. Do you have an idea ? Thibdx (talk) 15:56, 23 June 2018 (UTC)

    Use the developer tools of your browser (hit F12) and inspect the body element of the page. You should see there what's the exact class name it's using. Use that for your CSS rules. Ciencia Al Poder (talk) 09:01, 25 June 2018 (UTC)
    The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

    The own server IP is blocked...

    Dear,

    When I try to connect from anoter browser I got an error message saying (in summary) : You IP xx.xx.xx.xx is bloked because "blockedusername" has used it and is blocked.

    I disabled the option to block IPs from this user. It works now. But I'm very concerned by the fact that my server or mediawiki installation is maybe infected by a malicious script.

    Do you have an idea on how to check this ?

    Regards Thibdx (talk) 16:51, 23 June 2018 (UTC)

    If the blockedusername wasn't you, check if the IP address is yours. You can check from https://whatismyipaddress.com/ or similar and compare with that IP.
    If the IP is not the same, maybe the wiki is behind a proxy, and things all users are connecting through the same IP address (the internal IP of the proxy). If that's the case, you should configure Manual:$wgSquidServersNoPurge. Ciencia Al Poder (talk) 08:55, 25 June 2018 (UTC)

    Lua error: Line 264: attempt to perform arithmetic on local 'a' (a table value).

    I used lua module to make bitwise operators. But it seems to have an error. What should be the error?

    Template: <includeonly><onlyinclude>{{#invoke:Bitwise|band|a = {{{1|1}}}|b = {{{2|1}}}}}</onlyinclude></includeonly>

    Line 264 of module: function M.band(a,b) return ((a+b) - bxor(a,b))/2 end

    return statement: return M 79brue (talk) 03:56, 24 June 2018 (UTC)

    Looks like "a" is a table, and you can't perform a sum of a table. Ciencia Al Poder (talk) 08:59, 25 June 2018 (UTC)

    Pygmentize process getting TimedOut

    Extension talk:SyntaxHighlight/Archive 2018#h-Pygmentize_process_getting_TimedOut-2018-06-22T08:13:00.000Z AhmadF.Cheema (talk) 06:40, 24 June 2018 (UTC)

    No download as PDF

    I'm a beginner using the mediawiki software. I bought a wiki subdomain from 1&1 and this works fine, with rhe exception of downloading a page as PDF.

    Software Version
    MediaWiki 1.28.3
    PHP 5.6.36 (cgi-fcgi)
    MySQL 5.5.60-0+deb7u1-log
    ICU 52.1

    I have loaded the extensions in LocalSettings.php :

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

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

    $wgMpdfTab = false;

    I have also tried htmldoc, but I think it's not intstalled and I think I have no permission to install, because it's the 1&1 server.

    What can I do.

    Thank You!! Altmic 1 (talk) 09:45, 24 June 2018 (UTC)

    Unrelated: Note that 1.28.3 is an old unsupported version with security vulnerabilities. Please consider Manual:Upgrading Malyacko (talk) 09:16, 25 June 2018 (UTC)

    how to backup full wiki

    Hi, I'm using the Mediawiki 1.23.9 software on my German website http://soluschristus.bplaced.net . I don't understand much about all the software and technology. The hoster is www.bplaced.net.
    I would like to know some answers to be able to use the software better. I would be very thankful if someone could add me on skype or facebook, to explain a few things.
    But one important question is, how I am able to make a full backup of my wiki. I have written many articles, and want to be sure, that no way they could be lost. In the MediaWiki special pages, there is the option to export pages, but it's not realistic to take each article one after the other. They are too many.
    I'm regularly downloading a "localhost.sql" file, which is a database exported from my website hoster bplaced.net. And I download sometimes the full folder of my website through FileZilla.
    But still, I am not sure, if this backups are full rescue. When I download the full folder from FileZilla, I'm often asked, if I want to overwrite some files, because there are more than one of them with the same name, but different size (so I'm confused). And I don't know how to test the backups, if it's possible to fully import the data or not - I don't know how.
    I'm a newb. Thanks for help. 2A02:908:CD23:3820:2CA7:EBB0:C959:751A (talk) 15:24, 24 June 2018 (UTC)
    Unrelated: Note that 1.23.9 is an old unsupported version with security vulnerabilities. Please consider Manual:Upgrading Malyacko (talk) 09:14, 25 June 2018 (UTC)
    The database file contains all texts inside your articles. So having a current backup of it is good. To be on the safe side, you should have a backup of the wiki folder as well.
    See backup for more details. 2001:16B8:105F:2A00:E455:E47F:AB3E:AED2 (talk) 15:32, 24 June 2018 (UTC)
    You can also do a full XML dump of all pages, with the dumpBackup.php script. This can be useful in addition to the full database backup, because it doesn't contain any sensitive information. Some public wikis choose to archive their full pages dump on the Internet Archive. Sam Wilson 03:54, 25 June 2018 (UTC)

    Migrating to new server with SQlite DB

    Hello,

    I'm migrating from a Windows box to an Linux box, but I'm encountering difficulty connecting the sqlite DB

    I'm using MW 1.27.4 and have no issues doing a vanilla install on the Linux box, but when I replace

    My steps:

    • Install vanilla 1.27.4 on new linux box
    • Add my extensions and images into the respective folders on new linux box
    • Update LocalSettings.php file to include configuration for extensions
    • Replace vanilla sqlite DB with my existing sqlite DB from old windows box
      • Issue: This breaks the wiki. I see a page saying:
      • Sorry! This site is experiencing technical difficulties. Try waiting a few minutes and reloading. (Cannot access the database)

    Settings on Windows mediawiki

    Version: 1.27.4

    PHP: 5.6.22 (cgi-fcgi)

    SQLite: 3.8.10.2 with full-text search support

    Lua: 5.1.4

    Settings on vanilla Linux mediawiki:

    Version: 1.27.4

    PHP: 5.6.25 (apache2handler)

    SQLite: 3.7.17 with full-text search support

    Lua: 5.1.5

    Thoughts? 2A02:8084:6A00:E80:250C:F771:7A0C:BCE4 (talk) 15:51, 24 June 2018 (UTC)

    Please set $wgShowExceptionDetails and $wgShowSQLErrors to true in LocalSettings.php and see if it gives at least a reason for the "Cannot access the database". 87.123.197.0 (talk) 22:32, 24 June 2018 (UTC)

    Help Me!

    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 keep having problems, and I am a visual thinking person with double vision. I cant find the answers I need in the sea of tiny grey letters.

    Whenever I try to log in, 90% of the time I am told that I am entering the wrong username or password.

    When I am actually logged in, half of the time, I am told that I do not exist.

    My User page comes and goes.

    My alerts and inbox, my only saving grace, says it is empty, when it is not.

    I cant find the little blue link on the menu to the left that says "Upload File."

    I am sorry if I am posting this in the wrong place. The grey maze of words is giving me motion sickness.

    Thanks.

    Nina NINA 18:27, 24 June 2018 (UTC)

    To start with the first issue:
    We are speaking about a MediaWiki installation, right? Is it one of the language versions of Wikipedia?
    Basically, if login fails again and again, then this is often caused by broken cookies. Clearing cookies should help in this case. 87.123.197.0 (talk) 22:29, 24 June 2018 (UTC)
    Thanks for answering.
    I do not know the wiki lingo yet.
    I am confused about the answers, so I will try to add some details about my experience from last night and today, and maybe you can see which step I slipped up on.
    I cleared my cookies a few time last night. Maybe I am not doing it right. I am using PC Google Chrome.
    Last night I was trying to follow all of your directions, including uploading files and setting up my user page.
    I uploaded 3 or 4 files. That was smooth!
    I link one of my images to a page. (Colored Vector of Humayun's Tomb to the Humayun's Tomb page.)
    Then I noticed that my copyright info said share-alike, and I wanted to post Public Domain. It took me an hour or two to find the page with the list of copyright tags and updated my images' copyrights.
    Then I started following the site's directions. I added my graphic ability and language abilities to my user page, and played around with the user page by creating a gallery and adding some links.
    When I was finding the tag for language ability, all of the sudden, the entire page turned to Hindi, academic Hindi. It took me some time to get my Hindi feet back, and I managed to get the page back to English. (Can I redo your language switch graphic as a vector so that it is clearer? I would just copy it directly into a vector image.)
    Then, that is when I disappeared. My user page was gone, and things kept saying that I do not exist. Also, all of my notices, alerts, and messages were gone.
    Then I notice that the metadata for my files didn't show up correctly, so I tried to update a newer copy of an image with complete metadata. That is when I was logged out, and I couldn't get back in until this afternoon.
    I still do not exist, and neither do my uploads.
    There are somethings that I can't remember right now. This site has been like being thrown into the deep-end, and I have only taken baths for the last ten years.
    Please.
    What did I do wrong, and How can I fix things?
    Thanks
    Nina NINA 04:20, 25 June 2018 (UTC)
    Hi Nina, welcome to www.mediawiki.org. I assume that you are talking about Wikimedia Commons at commons.wikimedia.org instead. Your user page exists at https://commons.wikimedia.org/wiki/User:BilliTheCat (and has always been according to its change history). You can find your uploads on Wikimedia Commons at https://commons.wikimedia.org/wiki/Special:Contributions/BilliTheCat Malyacko (talk) 09:19, 25 June 2018 (UTC)
    Thank you. I am sorry. I was really confused, because all of these sites look the same to me with the exception of the very similar logos, so it took me until last night to realize that they are all different sites.
    Thanks for answering. NINA 22:14, 25 June 2018 (UTC)
    The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

    failed to mkdir "/var/www/mediawiki-1.27.4/images/thumb/...

    Hello,

    I'm just after migrating a wiki using some of the maintenance scripts, but I'm having issues with image thumbnails. My steps so far have been:

    Copy old wiki files over to new server (1.27.4). Run fresh MW install.

    I exported a dump from the old wiki:

    php dumpBackup.php --full --include-files --uploads > dump.xml

    I've imported the dump:

    php importDump.php < dump.xml

    Run rebuildImages:

    php rebuildImages.php --missing

    I've also run:

    php rebuildrecentchanges.php
    php rebuildall.php

    I'm encountering an issue with image thumbnails in several parts of the site, and see the message Error creating thumbnail: Unable to save thumbnail to destination

    When I browse to the page /Special:ListFiles in addition to seeing a bunch of Error creating thumbnail messages in the table, I see a big message at the top of the page:

    failed to mkdir "/var/www/mediawiki-1.27.4/images/thumb/e/e0/Troubleshoot_bid_DSU.png" mode 0777 [Called from wfMkdirParents in /var/www/mediawiki-1.27.4/includes/GlobalFunctions.php at line 2200] in /var/www/mediawiki-1.27.4/includes/debug/MWDebug.php on line 300

    Any advise much appreciated. Thanks. 87.198.212.130 (talk) 12:20, 25 June 2018 (UTC)

    An update:
    I've set $wgUseImageMagick = true; which seems to have resolved the wfMkdirParents error message at the top of the page.
    Still experiencing a large number of Error creating thumbnail errors on various pages throughout the site. 87.198.212.130 (talk) 13:17, 25 June 2018 (UTC)
    Another update:
    I've added $wgUseImageResize = false; into my LocalSettings.php file.
    This workaround seems to have fixed the issue from a front end perspective, but it obviously going to put more load on the server. 87.198.212.130 (talk) 13:36, 25 June 2018 (UTC)
    Sounds like you have a permission problem. Folder permissions inside the images/ folder are not correct.
    The user you run te webserver with does not have the privileges to create the needed folders. 2001:16B8:1026:7C00:745A:3263:C8:C85B (talk) 17:20, 25 June 2018 (UTC)

    Problem re-installing DataTables

    Hi all,

    I recently updated my MediaWiki and I have to re-install the extension DataTables.

    I have follow the instructions on the DataTables GitHub to the letter. I have extracted the zip archive to www.websites.com/html/extensions/DataTables/

    I'm not sure what to do now, I tried adding an entry in my Localsettings.php file according to this documentation page. But upon loading the page it seems the extension was not working. The pages where it should work are all edited accordingly to make use of the application with the appropriate syntax.

    To be clear, the extracted zip needed to be renamed DataTables but inside the zip there was a folder Datatables-1.10.0 and I renamed that one to DataTables and put it in the extension folder. Is that what went wrong? Because it seemed the Datatables-1.10.0 folder contained the important stuff.

    If so what do I add to my localsettings.php file in order for DataTables to work on the MediaWiki?

    Thanks in advance,

    PS: I am not a developer I took over this project and am trying to update the MediaWiki to keep it running and secure.

    Regards

    Clovis. Clovismarks (talk) 13:51, 25 June 2018 (UTC)

    Which MediaWiki version is this about? Furthermore, you do not explain *what* the problem is actually. Malyacko (talk) 18:18, 25 June 2018 (UTC)
    You need to add the following to LocalSettings.php:
    # DataTables
    require_once( "$IP/extensions/DataTables/DataTables.php" );
    For more details, see Extension:DataTables.
    Go to your site's Special:Version page and see whether the DataTables extension is present there or not. AhmadF.Cheema (talk) 19:08, 25 June 2018 (UTC)

    Please find style in wiki api

    Hello everybody

    I'm trying to get the HTML values ​​from MediaWiki.

    Like the link below.

    https://en.wikipedia.org/w/api.php?action=parse&format=json&page=test

    Unfortunately, there is no style sheet. (Such as CSS syntax)

    I hope to get the same HTML and Style that you see on the screen when you access the wiki page. https://en.wikipedia.org/wiki/Test 175.118.60.127 (talk) 14:54, 25 June 2018 (UTC)

    The API is mainly made to provide the text information - it is intended for automated processing. And that works best without styles.
    If you want the styles of the wiki page, why do you not access the wiki page? 2001:16B8:1026:7C00:745A:3263:C8:C85B (talk) 17:12, 25 June 2018 (UTC)

    Page blocked because of marketing content

    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! The page I created about my company have been blocked many times because the content is considered marketing. Is there any article with content recommendations for Wikipedia? We have already changed the text approach, but it is still being blocked.

    Thanks. 189.112.99.250 (talk) 15:04, 25 June 2018 (UTC)

    Welcome to the support desk for the mediawiki.org software. For 'social rules' on some website that uses the MediaWiki software, please refer to that website in question.
    For example, if you refer to the English Wikipedia, see https://en.wikipedia.org/wiki/Wikipedia:Appealing_a_block for blocked user accounts or https://en.wikipedia.org/wiki/Wikipedia:Relevance for content rules. Malyacko (talk) 18:16, 25 June 2018 (UTC)
    The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

    EDP Renewables

    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.


    To whom it may concern,

    I am trying to update the information in the EDPR wikipedia page, which currently refers to 2010 according to the latest results of 2017.

    However, the page will not stop notifying "vandalic error", I would like to know how to proceed in order to be able to publish the new information.

    Regards. EDPR ES (talk) 16:09, 25 June 2018 (UTC)

    Welcome to the support desk for the mediawiki.org software. For 'social rules' on of the Wikipedia websites, please refer to the Wikipedia website in question. https://en.wikipedia.org/wiki/User:EDPR_ES shows that you probably want to talk to MField on English Wikipedia who blocked your account in 2014. See https://en.wikipedia.org/wiki/Wikipedia:Appealing_a_block for more information. Malyacko (talk) 18:14, 25 June 2018 (UTC)
    The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

    Is MediaWiki Easy To Hijack?

    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.


    "Crack", "Hack", "Hijack"... not sure what word to use.

    My question is not about privacy. I'm asking, "How hardened is the core?" How easy is it to hijack a MediaWiki?

    For example, i understand that extensions promising to prevent access may have leaks.

    However, preventing edit rights doesn't require an extension. It's built into the core. How easy is it to bypass native edit protection?

    How easy is it to take down a MediaWiki?

    How easy to take over a user or admin account?

    i don't mean theoretically (yes, i know "anything is possible", and i know WikiMedia offers no guarantees). But, are there any mock or real examples of successful or failed hijacks? Johnywhy (talk) 01:16, 26 June 2018 (UTC)

    There's no known way to do this in MediaWiki core, otherwise it would have been patched (or it would be in the process).
    Of course, you can get more open attack vectors by installing untrusted or poorly coded extensions, or having your webserver misconfigured. Ciencia Al Poder (talk) 09:33, 26 June 2018 (UTC)
    Although, some (maybe not as important) security related tasks (T170572) remain. AhmadF.Cheema (talk) 10:37, 26 June 2018 (UTC)
    great news :) Johnywhy (talk) 15:32, 26 June 2018 (UTC)
    The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

    FlaggedRevs vs ApprovedRevs

    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.


    What's the difference?

    As far as i can tell, the only difference is that ApprovedRevs allows only authorized approvers to approve versions, while FlaggedRevs allows both authorized approvers and Editors to approve versions.

    Extension:FlaggedRevs

    Extension:Approved Revs Johnywhy (talk) 03:12, 26 June 2018 (UTC)

    The difference is explained in the very first paragraph of https://www.mediawiki.org/wiki/Extension:Approved_Revs Malyacko (talk) 14:33, 26 June 2018 (UTC)
    Apologies, don't know how i missed that. Must read better! Johnywhy (talk) 23:59, 26 June 2018 (UTC)
    The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

    THIS IS NOT A RELEASE YET! ?

    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.


    RELEASE-NOTES-1.31. [[kgh]] (talk) 07:05, 26 June 2018 (UTC)

    Yeah it is and it is also pretty helpless as well as confusing. All over the place we are referencing the master version of the respective branches as the RELEASE NOTES to consult for end users. However on master we always will have the note "THIS IS NOT A RELEASE YET!" unless the branch is obsolete. [[kgh]] (talk) 08:59, 26 June 2018 (UTC)
    Oh, so this happened again *facepalm*. I've opened a task about this: T198180 Ciencia Al Poder (talk) 09:23, 26 June 2018 (UTC)
    To repeat myself from the last thread about this, you want https://raw.githubusercontent.com/wikimedia/mediawiki/1.31.0/RELEASE-NOTES-1.31 not https://raw.githubusercontent.com/wikimedia/mediawiki/REL1_31/RELEASE-NOTES-1.31. They are not the same. Jdforrester (WMF) (talk) 19:18, 26 June 2018 (UTC)
    The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

    Templates don't render

    Greetings!

    I have a problem with templates not rendering. Making a template works, and it looks all right on the template page, but when I try to use it in an article it instead inserts a lot of text which looks like XML right into my article. What could be wrong? 31.211.212.193 (talk) 07:25, 26 June 2018 (UTC)

    (As in: if you view source, the page is filled with &lt;root&gt;&lt;template&gt;&lt;title&gt; and so on.) 31.211.212.193 (talk) 07:34, 26 June 2018 (UTC)
    Maybe you're inserting the template inside
     tags or some other parser tags that cause this behavior? [[User:Ciencia Al Poder|Ciencia Al Poder]] ([[User talk:Ciencia Al Poder|talk]]) 09:29, 26 June 2018 (UTC)
    
    == Need to require to login on MediaWiki ==
    
    Need to require to login on MediaWiki before anyone can view the main page [[Special:Contributions/124.107.34.26|124.107.34.26]] ([[User talk:124.107.34.26|talk]]) 09:37, 26 June 2018 (UTC)
    :You want to restrict viewing of ''only'' the Main page, or of ''all'' pages?
    :If it is for ''all'' pages, see [[Manual:Preventing access#Simple private wiki]] and [[Manual:Preventing access#Restrict viewing]]. [[User:AhmadF.Cheema|AhmadF.Cheema]] ([[User talk:AhmadF.Cheema|talk]]) 10:33, 26 June 2018 (UTC)
    
    == To design the sidebar of mediawiki ==
    
    Hi, 
    
    Can anyone help me to add different style for the sidebar in mediawiki
    
    probably any extension or using css 
    
    Please let me know [[User:Niyaz nizu16|Niyaz nizu16]] ([[User talk:Niyaz nizu16|talk]]) 12:12, 26 June 2018 (UTC)
    :One of the most comprehensive sidebar aesthetic customizations, while remaining on the Vector skin, is done by WikiRogue. See their [https://wikirouge.net/MediaWiki:Vector.css MediaWiki:Vector.css] page for the particular rules. [[User:AhmadF.Cheema|AhmadF.Cheema]] ([[User talk:AhmadF.Cheema|talk]]) 14:14, 26 June 2018 (UTC)
    
    == Need Admin to change old email address to new one ==
    
    I successfully changed the email associated w my username; but, I cannot get the confirmation email bc I do hot have the old email address anymore. 
    
    I unchecked all email notifications successfully.
    
    <u>Can an admin change my old email to my new one for notifications, etc.?</u>
    
    My old email starts with x...@...t.org (first and last letters of email)
    
    My new email is now associated w my account; begins w/ f...@...e.com ( first and last letters of email). But I am unable to get the confirmation email bc it is being sent to my old email address which I do not have anymore. [[User:Xfileexpert|Xfileexpert]] ([[User talk:Xfileexpert|talk]]) 15:10, 26 June 2018 (UTC)
    :Admins can't change nor even see the email address of other users. If you've successfully changed your email in Special:Preferences, the confirmation email will be sent to that email. [[User:Ciencia Al Poder|Ciencia Al Poder]] ([[User talk:Ciencia Al Poder|talk]]) 18:22, 29 June 2018 (UTC)
    
    == yet another parsoid/Visual Editor question... ==
    
    I have a working parsoid instance: (https://salty-refuge-19479.herokuapp.com) and have this referenced in my Visual wiki $wgVirtualRestConfig ['modules']['parsoid'] = array('url' => 'https://salty-refuge-19479.herokuapp.com<nowiki/>',);
    
    It 'stalls' at about 70% and gives: "Error loading data from server: apierror-visualeditor-docserver-http: HTTP 404. Would you like to retry?" 
    
    Any help would be appreciated... I'm a nwebie and all of this is "Greek" to me. [[User:Rkasparek|Rkasparek]] ([[User talk:Rkasparek|talk]]) 15:16, 26 June 2018 (UTC)
    
    == MY PAGER WEB SIGHT ==
    
    MY SIGHT PAGER IN SUMTER SC [[User:Hosie123|Hosie123]] ([[User talk:Hosie123|talk]]) 07:21, 27 June 2018 (UTC)
    :Do you have a question? about the MediaWiki software? If so, please ask it. [[User:Malyacko|Malyacko]] ([[User talk:Malyacko|talk]]) 09:11, 27 June 2018 (UTC)
    
    == MediaWiki page with Office 365 authentication ==
    
    Can someone help on this topic..
    
    [[User talk:223.230.106.163#h-MediaWiki_page_with_Office_365_authentication-2018-06-27T06:51:00.000Z]] [[User:Srikanth1239|Srikanth1239]] ([[User talk:Srikanth1239|talk]]) 07:38, 27 June 2018 (UTC)
    :If you "did not succeed" then you need to explain how and why you did not succeed, plus post proper questions here instead of posting on the talk page of an anonymous user. :) [[User:Malyacko|Malyacko]] ([[User talk:Malyacko|talk]]) 09:14, 27 June 2018 (UTC)
    
    == Closed protected MediaWiki ==
    
    A) I have an existing MediaWiki. How can I build an inside part, which is only readable and writeable by special users?
    
    Even the pictures and files in this part should be read-protected. Even by search, this part should be read-protected.
    
    May be a new protected name space, plus a new protected file space, plus a new protected search, plus an new specific user group?
    
    How do we do this exactly?
    
    B) May be a new specifig protected MW is better to implement? How do we do this?
    
    <nowiki>Thanks for help, --~</nowiki> [[User:Markus Bärlocher|Markus Bärlocher]] ([[User talk:Markus Bärlocher|talk]]) 08:47, 27 June 2018 (UTC)
    :See [[Manual:User rights]] for what's possible. [[User:Malyacko|Malyacko]] ([[User talk:Malyacko|talk]]) 09:11, 27 June 2018 (UTC)
    
    == Internal Server Error (redirect loop detected) ==
    {{Archive top|result=Incorrect <code>$wgArticlePath</code>.|status=resolved}}
    
    Hey. I have searched all over for solutions to this issue, and I have found a few articles which havent worked so far. 
    
    I just installed media wiki on my website. The url of the wiki is http://www.aidanstrickland.com/nobodyfindthiswiki/ (its eventually going to be a private wiki)
    
    The website, www.aidanstrickland.com is just my domain, and is unrelated to the wiki.
    
    The wiki was working perfectly until I wanted to enable image uploads. I went to the localsettings.php file to change the $wgEnableUploads to true. 
    
    This seems to have broken the site and got it stuck in this loop. 
    
    I think it had something to do with the fact that the wiki was installed under a folder (/nobodyfindthiswiki) and this has messed up the $wgScriptPath or $wgArticlePath, but I am very new to mediawiki markup/scrips and variables, so I dont exactly understand what is going on...
    
    Thanks,
    
    Aidan [[Special:Contributions/165.165.135.245|165.165.135.245]] ([[User talk:165.165.135.245|talk]]) 14:50, 27 June 2018 (UTC)
    :Please provide the value of the following configurations:
    :#$wgUsePathInfo
    :#$wgArticlePath [[User:星耀晨曦|星耀晨曦]] ([[User talk:星耀晨曦|talk]]) 15:21, 27 June 2018 (UTC)
    :Article path can be seen at: [http://www.aidanstrickland.com/nobodyfindthiswiki/api.php?action=query&meta=siteinfo .../api.php?action=query&meta=siteinfo]. [[User:AhmadF.Cheema|AhmadF.Cheema]] ([[User talk:AhmadF.Cheema|talk]]) 16:10, 27 June 2018 (UTC)
    :$wgArticlePath should be like <code>nobodyfindthiswiki/$1</code>. [[User:星耀晨曦|星耀晨曦]] ([[User talk:星耀晨曦|talk]]) 16:26, 27 June 2018 (UTC)
    :Hi. The $wgArticlePath was wrong. I set it to what you advised and it worked perfectly.
    :Thank you so much! [[Special:Contributions/165.165.135.245|165.165.135.245]] ([[User talk:165.165.135.245|talk]]) 17:34, 27 June 2018 (UTC)
    {{Archive bottom}}
    
    == Automatically Start Parsoid on Startup as a Service - Ubuntu Server ==
    {{Archive top|result=installed pm2 daemon to manage Parsoid
     [[Parsoid/Developer Setup]]|status=resolved}}
    
    Looking for advice on how to add Parsoid as a startup item/service. As of right now, I manually navigate to /usr/local/lib/node_modules/parsoid and then issue the 'npm start' command which runs parsoid in the shell window that the command was issued from. If I close the window, Parsoid stops. I'd like to add Parsoid as a service so I don't need to login and run the command manually each time.
    
    Running Ubuntu 18.04 with MW 1.31 and Parsoid (0.8.0) and PHP 7.0. [[User:Packetboxer|Packetboxer]] ([[User talk:Packetboxer|talk]]) 21:51, 27 June 2018 (UTC)
    :See [[Parsoid/Developer Setup#Starting the Parsoid service automatically|this section]]. You can also use something like [http://supervisord.org supervisor] or [http://pm2.keymetrics.io pm2] of course. —[[User:TheDJ|Th<span style="color: green">e</span>DJ (Not WMF)]] ([[User talk:TheDJ|talk]] • [[Special:Contributions/TheDJ|contribs]]) 11:08, 28 June 2018 (UTC)
    :Thanks for the reply - I had thought upstart was deprecated on Ubuntu 18.04 so I didn't attempt to use it. Will give it a shot, thanks!
    :Edit: setup Parsoid to run with pm2 daemon, confirmed working. [[User:Packetboxer|Packetboxer]] ([[User talk:Packetboxer|talk]]) 17:03, 28 June 2018 (UTC)
    {{Archive bottom}}
    
    == exporting categories ==
    
    I am move one wiki to another. Export worked fine for most of the pages, but not the categories. I see nothing on the categories pages here which helps me to understand if those pages can be exported. Since i do not own the original wiki, i cannot add an extension to it. Any suggestions, or do i just rebuild the pages? [[User:Rocketpipe|Rocketpipe]] ([[User talk:Rocketpipe|talk]]) 17:54, 28 June 2018 (UTC)
    :See [[Project:Support desk/Flow/2018/06#h-problem_after_the_pages_import-2018-06-04T13:31:00.000Z]]. [[User:AhmadF.Cheema|AhmadF.Cheema]] ([[User talk:AhmadF.Cheema|talk]]) 07:02, 29 June 2018 (UTC)
    
    == MediaWiki 1.31 and Active Directory ==
    
    I've tried a variety of extensions and configurations to incorporate Active Directory in to MediaWiki so users can use their AD accounts to authenticate. Unfortunately I've had no luck so far; some posts have stated AD authentication is broken post 1.27, however it sounds like basic authentication should still be working. I've tried using LDAP Authentication and PluggableAuth but neither seem to work after setting up domain controller details. I'm not familiar with integrating something like MediaWiki with AD, so I'm working on the assumption after the extension is installed I modify LocalSettings.php and add the domain/domain controller specifics to the LDAP Authentication section. I've also included a domain admin user and password which I assume would be required to query AD and return the result of the authentication attempt.
    
    Is there any step by step or guide that provides details for linking Active Directory to MW 1.31? [[User:Packetboxer|Packetboxer]] ([[User talk:Packetboxer|talk]]) 21:24, 28 June 2018 (UTC)
    :Same here! I'd love to receive some proper instructions. [[Special:Contributions/217.100.39.178|217.100.39.178]] ([[User talk:217.100.39.178|talk]]) 12:13, 17 July 2018 (UTC)
    :+1 there is no freaking way to make this work.... [[Special:Contributions/62.14.255.236|62.14.255.236]] ([[User talk:62.14.255.236|talk]]) 13:04, 11 February 2019 (UTC)
    :For ''Single Sign On'' using the SAML protocol, see [https://medium.com/vivritiengineering/mediawiki-and-azure-single-sign-on-e3fbc13d1f46 Mediawiki and Azure AD Single Sign On] and for OAuth 2.0 protocol, see [[Project:Support desk/Flow/2019/02#h-Fatal_exception_thrown_-_Using_OAuth2_Client_to_implement_SSO_w/_Azure_Active_Di-2019-02-05T05:19:00.000Z]]. [[User:AhmadF.Cheema|AhmadF.Cheema]] ([[User talk:AhmadF.Cheema|talk]]) 15:00, 11 February 2019 (UTC)
    :Hi i have setup MW 1.31 and i got to this error: 
    :LDAP bind is successful it's the group sync that's not working.
    :[exception] [5c0fc20ec0b8d620f8fe6aa7] /index.php?title=Spesial:Logg_inn&returnto=Forside   BadMethodCallException from line 324 of /var/www/mediawiki/extensions/LdapAuth/src/Groups/LdapGroupSync.php: Not yet implemented.
    :<nowiki>#</nowiki>0 /var/www/mediawiki/extensions/LdapAuth/src/Groups/LdapGroupSync.php(214): Shanept\LdapAuth\Groups\LdapGroupSync->doGroupMapUsingChain(Symfony\Component\Ldap\Entry)
    :<nowiki>#</nowiki>1 /var/www/mediawiki/extensions/LdapAuth/src/Groups/LdapGroupSync.php(94): Shanept\LdapAuth\Groups\LdapGroupSync->fetchData()
    :<nowiki>#</nowiki>2 /var/www/mediawiki/extensions/LdapAuth/src/Auth/PrimaryAuthenticationProvider.php(188): Shanept\LdapAuth\Groups\LdapGroupSync->map()
    :<nowiki>#</nowiki>3 [internal function]: Shanept\LdapAuth\Auth\PrimaryAuthenticationProvider->postAuthentication(User, MediaWiki\Auth\AuthenticationResponse)
    :<nowiki>#</nowiki>4 /var/www/mediawiki/includes/auth/AuthManager.php(2429): call_user_func_array(array, array)
    :<nowiki>#</nowiki>5 /var/www/mediawiki/includes/auth/AuthManager.php(693): MediaWiki\Auth\AuthManager->callMethodOnProviders(integer, string, array)
    :<nowiki>#</nowiki>6 /var/www/mediawiki/includes/auth/AuthManager.php(383): MediaWiki\Auth\AuthManager->continueAuthentication(array)
    :<nowiki>#</nowiki>7 /var/www/mediawiki/includes/specialpage/AuthManagerSpecialPage.php(353): MediaWiki\Auth\AuthManager->beginAuthentication(array, string)
    :<nowiki>#</nowiki>8 /var/www/mediawiki/includes/specialpage/AuthManagerSpecialPage.php(482): AuthManagerSpecialPage->performAuthenticationStep(string, array)
    :it's this function:
    :/**
    :<nowiki>*</nowiki> Set up a group map for the user using chained groups.
    :<nowiki>*</nowiki> See <nowiki>http://ldapwiki.com/wiki/1.2.840.113556.1.4.1941</nowiki>
    :<nowiki>*</nowiki>
    :<nowiki>*</nowiki> @param \Symfony\Component\Ldap\Entry $data Ldap query results for user
    :<nowiki>*</nowiki>/
    :protected function doGroupMapUsingChain( $data ) {
    :throw new \BadMethodCallException( 'Not yet implemented.' );
    :}
    :}
    :<br /> [[Special:Contributions/87.248.17.15|87.248.17.15]] ([[User talk:87.248.17.15|talk]]) 16:15, 6 March 2019 (UTC)
    
    == How to access a Pages Source Text ? ==
    
    I tried <code>Article->getContent()</code> but this is depraced since 1.21 and refers to <code>WikiPage::getContent()</code>. This function cannot be parsed with <code>Parser::parse</code> beacuse this Function needs a Text. When I check the Object (WikiPage::getContent()) I get an Property <code>mText</code> but this is private and not accesible. How can I get the Source Text of a Page or Article to use it in PHP Code ?
    
    Thank's a lot
    
    Cheers
    
    Dirk [[Special:Contributions/95.91.210.42|95.91.210.42]] ([[User talk:95.91.210.42|talk]]) 00:28, 29 June 2018 (UTC)
    :I fixed it with a Hack but I'm pretty sure that there must be a official way.
    :<code>
    :function accessProtected($obj, $prop) {
    :<code>  // THe Hack to be able to access a Pages Text because getText and getTextRaw are deprecated</code>
    :<code>  $reflection = new ReflectionClass($obj);</code>
    :<code>  $property = $reflection->getProperty($prop);</code>
    :<code>  $property->setAccessible(true);</code>
    :<code>  return $property->getValue($obj);</code>
    :}
    :function wfAddSidebarTree( $out, $skin ) {
    :<code>  $title = Title::newFromText( 'SidebarTree', NS_MEDIAWIKI );</code>
    :<code>  $wikipage = WikiPage::newFromId( $title->getArticleID() );</code>
    :<code>  $content = accessProtected($wikipage->getContent(), 'mText');</code>
    :<code>  print_r($content);</code>
    :<code>  $html = $out->parse( $content );</code>
    :<code>  $out->addHTML( "<div id="\&quot;wikitext-sidebar\&quot;">$html</div>" );</code>
    :<code>  return true;</code>
    :}
    :</code> [[Special:Contributions/95.91.210.42|95.91.210.42]] ([[User talk:95.91.210.42|talk]]) 00:36, 29 June 2018 (UTC)
    :A page/article doesn't have content, it has revisions. The revisions have content.
    :WikiPage::getRevision () -> getContent()
    :also note that a revision is using a content model. It can be wiki text, javascript, json or many other things. In articles it's usually wiki text, but you might have to account for when it is not. —[[User:TheDJ|Th<span style="color: green">e</span>DJ (Not WMF)]] ([[User talk:TheDJ|talk]] • [[Special:Contributions/TheDJ|contribs]]) 07:49, 29 June 2018 (UTC)
    
    == Changed site to https, wiki broken (css issue?) ==
    {{Archive top|status=resolved}}
    
    We implemented a redirect to all pages, so they would show up as https instead of http, but now our wiki is broken.  More specifically, it seems to have lost its style sheet information as the text and images still show up, just unstyled.  I tried to edit the main page and update the links to see if this would help, but I can only find the visual editor, and there is no way of editing the source (with the header)?
    
    Any help would be greatly appreciated!
    
    Thanks. [[User:Sfzeller|Sfzeller]] ([[User talk:Sfzeller|talk]]) 17:27, 29 June 2018 (UTC)
    :Did you update $wgServer in LocalSettings.php? [[User:Malyacko|Malyacko]] ([[User talk:Malyacko|talk]]) 17:30, 29 June 2018 (UTC)
    :Ha, that was it.  Did not even think about it.  You are a life saver, seriously, thank you very much!
    :Made my day,
    :Sascha [[User:Sfzeller|Sfzeller]] ([[User talk:Sfzeller|talk]]) 18:03, 29 June 2018 (UTC)
    {{Archive bottom}}
    
    == How to fix the Access Denied message with PhpMyAdmin or anything else MySQL? ==
    
    MediaWiki Version: 1.30
    
    PHP Version: 5.6.36 (litespeed)
    
    MySQL Version: 5.6.39-cll-lve
    
    ICU Version: 57.1
    
    Hello. When I tried to create an additional database for a second wiki (Penguiconverter) after that second wiki couldn't have separate pages and files from the first wiki (Penguin Ice Wikis), I got the following error on that wiki: (Cannot access the database: Access denied for user 'gjlxrtap_wiki'@'localhost' (using password: YES) (localhost))
    
    I already have both databases set up. I also cloned the information from the old database by exporting the data and importing it into the new one. If this is the correct way to set up a new database, then what do I need to do to gain access to the database? If cloning by exporting and importing is the incorrect way, then what should the database look like?
    
    I also tried another way to create a database, by copying the structure only of the original database in order to create another database. However, I still got an access denied message for this database too. [[User:Newman2|Newman2]] ([[User talk:Newman2|talk]]) 18:28, 29 June 2018 (UTC)
    :I really need a helpful reply so that I can get this wiki family up and running. [[User:Newman2|Newman2]] ([[User talk:Newman2|talk]]) 15:42, 30 June 2018 (UTC)
    :First, make sure your database user have access to these 2 databases.
    :In mysql shell, execute <code>show grants for 'gjlxrtap_wiki'@'localhost';</code> to check your user rights. [[User:星耀晨曦|星耀晨曦]] ([[User talk:星耀晨曦|talk]]) 17:08, 30 June 2018 (UTC)
    :I tried to execute show grants, and I got the following error: #1044 - Access denied for user 'cpses_gj4v7w8hq1'@'localhost' to database 'mysql' [[User:Newman2|Newman2]] ([[User talk:Newman2|talk]]) 19:41, 30 June 2018 (UTC)
    :Please execute this command as root user. [[User:星耀晨曦|星耀晨曦]] ([[User talk:星耀晨曦|talk]]) 20:04, 30 June 2018 (UTC)
    :How do I do that? And, I have to pay to execute SSH commands on my web host server. [[User:Newman2|Newman2]] ([[User talk:Newman2|talk]]) 21:38, 30 June 2018 (UTC)
    :Where "root user" is a your mysql user, but have all rights. Use <code>mysql -uroot -p</code> to login. If you can't do this, you can try creating an account and giving it access to your second database, your host management panel may be able to do it. [[User:星耀晨曦|星耀晨曦]] ([[User talk:星耀晨曦|talk]]) 03:16, 1 July 2018 (UTC)
    :How do I create an account on PhpMyAdmin? [[User:Newman2|Newman2]] ([[User talk:Newman2|talk]]) 16:49, 3 July 2018 (UTC)
    :Can you login with root user? [[User:星耀晨曦|星耀晨曦]] ([[User talk:星耀晨曦|talk]]) 16:50, 3 July 2018 (UTC)
    :I added a user to my database, and I got the following error: [WzvEMcJwPUEZ3q69aqV70QAAANI] 2018-07-03 18:45:06: Fatal exception of type "Wikimedia\Rdbms\DBQueryError". What can I do to fix this? [[User:Newman2|Newman2]] ([[User talk:Newman2|talk]]) 18:45, 3 July 2018 (UTC)
    :Add following to your LocalSettings.php
    :<syntaxhighlight lang='text'>
    $wgShowExceptionDetails = true;
    $wgShowDBErrorBacktrace = true;
    
    to show detail message. 星耀晨曦 (talk) 05:46, 4 July 2018 (UTC)
    Just did that, and it worked. Now what do I do? Newman2 (talk) 21:10, 4 July 2018 (UTC)
    Give us detailed error information to help us solve your problem. 星耀晨曦 (talk) 23:54, 4 July 2018 (UTC)
    It looks something like this:
    [Wz03lFwtCOv-yYg8e1qVvgAAAY4] /mw19/ Wikimedia\Rdbms\DBQueryError from line 1149 of /home/gjlxrtap/public_html/mw19/includes/libs/rdbms/database/Database.php: A database query error has occurred. Did you forget to run your application's database schema updater after upgrading?
    Query: SELECT user_id,user_name,user_real_name,user_email,user_touched,user_token,user_email_authenticated,user_email_token,user_email_token_expires,user_registration,user_editcount FROM `gjlxrtap_mw19758`.`mwd50q_user` WHERE user_id = '1' LIMIT 1
    Function: User::loadFromDatabase
    Error: 1142 SELECT command denied to user 'gjlxrtap_wiki2'@'localhost' for table 'mwd50q_user' (localhost)
    Backtrace:
    #0 /home/gjlxrtap/public_html/mw19/includes/libs/rdbms/database/Database.php(979): Wikimedia\Rdbms\Database->reportQueryError(string, integer, string, string, boolean)
    #1 /home/gjlxrtap/public_html/mw19/includes/libs/rdbms/database/Database.php(1343): Wikimedia\Rdbms\Database->query(string, string)
    #2 /home/gjlxrtap/public_html/mw19/includes/libs/rdbms/database/Database.php(1411): Wikimedia\Rdbms\Database->select(string, array, array, string, array, array)
    #3 /home/gjlxrtap/public_html/mw19/includes/user/User.php(1287): Wikimedia\Rdbms\Database->selectRow(string, array, array, string, array)
    #4 /home/gjlxrtap/public_html/mw19/includes/user/User.php(496): User->loadFromDatabase(integer)
    #5 /home/gjlxrtap/public_html/mw19/includes/libs/objectcache/WANObjectCache.php(892): User->{closure}(boolean, integer, array, NULL)
    #6 [internal function]: WANObjectCache->{closure}(boolean, integer, array, NULL)
    #7 /home/gjlxrtap/public_html/mw19/includes/libs/objectcache/WANObjectCache.php(1012): call_user_func_array(Closure, array)
    #8 /home/gjlxrtap/public_html/mw19/includes/libs/objectcache/WANObjectCache.php(898): WANObjectCache->doGetWithSetCallback(string, integer, Closure, array, NULL)
    #9 /home/gjlxrtap/public_html/mw19/includes/user/User.php(521): WANObjectCache->getWithSetCallback(string, integer, Closure, array)
    #10 /home/gjlxrtap/public_html/mw19/includes/user/User.php(441): User->loadFromCache()
    #11 /home/gjlxrtap/public_html/mw19/includes/user/User.php(405): User->loadFromId(integer)
    #12 /home/gjlxrtap/public_html/mw19/includes/session/UserInfo.php(88): User->load()
    #13 /home/gjlxrtap/public_html/mw19/includes/session/CookieSessionProvider.php(119): MediaWiki\Session\UserInfo::newFromId(string)
    #14 /home/gjlxrtap/public_html/mw19/includes/session/SessionManager.php(487): MediaWiki\Session\CookieSessionProvider->provideSessionInfo(WebRequest)
    #15 /home/gjlxrtap/public_html/mw19/includes/session/SessionManager.php(190): MediaWiki\Session\SessionManager->getSessionInfoForRequest(WebRequest)
    #16 /home/gjlxrtap/public_html/mw19/includes/WebRequest.php(735): MediaWiki\Session\SessionManager->getSessionForRequest(WebRequest)
    #17 /home/gjlxrtap/public_html/mw19/includes/session/SessionManager.php(129): WebRequest->getSession()
    #18 /home/gjlxrtap/public_html/mw19/includes/Setup.php(762): MediaWiki\Session\SessionManager::getGlobalSession()
    #19 /home/gjlxrtap/public_html/mw19/includes/WebStart.php(114): require_once(string)
    #20 /home/gjlxrtap/public_html/mw19/index.php(40): require(string)
    #21 {main} Newman2 (talk) 01:13, 5 July 2018 (UTC)
    Your "gjlxrtap_wiki2" user does not enough permissions to access mwd50q_user table. 星耀晨曦 (talk) 03:03, 5 July 2018 (UTC)
    How to I give my user enough permissions to access the mwd50q_user table? Newman2 (talk) 13:06, 5 July 2018 (UTC)
    ^Read the post above. Newman2 (talk) 16:52, 8 July 2018 (UTC)
    I don't know if your hosting provider has provided this feature. I can only tell you how to use root user to give permission:
    GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER ON `gjlxrtap_mw19758`.* TO 'gjlxrtap_wiki2'@'localhost';
    
    星耀晨曦 (talk) 09:46, 10 July 2018 (UTC)
    I tried to do this by running an SQL query in PhpMyAdmin, and I got the following error: #1044 - Access denied for user 'gjlxrtap'@'localhost' to database 'gjlxrtap_mw19758' Newman2 (talk) 21:14, 10 July 2018 (UTC)
    Okay... I can't find this in the designer of PhpMyAdmin. If it is in the MediaWiki file directory, what file and folder is it located in? If it is located in the database, where can I find it in PhpMyAdmin? Newman2 (talk) 14:23, 11 July 2018 (UTC)
    You can ask your hosting provide for further help. 112.134.113.69 (talk) 10:50, 5 June 2019 (UTC)

    Feed tag not working (working differently) for different types of feeds

    The top feed tag below appears, but the bottom does not. They are using the same structure, can't figure out what is the issue here? Any help?

    <feed url="http://www.rssmix.com/u/8280142/rss.xml" entries="6"><div class="mw-feed">[{PERMALINK} {TITLE}]</div></feed>

    break

    <feed url="http://www.rssmix.com/u/8289965/rss.xml" entries="6"><div class="mw-feed">[{PERMALINK} {TITLE}]</div></feed> Jonsmithba (talk) 19:44, 30 June 2018 (UTC)

    Can anyone help or test this? 79.156.97.166 (talk) 09:22, 1 July 2018 (UTC)
    Anyone? Jonsmithba (talk) 19:11, 2 July 2018 (UTC)

    Locked Out of my Wiki

    I am getting an error message when I try to log in with my exact password. It has happened across the board for my mediawiki installations for a long time now. I have 5 wikis I value and produce content for and I am afraid I will be locked out of all 5 from this bug.

    Here is a screenshot: https://openmovement.wiki/images/locked-out-of-wiki.png

    Is there a way to log in to my mediawiki websites that I lose my admin account cookie to? 76.115.107.127 (talk) 21:09, 30 June 2018 (UTC)

    mysql? Jonsmithba (talk) 21:22, 30 June 2018 (UTC)
    What is the solution in mysql? 76.115.107.127 (talk) 21:28, 30 June 2018 (UTC)
    I upgraded to 1.31.0 and the problem persists. 76.115.107.127 (talk) 21:27, 30 June 2018 (UTC)
    I found a solution. The problem ended up being that I was using special characters in my password. I changed my password to have no special characters and it works now.
    This is the error I was getting: 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. 76.115.107.127 (talk) 21:43, 30 June 2018 (UTC)
    Category:Support desk archives