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 日本語 中文

Forgot to backup a database before an update, now getting errors. Anything I can do?

1
Jordan DeHart (talkcontribs)

Hello!

I've been running a wiki install for about two years now and I haven't backed it up at all in those years. What I "thought" was backing it up was not, and now I'm paying the consequences of my actions. I upgraded from 1.29 to 1.31.1 and I've been getting this error whenever I tried upgrading or downgrading.

Error: 1091 Can't DROP 'ct_rc_id'; check that column/key exists (localhost)


All the solutions I found referenced using backups to fix the problem, which I cannot do. Is there anything else I can do to solve this issue? if not, I've been thinking about exporting all of my pages, making a clean install and importing the .xml file and re-uploading images manually

Edit: Not really a tech guy so I'm a bit out of my element, but if I need to post some more technical information, let me know.

Version: 7.1.14

PHP: 7.1.14

MySQL: 5.6.41-84.1

ICU: 4.2.1

LUA: 5.1.5

Reply to "Forgot to backup a database before an update, now getting errors. Anything I can do?"

Other languages: English • العربية • čeština • Esperanto • français • 日本

3
2A02:AB04:53F:2F00:5193:810A:1203:59F (talkcontribs)

I have redirected from http to https, and has stopped working url without https://www, discussing and redirecting.

When I enter redirect - https://www.example.com ... it's okay, but when I enter www.example.com or example.com, it writes an error - Invalid title - The requested page title contains invalid characters: "%C3".

This is just the case for side pages (e.g. - discussion, redirect, history ...)

Will anyone advise me? Where is the problem?

My htaccess

RewriteEngine On

RewriteCond %{HTTPS} off

RewriteRule (.*) https://www.example.com%{REQUEST_URI} [L,R=301,QSA]

RewriteRule ^/?wiki(/.*)?$ %{DOCUMENT_ROOT}/index.php [L]

RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f

RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d

RewriteRule ^/?images/thumb/[0-9a-f]/[0-9a-f][0-9a-f]/([^/]+)/([0-9]+)px-.*$ %{DOCUMENT_ROOT}/thumb.php?f=$1&width=$2 [L,QSA,B]

RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f

RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d

RewriteRule ^/?images/thumb/archive/[0-9a-f]/[0-9a-f][0-9a-f]/([^/]+)/([0-9]+)px-.*$ %{DOCUMENT_ROOT}/thumb.php?f=$1&width=$2&archived=1 [L,QSA,B]

My LocalSettings:

$wgScriptPath = "";

$wgScriptExtension = ".php";

$wgArticlePath = "/wiki/$1";

$wgUsePathInfo = true;

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

$wgServer = "https://www.example.com";

## The URL path to static resources (images, scripts, etc.)

$wgResourceBasePath = $wgScriptPath;
星耀晨曦 (talkcontribs)
2A02:AB04:53F:2F00:D9E9:CD68:CF94:C7AD (talkcontribs)

Thank you, but it still does not work, it does it only for special characters (eg, š, č, –...) and only in discussion and redirect. e.g. instead of hyphen (–) I have %25E2%2580%2593 in url. Only when I enter url without https.

Sorry for my english.


Reply to "Other languages: English • العربية • čeština • Esperanto • français • 日本"

Fatal exception of type "Error" on preview

2
Matt-at-Penman (talkcontribs)

Hello, we've just migrated the data from an old version of Mediawiki / an unsupported OS platform to MediaWIki 1.32.0 / running on PHP 7.0 on Ubuntu 16.04. The migrate was done by building a new platform, copying the SQL data (and image files) from the old system and making minimum necessary changes to the new plarform's configuration file. The data import worked fine, migration script (php /usr/share/mediawiki/maintenance/update.php) completed without error, wiki 'mostly' works. The only error is as in the subject when attempting to preview a change (or actually, preview itself, you don't need to change anything, just ask for a preview). These fail with message of the form:

[04f796e3b179a4cdf7946122] 2019-05-20 15:11:35: Fatal exception of type "Error"

with a different number in the square brackets and time stamp.

The web server (nginx 1.16.0) records error messages of the form below, one error message for each attempt to preview:

2019/05/20 15:24:06 [error] 18426#18426: *8136 FastCGI sent in stderr: "PHP message: PHP Notice:  Undefined property: CKeditorEditPage::$isCssJsSubpage in /usr/share/mediawiki/extensions/WYSIWYG-src/WYSIWYG/CKeditorEditPage.body.php on line 35" while reading response header from upstream, client: [redacted], server: [redacted].com, request: "POST /index.php?title=Category:Sysadmin&action=submit HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.0-fpm.sock:", host: "[redacted].com", referrer: "https://[redacted].com/index.php?title=Category:Sysadmin&action=edit"

where I've removed the external address of the site and the server name and replaced then with [redacted] instead.

Saving changes *without* preview works fine, the saved pages are rendered correctly. WIth preview it consistently fails with the error message.

Malyacko (talkcontribs)
Reply to "Fatal exception of type "Error" on preview"

Showing a complete table of contents (categories and pages)

1
Grmblfx5 (talkcontribs)

Hello,

on my wiki pages, I used the extension "NiceCategoryList2" to get a complete TOC on my starting page, as you can see here:

http://www.psych-med.de/wiki/index.php?title=Hauptseite

Unfortunately, the extension isn't maintained anymore, so I need an alternative after updating.

I tried "categorytree" and "DynamicPageList3" but wasn't able to get the same result (categories as headings, subpages as links).

For "DynamicPageList3" I studied the manual but didn't find a support page or forum to ask.


Can anyone tell me if or how I can get a complete table of contents on a wiki-page?


Thank you!

Reply to "Showing a complete table of contents (categories and pages)"

UploadStashFileException when uploading image in Visual Editor

1
Czech.Fox (talkcontribs)

Hello, after update to MW 1.32.1 (Windows Server 2008 R2, PHP 7.1.14, MariaDB 5.5.5-10.3.14) it is not possible to upload image through interface of Visual Editor. The dialog returns a strange error after click "Upload".


Could not store upload in the stash (UploadStashFileException): "Could not store file "D:\Wiki\Dev/App_Data/temp/chunkedupload_cb59cde85454" at "mwstore://local-backend/local-temp/2/29/20190520131613!chunkedupload_cb59cde85454.".".


However, it is possible to upload file through Special:Upload page.

Any idea ?

Thank you

Reply to "UploadStashFileException when uploading image in Visual Editor"

<div> and <span> tags around headers remove their collapsibility on the mobile skin

5
Jaywye (talkcontribs)

Is there a way around this? An example can be seen here.

I ran into this issue while attempting to create a mobile version of a page with different elements shown on desktop and mobile with the nodesktop and nomobile classes. I wanted to separate different sections with collapsed headers on mobile so that readers could expand whichever section they wanted to read, but found that the headers were not collapsible anymore.

This post was hidden by AhmadF.Cheema (history)
Jaywye (talkcontribs)

Thank you for your reply. Is there a reason why a collapsible mobile heading becomes uncollapsible when surrounded by <div>, <span>, or any other tags/attributes? https://i.imgur.com/vtznslm.png

AhmadF.Cheema (talkcontribs)

Probably a bug.

TheDJ (talkcontribs)

Such things break the section detection. (A header creates an 'implied' section, but if you start wrapping things, the implied sections no longer work and you are left with just the headings).

Reply to "<div> and <span> tags around headers remove their collapsibility on the mobile skin"
2001:4C4E:2504:9400:45DA:8D6C:784D:17D1 (talkcontribs)

Dear Wikipedia support, some years ago I was a Wikipedia editor of the Hungarian edition. I remember my user name, but changed email address several times, and I also do not remember my password.

How can I recover my user name?

TheDJ (talkcontribs)

Not in that case. Best is to create a new account.

Reply to "Forgotten email and password"

openldap (DS-389) LDAP login to mediawiki on Centos 7 platform

5
128.138.64.30 (talkcontribs)

Hi Folks,

I just created a CentOS 7 VM (release 7.6.1810) and successfully installed mediawiki. I did have to upgrade my php from 5.4 to 7.2 per the request of the software during configuration.

During the upgrade process, I was required to update php 5.4 to 7.2 and this was done successfully from the ius repository.

Per the page: Extension:LDAP Authentication/AD Configuration Examples I yum installed php72u-ldap:

[root]# !rpm

rpm -qa|grep php72u-ldap

php72u-ldap-7.2.17-1.ius.centos7.x86_64


Per the page: Special:ExtensionDistributor I downloaded the LdapAuthentication tar file and installed it using the command "tar -xzf LdapAuthentication-REL1_32-e2cab88.tar.gz -C /var/www/html/mediawiki/extensions" per instructions on the page https://www.mediawiki.org/wiki/Special:ExtensionDistributor?extdistname=LdapAuthentication&extdistversion=REL1_32


I've verified that the file /etc/php.d/20-ldap.ini has the ldap extension:

[root]# cat /etc/php.d/20-ldap.ini

; Enable ldap extension module

extension=ldap


and that the module loads:


[root]#   php -m |grep -i ldap

ldap


I've tried using the most simple LDAP configuration from the page : Extension:LdapAuth/Configuration#$wgLdapAuthMapGroups to see if I can at least hit my LDAP server.


I started a tcpdump: tcpdump port ldaps  -i ens3 -X -s 1024 and host 192.168.??.?? (edited for security) but it doesn't look like the mediawiki software ever sends a request to my server.


For my configuration in the LocalSettings.php file, I started with the following:

$wgLdapAuthServers = 'SERVER1,SERVER2,SERVER3';

$wgLdapAuthBindDN = 'MY_BIND_DN_HERE';

$wgLdapAuthBindPass = 'PASSWORD_FOR_BIND_DN';


where $wgLdapAuthServers = 'the ip of my ldap server'

$wgLdapAuthBindDN = 'cn=directory manager'

wgLdapAuthBindPass = 'my directory manager password'

I was hoping with this global/generic config, I'd at least see a reqest sent from my mediawiki server to my LDAP server but I don't see any traffic.


I should note that I did follow the page: Extension:LDAP Authentication/Requirements#Red Hat Enterprise Linux and Fedora and add certificat trusts.

I haven't been able to get the debug option to work. I can add the lines:

$wgLDAPDebug = 1;

$wgDebugLogGroups["ldap"] = "/var/tmp/debug.log"


But if I specify the variable $wgDebugLogGroups["ldap"] , the mediawiki page doesn't load.

I'm sure I'm missing the obvious but was hoping someone might be able to point me in the right direction.

Thanks,

128.138.64.30 (talkcontribs)

Update: Following the instructions on page Extension:LDAP Authentication/Examples#Example one for OpenLDAP I'm at least able to see authentication traffic on the network from the mediawiki server to my LDAP server.


I still can't get debugging working but it would be helpful to see what username/password are being sent. I don't see a username in the network traffic.

128.138.64.30 (talkcontribs)

Update: Ok.... following the info here: Topic:Tgdofnhfke1w3w7e and here: Topic:Tu037fub87bptaux, I've logged into the mediawiki using ldap.


But I'm getting the following error:


Database error

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

[XNRgSd5-o1fS5jrvAHwj4wAAAAc] 2019-05-09 17:15:53: Fatal exception of type "Wikimedia\Rdbms\DBQueryError"


Anyone ever see this before?


Osnard (talkcontribs)

Please set

$wgShowExceptionDetails = true;
$wgShowSQLErrors = true;
$wgShowDBErrorBacktrace = true;

in your LocalSettings.php and try again. You should then receive a better error message.

Btw. have you run maintenance/update.php?

128.138.64.30 (talkcontribs)

Hi, thanks!

I did both these things. I then restarted the web service and all is working. The key was running the update.php and restarting httpd.

Appreciate the help.

Abhishek1491 (talkcontribs)

I am using API below

https://commons.wikimedia.org/w/api.php?action=query&generator=search&gsrnamespace=0%7C6&gsrsearch=Cocina+La+Ley&gsrlimit=10&prop=imageinfo&format=xml&gsroffset=0

If you browse through some pages you will notice pdf files.

I tried using filetype:bitmap parameter but in case of these API calls the order of images is not the same

Without bitmap parameter - https://commons.wikimedia.org/w/api.php?action=query&generator=search&gsrnamespace=0%7C6&gsrsearch=chase+%26+status&gsrlimit=10&prop=imageinfo&format=xml&gsroffset=0

With bitmap parameter - https://commons.wikimedia.org/w/api.php?action=query&generator=search&gsrnamespace=0%7C6&gsrsearch=chase+%26+status+filetype:bitmap&gsrlimit=10&prop=imageinfo&format=xml&gsroffset=0


As you can see in both API calls order of results is not same.

I want to fetch only png and jpg files from API and also maintain the order of relevance. If not in this API kindly let me know if there is similar API.


Thanks in advance

Ciencia Al Poder (talkcontribs)

It may not be possible to do that in the api at all... In that case, the best you can do is to filter the file type on client-slide

Reply to "Fetch Only Images from API"
Patricia Vieira Campos (talkcontribs)

I am trying to change the content os the page : Prémio João de Almada. The most parte of the information there is wrong and not tell in the best way. I work in this prize, at the mayors office, so i have all the right information and i will like to chance the content of the page all.

AhmadF.Cheema (talkcontribs)

Wherever the Prémio João de Almada page is, you can go ahead and change it.👍

This support forum is concerned with the technical aspects of the MediaWiki software and not really focused on the content of some other website/Wiki.