Project:Support desk

Jump to navigation Jump to search

About this board

Welcome to MediaWiki.org's Support desk, where you can ask MediaWiki questions!

There are also other places where to ask :

Before you post

Post a new question

  1. To help us answer your questions, please always indicate which versions you are using (reported by your wiki's Special:Version page):
    • MediaWiki
    • PHP
    • Database
  2. Please include the URL of your wiki unless you absolutely can't. It's often a lot easier for us to identify the source of the problem if we can look for ourselves.
  3. To start a new thread, click "Start a new topic".
Previous page history was archived for backup purposes at Project:Support_desk/old on 2015-07-30.
Other languages: English  العربية čeština Esperanto français 日本語 中文

Skin not loading (IONOS Hosting)

10
7heo T (talkcontribs)

Hi !

I'm not used to "coding" so I installed MediaWiki on my Ionos hosted server thanks to their build-in tool.

MediaWiki a been instaled correctly and i can browse through the pages but with no skin.

I get this error :

"Refused to apply style from '[URL]' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled."

After some reaserches I found that it can be due to short URL and that a need to create a symbolic link from /var/www pointing to /var/lib/mediawiki/[my $wgScriptPath value]. But I don't have a var folder in my wiki directory on the server. So what am I supposed to do ? It seems that my problem is linked to the fact I'm hosted by Ionos ? Have anyone already used MediaWiki with Ionos ?

Thanks for your help

MarkAHershberger (talkcontribs)

This ("Refused to apply style...") sounds like a server configuration problem.

I've set up an Ionos site just to test this since it looks like I can do that without incurring any cost. I'll come back and update this when I've tried it.

Bawolff (talkcontribs)

it can be caused by a bunch of things. Can you open the css file in your browser (or provide a link)? Is it a 404 page? Is it an error? Something else?

7heo T (talkcontribs)

The URL does not correspond to a css file but to the load.php file.

Here is the link of the wiki : http://wiki-phaeton.trescarte.com/ where will be able to see the error in the console.

MarkAHershberger (talkcontribs)

The one-click install that I did at ionos seems to work. What have you done besides the installation?

MarkAHershberger (talkcontribs)

Visiting your site shows the load.php giving http 500 errors. If you can edit the LocalSettings.php file, try turning on debugging.

Specifically, if you view-source on the load.php url, you'll see this:

Set $wgShowExceptionDetails = true; at the bottom
of LocalSettings.php to show detailed debugging
information.
7heo T (talkcontribs)

Besides doing the installation I didn't do anathing.

I've turn on debugging and now when i run the load.php file with the following parameters :

"/load.php?debug=false&lang=fr&modules=mediawiki.legacy.commonPrint%2Cshared%7Cmediawiki.sectionAnchor%7Cmediawiki.skinning.interface%7Cskins.vector.styles&only=styles&skin=vector"

I've no more error in the console but this written on the page :

[XomgRVKlV2sAAK@2TT0AAAA-] /load.php?debug=false&lang=fr&modules=mediawiki.legacy.commonPrint%2Cshared%7Cmediawiki.sectionAnchor%7Cmediawiki.skinning.interface%7Cskins.vector.styles&only=styles&skin=vector Error from line 657 of /homepages/17/d822040357/htdocs/clickandbuilds/MediaWiki/MyWikis/includes/exception/MWExceptionHandler.php: Class 'FormatJson' not found

Backtrace:

#0 /homepages/17/d822040357/htdocs/clickandbuilds/MediaWiki/MyWikis/includes/exception/MWExceptionHandler.php(195): MWExceptionHandler::logError(ErrorException, string, string)

#1 /homepages/17/d822040357/htdocs/clickandbuilds/MediaWiki/MyWikis/includes/AutoLoader.php(81): MWExceptionHandler::handleError(integer, string, string, integer, array)

#2 /homepages/17/d822040357/htdocs/clickandbuilds/MediaWiki/MyWikis/includes/AutoLoader.php(81): require()

#3 [internal function]: AutoLoader::autoload(string)

#4 /homepages/17/d822040357/htdocs/clickandbuilds/MediaWiki/MyWikis/includes/resourceloader/ResourceLoaderModule.php(493): spl_autoload_call(string)

#5 /homepages/17/d822040357/htdocs/clickandbuilds/MediaWiki/MyWikis/includes/resourceloader/ResourceLoaderFileModule.php(394): ResourceLoaderModule->saveFileDependencies(ResourceLoaderContext, array)

#6 /homepages/17/d822040357/htdocs/clickandbuilds/MediaWiki/MyWikis/includes/resourceloader/ResourceLoaderModule.php(742): ResourceLoaderFileModule->getStyles(ResourceLoaderContext)

#7 /homepages/17/d822040357/htdocs/clickandbuilds/MediaWiki/MyWikis/includes/resourceloader/ResourceLoaderModule.php(687): ResourceLoaderModule->buildContent(ResourceLoaderContext)

#8 /homepages/17/d822040357/htdocs/clickandbuilds/MediaWiki/MyWikis/includes/resourceloader/ResourceLoader.php(1069): ResourceLoaderModule->getModuleContent(ResourceLoaderContext)

#9 /homepages/17/d822040357/htdocs/clickandbuilds/MediaWiki/MyWikis/includes/resourceloader/ResourceLoader.php(783): ResourceLoader->makeModuleResponse(ResourceLoaderContext, array, array)

#10 /homepages/17/d822040357/htdocs/clickandbuilds/MediaWiki/MyWikis/load.php(53): ResourceLoader->respond(ResourceLoaderContext)

#11 {main}

If it worked for you maybe I will try to uninstall and reinstall it ... we never know ...

7heo T (talkcontribs)

After reinstalling I still have the same problem ...

MarkAHershberger (talkcontribs)

The problem is this line right here:

Class 'FormatJson' not found

Which might mean that the PHP's json page is not installed.

But, you say you reinstalled it. And your special version page indicates that you are using Debian with MediaWiki 1.30 while it gave me Centos with MediaWiki 1.34. I'm using the 1&1 installer, not the one in Plesk (or another tool), so that is probably the difference.

How are you installing it?

7heo T (talkcontribs)

I've installed it directly from ionos website with their sort of "app store" and I simply clicked on "Install"

And yes I have version 1.30 but I don't know about Debian or Centos

Reply to "Skin not loading (IONOS Hosting)"

VisualEditor and Mediawiki over https

1
Darmoric (talkcontribs)

Hi

I don't succeed to make usable VisualEditor.:

visualeditor-docserver-http-error: (curl error: 77) Problem with the SSL CA cert (path? access rights?).


Here is my stunnul4 configuration:

debug = 7

output = /var/log/stunnel4/stunnel.log

verify = 2

[parsoid]

cert = /shared/stunnel.mobolab.net.crt.pem

key = /shared/stunnel.mobolab.net-without-passphrase.key.pem

CAfile = /shared/chain.mobolab.crt.pem

accept  = 192.168.1.88:8143

connect = 192.168.1.88:8142


I can see that certificates are well loaded, but stunnel never communicates with port 8142.


What can be wrong ?


Thanks in advance

(parsoid was working well before trying to use https)


Reply to "VisualEditor and Mediawiki over https"

Wikimedia\Rdbms\DBReadOnlyError after VM crash

11
80.128.145.126 (talkcontribs)

I run a wiki on an Apache webserver with Mysql in a Linux-VM . This VM crashed yesterday without reason and now this is happening:

*Apache is running

*MySQL opens 200+ threads with Mysqld --daemonize myslq.pid

**It tells me, that there are 14 open files

**mysqladmin says, that 140+ localhost/wiki process are sleeping (this number is constantly growing, which causes a "to many connection" error after a while)

*My VM is reaching its RAM and CPU limitation due to MySQL and freezes

*If I try to connect to my wiki via internet it either gives me a connection time out or "Wikimedia\Rdbms\DBReadOnlyError" (but the wiki wasn't in read only mode when the vm crashed)


Since I installed MediaWiki two years ago I kept it up-to-date, made two successful upgrades to the recent versions and never changed the apache/mysql default settings (with exclusion of user/password) and it all worked fine. Until yesterday.


Further testing/logging within the wiki isn't possible due to the nature of the problem. I can't provide any log files.

80.128.145.126 (talkcontribs)

I have to correct myself: After many reloads I finally got an error log.

And again: I have no idea why it says "Read-only". I checked the LocalSettings and it's not read only.


MediaWiki internal error.

Original exception: [3b46c182321d3ea4b8b9902a] /wiki/Mainpage Wikimedia\Rdbms\DBReadOnlyError from line 1121 of /var/lib/mediawiki/includes/libs/rdbms/database/Database.php: Database is read-only

Backtrace:

#0 /var/lib/mediawiki/includes/libs/rdbms/database/Database.php(2010): Wikimedia\Rdbms\Database->query(string, string)

#1 /var/lib/mediawiki/includes/objectcache/SqlBagOStuff.php(414): Wikimedia\Rdbms\Database->update(string, array, array, string)

#2 /var/lib/mediawiki/includes/libs/objectcache/BagOStuff.php(316): SqlBagOStuff->cas(array, string, array, integer)

#3 /var/lib/mediawiki/includes/objectcache/SqlBagOStuff.php(488): BagOStuff->mergeViaCas(string, Closure, integer, integer)

#4 /var/lib/mediawiki/includes/libs/objectcache/WANObjectCache.php(549): SqlBagOStuff->merge(string, Closure, integer, integer)

#5 /var/lib/mediawiki/includes/cache/MessageCache.php(732): WANObjectCache->set(string, array, integer)

#6 /var/lib/mediawiki/includes/cache/MessageCache.php(671): MessageCache->setValidationHash(string, array)

#7 /var/lib/mediawiki/includes/cache/MessageCache.php(420): MessageCache->saveToCaches(array, string, string)

#8 /var/lib/mediawiki/includes/cache/MessageCache.php(342): MessageCache->loadFromDBWithLock(string, array, NULL)

#9 /var/lib/mediawiki/includes/cache/MessageCache.php(971): MessageCache->load(string)

#10 /var/lib/mediawiki/includes/cache/MessageCache.php(928): MessageCache->getMsgFromNamespace(string, string)

#11 /var/lib/mediawiki/includes/cache/MessageCache.php(868): MessageCache->getMessageForLang(Language, string, boolean, array)

#12 /var/lib/mediawiki/includes/cache/MessageCache.php(808): MessageCache->getMessageFromFallbackChain(Language, string, boolean)

#13 /var/lib/mediawiki/includes/Message.php(1290): MessageCache->get(string, boolean, Language)

#14 /var/lib/mediawiki/includes/Message.php(1006): Message->fetchMessage()

#15 /var/lib/mediawiki/includes/specialpage/SpecialPage.php(840): Message->isDisabled()

#16 /var/lib/mediawiki/includes/specials/SpecialRecentchanges.php(164): SpecialPage->addHelpLink(string, boolean)

#17 /var/lib/mediawiki/includes/specialpage/SpecialPage.php(565): SpecialRecentChanges->execute(NULL)

#18 /var/lib/mediawiki/includes/specialpage/SpecialPageFactory.php(568): SpecialPage->run(NULL)

#19 /var/lib/mediawiki/includes/MediaWiki.php(288): SpecialPageFactory::executePath(Title, RequestContext)

#20 /var/lib/mediawiki/includes/MediaWiki.php(861): MediaWiki->performRequest()

#21 /var/lib/mediawiki/includes/MediaWiki.php(524): MediaWiki->main()

#22 /var/lib/mediawiki/index.php(42): MediaWiki->run()

#23 {main}

Exception caught inside exception handler: [3b46c182321d3ea4b8b9902a] /wiki/Mainpage Wikimedia\Rdbms\DBReadOnlyError from line 1121 of /var/lib/mediawiki/includes/libs/rdbms/database/Database.php: Database is read-only

Backtrace:

#0 /var/lib/mediawiki/includes/libs/rdbms/database/Database.php(2010): Wikimedia\Rdbms\Database->query(string, string)

#1 /var/lib/mediawiki/includes/objectcache/SqlBagOStuff.php(414): Wikimedia\Rdbms\Database->update(string, array, array, string)

#2 /var/lib/mediawiki/includes/libs/objectcache/BagOStuff.php(316): SqlBagOStuff->cas(array, string, array, integer)

#3 /var/lib/mediawiki/includes/objectcache/SqlBagOStuff.php(488): BagOStuff->mergeViaCas(string, Closure, integer, integer)

#4 /var/lib/mediawiki/includes/libs/objectcache/WANObjectCache.php(549): SqlBagOStuff->merge(string, Closure, integer, integer)

#5 /var/lib/mediawiki/includes/cache/MessageCache.php(732): WANObjectCache->set(string, array, integer)

#6 /var/lib/mediawiki/includes/cache/MessageCache.php(671): MessageCache->setValidationHash(string, array)

#7 /var/lib/mediawiki/includes/cache/MessageCache.php(420): MessageCache->saveToCaches(array, string, string)

#8 /var/lib/mediawiki/includes/cache/MessageCache.php(342): MessageCache->loadFromDBWithLock(string, array, NULL)

#9 /var/lib/mediawiki/includes/cache/MessageCache.php(971): MessageCache->load(string)

#10 /var/lib/mediawiki/includes/cache/MessageCache.php(928): MessageCache->getMsgFromNamespace(string, string)

#11 /var/lib/mediawiki/includes/cache/MessageCache.php(868): MessageCache->getMessageForLang(Language, string, boolean, array)

#12 /var/lib/mediawiki/includes/cache/MessageCache.php(808): MessageCache->getMessageFromFallbackChain(Language, string, boolean)

#13 /var/lib/mediawiki/includes/Message.php(1290): MessageCache->get(string, boolean, Language)

#14 /var/lib/mediawiki/includes/Message.php(982): Message->fetchMessage()

#15 /var/lib/mediawiki/includes/skins/Skin.php(1348): Message->exists()

#16 /var/lib/mediawiki/includes/skins/Skin.php(1305): Skin->addToSidebarPlain(array, string)

#17 /var/lib/mediawiki/includes/skins/Skin.php(1261): Skin->addToSidebar(array, string)

#18 /var/lib/mediawiki/includes/skins/Skin.php(1287): Skin->{closure}()

#19 /var/lib/mediawiki/includes/skins/SkinTemplate.php(481): Skin->buildSidebar()

#20 /var/lib/mediawiki/includes/skins/SkinTemplate.php(249): SkinTemplate->prepareQuickTemplate()

#21 /var/lib/mediawiki/includes/OutputPage.php(2388): SkinTemplate->outputPage()

#22 /var/lib/mediawiki/includes/exception/MWExceptionRenderer.php(137): OutputPage->output()

#23 /var/lib/mediawiki/includes/exception/MWExceptionRenderer.php(54): MWExceptionRenderer::reportHTML(Wikimedia\Rdbms\DBReadOnlyError)

#24 /var/lib/mediawiki/includes/exception/MWExceptionHandler.php(75): MWExceptionRenderer::output(Wikimedia\Rdbms\DBReadOnlyError, integer)

#25 /var/lib/mediawiki/includes/exception/MWExceptionHandler.php(149): MWExceptionHandler::report(Wikimedia\Rdbms\DBReadOnlyError)

#26 /var/lib/mediawiki/includes/MediaWiki.php(551): MWExceptionHandler::handleException(Wikimedia\Rdbms\DBReadOnlyError)

#27 /var/lib/mediawiki/index.php(42): MediaWiki->run()

#28 {main}

80.128.145.126 (talkcontribs)

Update: After using the "SET GLOBAL read_only = OFF;" command in mysql, I don't get any time outs anymore but blank pages without any information.

80.128.145.126 (talkcontribs)

Update: This is the last entry of the Apache errorlog.


[Fri Apr 03 19:42:38.978709 2020] [php7:error] [pid 22088] [client 46.229.168.151:31960] PHP Fatal error: Uncaught Error: Call to a member function getCode() on null in /var/lib/mediawiki/includes/user/User.php:1737\nStack trace:\n#0 /var/lib/mediawiki/includes/user/User.php(5417): User::getDefaultOptions()\n#1 /var/lib/mediawiki/includes/user/User.php(3101): User->loadOptions()\n#2 /var/lib/mediawiki/includes/context/RequestContext.php(336): User->getOption('language')\n#3 /var/lib/mediawiki/includes/Message.php(380): RequestContext->getLanguage()\n#4 /var/lib/mediawiki/includes/Message.php(1290): Message->getLanguage()\n#5 /var/lib/mediawiki/includes/Message.php(842): Message->fetchMessage()\n#6 /var/lib/mediawiki/includes/Message.php(934): Message->toString('text')\n#7 /var/lib/mediawiki/includes/exception/MWExceptionRenderer.php(201): Message->text()\n#8 /var/lib/mediawiki/includes/exception/MWExceptionRenderer.php(301): MWExceptionRenderer::msg('dberr-problems', 'Sorry! This sit...')\n#9 /var/lib/mediawiki/includes/exception/MWExceptionRenderer.php(52): MWExceptionRenderer::reportOutageHTML(Object(Wikimedia\Rdbms\DBCon in /var/lib/mediawiki/includes/user/User.php on line 1737

MarkAHershberger (talkcontribs)

Do you have a database backup? If you do, you should drop the database and restore from the backup.

If you don't, then your best bet is to try to use rebuild or repair the DB.

Bawolff (talkcontribs)

yeah, this sounds like a mysql error not a mediawiki error

87.157.184.253 (talkcontribs)

The database checked ok. I narrowed down the error to PHP, because in some brief moments I somehow get the Mainpage with my content; but most of the time I get a blank page. I don't get any php error logs thou. Only blank pages even with error reporting on.

87.157.184.253 (talkcontribs)

Here is a snippet from the Apache error log. It basically contains only this message since the VM crash:


[Wed Apr 01 06:18:42.710098 2020] [php7:error] [pid 27133] [client 114.119.161.74:12918] PHP Fatal error:  Uncaught Error: Call to a member function getCode() on null in /var/lib/mediawiki/includes/user/User.php:1737\nStack trace:\n#0 /var/lib/mediawiki/includes/user/User.php(5417): User::getDefaultOptions()\n#1 /var/lib/mediawiki/includes/user/User.php(3101): User->loadOptions()\n#2 /var/lib/mediawiki/includes/context/RequestContext.php(336): User->getOption('language')\n#3 /var/lib/mediawiki/includes/Message.php(380): RequestContext->getLanguage()\n#4 /var/lib/mediawiki/includes/Message.php(1290): Message->getLanguage()\n#5 /var/lib/mediawiki/includes/Message.php(842): Message->fetchMessage()\n#6 /var/lib/mediawiki/includes/Message.php(934): Message->toString('text')\n#7 /var/lib/mediawiki/includes/exception/MWExceptionRenderer.php(201): Message->text()\n#8 /var/lib/mediawiki/includes/exception/MWExceptionRenderer.php(301): MWExceptionRenderer::msg('dberr-problems', 'Sorry! This sit...')\n#9 /var/lib/mediawiki/includes/exception/MWExceptionRenderer.php(52): MWExceptionRenderer::reportOutageHTML(Object(Wikimedia\\Rdbms\\DBCon in /var/lib/mediawiki/includes/user/User.php on line 1737


Maybe one of the MediaWiki-php's got fried in the crash event?

Bawolff (talkcontribs)

thats just an error in displaying the page that reports the db is broken.

This is definitely primarily your database being broken plus an additional issue with the code that turns that into a friendly error message being also broken. However the primary issue is that your database is broken

87.157.184.253 (talkcontribs)

After much tinkering and reconsidering, I'm going to rebuild the Database via the last backup I luckely took half a day before the crash. But if there's a bigger problem within the database, this only will create an endless loop of getting the wiki back online and losing it half a day later.

80.128.151.130 (talkcontribs)

Welp, it kind of worked. Now it takes a considerable time (about 10 odd mins) to connect to my mainpage. And I get aborted connection errors from php/apache in the mysql log.

Reply to "Wikimedia\Rdbms\DBReadOnlyError after VM crash"
134.191.232.70 (talkcontribs)

Hi,

I would like to add Graph (timeline & line) using an internal data source.


what is the best extension for it? can someone send me a working examples for it.


Thanks,

Shalom


Malyacko (talkcontribs)
Reply to "Graphs in Mediawiki"
BensDBN (talkcontribs)

Hi,

I have a MediaWiki that is set to private and I want a specific user account to be able to programatically signed in and when I browse to the wiki that its automatically signed in.

I followed this post: API:Login but it doesnt tell you what to do after you have logged in and I'm hoping to get some help regarding saving your login to a cookie.

I get a readapidenied error when I try to do a GET token request, I switched to the depricated way of doing it via POST but at least im able to get a token. I now do a login post and I get a return (I'm not sure if this is successful as it shows a different token with a status of "Needs Token".


Any help or links to documentation would be greatly appreciated.


Ciencia Al Poder (talkcontribs)

"Being logged in" from a browser's perspective means you have entered valid credentials, and you got an HTTP cookie with a session identifier, and the browser sends back that cookie with the session identifier on all requests to the wiki that tells the server who's the user (this is what maintains the user logged in, until the cookie expires or the session is no longer valid on the server).

If you're able to programatically set a cookie on the user's browser from the same domain as MediaWiki, you'll be good to go. Otherwise, you won't be able to do so. Maybe Extension:Auth remoteuser is an alternative if you can set up the user on the server level.

About the api, if you receive Needs Token, this means you're not sending back the cookie you received from the first POST.

BensDBN (talkcontribs)

Hi Ciencia,

Thanks for your response. I am using AngularJS, I am just battling to grab to the cookie from the response headers from the first POST. I'm busy looking into how to do this currently.

I can see the cooking on the response header: Set-Cookie: wikidb_session=sd00uqls8o2hi6q7cev6gpg0tjhjbh4t; path=/; HttpOnly

Have any ideas?

All the documentation for API:Login all use request which has been shut down. :(

Ciencia Al Poder (talkcontribs)

You can't grab a cookie set with a HttpOnly flag (that's what you've received) from JavaScript. This is a protection to prevent JavaScript from stealing sessions. However, the cookie will get stored on the browser automatically and be used on future request. However this will only be true if the request comes from the same domain and path.

So basically, if you run the JavaScript code on a page on the same domain as MediaWiki, it should work. If you run the JavaScript code on a page on a different domain or subdomain, it won't work.

I don't know, however, what the solution should be. Maybe implement OAuth on your application and change MediaWiki logins to login against that OAuth server (this won't make users logged-in automatically, but they can click a button to log-in without further credentials if they're already logged in in the OAuth application). That's what happens when you use "login with facebook" buttons on other websites, for example.

BensDBN (talkcontribs)

My IIS server and my Wiki Server are on the same domain. The origin is currently set to localhost as I’m busy testing, which I think is part of the issue. But how does one test when you are developing? we have 3 different levels of security on the wiki, so based on the level of security of the person logged into our SPA that is the level of sites they see in the wiki. With your alternative suggestion, would the process be I log into OAuth from my application, providing a set of credentials and then when the customer is redirected to the wiki they click on Log in and it will automatically log them in with the set of credentials I provided initially?

Ciencia Al Poder (talkcontribs)

I have never set up an OAuth system. You may need to install Extension:WSOAuth and develop a class to handle the login system. From what I understand, OAuth not only authenticates users, but also provides a list of user groups or similar, that can be equivalent to MediaWiki user groups. I don't know how easy is to integrate that with your system.

BensDBN (talkcontribs)

Hi,

I have tackled this again. I moved mediawiki to our web server. I also updated to the latest version of mediawiki which fixed the token issue. So im now using the recommended way to get the token. I have published my code to the webserver so the Orgin is exactly the same.

I added mediawiki as an application under our main site so now the url to get to the wiki is https://application.example.com/wiki

In the web.config on IIS i added Access-Control-Allow-Origin and set the orgin to https://application.example.com (an example) and on the request headers it is exactly the same.

However my response headers is still :

Set-Cookie: UseDC=master; expires=Fri, 03-Apr-2020 14:18:01 GMT; Max-Age=10; path=/; secure; HttpOnly

Set-Cookie: UseCDNCache=false; expires=Fri, 03-Apr-2020 14:18:01 GMT; Max-Age=10; path=/; secure; HttpOnly


So you can now see that it has secure but still has HttpOnly. Is there a setting that i can add in localSettings to white list a domain?

I'm not entirely sure now why its still HttpOnly.

Ciencia Al Poder (talkcontribs)

Session cookies must be HttpOnly, otherwise any script on the page could tamper with it.

If you're doing the login to MediaWiki through the application server-side (which would be desirable security-wise), you should capture the cookies in the header and then send them back to your application. That way since you have setup them as path=/ it should work.

BensDBN (talkcontribs)

The response im getting from the login request is MediaWiki API help page. Is that correct?

The response looks like this:

data: "<!DOCTYPE html>↵<html class="client-nojs" lang="en"

status: 200

headers: ƒ (name)

config: {method: "POST", transformRequest: Array(1), transformResponse: Array(1), url: "https://application.example.com/Wiki/api.php", paramSerializer: ƒ, …}

statusText: "OK"

__proto__: Object

BensDBN (talkcontribs)

I'm also looking at the cookie under application it seems to have saved the cookie correctly.

It has the wikidb_session cookie, domain is correct, path is "/", HttpOnly and Secure are ticked but SameSite isnt ticked. Does that need to be ticked in order for it to work?

Maybe the path should be "/Wiki" ?

BensDBN (talkcontribs)

Ok I dont think that return is correct because when i login through the main site manually there are 3 entries in the cookie, wikidbUserID, wikidbUserName and wikidb_session. Whereas on my login only wikidb_session is there.

Reply to "Automatic Login"

Cant see friends most of the time

2
2601:989:457E:1530:846A:F336:6236:52BB (talkcontribs)

Been having trouble seeing my friends lobby on pavlov. and dont understand why. we didnt have this trouble when we first started playing.

Bawolff (talkcontribs)

this page is only for questions about mediawiki. We cant answer questions on other topics

Downloading MediaWiki - is it right for my uses?

6
Marshallsumter (talkcontribs)

I have an iMac that runs macOS Mojave Version 10.14.6 with the 3 GHz Intel Core i5 Processor, 8 GB 2667 MHz DDR4 Memory and Radeon Pro 560X 4 GB Graphics. I've really enjoyed the way MediaWiki presents articles and resources on the various Wikimedia Foundation projects. So, I'd like to find out if I can run MediaWiki on my computer, prepare resources in the course of my research and upload them to one or more of the projects I currently contribute to when it's appropriate to put them into the Public Domain. Currently, I contribute primarily to Wikiversity but have run into a political problem that I cannot solve so I'd like to try preparing resources from home. Can you help?

AhmadF.Cheema (talkcontribs)

Wouldn't unpublished Draft articles (like Wikipedia:Drafts or in your personal userspace) work for you?

Bawolff (talkcontribs)

yes, you can setup mediawiki on your mac and your mac is more than powerful enough. See Download

There are also groups that offer mediawiki hosting (ususlly for a fee, although some like miraheze or shoutwiki are free) if you want your own private wiki but dont want to do the setup yourself.

If you run into trouble setting things up or any of the instructions are confusing dont hesitate to ask for clarification.

Marshallsumter (talkcontribs)

I've downloaded MediaWiki 1.34.1, it's self-installed, then Apache 2.4.43, which self-installed, into the same folder with MediaWiki 1.34.1, but after PHP 7.4.4 downloaded as "php-7.4.4.tar.gz.download" and Keys found GPG Keys on php Downloads states "The releases are tagged and signed in the PHP Git Repository. The following official GnuPG keys of the current PHP Release Manager can be used to verify the tags:" but the PHP: Git Access for PHP 7.4 is something called "bison" on [./Ftp://ftp.gnu.org/pub/gnu/ the GNU FTP site]. It wants to open "Finder"? Is this correct?

Bawolff (talkcontribs)

For apache and php you probably want to download a different way. I would reccomend using MAMP or brew to install them.

Marshallsumter (talkcontribs)

Okay! I have downloaded MAMP_MAMP_PRO_5.7.pkg which self-installed into my Applications folder. I've moved Mediawiki-1.34.1 into the MAMP folder. My guess for next is to download the following extensions: type, dom, fileinfo, iconv, json, mbstring, and xml. Is this correct?

Reply to "Downloading MediaWiki - is it right for my uses?"
Sokote zaman (talkcontribs)

Hi

I changed the home screen many times

But in search of a site, what it finds is history

I had tried these too


php deleteOldRevisions.php --delete

php rebuildtextindex.php

php deleteArchivedRevisions.php --delete


Can anyone solve this problem?

Thank you for your help

Malyacko (talkcontribs)

Please provide a specific example, plus always provide MediaWiki version information.

Sokote zaman (talkcontribs)
MarkAHershberger (talkcontribs)
Sokote zaman (talkcontribs)

*/1 * * * * php /home/public_html/w/maintenance/runJobs.php --memory-limit=1000M --procs 1 --maxjobs 11000 --quiet


I set it to run in the Direct Admin control panel every 1 minute


LocalSettings.php

$wgJobRunRate = 0;


MarkAHershberger (talkcontribs)

have you tried logging the output of that run to see if what happens when it is supposed to be updating the search index?

Sokote zaman (talkcontribs)

I also provide this code in the terminal:

No --quiet

php /home/public_html/w/maintenance/runJobs.php --memory-limit=1000M --procs 1 --maxjobs 11000

For example, I move text and do something that requires jab execution, I run this script manually and it shows everything well.

Reply to "Why search in history?"

Update to 1.34.1, desktop wiki loads then blank page appears

4
Summary by AhmadF.Cheema

Old JavaScript code broke the Wiki, removing it fixed the problem.

TeraS44 (talkcontribs)

Hello!

We updated our wiki from 1.28.2 to 1.34.1 today and updated all extensions as well. Afterwards the desktop page loads, then a blank screen appears. If someone looks at the page using MobileFrontEnd, they can see any wiki page, read it, edit it and so on with no issues. This problem occurs on article and special pages, it doesn't matter what page is loaded.


Mediawiki 1.34.1 PHP 7.3.11 Database MySQL 5.7.28


Wiki is located at: succubus.net/wiki


Any advice would be very, very welcome!

AhmadF.Cheema (talkcontribs)

In your browser developer tools (opened after pressing F12), your Wiki shows a JavaScript error for "mwCustomEditButtons is not defined". Probably "mwCustomEditButtons" is being incorrectly called in some JavaScript page on your Wiki (such as MediaWiki:Common.js); find it and remove it.

TeraS44 (talkcontribs)

Thank you for explaining what is happening, as I am not very well versed in MediaWiki, how does one go and try to find mwCustomEditButtons ? For that matter, how does one edit MediaWiki:Common.js if you can't edit it inside of MediaWiki?


TeraS44 (talkcontribs)

Okay, fixed the error.

First problem was that as sysop I did not have the ability to edit site js. I added the right with:

$wgGroupPermissions['sysop']['editsitejs'] = true;

In localsettings.php

editsitejs set to true for sysops.

Then I completely blanked the MediaWiki:Common.js page and saved the blank page through the Mobile page interface. On reloading the page, the wiki cleared the javascript error and the wiki has returned to normal.

That particular MediaWiki:Common.js page had been unchanged for six years and moving to 1.34.1 broke the extraedit buttons workaround that had been installed in that file.

Thank you again for pointing me in the right direction!

How to use IsFileCacheable hook

3
T0lk (talkcontribs)

Extension:AccessControl (https://github.com/wikimedia/mediawiki-extensions-AccessControl/tree/REL1_34) should probably not let rebuildFileCache.php cache pages that are supposed to be access restricted. I see Manual:Hooks/IsFileCacheable can be used.

Unfortunatey there are no examples of this hook Category:IsFileCacheable extensions, is this correct in AccessControl.hooks.php:

<?php
use MediaWiki\MediaWikiServices;
class AccessControlHooks {
        public static function isFileCacheable (&$article) {
        $matches = [];

        $text = $article->getParserOutput(
            // 0 gets the current ID
            0, // $article->mOldId,
            // Don't have a user (and hopefully shouldn't need one as just grabbing tags)
            null
        )->getRawText();

        $parser = MediaWikiServices::getInstance()->getParser();
        $parser->extractTagsAndParams(['accesscontrol'], $text, $matches);

        return !count($matches);
        }
        ...
}
MarkAHershberger (talkcontribs)
Bawolff (talkcontribs)

well at the very least it would be better to call $parser->getOutput()->setExtensionData() in the parser tag handler, and then check ->getExtensionData() inside this hook

Reply to "How to use IsFileCacheable hook"