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

Internal link to specific page of PDF

2
Jonathan3 (talkcontribs)

Is this possible, or is it only possible as an external link like [http://www.mywiki.com/pdfname.pdf#page=2]? Thanks.

Bawolff (talkcontribs)

[[Media:Example.pdf#page=2]] should work if you have $wgFragmentMode set to html5 (not the default)

Reply to "Internal link to specific page of PDF"
194.74.17.228 (talkcontribs)

I'm currently receiving the following error on a fresh install of media wiki. I've not seen this before so any help would be greatly appreciated.


[XlUxDInaLdpKzzb5@CIEigAAACI] /mw-config/index.php?page=Install Wikimedia\Rdbms\DBQueryError from line 1603 of /home/vol1000_5/epizy.com/epiz_25226591/htdocs/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: CREATE TABLE `wikiuser` (

user_id int unsigned NOT NULL PRIMARY KEY AUTO_INCREMENT,

user_name varchar(255) binary NOT NULL default '',

user_real_name varchar(255) binary NOT NULL default '',

user_password tinyblob NOT NULL,

user_newpassword tinyblob NOT NULL,

user_newpass_time binary(14),

user_email tinytext NOT NULL,

user_touched binary(14) NOT NULL default '',

user_token binary(32) NOT NULL default '',

user_email_authenticated binary(14),

user_email_token binary(32),

user_email_token_expires binary(14),

user_registration binary(14),

user_editcount int,

user_password_expires varbinary(14) DEFAULT NULL

) ENGINE=, DEFAULT CHARSET=binary

Function: Wikimedia\Rdbms\Database::sourceFile( /home/vol1000_5/epizy.com/epiz_25226591/htdocs/maintenance/tables.sql )

Error: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' DEFAULT CHARSET=binary' at line 17 (sql308.epizy.com)

Backtrace:

#0 /home/vol1000_5/epizy.com/epiz_25226591/htdocs/includes/libs/rdbms/database/Database.php(1574): Wikimedia\Rdbms\Database->getQueryExceptionAndLog(string, integer, string, string)

#1 /home/vol1000_5/epizy.com/epiz_25226591/htdocs/includes/libs/rdbms/database/Database.php(1152): Wikimedia\Rdbms\Database->reportQueryError(string, integer, string, string, boolean)

#2 /home/vol1000_5/epizy.com/epiz_25226591/htdocs/includes/libs/rdbms/database/Database.php(4539): Wikimedia\Rdbms\Database->query(string, string)

#3 /home/vol1000_5/epizy.com/epiz_25226591/htdocs/includes/libs/rdbms/database/Database.php(4474): Wikimedia\Rdbms\Database->sourceStream(resource (closed), NULL, NULL, string, NULL)

#4 /home/vol1000_5/epizy.com/epiz_25226591/htdocs/includes/installer/DatabaseInstaller.php(228): Wikimedia\Rdbms\Database->sourceFile(string)

#5 /home/vol1000_5/epizy.com/epiz_25226591/htdocs/includes/installer/DatabaseInstaller.php(251): DatabaseInstaller->stepApplySourceFile(string, string, boolean)

#6 /home/vol1000_5/epizy.com/epiz_25226591/htdocs/includes/installer/Installer.php(1624): DatabaseInstaller->createTables(MysqlInstaller)

#7 /home/vol1000_5/epizy.com/epiz_25226591/htdocs/includes/installer/WebInstallerInstall.php(44): Installer->performInstallation(array, array)

#8 /home/vol1000_5/epizy.com/epiz_25226591/htdocs/includes/installer/WebInstaller.php(270): WebInstallerInstall->execute()

#9 /home/vol1000_5/epizy.com/epiz_25226591/htdocs/mw-config/index.php(80): WebInstaller->execute(array)

#10 /home/vol1000_5/epizy.com/epiz_25226591/htdocs/mw-config/index.php(38): wfInstallerMain()

#11 {main}

SSethi (WMF) (talkcontribs)

Hi! Did you run Update.php? Also, which version of MediaWiki you are trying to install?

Bawolff (talkcontribs)

What is $wgDBTableOptions set to? I think it's set to something wrong. It should be something like $wgDBTableOptions = "ENGINE=InnoDB, DEFAULT CHARSET=binary";

Bawolff (talkcontribs)

Wait, this is in the installer. This would probably indicate _MysqlEngine is set to the empty string. I'm not sure how that could happen. Are you using the normal installer? Did you get MediaWiki from the official site?

Can you do the SQL query SHOW ENGINES; and tell us the results?

During the installer, on the MySQL settings step, what did you select for Storage engine: option?

Sam1370 (talkcontribs)

I am also having this issue while attempting to install MediaWiki 1.35 from GitHub.

Reply to "Install error"

How to give <ref> a name when called through a template, but without Lua/Scribunto?

12
182.232.40.56 (talkcontribs)

I use this template to create a footnotes chapter:

<includeonly><references /></includeonly><noinclude>

[[קטגוריה:תבניות]]
</noinclude>

I use this template to create each footnote:

<includeonly><ref>{{{1}}}</ref></includeonly><noinclude>

[[קטגוריה:תבניות]]
</noinclude>

So, to create a footnote I type:

{{הערה|תוכן}}

But I want to use something like:

{{הערה|שם|תוכן}}

While שם stands for name (HTML attribute);


How to give <ref> a name when called through a template, but without Lua/Scribunto?

182.232.40.56 (talkcontribs)

The second template should be:

<includeonly>{{#tag:ref|{{{1}}}}}</includeonly><noinclude>

[[קטגוריה:תבניות]]
</noinclude>
AhmadF.Cheema (talkcontribs)
182.232.44.48 (talkcontribs)

@AhmadF.Cheema I have read there cautiously but I didn't find any explanation about how to make name at:

<includeonly>{{#tag:ref|{{{1}}}|name="name"}}</includeonly><noinclude>
[[קטגוריה:תבניות]]
</noinclude>

To be equal with שם in template call, so that, instead:

{{הערה|תוכן|name="שם"}}

I could call the template this way:

{{הערה|שם="שם"|תוכן|}}

So maybe a more accurate version of my question is:

How to give <ref> a name in a non-English language when called through a template, but without Lua/Scribunto?

182.232.44.48 (talkcontribs)

Crap, I had to write there:

<includeonly>{{#tag:ref|{{{1}}}|name}}</includeonly><noinclude>
[[קטגוריה:תבניות]]
</noinclude>

I think.

AhmadF.Cheema (talkcontribs)

The template should be:

<includeonly>{{#tag:ref|{{{1}}}|name={{{2}}}}}</includeonly><noinclude>
[[קטגוריה:תבניות]]
</noinclude>

Then it should be called in the article as: {{Template_name|foo|bar}}, where foo is the reference text and bar is the name of the reference. The reference can then be reused with the following code: <ref name=bar/>

49.230.0.242 (talkcontribs)

I was told by Hebrew Wikipedia users that there could be a problem if my template includes text which by itself includes = symbol and I was recommended to use:

{{#tag:ref
    | 1 = {{{תוכן|}}}
    | name = {{{שם|}}}
}}
49.230.0.242 (talkcontribs)

But, that example doesn't work (or I have to change all template calls for it to work).

AhmadF.Cheema (talkcontribs)

This way the template should be called in the article as: {{Template_name|תוכן=foo|שם=bar}}.

49.230.0.242 (talkcontribs)

When calling that template with:

{{הערה|שם="שם"|תוכן="תוכן"}}

I get this Hebrew error:

שגיאת ציטוט: תג <ref> לא תקין; שמות שגויים, למשל, רבים מדי

49.230.0.242 (talkcontribs)

I get the same error with these calls also:

{{הערה|תוכן}}
{{הערה|תוכן="תוכן"}}
49.230.0.242 (talkcontribs)

@AhmadF.Cheema I think I should use your original template like this:

<includeonly>{{#tag:ref|name|{{{1}}}}}</includeonly><noinclude>

[[קטגוריה:תבניות]]
</noinclude>

And, in cases that the CONTENT includes one equal sign or two or more equal signs, than I should input these not as mere text but via a {{=}} template whose value is = and then use that template as in:

{{ Test | R {{=}} 3/(2-(1+1)) }} 

This is a solution I found in a quick search in StackOverflow at "Passing an equal sign ('=') to a parameter in a MediaWiki template".

But:

I am still in problem how to use "שם="שם instead name="name" so to get an all Hebrew (all RTL) template.

Sorry if I missed anything; this is tough and confusing to me.

Reply to "How to give <ref> a name when called through a template, but without Lua/Scribunto?"

Sometimes I can change direction with CTRL+Shift and sometimes I cannot. Why?

3
49.230.0.242 (talkcontribs)

In an Hebrew 1.34.0 MediaWiki website I often need to edit webpages LTR instead RTL (common with template pages); in that case I click Ctrl+ Shift to change the direction of all text (at edit mode, of course) from right to left.

Most often clicking Ctrl+ Shift works fine, but sometimes it doesn't, and I don't know why.

I usually use Google Chrome (latest, automatically updated) to do my edit.

Why sometimes the RTL to LTR "flipping" (in edit mode) works and sometimes it doesn't?

AhmadF.Cheema (talkcontribs)
49.230.0.242 (talkcontribs)

Both didn't work for me, this is most likely a bug;

I overcome it by editing in a plain-text editor and copy-pasting back to MediaWiki.

Because I understood reporting bugs requires registering and ideologically I abstain from registering to websites, I abstain to report this problem as a bug,

Kindly,

Reply to "Sometimes I can change direction with CTRL+Shift and sometimes I cannot. Why?"
Staubi DD (talkcontribs)

Hi, I got the third wiki page started.

wiki #1 and #2 are working fine, but #3 do not show pics at all.

I set the wiki to https ($wgserver), installed SSL, php is 7.2 .. all the same.

Getting crazy!

Any ideas?

Thanks

MarkAHershberger (talkcontribs)

We need some details in order to help you. Can you like to your wiki?

Staubi DD (talkcontribs)
Staubi DD (talkcontribs)
Staubi DD (talkcontribs)
Malyacko (talkcontribs)

The error message is pretty clear? "Server unable to read htaccess file"

Staubi DD (talkcontribs)

Thanks for the info.

Any idea why this occurs?

I got the htaccess file in image folder, and it's content is exactly the same as in the german wikis:


# Protect against bug T30235

<IfModule rewrite_module>

RewriteEngine On

RewriteOptions inherit

RewriteCond %{QUERY_STRING} \.[^\\/:*?\x22<>|%]+(#|\?|$) [nocase]

RewriteRule . - [forbidden]

# Fix for bug T64289

Options +FollowSymLinks

</IfModule>

Majavah (talkcontribs)

@Staubi DD Is the web server user (usually www-data) have permissions to read the .htaccess file?

Staubi DD (talkcontribs)

@Majavah sorry, I do not know exactly what you mean or how I may check this.

What I do not understand, I've just created a 3. wiki at the same server. Only 3 years after the dirst 2 ones, difference is only the ".com" instead of ".de"

Majavah (talkcontribs)

This depends on your server's operating system and software. What OS are you using?

Reply to "No Pics in wiki"

Listing all red links from articles in a category

2
Vicarage (talkcontribs)

I want to focus on fixing red links (wanted pages) within articles within a particular category, but can't find a way of listing them. Special/Wanted Pages is for the site as a whole, and while there is an extension, it only allows you to select by namespace. DPL does not have suitable options. Export by category would export the text before rending the red-link part.

Is there any other way of doing it?

Vicarage (talkcontribs)

I came up with this incredibly ugly solution

python pwb.py listpages -cat:UK -cat:Convention -cat:Filk -intersect -format:"{page.title}" > uk-filk-convention.txt
while read -r LINE; do  
  echo $LINE: $(wget -q -O - http://fancyclopedia.org/"$LINE" | grep -v '=Talk' | grep 'does not exist' | sed -Ee 's`(.*)title="([^\(]*)\(page does not exist.*`\2`') 
done < uk-filk-convention.txt

But I'm ashamed to post it here!

Reply to "Listing all red links from articles in a category"

Did you forget to run your application's database schema updater after up

6
151.177.171.222 (talkcontribs)

Hello


I am trying to update my mediawiki to 1.33.0 but i get stuck at the error bello, ca someone help me get past this please ?


[51100210b20d6e90dd271609] [no req]   Wikimedia\Rdbms\DBQueryError from line 1587 of /home/student/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  ar_id,ar_comment  FROM `archive`    WHERE ar_comment_id = '0' AND (1=1)  ORDER BY ar_id LIMIT 100

Function: MigrateComments::migrate

Error: 1054 Unknown column 'ar_comment_id' in 'where clause' (localhost)

Backtrace:

#0 /home/student/public_html/includes/libs/rdbms/database/Database.php(1556): Wikimedia\Rdbms\Database->getQueryExceptionAndLog(string, integer, string, string)

#1 /home/student/public_html/includes/libs/rdbms/database/Database.php(1274): Wikimedia\Rdbms\Database->reportQueryError(string, integer, string, string, boolean)

#2 /home/student/public_html/includes/libs/rdbms/database/Database.php(1784): Wikimedia\Rdbms\Database->query(string, string)

#3 /home/student/public_html/maintenance/migrateComments.php(159): Wikimedia\Rdbms\Database->select(string, array, array, string, array)

#4 /home/student/public_html/maintenance/migrateComments.php(53): MigrateComments->migrate(string, array, string)

#5 /home/student/public_html/maintenance/Maintenance.php(1719): MigrateComments->doDBUpdates()

#6 /home/student/public_html/includes/installer/DatabaseUpdater.php(1279): LoggedUpdateMaintenance->execute()

#7 /home/student/public_html/includes/installer/DatabaseUpdater.php(489): DatabaseUpdater->migrateComments()

#8 /home/student/public_html/includes/installer/DatabaseUpdater.php(453): DatabaseUpdater->runUpdates(array, boolean)

#9 /home/student/public_html/maintenance/update.php(203): DatabaseUpdater->doUpdates(array)

#10 /home/student/public_html/maintenance/doMaintenance.php(96): UpdateMediaWiki->execute()

#11 /home/student/public_html/maintenance/update.php(266): require_once(string)

#12 {main}
Wargo (talkcontribs)
151.177.171.222 (talkcontribs)

yes, i did "phph update.php" from the SSH command line.

Wargo (talkcontribs)
Ciencia Al Poder (talkcontribs)
47.31.119.123 (talkcontribs)

go to the ext. dir. and see the folder sql, go to phpmyadmin and manually create the table from sql. terminal .

Reply to "Did you forget to run your application's database schema updater after up"

Error 403 / Htacess / Weird Editing Errors

4
108.52.123.104 (talkcontribs)

While trying to update an outdated installation that wouldn't automatically update, my mediawiki began throwing back this error


Forbidden

You don't have permission to access this resource.Server unable to read htaccess file, denying access to be safe

Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.


I then attempted to restore from backups. It repeatedly threw up the aforementioned error.

When I restored my whole website from a backup, it returned to working order yet I began getting the following error when I attempted to edit pages (I'd been getting the error before trying the update too). The error that began displaying was after I hit submit on any edit and was [Xq0KYja5Y9pvbbDdFIqrFQAAANY] 2020-05-02 05:51:30: Fatal exception of type "Error"

Majavah (talkcontribs)

The error message suggests that your web server can't read any files. Can the web server user (usually www-data) access the MediaWiki files?

108.52.123.104 (talkcontribs)

Yes, I previously have had no problems with it until I attempted to do updates. And I restored from backups (slowly worked my way backwards to a backup from December 2019) at which point all error messages ceased. Between December and this week there were zero changes.

Majavah (talkcontribs)

Are there any errors on the web server logs (usually /var/log/apache2/error.log for apache or /var/log/nginx/error.log for nginx)?

Reply to "Error 403 / Htacess / Weird Editing Errors"

How I can replace this code?

6
Summary by Majavah

Solved using Extension:Widgets

Goku D (talkcontribs)

Hello I am in a project (MediaWiki 1.33.1) and I want to know how I can replace this code that was in the Template:Advertising

<addhtml>

<script type="text/javascript">

</script>

<script type="text/javascript"

src="http://pagead2.googlesyndication.com/pagead/show_ads.js">

</script>

</addhtml>

because AddHTML has been unmaintained for years and I am rebuilding an old wiki.

(I can't speak english i use google translate)

Majavah (talkcontribs)

Extension:AddHTML which adds <addhtml>...</addhtml> has been unmaintained for years and was archived in 2016.

Goku D (talkcontribs)

@Majavah Exactly the question is, with what can I replace the code?

Malyacko (talkcontribs)
Bawolff (talkcontribs)
Goku D (talkcontribs)

Collapsible p-personal in Vector

1
2001:16B8:6006:4300:5978:3FA8:1621:D3E7 (talkcontribs)

Hey there! :)

I'm using the Vector skin on my wiki - I would use the Timeless skin (I like it more), but it doesn't have the collapsible sidebar which I also want to have. I think I can edit most of the layout with CSS to make it look like I want it to be.

But there's one thing I really can't stand on Vector and I don't know how to edit that: The p-personal in the top right corner of the page. I would love it if it's possible to have it look like on Timeless (where it's called user-tools, I think). Is there some way to make the p-personal collapsible? So that everything in the top right corner is in a dropdown menu. If so, how do I accomplish it?


Thank for the help in advance! :)

Reply to "Collapsible p-personal in Vector"