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".
76.182.221.117 (talkcontribs)

Can Wiki allow for those of us without perfect eyesight to have a setting for black font on white background only. Please !

Reply to "How to set font to black only"

Issues with Visual Editor / Parsoid out of the blue? curl error: 7

2
Dev67 (talkcontribs)

So I'm running mediawiki 1.30 on a raspberry pi and my Visual Editor has been working for about 5 or 6 months with no issue and all of a sudden it went bad. Now I keep getting Curl Error: 7. This did begin one day when I had a bad backup happen I think so I'm wondering if something in my parsoid directory became corrupted or something.

This is what I get when I try to run parsoid from it's directory thru putty:

root@raspberrypi:/etc/parsoid# node bin/server.js

internal/modules/cjs/loader.js:141

    throw e;

    ^

SyntaxError: Error parsing /etc/parsoid/node_modules/read-pkg-up/package.json: Unexpected number in JSON at position 2

    at JSON.parse (<anonymous>)

    at readPackage (internal/modules/cjs/loader.js:137:52)

    at tryPackage (internal/modules/cjs/loader.js:147:13)

    at Function.Module._findPath (internal/modules/cjs/loader.js:229:20)

    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:546:25)

    at Function.Module._load (internal/modules/cjs/loader.js:475:25)

    at Module.require (internal/modules/cjs/loader.js:598:17)

    at require (internal/modules/cjs/helpers.js:11:18)

    at pkgUp (/etc/parsoid/node_modules/yargs/yargs.js:493:23)

    at Object.Yargs.self._parseArgs (/etc/parsoid/node_modules/yargs/yargs.js:940:29)

    at Object.get [as argv] (/etc/parsoid/node_modules/yargs/yargs.js:930:19)

    at Master._getOptions (/etc/parsoid/node_modules/service-runner/lib/base_service.js:182:9)

    at new BaseService (/etc/parsoid/node_modules/service-runner/lib/base_service.js:29:29)

    at new Master (/etc/parsoid/node_modules/service-runner/lib/master.js:30:9)

    at new ServiceRunner (/etc/parsoid/node_modules/service-runner/service-runner.js:32:26)

    at Object.<anonymous> (/etc/parsoid/bin/server.js:6:1)

After running this command I can clearly see Parsoid is failing to run at startup too...

root@raspberrypi:~# systemctl list-units --type=service

  UNIT                                             LOAD   ACTIVE SUB     DESCRIPTION

  alsa-restore.service                             loaded active exited  Save/Restore Sound Card S

  apache2.service                                  loaded active running The Apache HTTP Server

● AutostartParsoid.service                         loaded failed failed  Parsoid Service Autostart

  avahi-daemon.service                             loaded active running Avahi mDNS/DNS-SD Stack

● bluetooth.service                                loaded failed failed  Bluetooth service

  console-setup.service                            loaded active exited  Set console font and keym

  cron.service                                     loaded active running Regular background progra

  dbus.service                                     loaded active running D-Bus System Message Bus

● dhcpcd.service                                   loaded failed failed  dhcpcd on all interfaces

  dphys-swapfile.service                           loaded active exited  LSB: Autogenerate and use

  fake-hwclock.service                             loaded active exited  Restore / save the curren

  getty@tty1.service                               loaded active running Getty on tty1

  hciuart.service                                  loaded active running Configure Bluetooth Modem

  keyboard-setup.service                           loaded active exited  Set the console keyboard

  kmod-static-nodes.service                        loaded active exited  Create list of required s

  mariadb.service                                  loaded active running MariaDB database server

  networking.service                               loaded active exited  Raise network interfaces

  ntp.service                                      loaded active running LSB: Start NTP daemon

  raspi-config.service                             loaded active exited  LSB: Switch to ondemand c

  rc-local.service                                 loaded active exited  /etc/rc.local Compatibili

  rsyslog.service                                  loaded active running System Logging Service

  ssh.service                                      loaded active running OpenBSD Secure Shell serv

lines 1-23...skipping...

  UNIT                                             LOAD   ACTIVE SUB     DESCRIPTION

  alsa-restore.service                             loaded active exited  Save/Restore Sound Card State

  apache2.service                                  loaded active running The Apache HTTP Server

● AutostartParsoid.service                         loaded failed failed  Parsoid Service Autostart

  avahi-daemon.service                             loaded active running Avahi mDNS/DNS-SD Stack

● bluetooth.service                                loaded failed failed  Bluetooth service

  console-setup.service                            loaded active exited  Set console font and keymap

  cron.service                                     loaded active running Regular background program processing daemon

  dbus.service                                     loaded active running D-Bus System Message Bus

● dhcpcd.service                                   loaded failed failed  dhcpcd on all interfaces

  dphys-swapfile.service                           loaded active exited  LSB: Autogenerate and use a swap file

  fake-hwclock.service                             loaded active exited  Restore / save the current clock

  getty@tty1.service                               loaded active running Getty on tty1

  hciuart.service                                  loaded active running Configure Bluetooth Modems connected by UART

  keyboard-setup.service                           loaded active exited  Set the console keyboard layout

  kmod-static-nodes.service                        loaded active exited  Create list of required static device nodes for the current kernel

  mariadb.service                                  loaded active running MariaDB database server

  networking.service                               loaded active exited  Raise network interfaces

  ntp.service                                      loaded active running LSB: Start NTP daemon

  raspi-config.service                             loaded active exited  LSB: Switch to ondemand cpu governor (unless shift key is pressed)

  rc-local.service                                 loaded active exited  /etc/rc.local Compatibility

  rsyslog.service                                  loaded active running System Logging Service

  ssh.service                                      loaded active running OpenBSD Secure Shell server

  systemd-fsck-root.service                        loaded active exited  File System Check on Root Device

  systemd-fsck@dev-disk-by\x2dpartuuid-9b554424\x2d01.service loaded active exited  File System Check on /dev/disk/by-partuuid/9b554424-01

  systemd-journal-flush.service                    loaded active exited  Flush Journal to Persistent Storage

  systemd-journald.service                         loaded active running Journal Service

  systemd-logind.service                           loaded active running Login Service

  systemd-modules-load.service                     loaded active exited  Load Kernel Modules

  systemd-random-seed.service                      loaded active exited  Load/Save Random Seed

  systemd-remount-fs.service                       loaded active exited  Remount Root and Kernel File Systems

  systemd-sysctl.service                           loaded active exited  Apply Kernel Variables

  systemd-tmpfiles-setup-dev.service               loaded active exited  Create Static Device Nodes in /dev

  systemd-tmpfiles-setup.service                   loaded active exited  Create Volatile Files and Directories

  systemd-udev-trigger.service                     loaded active exited  udev Coldplug all Devices

  systemd-udevd.service                            loaded active running udev Kernel Device Manager

  systemd-update-utmp.service                      loaded active exited  Update UTMP about System Boot/Shutdown

  systemd-user-sessions.service                    loaded active exited  Permit User Sessions

  triggerhappy.service                             loaded active running triggerhappy global hotkey daemon

  user@1000.service                                loaded active running User Manager for UID 1000

  vsftpd.service                                   loaded active running vsftpd FTP server

LOAD   = Reflects whether the unit definition was properly loaded.

ACTIVE = The high-level unit activation state, i.e. generalization of SUB.

SUB    = The low-level unit activation state, values depend on unit type.

40 loaded units listed. Pass --all to see loaded but inactive units, too.

To show all installed unit files use 'systemctl list-unit-files'.

~

~

~

Any thoughts? Did something automatically update like node or parsoid that threw things off or is it something else?

Thanks!

Dev67 (talkcontribs)

Heyo! Fixed =D

Wound up investigating the JSON error and finding all sorts of weird characters in that read-pkg-up JSON file. Looks like it just became corrupted or something. Ran the command below and I think it updated the package (if not every package in parsoids directory).

npm install read-pkg-up

Reply to "Issues with Visual Editor / Parsoid out of the blue? curl error: 7"

Making interwiki links the default for a page or section

2
Evolution and evolvability (talkcontribs)

Hello, In the WikiJournal sections on Wikiversity, most links are intended to point to Wikipedia (example) so have to repeatedly use the [[w:link|link]] interwikilink format rather than just [[link]]. Is there a way to make links in certain pages, or page sections point to wikipedia by default? Similarly, the list of suggested links from citoid is just within wikivversity. Is it posible to populate this list with wikipedia hits instead when editing specified pages? Thanks in advance for any ideas!

AhmadF.Cheema (talkcontribs)

Since no one answered, I think the only way to do this would be through a template, or for shorter use, the equivalent [[w:link|]] will also work.

Reply to "Making interwiki links the default for a page or section"

Problem with Umlaut after Upgrade to MW_1.31.1

7
Summary by Alfredo1066

Filezilla must be forced use utf8 as charset when communicating with server.

Alfredo1066 (talkcontribs)

Hi,

after upgrading from 1.26.3 to 1.31.1 links to files with umlauts in the filename are broken and I can't call up the file even though it is present in the images-directory.

When the link to that specific file is in a page whose name also contains an umlaut the page name is also distorted in the 404 error message. For example, an ü is shown as %C%BC.

My wiki's language is German, and the following are set in LocalSettings.php:

  • $wgShellLocale = "de_DE.utf8";
  • $wgLanguageCode = "de";

The following software is installed:

  • PHP: 7.2.10-he.0 (apache2handler)
  • MySQL: 5.6.37-82.2-log
  • ICU: 52.1

MW_1.26.3 ran with PHP 5.6 and everything worked fine.

Any ideas?

Bawolff (talkcontribs)

Its probably not relavent anymore, but older versions of php had lots of problems with this on windows, so is your server on windows?


> For example, an ü is shown as %C%BC.

This is very weird. %C3%BC is how to correctly encode a ü. I'm not sure how the 3 could be stripped. Maybe check your rewrite rules, and if you have any weird apache modules installed that do weird stuff.

If available, please post a link to your site.

Alfredo1066 (talkcontribs)

Thanks for your reply. No, the wiki is not on Windows, it runs on a unix-environment. The wiki is private, so unfortunately I can't post a link.

My feeling is that this is more of a problem with the database. In LocalSettings.php the following is set:

  • $wgDBprefix = "";
  • $wgDBTableOptions = "ENGINE=MyISAM, DEFAULT CHARSET=binary";
  • $wgDBmysql5 = false;

Collation in the database is binary except for the searchindex, where it is latin1_german2_ci.

As far as I know, latin1 is a subset of utf8, but could this inconsistency be the source of my troubles? And if so, how do I get about it?

Or is the engine (myisam) causing problems. As of MW_1.30 the default engine is now InnoDB. Should I change this too?

Bawolff (talkcontribs)

So changing the charset in a DB can cause encoding problem (Usually binary is the best, it doesn't really matter whether its binary or utf8 though, just if you convert between one or the other its easy to do it wrong and cause others. Normally though, if its a conversion isse though, usually its not quite what you describe, but would be the utf8 bytes being convertered to what the utf8 points for the latin1 code points equivalent, which isn't exactly what you describe.

But if you want to check things, you could maybe look at what img_name field in the image table and page_title in your page table in your db looks like to see if its correct.

My main guess would really be something in the webserver and/or some sort of proxy server issue.

MyISAM vs InnoDB shouldn't affect this. InnoDB is reccomended though. It has better performance under load, and its more reliable (If your computer looses power or whatever).

2001:16B8:10C2:3B00:39BB:A6CD:552A:AD56 (talkcontribs)

If the searchindex table is the only table, which is not binary, then adjusting this from latin1 to utf8 should be fairly simple:

  • You can TRUNCATE the table with this MySQL query: TRUNCATE searchindex;
  • Then convert the empty table to utf8: ALTER TABLE searchindex CONVERT TO CHARACTER SET utf8;
  • Finally run the maintenance script rebuildtextindex.php to fill it again.

(I think however that this should not influence the umlaut problem you are having.)

This post was hidden by 2001:16B8:1043:A900:DC3D:6FDA:B3D0:C503 (history)
Alfredo1066 (talkcontribs)

Thank you both for helping out.

It turned out that the problem arose because of Filezilla using the wrong charset. Once I forced Filezilla to use utf8 when communicating with my server (the wiki resides on a shared host), I was able to call up the file with the umlaut in its name. So, using utf8, I downloaded the whole of the image-directory of mw_1.26.3 and then uploaded all files into the new image-directory of mw_1.31.1.

I also cleaned the searchindex table by downloading it and then manually changing (notepad++) funny chars into umlauts. But, as you both suggested, this had no effect on the principal problem.

There is one weird behaviour still present: I get randomly logged out when editing. Initially I thought it related to the problem of this query, but not so.

Error with ImagePreview after update

4
Mattes1002 (talkcontribs)

I upgraded my Mediawiki Installation from 1.24 to 1.31.

After the update I see the message: "Fehler beim Erstellen des Vorschaubildes: Datei mit Abmessungen größer als 12,5 MP"

It means: the is an error at generating a preview image. The size of the image is larger than 12,5 MP

When I google around... the message is present in a lot of mediawiki installation around :)

An Example http://wiki.oevsv.at/index.php?title=Datei:Oe5eep_2.jpg

Could someone help me out?

Mattes1002 (talkcontribs)

I solved it!

I installed imagemagick on my Ubuntu 18 with

sudo apt install  imagemagick-6-common

and set imagemagick in the LocalSettings.php to

$wgUseImageMagick = true;

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

Alangi Derick (talkcontribs)

Glad to know that your issue was resolved! :)

Alfredo1066 (talkcontribs)

3,456 * 5,184 = 17,915,904

If on windows, use Irfanview (ctrl-R) to downsize your image.

Reply to "Error with ImagePreview after update"
79.219.164.165 (talkcontribs)

Hi,

I use the Vector skin and I have a question: How can I change the color of wiki- and external links. I can't find the right css-class...

Thank you in advance

Bryan (talkcontribs)

External links have the external class, normal wiki links don't have a class.

88.217.227.129 (talkcontribs)

So, I can't change the color of wiki links?

Reach Out to the Truth (talkcontribs)

You can. Use "a" for normal wikilinks and "a.external" for external links. Also, red links are "a.new".

Igottheconch (talkcontribs)
أحمد (talkcontribs)

How about links o different namespaces?

I know no CSS classes are used to differentiate them by default.

But does anyone recommend an extension that does this?

Reply to "Color of links"

How to create a View Only profile in Private Wiki?

5
91.153.215.72 (talkcontribs)

I set up a private Wiki, where only logged in users can view and edit pages.

Is it possible to create a generic login with view only permissions, so that more users could view the wiki with same login?

AhmadF.Cheema (talkcontribs)
91.153.215.72 (talkcontribs)

Ok, so I create a group for editors, and a group for view only, and both need to be logged in in order to view the wiki, right?

I found out that I can modify users groups one by one, but is it possible to modify more at once?

AhmadF.Cheema (talkcontribs)

Probably don't need to set up a separate group for viewing, it should be there by default.

Haven't tested it, but the following should work:

# Disable reading by anonymous users
$wgGroupPermissions['*']['read'] = false;

# Disable anonymous editing
$wgGroupPermissions['*']['edit'] = false;

# Prevent new user registrations except by sysops
$wgGroupPermissions['*']['createaccount'] = false;

# Restrict editing by all but sysop and one other user group ("editors")
$wgGroupPermissions['user']['edit'] = false;
$wgGroupPermissions['sysop']['edit'] = true;
$wgGroupPermissions['editors']['edit'] = true;

Regarding the second question, I don't think its natively possible i.e. without using some script or coding.

91.153.215.72 (talkcontribs)

Thank you, I'll try this!

Reply to "How to create a View Only profile in Private Wiki?"

passing variable dynamically to external data extention

1
83.103.62.77 (talkcontribs)

Hi,

I'm using external data extention because I need to get data from a mysql table.

I use this code:

{{#get_db_data: db=database|from=table |limit=50 |order by=alias ASC |data=c1=column }}

I would like to add a where clause like this:

{{#get_db_data: db=database|from=table|where=alias like '%{{{1}}}%' |limit=50 |order by=alias ASC |data=c1=column }}

I would like to pass the variable ID with an input box (the input box extention does not work). Is that possibile?

Reply to "passing variable dynamically to external data extention"

Internal error when trying to create an account

6
2601:182:CA01:60A2:ACA3:F5AF:BD4D:B53A (talkcontribs)

Trying to create an account for the DFO World Wiki. When I give my desired username, PW, and captcha, I get a page titled "Internal error" with this red text in a red box: https://pastebin.com/jjASywVj

Sorry for the pastebin link, wiki thinks I'm spamming if I try to put the text in my post.

Any ideas?

2601:182:CA01:60A2:ACA3:F5AF:BD4D:B53A (talkcontribs)
AhmadF.Cheema (talkcontribs)

The Extension:AntiSpoof being used on your Wiki, can you make sure that its version corresponds to your MediaWiki core's version?

2601:182:CA01:60A2:782A:17FE:644:F966 (talkcontribs)

It says the extension version is (48ed1f8) and the license is "GPL-2.0-or-later"? Does that help?

2601:182:CA01:60A2:782A:17FE:644:F966 (talkcontribs)

(this is OP i'm not sure why my mac address changed)

AhmadF.Cheema (talkcontribs)

Seems like T189560.

Try running composer update --no-dev in "../extensions/AntiSpoof/".

Reply to "Internal error when trying to create an account"

Images are not working on my Installation of MediaWiki

7
94.66.56.109 (talkcontribs)

Hi, I installed media wiki 1.31.1 on my server using Softaculous. When installation was complete and I started to set up my page, no images, including the default logo were displaying.

I removed the installation, database, and all files. I re-tried installing manually by downloading from your website, uploaded, extracted the files, set up a new database, and installation was successful. However, I am still having the same problems.

I do not understand what's going on as I've used previous versions of MediaWiki on my server and not had this problem. Can you please provide some assistance?

The URL to my wiki is https://bible.elgrandoc.uk

Malyacko (talkcontribs)
Loizbec (talkcontribs)

I have the same problem (Edited the info as it is not relevant anymore)

Loizbec (talkcontribs)
The error seems to come from the use of "srcsets". On my instance instead of generating a 1.5x src (in src set) it generates a 1,5x src, which is understood by the browser as a 1 and another set which contains 5x, etc. I tried to put my instance in English but it does not seem to solve the problem…

<img alt="Logo-rg.png" src="[myserver]/images/thumb/Logo-rg.png/64px-Logo-rg.png" srcset="[myserver]/images/thumb/Logo-rg.png/96px-Logo-rg.png 1,5x, [myserver]/images/thumb/Logo-rg.png/128px-Logo-rg.png 2x" width="64" height="64">

Loizbec (talkcontribs)
That does come from the srcsets… I have not solved it (as it should not be a problem), but I have contained the problem by setting $wgResponsiveImages = false; in LocalSettings.php. --Loizbec (talk) 18:01, 21 October 2018 (UTC)
Ciencia Al Poder (talkcontribs)
Loizbec (talkcontribs)
Thanks a lot for mentioning the insight. Now I can improve my almost “solution” to the problem :)
(a proper solution would be not having to alter the locale, to install the system).
Since it is an expected error when upgrading to 1.31, I would tend to think that it would be a good idea to point to that error in the upgrading manual as it would probably save a lot of time to some people (at least 2 only in this page would have saved hours…). It would also be useful in the installation guide, I'm not sure whether the default localsettings/installation script do that. I don't have the editing rights to modify those pages… Maybe you do know someone who does ;)
Reply to "Images are not working on my Installation of MediaWiki"