Project:Support desk

Jump to navigation Jump to search

About this board

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

There are also other places where to askCommunication: IRCCommunication#Chat, mailing listsMailing lists, Wikimedia Developer Support, Q&A, mwusers (unofficial forum) etc.

Before you post

Post a new question

  1. To help us answer your questions, please always indicate which versions you are using (reported by your wiki's Special:Version page):
    • MediaWiki
    • PHP
    • Database
  2. Please include the URL of your wiki unless you absolutely can't. It's often a lot easier for us to identify the source of the problem if we can look for ourselves.
  3. To start a new thread, click "Start a new topic".
Adithyak1997 (talkcontribs)

I have copied a scribunto module as it is from English to Malayalam Wikipedia. Unfortunately it is currently being displayed as a plain wikitext. Is there any method through which I can convert the plain text into a scrubinto module? The page I am talking to you about is Module:UserLinks/shared.

MarkAHershberger (talkcontribs)
AhmadF.Cheema (talkcontribs)

Malayalam Wikipedia is prefixed with "ml." not "ms.".

Adithyak1997 (talkcontribs)

I am sorry to inform you that with the help of an administrator, I was able to delete the existing module and create a new module.

port for postgres at initial setup ignored

10
91.245.215.230 (talkcontribs)

Hi,

I set up everything as described for mediawiki with apache2 and postgres9.4. Apache is up and running, and postgres has got a new, own db-cluster for itself (called mediawiki), listening on port 5433 and holding already the database wikidb owned by wikiuser.

Whatever I try on the initial page, that routine always connects to port 5432 instead of the manually entered one: 5433,

neither on 'host left blank' on 'localhost' on 127.0.0.1 or on ::1. In a wireshark trace I can see, that:

"Form item: "postgres_wgDBport" = "5433"

Key: postgres_wgDBport

Value: 5433"

In the log of Postgresql I see only connection to the cluster "main" listening on port: 5432. the log for the cluster on port 5433 is silent. if I turn down the "main" cluster the initial setup page reports the database is unavailable.

Supporting my focus on mediawiki is the error-message " accepting TCP/IP connections on port 5432?", despite 5433 is still in the field "Databaseport" .... Anything I could do on my own? I would be happy to have a mediwiki running...

- bullycamper

91.245.215.230 (talkcontribs)

I tried a few thing and this worked for me:

changing in maintenance.install.php and in includes/DefaultSettings.php the port both to 5433, but had later to copy the new generated LocaSettings.php by hand, since the automatic routine did not manage it (probably due to my changes).

87.123.63.88 (talkcontribs)

Do you want to open a bugreport and discuss this issue further there?

That way, the developers can think about how to fix this issue in future versions!

Ciencia Al Poder (talkcontribs)

Please do not edit DefaultSettings.php, but instead add your configuration overrides in LocaSettings.php

87.123.63.88 (talkcontribs)

During initial setup, LocalSettings.php is not yet there.

185.42.60.232 (talkcontribs)

I cant use different port but 5432, there is my LocalSettings.php configuration:

$wgDBtype = "postgres";

$wgDBserver = "127.0.0.1";

$wgDBport = 11111;

$wgDBname = "mydatabase";

$wgDBmwschema = "myscheme";

$wgDBuser = "postgres";

$wgDBpassword = "postgres";

Errors:

  • Cannot connect to database mydatabase: Cannot access the database: pg_connect(): Unable to connect to PostgreSQL server: could not connect to server: Connection refused Is the server running on host "127.0.0.1" and accepting TCP/IP connections on port 5432?
  • Cannot connect to database template1: Cannot access the database: pg_connect(): Unable to connect to PostgreSQL server: could not connect to server: Connection refused Is the server running on host "127.0.0.1" and accepting TCP/IP connections on port 5432?
  • Cannot connect to database postgres: Cannot access the database: pg_connect(): Unable to connect to PostgreSQL server: could not connect to server: Connection refused Is the server running on host "127.0.0.1" and accepting TCP/IP connections on port 5432?
Makeev95 (talkcontribs)

I solved it by creating port link:

ln -s /var/run/postgresql/.s.PGSQL.$port /path/to/wiki/.s.PGSQL.5432

LocalSettings.php configuration:

$wgDBserver = "/path/to/wiki"

$wgDBport is blank

Ciencia Al Poder (talkcontribs)

This has been apparently fixed in MediaWiki 1.29. See task T30162

Makeev95 (talkcontribs)

I use MediaWiki 1.31, and there is still issue here

Ciencia Al Poder (talkcontribs)

Please report it again on the task T30162, otherwise it will never be fixed

Reply to "port for postgres at initial setup ignored"

Save edit not now, but later (for example tomorrow)

3
Stefahn (talkcontribs)

Is it somehow possible to make edits, that are not visible to the public right away, but only later, for example tomorrow?

If you can plan edits this might be useful for SEO.

2001:16B8:10CB:E300:DC3F:B514:FF6E:93C (talkcontribs)

You mean like it is in some CMS systems? *hint*... ;-)

For MediaWiki, two things come to my mind:

  • Use a script to make the edit via the API and run it with a cron job at the desired time.
  • Use an extension like approved revisions and use a script to approve the according page at the time wanted.
Stefahn (talkcontribs)

Yes, similar to WordPress (actually I only know of a "publish later" there, not a "save edit later").

Thanks for the 2 ideas - maybe someone comes up with an easier solution...

Reply to "Save edit not now, but later (for example tomorrow)"

upgrading mediawiki when using postgresql database on non-default port

4
Jeff.janes (talkcontribs)

I'm upgrading MediaWiki from 1.20.5 to 1.21.2 (or to 1_22wmf18, same issue), backed by Postgresql database.

MediaWiki	1.20.5
PHP	5.4.5 (apache2handler)
PostgreSQL	9.2.4

I've set $wgDBport to a non-default port.

I'm using the web update method. When it prompts for the wgUpgradeKey, I enter it. I got an error that it cannot connect, and asks Is the server running on host "foobar.example.local" (127.0.0.1) and accepting TCP/IP connections on port 5432?.

Note that 5432 is the default port for PostgreSQL, but is not the port I am using.

It then asks for the upgrade key again, which I provide again. This time, it works and the upgrade completes. Why does it ignore $wgDBport the first time I enter the upgrade key, but then accepts it the second time?

That is rather confusing. Worse, it might upgrade the wrong database if one were to have multiple wikis and multiple databases.

I tried to assess the behavior when using MySQL instead of PostgreSQL, but it appears that is not possible to use MySQL on a non-default port, so this does not apply there.

MarkAHershberger (talkcontribs)

Before I attempt to reproduce this, could you tell me if you're still having this problem? (Sorry for the month+ delay).

185.42.60.232 (talkcontribs)

This is really sad that I cant use different port instead but 5432, there is my LocalSettings.php configuration:

$wgDBtype = "postgres";

$wgDBserver = "127.0.0.1";

$wgDBport = 11111;

$wgDBname = "mydatabase";

$wgDBmwschema = "myscheme";

$wgDBuser = "postgres";

$wgDBpassword = "postgres";

Errors:

  • Cannot connect to database mydatabase: Cannot access the database: pg_connect(): Unable to connect to PostgreSQL server: could not connect to server: Connection refused Is the server running on host "127.0.0.1" and accepting TCP/IP connections on port 5432?
  • Cannot connect to database template1: Cannot access the database: pg_connect(): Unable to connect to PostgreSQL server: could not connect to server: Connection refused Is the server running on host "127.0.0.1" and accepting TCP/IP connections on port 5432?
  • Cannot connect to database postgres: Cannot access the database: pg_connect(): Unable to connect to PostgreSQL server: could not connect to server: Connection refused Is the server running on host "127.0.0.1" and accepting TCP/IP connections on port 5432?
Makeev95 (talkcontribs)

I solved it by creating port link:

ln -s /var/run/postgresql/.s.PGSQL.$port /path/to/wiki/.s.PGSQL.5432

LocalSettings.php configuration:

$wgDBserver = "/path/to/wiki"

$wgDBport is blank

Reply to "upgrading mediawiki when using postgresql database on non-default port"
Naterudd (talkcontribs)

I have just upgraded to MediaWiki 1.31 (from version 1.14). My site is password protected with Google's PHP API which saves login information in the php session. When I now log into the wiki I get the following warning: "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." I know what the "hijacking" is because Google is saving things there. Is there anything I can comment out so that the login will continue even so? Since my site is already behind a password, I am not that concerned about maintaining mediawiki's security.

AhmadF.Cheema (talkcontribs)

The error might be unrelated to your customized setup, there have been more than a few changes since MediaWiki 1.14 (almost a decade ago). See Topic:T7irqyk4rhfy3ohk.

Naterudd (talkcontribs)

Unfortunately, I have already read that post and played with the $wgMainCacheType and $wgSessionCacheType variables. I have tried the permutations they have suggested and I still get the error. Is there something else I can try?

Reply to "Problem with Sessions"
Acksyn (talkcontribs)

I've been tasked to migrate a MediaWiki (1.30.0) setup, from a self-hosted Postgres database to some service offered by Azure.

In practice, the main changes from most Postgres services are that:

- we would need to login using an username that includes a domain part (eg: myuser@mypostgresdomain), and have installer working with such database username

- we would need to enable postgres' SSL option, and have installer allow for switching it on

As of right now, I managed to get it working, although my patch isn't PR material, my customer won't leave me more time on that matter/fixed as far as he's concerned, ...

https://gist.github.com/faust64/c5f8e73aefe442d100f229fa4f62c9ae

Still going through How to contribute, although I'm not interested in becoming a contributor, ...

Is there anyone that could take over?

Thanks!

MarkAHershberger (talkcontribs)

Thanks for the patch! It would be awesome to get you to become a contributor....

Is there a reason to use the envvar PGSSL instead of setting $wgDBssl? That seems like a local modification and not something that should be incorrporated.

Acksyn (talkcontribs)

AFAIU, the wgDBssl can't be toggled from installer, or I didn't see an option that would allow me to do so. Adding an env vars was a quick way to do it, but definitely not the best.

MarkAHershberger (talkcontribs)

Hmm... and the manual says

CREATE USER is now an alias for CREATE ROLE. The only difference is that when the command is spelled CREATE USER, LOGIN is assumed by default, whereas NOLOGIN is assumed when the command is spelled CREATE ROLE.
Acksyn (talkcontribs)

From what I've seen, although Azure provides us with a username formatted such as `username@domain`, postgres roles listing doesn't mention that domain part - looks like it's only used during login.

MarkAHershberger (talkcontribs)

I'm tried setting up an Azure PostgreSQL account yesterday and didn't get a username with an @. Which PG service did you use?

Acksyn (talkcontribs)
Bawolff (talkcontribs)

Maybe its using something like kerberos?

Acksyn (talkcontribs)

Unclear, could be. Being Microsoft, AD integration's probably not far away.

.

Bawolff (talkcontribs)

Cool. Thanks for the patch.

To get it merged into mediawiki we would probably have to:

  • Drop the environment variable. If it needs to be triggered from installer, installer should add a checkbox
  • We'd need a link to the docs explaining exactly what the @ sign means to postgres. Given its stripped out in most places, maybe it should be set in a different variable instead of the username or something.

(Also ping User:Anomie as someone familiar with postgres)

Reply to "Azure Postgres support"
Quinnj09 (talkcontribs)
AhmadF.Cheema (talkcontribs)

Extension:PreToClip appears to work for <pre></pre> tags, maybe just a few changes will make it work for <syntaxhighlight></syntaxhighlight> tags too.

However, it uses Flash, which might be a deal breaker for a lot of people.

This post was hidden by Quinnj09 (history)
MarkAHershberger (talkcontribs)

Here is a pure js solution, but you'll have to do some coding: clipboard.js

Flash is horrible and you should avoid it.

Reply to "Extension to Copy Code Block"

Malicious slander & wrongful information within Wiki pages

2
2001:8003:6A61:8100:ACF0:B98C:A6DE:A3CF (talkcontribs)

Hi Wiki team,

I've reviewed a few pages dealing with some natural health sites and political groups. There appear to be issues with content created by opposing interest groups which aim to slander, defame and subvert such sites and groups. One can find stories and information which are slanderous contained on sites and in articles which oppose natural health sites and political groups. For instance, Monsanto and Bayer have created a budget of approximately one billion dollars to defame and subvert those who expose the toxic nature of some of their chemicals and the serious negative effects of agricultural and other chemicals and GMOs, studies which were suppressed or buried in scientific literature and which show growth of tumours in rats and fertility issues in second and third generation, yet those products were approved by the EPA and by the FDA and released on the market and currently in circulation within most parts of the world, causing illness and fertility issues. People must know what they're eating, labeling of products is a must. Further, soil which has been used for growth of GMOs and doused with some chemicals undergoes fundamental changes and the biodiversity mutates and changes. Such practices harm not only the people who eat such crops but soil biology, water and future fertility of the soil. In any case, such companies attempt to discredit those who simply bring studies and information to the public which such companies attempt to suppress or have previously deleted. Their actions are criminal. Though, you have a choice. Don't let these awful people slander and harm sites which promote wholesome living. Natural News site isn't fake news. Whoever has written that content is slandering the site & would have links to Corporations or political groups which aim to harm that site. The content of that web page is inaccurate and defamatory. Please ensure that people who write content aren't doing so to harm others. In the case of whoever wrote the web page for Natural News, the author is causing harm. It's not pseudoscience on NaturalNews, articles reference scientific journals of various disciplines, which public peer reviewed papers. Same journals which are used by tertiary students and researchers in those fields. Some articles are opinion, though opinion articles shouldn't be described as fake news, then you would need to describe most of USA's media as fake news, incl CNN, MSNBC, Disney and others. Can you please check who is writing information and prevent such cases of malicious slander and wrongful defamation?

Thank you & Regards

Concerned Reader PhD

Malyacko (talkcontribs)

Which website is this about?

mediawiki.org does not host pages about natural health sites and political groups (if mediawiki.org does then these pages are out of scope. It is up to each website which information they host or not. Feel free to contact the website that you refer to.

Reply to "Malicious slander & wrongful information within Wiki pages"
Quinnj09 (talkcontribs)

I cannot get pygmentize for Extension:SyntaxHighlight to work, in mediawiki debug log I get:

[exec] Error running "c:\Python27\Scripts\pygmentize.exe" "-l" "sql" "-f" "html" "-O" "cssclass=mw-highlight,encoding=utf-8": 'c:\Python27\Scripts\pygmentize.exe" "-l" "sql" "-f" "html" "-O" "cssclass' is not recognized as an internal or external command, operable program or batch file.

Has anyone got any suggestions for next steps?

MarkAHershberger (talkcontribs)

Does running the command from your command prompt work?

In other words, what happens when you copy and paste the the following to a prompt?

c:\Python27\Scripts\pygmentize.exe -l sql -f html -O cssclass=mw-highlight,encoding=utf-8
Reply to "pygmentize not working"
Quinnj09 (talkcontribs)

I think this issue is the encoding? feel free to educate me...

The URL is showing up as: http://mysite/wiki/Category%3AMyGames

When it should be: http://mysite/wiki/Category:MyGames

How can I fix this?

I am running mediawiki 1.31.0

MarkAHershberger (talkcontribs)

This wiki (mediawiki.org) doesn't have URLS like that, so, yeah, probably something with encoding.

It looks like you are using "pretty" URLs. What webserver are you using and how is it set up?

Reply to "URL Decoding issue"