Jump to content

Project:Support desk/Flow/2019/12

Add topic
From mediawiki.org
This page is an archive.
Please ask questions on the current support desk.

How can I add the asbox template to my Mediawiki?

I've tried adding a page 'Template:Asbox' with the text from https://en.wikiquote.org/w/index.php?title=Template:Asbox&action=edit (because https://en.wikipedia.org/w/index.php?title=Template:Asbox&action=edit is restricted) and referencing the template in an article both as {{asbox}} and as follows:


{{asbox

| image     = ltw-logo-135x135.png

| subject   = biographical

| qualifier = about a musician

| category  = Stubs

}}


... all to no avail.


What am I doing wrong? Please help! 24.121.54.67 (talk) 18:22, 1 December 2019 (UTC)

I've also tried this: Help talk:Templates#import templates, which imported 37 templates before failing, and didn't solve the problem. 24.121.54.67 (talk) 18:44, 1 December 2019 (UTC)
"37 templates before failing, and didn't solve the problem" <-- Well sounds like it didn't solve the problem because it "failed". Please detail how the import failed.
Also, enwikipedia isn't restricted from copying, it is only restricted from modification, you can copy the template from there if you want (but enwikiquote is just as good) Bawolff (talk) 04:53, 2 December 2019 (UTC)
Thanks for replying. Turns out I needed to enable ParserFunctions in LocalSettings.php. The template works now.
I'd still like to get the aesthetics of the centered, outlined box with the graphic on the left and the different background color, but I've been unable to find any explanation of how that works, and it's not currently a top priority. 24.156.121.36 (talk) 19:18, 8 December 2019 (UTC)
Its most likely that works via stuff in the page w:MediaWiki:Common.css (or equivalent from whatever wiki you are copying the template from). Sometimes templates use CSS in MediaWiki:Common.css (or rarely MediaWiki:Vector.css) to adjust colours and display stuff.
Some templates use the newer extension:TemplateStyles extension, but i don't think asbox is one of them. Bawolff (talk) 21:31, 8 December 2019 (UTC)

<code> tag: I need some additional tags

I use the code tag like a label to visually mark a particular paragraph, i.e. I label a paragraph as <code>informational</code>.

However, I need three more tags with different background colors to set other visual accents. How can I create such a tag as <code> to use it in my articles (i.e. <research> with blue background)? Where do I insert the code?

Thanks for any help. Jorgpeters (talk) 18:59, 1 December 2019 (UTC)

Check out Manual:Tag_extensions.
Alternatively, you could just use < div class="blue">...</ div> and add the CSS styling to MediaWiki:Common.css Jonathan3 (talk) 22:27, 1 December 2019 (UTC)
Another alternative is Templates. You can create a template named research containing <code style="background-color:aqua">{{{1}}}</code>, and then use {{research|Text here}} anywhere you wanted this type of tag (Note, if your text contains an equal sign, you have to do {{research|1=Text here that contains =}}). Bawolff (talk) 04:51, 2 December 2019 (UTC)

How to redact AbuseFilter log entries?

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


Is there a way to redact AbuseFilter log entries or make them only visible to sysops? I don't see any buttons for this but I often get public log entries that contain serious violations. Þjarkur (talk) 22:25, 1 December 2019 (UTC)

They can only be hidden in the same way edits are suppressed (i.e. from both normal users and sysops) - see `abusefilter-hide-log` DannyS712 (talk) 22:39, 1 December 2019 (UTC)
Oh I see, wasn't clear that only oversighters had this permission on Wikimedia sites. Thank you! Þjarkur (talk) 22:56, 1 December 2019 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Can not log in to webmail

Hi I recieved a txt msg saying my unusual activity on my exetel email service so it has been temporarily suspended. Please call 133938.

I did so, no answer.

Now I am unable to log into my webmail account.

Any help apreciated.

malcolmskitt@gmail.com 120.150.204.17 (talk) 06:53, 2 December 2019 (UTC)

This is not the right place to ask. Please contact your email provider.
Do note however, that its common for scammers to use text messages like those. You should probably directly contact your email provider, and not use the phone number in the text, as it may be part of a scam. Bawolff (talk) 08:55, 2 December 2019 (UTC)

Change namespaces' decriptions

I would like to change a default namespace description to a custom one, i.e. "User talk" to "User messages". In other words, to change the localized name. How could I do this? 190.218.204.206 (talk) 20:57, 2 December 2019 (UTC)

https://wikitech.wikimedia.org/wiki/Wikimedia_site_requests#Change_a_namespace explains aliases, though those instructions are for Wikimedia sites and not for MediaWiki in general. Malyacko (talk) 21:44, 2 December 2019 (UTC)
Yes, I already read that, but as you said, it is only for Wikimedia wikis. Isn't there any other way? Thanks. 190.218.204.206 (talk) 22:27, 2 December 2019 (UTC)
See Manual:$wgNamespaceAliases. Maybe something like $wgNamespaceAliases['User messages'] = NS_USER_TALK;
On second thoughts, maybe the example here is what you need: Manual_talk:$wgNamespaceAliases#How_to_rename_namespace_Image_to_File. Jonathan3 (talk) 23:14, 2 December 2019 (UTC)
It worked. Thank you :) 190.218.204.206 (talk) 23:56, 2 December 2019 (UTC)
you would use $wgExtraNamespaces . If you need your alternate name for user namespace to vary based on user gender (important in some languages) see $wgExtraGenderNamespaces Bawolff (talk) 07:27, 3 December 2019 (UTC)

rev_page field must not be 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.


MediaWiki 1.33.1

PHP 7.3.11 (cgi-fcgi)

MariaDB 10.3.17-MariaDB-1:10.3.17+maria~bionic

Wiki URL: http://www.seigmen.no/


Still struggling with the upgrade to Mediawiki version1.33.1, I have been working my way trough numerous encoding challenges, e.g. as previously posted in this thread,

As it turned out, all my wiki-tables and table colums were latin1-encoded, which I have now changed into UTF8, followed by re-run of http://www.seigmen.no/mw-config/, which appeared to be successfull. It seemed to fix the problems I was having with links to page titles in non-ASCII characters in them. However moving on to more testing, I've now run into problems with the creation of new pages. I'm getting this error.

[56c4be9643fd5923025ffef4] /index.php?title=Teststide&action=submit MediaWiki\Revision\IncompleteRevisionException from line 425 of ../httpd.www/includes/Revision/RevisionStore.php: rev_page field must not be 0!

Backtrace:

#0 ../httpd.www/includes/Revision/RevisionStore.php(493): MediaWiki\Revision\RevisionStore->failOnEmpty(integer, string)
#1 ../httpd.www/includes/Storage/PageUpdater.php(1120): MediaWiki\Revision\RevisionStore->insertRevisionOn(MediaWiki\Revision\MutableRevisionRecord, Wikimedia\Rdbms\DBConnRef)
#2 ../httpd.www/includes/Storage/PageUpdater.php(758): MediaWiki\Storage\PageUpdater->doCreate(CommentStoreComment, User, integer)
#3 ../httpd.www/includes/page/WikiPage.php(1914): MediaWiki\Storage\PageUpdater->saveRevision(CommentStoreComment, integer)
#4 ../httpd.www/includes/EditPage.php(2294): WikiPage->doEditContent(WikitextContent, CommentStoreComment, integer, boolean, User, string, array, integer)
#5 ../httpd.www/includes/EditPage.php(1586): EditPage->internalAttemptSave(array, boolean)
#6 ../httpd.www/includes/EditPage.php(687): EditPage->attemptSave(array)
#7 ../httpd.www/includes/actions/EditAction.php(60): EditPage->edit()
#8 ../httpd.www/includes/actions/SubmitAction.php(38): EditAction->show()
#9 ../httpd.www/includes/MediaWiki.php(499): SubmitAction->show()
#10 ../httpd.www/includes/MediaWiki.php(294): MediaWiki->performAction(Article, Title)
#11 ../httpd.www/includes/MediaWiki.php(865): MediaWiki->performRequest()
#12 ../httpd.www/includes/MediaWiki.php(515): MediaWiki->main()
#13 ../httpd.www/index.php(42): MediaWiki->run()
#14 {main}

Has anyone seen this before? Buman (talk) 00:19, 3 December 2019 (UTC)

The rev_page is a reference to the page_id from Manual:page table. It may be that, after your changes in the database, the auto_increment property of that field has been lost. You'll need to investigate if that's the case, which would cause a page with id 0 to be created. Ciencia Al Poder (talk) 10:23, 3 December 2019 (UTC)
Aha. You are right. I fixed the problem running
ALTER TABLE page MODIFY page_id int(10) unsigned PRIMARY KEY AUTO_INCREMENT;
Not sure how this "accident" happened, though. Most likely I've ruined a number of foreign keys pointing to this primary key, as well. Guess I'll look into recent backup of my database to recover them. Buman (talk) 15:51, 3 December 2019 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

git review -R doesn't work

Hello, I already converted these files, but when I want to push my changes (git review -R) I get this error https://pastebin.com/M3p8TrRv I spent a few hours trying solve it, but I can't find the solution. I changed my python version from 3.7 to 3.4, but it doesn't help. When I try to push changes from the root directory the error with Python disappears, but I get this error https://pastebin.com/cjWes84U . 2601:100:8000:7360:D456:7CCF:623C:9CF5 (talk) 02:49, 3 December 2019 (UTC)

you can try:
git push origin HEAD:refs/for/master
instead
The second error means for some reason its pushing to a branch named review where it should be pushing to master Bawolff (talk) 07:25, 3 December 2019 (UTC)

mw-config safe to delete?

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


Hello, is the folder mw-config safe to delete once the installation is completed? 93.185.116.78 (talk) 09:13, 3 December 2019 (UTC)

Yes Ciencia Al Poder (talk) 10:12, 3 December 2019 (UTC)
Thank you 93.185.116.78 (talk) 13:35, 3 December 2019 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Cannot download image, server down?

Hi,


I try to download an image of the Return of the Prodigal Son (Rembrandt) and I get this message:


Request from 89.98.4.249 via cp3057 frontend, Varnish XID 372717810

Upstream caches: cp3057 int

Error: 500, Internal Server Error at Tue, 03 Dec 2019 12:18:57 GMT


Will this be fixed or is this a permanent failure? WikiSKOK (talk) 12:26, 3 December 2019 (UTC)

You have not mentioned which website that is about. You may want to contact whoever runs that website. Malyacko (talk) 18:04, 3 December 2019 (UTC)
well cp3057 is one of wikimedia's europe (esams) caching proxy, so its us!
Exact url would be helpful though Bawolff (talk) 23:40, 3 December 2019 (UTC)

Block every user?

Hi Mediawiki friends. I'm looking to retool an existing wiki and I need to prevent access for a few thousand users who have registered over the years. Is there a way to give every account an indefinite block? Or some better method? Sonny Santiago (talk) 15:11, 3 December 2019 (UTC)

You could disable reading to users $wgGroupPermissions['user']['read'] = false; and create a new user group that allows reading $wgGroupPermissions['newusergroup']['read'] = true; and grant new users this flag.
This would still allow old accounts to log in, but won’t be able to do anything.

181.179.30.49 (talk) 15:24, 3 December 2019 (UTC)
Thank you for the quick reply. This could work. Sonny Santiago (talk) 15:40, 3 December 2019 (UTC)

Content model "Sanitized CSS"?

Hi,


I try to save an infobox after I have edited it and I get an error:

Page Mall:Faktamall/styles.css must have content model "Sanitized CSS" for TemplateStyles (current model is "wikitext").

Page Mall:Dokumentation/styles.css has no content.


What is this Sanitized CSS and where should I place it?


rh Akhbar zeb (talk) 09:26, 4 December 2019 (UTC)

'Sanitized CSS' is a type of 'Page content model', which you can change via the 'Page information' view (under 'Basic information'). You can open 'Page information' from the drop-down menu next to 'Discussion'.
Making this change on a .css page of mine removed the error message generated by TemplateStyles. Horblegorble (talk) 09:22, 29 August 2022 (UTC)
On the page Special:ChangeContentModel . Please also see "Post a new question" in the sidebar. Malyacko (talk) 13:57, 29 August 2022 (UTC)

HTML Tags - Issues after upgrading to 1.33.1

I recently upgraded my site from version 1.28.2 to 1.33.1. It was successful albeit with some minor issues. The main one being that the custom backgrounds I was using no longer appear to function. Basically, my site is divided into different groups of articles. These articles are marked by special templates that assign it a category and also use HTML tags to change the background and link colors. Below are some examples:

http://omniversenexus.net/wiki/Template:Galactic_Crucibles

http://omniversenexus.net/wiki/Template:Erudite_Tales

After upgrading, even though the link recolorings still work, the body tag does not, and thus, no background appears. But prior to the upgrade, these templates worked just fine.

Here's what I have in my LocalSettings.php in regards to the HTML Tags.

#HTML Tags

include_once "$IP/extensions/HTMLTags/HTMLTags.php";

$wgHTMLTagsAttributes['a'] = array( 'href', 'class', 'id' );

$wgHTMLTagsAttributes['body'] = array( 'style', 'background', 'bgcolor', 'class', 'id' );

$wgHTMLTagsAttributes['meta'] = array( 'itemprop', 'content' );

$wgHTMLTagsAttributes['span'] = array( 'itemprop', 'itemscope', 'itemtype' );

$wgHTMLTagsAttributes['img'] = array( 'style', 'src', 'height', 'width', 'alt', 'class', 'id' );

$wgHTMLTagsAttributes['style'] = array();


What do I need to change in order to get the backgrounds to reappear again? The only other change I had to make during the upgrade was to disable the HeaderTabs extension as otherwise, the site would throw a 500 error. Here is the version information on my wiki if it proves necessary:

http://omniversenexus.net/wiki/Special:Version

EDIT: In the process of upgrading, I also changed to PHP Version 7.3 from 5.6. Krayfishkarl (talk) 18:01, 4 December 2019 (UTC)

You created a public facing non secure website that can compromise the security of any visitor with an XSS vulnerability...
I'm not visiting it if you don't mind ;)
Also, i'm deducing that you are placing a body tag inside a body tag, so I don't know why and how that worked before, but the parser in the newer version likely isn't having such invalid HTML and it removes the body tag from the output regardless of what you specified.
Please use CSS and the skinning system to change the look of your website and pages, that is what they are FOR. HTML Tag is NOT what you should ever be using unless your really really really know what you are doing. —TheDJ (Not WMF) (talkcontribs) 09:09, 5 December 2019 (UTC)
Thank you for bringing this to my attention. I'll look into an alternative solution. In the meantime, I've disabled HTML Tags as a hotfix. Krayfishkarl (talk) 14:01, 5 December 2019 (UTC)

delete account

How do i delete my mediawiki account Foev233 (talk) 19:22, 4 December 2019 (UTC)

See Wikipedia:FAQ#How do I change my username/delete my account? AhmadF.Cheema (talk) 21:59, 4 December 2019 (UTC)

every picture does not upload

hi everyone, every picture i try to upload can not be uploaded. it says that only pictures that mee guidelines can be uploaded. i really dont know wht the problem is. no numberplates are to be seen and the pictures are all taken by myself... please help, thanks. 92.193.156.1 (talk) 20:34, 4 December 2019 (UTC)

On which website are you trying to upload these pictures? AhmadF.Cheema (talk) 21:58, 4 December 2019 (UTC)

Installing echo Extension

Hello,

I am experiencing troubles by installing the extension Echo.


I use the following versions:

Mediawiki 1.32 + Echo REL_1-33

As well as

Mediawiki 1.32 + Echo_REL_1-32


I just followed the instructions step by step as shown here:

Extension:Echo#Installing

As I have no access to SSH, I use the /mw-config/ web-Updater, but I always end up with errors. 2A02:810A:87C0:314:5507:66DA:AE30:655D (talk) 22:51, 4 December 2019 (UTC)

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


Hello. I've been working on this nav box issue all day and I can't seem to figure out why there are no borders around it.

http://www.paranormal-university.com/wiki/index.php?title=Template:Navbox_Classes

Here's the page for example. The rows don't alternate either.

Where did I go wrong? Queennicci (talk) 00:12, 5 December 2019 (UTC)

I am using the most recent release of wikimedia and have enabled parser. Queennicci (talk) 09:56, 5 December 2019 (UTC)
You probably need some CSS from Wikipedia. Look for "navbox" in MediaWiki:Common.css Ciencia Al Poder (talk) 10:27, 5 December 2019 (UTC)
I wish I'd had this answer a day ago lmao. I figured this out in the middle of the night around 3 AM. Now it all works and I came here to close this out. thanks

Queennicci (talk) 16:42, 5 December 2019 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

How do I set the "remember me" checkbox to "checked" by default?

I would like our users to remain logged, so would like the "remember me" checkbox set by default. I found an article that describes using a hook to do this (https://webmasters.stackexchange.com/questions/79907/how-to-set-the-keep-me-logged-in-box-to-true-in-mediawiki-specialuserlogin/80941). It seemed hacky, but since I could not find a config setting to do this, I tried it. It actually works OK, except I now get an exception when I try to create a new user. Is there a proper way to set this box to "checked" by default? Thanks! Tenbergen (talk) 00:56, 5 December 2019 (UTC)

This code should do want you want. I moved it there because this flow board cannot even format code properly. – Ammarpad (talk) 20:41, 7 December 2019 (UTC)
Thank you Ammarpad, that does the trick, and the account creation page works with this one. Will you maintain the answer at your sandbox or should I copy it into a subpage of my user page? Or is there a more appropriate place to document this? Tenbergen (talk) 00:47, 9 December 2019 (UTC)
You can copy and reuse it anywhere per the usual mediawiki.org license. I don't know any appropriate documentation to add it now, if you happen to know one, you can add it (with appropriate caveat for hacks). – Ammarpad (talk) 06:18, 9 December 2019 (UTC)
@Ammarpad You can add it as a subpage of Snippets. Ciencia Al Poder (talk) 10:15, 9 December 2019 (UTC)

Is it possible to set my MediaWiki Landingpage to only show the searchbar?

Such as wikipedia.org / wikipedia.de or google.com does it.

I want to have the starting point of my wiki as lean as possible? But for right now I do not have a single clue on how to do that...

Many Thanks!! IamTH25 (talk) 06:44, 5 December 2019 (UTC)

Just write a separate webpage for that and route your main entry point to that page. That's how www.wikipedia.org etc do this (it's not wiki functionality). —TheDJ (Not WMF) (talkcontribs) 08:44, 5 December 2019 (UTC)
Thank you very much!
And the Wiki Search can be integrated, eventhough it will be an external page? IamTH25 (talk) 09:05, 5 December 2019 (UTC)
search is available through an api, so yes. This is the source code for www.wikipedia.org and it's sister portals: https://github.com/wikimedia/portalsTheDJ (Not WMF) (talkcontribs) 09:25, 5 December 2019 (UTC)

Meta tags in skin from MediaWiki template

Hi! I'm a little bit confused with interacting between template and skin.

Let's say i have a template in my MediaWiki like

<includeonly>
  
  <div id="custom-person">
  
  * <span>Birthday:</span> {{#if: {{{birth date|}}} | <b>{{#ol-time:|{{{birth date}}}}}</b> | — }}
{{#if: {{{full name|}}} | * <span>full name:</span> <b>{{{full name}}}</b>}}
{{#if: {{{birth place|}}} | * <span>birth place:</span> <b>{{{birth place}}}</b>}}
{{#if: {{{age|}}} | * <span> age:</span> <b>{{{age}}}</b>}}
{{#if: {{{nationality|}}} | * <span> nationality:</span> <b>{{{nationality}}}</b>}}

<div class="clear"></div>

</div>

[[Category:Person]]

__NOTOC__

</includeonly>

All these pages are in one Namespace (0).

I need to generate head meta tags with data from this template.

I figured out how to filter such a pages and add title tags in my SkinPerson.php

if ( $out->getTitle()->getNamespace() == 0 ) {
    $out->addMeta( "description", $out->getPageTitle());
    $out->addHeadItem( 'og:description', '<meta property="og:description" content="' . $out->getPageTitle() . '">');
}

But I'm really stuck on how can I insert in, say, 'og:description' tag something like {{{full name}}} + {{{age}}} ?


Thanks in advance! Headshaker1 (talk) 06:48, 5 December 2019 (UTC)

wikitext templates are not simple key values, they are multilevel nested templating with logic that generates HTML. As such it is hard to retrieve the result of a parameter and reuse it elsewhere. Traditionally, we use parser functions like for instance #coordinates provided by Extension:GeoData. This parser function then is executing during the parsing of all the wikitext code of a page, extracts values and puts them into a storage location where it is reachable with database functions.
Then you reuse that information every time the page is rendered.
Maybe you should use something like Extension:Page Forms to store and retrieve your values. I suspect it will have some hooks that will allow you to retrieve the data in a hook so that you can add head items etc. —TheDJ (Not WMF) (talkcontribs) 08:57, 5 December 2019 (UTC)
Note that, for setting just a meta description tag, you can use Extension:Description2 Ciencia Al Poder (talk) 10:31, 5 December 2019 (UTC)
Thank you! I'll try to solve it one of these ways Headshaker1 (talk) 12:14, 5 December 2019 (UTC)
I use Extension:WikiSEO for this and suspect it would work for you too. I use it alongside Extension:Cargo but from memory it would work the same within any template. Jonathan3 (talk) 23:08, 7 December 2019 (UTC)

Meta search across multiple media wiki instances

Currently, I have the problem of having to conjoin content from different media wikis into one big "new" media wiki. In order to bridge the time between the implementation of the new instance and now, the question is if there is a way to implement a meta search function across all old and already existing instances occured. Maybe you have an answer for this problem.

Thank you for your help in advance! Userdanny95 (talk) 09:40, 5 December 2019 (UTC)

Help Please Error Backtrace after Wikibase enable

Hi there can you guys please help me out with this error.

Sorry! This site is experiencing technical difficulties.

Try waiting a few minutes and reloading.

(Cannot access the database)

Backtrace:

#0 /home/admin/web/amateurradiowiki.com/public_html/includes/libs/rdbms/loadbalancer/LoadBalancer.php(758): Wikimedia\Rdbms\LoadBalancer->reportConnectionError()

#1 /home/admin/web/amateurradiowiki.com/public_html/includes/dao/DBAccessBase.php(65): Wikimedia\Rdbms\LoadBalancer->getConnection(0, Array, 'repo')

#2 /home/admin/web/amateurradiowiki.com/public_html/extensions/Wikibase/lib/includes/Store/Sql/SiteLinkTable.php(259): DBAccessBase->getConnection(-1)

#3 /home/admin/web/amateurradiowiki.com/public_html/extensions/Wikibase/lib/includes/Store/CachingSiteLinkLookup.php(147): Wikibase\Lib\Store\Sql\SiteLinkTable->getItemIdForLink('admin_wiki', 'Main Page')

#4 /home/admin/web/amateurradiowiki.com/public_html/extensions/Wikibase/lib/includes/Store/CachingSiteLinkLookup.php(75): Wikibase\Lib\Store\CachingSiteLinkLookup->getAndCacheItemIdForLink('admin_wiki', 'Main Page')

#5 /home/admin/web/amateurradiowiki.com/public_html/extensions/Wikibase/client/includes/LangLinkHandler.php(101): Wikibase\Lib\Store\CachingSiteLinkLookup->getItemIdForLink('admin_wiki', 'Main Page')

#6 /home/admin/web/amateurradiowiki.com/public_html/extensions/Wikibase/client/includes/LangLinkHandler.php(332): Wikibase\Client\LangLinkHandler->getEntityLinks(Object(Title))

#7 /home/admin/web/amateurradiowiki.com/public_html/extensions/Wikibase/client/includes/LangLinkHandler.php(353): Wikibase\Client\LangLinkHandler->getEffectiveRepoLinks(Object(Title), Object(ParserOutput))

#8 /home/admin/web/amateurradiowiki.com/public_html/extensions/Wikibase/client/includes/Hooks/ParserOutputUpdateHookHandlers.php(97): Wikibase\Client\LangLinkHandler->addLinksFromRepository(Object(Title), Object(ParserOutput))

#9 /home/admin/web/amateurradiowiki.com/public_html/extensions/Wikibase/client/includes/Hooks/ParserOutputUpdateHookHandlers.php(65): Wikibase\Client\Hooks\ParserOutputUpdateHookHandlers->doContentAlterParserOutput(Object(Title), Object(ParserOutput))

#10 /home/admin/web/amateurradiowiki.com/public_html/includes/Hooks.php(174): Wikibase\Client\Hooks\ParserOutputUpdateHookHandlers::onContentAlterParserOutput(Object(WikitextContent), Object(Title), Object(ParserOutput))

#11 /home/admin/web/amateurradiowiki.com/public_html/includes/Hooks.php(202): Hooks::callHook('ContentAlterPar...', Array, Array, NULL)

#12 /home/admin/web/amateurradiowiki.com/public_html/includes/content/AbstractContent.php(559): Hooks::run('ContentAlterPar...', Array)

#13 /home/admin/web/amateurradiowiki.com/public_html/includes/Revision/RenderedRevision.php(265): AbstractContent->getParserOutput(Object(Title), 159, Object(ParserOptions), true)

#14 /home/admin/web/amateurradiowiki.com/public_html/includes/Revision/RenderedRevision.php(234): MediaWiki\Revision\RenderedRevision->getSlotParserOutputUncached(Object(WikitextContent), true)

#15 /home/admin/web/amateurradiowiki.com/public_html/includes/Revision/RevisionRenderer.php(193): MediaWiki\Revision\RenderedRevision->getSlotParserOutput('main')

#16 /home/admin/web/amateurradiowiki.com/public_html/includes/Revision/RevisionRenderer.php(142): MediaWiki\Revision\RevisionRenderer->combineSlotOutput(Object(MediaWiki\Revision\RenderedRevision), Array)

#17 [internal function]: MediaWiki\Revision\RevisionRenderer->MediaWiki\Revision\{closure}(Object(MediaWiki\Revision\RenderedRevision), Array)

#18 /home/admin/web/amateurradiowiki.com/public_html/includes/Revision/RenderedRevision.php(197): call_user_func(Object(Closure), Object(MediaWiki\Revision\RenderedRevision), Array)

#19 /home/admin/web/amateurradiowiki.com/public_html/includes/poolcounter/PoolWorkArticleView.php(194): MediaWiki\Revision\RenderedRevision->getRevisionParserOutput()

#20 /home/admin/web/amateurradiowiki.com/public_html/includes/poolcounter/PoolCounterWork.php(123): PoolWorkArticleView->doWork()

#21 /home/admin/web/amateurradiowiki.com/public_html/includes/page/Article.php(773): PoolCounterWork->execute()

#22 /home/admin/web/amateurradiowiki.com/public_html/includes/actions/ViewAction.php(68): Article->view()

#23 /home/admin/web/amateurradiowiki.com/public_html/includes/MediaWiki.php(499): ViewAction->show()

#24 /home/admin/web/amateurradiowiki.com/public_html/includes/MediaWiki.php(294): MediaWiki->performAction(Object(Article), Object(Title))

#25 /home/admin/web/amateurradiowiki.com/public_html/includes/MediaWiki.php(865): MediaWiki->performRequest()

#26 /home/admin/web/amateurradiowiki.com/public_html/includes/MediaWiki.php(515): MediaWiki->main()

#27 /home/admin/web/amateurradiowiki.com/public_html/index.php(42): MediaWiki->run()

#28 {main}

Happens when I enable

#$wgEnableWikibaseRepo = false;

#$wgEnableWikibaseClient = true;

#require_once "$IP/extensions/Wikibase/client/WikibaseClient.php";

#require_once "$IP/extensions/Wikibase/client/ExampleSettings.php";

I followed the documentation page to install Wikibase, still wont let me. I had to comment those out on LocalSettings.php to allow access. CrossFire10100 (talk) 10:48, 5 December 2019 (UTC)

@CrossFire10100 If also non-"guys" may ask: Which exact MediaWiki version? Which exact Wikibase version/branch? Which steps did you follow (link)? Malyacko (talk) 01:55, 6 December 2019 (UTC)
my guess is that it thinks the wikibase repository is in some database other than your main one, that doesnt exist. I think a db name of repo is the default. Maybe try looking into the config options related to db access to tell it to use the db you want. Bawolff (talk) 00:20, 7 December 2019 (UTC)

editor menu toolbar missing after update

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


It was present in my copy of 1.30 but after i updated last night. Now the toolbar with formatting options like bold, italics, etc is missing.


Is it something I'm missing in the localsettings? Queennicci (talk) 17:58, 5 December 2019 (UTC)

To which version did you update? Which exact editor are you using? Malyacko (talk) 01:53, 6 December 2019 (UTC)
I updated to the most recent version of 1.33 and I was using the default editor before. Queennicci (talk) 19:51, 6 December 2019 (UTC)
Oh wow I feel stupid. Thank you. I guess I wasn't using the default editor. Queennicci (talk) 19:52, 6 December 2019 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

I installed the homebrew browser and I get the error 104 trying to read repositories list, and then error 81. How do I fix this repositories list connection?

Dwwolfy (talk) 19:02, 5 December 2019 (UTC)
@Dwwolfy No idea. Why do you think that people on the support desk for the MediaWiki software know something called "homebrew browser"? :) Malyacko (talk) 01:52, 6 December 2019 (UTC)

LDAP Login: There seems to be a problem with your login session; this action has been canceled as a precaution against session hijacking. Please resubmit the form.

Hi there,

currently I am trying to add LDAP authentication to my media wiki instance. I was able to log in once but on logging back in i revive the above error.

Mediawiki : 1.31

PHP: 7.2

Mysql: 5.5.62


Here is my LocalSetting.php


<?php

# This file was automatically generated by the MediaWiki 1.23.6

# installer. If you make manual changes, please keep track in case you

# need to recreate them later.

#

# See includes/DefaultSettings.php for all configurable settings

# and their default values, but don't forget to make changes in _this_

# file, not there.

#

# Further documentation for configuration settings may be found at:

# https://www.mediawiki.org/wiki/Manual:Configuration_settings

# Protect against web entry

if ( !defined( 'MEDIAWIKI' ) ) {

   exit;

}

wfLoadSkin( 'Vector' );

## Uncomment this to disable output compression

# $wgDisableOutputCompression = true;

## The protocol and server name to use in fully-qualified URLs

$wgServer = "https://site.com";

## The relative URL path to the skins directory

$wgStylePath = "$wgScriptPath/skins";

## The relative URL path to the logo.  Make sure you change this from the default,

## or else you'll overwrite your logo when you upgrade!

$wgLogo = "$wgScriptPath/images/cis_logo.png";

## UPO means: this is also a user preference option

$wgEnableEmail = false;

$wgEnableUserEmail = true; # UPO

$wgEmergencyContact = "webmaster@site.com";

$wgPasswordSender = "webmaster@site.com";

$wgEnotifUserTalk = false; # UPO

$wgEnotifWatchlist = false; # UPO

$wgEmailAuthentication = true;

## Database settings

$wgDBtype = "mysql";

$wgDBserver = "mysql.site.com";

$wgDBname = "dbuser";

$wgDBuser = "dbuser";

$wgDBpassword = "dbpassword";

# MySQL table options to use during installation or update

$wgDBTableOptions = "ENGINE=InnoDB, DEFAULT CHARSET=utf8";

# Experimental charset support for MySQL 5.0.

$wgDBmysql5 = false;

## Shared memory settings

$wgMainCacheType = CACHE_NONE;

$wgParserConf = array('class' => 'Parser',);

#$wgMainCacheType = CACHE_MEMCACHED;

#$wgMemCachedServers = ['127.0.0.1:11211'];

#$wgSessionsInMemcached = true;

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

## is writable, then set this to true:

$wgEnableUploads = true;

$wgUseImageMagick = true;

$wgImageMagickConvertCommand = "/usr/bin/convert";

# InstantCommons allows wiki to use images from http://commons.wikimedia.org

$wgUseInstantCommons = false;

## If you use ImageMagick (or any other shell command) on a

## Linux server, this will need to be set to the name of an

## available UTF-8 locale

$wgShellLocale = "en_US.utf8";

## If you want to use image uploads under safe mode,

## create the directories images/archive, images/thumb and

## images/temp, and make them all writable. Then uncomment

## this, if it's not already uncommented:

#$wgHashedUploadDirectory = false;

## Set $wgCacheDirectory to a writable directory on the web server

## to make your wiki go slightly faster. The directory should not

## be publically accessible from the web.

#$wgCacheDirectory = "$IP/cache";

# Site language code, should be one of the list in ./languages/Names.php

$wgLanguageCode = "en";

## Default skin: you can change the default skin. Use the internal symbolic

## names, ie 'cologneblue', 'monobook', 'vector':

$wgDefaultSkin = "vector";

## For attaching licensing metadata to pages, and displaying an

## appropriate copyright notice / icon. GNU Free Documentation

## License and Creative Commons licenses are supported so far.

$wgRightsPage = ""; # Set to the title of a wiki page that describes your license/copyright

$wgRightsUrl = "";

$wgRightsText = "";

$wgRightsIcon = "";

# Path to the GNU diff3 utility. Used for conflict resolution.

$wgDiff3 = "/usr/bin/diff3";

# The following permissions were set based on your choice in the installer

$wgGroupPermissions['*']['createaccount'] = false;

$wgGroupPermissions['*']['edit'] = false;

$wgDebugLogFile = "/path/to/error.log";

$wgDebugLogGroups['LDAPProvider'] = '/path/to/LDAP.log';

$

# End of automatically generated settings.

# Add more configuration options below.

# Misc settings

#$wgFileExtensions = array_merge( $wgFileExtensions, array( 'zip' ) );

# LDAP

error_reporting( -1 );

ini_set( 'display_errors', 1 );

#$wgLDAPDebug = 0;

#$wgShowSQLErrors = true;

#$wgDebugDumpSql  = true;

#$wgShowDBErrorBacktrace = true;

$wgShowExceptionDetails = true;

wfLoadExtensions( [

   'PluggableAuth',

   'Auth_remoteuser',

   'LDAPProvider',

   'LDAPAuthentication2',

   'LDAPAuthorization',

   'LDAPGroups',

   'LDAPUserInfo'

] );

$wgAuthRemoteuserAllowUserSwitch = true;

$wgPluggableAuth_EnableLocalLogin = false;

$wgShowExceptionDetails = true;

#$wgAuthRemoteuserUserNameReplaceFilter = [

#    '@win2.cs.ksu.edu$' => ''

#];

$wgAuthRemoteuserUserName = function() {

   $user = '';

   if( isset( $_SERVER[ 'REMOTE_USER' ] ) ) {

       $user = strtolower( $_SERVER[ 'REMOTE_USER' ] );

   }

   return $user;

};

$LDAPProviderDomainConfigProvider = function() {

       $config = [

               'AD' => [

                       'connection' => [

                               "server" => "AD.site.com",

                               "user" => "CN=searchuser,CN=Users,DC=site,DC=com",

                               "pass" => 'searchuser_pass',

                               "options" => [

                                       "LDAP_OPT_DEREF" => 1

                               ],

                               "grouprequest" => "MediaWiki\\Extension\\LDAPProvider\\UserGroupsRequest\\UserMemberOf::factory",

                               "emailattribute" => "saaccountname",

                               "basedn" => "dc=site,dc=com",

                               "groupbasedn" => "dc=site,dc=com",

                               "userbasedn" => "dc=site,dc=com",

                               "searchattribute" => "samaccountname",

                               "searchstring" => "",

                               "usernameattribute" => "samaccountname",

                               "realnameattribute" => "cn"

                       ],

                       'authorization' => [

               'rules' => [

                   'groups' => [

                       'required' => [

                           'cn=admins,dc=site,dc=com'

                       ]

                   ]

               ]

           ],

                       'userinfo' => [

                               "attributes-map" => [

                                       "realname" => "cn"

                               ]

                       ],

                       'groupsync' => [

                               "mechanism" => "mappedgroups",

                               "mapping" => [

                                       "sysop" => "cn=admins,dc=site,dc=com",

                                       "customgroup" => "CN=Users,DC=site,DC=com"

                               ]

                       ]

              ]

       ];

       return new \MediaWiki\Extension\LDAPProvider\DomainConfigProvider\InlinePHPArray( $config );

   };

# timezone

$wgLocaltimezone = "US/Central";

date_default_timezone_set( $wgLocaltimezone );

# turn on the nice editor by default.

wfLoadExtensions(['WikiEditor']);

# WikiEditor Options

#wfLoadExtension( ['VisualEditor'] );

$wgDefaultUserOptions['usebetatoolbar'] = 1;

$wgDefaultUserOptions['usebetatoolbar-cgd'] = 1;

# Displays the Preview and Changes tabs

$wgDefaultUserOptions['wikieditor-preview'] = 1;

# Displays the Publish and Cancel buttons on the top right side

$wgDefaultUserOptions['wikieditor-publish'] = 1;

# allow linking/embedding of images from external sites

$wgAllowExternalImages = true;

# Enable Seealso extension

# H.D.G. 1/15/2015

#require_once "$IP/extensions/Seealso/Seealso.php";

# Enable MsUpload extension

# H.D.G. 1/15/2015

#equire_once "$IP/extensions/MsUpload/MsUpload.php";

#wfLoadExtension( ['MsUpload']);

# Enable Labeled Section Transclusion

# H.D.G 1/23/15

#require_once "$IP/extensions/LabeledSectionTransclusion/lst.php";

#require_once "$IP/extensions/LabeledSectionTransclusion/lsth.php";

# Enable syntax highlighting

# SDG 2/25/2016

#require_once "$IP/extensions/SyntaxHighlight_GeSHi/SyntaxHighlight_GeSHi.php";


Here are the logs the issues causes.


IP: 192.168.1.5

Start request POST /Docs/index.php?title=Special:UserLogin&returnto=Main+Page

HTTP HEADERS:

HOST: site.com

USER-AGENT: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:70.0) Gecko/20100101 Firefox/70.0

ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8

ACCEPT-LANGUAGE: en-US,en;q=0.5

ACCEPT-ENCODING: gzip, deflate, br

CONTENT-TYPE: application/x-www-form-urlencoded

CONTENT-LENGTH: 237

ORIGIN: https://site.com

CONNECTION: keep-alive

REFERER: https://site.com/Docs/index.php?title=Special:UserLogin&returnto=Main+Page

COOKIE: support_dev_wm_UserName=myuser; support_dev_wm_51a2e67c_session=hq9p1mjl1at2ihtt4dgppnealuc589uh

UPGRADE-INSECURE-REQUESTS: 1

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

[caches] LocalisationCache: using store LCStoreDB

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

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

[DBReplication] Cannot use ChronologyProtector with EmptyBagOStuff.

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

   "IPAddress": "192.168.1.5",

   "UserAgent": "Mozilla\/5.0 (X11; Ubuntu; Linux x86_64; rv:70.0) Gecko\/20100101 Firefox\/70.0",

   "ChronologyProtection": false,

   "ChronologyPositionIndex": 0

}

[DBConnection] Wikimedia\Rdbms\LoadBalancer::openConnection: connected to database 0 at 'db.site.com'.

[SQLBagOStuff] Connection 6325684 will be used for SqlBagOStuff

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

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

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

[cookie] setcookie: "support_dev_wm_51a2e67c_session", "", "1544038447", "/", "", "1", "1"

[cookie] already deleted setcookie: "support_dev_wm_51a2e67cUserID", "", "1544038447", "/", "", "1", "1"

[cookie] already deleted setcookie: "support_dev_wm_51a2e67cToken", "", "1544038447", "/", "", "1", "1"

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

[DBConnection] Wikimedia\Rdbms\LoadBalancer::openConnection: connected to database 0 at 'db.site.com'.

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

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

[cookie] setcookie: "support_dev_wm_51a2e67c_session", "2ca7ii61auemaic26d3fnefgrusmamrh", "0", "/", "", "1", "1"

[cookie] already deleted setcookie: "support_dev_wm_51a2e67cRemoteToken", "", "1578166447", "/", "", "1", "1"

[cookie] already deleted setcookie: "support_dev_wm_51a2e67cUserID", "", "1544038447", "/", "", "1", "1"

[cookie] already deleted setcookie: "support_dev_wm_51a2e67cToken", "", "1544038447", "/", "", "1", "1"

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

[session] SessionBackend "2ca7ii61auemaic26d3fnefgrusmamrh" Taking over PHP session

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

[cookie] already set setcookie: "support_dev_wm_51a2e67c_session", "2ca7ii61auemaic26d3fnefgrusmamrh", "0", "/", "", "1", "1"

[cookie] already deleted setcookie: "support_dev_wm_51a2e67cRemoteToken", "", "1578166447", "/", "", "1", "1"

[cookie] already deleted setcookie: "support_dev_wm_51a2e67cUserID", "", "1544038447", "/", "", "1", "1"

[cookie] already deleted setcookie: "support_dev_wm_51a2e67cToken", "", "1544038447", "/", "", "1", "1"

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

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

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

Parser: using preprocessor: Preprocessor_DOM

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

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

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

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

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

MediaWiki::preOutputCommit: primary transaction round committed

MediaWiki::preOutputCommit: pre-send deferred updates completed

MediaWiki::preOutputCommit: LBFactory shutdown completed

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

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

OutputPage::sendCacheControl: private caching;  **

Request ended normally

[session] Saving all sessions on shutdown

[DBConnection] Wikimedia\Rdbms\{closure}: closing connection to database 'db.site.com'.

[DBConnection] Wikimedia\Rdbms\{closure}: closing connection to database 'db.site.com'.


Thanks in advance! Bongo0458 (talk) 19:51, 5 December 2019 (UTC)

MW 1.31 down because of no obvious reason?

Since some months our wiki (MW 1.31.5) experiences a strange error, that happens maybe twice a week (on average).

The php error log is as follows:

[06-Dec-2019 10:02:16 CET] PHP Fatal error:  Uncaught Error: Call to a member function getCode() on null in /html/site/mediawiki/includes/user/User.php:1737
Stack trace:
#0 /html/site/mediawiki/includes/user/User.php(5417): User::getDefaultOptions()
#1 /html/site/mediawiki/includes/user/User.php(3101): User->loadOptions()
#2 /html/site/mediawiki/includes/context/RequestContext.php(336): User->getOption('language')
#3 /html/site/mediawiki/includes/Message.php(380): RequestContext->getLanguage()
#4 /html/site/mediawiki/includes/Message.php(1290): Message->getLanguage()
#5 /html/site/mediawiki/includes/Message.php(842): Message->fetchMessage()
#6 /html/site/mediawiki/includes/Message.php(934): Message->toString('text')
#7 /html/site/mediawiki/includes/exception/MWExceptionRenderer.php(201): Message->text()
#8 /html/site/mediawiki/includes/exception/MWExceptionRenderer.php(301): MWExceptionRenderer::msg('dberr-problems', 'Sorry! This sit...')
#9 /ht in /html/site/mediawiki/includes/user/User.php on line 1737

Sometimes this error happens once a day, sometimes several times within one minute.

As a consequence the site is down for some seconds and editors get kicked out (logged out) of the wiki.

I googled the error messages several times, but didn't find anything helpful.

Who can point me in the right direction to fix this annoying error please?

The site in question is https://secret-wiki.de/wiki/Spezial:Version and has ~ 60.000 visitors monthly, but this error also happens occasionally on another public MW 1.31 install that I run. Stefahn (talk) 10:06, 6 December 2019 (UTC)

Project:Support desk/Flow/2017/07#h-Error_after_migraton:_Call_to_a_member_function_getCode()_on_null-2017-07-19T07:28:00.000Z and Project:Support desk/Flow/2018/02#h-How_to_roll_back_the_configuration?-2018-02-01T13:12:00.000Z look a bit similar? Malyacko (talk) 22:08, 6 December 2019 (UTC)
so it looks like the error (about getCode) happens when trying to show an error message about not being able to connect to database. Perhaps your dayabase server is unstable or overloaded (maybe it hit max concurrent users or something). Unfortunately the error you posted doesnt have details, but maybe there is more fmdetails in debug log or something Bawolff (talk) 00:07, 7 December 2019 (UTC)

access data in graph extension using aws api

Hi All,

Could you please help me out to access data for graph(using graph extension) from aws api.

here is example(below) where I am using Data :values hard coded({"category":"HR", "members":100},) is there is any way to access data through aws api

department verses employee bar chart

<graph  mode=interactive >

{

  "width": 400,

  "height": 200,

  "padding": {"top": 10, "left": 30, "bottom": 20, "right": 10},

  "data": [

    {

      "name": "table",

      "values": [

        {"category":"HR", "members":100},

        {"category":"Technology", "members":500},

        {"category":"BDE", "members":200},

        {"category":"Retail", "members":91},

        {"category":"Customer", "members":81},

        {"category":"MD", "members":53},

        {"category":"Finance", "members":19},

        {"category":"R&D", "members":87},

        {"category":"Animation", "members":52}

      ]

    }

  ],

  "signals": [

    {

      "name": "tooltip",

      "init": {},

      "streams": [

        {"type": "rect:mouseover", "expr": "datum"},

        {"type": "rect:mouseout", "expr": "{}"}

      ]

    }

  ],

  "predicates": [

    {

      "name": "tooltip", "type": "==",

      "operands": [{"signal": "tooltip._id"}, {"arg": "id"}]

    }

  ],

  "scales": [

    { "name": "xscale", "type": "ordinal", "range": "width",

      "domain": {"data": "table", "field": "category"} },

    { "name": "yscale", "range": "height", "nice": true,

      "domain": {"data": "table", "field": "members"} }

  ],

  "axes": [

    { "type": "x", "scale": "xscale" },

    { "type": "y", "scale": "yscale" }

  ],

  "marks": [

    {

      "type": "rect",

      "from": {"data":"table"},

      "properties": {

        "enter": {

          "x": {"scale": "xscale", "field": "category"},

          "width": {"scale": "xscale", "band": true, "offset": -1},

          "y": {"scale": "yscale", "field": "members"},

          "y2": {"scale": "yscale", "value":0}

        },

        "update": { "fill": {"value": "steelblue"} },

        "hover": { "fill": {"value": "red"} }

      }

    },

    {

      "type": "text",

      "properties": {

        "enter": {

          "align": {"value": "center"},

          "fill": {"value": "#333"}

        },

        "update": {

          "x": {"scale": "xscale", "signal": "tooltip.category"},

          "dx": {"scale": "xscale", "band": true, "mult": 0.5},

          "y": {"scale": "yscale", "signal": "tooltip.members", "offset": -5},

          "text": {"signal": "tooltip.amount"},

          "fillOpacity": {

            "rule": [

              {

                "predicate": {"name": "tooltip", "id": {"value": null}},

                "value": 0

              },

              {"value": 1}

            ]

          }

        }

      }

    }

  ]

}

</graph> SumanGadhawal (talk) 12:31, 6 December 2019 (UTC)

What is "aws api"? Malyacko (talk) 22:07, 6 December 2019 (UTC)
Amazon web service API I mean if we created a get api on aws to access database and response of that api should be data in graph SumanGadhawal (talk) 05:20, 7 December 2019 (UTC)
see the external data section of https://www.mediawiki.org/wiki/Extension:Graph . Bawolff (talk) 00:03, 7 December 2019 (UTC)

Edit Upload Form: Source File

I wanted to modify the text within the "Source File" box on the upload page. It currently lists extensions and maximum file size that do not match what is in my LocalSettings file. I am not sure which file to edit. MediaWiki:Uploadtext is not the correct one, and here lists Upload-ownwork, but following the example it does not modify anything.


Thanks Travis.koehring (talk) 21:11, 6 December 2019 (UTC)

You can find message id's by using uselang=qqx. See Help:System message#Finding messages and documentation. Malyacko (talk) 22:07, 6 December 2019 (UTC)

I can't upload a file with MediaWiki

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 can't upload a file with MediaWiki. I get an error message:


PHP Fatal error:  Class 'XMLReader' not found in ....


I could upload files previously but I upgraded the operating system and reinstalled PHP. I don't remember how I check which version of MediaWiki I'm using.


I checked and libXML is enabled.


I'm using PHP Version 5.6.40-14+ubuntu18.04.1+deb.sury.org+1

libXML support active
libXML Compiled Version 2.9.9
libXML Loaded Version 20904
libXML streams enabled
79.180.220.57 (talk) 13:44, 7 December 2019 (UTC)
Update:
It works after running "sudo apt install php5.6-xml". 79.180.220.57 (talk) 14:13, 7 December 2019 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Deprecated API is undocumented

I once used an API called wfMsgWikiHtml that is now erased. This is a serious problem since deprecated APIs need to be replaced. If it's not possible to know how they operated it's not possible to replace.

https://doc.wikimedia.org/mediawiki-core/master/php/search.php?query=wfMsgWikiHtml

It now redirects to a page here with no mention of it. Perhaps it was never documented in the first place, but otherwise I don't think that I would have written code with it if I didn't see it used in other MediaWiki code that made clear its usage. 184.20.10.253 (talk) 17:36, 7 December 2019 (UTC)

WfMsg statistics has an index of code for these, but it's not clear how to retrieve the source code marked at rev. 97412 according to the document. I found a github repository but GitHub doesn't seem to have a practical way to reference revisions. 184.20.10.253 (talk) 17:50, 7 December 2019 (UTC)
Deprecated API is documented in the Release Notes. See Release notes/1.27 which lists "wfMsgWikiHtml() was removed (deprecated in 1.18)." You can see the previous code in the corresponding changeset at https://gerrit.wikimedia.org/r/#/c/mediawiki/core/+/262333/ Malyacko (talk) 01:33, 8 December 2019 (UTC)
see also manual:wfMessage for docs on the suggested replacement Bawolff (talk) 08:26, 8 December 2019 (UTC)
(Obviously this isn't a good documentation system.)
Going by https://gerrit.wikimedia.org/r/#/c/mediawiki/core/+/262333/4/includes/GlobalFunctions.php I need to implement wfMsgGetKey that isn't in that change/file, nor is it explained by the wfMessage wiki page.
I originally implemented a replacement with wfMessage($key)->parse() (though the wiki page suggests parseAsBlock) but I do have one instance that breaks down when the skin does $this->html('subtitle') that displays a subpage under the main heading. When the subpage title has an apostrophe, for example, the page is cut off there ending with & as if it's converted to &apos;
I'm upgrading so I'm not sure what to blame or if a better approximation of wfMsgWikiHtml would repair this behavior, or if it's just a breaking change. To replicate it I would need wfMsgGetKey code for the message to see. I think the problem is likely wfMessage adds &apos; 184.20.10.253 (talk) 14:43, 8 December 2019 (UTC)
Hello again, I'm still curious about wfMsgGetKey however if anyone can look at (Extension talk:Arrays/archive 2/Flow export#h-Nonworking_status_1.33.1-2019-12-08T15:20:00.000Z) this is the source the parsing bug I explained. 184.20.10.253 (talk) 15:24, 8 December 2019 (UTC)
Sorry, I should explain the link refers to Extension:Arrays that has a variable ported to use extension.json that is not formatted correctly in its JSON form. 184.20.10.253 (talk) 15:27, 8 December 2019 (UTC)
Indeed, looking at current docs of MediaWiki, for a feature that was replaced 7 years ago, isn't going to yield much info. Older versions of the docs are probably more relevant [1]
wfMsgGetKey() is an implementation detail of the old system. It is roughly equivalent to either wfMessage( 'msgname' )->plain() or wfMessage( 'msgname' )->text() depending on the third argument. You
It would be unusual to use ->parseAsBlock(). 99% of the time you want ->parse() not ->parseAsBlock(). The most direct equivalent to wfMsgHtml() is wfMessage( 'keyname' )->rawParams( 'parameter' )->parse(). However, rawParams is strongly discouraged as it is very easy to give yourself an XSS security vulnerability, as it does no escaping of the parameter. It is strongly encouraged to use ->params() if at all possible.
Yes, ->parse() & ->parseAsBlock() will always convert apostrophes in the message to ' I don't understand how or why this is causing a problem. If it is because you are inserting the message inside a url, you should use urlencode to ensure its properly encoded for a url. If its not because of url, what's the context that the & causes a problem?
Just fyi, to lookup old svn revision numbers, you can go to Special:Code/MediaWiki/97412. It is also included in the git notes of the git repo, although those are often not downloaded by default during a git clone. Bawolff (talk) 21:30, 8 December 2019 (UTC)
This is why APIs should be documented and the documentation should stay up indefinitely even after removal, since old code must consult the documentation to ensure it does what it's designed to do, without guess work. Mediawiki would be much more useful if it had a deep-search function to find a term like wfMsgWikiHtml inside old versions of wiki pages. 184.20.10.253 (talk) 21:01, 10 December 2019 (UTC)
the primary api documentation is in git. Pages on mediawiki are more like tutorials. They arent api documentation Bawolff (talk) 11:26, 11 December 2019 (UTC)
Well, it's where no one can find it then. 184.20.10.253 (talk) 22:34, 11 December 2019 (UTC)

Why do pages appear in Special:Categories

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 labelled various categories as __HIDDENCAT__, and indeed they don't appear at the page bottom unless a user preference is enabled, but they do appear in the Special:Categories, where they clutter the display for casual users. Vicarage (talk) 23:07, 7 December 2019 (UTC)

that's just the way special:categories work - it shows alk categories, hidden or not Bawolff (talk) 04:45, 8 December 2019 (UTC)
Is there a way to change the the 'Categories:' link at the page bottom in the categories box to point to a curated list. Wikipedia itself points to a help page, not its presumably enormous Special:Categories, for example
(My site design has strong control of categories, strict rules on their use, and lots of DPL reports to segment them, with some categories flagging up missing data in templates) Vicarage (talk) 06:57, 8 December 2019 (UTC)
Where the link goes is controlled by the page MediaWiki:pagecategorieslink on your wiki Bawolff (talk) 08:43, 8 December 2019 (UTC)
Just what I wanted, thanks Vicarage (talk) 09:18, 8 December 2019 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

trying to login

I can't loging due to the capin buttons can you please assist me with logingin 2001:5B0:4DD5:7878:850B:3D6B:CEC:4893 (talk) 01:18, 9 December 2019 (UTC)

Can you elaborate? Ciencia Al Poder (talk) 10:17, 9 December 2019 (UTC)

Adding Users

How do I add users to FileZilla 173.10.176.125 (talk) 17:09, 9 December 2019 (UTC)

this is not the right place to ask. Talk to your hosting provider Bawolff (talk) 02:47, 10 December 2019 (UTC)

Disable l10n_cache table creation

Hello. I'm using heroku with free and quite limited database and always encounter the same issue that my db limits are over. I always remove l10n_cache table and site works fine and database happy again. Is there a way to disable generation of that table at all? 37.200.77.222 (talk) 05:23, 10 December 2019 (UTC)

You need to set $wgLocalisationCacheConf and set store to 'files'. You'll need to make the cache directory writable by the web server. Ciencia Al Poder (talk) 10:15, 10 December 2019 (UTC)

Hello

I can easily integrate Youtube videos in MediaWiki pages with Youtube extension.

I would like to know whether if it is possible to do the same with videos hosted on a NextCloud instance and how.

Many thanks !

B. Seutin Bseutin (talk) 08:59, 10 December 2019 (UTC)

There is Extension:EmbedAnything, but you'll have to find out if it works for your case or not. AhmadF.Cheema (talk) 10:52, 10 December 2019 (UTC)

Extension:InputBox not working

Hello

I am running Mediawiki 1.33.1. I want to make run InputBox extension. I saw it is already available in the package. I've added

wfLoadExtension( 'InputBox' );

in LocalSettings.php but I do not see that the extension is running in Special:Version page and the InputBox code (<inputbox> and </inputbox>) is not interpreted in a test page.

I've tried to reinstall the latest InputBox Package in extensions directory, without success.

Any suggestions ?

Thanks !

B. Seutin Bseutin (talk) 11:28, 10 December 2019 (UTC)

Are you sure you are editing right LocalSettings.php. are you sure that its not commented out?
If wfLoadExtension but the extension is missing there would be an error, so what you describe is very weird. Bawolff (talk) 16:51, 10 December 2019 (UTC)

heroku parsoid With VisualEditor 404 Error

Hi Everyone

I Did Alot Of Reading But Still Have This Problem

When I Click Edit With VisualEditor It's Give Me:

Error loading data from server: apierror-visualeditor-docserver-http: HTTP 404


I Have Parsoid And VisualEditor In The Extension

Becuase I Have Shared Hosting I Got To Make Heroku Server For Parsoid Node.js Tutorial Link:VisualEditor/Installation on a shared host


But It's Still Have This Error


LocalSettings.php:

wfLoadExtension( 'VisualEditor' );

$wgVisualEditorEnableWikitext = true;

$wgDefaultUserOptions['visualeditor-newwikitext'] = 1;

$wgDefaultUserOptions['visualeditor-enable'] = 1;

$wgDefaultUserOptions['visualeditor-editor'] = 'visualeditor';

$wgVirtualRestConfig['modules']['parsoid'] = [

   'url' => 'https://eyalpedia.herokuapp.com/'

];


Config.yaml:

       mwApis:

       - # This is the only required parameter,

         # the URL of you MediaWiki API endpoint.

Line   uri: 'http://wiki.eyalgi.com/w/api.php'

         # The "domain" is used for communication with Visual Editor

         # and RESTBase.  It defaults to the hostname portion of

         # the `uri` property above, but you can manually set it

         # to an arbitrary string. It must match the "domain" set

         # in $wgVirtualRestConfig.

         # domain: 'localhost'  # optional

         # To specify a proxy (or proxy headers) specific to this prefix

         # (which overrides defaultAPIProxyURI). Alternatively, set `proxy`

         # to `null` to override and force no proxying when a default proxy

         # has been set.

         #proxy:

         #    uri: 'http://my.proxy:1234/'

         #    headers:  # optional

         #        'X-Forwarded-Proto': 'https'

         # See below, defaults to true.

Line  strictSSL: false


Can Anybody Help

Thanks

Eyal 185.191.205.138 (talk) 12:59, 10 December 2019 (UTC)

How do I create shared uploads for two subwikis?

To solve my case I need to use $wgForeighFileRepos and create different upload directories for each wiki instance. Also could try use shared DB tables to store common files information, or use third wiki as shared upload.

Hey, everyone.

I've created wiki family and now have two wiki instances en.strugatskie.com and ru.strugatskie.com.

I've used same LocalSettings.php file (which have if statement, which chooses whick wiki settings to load based on subdomain) and same directory for them, three different DBs: one for ru, one for en and one shared for users.

Everything working fine at the moment. Except one thing.

I want those wikis to have shared uploads like one and the same file but different description pages for each wiki. And I can't figure out how to do that.

And also I already have quite amount of already uploaded files on ru wiki, which doesn't appear anyhow on en wiki, even though they should have same upload directory due to the fact they have same LocalSettings.php file.


Any thoughts on how to do best with this issues? Will be thankful for any answers. 176.195.234.232 (talk) 13:08, 10 December 2019 (UTC)

see manual:$wgForeignFileRepos. If both wikis have local upload enabled they should have separate upload directories, otherwise there will be a mismatch in the database and mediawiki will get confused Bawolff (talk) 16:48, 10 December 2019 (UTC)
thanks for advice. sorry to bother you, but can you explain how there will be a mismatch in database? 176.195.234.232 (talk) 06:50, 13 December 2019 (UTC)
Database contains tables that track which images are uploaded, by who, and the image metadata (format, dimensions, size, checksum).
If both wikis have separate tables for the uploads, but both point to the same upload directory, it can happen that wiki2 uploads a file with the same name that one uploaded on wiki1, overwriting the file on the filesystem, but for MediaWiki on wiki1, the file is not modified and have the dimensions of the original file, potentially rendering thumbnails with the wrong aspect ratio (and obviously with the wrong file contents!). Since wiki1 had no track of the file being an existing one, it wouldn't be copied to the archive, and hence the overwrite is unrecoverable (you won't be able to tell which image was the original one, since it has been overwritten and gone for good).
I don't know if this could work if you make all the image-related tables "shared". What some wikis do is to have a third wiki where all uploads go, then the other wikis use this third wiki as the shared upload. Ciencia Al Poder (talk) 10:32, 13 December 2019 (UTC)
thanks a lot I think that answers my question. 176.195.234.232 (talk) 12:28, 13 December 2019 (UTC)

fatal exceptions of type error - importing - scribunto

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


Hi,

I've just installed mediawiki on my personal computer (WSL on Windows) and the following extensions

  • Extension:Scribunto
  • Extension:WikiEditor
  • Extension:SyntaxHighlight
  • Extension:CodeEditor
  • Extension:TemplateStyles

All of which successfully installed (according to Special:Version) with the recommended settings and latest version. I am trying to run Lua modules such as Module:Bananas, but the import fails without giving a message other than "Fatal exception of type 'Error'".I am able to import other pages on mediawiki such as "Lua" for example.


Do I need to install other extensions to be able to run Scribunto? Or what is going wrong? 51.218.252.239 (talk) 13:45, 10 December 2019 (UTC)

See Manual:How to debug how to get the stacktrace of the exception. Please also provide version information for all extensions and MediaWiki. Malyacko (talk) 16:03, 10 December 2019 (UTC)
Thank you for your help. I figured out what the problem was. I was exporting Module:Bananas from mediawiki and when I exported it from en.wikipedia.org it worked right away. 93.168.13.218 (talk) 20:06, 11 December 2019 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Email issues with mediawiki 1.33.1 hosted on one.com

All,

I just updated my mediawiki to 1.33.1. Is also hoped that this version would solve my long standing email issues I had with my installation. Unfortunately it did not.

As background:

- I'm using the extension ConfirmAccount (latest). All my issues are related to the fact that the registration model is broken as the deployment fails to send emails.

- I can read php but I never wrote php code

The first issue that hit me is that for some reason mediawiki uses 5 parameters when sending mail using the php mail function. Unfortunately this parameter is forbidden by my provider one.com. After a half day of browsing I could find the reason and I managed to edit a file to avoid to invoke the php email function using 5 parameters. thsi solved the issue which was reported as invalid 5th parameter.

Next I run in a more mysterious issue.The email is not sent and I see an error mail not sent due to unknown reason. As I already 'corrected' the code I decided to investigate. I added an echo to verify the destination address. To my big surprise this was the username I used in the registration and not a valid email address.

I do think that in the file "UserMailer.php" there is an issue with the folowing code:

foreach ( $to as $recip ) {

                                       echo "mail to " . $recip->toString();

                                       debug_print_backtrace ();

                                       $sent = mail(

                                               $recip->toString(),

                                               self::quotedPrintable( $subject ),

                                               $body,

                                               $headers

                                       );


Given that $to is an array of Addresses, in my case:

MailAddress Object ( [name] => Gd191210,

                                                                 [realName] => ,

                                                                 [address] => drue.brady@iiron.us)

$recip->toString() feels like terrible wrong ...

Any comments, idea's and/or suggestions?
Gerard Dens (talk) 13:45, 10 December 2019 (UTC)

if your host has modified the php mail function to work differently than how it is defined in php, i would suggest getting a different host or using $wgSMTP to set an external smtp server.
If $to is an array of MailAddress objects (see https://doc.wikimedia.org/mediawiki-core/master/php/classMailAddress.html#a74f74d7e17c304c500bf768be98a831b ) its perfectly reasonable to call toString() as that method converts MailAddress to an a tual email. Bawolff (talk) 16:45, 10 December 2019 (UTC)
Thank you, it all make sense.
regarding the php mail, I know it works:
- On the same hosting account I do have a joomla which is perfecly able to send php mail.
- I found a small php mail program which also worked. (https://conetix.com.au/support/simple-php-mail-test/)
So it should not be too difficult to make it work in mediawiki.
I also continue my search and found the MailAddress toString function. There is a lot of code there. That still need to figure out what it does. But in my case it returns the name. while the address is filled out and valid. Question is why do I get the name and not the email address from that function toString function? Gerard Dens (talk) 17:27, 10 December 2019 (UTC)

Here (en (dot) swordofmoonlight (dot) org/wiki/Sword_of_Moonlight/installing) is a page with a slideshow gallery (1.33.1) that creates explosive images on both Firefox and Google Chrome. Firefox sometimes corrects the size somehow, but Chrome is best at seeing the effect. The PNG files involved might be irregular or something... it's certainly odd. I can't imagine this is expected behavior. 184.20.10.253 (talk) 20:50, 10 December 2019 (UTC)

Too on that page I'm having a problem with OOUI icons not generating that I put here (Talk:OOUI/Archive 2/Flow export#h-Image_generation_failed-2019-12-10T17:21:00.000Z) alongside someone's question that was answered. I'm not sure that's the best venue. I used CSS to insert the triangles that are all that are serving as buttons to move along the slideshow ATM. 184.20.10.253 (talk) 20:53, 10 December 2019 (UTC)

Cannot write to sitemap.xml.tmpcb70ac9268d09b5dc17297441c9ff751.tmp.

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 problem with my wiki today. I can't activate editing. It is written: Cannot write to sitemap.xml.tmpcb70ac9268d09b5dc17297441c9ff751.tmp.


For example, see:https://wiki.sheki.site/index.php?title=%C5%9E%C9%99ki_%C5%9F%C9%99h%C9%99r_b%C9%99l%C9%99diyy%C9%99si_%C3%BCzvl%C3%BCy%C3%BCn%C9%99_namiz%C9%99dl%C9%99rin_siyah%C4%B1s%C4%B1_(2019)&action=submit Tofiq Kərimli (talk) 22:28, 10 December 2019 (UTC)

The wiki has Extension:AutoSitemap installed. Looks like the wiki isn't able to write to that file, probably because of permissions or because the filesystem is full. Check those conditions. Ciencia Al Poder (talk) 10:42, 11 December 2019 (UTC)
Thank you. That was our server problem. I told them. Now everything is in order. Tofiq Kərimli (talk) 17:08, 11 December 2019 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Create new account on wiki-site how?

How do I create new account on wiki-site? The create account button takes me to a screen which expects a log-in,

and rejects any log-in which doesn't exist, with no option of creating new account.

I require an account or log-in to confirm my email, which is required for editing.

It is like a fruitless loop.

I have created a mediawiki login but it is not accepted on wiki-site. Brendan51199 (talk) 01:41, 11 December 2019 (UTC)

Which wiki-site are you talking about?
If this is related to a Wiki separate from the Wikimedia Foundation Wikis, you'll have to contact the administrators of that third-party Wiki. It looks like they have disabled account creation for their Wiki. AhmadF.Cheema (talk) 07:14, 11 December 2019 (UTC)
I mean "wiki-site.com" which is "powered by MediaWiki".
Given up, moved to another site. 27.252.82.89 (talk) 21:25, 11 December 2019 (UTC)
Http://wiki-site.com isnt up...but its not a site we operate, we just provide software that they happen to use.
Based on your description, account creation has been disabled so users are not allowed to create accounts without special permission. Sometimes people do this to prevent spam Bawolff (talk) 01:17, 12 December 2019 (UTC)

After upgrade from 1.31.3 to 1.33.1, editbuttons are gone [Solved: the old-style toolbuttons are gone with 1.32]

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 no idea why the editbuttons are gone after the upgrade today. I cannot find any errors in the logfiles or browser console.

Perhaps anyone has an idea where to look, to fix. Wikinaut (talk) 03:57, 11 December 2019 (UTC)

Is the Edit button entirely removed, or just replaced by a View source button? Do you have permission to edit the pages? AhmadF.Cheema (talk) 07:11, 11 December 2019 (UTC)
Entirely removed. Yes, I have all permissions. Wikinaut (talk) 09:13, 11 December 2019 (UTC)
I updated in that way:
  • downloaded and unpacked the 1.33.1 tgz into directory wiki33
  • moved wiki/images, wiki/extensions, wiki/skins to /wiki33
  • in /wiki33: sudo -u www composer update
  • in /wiki33: sudo -u www composer update --no-dev
  • updated some of the extensions like Lockdown to the 1.33 versions
  • in /wiki33/maintenance su -u www php update.php (no errors)
  • switched /wiki and /wiki33, so that this becomes the active wiki

Everything else seems to be working. I have no idea how the editbutton toolbar is generated and where to start looking for it. Wikinaut (talk) 09:18, 11 December 2019 (UTC)
@AhmadF.Cheema Could it be an issue of of the /wiki/resourcessubdirectory? I have no idea. We put a font directory into that. Or, something with "bootstrap" ???

Wikinaut (talk) 09:32, 11 December 2019 (UTC)
@AhmadF.Cheema also
  • I do not see "Show edit toolbar" options in my Preferences, and
  • the WikiEditor toolbar is not loaded.
  • WikIEditor is updated, but not explictly loaded included: # wfLoadExtension( 'WikiEditor' );
  • When I load the WikIEditor, then I see the preference option for enabling the WikiEditor (activated), but not showin the toolbar then when editing
  • Wikinaut (talk) 10:18, 11 December 2019 (UTC)
See Manual:Errors and symptoms#Missing edit toolbar, JavaScript not working Ciencia Al Poder (talk) 10:28, 11 December 2019 (UTC)
Great and good to know! Thanks for your help!! Wikinaut (talk) 10:34, 11 December 2019 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Accessing WikiData from another media wiki

One site I'm conducting research on also uses media wiki but likely an older version. The site is called WikiDoc and they have been trying to have the same Inbox_gene that Wikipedia has so that they have genes described. Here is one [https://www.wikidoc.org/index.php/Alpha-1-B_glycoprotein Alpha-1-B glycoprotein]. They try to generate an Infobox gene using a template call with #invoke:Infobox_gene but it doesn't work I guess because they are not within the WMF computers. For example, when I copied #invoke:Infobox_gene|getTemplateData|QID=Q17675530 inside the template call after copying Module:Infobox gene on Wikiversity it worked and generated the gene infobox. But when I tried this on the Wikidoc equivalent I got the VALUE_ERROR (nil) response shown on the page. How do I modify the module so that the correct information goes into the WikiDoc gene infobox? If this is possible from outside the WMF computers. Marshallsumter (talk) 04:02, 11 December 2019 (UTC)

Yes you can. For instance, the extension LinkedWiki allows you to do that in Lua and SPARQL from within a module. We've done it on our wiki.
You might have an interwiki link in you module that is not resolving. Tinss (talk) 04:38, 11 December 2019 (UTC)
its likely you are missing extensions. At a guess, i think most likely this is relying on being a wikibase client for wikidata. See extension:Wikibase. Im unsure how/if you can be a wikibase client for wikidata outside wmf cluster (im not super familar with wikibase personally) Bawolff (talk) 01:14, 12 December 2019 (UTC)

Thanks for responding! Would it be possible to logon to your wiki and see which statements you added to your module? I'm concerned that some may cause unexpected consequences.

-- Marshallsumter
Sure!
We haven't maintained it in a while so it's buggy, but it was working once. Tinss (talk) 22:07, 18 December 2019 (UTC)

Having the TOC stay visible at all times

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 can have the TOC float right by tweaking common.css, but is there an extension or CSS/JS trick that will have it remain in view when a user is scrolling in the page? Thanks. Tinss (talk) 04:41, 11 December 2019 (UTC)

try the css #toc {position: sticky; top: 0} however to make it look pretty you may have to do something more complicated Bawolff (talk) 01:11, 12 December 2019 (UTC)
Thanks a lot. Getting it to work will indeed require lots of tweaking, but it's start. Tinss (talk) 19:17, 12 December 2019 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

MW 1.31.5 cause segfault on "Prev" Pages

Can someone have a look on https://phabricator.wikimedia.org/T238826


does not seem to be an cache/memory issue

see the last comment on https://dba.stackexchange.com/questions/144773/mysql-aborted-connection-got-an-error-reading-communication-packets

The solution was in the code. It seems a PHP exception wasn't handle and the application crash before closing an opened sql transaction.

The mysql error message may take its source from this unconfortable state, I can't say more. Haenschenkleinganzgross (talk) 08:17, 11 December 2019 (UTC)

A segmentation fault is a crash in the PHP engine. This is a bug on PHP itself and not in MediaWiki code (although MediaWiki may trigger the bug). PHP supports exceptions and exceptions are always handled by the PHP engine. An unhandled exception should never result in a crash of the PHP engine. Also, this has nothing to do with database. When the PHP engine crashes, it blows up all connections it was handling, including any open mysql connection. That's what the mysql log means, the connection wasn't properly closed.
Look at the php extensions you have enabled, and see if you have any op cache extension, which can cause those kind of crashes. Try to disable them. A php upgrade may also help. Ciencia Al Poder (talk) 10:39, 11 December 2019 (UTC)

Editing problem 12.2

After I edit a person and save the changes I am not able to go back and edit again. I get an error message "Another user is already editing this record. Please try again later."

But there is no other user trying to edit. I have closed the edit tab but still no luck. After about 2 hours away from the program I was able to edit again, but then when I tried to re-edit, I got the same message.


124.186.84.104 (talk) 08:50, 11 December 2019 (UTC)

Are you talking about MediaWiki? MediaWiki does not have a message like "Another user is already editing this record. Please try again later." Ciencia Al Poder (talk) 10:30, 11 December 2019 (UTC)

Installing an existing wiki

Who are the resident experts on setting up mirrors?

I would like to contact them.

Please answer on my talk page.

Thank you. The Transhumanist (talk) 11:28, 11 December 2019 (UTC)

@The Transhumanist Do you have a specific question? Malyacko (talk) 13:10, 11 December 2019 (UTC)

Does Wp-mirror work?

Does Wp-mirror work?

Its latest release was in 2014. Its documentation hasn't been updated since 2014. Its mailing lists appear to have fizzed out in 2015.

It's mentioned in instructional documentation in several places, such as at Wikipedia:Database download#Mirror building, which is a disservice if it doesn't actually work anymore.

I look forward to your replies.


The Transhumanist (talk) 12:38, 11 December 2019 (UTC)

Have you tried Wp-mirror#Contact ? Malyacko (talk) 13:10, 11 December 2019 (UTC)
Yes, Malyacko,
I left a message. No answer as of yet.
Honestly, I don't think anyone is there.
The person's user account's last contribution was in 2015...

Restbase on RHEL 7

Hello,


Has someone running restbase on RHEL7  ?


- restbase installs fine

- but when starting withe ' node server.js'

it complains that sqlite modules are missing.


So --> let's install it:  ' npm install restbase-mod-table-sqlite  '


and there the troubles come around.... Any help appreciated...

node -v v6.17.1

npm -v 3.10.10


> sqlite3@4.1.1 install /var/lib/restbase/node_modules/sqlite3

> node-pre-gyp install --fallback-to-build


fs.js:642

 return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);

                ^


Error: EACCES: permission denied, open '/var/lib/restbase/node_modules/sqlite3/package.json'

   at Error (native)

   at Object.fs.openSync (fs.js:642:18)

   at Object.fs.readFileSync (fs.js:510:33)

   at Run.parseOpts (/usr/lib/node_modules/node-pre-gyp/lib/node-pre-gyp.js:136:36)

   at Object.<anonymous> (/usr/lib/node_modules/node-pre-gyp/bin/node-pre-gyp:24:6)

   at Module._compile (module.js:577:32)

   at Object.Module._extensions..js (module.js:586:10)

   at Module.load (module.js:494:32)

   at tryModuleLoad (module.js:453:12)

   at Function.Module._load (module.js:445:3)

npm ERR! Linux 3.10.0-1062.9.1.el7.x86_64

npm ERR! argv "/usr/bin/node" "/bin/npm" "install" "restbase-mod-table-sqlite"

npm ERR! node v6.17.1

npm ERR! npm  v3.10.10

npm ERR! code ELIFECYCLE


npm ERR! sqlite3@4.1.1 install: `node-pre-gyp install --fallback-to-build`

npm ERR! Exit status 1

npm ERR!  

npm ERR! Failed at the sqlite3@4.1.1 install script 'node-pre-gyp install --fallback-to-build'.

npm ERR! Make sure you have the latest version of node.js and npm installed.

npm ERR! If you do, this is most likely a problem with the sqlite3 package,

npm ERR! not with npm itself.

npm ERR! Tell the author that this fails on your system:

npm ERR!     node-pre-gyp install --fallback-to-build

npm ERR! You can get information on how to open an issue for this project with:

npm ERR!     npm bugs sqlite3

npm ERR! Or if that isn't available, you can get their info via:

npm ERR!     npm owner ls sqlite3

npm ERR! There is likely additional logging output above.


npm ERR! Please include the following file with any support request:

npm ERR!     /var/lib/restbase/npm-debug.log


Johanverdoodt (talk) 15:05, 11 December 2019 (UTC)

> permission denied, open '/var/lib/restbase/node_modules/sqlite3/package.json'
Looks like your user does not have permissions to install. Have you tried installing as root? Otherwise, you'll need permissions to write to that folder (see https://degreesofzero.com/article/how-to-install-nodejs-as-a-non-root-user.html ) Ciencia Al Poder (talk) 18:38, 11 December 2019 (UTC)
mea culpa
I will check asap Johanverdoodt (talk) 15:00, 12 December 2019 (UTC)

VisualEditor - parsoid - forwardCookies

Dear all,


VisualEditor-MediaWiki/1.31.3


I still cannot get parsoid and VisualEditor to work with forwardCookies...

The option with networkAuth module works fine.

But with forwardCookies I get


ec 11 09:24:56 VM-MWSPRD01 node: {"name":"parsoid","hostname":"VM-MWSPRD01.jandenul.com","pid":3236,"level":40,"logType":"warn","wiki":"wiki$7","title":"Main Page","oldId":null,"reqId":null,"userAgent":"VisualEditor-MediaWiki/1.31.3","m

sg":"non-200 response: 500 <!DOCTYPE html><html><head><title>Internal Server Error</title></head><body><h1>Internal Server Error</h1><p>[XfCnpZgy1LVWYJ3r-ZZYmgAAAAI] /mediawiki_test/api.php?format=json&action=query&meta=siteinfo&

amp;siprop=namespaces%7Cnamespacealiases%7Cmagicwords%7Cfunctionhooks%7Cextensiontags%7Cgeneral%7Cinterwikimap%7Clanguages%7Clanguagevariants%7Cprotocols%7Cspecialpagealiases%7Cdefaultoptions%7Cvariables&amp;rawcontinue=1   Wikimedia\\Rd

bms\\DBQueryError from line 1457 of /var/www/html/mediawiki_test/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? <br />\nQu

ery: UPDATE `user` SET user_touched = "20191211082405" WHERE user_id = 2<br />\nFunction: Wikimedia\\Rdbms\\Database::query<br />\nError: 1205 Lock wait timeout exceeded; try restarting transaction (localhost)<br />\n<br />\nBa

cktrace:<br />\n#0 /var/www/html/mediawiki_test/includes/libs/rdbms/database/Database.php(1427): Wikimedia\\Rdbms\\Database->makeQueryException(string, integer, string, string)<br />\n#1 /var/www/html/mediawiki_test/includes/libs/rdbm

s/database/Database.php(1200): Wikimedia\\Rdbms\\Database->reportQueryError(string, integer, string, string, boolean)<br />\n#2 /var/www/html/mediawiki_test/extensions/LastUserLogin/LastUserLogin.body.php(38): Wikimedia\\Rdbms\\Databa

se->query(string)<br />\n#3 /var/www/html/mediawiki_test/includes/Setup.php(948): LastUserLogin::updateUserTouched()<br />\n#4 /var/www/html/mediawiki_test/includes/WebStart.php(88): require_once(string)<br />\n#5 /var/www/html/mediaw

iki_test/api.php(38): require(string)<br />\n#6 {main}<br />\n</p></body></html>\n","longMsg":"non-200 response:\n500\n<!DOCTYPE html><html><head><title>Internal Server Error</title></head><body><h1>Internal Server Error</h1><p>[XfCnpZgy

1LVWYJ3r-ZZYmgAAAAI] /mediawiki_test/api.php?format=json&amp;action=query&amp;meta=siteinfo&amp;siprop=namespaces%7Cnamespacealiases%7Cmagicwords%7Cfunctionhooks%7Cextensiontags%7Cgeneral%7Cinterwikimap%7Clanguages%7Clanguagevariants%7Cp

rotocols%7Cspecialpagealiases%7Cdefaultoptions%7Cvariables&amp;rawcontinue=1   Wikimedia\\Rdbms\\DBQueryError from line 1457 of /var/www/html/mediawiki_test/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? <br />\nQuery: UPDATE `user` SET user_touched = "20191211082405" WHERE user_id = 2<br />\nFunction: Wikimedia\\Rdbms\\Database::query<br />\nErro

r: 1205 Lock wait timeout exceeded; try restarting transaction (localhost)<br />\n<br />\nBacktrace:<br />\n#0 /var/www/html/mediawiki_test/includes/libs/rdbms/database/Database.php(1427): Wikimedia\\Rdbms\\Database->makeQueryExceptio

n(string, integer, string, string)<br />\n#1 /var/www/html/mediawiki_test/includes/libs/rdbms/database/Database.php(1200): Wikimedia\\Rdbms\\Database->reportQueryError(string, integer, string, string, boolean)<br />\n#2 /var/www/html/

mediawiki_test/extensions/LastUserLogin/LastUserLogin.body.php(38): Wikimedia\\Rdbms\\Database->query(string)<br />\n#3 /var/www/html/mediawiki_test/includes/Setup.php(948): LastUserLogin::updateUserTouched()<br />\n#4 /var/www/html/m

ediawiki_test/includes/WebStart.php(88): require_once(string)<br />\n#5 /var/www/html/mediawiki_test/api.php(38): require(string)<br />\n#6 {main}<br />\n</p></body></html>\n","levelPath":"warn","time":"2019-12-11T08:24:56.394Z","v":0}

Dec 11 09:24:56 VM-MWSPRD01 node: {"name":"parsoid","hostname":"VM-MWSPRD01.jandenul.com","pid":3236,"level":60,"err":{"message":"Config Request failure for \"http://10.128.6.177/mediawiki_test/api.php\": 500","name":"lib/index.js","stac

k":"lib/index.js: Config Request failure for \"http://10.128.6.177/mediawiki_test/api.php\": 500\n    at ConfigRequest.ApiRequest._requestCB (/usr/lib/node_modules/parsoid/lib/mw/ApiRequest.js:425:11)\n    at Request.self.callback (/usr/

lib/node_modules/parsoid/node_modules/request/request.js:186:22)\n    at emitTwo (events.js:106:13)\n    at Request.emit (events.js:191:7)\n    at Request.<anonymous> (/usr/lib/node_modules/parsoid/node_modules/request/request.js:1163:10

)\n    at emitOne (events.js:96:13)\n    at Request.emit (events.js:188:7)\n    at IncomingMessage.<anonymous> (/usr/lib/node_modules/parsoid/node_modules/request/request.js:1085:12)\n    at IncomingMessage.g (events.js:292:16)\n    at e

mitNone (events.js:91:20)\n    at IncomingMessage.emit (events.js:185:7)\n    at endReadableNT (_stream_readable.js:978:12)\n    at _combinedTickCallback (internal/process/next_tick.js:80:11)\n    at process._tickCallback (internal/proce

ss/next_tick.js:104:9)","levelPath":"fatal/request"},"msg":"Config Request failure for \"http://10.128.6.177/mediawiki_test/api.php\": 500","time":"2019-12-11T08:24:56.403Z","v":0}



wfLoadExtension( 'VisualEditor' );

$wgVirtualRestConfig['modules']['parsoid'] = array(

      'url' => 'http://localhost:8142',

      'domain' => 'test',

);

$wgVirtualRestConfig['modules']['parsoid']['forwardCookies'] = true;

$wgSessionsInObjectCache = true;

$wgVisualEditorParsoidForwardCookies = true; Johanverdoodt (talk) 15:05, 11 December 2019 (UTC)

New created group rights is not working for me

Hi

I have created a new user group, for users that need just to read pages, nothing more.

I followed the steps on:

Manual:User rights#Creating a new group and assigning permissions to it

I've changed the DefaultSettings.php, adding these lines below:

$wgGroupPermissions['Leitores']['createaccount'] = false;

$wgGroupPermissions['Leitores']['move'] = false;

$wgGroupPermissions['Leitores']['read'] = true;

$wgGroupPermissions['Leitores']['edit'] = false;

$wgGroupPermissions['Leitores']['createpage'] = false;

I also created the pages:

MediaWiki:Group-Leitores (content: Leitores)

MediaWiki:Group-Leitores-member (content: leitor)

MediaWiki:Grouppage-Leitores (content: Usuarios Leitores)


After that, I have changed an existing user to be assigned to this new group.

I have logged out and after, a new log in with this user.

But this user can see and access the edit page option.

What I am doing wrong?

Could somebody help me please? (sorry for some English mistakes, I'm from Brazil, and I'm a little rusty)

Thanks very much! Dyoshida (talk) 15:12, 11 December 2019 (UTC)

I haven't had time to read the full message yet but it's LocalSettings.php you should be editing rather than DefaultSettings.php :-) Jonathan3 (talk) 19:43, 11 December 2019 (UTC)

wfMessage and onBeforePageDisplay

Hi!

I'm trying to use wfMessage inside my extension under onBeforePageDisplay, but with no luck.

Let's say i have an extension like this:

public static function onBeforePageDisplay( \OutputPage $out, \Skin $skin ) {
   $out->addHeadItem( 'og:description', '<meta property="og:description" content="' . wfMessage( 'description' )->text() . '" />' )

}

and corresponding en.json file in i18n folder like this:

{
   "description": "Some great description"
}

But when I check the source of generated page I see this:

<meta property="og:description" content="⧼description⧽" />

What am I doing wrong? How to place wfMessage correctly?

Thanks in advance! Headshaker1 (talk) 15:15, 11 December 2019 (UTC)

Found answer by myself: there was a problem with tabs and naming keys in en.json. After replacing them everything works as expected. Headshaker1 (talk) 16:55, 11 December 2019 (UTC)
just a reminder, to prevent XSS you should be using ->escaped() here not ->text() since you are putting the value inside html without any further escaping Bawolff (talk) 01:05, 12 December 2019 (UTC)

Upgrade to MediaWiki 1.33

Hello,

I am in the process of upgrading our wiki from version 1.5 to the new version of 1.33. The main question I have is it possible to have the new version point to our existing database (MariaDB 10.4) and not have to recreate everything without any errors? Trying to search documentation to see if there is any incompatibilities to doing this, but have not found anything as of yet.

If anyone knows if this is possible and can confirm if there are errors in doing so or not, please let me know.

Thank You. Sna-mbushway (talk) 16:47, 11 December 2019 (UTC)

wow 1.5 is really old. You should follow the instructions at manual:Upgrading - generally you should always have the new version point at the same db, and then run the update.php maintenance script.
If you run into any problems dont be afraid to ask. Bawolff (talk) 01:03, 12 December 2019 (UTC)

$wgExtraSignatureNamespaces: the trick how to add all namesspaces?

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.


Manual:$wgExtraSignatureNamespaces explains how to add certain namesspaces such as in the example

$wgExtraSignatureNamespaces = array( NS_MAIN, NS_HELP );


I forgot the trick to compute and then to add all namesspaces programmatically, there was a one-line trick. What was it?

Of course, I could modify https://phabricator.wikimedia.org/diffusion/EWED/browse/master/modules/jquery.wikiEditor.toolbar.config.js$623 to achieve the same effect but this is hackish. Wikinaut (talk) 08:45, 12 December 2019 (UTC)

people sometimes use array_fill and then hope anything in alid is ignored. Its impossible to programatically compute this in LocalSettings as there might be nsmespaces not yet defined. I guess you could do this in an $wgExtensionFunction using mediawiki's nsmespace classes, but im not aware of sn easy one liner Bawolff (talk) 13:07, 12 December 2019 (UTC)
Thanks, I have the same opinion.
It's so, that I used this in the early years between 2004...2010 somewhere. Wikinaut (talk) 15:11, 12 December 2019 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Integration Word -> Mediawiki

I'm looking to integrate a Word document as Mediawiki content.

Can you help me? 89.227.200.102 (talk) 09:34, 12 December 2019 (UTC)

See Project:Support desk/Flow/2017/08#h-How_to_convert_MS_word_document_into_Mediawiki_page?-2017-08-08T09:13:00.000Z Malyacko (talk) 15:36, 12 December 2019 (UTC)

Error while accessing data from aws url

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.


Error: URL hostname is not whitelisted

while I am trying to get data from aws url in graph

like - : https://........execute-api.ap-south-1.amazonaws.com/

can someone help me out here how I can access data from url SumanGadhawal (talk) 11:01, 12 December 2019 (UTC)

well, is the domain whitelisted per instructions at https://www.mediawiki.org/wiki/Extension:Graph#External_data Bawolff (talk) 13:04, 12 December 2019 (UTC)
@Bawolff yeah I allowed domain $wgGraphAllowedDomains in Local setting file

SumanGadhawal (talk) 06:07, 13 December 2019 (UTC)
Please post the config you are using Bawolff (talk) 17:35, 13 December 2019 (UTC)
@Bawolff Thanks ..I resolved it we can not use RESTAPI . 103.19.140.73 (talk) 12:48, 17 December 2019 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

How to move files(not images) from an old mediawiki to a new site?

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


Hey guys, the old mediawiki site has a ton of docx files that are linked and I'm trying to migrate everything to a new site. I've used the importImages.php script to import all the images but now I'm trying to get the download links for these docx files to work. Any thoughts? Wrathofmcgrath (talk) 17:23, 12 December 2019 (UTC)

Looks like I can just copy the docx files to the proper directory and the links will start working.

Wrathofmcgrath (talk) 20:18, 12 December 2019 (UTC)
Yes, if you migrated the entire database, you can copy the entire images folder to retain the same content and structure. Ciencia Al Poder (talk) 10:25, 13 December 2019 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Private Wiki

I would like to make my wiki private. I found the checkbox for private in manage wiki, but I couldn't click it. I tried the help page/maniphest that folks are directed to, but they closed my question. 177.239.47.161 (talk) 18:07, 12 December 2019 (UTC)

I think (not an expert) you want to change the $wgGroupPermissions in the LocalSettings.php file. I have mine setup to where that you can't see anything unless you have an account and are logged in. But if you have an account then you can freely edit any page.
$wgGroupPermissions['*']['edit'] = false;
$wgGroupPermissions['*']['read'] = false;
$wgGroupPermissions['Trusted'] = $wgGroupPermissions['user'];
$wgGroupPermissions['user'   ]['edit']          = true;
$wgGroupPermissions['Trusted']['edit']          = true;
$wgGroupPermissions['sysop'  ]['edit']          = true; Wrathofmcgrath (talk) 18:38, 12 December 2019 (UTC)
See also Manual:$wgGroupPermissions for detailed help on using group permissions Bawolff (talk) 21:15, 12 December 2019 (UTC)

SNMPv3 traps in PERL

Hello,

It seems like PERL does not support sending out SNPv3 traps, but it does support SNMPv3 gets/walks. Can you please confirm whether this is true or not. Also, one of your pages said that basic PERL SNMP functionality is done by CPAN. Does that imply that all the "heavy" stuff like SNMPv3 traps is done by net-snmp? If yes, can you, please, point me to the package that can do v3 traps?

thanks Vgershman (talk) 18:23, 12 December 2019 (UTC)

@Vgershman Welcome to the MediaWiki support desk. How is your question related to the MediaWiki software? Malyacko (talk) 19:11, 12 December 2019 (UTC)

Needed for 36c3 congress: user group/permissions for "user has verified e-mail address"

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


Is there a way to restrict/allow certain page actions only for such users who have a verified e-mail address? How?


Self-answered: I think, this can be done as described here Manual:User rights#Examples and here Manual:Preventing access#Restrict editing of an entire namespace Wikinaut (talk) 11:20, 13 December 2019 (UTC)

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

Bulk-uploading thousands of images

Hi!


Is there a way to bulk upload thousands of images in one step, on i MediaWiki inside a private network? I see that Upload Wizard Extensions that Wikimedia Commons use are for up to 50 at a time only. 109.109.80.246 (talk) 12:00, 13 December 2019 (UTC)

If you have access to the servers command line interface maintenance/importImages.php is probably the way to go. Osnard (talk) 12:36, 13 December 2019 (UTC)

Error while running update.php script.

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


I am trying to upgrade a wiki from 1.25.1 to 1.33.1. It initially failed immediately before processing the database at all, however, after reading a similar issue on this forum I found I could get it to partially process by commenting the line in LocalSettings.php that sets $wgDBmwschema. Now it will start to process however it fails midway with the following error (local server info removed):

Creating bot_passwords table ...done.

Adding wl_id field to table watchlist ...[8f9df94af0f870769ab16ed5] [no req]   Wikimedia\Rdbms\DBQueryError from line 1587 of /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 `wiki_watchlist`

ADD COLUMN wl_id int unsigned NOT NULL AUTO_INCREMENT FIRST,

ADD PRIMARY KEY (wl_id)

Function: Wikimedia\Rdbms\Database::sourceFile( /maintenance/archives/patch-watchlist-wl_id.sql )

Error: 1068 Multiple primary key defined (servername)

Can you please suggest a fix for me?

Thanks, Erik 155.98.19.11 (talk) 20:01, 13 December 2019 (UTC)

huh.
Whats the output of the sql command:
Describe wiki_watchlist;
(If you dont know how to send sql commands, use sql.php maintenance script. Other methods are fine too) Bawolff (talk) 21:34, 13 December 2019 (UTC)
Sorry that was a mess. This should be easier to read:
mysql> DESCRIBE wiki_watchlist;
+--------------------------+-----------------+------+-----+---------+-------+
| Field                    | Type            | Null | Key | Default | Extra |
+--------------------------+-----------------+------+-----+---------+-------+
| wl_user                  | int(5) unsigned | NO   | PRI | 0       |       |
| wl_namespace             | int(11)         | NO   | PRI | NULL    |       |
| wl_title                 | varchar(255)    | NO   | PRI |         |       |
| wl_notificationtimestamp | varchar(14)     | YES  |     | NULL    |       |
+--------------------------+-----------------+------+-----+---------+-------+
4 rows in set (0.01 sec) 155.98.19.11 (talk) 17:26, 16 December 2019 (UTC)
Any clues? 155.98.19.11 (talk) 20:15, 17 December 2019 (UTC)
Looks like the script doesn't expect the table having an existing primary key.
You can drop the primary key before running it again:
alter table wiki_watchlist drop primary key; Ciencia Al Poder (talk) 10:34, 18 December 2019 (UTC)
I am having 10 years of experience
i think error is here
(| wl_notificationtimestamp)
thank you RISEING SUN (talk) 11:20, 18 December 2019 (UTC)
That worked Ciencia! Thanks so much!!! 155.98.19.11 (talk) 17:13, 18 December 2019 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

LocalSettings.php not found

Al finalizar la instalación se copia el archivo LocalSettings.php en el directorio de la wiki /var/www/html/wiki

Pero sigue saliendo que no encuentra LocalSettings.php 201.218.8.19 (talk) 00:41, 14 December 2019 (UTC)

Are you sure that /var/www/html/wiki is the right directory? Especially if using a distro provided package, sometimes the location might be something else.
------
[via google translate] ¿Está seguro de que / var / www / html / wiki es el directorio correcto? Especialmente si se usa un paquete proporcionado por la distribución, a veces la ubicación podría ser otra cosa. Bawolff (talk) 12:55, 14 December 2019 (UTC)

My wiki isn't autopromoting or completing steps to move new users from autoconfirmed to emailconfirmed.

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.


Version info: MW 1.33.0, PHP 7.3.12.

Here are the permissions sequence I have setup:

#########

# Define: require email verification and no anonymous editing

$wgMinimalPasswordLength=10;

$wgEmailConfirmToEdit=true;

$wgGroupPermissions['*']['edit']=false;

$wgGroupPermissions['user']['edit']=false;

$wgAutopromote['emailconfirmed']=APCOND_EMAILCONFIRMED;

$wgImplicitGroups[]='emailconfirmed';

$wgGroupPermissions['emailconfirmed']['edit']=true;


After receiving their temporary password, logging in, setting a new password, and relogging they still are not in the emailconfirmed user group. Suggestions? What can be done to move the autoconfirmed users into emailconfirmed? This was working several years ago when I was running an older version of MediaWiki, such as 1.25.2. Existing emailconfirmed users are still able to edit pages today. But it's the new users that aren't getting autopromoted. Is there an email they are supposed to receive to click a link for confirmation after changing their password. Was a new permission added to MediaWiki that needs to be added to my sequence above? .digamma (talk) 21:07, 15 December 2019 (UTC)

To adjust individual user permissions see the createAndPromote.php script.

No idea on why it's not autopromoting from autoconfirmed to emailconfirmed.
.digamma (talk) 21:26, 15 December 2019 (UTC)

Solved my problem: new users, who receive an auto-generated email with a random password does not constitute emailconfirmed status. The new user must navigate to their Preferences > User Profile tab and click the Confirm Email Address button at the bottom. This will generate a unique hash and link and send it in an email to the user's registered email address. Once they click the link in the email, they will be autopromoted to the emailconfirmed, for example, user group.

.digamma (talk) 03:13, 16 December 2019 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

The wiki appears without styles applied and images are missing

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


hi, I have migrated my webpage to another ISP.


I have followed Manual:Errors and symptoms#The wiki appears without styles applied and images are missing


$wgServer has been changed to new address


https://eh.hajes.org is new page

I have had switched on debug mode but no errors

any suggestions, please? Haj3s29a (talk) 21:33, 15 December 2019 (UTC)

$wgScriptPath appears wrong. I think in your current setup it should be '/' Bawolff (talk) 23:43, 15 December 2019 (UTC)
that's what I thought as well because wiki page used to be on hajes.org/humanica
I have moved it to my server with virtual hosts in Apache. It has got own directory "humanica" and https://eh.hajes.org should be directed to before mentioned folder.
It should be root folder for whole wiki page.
Of course, I have tried what do you suggest but web becomes inaccessible. I believe .htaccess is incorrect and I have no idea how to fix it.
RewriteEngine On
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d
RewriteRule ^(.*)$ %{DOCUMENT_ROOT}/index.php [L]
RewriteRule ^/?humanica(/.*)?$ %{DOCUMENT_ROOT}/index.php [L]
Haj3s29a (talk) 18:37, 16 December 2019 (UTC)
well your rewrite rules are a little odd, load.php is definitely accessible at document root, so they should work provided the script path is the dociment root '/', and the article path ($wgArticlePath) is still kept as "humanica/$1".
It looks like your rewrite rules are set so you can have the article path be either the root directory "/$1" or have the humanica prefix. Other than have two different article paths, your rewrite rules look standard for a no subdirectory setup. Based on visiting your website, they look to be working fine too, they just dont match what mw has as $wgScriptPath Bawolff (talk) 20:00, 16 December 2019 (UTC)
problem solved - as MediaWiki suggests "root directory for wiki not suggested".
I have moved my wiki page to subfolder of domain and all works now 83.208.12.241 (talk) 08:19, 25 December 2019 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Oojs: class IconWidget not found

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.


Since running update.php, I am now finding that editing a page returns an internal error. This traces back to /vendor/oojs/oojs-ui/php/widgets/CheckboxInputWidget.php line 34, where class IconWidget apparently can't be found.

If I comment out this section (lines 34-37), the internal error goes away, and the only issue that I know of is that the two checkboxes can't be seen.

Where should I start with resolving this one properly? Restoring the last working backup didn't seem to work. Thank you. 213.205.192.0 (talk) 21:57, 15 December 2019 (UTC)

are you using a git checkout? If so maybe try running
composer update --no-dev
More generally, it sounds like version mismatch in vendor or multiple versions mixed up. If you download from tarball , try getting a new version and making sure you extract in empty directory so no old files are there Bawolff (talk) 23:38, 15 December 2019 (UTC)
Running composer update didn't work, but replacing the entire Vendor directory with a backup did. I had previously only tried replacing the /oojs/ directory, which may have done more harm than good.
Strange, but thanks for your help. Apologies for the simple query! 212.129.79.93 (talk) 17:08, 16 December 2019 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Meidawiki Server

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


Hi I have been working on a MW project for sometime now and it would appear I need a custom server with apache 2.4 to run the relevant dependences such as LAU. Does anyone have a service they could recommend or advice on building my own server please or maybe there is an alternative available?


Kind Regards AlgorithmGG (talk) 23:57, 15 December 2019 (UTC)

See Hosting services Malyacko (talk) 10:17, 16 December 2019 (UTC)
Awesome, Thanks, looks like a selections of decent services. AlgorithmGG (talk) 02:17, 17 December 2019 (UTC)
please note, you do not require a specific version of apache (or even apache as your webserver at all) in order to have lua support via extension:Scribunto Bawolff (talk) 20:01, 16 December 2019 (UTC)
Is this so? looks like i have solved the Apache issue but still currently without LAU, what would you suggest? AlgorithmGG (talk) 02:11, 17 December 2019 (UTC)
Will i run into problems with version higher than 5.1.5? AlgorithmGG (talk) 02:38, 17 December 2019 (UTC)
if you mean using lua as a templating language in mediawiki, just install extension:scribunto which comes bundled with appropriate lua version.
If you mean using Lua (im assuming you are just misspelling lua as LAU? I have no idea what lau is) for something else, you will have to be more specific as to what you are doing Bawolff (talk) 03:56, 17 December 2019 (UTC)
@Bawolff As far as i am aware the Lua language has to be installed on apache like php etc just installing extention:scribunto doesn't work. i am planning to do update MW, which version would you suggest? do you know anyone who has a mysql database set up and uses structured discussions and templates successfully? AlgorithmGG (talk) 16:02, 17 December 2019 (UTC)
that is incorrect. Lua does not have to be installed on apache to be used in mediawiki templates. Bawolff (talk) 18:13, 17 December 2019 (UTC)
Thanks B AlgorithmGG (talk) 18:17, 21 December 2019 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Appearing logged out on random file pages and CSS/JS

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


My wiki has a weird issue where I randomly appear logged out on random file pages where the image was replaced and after editing CSS or JS pages like MediaWiki:Common.css. If I purge the page by adding ?action=purge to the end of the url, it shows me logged in again. However, after I edit the page again and it takes me back to the page, I appear logged out again. Refreshing doesn't work and clicking log in does nothing when it's like this. I'm not the only user with the problem either.

I have these settings in LocalSettings.php:

$wgMainCacheType = CACHE_ACCEL;

$wgSessionCacheType = CACHE_DB;


Anyone know how to fix this? It's really annoying when editing CSS. Thanks. Vishkujo (talk) 07:04, 16 December 2019 (UTC)

See Manual:How to debug/Login problems Malyacko (talk) 10:16, 16 December 2019 (UTC)
this sounds lesslike a login problem and more like some sort of weird caching issue. Do you have file cache, varnish or any other sort of front end cache (some service providrrs may offer this as part of their package.)
This might be difficult, but if you could provide a HAR file demonstrating the issue, it could be useful for debugging. Bawolff (talk) 20:04, 16 December 2019 (UTC)
Checked the above link and the issue remains while in incognito and in a different browser (both Firefox and Chrome). Adblock is off, remember me unchecked and checked still had the issue. I have MW 1.33.1.
I think it is a caching issue like Bawolff said. I use Cloudflare which seems to make weird things happen with MediaWiki. Here's a HAR file: https://drive.google.com/open?id=1arqwNgD1jcSRqj1vLmZXutyK7Bm8wD6a Not sure if I did it properly but I hope it helps.
I got the issue when opening File:UJ Part 8 Announcement.jpg from Recent Changes. I had never even viewed that image before. Vishkujo (talk) 05:27, 17 December 2019 (UTC)
At first glance, it seems the problem is in CloudFlare. The request to https://jojowiki.com/File:UJ_Part_8_Announcement.jpg includes session cookies, but the response headers indicate the page has been cached: cf-cache-status: HIT
Response headers include the vary: header that indicate cookies invalidate cache:
vary: Accept-Encoding
vary: Accept-Encoding, Accept-Language, Cookie
On the other hand, I can't say if this vary header was generated by MediaWiki or by CloudFlare. If it was generated by CloudFlare and not MediaWiki (I note the header appears 2 times), it may be that CF sends the vary by cookie, but MediaWiki doesn't, causing CloudFlare to send a request to MediaWiki with the last-modified header set, and MediaWiki is replying with a 302 Not Modified, causing CF to reply with a cached response. This is hard to tell and only reviewing access logs on the server could tell what the actual response was, or maybe disable CloudFlare and try again to see if the problem is reproducible. Ciencia Al Poder (talk) 10:43, 17 December 2019 (UTC)
Ah, maybe cloudflare see's the .jpg and .css at the end of url, and assumes its an image or css file regardless of the content-type header. - docs seem to support this: https://support.cloudflare.com/hc/en-us/articles/200172516#h_a01982d4-d5b6-4744-bb9b-a71da62c160a
However, cloudflare says it will respect web server caching headers, and mediawiki should send "Cache-Control: private, must-revalidate, max-age=0" (both for logged in and out), according to [2] this should prevent cloudflare from caching.
Some things to check: Do you have $wgUseCdn or $wgUseSquid set to true in LocalSettings.php? (You definitely should not have them set to true without additional config to make sure that the wrong pages aren't cached). Is mediawiki setting correct headers (Do you have an error about headers already sent in your php error log)?
That said, I did some testing. I don't think you have the header setting issue, as I was able to get it to set headers in appropriate circumstances.
I think $wgUseSquid being set to true (Where it should not be) is the most likely possibility. The s-maxage cache control is being set on special:recentchanges to 10, which only happens when $wgUseSquid is set to true, and 10 is a really weird number, so its unlikely to be cloud-flare overriding mediawiki. Bawolff (talk) 14:16, 17 December 2019 (UTC)
As an addendum, its possible to make cloud-flare caching work with MediaWiki (I think), but you do need to ensure that it vary's on cookies (Or at least, vary's on session cookies), which only their enterprise tier supports. Bawolff (talk) 14:21, 17 December 2019 (UTC)
I don't know if it's fixed for sure but I just removed the $wgUseSquid = true line and now it doesn't log me out when clicking that UJ_Part_8_Announcement file. Thanks so much. Vishkujo (talk) 17:16, 17 December 2019 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

I need some help to remove old pictures

Hey! in 2014 i had put one picture and it is possible to remove it? Thank you very much, when i try it

https://commons.wikimedia.org/wiki/File:JORSH.jpg#file is that, what i can do? im the owner... George wolek (talk) 11:22, 16 December 2019 (UTC)

Hi,welcome to the MediaWiki support desk. The MediaWiki software allows deleting files. For the rules on a specific website, please ask on that website: https://commons.wikimedia.org/wiki/Commons:Help_desk Malyacko (talk) 11:40, 16 December 2019 (UTC)

Разграничение доступа

Правильно ли я понимаю: можно разграничить доступ к файлам на чтение для пользователей и на чтение и редактирование для админов.

А разделить все файлы на доступные, внутренние и коммерческая тайна нельзя? 78.36.198.112 (talk) 14:52, 16 December 2019 (UTC)

I tried to understand this via google translate, not sure I got the full meaning. Yes. You can use page protection to prevent editing well still allowing viewing for individual files, see Manual:Administrators#Protection. You can also use namespace protection to prevent editing for certain user groups for all files, see Manual:$wgNamespaceProtection. If you also want to restrict viewing in addition to editing, things get a bit more complicated, although it is possible.
------
Я пытался понять это с помощью Google Translate, не уверен, что я получил полное значение. Да. Вы можете использовать защиту страницы, чтобы предотвратить редактирование, все еще позволяя просматривать отдельные файлы, см. Manual:Administrators#Protection. Вы также можете использовать защиту пространства имен, чтобы предотвратить редактирование определенных групп пользователей для всех файлов, см. Manual:$wgNamespaceProtection. Если вы также хотите ограничить просмотр в дополнение к редактированию, все становится немного сложнее, хотя это возможно. Bawolff (talk) 00:12, 17 December 2019 (UTC)

Password

Hi,

I have forgotten my password and when I try to email a new one I don´t receive an email. 194.132.20.27 (talk) 15:29, 16 December 2019 (UTC)

and which website is this about? Malyacko (talk) 15:46, 16 December 2019 (UTC)

Upgrade help

I upgraded my database from MW 1.31 to 1.33, but I am not seeing page content. The content is visible if you click on "View History" and then a particular revision (scroll past the notices/warnings). Login credentials below. Any help much appreciated!

http://names.tyndalehouse.com/mediawiki-1.33.0/index.php/Main_Page


Username: TestUser

Password: MotorcyleBeast456

MediaWiki 1.33.0
PHP 7.2.24-0ubuntu0.18.04.1 (apache2handler)
MySQL 8.0.17


108.7.72.249 (talk) 17:41, 16 December 2019 (UTC)

you seem to have some sort of database corruption issue where some revisions are missing.
Can you try running cleanupUsersWithNoId.php followed by migrateActors.php and see if that helps things? Bawolff (talk) 20:11, 16 December 2019 (UTC)
Bawolff, do you mean that the database is missing records from the revisions table, or that certain records cannot be read by mediawiki? I ran the 2 maintenance scripts, and actor records have been created, but I am still not seeing page content. 108.7.72.249 (talk) 19:37, 26 December 2019 (UTC)
it means something is missing. Its more likey corresponding entries from the comment table or actor table are missing rather than entries from the revision table. Bawolff (talk) 21:54, 26 December 2019 (UTC)
Bawolff, some data entry happened during the upgrade, so there are additional comments to migrate. Is it possible to force the migrateComments script to run? Other suggestions welcome. 50.233.98.57 (talk) 15:39, 6 January 2020 (UTC)
If web requests were served from the new version, then new comments should be in the new schema. But yes you can pass --force to the script. See manual:migrateComments.php Bawolff (talk) 18:36, 6 January 2020 (UTC)
Bawolff, I ran migrateComments successfully. Here's the next error: Main slot of revision 39250 not found in database! Is there a script to migrate to using slots? 50.233.98.57 (talk) 21:09, 10 January 2020 (UTC)

Any extension for logging time users spend editing pages?

Many of the contributors to a wiki get credit at work for the hours spent volunteering. I'm trying to get an extension that will automatically log the amount of the time users spend editing the wiki, and then a way for them to find out how much time they logged between certain date periods. Does anything like this already exist?


If not, I was thinking of creating an extension for this. I was thinking it would be a matter of creating a hidden field on the edit page with a start time, and then making the form save this to the database in a column the extension created on the table where the edits are saved. With a start time recorded, along with the already recorded save time and user, this would at least start saving the time users spend editing in a crude way. Are there any tips on how I would start this if the extension needs to be created? 144.51.12.2 (talk) 19:46, 16 December 2019 (UTC)

it would be difficult to do this without it being game-able (what if people just leave the tab open). Also some people edit stuff offline before putting on wiki.
That said, not aware of any extension, but edit start timestamp is already there in a hidden form field (wpStartTime) to help detect edit conflicts. Bawolff (talk) 20:16, 16 December 2019 (UTC)
Is the edit start timestamp already being saved?
I know it could be gamed, and there are ways to improve it, I just wanted to start collecting the information with further improvements able to be made later (like not counting overlapping time if multiple windows are open, not counting time spent on the User namespace, setting a max time an edit could get credit for, etc). 144.51.12.2 (talk) 20:35, 16 December 2019 (UTC)
It doesn't get saved currently. Its just used to check if an edit conflict has occurred.Just pointing out that that half of the requirements are already done, so you would only need someone to do the other half. Bawolff (talk) 00:06, 17 December 2019 (UTC)
Thank you, that helps immensely. I narrowed it down to these tasks:
- Upon extension install, create a new column called "rev_starttime" on the "revision" table before the "rev_timestamp" column. This column would have the same format as rev_starttime. Is modifying existing tables good practice? Or should a new table be created?
- Upon page creations or edits, save the <input type="hidden" value="..." name="wpStarttime"/> value to the rev_starttime column in the new table entry.
Does anyone suggestions on how to start implementing this as an extension? 144.51.12.2 (talk) 21:54, 18 December 2019 (UTC)
its generally considered better to create a new table. You can use rev_id as a foreign key.
Some helpful links might be Manual:Hooks/LoadExtensionSchemaUpdates, Manual:Hooks/PageContentSaveComplete, manual:extensions, Manual:Database_access#Database_Abstraction_Layer, https://doc.wikimedia.org/mediawiki-core/master/php/classWebRequest.html#a3eecdf9b5d20122630bf5cc9c8506084
Generally you can use a WebRequest object to get POSTed parameters. Often the hook provides you with one (possibly indirectly via an object implementing IContextSource) but if not you can get one via RequestContext::getMain()->getRequest() Bawolff (talk) 00:08, 22 December 2019 (UTC)

I have an account, but can not remember my sign in credentials.

I have an account, but can not remember my sign in credentials. 2601:81:C400:3141:94B6:C504:2F20:C082 (talk) 19:54, 16 December 2019 (UTC)

Then use the "Forgot your password?" link on the Log In page. Malyacko (talk) 20:31, 16 December 2019 (UTC)

hi, i downloaded the application but get an error message.

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.


https://gyazo.com/d65afee0c3ef84eed98b6990a42c7056


when i try to install this i get the above error message.

Im a newb so any help is appreciated. Claudia67G (talk) 03:51, 17 December 2019 (UTC)

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

ref and template issues on mediawiki

Hello, I am using mediawiki and ecountered 2 issues.


The first: References simply are not working as they should (This link shows an example: https://i.imgur.com/lj9G91k.png )

The second: I want to use the political party infobox from Wikipedia, but when I type out the same text Wikipedia uses nothing happens (essentially the same thing as what happens with references happens)


Here is a link to my wiki: http://127.0.0.1/wiki/index.php/Main_Page


Thank you for any assistance you are able to give. 45.36.138.113 (talk) 15:46, 17 December 2019 (UTC)

Is the Cite extension installed? Did you properly import the party infobox template to your wiki? The link to your wiki won't work because "127.0.0.1" means "my private computer" for everyone. Malyacko (talk) 17:30, 17 December 2019 (UTC)
Can I have a link to this "cite extension" please ( I didn't see such a thing brought up until now), and I'm not fully sure how importing templates works. So yeah, I may be a bit of a "noob" 45.36.138.113 (talk) 17:51, 17 December 2019 (UTC)
normally the cite extension is included with mediawiki, there is usually a checkbox in the installer and it can be enabled by adding wfLoadExtension('Cite'); to the bottom of LocalSettings.php. see extension:cite for morw details.
If you want to use infoboxes from wikipedia, see https://www.mediawiki.org/wiki/Manual:Importing_Wikipedia_infoboxes_tutorial Bawolff (talk) 18:59, 17 December 2019 (UTC)
I found cite and LocalSettings, and put in the code as I understand it needs to be (image: could not send, "Link spamming") and still I'm not able to use references.
I'll see what I can do with the infobox page, hopefully I can figure it out. 45.36.138.113 (talk) 19:12, 17 December 2019 (UTC)
does cite show up on the page named Special:Version on your wiki under installed extensions? Bawolff (talk) 19:17, 17 December 2019 (UTC)
No, it does not. In fact, there's no "installed extensions" section at all. 45.36.138.113 (talk) 19:48, 17 December 2019 (UTC)
that probably means the wfLoadExtension statements are missing from LocalSettings.php Bawolff (talk) 23:54, 21 December 2019 (UTC)
Which version of MediaWiki is this about, where did you download it (URL), and how did you install it? Malyacko (talk) 16:30, 18 December 2019 (UTC)

API - Getting total pageviews for a set of dates, not daily or monthly counts

Hi,

Am I correct that there is no way to ask for the total pageviews between two dates, one can only search for pageviews on a monthly or daily basis?

https://wikitech.wikimedia.org/wiki/Analytics/AQS/Pageviews

Thanks! Vizalyst (talk) 20:52, 17 December 2019 (UTC)

That's correct as far as i know, you have to sum yourself. See also https://wikimedia.org/api/rest_v1/#/Pageviews%20data Bawolff (talk) 23:57, 17 December 2019 (UTC)

Error when importing dump

I'm getting "Cannot create an actor for a usable name that is not an existing user" when trying to import a database from another wiki.


https://pastebin.com/XMkRMe5q


How do I fix this? I found https://phabricator.wikimedia.org/T211450#4807093 but the suggested fix there does nothing. I'm fine with editing the dump to change the usernames, however importDump.php gives me literally zero information as to which username is causing issues. I can't go over each username individually because it's a 2GB dump. Why does importDump make this so difficult?

Another ticket says it's related to https://phabricator.wikimedia.org/T219279, which is strange because the official docker image is shipped with PHP 7.3. Why does the docker image use this PHP version if it doesn't even work correctly? 2001:8003:404D:8101:ECF2:B34D:E43:7D0 (talk) 22:09, 17 December 2019 (UTC)

Sortable wikitable script that understands K as 1 thousand, M as 1 million, etc.?

Anything better than {| class="sortable wikitable" ?

I heard there might be a way of using javascript, but wouldn't know where to start. 2A02:C7F:D827:BE00:A8D3:4B31:778D:30F6 (talk) 08:18, 18 December 2019 (UTC)

You can manually add the sort key on each row as described in Help:Sorting#Specifying_a_sort_key Ciencia Al Poder (talk) 10:35, 18 December 2019 (UTC)
Looks great, thank you! The "sortbottom" function is ace too.
Just one thing, is there no universal symbol for plain number values, so I don't have to enter the exact one for a table of 100s of rows?
data-sort-value="M , 4.21"
data-sort-value="M , 2.01"

2A02:C7F:D827:BE00:A8D3:4B31:778D:30F6 (talk) 11:29, 18 December 2019 (UTC)

Also any idea what to do about this problem where I want to keep those values in whole under 1000:
Total Subscribers
data-sort-value="K , 1.03" 1.03K
data-sort-value="952" 952

2A02:C7F:D827:BE00:A8D3:4B31:778D:30F6 (talk) 11:47, 18 December 2019 (UTC)

If you use a data-sort-value that's always numeric, everything should work:
data-sort-value Total Subscribers
data-sort-value="4210000" 4.21M
data-sort-value="1030" 1.03K
data-sort-value="952" 952

Ciencia Al Poder (talk) 10:12, 19 December 2019 (UTC)

How do I convert $out->addLink() to $out->addModules()?

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


Hello,

Within my LocalSettings.php, I'm having the following code that loads FontAwesome:

$wgHooks['BeforePageDisplay'][] = function( &$out, &$skin ) {
        $out->addLink( array(
                'rel' => 'stylesheet',
                'id' => 'FontAwesome',
                'href' => 'https://use.fontawesome.com/releases/v5.8.2/css/all.css',
                'integrity' => 'sha384-oS3vJWv+0UjzBfQzYUhtDYW+Pj2yciDJxpsK1OYPAYjqT085Qq/1cq5FLXAZQ7Ay',
                'crossorigin' => 'anonymous',
        ) );
        return true;
};

This works great, but now I'm developing a small extension and I want to load the same header link via the modern way by using my extension.json and the addModules() function.


In order to create a module that loads one of my JS scripts, I'm using the following definition in my extension.json:

        "ResourceModules": {
                "myExtensionJSModule": {
                        "scripts": "modules/myExtensionJSModule.js",
                        "messages": [
                                "menu-label",
                                "menu-alt-private",
                                "menu-alt-public"
                        ]
                }
        },

I'm loading the module via the php code in this way:

class PrivateWikiAccessControlHooks {
    public static function onBeforePageDisplay(OutputPage $out, Skin $skin) {
        // Some code...

        $out->addModules('myExtensionJSModule');
    }

Now I want to know how to convert the code given in the beginning to a module that is loaded in a way as $out->addModules('myExternalScriptLink');. Could some way guide me or give me link with a correct example according to this case? Spas.Z.Spasov (talk) 08:41, 18 December 2019 (UTC)

ResourceLoader doesn't allow for external scripts (because of privacy concerns, and because it creates dependencies on 3rd parties). But you can write a module that does nothing but load the url via jQuery.getScript() —TheDJ (Not WMF) (talkcontribs) 08:52, 18 December 2019 (UTC)
Thank you for the response , @TheDJ! Spas.Z.Spasov (talk) 10:04, 18 December 2019 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

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


Hi,


my team is tasked to setup mediawiki.

we are using the following:


MediaWiki 1.31.0

PHP 7.2.9


we installed LDAP Authentication Plugin 2.1.0 and appear to get it to work. I see my userID appearing at the top.

but on login, it shows a blank page. (I am not sure if this is related to ldap or not)

when I click on the back button, the page then loads.

this happens for all other links on our mediawiki site.


any link that I click, it shows a blank page, and only after clicking on the back button, does the link show.


any help on this would be greatly appreciated. X48891 (talk) 20:47, 18 December 2019 (UTC)

See Manual:Errors and symptoms#You see a Blank Page Malyacko (talk) 17:47, 19 December 2019 (UTC)
thanks Malyacko..
we already tried it, but doesn't appear to show anything... no errors are appearing.. just a blank page...
<?php
# Debugging & Logging
error_reporting( E_ALL );
ini_set( 'display_errors', 1 );
$wgShowSQLErrors = true;
$wgDebugDumpSql  = false;
$wgShowDBErrorBacktrace = true;
$wgShowExceptionDetails = true;
$wgDebugLogFile = "logs/debug.log";
the debug log has this, but I don't see any errors...
excerpt of debug log

  1. 0 E:\xampp\htdocs\wiki\includes\libs\rdbms\TransactionProfiler.php(219): Wikimedia\Rdbms\TransactionProfiler->reportExpectationViolated('writes', 'query-m: DELETE...', 3)
  2. 1 E:\xampp\htdocs\wiki\includes\libs\rdbms\database\Database.php(1256): Wikimedia\Rdbms\TransactionProfiler->recordQueryCompletion('query-m: DELETE...', 1576853729.6897, true, 1)
  3. 2 E:\xampp\htdocs\wiki\includes\libs\rdbms\database\Database.php(1151): Wikimedia\Rdbms\Database->doProfiledQuery('DELETE FROM `wi...', 'DELETE /* SqlBa...', true, 'SqlBagOStuff::d...')
  4. 3 E:\xampp\htdocs\wiki\includes\libs\rdbms\database\Database.php(2845): Wikimedia\Rdbms\Database->query('DELETE FROM `wi...', 'SqlBagOStuff::d...')
  5. 4 E:\xampp\htdocs\wiki\includes\objectcache\SqlBagOStuff.php(433): Wikimedia\Rdbms\Database->delete('`wiki_objectcac...', 'keyname = 'wiki...', 'SqlBagOStuff::d...')
  6. 5 E:\xampp\htdocs\wiki\includes\libs\objectcache\BagOStuff.php(447): SqlBagOStuff->delete('wikidb31-wiki_:...')
  7. 6 E:\xampp\htdocs\wiki\includes\libs\objectcache\BagOStuff.php(485): BagOStuff->unlock('wikidb31-wiki_:...')
  8. 7 [internal function]: BagOStuff->{closure}()
  9. 8 E:\xampp\htdocs\wiki\vendor\wikimedia\scoped-callback\src\ScopedCallback.php(76): call_user_func_array(Object(Closure), Array)
  10. 9 E:\xampp\htdocs\wiki\includes\cache\MessageCache.php(444): Wikimedia\ScopedCallback->__destruct()
  11. 10 E:\xampp\htdocs\wiki\includes\cache\MessageCache.php(342): MessageCache->loadFromDBWithLock('en', Array, NULL)
  12. 11 E:\xampp\htdocs\wiki\includes\cache\MessageCache.php(971): MessageCache->load('en')
  13. 12 E:\xampp\htdocs\wiki\includes\cache\MessageCache.php(900): MessageCache->getMsgFromNamespace('Pagetitle', 'en')
  14. 13 E:\xampp\htdocs\wiki\includes\cache\MessageCache.php(868): MessageCache->getMessageForLang(Object(LanguageEn), 'pagetitle', true, Array)
  15. 14 E:\xampp\htdocs\wiki\includes\cache\MessageCache.php(808): MessageCache->getMessageFromFallbackChain(Object(LanguageEn), 'pagetitle', true)
  16. 15 E:\xampp\htdocs\wiki\includes\Message.php(1290): MessageCache->get('pagetitle', true, Object(LanguageEn))
  17. 16 E:\xampp\htdocs\wiki\includes\Message.php(842): Message->fetchMessage()
  18. 17 E:\xampp\htdocs\wiki\includes\Message.php(934): Message->toString('text')
  19. 18 E:\xampp\htdocs\wiki\includes\OutputPage.php(902): Message->text()
  20. 19 E:\xampp\htdocs\wiki\includes\OutputPage.php(949): OutputPage->setHTMLTitle(Object(Message))
  21. 20 E:\xampp\htdocs\wiki\includes\page\Article.php(470): OutputPage->setPageTitle('Main Page')
  22. 21 E:\xampp\htdocs\wiki\includes\actions\ViewAction.php(68): Article->view()
  23. 22 E:\xampp\htdocs\wiki\includes\MediaWiki.php(500): ViewAction->show()
  24. 23 E:\xampp\htdocs\wiki\includes\MediaWiki.php(294): MediaWiki->performAction(Object(Article), Object(Title))
  25. 24 E:\xampp\htdocs\wiki\includes\MediaWiki.php(861): MediaWiki->performRequest()
  26. 25 E:\xampp\htdocs\wiki\includes\MediaWiki.php(524): MediaWiki->main()
  27. 26 E:\xampp\htdocs\wiki\index.php(42): MediaWiki->run()
  28. 27 {main}
[MessageCache] MessageCache::load: Loading en... local cache is empty, global cache is expired/volatile, loading from database
Unstubbing $wgLang on call of $wgLang::_unstub from ParserOptions->__construct
[caches] parser: SqlBagOStuff
Article::view using parser cache: yes
Parser cache options found.
ParserOutput cache found.
Article::view: showing parser cache contents
MediaWiki::preOutputCommit: primary transaction round committed
MediaWiki::preOutputCommit: pre-send deferred updates completed
[DBReplication] Wikimedia\Rdbms\ChronologyProtector::shutdownLB: DB 'localhost' touched
MediaWiki::preOutputCommit: LBFactory shutdown completed
Title::getRestrictionTypes: applicable restrictions to Main Page are {edit,move}
OutputPage::sendCacheControl: private caching; Wed, 18 Dec 2019 11:03:30 GMT ** X48891 (talk) 15:44, 20 December 2019 (UTC)
does your apache (or php) error log have anything? A more rare cause of a blank page would be if php segfaulted, which would show up in apache error log. Bawolff (talk) 23:52, 21 December 2019 (UTC)
I replied with the debug and error logs X48891 (talk) 18:35, 23 December 2019 (UTC)
[session] Saving all sessions on shutdown
[DBConnection] Wikimedia\Rdbms\{closure}: closing connection to database 'localhost'.
[DBConnection] Wikimedia\Rdbms\{closure}: closing connection to database 'localhost'.
[DBConnection] Wikimedia\Rdbms\{closure}: closing connection to database 'localhost'.
[DBConnection] Wikimedia\Rdbms\{closure}: closing connection to database 'localhost'.
[DBConnection] Wikimedia\Rdbms\{closure}: closing connection to database 'localhost'.
[DBConnection] Wikimedia\Rdbms\{closure}: closing connection to database 'localhost'.
[session] Saving all sessions on shutdown
[DBConnection] Wikimedia\Rdbms\{closure}: closing connection to database 'localhost'.
[DBConnection] Wikimedia\Rdbms\{closure}: closing connection to database 'localhost'. X48891 (talk) 18:33, 23 December 2019 (UTC)
and this is the apache error log
AH00422: Parent: Received shutdown signal -- Shutting down the server.
[Fri Dec 20 11:50:51.000353 2019] [mpm_winnt:notice] [pid 3328:tid 504] AH00364: Child: All worker threads have exited.
[Fri Dec 20 11:50:51.047224 2019] [mpm_winnt:notice] [pid 7484:tid 596] AH00430: Parent: Child process 3328 exited successfully.
[Fri Dec 20 11:50:52.172264 2019] [ssl:warn] [pid 5004:tid 572] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Fri Dec 20 11:50:52.266017 2019] [ssl:warn] [pid 5004:tid 572] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Fri Dec 20 11:50:52.312894 2019] [mpm_winnt:notice] [pid 5004:tid 572] AH00455: Apache/2.4.39 (Win64) OpenSSL/1.1.1c PHP/7.2.9 configured -- resuming normal operations
[Fri Dec 20 11:50:52.312894 2019] [mpm_winnt:notice] [pid 5004:tid 572] AH00456: Apache Lounge VC15 Server built: May 29 2019 11:22:50
[Fri Dec 20 11:50:52.312894 2019] [core:notice] [pid 5004:tid 572] AH00094: Command line: 'E:\\xampp\\apache\\bin\\httpd.exe -d E:/xampp/apache'
[Fri Dec 20 11:50:52.328520 2019] [mpm_winnt:notice] [pid 5004:tid 572] AH00418: Parent: Created child process 7052
[Fri Dec 20 11:50:52.969164 2019] [ssl:warn] [pid 7052:tid 512] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Fri Dec 20 11:50:53.062917 2019] [ssl:warn] [pid 7052:tid 512] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Fri Dec 20 11:50:53.109794 2019] [mpm_winnt:notice] [pid 7052:tid 512] AH00354: Child: Starting 150 worker threads.

X48891 (talk) 18:34, 23 December 2019 (UTC)
i dont see anything out of the ordinary here and those settings should cause any errors to show up. You can try also making sure all the error reporting directives in the php.ini file are enabled (in the really unlikely chance the error happens before localsettings.php is read) but otherwise i have no idea. Bawolff (talk) 00:49, 24 December 2019 (UTC)
any further thoughts on what we can do to determine the error?
what else can I look at? X48891 (talk) 20:08, 26 December 2019 (UTC)
You should open the error console (hit F12), and reproduce the issue while the network tab is open.
When you get the blank page, see if the response from the server is a status 500, 403, 200 or any other, and try to inspect the resulting HTML. This would give a hint:
  • Status 500 should be logged on the server, since it's a server (or PHP) error
  • Status 403 means you're not authorized, which means some problem with authentication
  • Status 200 means there's no error... try to see the entire response if it contains HTML or maybe there's some script in your user scripts that's misbehaving and causing the entire page to go blank when executed by the browser Ciencia Al Poder (talk) 10:27, 27 December 2019 (UTC)
thanks...that produced something...
we are getting a permission denied on load.php... X48891 (talk) 15:47, 27 December 2019 (UTC)
if I take a different version of load.php it resolves the blank page issue, but formatting is screwed up....
error is permission denied on line 1..column xxxx
but the 1st line of load.php are just documentation.... X48891 (talk) 16:03, 27 December 2019 (UTC)
Well, that's not a blank page, but a page without styles. Manual:Errors and symptoms#The wiki appears without styles applied and images are missing
The full error message and stack trace would be useful. See also Manual:How to debug#PHP errors
Also what do you mean by different version of load.php? You shouldn't mix files from different versions of MediaWiki Ciencia Al Poder (talk) 16:31, 27 December 2019 (UTC)
please include the exact text of the permission denied error. There are multiple types of permission denied errots that can happen Bawolff (talk) 17:15, 27 December 2019 (UTC)
HTML1300: Navigation occurred.
File: AI:Main_Application_Integration_Team_Page
HTML1527: DOCTYPE expected. Consider adding a valid HTML5 doctype: "<!DOCTYPE html>".
File: AI:Main_Application_Integration_Team_Page, Line: 1, Column: 1
SCRIPT5009: 'addOnloadHook' is undefined
File: AI:Main_Application_Integration_Team_Page, Line: 3, Column: 136
SCRIPT70: Permission denied
File: load.php, Line: 1, Column: 259
SCRIPT70: Permission denied
File: load.php, Line: 1, Column: 259 X48891 (talk) 17:40, 27 December 2019 (UTC)
window.mwPerformance=(window.performance&&performance.mark)?performance:{mark:function(){}};window.mwNow=(function(){var perf=window.performance,navStart=perf&&perf.timing&&perf.timing.navigationStart;return navStart&&typeof perf.now==='function'?function(){return navStart+perf.now();}:function(){return Date.now();};}());window.isCompatible=function(str){var ua=str||navigator.userAgent;return!!((function(){'use strict';return!this&&!!Function.prototype.bind&&!!window.JSON;}())&&'querySelector'in document&&'localStorage'in window&&'addEventListener'in window&&!(ua.match(/MSIE 10|webOS\/1\.[0-4]|SymbianOS|Series60|NetFront|Opera Mini|S40OviBrowser|MeeGo|Android.+Glass|^Mozilla\/5\.0 .+ Gecko\/$|googleweblight/)||ua.match(/PlayStation/i)));};(function(){var NORLQ,script;if(!isCompatible()){document.documentElement.className=document.documentElement.className.replace(/(^|\s)client-js(\s|$)/,'$1client-nojs$2');NORLQ=window.NORLQ||[];while(NORLQ.length){NORLQ.shift()();}window.NORLQ={push: X48891 (talk) 17:41, 27 December 2019 (UTC)
somewhere in there, is getting a permission denied.. but I don't understand what.. or where.. or why X48891 (talk) 17:49, 27 December 2019 (UTC)
Have you tried with a different browser? Ciencia Al Poder (talk) 18:50, 27 December 2019 (UTC)
IE is the official browser of the company...so even if it works with a different browser, it may not be an option... X48891 (talk) 18:57, 27 December 2019 (UTC)
just tested it on chrome... page totally not loading at all X48891 (talk) 19:00, 27 December 2019 (UTC)
this the error on chrome
VM38:3 Uncaught ReferenceError: addOnloadHook is not defined
   at <anonymous>:3:136
   at DOMEval (load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=monobook&version=0q97x78:1)
   at Function.globalEval (load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=monobook&version=0q97x78:4)
   at runScript (load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=monobook&version=0q97x78:162)
   at checkCssHandles (load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=monobook&version=0q97x78:162)
   at execute (load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=monobook&version=0q97x78:163)
   at Object.implement (load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=monobook&version=0q97x78:169)
   at <anonymous>:1:11
   at DOMEval (load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=monobook&version=0q97x78:1)
   at Function.globalEval (load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=monobook&version=0q97x78:4) X48891 (talk) 19:02, 27 December 2019 (UTC)
is this the main curlpit..?
SCRIPT5009: 'addOnloadHook' is undefined
somehow..everything points to load.php file.. but I don't see what the issue could be... X48891 (talk) 19:15, 27 December 2019 (UTC)
addOnloadHook is long gone. Maybe your wiki has custom JavaScript code in MediaWiki:Common.js, MediaWiki:Monobook.js, etc (or your personal scripts) that is introducing those JavaScript errors? Try blanking those JavaScript pages, or turn off $wgUseSiteJs and $wgAllowUserJs temporarily to test if that's the issue. Ciencia Al Poder (talk) 19:48, 27 December 2019 (UTC)
Also, depending on the version of Internet Explorer, and the combination of being an intranet, may be enabling the "compatibility view", that usually causes more harm than good. Ciencia Al Poder (talk) 19:49, 27 December 2019 (UTC)
I don't have $wgUseSiteJs on my LocalSetting.ph, but I updated $wgAllowUserJs to false. still same issue X48891 (talk) 20:01, 27 December 2019 (UTC)
$wgUseSiteJs defaults to true if not set. Try explicitly setting false in LocalSettings.php Bawolff (talk) 21:01, 27 December 2019 (UTC)
disabling compatability view didn't help also... X48891 (talk) 20:02, 27 December 2019 (UTC)
stack "Error: Permission denied\n   at Anonymous function (http://wiki-pavw01n.corp.dirsrv.com/wiki/load.php?debug=false&lang=en&modules=startup&only=scripts&skin=monobook:1:259)\n   at mw.track (http://wiki-pavw01n.corp.dirsrv.com/wiki/load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=monobook&version=0ford7n:155:554)\n   at Anonymous function (http://wiki-pavw01n.corp.dirsrv.com/wiki/load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=monobook&version=0ford7n:167:982)\n   at Anonymous function (http://wiki-pavw01n.corp.dirsrv.com/wiki/load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=monobook&version=0ford7n:166:953)\n   at Anonymous function (http://wiki-pavw01n.corp.dirsrv.com/wiki/load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=monobook&version=0ford7n:177:915)" X48891 (talk) 20:21, 27 December 2019 (UTC)
Adding ?debug=true at the end of the URL (or &debug=true if the URL already contains a "?") may help in diagnosing the problem, if once you load the page, click on the error, that should give you the source code where the error happens. A screenshot of the line that it highlights would be good (you can try to share the screenshot on https://snipboard.io/), or copy&paste the entire code of the script on https://dpaste.de/ and post back here the link, with the line number that gives the error Ciencia Al Poder (talk) 12:12, 29 December 2019 (UTC)
doesn't work... after I click on the link... and the blank page loads... if I add ?debug=true to the end.. it sort of refreshes the page, and the page loads normally...
this is what happens:
I load mediawiki page...
the main page loads fine..
if I click on any link... it shows up for like 2 seconds.. then goes blank
if I click on the back button, or refresh button, the page / link then loads fine... X48891 (talk) 15:08, 30 December 2019 (UTC)
this is the code....window.mwPerformance=(window.performance&&performance.mark)?performance:{mark:function(){}};window.mwNow=(function(){var perf=window.performance,navStart=perf&&perf.timing&&perf.timing.navigationStart;return navStart&&typeof perf.now==='function'?function(){return navStart+perf.now();}:function(){return Date.now();};}());window.isCompatible=function(str){var ua=str||navigator.userAgent;return!!((function(){'use strict';return!this&&!!Function.prototype.bind&&!!window.JSON;}())&&'querySelector'in document&&'localStorage'in window&&'addEventListener'in window&&!(ua.match(/MSIE 10|webOS\/1\.[0-4]|SymbianOS|Series60|NetFront|Opera Mini|S40OviBrowser|MeeGo|Android.+Glass|^Mozilla\/5\.0 .+ Gecko\/$|googleweblight/)||ua.match(/PlayStation/i)));};(function(){var NORLQ,script;if(!isCompatible()){document.documentElement.className=document.documentElement.className.replace(/(^|\s)client-js(\s|$)/,'$1client-nojs$2');NORLQ=window.NORLQ||[];while(NORLQ.length){NORLQ.shift()();}window.NORLQ={push: X48891 (talk) 15:55, 30 December 2019 (UTC)
{return navStart+perf.now();} is highlighted, and there is a permission denied underneath it... X48891 (talk) 15:55, 30 December 2019 (UTC)
here is a screenshot uploaded of f12
https://snipboard.io/xUlbM8.jpg X48891 (talk) 16:00, 30 December 2019 (UTC)
I found this link that talks about that line of code..
https://doc.wikimedia.org/mediawiki-core/master/js/source/mediawiki.html\
can I just comment it all out?
cant find a mediawiki.html though....

X48891 (talk) 16:08, 30 December 2019 (UTC)
Try this: https://stackoverflow.com/questions/9691528/permission-denied-error-in-corporate-environment
If this doesn't work, you may need to ask Microsoft Support about this Ciencia Al Poder (talk) 17:24, 30 December 2019 (UTC)
thanks...we are using IE11 though... the document talks of IE9... X48891 (talk) 17:36, 30 December 2019 (UTC)
just to update all on this. We noticed that the issue does not happen in Firefox. But occurs in Chrome and IE. X48891 (talk) 16:21, 5 February 2020 (UTC)
it appears IE is unable to load the page, and loads from cache??
this is what we see in the debug log for IE, that didn't exist in fireforx.
[ContentHandler] Created handler for wikitext: WikitextContentHandler
OutputPage::checkLastModified: client did not send If-Modified-Since header
[DBPerformance] Expectation (writes <= 0) by MediaWiki::main not met (actual: 1):
query-m: REPLACE INTO `wiki_objectcache` (keyname,value,exptime) VALUES ('X')
#0 E:\xampp\htdocs\wiki\includes\libs\rdbms\TransactionProfiler.php(219): Wikimedia\Rdbms\TransactionPr X48891 (talk) 16:24, 5 February 2020 (UTC)
SOLVED!!!
I manually added the last 2 settings, and it strangely solved the issue.
# Enable User Styles
$wgAllowUserJs  = false;
$wgAllowUserCss = false;
$wgUseSiteJs  = false;
$wgUseSiteCSS = false; X48891 (talk) 19:18, 5 February 2020 (UTC)
found the clue here:
Project:Support desk/Flow/2016/07#h-Blank_Pages_After_Briefly_Displaying_Wiki-2016-07-01T21:18:00.000Z X48891 (talk) 19:19, 5 February 2020 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Premium

I created an account. It showed me as logged in. I paid for premium thru paypal. When I came back to sight it showed me as logged out and said I hadn't finished the transaction. Tried to lo log in but apparently I have no account. I've been mucking about with this for almost an hour, so enjoy the donation. 76.88.113.242 (talk) 23:14, 18 December 2019 (UTC)

You're asking on the wrong website! MediaWiki doesn't require payment. Where are you trying to log in? Sam Wilson 04:45, 19 December 2019 (UTC)

Moved Wiki

I uploaded my Wiki to an other server, and changed the $wgServer to the new server, but the wiki cannot read the SQLite database, Iget an error Cannot access the database: SQLite database not accessible.

My old wiki used SQLite . so realy if all data was uploaded it should be able to read.

Looking for help 2610S (talk) 00:05, 19 December 2019 (UTC)

By "all data" do you mean the database too.
Also, along with $wgServer, you'll have to point the database settings in LocalSettings.php towards the imported database too. AhmadF.Cheema (talk) 06:15, 19 December 2019 (UTC)
as Ahmad said, most likely your sqlite db was either not uploaded or in a different directory now, and mw cannot find. Check to see your db config in LocalSettings.php is correct, especially the path to the sqlite data directory Bawolff (talk) 23:50, 21 December 2019 (UTC)

Creating a custom namespace subsequently

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 setting up my wiki I introduced three custom namespaces, as described here:

https://www.mediawiki.org/wiki/Manual:Using_custom_namespaces

I use the namespaces mainly for rights management via ACL.

Now I needed more namespaces. What do I do? Entering namespaces in the LocaleSetttings.php didn't do anything anymore. How are these applied?

I thank you in advance for your help! 87.139.42.133 (talk) 10:07, 19 December 2019 (UTC)

Don't they appear in the namespace selector drop-down of Special:AllPages? Ciencia Al Poder (talk) 10:18, 19 December 2019 (UTC)
You seem to be right, the namespace was successfully created with the entry of LocaleSettings.php.
I just missed this one..... Thanks for your help! 87.139.42.133 (talk) 12:40, 19 December 2019 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Different info for different users

Is it possible to create different views for different user groups - same topic but service desk is able to see all the relevant information but systems administrators can see the same information but also more info, e.g. passwords and more detailed information? 213.168.20.130 (talk) 14:13, 19 December 2019 (UTC)

See Manual:FAQ#How do I administrate/manage user rights? Malyacko (talk) 17:46, 19 December 2019 (UTC)
generally no. Mediawiki does not support fine grained read access control. Some extensions promise it, but usually they have loop holes Bawolff (talk) 23:47, 21 December 2019 (UTC)

Mediawiki no longer recognizes my account credentials

Hello,

I created an account sometime ago, and it is now up for adoption. I would like to log in and re-claim my wiki, but it looks like my account is no longer recognized. I'm certain it's the same user and password since I use a Key Vault. What are my next steps?

Thank you for your help! 99.74.15.127 (talk) 18:11, 19 December 2019 (UTC)

Welcome to the hlpe desk for the MediaWiki software. What does "re-claim your wiki" mean? Please elaborate and provide context. MediaWiki.org does not provide hosting services. Malyacko (talk) 19:05, 19 December 2019 (UTC)

Creating Templates appear with only code

Hello, my name is Gensis. So I have been making a wiki for a game I help contribute to and I ran into some problems. I exported templates from Wikipedia and some other media wikis and I am running into issues with them. When I export the template and import it into mine. When saving or previewing, it is appearing as just raw code. However when looking at it on the source I got it from, it looks normal working order. I do not know what I am missing or doing wrong, but I really need some insight.

My wiki is wiki.geministation.com. If you search up Template:Ambox, that should give an idea of what I am talking about.

I did install scribunto but it didn’t do anything. I’m so lost lol. 73.209.109.58 (talk) 03:06, 20 December 2019 (UTC)

Templates on English Wikipedia and other wikis are heavily customized through w:MediaWiki:Common.css and individual template stylesheets see (w:Template:Ambox/styles.css for instance). So for your template to look just like how you saw it at another site, you've to make sure you copied all its properties. In your case however, the first major thing you're lacking is the Extension:ParserFunctions. This is the extension that defines the #switch and #if function that are all over your template. They are currently not regarded as parser functions and to make them so you have to install the extension first. – Ammarpad (talk) 04:35, 20 December 2019 (UTC)
Could you look at Template:Template doc inline
Is it the same for this one too? The ParserFunctions extension? 73.209.109.58 (talk) 04:39, 20 December 2019 (UTC)
Yes. The #ifexist and #if functions it's using will only be correctly parsed when you install the extension. – Ammarpad (talk) 04:43, 20 December 2019 (UTC)
You just saved my day. I will install that extension and get back to you on my results, ty! 73.209.109.58 (talk) 04:45, 20 December 2019 (UTC)
Do i need the StringFunction extension? 73.209.109.58 (talk) 04:53, 20 December 2019 (UTC)
No, you don't. You can just add $wgPFEnableStringFunctions = true; in LocalSettings.php per it's documentation. But that's after you really installed ParserFunction extension. – Ammarpad (talk) 05:46, 20 December 2019 (UTC)
in particular, wikimedia projects do not use string functions, so no template from wikipedia will use them.
You will probably end up needing extension:scribunto and possibly other extensions if you import a lot of content from wikipedia Bawolff (talk) 23:46, 21 December 2019 (UTC)

MediaWiki Gadget not Working

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 created a gadget for bnwiki and it has been tested on testwiki. The problem is gadget on testwiki is working and gadget on bnwiki not working. MediaWiki Gadget definition setup is markAdmins[ResourceLoader|dependencies=mediawiki.util]|markAdmins.js. Regards, ZI Jony (Talk) 07:03, 20 December 2019 (UTC)

See Help:Locating broken scripts and feel free to provide clear instructions how someone else can actually see a problem. Malyacko (talk) 17:20, 20 December 2019 (UTC)
@Malyacko and AKlapper (WMF): I already read Help:Locating broken scripts and tried, I don't understand that if I use same codes for bnwiki gadget and testwiki gadget then why testwiki gadget working and bnwiki gadget not working! I have to report a bug? Thanks for your suggestion. Regards, ZI Jony (Talk) 19:07, 20 December 2019 (UTC)
@ZI Jony You don't have to report a bug (at least not in Phabricator as local on-wiki content is out of scope for Phabricator). But clear steps that allow someone else to *see* the problem. Please provide clear steps to reproduce that do not require any interpretation. Thanks in advance. Malyacko (talk) 20:51, 20 December 2019 (UTC)
@ZI Jony I had no idea which gadget to enable at https://bn.wikipedia.org/wiki/বিশেষ:পছন্দসমূহ#mw-prefsection-gadgets as I don't understand Bengali, so I enabled all of them. I still have no idea where to see something not working. If I go to a random page on https://bn.wikipedia.org/ then I see "10 active administrators" in the upper right corner, but I have no idea if that is what you'd expect, or not, or if you also see that, or not. Please be clearer and always include clear steps to reproduce, what exactly you expect where, and what happens instead. Malyacko (talk) 20:57, 20 December 2019 (UTC)
@ZI Jony: What messages you are seeing in the console? Could you copy-paste the data from browser console here? By the way, I took a quick look at the gadget. It's code needs to be improved a little. Please don't add jQuery and mediawiki as dependencies as they are code modules and they don't need to be loaded separately. It could be that mw.util dependency is not loading so try to add it as a fallback. Ainz Ooal Gown (talk) 02:41, 21 December 2019 (UTC)
i also responded on my talk page to this question. Script was comparing a non urlencoded url to the url encoded url from the a tags in the page. Bawolff (talk) 23:41, 21 December 2019 (UTC)
Now gadget working. Thanks everyone! Regards, ZI Jony (Talk) 02:41, 23 December 2019 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Editing/Discussion error

MediaWiki1.34.0

PHP7.3.12 (cgi-fcgi)

MySQL5.6.40-84.0-log

mvwiki.com

When hitting the 'Discussion' or 'Edit' tab you get a Fatal exception of type "Error" thank you Kevathens (talk) 09:21, 20 December 2019 (UTC)

See Manual:How to debug how to get a stacktrace for the exception. Malyacko (talk) 17:15, 20 December 2019 (UTC)
Fixed most issues but
'[Xf0epVKLGgTsrBtgS6wMrAAAAAc] /wiki/ MWException from line 164 of /xxx/xxx/xxx/wiki/includes/Hooks.php: Invalid callback TitleBlacklistHooks::userCan in hooks for getUserPermissionsErrorsExpensive' Kevathens (talk) 19:23, 20 December 2019 (UTC)
FIXED thanks Kevathens (talk) 19:28, 20 December 2019 (UTC)

Parser functions in Template is not...parsing

https://i.imgur.com/GYjVZEo.png


At some point, this started happening. We have a Switch function in this template to adjust the appearance of the output string of text. It used to work perfectly fine, and then one day the wiki suddenly stopped parsing the function and instead just spit out the raw text.


This occurs on regular pages too, not just the display page for the Template. 96.48.239.44 (talk) 12:46, 20 December 2019 (UTC)

Do you think maybe someone has edited LocalSettings.php so that Help:Extension:ParserFunctions isn't being loaded? Maybe you've upgraded either MW or the extension or both and are using the wrong way of loading the extension? Does it appear in your Special:Version? What happens when you add a {{# switch }} statement directly into a wiki page? Jonathan3 (talk) 22:12, 20 December 2019 (UTC)
Ah yes, it doesn't appear under Parser function hooks in Special:Version. Odd, I wonder where it went... 96.48.239.44 (talk) 01:12, 21 December 2019 (UTC)
How can it be added back in? 96.48.239.44 (talk) 02:27, 21 December 2019 (UTC)
You said it does not appear on Special:Version, that probably means ParseFunctions extension is not installed and that's the first thing to check. Please check your version page and see which extensions are installed. – Ammarpad (talk) 04:26, 21 December 2019 (UTC)

What do you do when some one is publishing information they do not have permission to use? Google can not contact the publisher and now I am having to pay for legal help? Can any one give me some advice 92.3.235.146 (talk) 13:04, 20 December 2019 (UTC)

The person publishing the information simply said they will not remove it 92.3.235.146 (talk) 13:05, 20 December 2019 (UTC)
we do not provide legal advise here and this question does not relate to the MediaWiki software package, which is the purpose of this board. —TheDJ (Not WMF) (talkcontribs) 14:14, 20 December 2019 (UTC)

Problem with MobileFrontend - Nearby page

In a new MediaWiki installation, version 1.34 with https, the page of Nearby gives the error: "Nearby is having some issues" - " Try refreshing your location".

The problem isn't the browser, as the Nearby of Wikipedia are visible.

Please someone know what can be the problem? Thank you Brunodapei (talk) 18:13, 20 December 2019 (UTC)

Getting Started

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


I have been working/dabbling in IT for a long time. I am new to Wikis. I am working on converting a 200 page IT guide about KDE and LAMP to a Wiki. BUT I can't find any useful starter guide(s). I want to start with a basic page heirarchy structure. Simple articles detailing how-tos for using KDE and LAMP.


I have the wiki installed and it runs great. Version 1.3.4 on Ubuntu Server 18.04.3 and Kubuntu Desktop.

I need help on creating the outline. Individual pages I can figure out. I would love to have something like automatic bullets and numbering where you have say 6 top level pages and then under each a bunch of sub pages etc. etc.


Please Please can someone guide me to a simple starter guide. From there I will be able to work my way up to more complex systems. Thanks in advance. Walttheboss (talk) 09:16, 21 December 2019 (UTC)

perhaps help:Categories, extension:DynamicPageList (Wikimedia) and extension:CategoryTree might help your use case.
MediaWiki is not opinionated on how to structure your wiki, and there is no right or wrong way to do it. Unfortunately that also means you mostly have to come up with the structure yourself. Bawolff (talk) 23:39, 21 December 2019 (UTC)
Thanks for your help. I looked at the links you sent and that does give me a start.
I know how I want the hierarchy of pages and the structure. I just don't know or understand the mechanics of building it. I don't want to get a month into this and realize I can't change it and set it up wrong. I don't want to start building with bamboo scaffolding only to find out the building goes up and not left and right.
As this point I think I will set out to build a beginner's guide to using MediaWiki. Walttheboss (talk) 23:14, 22 December 2019 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

RegexParserFunctions install gives Fatal exception of type MWException

With Mediawiki 1.33.1 (http://wiki0.fancy-test.com/Special:Version) I install the https://www.mediawiki.org/wiki/Extension:RegexParserFunctions extension with a svn co, but as soon as I enable it in LocalSettings.php, all pages return [Xf32des6yAjFRcw3CODikAAAAAo] 2019-12-21 10:39:50: Fatal exception of type MWException Vicarage (talk) 10:45, 21 December 2019 (UTC)

I have now found extension https://www.mediawiki.org/wiki/Extension:RegexFunctions which does work. It would be helpful to link the 2 extensions together Vicarage (talk) 12:04, 21 December 2019 (UTC)
Extension:RegexParserFunctions does not mention "svn co" anywhere - what makes you think that it should be used for installation? If you get a fatal exception, then please follow Manual:How to debug to get a stacktrace. We do not know what "link the two extensions together" means exactly. Please elaborate. Malyacko (talk) 15:05, 21 December 2019 (UTC)
svn co checks out a git archive, it puts php files into the correct subdirectory under extensions. I don't plan to debug the problem further as the other extension works, I was just suggesting that each extension has a "see also" link to the other, so people are aware alternatives exist. I only found about RegexFunctions in an aside on the RegexParserFuctions talk page. They latter has not been updated for a decade, so it looks like RegexFunctions should be more promoted one.
I have now mentioned the problem in the Discussion page of the extension, and added the working extension to See Also Vicarage (talk) 17:35, 21 December 2019 (UTC)

I Can't Have My Wiki On Subdomain

Hello Everyone
i have subdomain "wiki"
so i could get to my wiki by wiki.example.com
but when i enter in the url there's example.com/wiki
it's redirect me to that
What Should I Do?
Very Much Thanks To Any One Whos Help :) 2A00:A040:185:D039:AD3B:B461:8B9C:5C12 (talk) 15:27, 21 December 2019 (UTC)
See Manual:Short URL Malyacko (talk) 22:55, 21 December 2019 (UTC)
I Found
Subdomain using Lighttpd
But I Not Having That Installed
and the tutorial not explaine how to do it in shared hosting
Manual:Installing MediaWiki with Lighttpd 185.191.205.142 (talk) 14:10, 24 December 2019 (UTC)
Please let the community know what you are running on. What operating system?(Windows, Linux, other) What version of the wiki software?
My first guess is a mistake in the vhosts files. Or permissions that don't let you into the subfolder you want. Walttheboss (talk) 22:16, 21 December 2019 (UTC)
i'm using a shared hosting on hostinger
version: 1.33.1
i don't know what is the vhosts files
i do get to the subfolder but it's supposed to Shown with subdomain 185.191.205.142 (talk) 12:59, 24 December 2019 (UTC)
first check, $wgServer, $wgArticlePath and $wgScriptPath is correct in LocalSettings.php Bawolff (talk) 23:34, 21 December 2019 (UTC)
eyalgi.com
$wgScriptPath.'/index.php?title=$1'
'/wiki'
by the order that you typed 185.191.205.142 (talk) 13:02, 24 December 2019 (UTC)
$wgServer needs to be your domain. So if you want it to be on https://wiki.eyalgi.com then you need to set it to be that (with protocol). Bawolff (talk) 21:57, 24 December 2019 (UTC)
Thanks for replying
it's give me the address wiki.eyalgi.com/wiki
with 404 error 185.191.205.141 (talk) 17:04, 25 December 2019 (UTC)
well did you put mediawiki in a directory named /wiki or have short urls setup for a rewrite rule for /wiki? If no, change $wgScriptPath and $wgArticlePath to the appropriate paths Bawolff (talk) 17:56, 25 December 2019 (UTC)
Yes My Wiki in on /wiki folder
i don't know if i have short urls setup
to what change this values? 185.191.205.140 (talk) 20:06, 26 December 2019 (UTC)
probably you want $wgScriptPath = '/'; and $wgArticlePath= '/index.php/$1'; Bawolff (talk) 21:52, 26 December 2019 (UTC)
Thanks Bro It's solved
but know there's just html the all ccs design go
i hope you understand what i mean
and very thanks for all the help if i could pay you i will :) 141.226.209.149 (talk) 13:14, 27 December 2019 (UTC)
sorry, that might have been my bad, try making $wgScriptPath =''; instead of having it being / Bawolff (talk) 17:11, 27 December 2019 (UTC)
Hi Again
I'm Using The Visual Editor Extension And Parsoid On Heroku Server
And now it's not working, because the subdomain issue Solved
i tried to change the url of the parsoid to with domain but it didn't change anything
if you could help me with that. that will be great 160.116.0.30 (talk) 15:28, 28 December 2019 (UTC)
Thanks Solved 160.116.0.30 (talk) 06:51, 28 December 2019 (UTC)

Extracting texts/pages out of mediawiki files

Hi guys,

I have like no IT knowledge at all.

Therefore, I wanted to ask if it is somehow smoothly possible to extract the texts/pages from the files in the mediawiki folder into a document.

Background scenario: We had mediawiki on our server but couldn't use it anymore since it required an update. We are not sure if we still want to use it in future therefore we just look for a way to get all the text/pages without setting mediawiki up again.

Is there some kind of software/trick that every noob can use or do you have another nice solution? 128.0.103.151 (talk) 16:37, 21 December 2019 (UTC)

Manual:Parameters to Special:Export , Manual:Backing up a wiki Malyacko (talk) 22:53, 21 December 2019 (UTC)

Using purgePage.php for scheduled tasks

I have tried following the instructions on Manual:purgePage.php to have a couple of pages purged once every hour. There are no error messages, quite the contrary, but the intended purges don't seem to succeed as I still have the purge those pages manually to invalidate cache and make the latest content appear. I have tried both approaches: listing an individual page and referring to a file on the server (in a custom folder, say /mycustomfolder/purge.txt).

What could be the issue? Am I missing something?

MW 1.31 Cavila 21:39, 21 December 2019 (UTC)

Please clarify your Operating System. Are you on Linux or Windows. If on Linux I would rename purge.txt to purge.sh for clarity and then make sure you have set the permissions to executable. Walttheboss (talk) 22:21, 21 December 2019 (UTC)
He's using purge.txt as input redirection to purgePage.php. it doesnt matter what the input file is called, and it does not need to be marked executable Bawolff (talk) 23:27, 21 December 2019 (UTC)
if you view the (html) source of the page, there should be an html comment saying, saved in parser cache with key something on some date. Is the date listed after whenever you ran the script. Also, to confirm, its not purging both for logged in and logged out users?
When you say the script has no errors, do you also mean it showed the success message it was supposed to?
As an alternative method, pages with {{CURRENTHOUR}} on them are cached for at most an hour edit: this only applies to parser cache not file cache Bawolff (talk) 23:32, 21 December 2019 (UTC)
Thanks for the replies!
Do you mean "Cached time" and "Cache expiry"? For logged-in users, "Cached time" is dynamic and "Cache expiry" is set to 0. I assume though this refers to object caching, which is set to CACHE_NONE on this wiki.
Also, simple file caching is turned on (no Varnish or Squid). Refreshing a page, manually as a logged-in user (with purge rights), invalidates / updates file cache for users that are not logged in. For some reason, this doesn't work for me using a scheduled task. Almost as if the script does not have purge rights but that seems unlikely.
The process runs without error messages but I can't see any further information that lets me see what actually went on when it ran. Will dig if I can find any server logs. Cavila 12:20, 22 December 2019 (UTC)
Are you running the script as the same user as mediawiki/apache runs as? Perhaps it literally doesnt have the right to delete the cached file in terms of filesystem rights.
On debian you can usually run it as sudo -u www-data php purgePage.php < listOfPages.txt although slmetimes the username is different than www-data
You might also want to look into installing php-apcu and setting up object caching. Unless the vast majority of your users are logged out, it can often have just as much performance savings as file cache maybe even more. Of course you can use both types of caching together as well. Bawolff (talk) 12:46, 22 December 2019 (UTC)

error when trying to go to Special:SpecialPages

I get an error when trying to go to Special:SpecialPages,

[XDRT&Uac4mYS3433VSW4gGHKME] /index.php/Special:SpecialPages Error from line 402 of /home/XXX/XXX/mediawiki-1.32.0/includes/specialpage/SpecialPageFactory.php: Class 'AncientPagesPage' not found

Backtrace:

#0 /home/XXX/XXX/mediawiki-1.32.0/includes/specialpage/SpecialPageFactory.php(432): MediaWiki\Special\SpecialPageFactory->getPage(string)

#1 /home/XXX/XXX/mediawiki-1.32.0/includes/specials/SpecialSpecialpages.php(56): MediaWiki\Special\SpecialPageFactory->getUsablePages(User)

#2 /home/XXX/XXX/mediawiki-1.32.0/includes/specials/SpecialSpecialpages.php(44): SpecialSpecialpages->getPageGroups()

#3 /home/XXX/XXX/mediawiki-1.32.0/includes/specialpage/SpecialPage.php(569): SpecialSpecialpages->execute(NULL)

#4 /home/XXX/XXX/mediawiki-1.32.0/includes/specialpage/SpecialPageFactory.php(568): SpecialPage->run(NULL)

#5 /home/XXX/XXX/mediawiki-1.32.0/includes/MediaWiki.php(288): MediaWiki\Special\SpecialPageFactory->executePath(Title, RequestContext)

#6 /home/XXX/XXXmediawiki-1.32.0/includes/MediaWiki.php(860): MediaWiki->performRequest()

#7 /home/XXX/XXX/mediawiki-1.32.0/includes/MediaWiki.php(517): MediaWiki->main()

#8 /home/XXX/XXX/mediawiki-1.32.0/index.php(42): MediaWiki->run()

#9 {main} 2610S (talk) 00:46, 22 December 2019 (UTC)

sounds like your mediawiki installation is corrupt and has a mismatch of different versions (AncientPagesPage recently got renamed to SpecialAncientPages). Reinstall mediawiki, if using the tarball, be sure to extract in a clean directory Bawolff (talk) 01:48, 22 December 2019 (UTC)
@Bawolff How do I reinstall, keeping all my pages ? 2610S (talk) 05:59, 22 December 2019 (UTC)
By reinstall, Bawolff means only reinstalling the MediaWiki installation files, keeping the database intact. It's like an upgrade. See Manual:Upgrading#Unpack the new files for instructions on your particular case Ciencia Al Poder (talk) 11:10, 22 December 2019 (UTC)

update.php failing 1.31 > 1.34

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 trying to upgrade from 1.31 to 1.34 update.php is failing with the following information


Migrating revision data to the MCR 'slot' and 'content' tables, printing progress markers.

For large databases, you may want to hit Ctrl-C and do this manually with

maintenance/populateContentTables.php.

Populating revision...

... revision processed up to revision id 500 of 79590 (383 rows in 0.17646288871765 seconds)

...

... revision processed up to revision id 27500 of 79590 (25540 rows in 6.0020930767059 seconds)

Failed to populate content table revision row batch starting at 27501 due to exception: MediaWiki\Storage\BlobAccessException: Unable to fetch blob at tt:27622 in /home/public_html/live/public/includes/Storage/SqlBlobStore.php:295

Stack trace:

#0 /home/public_html/live/public/maintenance/populateContentTables.php(385): MediaWiki\Storage\SqlBlobStore->getBlob('tt:27622')

#1 /home/public_html/live/public/maintenance/populateContentTables.php(287): PopulateContentTables->fillMissingFields(Object(stdClass), 'wikitext', 'tt:27622')

#2 /home/public_html/live/public/maintenance/populateContentTables.php(241): PopulateContentTables->populateContentTablesForRowBatch(Object(Wikimedia\Rdbms\ResultWrapper), 27501, 'revision')

#3 /home/public_html/live/public/maintenance/populateContentTables.php(108): PopulateContentTables->populateTable('revision')

#4 /home/public_html/live/public/includes/installer/DatabaseUpdater.php(1394): PopulateContentTables->execute()

#5 /home/public_html/live/public/includes/installer/DatabaseUpdater.php(490): DatabaseUpdater->populateContentTables()

#6 /home/public_html/live/public/includes/installer/DatabaseUpdater.php(454): DatabaseUpdater->runUpdates(Array, false)

#7 /home/public_html/live/public/maintenance/update.php(205): DatabaseUpdater->doUpdates(Array)

#8 /home/public_html/live/public/maintenance/doMaintenance.php(99): UpdateMediaWiki->execute()

#9 /home/public_html/live/public/maintenance/update.php(277): require_once('/home/public_ht...')

#10 /home/public_html/live/public/update_domain.php(12): include('/home/public_ht...')

#11 {main}


As far as I can tell, this is the revision it's having a problem with: https://bahaipedia.org/index.php?oldid=27622


I am not sure how to go about troubleshooting this issue. I did try and run populateContentTables.php separately but got the same error. As an experiment I switched to the master branch but the update still failed. T0lk (talk) 13:34, 22 December 2019 (UTC)

Well that's weird, given the revision is clearly being shown on your wiki. Just to check, do you have external storage setup, revision compression, or any other non-common configuration related to storing of revision text?
Can you tell me the results if you do the SQL query SELECT * from text where old_id = 27622; as well as the query SELECT * from revision left join text on old_id = rev_text_id where rev_id = 27622;.
As far as I can tell, the error is complaining about missing row in text table with old_id of 27622 Bawolff (talk) 17:07, 22 December 2019 (UTC)
Thanks for your reply, I do use s3 to host images which is a new change, it's managed by Extension:AWS. There are no other options enabled that you asked about.
SELECT * from text where old_id = 27622; returned
Empty set (0.00 sec)
The second query returned
+--------+----------+-------------+---------------------------------------+----- -----+---------------+----------------+----------------+-------------+---------+ ---------------+---------------------------------+--------------------+--------- ----------+--------+------------------------------------------------------------ -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -------+-----------+ | rev_id | rev_page | rev_text_id | rev_comment | rev_ user | rev_user_text | rev_timestamp | rev_minor_edit | rev_deleted | rev_len | rev_parent_id | rev_sha1 | rev_content_format | rev_cont ent_model | old_id | old_text | old_flags | +--------+----------+-------------+---------------------------------------+----- -----+---------------+----------------+----------------+-------------+---------+ ---------------+---------------------------------+--------------------+--------- ----------+--------+------------------------------------------------------------ -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -------+-----------+ | 27622 | 4402 | 27366 | Robot changing Bahá'í to Bahá’í | 143 | Bot | 20081021175725 | 1 | 0 | 785 | 24382 | mw8rt27cwsw1gyeksqvgm0hm2i5xi1i | NULL | NULL | 27366 | A fundamental principle of the [[Bahá’í Faith]] is the harm ony of religion and '''[[science]]'''. The Bahá’í Faith teaches that properly a ppreciated, science and religion will never conflict, as each are complementary ways of explaining truth, which on any issue must necessarily be singular. The t eachings state that whenever conflict arises between religion and science it is due to human error; either through misinterpretation of religious scriptures or the lack of a more complete understanding of science. [[‘Abdu’l-Bahá]] explained that religious teachings which are at variance with science should not be accep ted; he explained that religion has to be reasonable since God endowed humankind with reason so that they can discover truth. ('''[[Science|more...]]''') | utf-8 | +--------+----------+-------------+---------------------------------------+----- -----+---------------+----------------+----------------+-------------+---------+ ---------------+---------------------------------+--------------------+--------- ----------+--------+------------------------------------------------------------ -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -------+-----------+ T0lk (talk) 17:51, 22 December 2019 (UTC)
Sorry, could you also check what SELECT * from revision where rev_text_id = 27622; is?
The error seems to indicate that something in revision.rev_text_id references a text.old_id that is missing. Which is weird, I'm not sure what would cause that. Bawolff (talk) 02:07, 23 December 2019 (UTC)
Sure, here it is:
mysql> SELECT * from revision where rev_text_id = 27622;
+--------+----------+-------------+---------------------------------------+----------+---------------+----------------+----------------+-------------+---------+---------------+----------+--------------------+-------------------+
| rev_id | rev_page | rev_text_id | rev_comment | rev_user | rev_user_text | rev_timestamp | rev_minor_edit | rev_deleted | rev_len | rev_parent_id | rev_sha1 | rev_content_format | rev_content_model |
+--------+----------+-------------+---------------------------------------+----------+---------------+----------------+----------------+-------------+---------+---------------+----------+--------------------+-------------------+
| 27878 | 7261 | 27622 | Robot changing Bahá'í to Baháâí | 143 | Bot | 20081021191300 | 1 | 0 | 497 | 19803 | | NULL | NULL |
+--------+----------+-------------+---------------------------------------+----------+---------------+----------------+----------------+-------------+---------+---------------+----------+--------------------+-------------------+
1 row in set (0.02 sec)
Here as an image if it's easier to read: https://i.imgur.com/1hX6HQ4.png T0lk (talk) 02:15, 23 December 2019 (UTC)
Ok, so its https://bahaipedia.org/index.php?oldid=27878 causing the problem and indeed that revision looks broken.
I'm honestly not sure what the best solution is here. You could put a dummy entry into text table i guess with the old_id of 27622, just so the script runs. Bawolff (talk) 04:25, 23 December 2019 (UTC)
Awesome, thanks for your help. I ran the following command and then the updater completed successfully:

INSERT INTO text(old_id,old_text,old_flags) VALUES (27622,'Dummy','utf-8');

T0lk (talk) 14:41, 23 December 2019 (UTC)
I ran into this issue migrating from 1.19 to 1.34 except it wasn't individual old_ids, it was 2 blocks of several hundred continuous old_ids that were corrupt in the database. The above fix of inserting 'dummy' values allowed the updater to finish successfully. This simple bash script quickly fixed the range of old_ids I needed to patch:
for id in {111..1111}; do echo "INSERT INTO text(old_id,old_text,old_flags) VALUES ($id,'dummy','utf-8');" | sudo mysql my_database; done ByBunni (talk) 05:03, 23 August 2020 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

debian upgrade to buster, curl issue

this is a solved issue, i just wanted to put notes somewhere as it may help someone.


I upgraded our debian wiki from stretch to buster. we use mediawiki 1.31 from git.


when visual editor was used this this message came up: cURL extension missing


apt install libapache2-mod-php7.3

a2enmod php7.3

systemctl restart apache2


  wiki still did not work , trying to access it got:

  You are missing a required extension to PHP that MediaWiki requires to run. Please install:                

  • mbstring

  however php7.3-mbstring is installed.

this fixed, the old module had to get removed from apache :

  a2dismod php7.0

  systemctl restart apache2 RobFantini (talk) 20:09, 22 December 2019 (UTC)

ran into this on another upgrade,
a better solution is to install this debian package, which should auto handle php upgrades in apache2:
apt install libapache2-mod-php
from apt show libapache2-mod-php : This package is a dependency package, which depends on latest stable PHP version (currently 7.3). RobFantini (talk) 17:51, 4 January 2020 (UTC)

Hi All,

I install a new mediawiki1.33.1

but my page "RecentChanges" not shown "Active Filters"

how can i do..... Bella840705 (talk) 06:06, 23 December 2019 (UTC)

[XgA0dSmIdlnLFZVQ2n0gQwAAAAc] /mediawiki/load.php?lang=zh-tw&modules=startup&only=scripts&skin=vector   BadMethodCallException from line 826 of /var/www/html/mediawiki/includes/session/SessionManager.php: Sessions are disabled for this entry point
Backtrace:
#0 /var/www/html/mediawiki/includes/session/SessionManager.php(196): MediaWiki\Session\SessionManager->getSessionFromInfo(MediaWiki\Session\SessionInfo, WebRequest)
#1 /var/www/html/mediawiki/includes/WebRequest.php(748): MediaWiki\Session\SessionManager->getSessionForRequest(WebRequest)
#2 /var/www/html/mediawiki/includes/user/User.php(1380): WebRequest->getSession()
#3 /var/www/html/mediawiki/includes/user/User.php(441): User->loadFromSession()
#4 /var/www/html/mediawiki/includes/user/User.php(5478): User->load()
#5 /var/www/html/mediawiki/includes/user/User.php(3174): User->loadOptions()
#6 /var/www/html/mediawiki/extensions/WYSIWYG-src/WYSIWYG/CKeditor.body.php(347): User->getOption(string)
#7 /var/www/html/mediawiki/includes/Hooks.php(174): CKeditor_MediaWiki->onParserAfterTidy(Parser, string)
#8 /var/www/html/mediawiki/includes/Hooks.php(202): Hooks::callHook(string, array, array, NULL)
#9 /var/www/html/mediawiki/includes/parser/Parser.php(1487): Hooks::run(string, array)
#10 /var/www/html/mediawiki/includes/parser/Parser.php(494): Parser->internalParseHalfParsed(string, boolean, boolean)
#11 /var/www/html/mediawiki/includes/cache/MessageCache.php(1261): Parser->parse(string, Title, ParserOptions, boolean)
#12 /var/www/html/mediawiki/includes/Message.php(1262): MessageCache->parse(string, Title, boolean, boolean, LanguageZh_hans)
#13 /var/www/html/mediawiki/includes/Message.php(890): Message->parseText(string)
#14 /var/www/html/mediawiki/includes/Message.php(943): Message->toString(string)
#15 /var/www/html/mediawiki/includes/changetags/ChangeTags.php(160): Message->parse()
#16 /var/www/html/mediawiki/includes/specialpage/ChangesListSpecialPage.php(880): ChangeTags::tagDescription(string, ResourceLoaderContext)
#17 /var/www/html/mediawiki/includes/libs/objectcache/WANObjectCache.php(1414): ChangesListSpecialPage::{closure}(boolean, integer, array, NULL)
#18 /var/www/html/mediawiki/includes/libs/objectcache/WANObjectCache.php(1275): WANObjectCache->doGetWithSetCallback(string, integer, Closure, array)
#19 /var/www/html/mediawiki/includes/specialpage/ChangesListSpecialPage.php(902): WANObjectCache->getWithSetCallback(string, integer, Closure, array)
#20 /var/www/html/mediawiki/includes/specialpage/ChangesListSpecialPage.php(834): ChangesListSpecialPage::getChangeTagList(ResourceLoaderContext)
#21 /var/www/html/mediawiki/includes/resourceloader/ResourceLoaderFileModule.php(1122): ChangesListSpecialPage::getRcFiltersConfigVars(ResourceLoaderContext)
#22 /var/www/html/mediawiki/includes/resourceloader/ResourceLoaderFileModule.php(624): ResourceLoaderFileModule->expandPackageFiles(ResourceLoaderContext)
#23 /var/www/html/mediawiki/includes/resourceloader/ResourceLoaderModule.php(833): ResourceLoaderFileModule->getDefinitionSummary(ResourceLoaderContext)
#24 /var/www/html/mediawiki/includes/resourceloader/ResourceLoaderStartUpModule.php(255): ResourceLoaderModule->getVersionHash(ResourceLoaderContext)
#25 /var/www/html/mediawiki/includes/resourceloader/ResourceLoaderStartUpModule.php(438): ResourceLoaderStartUpModule->getModuleRegistrations(ResourceLoaderContext)
#26 /var/www/html/mediawiki/includes/resourceloader/ResourceLoaderModule.php(727): ResourceLoaderStartUpModule->getScript(ResourceLoaderContext)
#27 /var/www/html/mediawiki/includes/resourceloader/ResourceLoaderModule.php(694): ResourceLoaderModule->buildContent(ResourceLoaderContext)
#28 /var/www/html/mediawiki/includes/resourceloader/ResourceLoaderModule.php(830): ResourceLoaderModule->getModuleContent(ResourceLoaderContext)
#29 /var/www/html/mediawiki/includes/resourceloader/ResourceLoader.php(656): ResourceLoaderModule->getVersionHash(ResourceLoaderContext)
#30 [internal function]: ResourceLoader->{closure}(string)
#31 /var/www/html/mediawiki/includes/resourceloader/ResourceLoader.php(668): array_map(Closure, array)
#32 /var/www/html/mediawiki/includes/resourceloader/ResourceLoader.php(749): ResourceLoader->getCombinedVersion(ResourceLoaderContext, array)
#33 /var/www/html/mediawiki/load.php(46): ResourceLoader->respond(ResourceLoaderContext)
#34 {main} Bella840705 (talk) 07:16, 23 December 2019 (UTC)
the ckeditor extension appears incompatible with your version of mediawiki. I would suggest disabling. Bawolff (talk) 16:22, 23 December 2019 (UTC)
Hi Bawolff, do you have any suggest for editor? Bella840705 (talk) 02:12, 24 December 2019 (UTC)
extension:VisualEditor but its annoying to install unless you are using the version for master mw Bawolff (talk) 02:45, 24 December 2019 (UTC)

Upload error

[XgEVFAdUCE-a-3yOh3rnWQAAAVA] /index.php/special:upload MediaWiki\ShellDisabledError from line 88 of /home/xxx/public_html/xxx/mediawiki-1.32.2/includes/shell/Command.php: Unable to run external programs, proc_open() is disabled

Backtrace:

#0 /home/xxx/public_html/xxx/mediawiki-1.32.2/includes/shell/CommandFactory.php(105): MediaWiki\Shell\Command->__construct()

#1 /home/xxx/public_html/xxx/mediawiki-1.32.2/includes/shell/Shell.php(127): MediaWiki\Shell\CommandFactory->create()

#2 /home/xxx/public_html/xxx/mediawiki-1.32.2/extensions/PdfHandler/includes/PdfImage.php(132): MediaWiki\Shell\Shell::command(array)

#3 /home/xxx/public_html/xxx/mediawiki-1.32.2/extensions/PdfHandler/includes/PdfHandler.php(324): PdfImage->retrieveMetaData()

#4 /home/xxx/public_html/xxx/mediawiki-1.32.2/includes/utils/MWFileProps.php(84): PdfHandler->getMetadata(FSFile, string)

#5 /home/xxx/public_html/xxx/mediawiki-1.32.2/includes/upload/UploadBase.php(509): MWFileProps->getPropsFromPath(string, string)

#6 /home/xxx/public_html/xxx/mediawiki-1.32.2/includes/upload/UploadBase.php(444): UploadBase->verifyPartialFile()

#7 /home/xxx/public_html/xxx/mediawiki-1.32.2/includes/upload/UploadBase.php(347): UploadBase->verifyFile()

#8 /home/xxx/public_html/xxx/mediawiki-1.32.2/includes/upload/UploadFromFile.php(95): UploadBase->verifyUpload()

#9 /home/xxx/public_html/xxx/mediawiki-1.32.2/includes/specials/SpecialUpload.php(503): UploadFromFile->verifyUpload()

#10 /home/xxx/public_html/xxx/mediawiki-1.32.2/includes/specials/SpecialUpload.php(207): SpecialUpload->processUpload()

#11 /home/xxx/public_html/xxx/mediawiki-1.32.2/includes/specialpage/SpecialPage.php(569): SpecialUpload->execute(NULL)

#12 /home/xxx/public_html/xxx/mediawiki-1.32.2/includes/specialpage/SpecialPageFactory.php(568): SpecialPage->run(NULL)

#13 /home/xxx/public_html/xxx/mediawiki-1.32.2/includes/MediaWiki.php(288): MediaWiki\Special\SpecialPageFactory->executePath(Title, RequestContext)

#14 /home/xxx/public_html/xxx/mediawiki-1.32.2/includes/MediaWiki.php(860): MediaWiki->performRequest()

#15 /home/xxx/public_html/xxx/mediawiki-1.32.2/includes/MediaWiki.php(517): MediaWiki->main()

#16 /home/xxx/public_html/xxx/mediawiki-1.32.2/index.php(42): MediaWiki->run()

#17 {main}

Please help me. 2610S (talk) 19:31, 23 December 2019 (UTC)

the error message says it all, proc_open has been disabled in php.ini [3] preventing using image magick for image resizing. You should contact your hosting provider.
Alternatively you can try using gd for image resizing instead of image magick - try setting $wgUseImageMagick to false in LocalSettings.php Bawolff (talk) 21:10, 23 December 2019 (UTC)

MW 1.34 I am getting this error when edits are made to a page.

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


Hi I am getting this error when an edit is made on mediawiki 1.34


[XgIpKAmmW-Nv8NAqB4QXVwAAAAE] /index.php?title=Infobox&action=submit UnexpectedValueException from line 462 of /home/dennisgo/public_html/includes/libs/rdbms/loadbalancer/LoadBalancer.php: Invalid server index index #DB_SLAVE

Backtrace:

#0 /home/dennisgo/public_html/includes/libs/rdbms/loadbalancer/LoadBalancer.php(896): Wikimedia\Rdbms\LoadBalancer->getConnectionIndex(string, array, string)

#1 /home/dennisgo/public_html/includes/libs/rdbms/loadbalancer/LoadBalancer.php(1043): Wikimedia\Rdbms\LoadBalancer->getConnection(string, array, string, integer)

#2 /home/dennisgo/public_html/includes/GlobalFunctions.php(2576): Wikimedia\Rdbms\LoadBalancer->getMaintenanceConnectionRef(string, array, string)

#3 /home/dennisgo/public_html/extensions/AutoSitemap/AutoSitemap_body.php(98): wfGetDB(string)

#4 /home/dennisgo/public_html/includes/Hooks.php(174): AutoSitemap::writeSitemap(Revision, NULL, NULL)

#5 /home/dennisgo/public_html/includes/Hooks.php(202): Hooks::callHook(string, array, array, NULL)

#6 /home/dennisgo/public_html/includes/Revision/RevisionStore.php(535): Hooks::run(string, array)

#7 /home/dennisgo/public_html/includes/Storage/PageUpdater.php(986): MediaWiki\Revision\RevisionStore->insertRevisionOn(MediaWiki\Revision\RevisionStoreRecord, Wikimedia\Rdbms\DBConnRef)

#8 /home/dennisgo/public_html/includes/Storage/PageUpdater.php(756): MediaWiki\Storage\PageUpdater->doModify(CommentStoreComment, User, integer)

#9 /home/dennisgo/public_html/includes/page/WikiPage.php(1931): MediaWiki\Storage\PageUpdater->saveRevision(CommentStoreComment, integer)

#10 /home/dennisgo/public_html/includes/EditPage.php(2341): WikiPage->doEditContent(WikitextContent, CommentStoreComment, integer, boolean, User, string, array, integer)

#11 /home/dennisgo/public_html/includes/EditPage.php(1617): EditPage->internalAttemptSave(array, boolean)

#12 /home/dennisgo/public_html/includes/EditPage.php(682): EditPage->attemptSave(array)

#13 /home/dennisgo/public_html/includes/actions/EditAction.php(55): EditPage->edit()

#14 /home/dennisgo/public_html/includes/actions/SubmitAction.php(38): EditAction->show()

#15 /home/dennisgo/public_html/includes/MediaWiki.php(511): SubmitAction->show()

#16 /home/dennisgo/public_html/includes/MediaWiki.php(302): MediaWiki->performAction(Article, Title)

#17 /home/dennisgo/public_html/includes/MediaWiki.php(900): MediaWiki->performRequest()

#18 /home/dennisgo/public_html/includes/MediaWiki.php(527): MediaWiki->main()

#19 /home/dennisgo/public_html/index.php(44): MediaWiki->run()

#20 {main} AlgorithmGG (talk) 15:08, 24 December 2019 (UTC)

AutoSitemap extension is broken. It looks like it is calling wfGetDB( "DB_SLAVE" ) instead of wfGetDB( DB_REPLICA ) Bawolff (talk) 03:20, 25 December 2019 (UTC)
Thanks! Yes i had to suspend the extension. AlgorithmGG (talk) 19:16, 25 December 2019 (UTC)
Is there a task set for this? sounds like something I can change myself? or is there an alternative sitemap extension? AlgorithmGG (talk) 20:12, 26 December 2019 (UTC)
This has been fixed now. – Ammarpad (talk) 00:34, 27 December 2019 (UTC)
Sweet, is it available? AlgorithmGG (talk) 03:06, 27 December 2019 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

I am getting the following internal error when i import a template page mw 1.34

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.


Has anybody encountered this internal error importing a template xml? on MW 1.34


[XgJT-MJIirFbobdpnxyungAAAAE] /index.php?title=Special:Import&action=submit Error from line 78 of /home/dennisgo/public_html/extensions/TemplateStyles/includes/TemplateStylesContent.php: Class 'Wikimedia\CSS\Parser\Parser' not found

Backtrace:

#0 /home/dennisgo/public_html/extensions/TemplateStyles/includes/TemplateStylesContent.php(135): TemplateStylesContent->sanitize(array)

#1 /home/dennisgo/public_html/includes/Revision/RenderedRevision.php(267): TemplateStylesContent->getParserOutput(Title, integer, ParserOptions, boolean)

#2 /home/dennisgo/public_html/includes/Revision/RenderedRevision.php(236): MediaWiki\Revision\RenderedRevision->getSlotParserOutputUncached(TemplateStylesContent, boolean)

#3 /home/dennisgo/public_html/includes/Revision/RevisionRenderer.php(215): MediaWiki\Revision\RenderedRevision->getSlotParserOutput(string)

#4 /home/dennisgo/public_html/includes/Revision/RevisionRenderer.php(152): MediaWiki\Revision\RevisionRenderer->combineSlotOutput(MediaWiki\Revision\RenderedRevision, array)

#5 [internal function]: MediaWiki\Revision\RevisionRenderer->MediaWiki\Revision\{closure}(MediaWiki\Revision\RenderedRevision, array)

#6 /home/dennisgo/public_html/includes/Revision/RenderedRevision.php(198): call_user_func(Closure, MediaWiki\Revision\RenderedRevision, array)

#7 /home/dennisgo/public_html/includes/Storage/DerivedPageDataUpdater.php(1290): MediaWiki\Revision\RenderedRevision->getRevisionParserOutput()

#8 /home/dennisgo/public_html/includes/Storage/DerivedPageDataUpdater.php(1649): MediaWiki\Storage\DerivedPageDataUpdater->getCanonicalParserOutput()

#9 /home/dennisgo/public_html/includes/Storage/DerivedPageDataUpdater.php(1430): MediaWiki\Storage\DerivedPageDataUpdater->doParserCacheUpdate()

#10 /home/dennisgo/public_html/includes/page/WikiPage.php(2072): MediaWiki\Storage\DerivedPageDataUpdater->doUpdates()

#11 /home/dennisgo/public_html/includes/import/ImportableOldRevisionImporter.php(143): WikiPage->doEditUpdates(MediaWiki\Revision\RevisionStoreRecord, User, array)

#12 /home/dennisgo/public_html/includes/import/WikiRevision.php(616): ImportableOldRevisionImporter->import(WikiRevision)

#13 /home/dennisgo/public_html/includes/import/WikiImporter.php(366): WikiRevision->importOldRevision()

#14 /home/dennisgo/public_html/includes/import/WikiImporter.php(501): WikiImporter->importRevision(WikiRevision, WikiImporter)

#15 /home/dennisgo/public_html/includes/import/WikiImporter.php(941): WikiImporter->revisionCallback(WikiRevision)

#16 /home/dennisgo/public_html/includes/import/WikiImporter.php(860): WikiImporter->processRevision(array, array)

#17 /home/dennisgo/public_html/includes/import/WikiImporter.php(802): WikiImporter->handleRevision(array)

#18 /home/dennisgo/public_html/includes/import/WikiImporter.php(606): WikiImporter->handlePage()

#19 /home/dennisgo/public_html/includes/specials/SpecialImport.php(227): WikiImporter->doImport()

#20 /home/dennisgo/public_html/includes/specials/SpecialImport.php(109): SpecialImport->doImport()

#21 /home/dennisgo/public_html/includes/specialpage/SpecialPage.php(575): SpecialImport->execute(NULL)

#22 /home/dennisgo/public_html/includes/specialpage/SpecialPageFactory.php(611): SpecialPage->run(NULL)

#23 /home/dennisgo/public_html/includes/MediaWiki.php(296): MediaWiki\Special\SpecialPageFactory->executePath(Title, RequestContext)

#24 /home/dennisgo/public_html/includes/MediaWiki.php(900): MediaWiki->performRequest()

#25 /home/dennisgo/public_html/includes/MediaWiki.php(527): MediaWiki->main()

#26 /home/dennisgo/public_html/index.php(44): MediaWiki->run()

#27 {main} AlgorithmGG (talk) 18:11, 24 December 2019 (UTC)

run the command composer install in the extensions/TemplateStyles directory. Alternatively get that extension from a tarball download instead of from git. Bawolff (talk) 03:17, 25 December 2019 (UTC)
Cheers AlgorithmGG (talk) 00:28, 26 December 2019 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Upgrading from 1.28.2

Hello

I am looking to upgrade from 1.28.2 to the latest version, but I am clearly missing something. I have downloaded and untarred the file into a new folder, so I now have:


/var/www/mediawiki

/var/www/html

/var/www/mediawiki-1.34


Following the upgrade instructions, I renamed my existing mediawiki folder, then move the new folder to mediawiki. When I browse to my wiki after doing this, I am still on 1.28.2.

I also noticed my Localsettings file is not in the /var/www/mediawiki directory, but rather /var/www/html. So I am a little lost. How do I tell my server to run the new version? Also, when I attempted to run update.php from the new folder I got the error below.

/var/www/mediawiki-1.34/maintenance# php update.php

PHP Parse error:  syntax error, unexpected '?' in /var/www/mediawiki-1.34/maintenance/Maintenance.php on line 376

I am running on Debian 10, in a container on Proxmox.

Any assistance or guidance greatly appreciated. 50.67.170.230 (talk) 22:07, 24 December 2019 (UTC)

for the
> PHP Parse error:  syntax error, unexpected '?' in /var/www/mediawiki-1.34/maintenance/Maintenance.php on line 376
Often the version of commandline php is different from web server. That error means your version of commandline php is too low. Sometimes newer versions are under the name php7.0 or php-7.0 (or other version numbers)
For the rest of it, i would guess your old mediawiki install was in the folder named html, and not the folder named mediawiki. Bawolff (talk) 03:14, 25 December 2019 (UTC)

Hello and hope you can help us all with this problem

Hi, across three browsers set to accept all cookies, tracking etc I still can't log into wikipedia. I'm a researcher in physics, photonics etc and right I'm now researching a project to help clean up our oceans. I love wikipedia and donate monthly to it! My login gets rejected, I think, because I'm using a mobile phone hotspot as my 'modem'. I imagine this will be an increasing problem for wikipedia so hopefully you guys can find a way to recognise this type of connection? I'm having similar problems staying logged in to university connections too - if that's helpful. Anyone can talk to me about it any time, I'm shaz_hall and my email addy is with yahoo :) will be glad to discuss technical details with anyone interested, as soon as there's time!Hi, across three browsers set to accept all cookies, tracking etc I still can't log into wikipedia. I'm a researcher in physics, photonics etc and right I'm now researching a project to help clean up our oceans. I love wikipedia and donate monthly to it! My login gets rejected, I think, because I'm using a mobile phone hotspot as my 'modem'. I imagine this will be an increasing problem for wikipedia so hopefully you guys can find a way to recognise this type of connection? I'm having similar problems staying logged in to university connections too - if that's helpful. Anyone can talk to me about it any time, I'll be checking the email gladly...and will be glad to discuss technical details with anyone interested, as soon as there's time! Researchgatematerials (talk) 23:42, 24 December 2019 (UTC)

Hi people, good news: try logging into this support page right here if the login screen at wikipedia keeps giving you pink rejection messages. While this support page was open (because it miraculously had allowed me to log in) I thought to try logging into wikipedia again in case that would do the trick (searched for Young's Modulus in case you want to follow the steps, ha) and definitely on that page, I can get in. I got the pink message...but then it quickly disappeared...so if I can find the check button to remain logged in for 365 days..I'll tick it while I can get it...see how you go! :D Researchgatematerials (talk) 23:48, 24 December 2019 (UTC)
Still logged in, so thanks however that happened :) but still a problem with mobile phone hotspot connection on other websites...  :) Researchgatematerials (talk) 01:41, 25 December 2019 (UTC)
what's the rejection message you get?
I use my phone as a modem from time to time and it usually works fine.
I suspect there is some issue on your end with keeping cookies, if you are having issues on multiple websites Bawolff (talk) 03:06, 25 December 2019 (UTC)
Yes that's exactly right. Error message I should have screedumped for you, but it was one of those gateway refusal messages. I've set all 3 browsers - IE, Firefox and Chrome - to accept all cookies and trackers. Yet in each browser, messages come up constantly asking whether I"ll accept cookies for that particular site. That's why - seeing as I know it's not an issue with my laptop or browser - I'm thinking it's something to do with the mobile phone hotspot. How do I sign my name? It's WikiStudent. :D never mind, I'll just keep quiet until I get used to the features here :) Researchgatematerials (talk) 09:26, 26 December 2019 (UTC)

I can't appear Google Ads on my wiki

hello. I'm using mediawiki 1.33 version and I want to appear Google Ads on my wiki. But all google ads and head script extensions are not for 1.33 version....

how can I add ads or add html head script? Dhmowiki (talk) 01:44, 25 December 2019 (UTC)

My mediawiki version is 1.33 and php version is 7.3. so i can't install that extension. Dhmowiki (talk) 13:20, 31 December 2019 (UTC)
Try the extension version relevant to your MediaWiki core from Special:ExtensionDistributor/GoogleAdSense. It's likely the Extension:Google AdSense page is outdated regarding the supported versions. AhmadF.Cheema (talk) 16:52, 31 December 2019 (UTC)
I tried. but i can't access wiki because of http error 500. and update.php can't find googleadsense extension.json. Dhmowiki (talk) 07:00, 1 January 2020 (UTC)
Instead of the wfLoadExtension line, try with:
require_once "$IP/extensions/GoogleAdSense/GoogleAdSense.php";
Or, you can also try the master version of the extension too, wfLoadExtension should work for it. AhmadF.Cheema (talk) 11:16, 1 January 2020 (UTC)
I tried and wiki works without error. but ads not appear. google adsense extension is in mediawiki:special. Dhmowiki (talk) 08:36, 2 January 2020 (UTC)
I am having the same issues. Tried Both Master version and version 1.34 getting error 500 with both of the following.

wfLoadExtension( 'GoogleAdSense' );
and
require_once "$IP/extensions/GoogleAdSense/googleadsense.php";
Any solutions?
I solved this problem with require_once. but I tested only in Version 1.33 185.209.178.78 (talk) 19:28, 31 May 2020 (UTC)
Having same issue...both require_once and wfload options create http 500 error on mediawiki 1.34 2601:447:8101:410:19D3:F3D4:9692:F1A5 (talk) 23:27, 2 June 2020 (UTC)
did you try php update.php? I solved with update.php. 183.106.231.21 (talk) 14:36, 10 June 2020 (UTC)

Unjustified blocking in Wiktionary

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


Hello. Can I understand why I was blocked? Did I violate any rules? Gnosandes (talk) 01:56, 25 December 2019 (UTC)

You were blocked User:Rua, and you should be able to post on your talk page if you have questions. But, there is a clear reason given in the block log - "Fringe POV pushing, refused to stop after being repeatedly asked by users" DannyS712 (talk) 02:00, 25 December 2019 (UTC)
That's not a clear reason. The administrator of User:Rua ignores me for the third day! Gnosandes (talk) 02:03, 25 December 2019 (UTC)
This is not the forum to litigate disputes on other wikis DannyS712 (talk) 02:05, 25 December 2019 (UTC)
Can you help me? Gnosandes (talk) 02:15, 25 December 2019 (UTC)
I'm asking you to find out why the administration is ignoring me. Who can help me? Gnosandes (talk) 02:07, 25 December 2019 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Unjustified blocking in Wiktionary

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.


Administration in Wiktionary does not answer me. I was blocked for nothing. Gnosandes (talk) 02:24, 25 December 2019 (UTC)

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

Unjustified blocking in Wiktionary

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.


DannyS712, That's a strange explanation. You know how to read? I'm being ignored by the Administration! Gnosandes (talk) 02:28, 25 December 2019 (UTC)

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

flow

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


Hi

how can i install extension:flow ?


Msnhinet8 (talk) 12:05, 25 December 2019 (UTC)

my 網路百科 this wiki , i want to use flow extension. Msnhinet8 (talk) 12:06, 25 December 2019 (UTC)
if its your wiki, see extension:Flow. If you are not the system administrator fot the wiki, contact your hosting provider. Bawolff (talk) 12:12, 25 December 2019 (UTC)
ok i try it.
thanks.

Msnhinet8 (talk) 12:13, 25 December 2019 (UTC)
Hi @Msnhinet8,
If want to make it appear on a namespace, you can use Special:ManageWiki/namespaces.
For existing pages, you’ll need to move or delete the existing wikitext content and then recreate the page.
Thanks,
RhinosF1
Former Sysadmin
Miraheze RhinosF1 (talk) 13:46, 25 December 2019 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

how to import wikipedia articles with images and interwiki links?

as of now i am able to load article with out image in my self hosted mediawiki . Manual:Importing XML dumps i used this article

but is there any way that i can mirror live all the wikipedia articles into my mediawiki? Ramu ummadishetty (talk) 15:33, 25 December 2019 (UTC)

you can download the whole thing at https://dumps.wikimedia.org/backup-index.html Bawolff (talk) 00:48, 26 December 2019 (UTC)
which link i need to download https://dumps.wikimedia.org/tewiki/20191220/
there are multiple options
I tried to download tewiki-20191220-pages-articles-multistream.xml.bz2 but images are not loading just image name is showing in the article Ramu ummadishetty (talk) 02:33, 26 December 2019 (UTC)
the dumps dont contain images. You can setup $wgForeignFileRepos for mirroring images. Bawolff (talk) 04:42, 26 December 2019 (UTC)

TimedMediaHandler database error after running mw-config 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.


Hey, not to sure why the database isn't updating correctly. Anyone had the same problem on mw 1.34? and extension:TimedMediaHandler



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

[XgOxgn7nnZuSHztBYl4V5gAAACM] /index.php/Special:TimedMediaHandler Wikimedia\Rdbms\DBQueryError from line 1603 of /home/dennisgo/public_html/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 COUNT(*) as count,transcode_key FROM `transcode` WHERE transcode_key IN ('120p.vp9.webm','180p.vp9.webm','240p.vp9.webm','360p.vp9.webm','480p.vp9.webm','720p.vp9.webm','1080p.vp9.webm','1440p.vp9.webm','2160p.vp9.webm','mp3','ogg') AND (transcode_time_startwork IS NOT NULL AND transcode_time_success IS NULL AND transcode_time_error IS NULL) GROUP BY transcode_key

Function: SpecialTimedMediaHandler::getStates

Error: 1146 Table 'dennisgo_mw39903.transcode' doesn't exist (localhost)

Backtrace:

#0 /home/dennisgo/public_html/includes/libs/rdbms/database/Database.php(1574): Wikimedia\Rdbms\Database->getQueryExceptionAndLog(string, integer, string, string)

#1 /home/dennisgo/public_html/includes/libs/rdbms/database/Database.php(1152): Wikimedia\Rdbms\Database->reportQueryError(string, integer, string, string, boolean)

#2 /home/dennisgo/public_html/includes/libs/rdbms/database/Database.php(1807): Wikimedia\Rdbms\Database->query(string, string)

#3 /home/dennisgo/public_html/includes/libs/rdbms/database/DBConnRef.php(68): Wikimedia\Rdbms\Database->select(string, array, array, string, array)

#4 /home/dennisgo/public_html/includes/libs/rdbms/database/DBConnRef.php(315): Wikimedia\Rdbms\DBConnRef->__call(string, array)

#5 /home/dennisgo/public_html/extensions/TimedMediaHandler/includes/SpecialTimedMediaHandler.php(213): Wikimedia\Rdbms\DBConnRef->select(string, array, array, string, array)

#6 /home/dennisgo/public_html/extensions/TimedMediaHandler/includes/SpecialTimedMediaHandler.php(62): SpecialTimedMediaHandler->getStates()

#7 /home/dennisgo/public_html/includes/specialpage/SpecialPage.php(575): SpecialTimedMediaHandler->execute(NULL)

#8 /home/dennisgo/public_html/includes/specialpage/SpecialPageFactory.php(611): SpecialPage->run(NULL)

#9 /home/dennisgo/public_html/includes/MediaWiki.php(296): MediaWiki\Special\SpecialPageFactory->executePath(Title, RequestContext)

#10 /home/dennisgo/public_html/includes/MediaWiki.php(900): MediaWiki->performRequest()

#11 /home/dennisgo/public_html/includes/MediaWiki.php(527): MediaWiki->main()

#12 /home/dennisgo/public_html/index.php(44): MediaWiki->run()

#13 {main}dM AlgorithmGG (talk) 19:07, 25 December 2019 (UTC)

when you run update.php does it mention transcode table? Bawolff (talk) 23:43, 25 December 2019 (UTC)
Ill check I didn't notice anything other than it saying object caching is not enabled. AlgorithmGG (talk) 00:25, 26 December 2019 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Hello, I a using mediawiki 1.33 and unlike mediawiki 1.25, I can not find "popular pages" in special pages section. Could you please help? 85.114.253.26 (talk) 07:57, 26 December 2019 (UTC)

Popular pages feature was removed, and moved to Extension:HitCounters.
However, if you did not install the extension when upgrading, the hit counter data gathered until now has been lost. Ciencia Al Poder (talk) 15:30, 26 December 2019 (UTC)

free unlimited host

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 free unlimited host can set up mediawiki farm? Msnhinet8 (talk) 08:43, 26 December 2019 (UTC)

We don't need what "the free unlimited host" is. Please provide sufficient context. Malyacko (talk) 10:13, 26 December 2019 (UTC)
my mean is i use free unlimited host , how can i set up extension:mediawiki farm by my wiki? Msnhinet8 (talk) 11:39, 26 December 2019 (UTC)
By following the installation instructions of the MediaWiki Farm extension? Extension:MediaWikiFarm#Installation (I'm really not sure what your question is, sorry.) Malyacko (talk) 17:33, 26 December 2019 (UTC)
OK.thanks. Msnhinet8 (talk) 23:23, 26 December 2019 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

MediaWiki 1.34: Is it possible to use 'api.php?action=query&meta=tokens' with private wiki?

First I'm talking about a private wiki, where:

$wgGroupPermissions['*']['createaccount'] = false;
$wgGroupPermissions['*']['edit'] = false;
$wgGroupPermissions['*']['read'] = false;

With MediaWiki 1.33, in order to login by an external PHP script as it is described in the article API:Login, I was able to get login token via GET request as:

https://wiki.example.com/api.php?action=query&meta=tokens&type=login&format=json

That returns:

{
    "batchcomplete": "",
    "query": {
        "tokens": {
            "logintoken": "805eca0316bd944f81ed7813557202f15e063924+\\"
        }
    }
}

Today I upgraded from MW 1.33 to MW 1.34. Now, I'm no longer able to get login tokens as anonymous user. I'm able to get login tokens (as the above) only when I'm already logged-in. Otherwise the response is:

{
    "error": {
        "code": "readapidenied",
        "info": "You need read permission to use this module.",
        "*": "See https://wiki.example.com/api.php for API usage. Subscribe to the mediawiki-api-announce mailing list at <https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce> for notice of API deprecations and breaking changes."
    }
}

I found the following temporal solution: I'm able to get login token via the depreciated API action login. So on MW 1.34 the following POST request works:

https://wiki.example.com/api.php?action=login&format=json

It returns a warring message, but the provided token works for the further steps of the authentication:

{
    "warnings": {
        "main": {
            "*": "Subscribe to the mediawiki-api-announce mailing list at <https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce> for notice of API deprecations and breaking changes."
        },
        "login": {
            "*": "Fetching a token via \"action=login\" is deprecated. Use \"action=query&meta=tokens&type=login\" instead."
        }
    },
    "login": {
        "result": "NeedToken",
        "token": "e9abae0b2a513b50182d541ff652797f5e06380c+\\"
    }
}

So my general question is: How do I Login via API on Private MediaWiki 1.34 by using external PHP script? Is there any up-to-date documentation? Is it possible at all or is it a bug?


Best regards. Cheerful welcome and happy new year! Spas.Z.Spasov (talk) 17:45, 27 December 2019 (UTC)

hmm. That does sound like a bug. It seems like you should be able to login without having readapi Bawolff (talk) 01:50, 28 December 2019 (UTC)
Thank you for the replay, @Bawolff. Could you point me which is the most appropriate place to add a bug report about this issue? Spas.Z.Spasov (talk) 11:15, 5 January 2020 (UTC)
https://phabricator.wikimedia.org Bawolff (talk) 23:25, 5 January 2020 (UTC)
See https://phabricator.wikimedia.org/T245149 109.136.129.199 (talk) 18:35, 23 February 2020 (UTC)

TOC Limit does not work?

I've put `

` into my company wiki page but it does not work. it displays like `Template:TOC` at the top but does not change the toc. 174.4.118.214 (talk) 01:01, 28 December 2019 (UTC)

It didn't like that. I put "{ {toclimit|limit=2} }" but without the extra spaces. 174.4.118.214 (talk) 01:02, 28 December 2019 (UTC)
you probably need to import the template
https://www.mediawiki.org/wiki/Manual:Using_content_from_Wikipedia Bawolff (talk) 01:48, 28 December 2019 (UTC)

TimedMediaHandler Configration fatal 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 am configuring TimedMediaHandler


I got this fatal error after adding a configuration:


$wgEnabledAudioTranscodeSet = [

   WebVideoTranscode::ENC_OGG_VORBIS,

   WebVideoTranscode::ENC_MP3,

];


Fatal error: Uncaught Error: Class 'WebVideoTranscode' not found in /home/dgo/public_html/LocalSettings.php:269 Stack trace: #0 /home/dgo/public_html/includes/Setup.php(124): require_once() #1 /home/dgo/public_html/includes/WebStart.php(81): require_once('/home/dgo/...') #2 /home/dgo/public_html/index.php(41): require('/home/dgo/...') #3 {main} thrown in /home/dgo/public_html/LocalSettings.php on line 269


Please note: I am using TimedMediaHandler for Extension:Score and I am currently not getting any sound AlgorithmGG (talk) 03:33, 28 December 2019 (UTC)

Use whatever the constants represent instead of class constants themselves. Class constants dont get loaded until after LocalSettings.php in new style ext registration. Bawolff (talk) 06:28, 28 December 2019 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Patch 1.33.2 to 1.34.0 failed

Please excuse me if the question has already been answered elsewhere - I have not found anything about it. I run a standard Mediawiki installation in version 1.33.2. The software versions meet the requirements for operation.

Software Version
MediaWiki 1.33.2
PHP 7.3.13 (cgi-fcgi)
MySQL 5.7.28-1
ICU 57.1

The patch process (dry run) fails with the following message:


patch -p1 --dry-run -i mediawiki-1.34.0.patch

checking file extensions/OATHAuth/i18n/en.json

Hunk #1 FAILED at 53.

1 out of 1 hunk FAILED

checking file extensions/OATHAuth/i18n/qqq.json

Hunk #1 FAILED at 12.

Hunk #2 FAILED at 63.

2 out of 2 hunks FAILED

checking file includes/api/ApiEditPage.php

Reversed (or previously applied) patch detected!  Assume -R? [n] ^C


The reinstallation also does not work - in the end, only an empty page is displayed.

Is the patch file broken or is it due to my installation? 2001:16B8:1C60:8700:21A5:5B92:7EE2:4059 (talk) 10:03, 28 December 2019 (UTC)

What patch did you run? The https://releases.wikimedia.org/mediawiki/1.34/mediawiki-1.34.0.patch.gz patch is for upgrading from the 1.34.0-rc.1 release, if I understand correctly DannyS712 (talk) 10:21, 28 December 2019 (UTC)
Thank you @DannyS712 - so I can't patch from 1.33.2 to 1.34 but have to do a clean install? Becausye there is noch rc-0 patch file...

2001:16B8:1C2A:900:3485:D726:C38D:1385 (talk) 09:57, 3 January 2020 (UTC)

Need help with mobile friendly main page designs on nds-nl.wiki and nds.wiktionary

For nds.wiktionary.org I am looking into redesigning the main page. I also wanted to make it mobile friendly, unfortunately it seems to be quite a hassle, since I'm not very familiar with CSS. This is the version that I've come up with: https://nds.wiktionary.org/wiki/Bruker:Servien/test. Can anyone create the CSS layout or tell how I could create it myself? The mobile version would only need to contain the heading with the search box, "Wat is Wikiwöörbook" and "Indeks".

For the Low Saxon Wikipedia I've used the design from the French Wikipedia, and is almost ready to be implemented (https://nds-nl.m.wikipedia.org/w/index.php?title=Gebruker:Servien/test&mobileaction=toggle_view_mobile). The only thing that needs to be fixed is the layout for the mobile version needs to be displayed like on the French wiki (https://fr.m.wikipedia.org/w/index.php?title=Utilisateur:Servien/test&mobileaction=toggle_view_mobile). Can't seem to find what wrong there. Servien (talk) 12:22, 28 December 2019 (UTC)

https://www.w3schools.com/css/css_rwd_mediaqueries.asp might be a helpful link in general.
The main difference is probably https://fr.wikipedia.org/w/index.php?title=MediaWiki:Mobile.css vs https://nds.wiktionary.org/w/index.php?title=MediaWiki:Mobile.css
Perhaps someone from the mobile team might be willing to assist you in designing a mobile friendly main page. Bawolff (talk) 22:39, 28 December 2019 (UTC)
Doesn't help very much, I wouldn't know where to begin. There doesn't seem to be a huge number of people with a decent understanding of how CSS works (or aren't wililng to assist), so it puzzles me as to why the main page on all Mediawiki projects all of a sudden are using CSS by default for its design. Maybe they should have made sure there is a decent tutorial out there on how to design a mobile friendly main page with CSS before implementing it by default. The whole thing is quite frustating, I'm inclined to just revert to old situation, where you'd just have to indicate which sections yould like to be displayed on the mobile version. Servien (talk) 11:48, 29 December 2019 (UTC)
@Servien: I have tried to write down some basics about wiki main pages for smaller screens in User:AKlapper (WMF)/Sandbox/T241646 (not the final location) - I hope that could help a bit? Your feedback is welcome in phab:T241646! :) AKlapper (WMF) (talk) 16:54, 19 March 2020 (UTC)

Extension:Score no sound

I am unable to get sound using extension score. The files are being created but with no sound.

Is it possible for sound without this?

Kaltura HTML5 player library - http://www.html5video.org/kaltura-player/docs


AlgorithmGG (talk) 18:04, 28 December 2019 (UTC)

Sound is working on a kaltura player but not using score so extension:TimedMediaHandler must be working sufficiently enough to run score right?
Double checked all parameters all seems water tight. is there anything missing from the docs?
if comment out fluidsynth it breaks / so i am unable to check the fallback? AlgorithmGG (talk) 00:22, 29 December 2019 (UTC)

Searching for html tags within a wiki

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


What's a lightweight way of searching for html tags within a wiki source page. My users have an annoying habit of adding '<br>' to pages as it gives them the line breaks they want, which I'd like to spot and correct (and we have legacy <pre>tags too). A standard search just returns the multitude of matches to 'br', and while CirrusSearch/Elastica looks like it could do it, its a heavyweight solution I don't want to attempt now.

My question was hidden, but as no reason was given, I've unhid it. Vicarage (talk) 19:11, 28 December 2019 (UTC)

Sorry about your question being hidden. I have no idea why logged out users are even allowed to hide questions.
So one possibility is Extension:Replace Text i guess.
Another way, is direct with an SQL query (This will only work in default configs. If you have enabled revision compression or external storage it won't work)
[Note: MediaWiki before 1.31 requires a different query]
SELECT page_namespace, page_title from page inner join slots on slot_revision_id = page_latest inner join content on slot_content_id = content_id inner join text on substring( content_address, 4 ) = old_id WHERE old_text like '%<br>%';
The last part of the query '%<br>%' says what to look for in a page. % matches 0 or more letters, _ matches precisely 1 letter. \ is an escape character. Everything else is normal. It is case sensitive.
You can do this from the command line mysql client, or phpmyadmin web interface if you have access to that. If all else fails, you can also do this via the sql.php maintenance script (but the interface isn't as nice) Bawolff (talk) 22:31, 28 December 2019 (UTC)
The extension should allow me to patrol those pesky users, thanks. I think I'd use pywikibot or grep on dumps to do off-line searches rather than sql queries. Vicarage (talk) 16:49, 29 December 2019 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Help! New to installing a wiki

Hi! I'm new here and, well, i've run into a small problem while trying to install a wiki for the first time.

You see, I have done every step to make a wiki, but once I finish the initial configuration I get and I paste LocalSettings.php to the folder where index.php is, the mediawiki doesn't detect it!

I'm trying to install on windows, and I am very confused by this point. Anyone know the solution to this one?

It just displays the logo, "MediaWiki 1.34.0"

"LocalSettings.php not found.

Please complete the installation and download LocalSettings.php." GussMoose (talk) 20:12, 28 December 2019 (UTC)

News fixed: Confusion: Still
Solution: Double install I think??? GussMoose (talk) 22:01, 28 December 2019 (UTC)

OAUTH AUTHENTICATION

I am trying to provide my localhost with Oauth tool so that it can login with wikipedia.org credentials. Ca anyone helpme with achieving the process of Oauth from wikipedia.org to local host. Surya16695 (talk) 01:30, 29 December 2019 (UTC)

What is "Oauth tool"? Log in where exactly? Which documentation are you following? Malyacko (talk) 15:23, 29 December 2019 (UTC)

Account blocked

Hi, I found that my previous account was blocked globally. I created an account earlier with the username Sreejish2020 and made a minor edit (adding a citation). While my edit is still live, my previous account (Sreejish2020) is blocked. Please let me know why I was blocked and how to unblock my account. I created a new account (Sreejishlal1) only to post this query.
Best regards,
Sreejish Sreejishlal1 (talk) 09:16, 29 December 2019 (UTC)
@Sreejishlal1 That is not true. As you can see on https://www.mediawiki.org/w/index.php?title=Special:Log&page=User:Sreejish2020&type=block your account here has never ever been blocked. Malyacko (talk) 15:22, 29 December 2019 (UTC)
Thanks @Malyacko. Perhaps I was deregistered. I was not able to login to my account (Sreejish2020) by resetting my password (I forgot my password). I tried resetting my password several times, but, my access to the account was denied. And my user page,User:Sreejish2020 mentions that there is no account with that name registered.
But, in the page https://en.wikipedia.org/w/index.php?title=Jayaprakash_Narayan&action=history , my user name (Sreejish2020) who made edits can be seen:

I found the following error earlier that my IP was blocked by the user Jon_Kolbert. And as suggested, when I tried to talk with him, his account also seemed to be closed.
=Account creation error=
Jump to navigationJump to search
Your IP address is in a range which has been blocked on all wikis.
The block was made by [//meta.wikimedia.org/wiki/User:Jon_Kolbert Jon Kolbert] (meta.wikimedia.org). The reason given is [[m:NOP|Open proxy]]: leaky colo.
  • Start of block: 14:17, 16 April 2019
  • Expiration of block: 14:17, 16 April 2024
You can contact [//meta.wikimedia.org/wiki/User:Jon_Kolbert Jon Kolbert] to discuss the block. You cannot use the "Email this user" feature unless a valid email address is specified in your account preferences and you have not been blocked from using it. Your current IP address is 191.96.97.58, and the blocked range is 191.96.0.0/16. Please include all above details in any queries you make.
Return to Help:Logging in.
My problem is that I cannot login to my previous account(Sreejish2020).
Best regards,
Sreejish

2401:4900:3324:7C29:791E:FE92:91B8:34AA (talk) 15:58, 29 December 2019 (UTC)
your account is not blocked, globally or otherwise (see https://meta.wikimedia.org/wiki/Special:CentralAuth?target=Sreejish2020 if you were blocked globally or otherwise on any wikimedia project it would show up there)
However the ip you are using (digital energy technologies chile) is blocked (suspected to be a hosting provider that people use to evade blocks or possibly a vpn). This would prevent you from registering a new account or asking for a password reset (it should not prevent you from logging in). If you are using a vpn dont use it.
Anyways, i think i got a password reset email sent to you. Please remember whatever new password you use if you continue to use ip addresses associated with digitial energy as you wont be able to reset yourself Bawolff (talk) 16:25, 29 December 2019 (UTC)
Thanks @Bawolff. Unfortunately, I cannot still login with the temporary password generated; even though I have tried multiple times, without using any vpn. I have seen the link you have shared, earlier.
Also, whenever I tried to reset the password myself, from yesterday onwards, I was getting the message that my IP address is blocked until January 12th as shown below:
(The funny part is that I can login to the other new account @Sreejishlal1, with the same IP address.)
=Blocked=
Jump to navigationJump to search
You are currently unable to edit Wikipedia.
You are still able to view pages, but you are not currently able to edit, move, or create them.
Editing from 2401:4900:2000:0:0:0:0:0/35 has been blocked (disabled) by ‪NJA‬ for the following reason(s):
To edit, please log in.
Editing by unregistered users from your shared IP address or address range may be currently disabled due to abuse. However, you are still able to edit if you sign in with an account. If you are currently blocked from creating an account, and cannot create one elsewhere in the foreseeable future, you may follow the instructions at Wikipedia:Request an account to request that volunteers create your username for you. Please use an email address issued to you by your ISP, school or organization so that we may verify that you are a legitimate user on this network. Please reference this block in the comment section of the form.

Please check on this list that the username you choose has not already been taken. We apologize for any inconvenience.

: Continued disruptive editing: unsourced edits, no or lacking edit summaries across this range
This block has been set to expire: 14:56, 12 January 2020.
Even if blocked, you will usually still be able to edit your user talk page and email other editors and administrators.
Other useful links: Blocking policy · Username policy ·   Appealing blocks: policy and guide
If the block notice is unclear, or it does not appear to relate to your actions, please ask for assistance as described at Help:I have been blocked. Sreejishlal1 (talk) 15:28, 30 December 2019 (UTC)
the block on 2401:4900:2000:0:0:0:0:0/35 (Bharti Airtel) is a soft-block. It prevents people from resetting passwords and editing logged out. It should not prevent you from logging in. Bawolff (talk) 18:25, 30 December 2019 (UTC)

Need help not open preference

[85300ca244b5ac42a0a5f9b2] /mediawiki/index.php?title=%ED%8A%B9%EC%88%98:%ED%99%98%EA%B2%BD%EC%84%A4%EC%A0%95 MWException from line 182 of /home/mvpedia/html/mediawiki/includes/preferences/DefaultPreferencesFactory.php: Global default '' is invalid for field liberty-dark

Backtrace:

#0 /home/mvpedia/html/mediawiki/includes/preferences/DefaultPreferencesFactory.php(132): MediaWiki\Preferences\DefaultPreferencesFactory->loadPreferenceValues(User, RequestContext, array)

#1 /home/mvpedia/html/mediawiki/includes/preferences/DefaultPreferencesFactory.php(1439): MediaWiki\Preferences\DefaultPreferencesFactory->getFormDescriptor(User, RequestContext)

#2 /home/mvpedia/html/mediawiki/includes/specials/SpecialPreferences.php(113): MediaWiki\Preferences\DefaultPreferencesFactory->getForm(User, RequestContext, string)

#3 /home/mvpedia/html/mediawiki/includes/specials/SpecialPreferences.php(90): SpecialPreferences->getFormObject(User, RequestContext)

#4 /home/mvpedia/html/mediawiki/includes/specialpage/SpecialPage.php(569): SpecialPreferences->execute(NULL)

#5 /home/mvpedia/html/mediawiki/includes/specialpage/SpecialPageFactory.php(558): SpecialPage->run(NULL)

#6 /home/mvpedia/html/mediawiki/includes/MediaWiki.php(288): MediaWiki\Special\SpecialPageFactory->executePath(Title, RequestContext)

#7 /home/mvpedia/html/mediawiki/includes/MediaWiki.php(865): MediaWiki->performRequest()

#8 /home/mvpedia/html/mediawiki/includes/MediaWiki.php(515): MediaWiki->main()

#9 /home/mvpedia/html/mediawiki/index.php(42): MediaWiki->run()

#10 {main}


Please... Moonbackside (talk) 11:52, 29 December 2019 (UTC)

Its a problem with “liberty-dark” not sure what that is. Probably something u installed at some point —TheDJ (Not WMF) (talkcontribs) 13:36, 29 December 2019 (UTC)

Extension:AutoSitemap Error MW 1.34

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.


[ installed extension:AutoSitemap and got this error do i need to update database schema for this extension?


XgjpbAdMXyi4WgB0s27@lwAAAAM] /index.php?title=Main_Page&action=submit Wikimedia\Rdbms\DBQueryError from line 1603 of /home/dgo/public_html/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 "Popularpages" AS type,

page_id AS id,

page_namespace AS namespace,

page_title AS title,

(MAX(rev_timestamp)) AS last_modification,

rev_timestamp AS value

FROM

`page`,

`revision`

WHERE

page_is_redirect = 0

AND rev_page = page_id

AND page_namespace NOT IN (1,2,3,5,NS_IMAGE_TALK,8,9,10,11,12,13,15)

GROUP BY page_id

Function: Wikimedia\Rdbms\DBConnRef::query

Error: 1054 Unknown column 'NS_IMAGE_TALK' in 'where clause' (localhost)

Backtrace:

#0 /home/dgo/public_html/includes/libs/rdbms/database/Database.php(1574): Wikimedia\Rdbms\Database->getQueryExceptionAndLog(string, integer, string, string)

#1 /home/dgo/public_html/includes/libs/rdbms/database/Database.php(1152): Wikimedia\Rdbms\Database->reportQueryError(string, integer, string, string, boolean)

#2 /home/dsgo/public_html/includes/libs/rdbms/database/DBConnRef.php(68): Wikimedia\Rdbms\Database->query(string, string, integer)

#3 /home/dgo/public_html/includes/libs/rdbms/database/DBConnRef.php(292): Wikimedia\Rdbms\DBConnRef->__call(string, array)

#4 /home/dgo/public_html/extensions/AutoSitemap/AutoSitemap_body.php(100): Wikimedia\Rdbms\DBConnRef->query(string)

#5 /home/dgo/public_html/includes/Hooks.php(174): AutoSitemap::writeSitemap(Revision, NULL, NULL)

#6 /home/dgo/public_html/includes/Hooks.php(202): Hooks::callHook(string, array, array, NULL)

#7 /home/dgo/public_html/includes/Revision/RevisionStore.php(535): Hooks::run(string, array)

#8 /home/dgo/public_html/includes/Storage/PageUpdater.php(986): MediaWiki\Revision\RevisionStore->insertRevisionOn(MediaWiki\Revision\RevisionStoreRecord, Wikimedia\Rdbms\DBConnRef)

#9 /home/dgo/public_html/includes/Storage/PageUpdater.php(756): MediaWiki\Storage\PageUpdater->doModify(CommentStoreComment, User, integer)

#10 /home/dgo/public_html/includes/page/WikiPage.php(1931): MediaWiki\Storage\PageUpdater->saveRevision(CommentStoreComment, integer)

#11 /home/dgo/public_html/includes/EditPage.php(2341): WikiPage->doEditContent(WikitextContent, CommentStoreComment, integer, boolean, User, string, array, integer)

#12 /home/dgo/public_html/includes/EditPage.php(1617): EditPage->internalAttemptSave(array, boolean)

#13 /home/dgo/public_html/includes/EditPage.php(682): EditPage->attemptSave(array)

#14 /home/dgo/public_html/includes/actions/EditAction.php(55): EditPage->edit()

#15 /home/dgo/public_html/includes/actions/SubmitAction.php(38): EditAction->show()

#16 /home/dgo/public_html/includes/MediaWiki.php(511): SubmitAction->show()

#17 /home/dgo/public_html/includes/MediaWiki.php(302): MediaWiki->performAction(Article, Title)

#18 /home/dsgo/public_html/includes/MediaWiki.php(900): MediaWiki->performRequest()

#19 /home/dgo/public_html/includes/MediaWiki.php(527): MediaWiki->main()

#20 /home/dgo/public_html/index.php(44): MediaWiki->run()

#21 {main} AlgorithmGG (talk) 18:06, 29 December 2019 (UTC)

NS_IMAGE_TALK got renamed to NS_FILE_TALK a long time ago. Bawolff (talk) 18:55, 29 December 2019 (UTC)
and that is a database change? how long ago was this changed? will running update.php fix this? AlgorithmGG (talk) 19:07, 29 December 2019 (UTC)
No, its a just a change in php unrelated to the DB. The extension is old and needs improving. update.php will not fix this.
The change in question happened in MediaWiki 1.14 (2009). However backwards compatibility was removed more recently. Bawolff (talk) 19:43, 29 December 2019 (UTC)
Thanks again that worked a treat.

AlgorithmGG (talk) 22:42, 29 December 2019 (UTC)
OK Thanks, i literally downloaded it 3 hours ago. which file is it? AlgorithmGG (talk) 22:28, 29 December 2019 (UTC)
Well someone updated the extension literally an hour ago Bawolff (talk) 22:41, 29 December 2019 (UTC)
Ok i done it myself and its not breaking thanks for the info. AlgorithmGG (talk) 22:44, 29 December 2019 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Versuch von Installation von Mediawiki unter lokalem Linux Mint LMDE3

Hallo,


ich versuche gerade eine Mediawiki unter Linux Mint LMDE3 auf einem lokalen Rechner zu installieren.


Bei Konfiguration des Mediawiki komme über einer Seite nicht rüber bei der ich nach folgendem gefargt werde, was ich jedoch nicht beantworten kann:

* Name des Datenbankbenutzers

* Passwort des Datenbakbenutzers


Hierbei habe ich:

* das Mediawiki über die Anwendungsverwaltung von LMDE3 installiert

* kann den Apache über localhost als auch 127.0.0.1 auf rufen

* Die Webseite „Installation von Mediawiki“ kann ich per „localhost/mediawiki“ auf rufen

* die folgende Seite bringt die Ausschrift: „Die Installationsumgebung wurde geprüft. MediaWiki kann installiert werden.“

* die Konfigurationssseite mit der Angabe der gewünschten Sprache geht auch noch

* auf der Seite mit Angaben bezüglich der voreingestellten MySQL Datenbank, führen die defaulteinstellungen zu der folgenden Fehlermeldung“ DB connection error. No such foile or directory. Bitte unten angegebenen Servernamen, Benutzername sowie Passwort überprüfen und erneut versuchen. 178.5.35.252 (talk) 19:48, 29 December 2019 (UTC)

Hello,
i am currently trying to install a mediawiki under Linux Mint LMDE3 on a local machine.
When configuring the Mediawiki I can't get over a page where I am fired after the following, but I can't answer that:
* Name of the database user
* Password of the database user
Here I have:
* installed the Mediawiki via the application management of LMDE3
* can call Apache via localhost as well as 127.0.0.1
* The web page "Installation of Mediawiki" can be accessed via "localhost/mediawiki
* the following page brings the text: "The installation environment has been checked. MediaWiki can be installed."
* the configuration page with the specification of the desired language also works
* on the page with information about the default MySQL database, the default settings result in the following error message" DB connection error. No such foile or directory. Please check the server name, username and password below and try again . 92.208.246.114 (talk) 20:21, 29 December 2019 (UTC)
if using localhost for db server, try 127.0.0.1 instead (or vice versa) Bawolff (talk) 20:56, 29 December 2019 (UTC)
Useing localhost and 127.0.0.1 on form for setting db server, bring the same error message. 92.214.134.24 (talk) 21:26, 29 December 2019 (UTC)
can you access the db using the mysql commandline client using the same username password and server? Bawolff (talk) 21:46, 29 December 2019 (UTC)
I dont know what are a mysql commandline client. I didnt install by self a mysq database by hand.
If the Media Wiki installation via the application management of Linux Mint LMDE3 dont install the mysql server too, i guess i dont have a mysql server and no mysql data base on this time.
How can i chek ? 92.214.134.24 (talk) 22:12, 29 December 2019 (UTC)
if it is installed, its likely that there is some default username or password for mysql (not your usual username/pass) or ot might have password login disabled. You should see if your distro has documentation on how to setup mariadb/mysql. Bawolff (talk) 22:33, 29 December 2019 (UTC)

Upgrading to 1.34

Hi - I have two mediawiki installations on separate domains. Just upgraded (using softaculous on cPanel) - one of the upgrades is good - the other not so good.

I have my own skin (based heavily on Erudite) which is different for each installation. For the one that does not work switching to erudite also fails (shows a blank page) however both monobook and vector will display the page. I am upgrading from 1.33.2 - the skin was fine before the upgrade.

Not seeing any error messages although at one stage I did get on about DBSlave - whatever that was seems to be resolved.

I have now reverted to 1.33.2 and all is working fine again.

Would be grateful for any clues as to how to fix this one.

Thanks GRMat158 (talk) 20:53, 29 December 2019 (UTC)

see manual:how to debug for instructions on how to get errors to display Bawolff (talk) 20:55, 29 December 2019 (UTC)
Thanks - the error message that was generated is

GRMat158 (talk) 21:49, 29 December 2019 (UTC)
Original exception: [dc06d6a70eaaa4c65fa0f2d6] /ignowiki/index.php?title=Main_Page&useskin=ignorance UnexpectedValueException from line 462 of /home/themcco2/public_html/systemsthink/ignowiki/includes/libs/rdbms/loadbalancer/LoadBalancer.php: Invalid server index index #DB_SLAVE
Backtrace:
#0 /home/themcco2/public_html/systemsthink/ignowiki/includes/libs/rdbms/loadbalancer/LoadBalancer.php(896): Wikimedia\Rdbms\LoadBalancer->getConnectionIndex(string, array, string)
#1 /home/themcco2/public_html/systemsthink/ignowiki/includes/libs/rdbms/loadbalancer/LoadBalancer.php(1043): Wikimedia\Rdbms\LoadBalancer->getConnection(string, array, string, integer)
#2 /home/themcco2/public_html/systemsthink/ignowiki/includes/GlobalFunctions.php(2576): Wikimedia\Rdbms\LoadBalancer->getMaintenanceConnectionRef(string, array, string)
#3 /home/themcco2/public_html/systemsthink/ignowiki/skins/ignorance/Ignorance.skin.php(36): wfGetDB(string)
#4 /home/themcco2/public_html/systemsthink/ignowiki/skins/ignorance/Ignorance.skin.php(163): IgnoranceTemplate->newpages()
#5 /home/themcco2/public_html/systemsthink/ignowiki/includes/skins/SkinTemplate.php(217): IgnoranceTemplate->execute()
#6 /home/themcco2/public_html/systemsthink/ignowiki/includes/OutputPage.php(2574): SkinTemplate->outputPage()
#7 /home/themcco2/public_html/systemsthink/ignowiki/includes/MediaWiki.php(907): OutputPage->output(boolean)
#8 /home/themcco2/public_html/systemsthink/ignowiki/includes/MediaWiki.php(919): MediaWiki->{closure}()
#9 /home/themcco2/public_html/systemsthink/ignowiki/includes/MediaWiki.php(527): MediaWiki->main()
#10 /home/themcco2/public_html/systemsthink/ignowiki/index.php(44): MediaWiki->run()
#11 {main} GRMat158 (talk) 21:49, 29 December 2019 (UTC)
DB_SLAVE got renamed to DB_REPLICA. You would have to change all instances in the source code Bawolff (talk) 22:26, 29 December 2019 (UTC)
That solved it - although it threw up a different error that I have also fixed (or at least ignored!)
Still slightly flumoxed why this only affected one of the two installations (although I have changed the name in the other one just in case) GRMat158 (talk) 23:41, 29 December 2019 (UTC)
Many thanks for the assistance GRMat158 (talk) 23:41, 29 December 2019 (UTC)

I am noticing some lag need advice on Shell settings

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 there i am noticing some lag where can i learn in depth about setting the Shell parameters or what setting are for optimum performance please.


$wgMaxShellMemory, $wgMaxShellTime, $wgMaxShellFileSize AlgorithmGG (talk) 22:53, 29 December 2019 (UTC)

How are you defining "lag" here?
Performance issues can be caused by a lot of things. Well the various Shell variables can effect server performance, they aren't usually the chief cause of issues. First thing to check, is to make sure that you have object caching enabled (e.g. APCu or memcached. If using apcu make sure apcu.shm_size is large enough) and that $wgMainCacheType is set appropriately (i.e. CACHE_ACCEL if using apc).
Otherwise, certain extensions can sometimes cause problems (particularly if they disable caching), and a variety of other situations can cause problems. Profiling can help tell what is taking the most time, which can help in us advising how to improve performance Bawolff (talk) 23:40, 29 December 2019 (UTC)
Sweet, so if the environment is set correctly the default settings should be enough, i take it? AlgorithmGG (talk) 00:29, 30 December 2019 (UTC)
in a typical install yes, although there are definitely things you can do beyond default if needed (e.g. if you have a high porportion of logged out users, file cache can help).
Object caching should be setup by the installer. If you add it afterwards, you have to adjust LocalSettings.php to tell mw to use it. Bawolff (talk) 00:53, 30 December 2019 (UTC)
It seems like my current resources are not compatible. The script is telling me this:
Warning: Could not find APCu or WinCache.
Object caching is not enabled.
These are the resources i currently have available.
Zend OPcache
Opcode Caching
memcached
memcached support enabled
Version 3.1.3
memcached daemon AlgorithmGG (talk) 02:25, 30 December 2019 (UTC)
$wgMemCachedServers = []; this is currently left blank does the software usually put the server ip in here? is this what I need to adjust? cheers AlgorithmGG (talk) 03:08, 30 December 2019 (UTC)
"127.0.0.1:11211" to this address! if memcached is enabled will this work? would make sense if its saving data locally. AlgorithmGG (talk) 05:06, 30 December 2019 (UTC)
you need both the server in that variable, and $wgMainCacheType = CACHE_MEMCACHED;
See manual:$wgMainCacheType for more info.
Its totally fine to have memcached on same server. The only possible issue would be if you had the memcache size set too high and the server didnt have any ram for the web server, that would make things slow (that said of course, if the memcache cache size is too small it will also be useless) Bawolff (talk) 09:42, 30 December 2019 (UTC)
cheers, how do I adjust the localsettings once I've had object caching enabled? I can run the installer again right? AlgorithmGG (talk) 01:06, 30 December 2019 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

ContactPage: How to limit characters of plain text field?

I have a ContactPage contact form containing a plain text field

(which I can't find inside $wgContactConfig['default'] = array()).

I am not referring to the multi-line text area that comes default (that one I already removed); I refer only to the form heading with the HTML name attribute of wpSubject.

I desire to limit the amount of characters of that plain text field (and perhaps further manipulate it), but I want to do so with PHP, not with JavaScript.

Given the form is parsed from an HTMLForm template engine (?) and not from direct HTML-PHP and given that I didn't find an explanation for this in quick search, I ask:

ContactPage: How to limit characters of plain text field?


Even a link to an article would help.

I didn't find an answer here:

Extension:ContactPage

HTMLForm (I assume min and max values are irrelevant) 2001:44C8:414F:134D:B4F8:1E5A:17F1:DB2C (talk) 03:54, 30 December 2019 (UTC)

i believe you should be able to specify maxlength as a parameter to htmlform.
Note: for certain (non-latin) languages and emoijis, the length calculation may be different than you expect Bawolff (talk) 09:05, 30 December 2019 (UTC)
@Bawolff just a side note --- if there was a way to totally disable emojis, both input and output, I would probably do that (and not just in MediaWiki). 2001:44C8:414F:134D:D17A:C400:201F:62DF (talk) 13:37, 30 December 2019 (UTC)

Wikipedia opensearch API no longer returns summary/description information

From the "Hampi" opensearch example https://www.mediawiki.org/wiki/API%3aOpensearch#Example

Array item [0][2] ("Hampi, also referred to as..."): now returns empty strings for some reason (I think this has been going on for about a week or so):

https://en.wikipedia.org/w/api.php?action=opensearch&search=Hampi&limit=3&namespace=0&format=jsonfm

Would it be best to just import a dump on my own server instead of relying on Wikipedia's API? I'm integrating word lookup inside of a desktop application (hoping for high availability). Maybe this is a rare occurrance or maybe the API has changed, not sure.

If I should post this elsewhere please let me know. Sam-U-cat (talk) 08:29, 30 December 2019 (UTC)

this was an intentional change. You can still access the summaries but you have to do it in a separate step using the text extracts module. See https://phabricator.wikimedia.org/T241437 for details Bawolff (talk) 08:58, 30 December 2019 (UTC)

problem with importing dumps into mediawiki

PHP Warning:  call_user_func() expects parameter 1 to be a valid callback, cannot access private method BackupReader::reportPage() in /var/www/mediawiki/includes/import/WikiImporter.php on line 474

PHP Warning:  call_user_func_array() expects parameter 1 to be a valid callback, cannot access private method BackupReader::handleRevision() in /var/www/mediawiki/includes/import/WikiImporter.php on line 500

PHP Warning:  call_user_func() expects parameter 1 to be a valid callback, cannot access private method BackupReader::reportPage() in /var/www/mediawiki/includes/import/WikiImporter.php on line 474

PHP Warning:  call_user_func_array() expects parameter 1 to be a valid callback, cannot access private method BackupReader::handleRevision() in /var/www/mediawiki/includes/import/WikiImporter.php on line 500

PHP Warning:  call_user_func() expects parameter 1 to be a valid callback, cannot access private method BackupReader::reportPage() in /var/www/mediawiki/includes/import/WikiImporter.php on line 474

PHP Warning:  call_user_func_array() expects parameter 1 to be a valid callback, cannot access private method BackupReader::handleRevision() in /var/www/mediawiki/includes/import/WikiImporter.php on line 500

PHP Warning:  call_user_func() expects parameter 1 to be a valid callback, cannot access private method BackupReader::reportPage() in /var/www/mediawiki/includes/import/WikiImporter.php on line 474

PHP Warning:  call_user_func_array() expects parameter 1 to be a valid callback, cannot access private method BackupReader::handleRevision() in /var/www/mediawiki/includes/import/WikiImporter.php on line 500

PHP Warning:  call_user_func() expects parameter 1 to be a valid callback, cannot access private method BackupReader::reportPage() in /var/www/mediawiki/includes/import/WikiImporter.php on line 474

PHP Warning:  call_user_func_array() expects parameter 1 to be a valid callback, cannot access private method BackupReader::handleRevision() in /var/www/mediawiki/includes/import/WikiImporter.php on line 500

PHP Warning:  call_user_func() expects parameter 1 to be a valid callback, cannot access private method BackupReader::reportPage() in /var/www/mediawiki/includes/import/WikiImporter.php on line 474

MWUnknownContentModelException from line 267 of /var/www/mediawiki/includes/content/ContentHandler.php: The content model 'flow-board' is not registered on this wiki.

See https://www.mediawiki.org/wiki/Content_handlers to find out which extensions handle this content model.

#0 /var/www/mediawiki/includes/import/WikiRevision.php(444): ContentHandler::getForModelID('flow-board')

#1 /var/www/mediawiki/includes/import/WikiImporter.php(911): WikiRevision->getContentHandler()

#2 /var/www/mediawiki/includes/import/WikiImporter.php(860): WikiImporter->processRevision(Array, Array)

#3 /var/www/mediawiki/includes/import/WikiImporter.php(802): WikiImporter->handleRevision(Array)

#4 /var/www/mediawiki/includes/import/WikiImporter.php(606): WikiImporter->handlePage()

#5 /var/www/mediawiki/maintenance/importDump.php(359): WikiImporter->doImport()

#6 /var/www/mediawiki/maintenance/importDump.php(301): BackupReader->importFromHandle(Resource id #174)

#7 /var/www/mediawiki/maintenance/importDump.php(129): BackupReader->importFromStdin()

#8 /var/www/mediawiki/maintenance/doMaintenance.php(99): BackupReader->execute()

#9 /var/www/mediawiki/maintenance/importDump.php(364): require_once('/var/www/mediaw...')

#10 {main} Ramu ummadishetty (talk) 10:31, 30 December 2019 (UTC)

This seems to be phab:T238984, which hasn't been backported to 1.34. Can you confirm which MediaWiki version are you using? Ciencia Al Poder (talk) 10:39, 30 December 2019 (UTC)
mediawiki version 1.34 Ramu ummadishetty (talk) 10:45, 30 December 2019 (UTC)
is there any way to solve this error? Ramu ummadishetty (talk) 12:33, 30 December 2019 (UTC)
You don't actually seem to be using MediaWiki 1.34, you seem to be using master or a 1.35 WMF branch, as the code that caused this issue is not in 1.34. There is nothing to be backported
Can you check again, and if you installed MediaWiki via git, try running git pull to get the latest code? Reedy (talk) 14:46, 30 December 2019 (UTC)

is there any way to pick articles of particular size ?

I want articles which are of medium sized so that i can translate them using content translator . can i get the list of those articles ? Ramu ummadishetty (talk) 12:40, 30 December 2019 (UTC)

you could probably get a list with https://quarry.wikimedia.org https://quarry.wmflabs.org . Which wiki and what is your definition of "medium" sized (in bytes) Bawolff (talk) 02:04, 31 December 2019 (UTC)
Quarry is hosted on Cloud VPS, its address is https://quarry.wmflabs.orgAmmarpad (talk) 05:07, 31 December 2019 (UTC)
I want to quarry simple english wikipedia articles of size 6000 - 10000 bytes Ramu ummadishetty (talk) 11:22, 31 December 2019 (UTC)
ya done Ramu ummadishetty (talk) 12:31, 31 December 2019 (UTC)
https://quarry.wmflabs.org/query/40964 Bawolff (talk) 23:46, 31 December 2019 (UTC)
can we get articles of 500 words , is there any query? Ramu ummadishetty (talk) 06:10, 1 January 2020 (UTC)
I did this https://quarry.wmflabs.org/query/41006 for 500 bytes, then I understand you're now looking to count "words", but I don't know how to do that. – Ammarpad (talk) 07:32, 1 January 2020 (UTC)
yeah i need that count not length

Ramu ummadishetty (talk) 08:40, 1 January 2020 (UTC)
unfortunately we dont store number of words in the sql db. The only way i know how to do that is by parsing a dump Bawolff (talk) 09:12, 1 January 2020 (UTC)
thank you sir. Ramu ummadishetty (talk) 05:47, 1 January 2020 (UTC)

How do you add inline css to a page?

I tried { {#css: body .toclevel-3{ display:none; }}} but it did not work. I simply want to hide lower levels of the toc 174.4.118.214 (talk) 17:34, 30 December 2019 (UTC)

See Manual:Table of contents#Customizing the TOC. AhmadF.Cheema (talk) 04:33, 31 December 2019 (UTC)

Directory Removal

Hello, mediawiki is installed in my subdomain [wiki.example.com], whenever this subdomain is entered it redirects to [wiki.example.com/index.php/main]. So i basically want [wiki.example.com] to redirect to [wiki.example.com/main] rather than subdirectory. Any easy and complete guide please, something which will not cause issue to existing wiki pages. BeeepBot (talk) 19:16, 30 December 2019 (UTC)

see manual:short URL Bawolff (talk) 19:27, 30 December 2019 (UTC)
can you provide exact one please? I tried but failed :( BeeepBot (talk) 20:58, 30 December 2019 (UTC)
Anyone? BeeepBot (talk) 02:15, 31 December 2019 (UTC)
Without additional information regarding your server setup, the Short URL article is unfortunately as exact as it gets.
You'll have to see which setup you're using and then use one of the guides for that particular setup. AhmadF.Cheema (talk) 04:18, 31 December 2019 (UTC)

Boxes

How can these type of box be made with there inner text to be redirected using URLs?

https://imgur.com/jShl464 BeeepBot (talk) 21:05, 30 December 2019 (UTC)

Anyone? BeeepBot (talk) 02:15, 31 December 2019 (UTC)
This doesn't appear to be related to mediawiki DannyS712 (talk) 04:10, 31 December 2019 (UTC)
More appropriate to ask as some CSS help forum.
In any case, can probably use something like en:Template:Box. If you're going to use this, also see Help:Templates#Copying from one wiki to another. AhmadF.Cheema (talk) 04:24, 31 December 2019 (UTC)

Why have we been deleted?

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


WE recently registered our family band HOOK ( as there are many other bands on here} your page auto made us HOOK Music }!! ?? WHY????? now we find we are banned due to advertising...whats that all about please??? HOOKmusic (talk) 22:03, 30 December 2019 (UTC)

hi. This form is only for technical questions. We are separate from wikipedia and cant really help with political questions about wikipedia.
See https://en.wikipedia.org/wiki/User_talk:HOOKmusic for why you are blocked. Despite being blocked you can still ask questions on that page or use that page to appeal your block. Bawolff (talk) 01:51, 31 December 2019 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

My citation tool "citoid" is not connecting to the WorldCat service.

When I put in the ISBN numbering, it rejects and asking me to do it manually, do I want to know if there is a link that can resolve this? And if there isn't, where should I resolve it? WikiUser22222 (talk) 22:18, 30 December 2019 (UTC)

I think you should first read Citoid#Troubleshooting_VisualEditor_Extension as well as other linked sections there. – Ammarpad (talk) 01:12, 1 January 2020 (UTC)
Cool, and now how do I edit and insert this information into API? WikiUser22222 (talk) 20:01, 1 January 2020 (UTC)

NewUserMessage extension

Hi. I recently added the NewUserMessage extension to my (Miraheze-hosted) wiki, which adds a message to every new user's talk page. Unfortunately, it always includes realName= and name= perameters in the welcome template, as well as a New user message signature, which I don't want. For clarification:

What I would like:

{{welcome}}

What it does instead:

{{welcome|realName=New User|name=NewUser}}

-- [[User:New user message|New user message]] ([[User talk:New user message|talk]]) 00:00, 1 January 2020 (UTC)

More information:

Gfdgsgxgzgdrc Gfdgsgxgzgdrc (talk) 22:37, 30 December 2019 (UTC)

I guess you can add something to MediaWiki:Newusermessage-substitute‎, and then put an intermediate template on MediaWiki:Newusermessage-template that calls the welcome template. Since it will be substituted, it won't display the original parameters. I'm not sure if the substitution would be recursive, though, which in that case it will substitute the welcome template too. Ciencia Al Poder (talk) 10:28, 31 December 2019 (UTC)
Thanks! It worked for the template parameters, but the signature is still there. Is there a way to get rid of that? If not, that's fine. Gfdgsgxgzgdrc (talk) 00:45, 2 January 2020 (UTC)
According to the documentation, if MediaWiki:Newusermessage-signatures is None, no signature should be placed Ciencia Al Poder (talk) 10:13, 2 January 2020 (UTC)
I tried having it blank, and even creating it with the word "None", but it always includes the signature. Gfdgsgxgzgdrc (talk) 02:18, 12 January 2020 (UTC)
You may try to open a bug on phabricator, since it's not functioning as documented. Maybe that's a good way to get in touch with the developers of the extension. Ciencia Al Poder (talk) 10:11, 13 January 2020 (UTC)

c

https://meta.wikimedia.org/wiki/User:Sakhalinio bu bir hackerdir ve türkiyedeki bütün yazilari engelliyor buna derhal müdahale edin 31.223.61.194 (talk) 23:28, 30 December 2019 (UTC)

google translate isn't very clear on what you are asking. If you are complaining about a user or on-wiki politics on turkish wikipedia, this form is the wrong place and we cannot help you. You have to bring up user complaints at the Wiki they happen. This form can only answer technical questions.
Bu form yalnızca teknik sorular içindir. Kullanıcı anlaşmazlıkları, anlaşmazlığın oluştuğu wiki'de ele alınmalıdır. Bawolff (talk) 02:20, 31 December 2019 (UTC)

What are the possible ways to translate in MediaWiki without an extension?

I use only one extension - ContactPage.

Using the template engine HTMLForms implemented as form-template for ContactPage I created a selection menu in my form.

The keys and values of this selection menu are written in English inside LocalSettings.php

But,

I would like them to appear in my site's native language for surfers.

I could translate these extensionless with JavaScript by some similar code:

document.getElementById('select').selectedIndex = 0;

document.getElementById('select').value = 'Default';

In the Drupal CMS for example, there is a "backend" internal translation mechanism that allows to do just that, but I don't know of a similar internal mechanism in MediaWiki.

I wonder how you would do it "backend" and extensionless:

What are the possible ways to translate in MediaWiki without an extension? 2001:44C8:414F:134D:C5CF:2A00:98E4:CD1D (talk) 09:09, 31 December 2019 (UTC)

Usually, in many places you can use <code>{{int:message name}}</code> to transclude the contents of MediaWiki:Message name in the language requested by the user (that can change by an extension or by adding uselang=languagecode to the URL). You can try this approach and see if that works. You'll have to create each message in every language you want translated: MediaWiki:Message name (default), MediaWiki:Message name/de (German), MediaWiki:Message name/es (Spanish)... Ciencia Al Poder (talk) 10:24, 31 December 2019 (UTC)
Hello @Ciencia Al Poder I'm not sure I understand your comment (for which I am thankful):
I tried to navigate: example.com/MediaWiki:Message and got a 404.
Where should I add such translation directives?
In a quick Google search I found these articles:
https://meta.wikimedia.org/wiki/Help:System_message
Manual:Messages API
Help:Magic words
But I don't know which is correct to read first, if at all I should read all three. 2001:44C8:414F:134D:C5CF:2A00:98E4:CD1D (talk) 10:56, 31 December 2019 (UTC)
Reading those pages won't do you any harm. Anyway, Help:System_message#Transclusion is probably very relevant to what I tried to explain. Ciencia Al Poder (talk) 16:10, 31 December 2019 (UTC)
In my opinion it might not @Ciencia Al Poder ; anyway, sadly I read the part about system-messages transclution but I misunderstand what it means.
Thanks, 2001:44C8:4704:4BA9:A8F5:BA5E:107:AFAE (talk) 09:01, 1 January 2020 (UTC)
You can create new pages on the MediaWiki namespace that don't exist already, and use that for your own messages. Then transclude them on the template you were talking about (with the int: prefix as described in the help page). You'll need to create one for the main language of the wiki, and subpages for every language you want the message to be translated. Ciencia Al Poder (talk) 21:02, 1 January 2020 (UTC)
Now I understand what should be done (especially the namespace: example helped me so. Thank you. 2001:44C8:4360:F937:D041:643C:BF0A:58C6 (talk) 04:22, 3 January 2020 (UTC)
For newcommers, more information is available in the StackOverflow session with the title:
What are the possible ways to translate in MediaWiki from “backend”, without an extension?
It could be found in a quick Google search --- the strict "anti spam" filter here didn't let me post a link peacefully. 2001:44C8:4360:F937:D041:643C:BF0A:58C6 (talk) 06:11, 3 January 2020 (UTC)
I ask @Ciencia Al Poder to help with this problem (and may the spam filter finally be softened to allow StackOverflow questions containing the term "mediawiki"). 2001:44C8:4360:F937:D041:643C:BF0A:58C6 (talk) 07:20, 3 January 2020 (UTC)
The link you wanted to post is: https://stackoverflow.com/questions/59551194/what-are-the-possible-ways-to-translate-in-mediawiki-from-backend-without-an Ciencia Al Poder (talk) 10:09, 3 January 2020 (UTC)

is there any way that i can get list of articles which are not in telugu language but in simple english ?

i downloaded dumps and written a python program to extract list but i think it is not a proper way. Ramu ummadishetty (talk) 11:49, 31 December 2019 (UTC)

telugu and simple english are kept in different dump files, so just use the right dump file (?) Bawolff (talk) 23:39, 31 December 2019 (UTC)
with out using dump can I do query to extract the articles which are not in Telugu language but in simple english Wikipedia? Ramu ummadishetty (talk) 06:25, 1 January 2020 (UTC)
Try this: https://tools.wmflabs.org/not-in-the-other-language 94rain Talk 06:29, 1 January 2020 (UTC)
but i want to download the list. Ramu ummadishetty (talk) 06:40, 1 January 2020 (UTC)
its Possible to do this from quarry which also has a download data option. Combining with your other question about medium sized articles gives https://quarry.wmflabs.org/query/41009 Bawolff (talk) 09:09, 1 January 2020 (UTC)

wikitable with sortable / collapsible / collapsed

Hello,

I have a wikitable with the options sortable/collapsible and collapsed together and multiple header lines

Why the behaviour is different here and there (with the same wiki code) ?

Sanbox Mediawiki ► https://www.mediawiki.org/w/index.php?title=Project:Sandbox&oldid=3584534

Sandbox: wikipedia.en ► https://en.wikipedia.org/w/index.php?title=Wikipedia:Sandbox&oldid=933412098

Until recently on my own wiki (before upgrading to 1.34) a similar table with three header lines let appears only the first one when it was collapsed. (test case 3 of mediawiki sandbox). But not anymore...

Has someone an explanation on this behaviour (all the header lines are visible when collapsed) ?

~~~~.



Khardan (talk) 19:56, 31 December 2019 (UTC)

Inquiry About Research Contributions and Careers in Wikipedia

Hello Wikipedia.

I have enjoyed for many years using Wikipedia as a source of information. What department in your organization may I contact to find out more on information contributions for new article submissions? Also, what is the most expedient way I may contact your office for careers available in Wikipedia?

Respectfully,

Miss Pinkie Lee Davis

Air Force Veteran

userpinkie777@gmail.com

601-826-5199 Userpinkie888 (talk) 21:58, 31 December 2019 (UTC)

Hi,
See https://en.wikipedia.org/wiki/Wikipedia:Introduction for information about submitting content to wikipedia.
All the editorial decisions in wikipedia are made by volunteers. Careers related to wikipedia mostly involve maintaining infrastructure. There is a list of openings at https://wikimediafoundation.org/about/jobs/ Bawolff (talk) 23:37, 31 December 2019 (UTC)