Project:Support desk

Jump to: navigation, 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".
Jthester (talkcontribs)

I am struggling noting my references and creating citations.

AhmadF.Cheema (talkcontribs)

See Wikipedia:Tutorial/Citing sources and Help:Referencing for beginners.

2601:1C0:6600:976B:491B:8C0C:4B94:85FC (talkcontribs)

jesseyhobson@icloud

Reply to "Citations and References"

Page titles of HTML files imported via Html2Wiki

4
Bisherbas (talkcontribs)

By default, file names are the page titles. How can I extract a text from within the HTML file and make this text as the Wiki page title instead

MediaWiki v.1.30. Thanks!

Gryllida (talkcontribs)

Currently the extension does not seem to have such option.

It uses pandoc to convert html to wiki markup. Possibly the page title is simply discarded then.

https://github.com/wikimedia/mediawiki-extensions-Html2Wiki/blob/master/specials/SpecialHtml2Wiki.php#L237 suggests that mArticleTitle will be "the full value of mCollectionName (if any) plus mArticleSavePath plus the file name MINUS any extension."

I don't think the extension even bothers to parse the HTML contents. This may be possible to add to the program.

I would suggest to ask at https://www.mediawiki.org/wiki/Extension_talk:Html2Wiki instead, the extension developers and users may have this page on their watch list.

Gryllida (talkcontribs)

The project also has a phabricator page https://phabricator.wikimedia.org/project/profile/1094/ so if you add a new task there with title 'use html title for the article title' and tag it with the project name then it may be more likely to be received by the relevant people.

Bisherbas (talkcontribs)

@Gryllida Thank you!

Reply to "Page titles of HTML files imported via Html2Wiki"
Careylewise (talkcontribs)

Hi- I am a new wiki user and "determined but zero experience" to the tech world.

I am trying to change the default for a new general page such that a simple template appears.

I have read all I can find about templates- I understand how to create a template and manually insert it into a new page, which is fine when I am using the wiki, but for my contributors, manually inserting is too much to ask and I know it won't happen. Is there a way to change the default so that a template appears for new pages?

I assumed I would look for a page with code for new pages and change the code, but I can't find any pages where I can manually change the code. And I suspect that doing that would get me in trouble in that with my first update that code would be eliminated.

Thank you for your help- and very spelled out instructions would be appreciated! Being new, I don't have the intuitiveness to skip steps.

Thank you!

-Carey

Clump (talkcontribs)

You can the "preload" url-argument to specify the created page is filled in with the content of some other page. Suppose you have a template page "Template:Somepage", and you want to create page "foo" with it prefilled-in with that, you need to present a create page link:

[{{fullurle:foo|action=edit&preload=Template:Somepage}} create foo]

If you can figure out which system message is used however users normally get to a create page link (perhaps searchmenu-new) you could create that kind of link automatically for whatever name they searched for.

Reply to "Default template for new pages?"
Horus (talkcontribs)

Hello. Regarding Manual:User group CSS and Javascript, can I create CSS for anonymous users? I have tried using "user-show" as in en:w:MediaWiki:Group-user.css but it does not look like IPs are affected by it, as IPs will still see both "anonymous-show" and "user-show", while users see only "user-show." Thanks.

Reply to "Anon group CSS"
Nicole Sharp (talkcontribs)

I would like to set up a single-user private wiki but still allow public comments on talkpages. So anonymous editors cannot create accounts or new pages or upload any files, but are allowed to edit talkpages (and only talkpages) to post comments or feedback. Is there a way to set this up to restrict editing to only a single namespace? Nicole Sharp (talk) 17:21, 21 February 2018 (UTC)

Nicole Sharp (talkcontribs)

Okay, found this: Manual:Preventing access#Restrict editing of an entire namespace. But can I do the opposite, i.e. restrict editing to all namespaces except for one? Or do I have to list each namespace individually, and then the namespaces not listed are allowed for edits? Nicole Sharp (talk) 20:36, 21 February 2018 (UTC)

Nicole Sharp (talkcontribs)

I think I got it (LocalSettings.php below). But I would still like to find a way to set this up so that I can specify that only talk pages are editable, as opposed to protecting non-talk pages from edits. Not sure if that is equivalent or not, or if setting the wiki up as it is listed below introduces any risk of someone being able to edit a non-talk page. Nicole Sharp (talk) 20:37, 21 February 2018 (UTC)

$wgGroupPermissions['*']['createaccount'] = false;
# $wgGroupPermissions['*']['edit'] = false;

$wgNamespaceProtection[NS_MAIN] = 
$wgNamespaceProtection[NS_USER] = 
$wgNamespaceProtection[NS_PROJECT] = 
$wgNamespaceProtection[NS_FILE] = 
$wgNamespaceProtection[NS_IMAGE] = 
$wgNamespaceProtection[NS_MEDIAWIKI] = 
$wgNamespaceProtection[NS_TEMPLATE] = 
$wgNamespaceProtection[NS_HELP] = 
$wgNamespaceProtection[NS_CATEGORY] = 
$wgNamespaceProtection[NS_SPECIAL] = 
$wgNamespaceProtection[NS_MEDIA] = 
$wgNamespaceProtection[NS_GADGET] = 
array( 'emailconfirmed' );

(Nonworking syntax striked. Nicole Sharp (talk) 16:13, 23 February 2018 (UTC))

Nicole Sharp (talkcontribs)

Actually, the above syntax allows anyone to edit talk pages, but also blocks any edits by the admin on non-talk pages. So that doesn't work and back to square one. "Manual:Preventing access#Restrict editing of all but a few pages" mentions what I am trying to do (restrict anonymous editing to talkpages only), but I need it by namespace instead of from a manual file list which the EditSubpages Extension seems to require (which is very impractical). Nicole Sharp (talk) 23:30, 22 February 2018 (UTC)

Ciencia Al Poder (talkcontribs)

It should work if $wgGroupPermissions['*']['edit'] = false; is really commented out, and if the admin is "emailconfirmed" :)

Otherwise use "sysop" instead of "emailconfirmed".

Nicole Sharp (talkcontribs)

No, that has the same result (sysop can only edit talkpages). If I read "Manual:$wgNamespaceProtection" correctly, then that is protecting the namespace from the sysop (or the emailconfirmed user), as opposed to allowing edits by the sysop on those namespaces. I need something like:

$wgGroupPermissions['*']['createaccount'] = false;
$wgGroupPermissions['*']['edit'] = false;

$wgNamespaceUnprotection[NS_TALK] = 
$wgNamespaceUnprotection[NS_USER_TALK] = 
$wgNamespaceUnprotection[NS_PROJECT_TALK] = 
$wgNamespaceUnprotection[NS_FILE_TALK] = 
$wgNamespaceUnprotection[NS_IMAGE_TALK] = 
$wgNamespaceUnprotection[NS_MEDIAWIKI_TALK] = 
$wgNamespaceUnprotection[NS_TEMPLATE_TALK] = 
$wgNamespaceUnprotection[NS_HELP_TALK] = 
$wgNamespaceUnprotection[NS_CATEGORY_TALK] = 
$wgNamespaceUnprotection[NS_SPECIAL_TALK] = 
$wgNamespaceUnprotection[NS_MEDIA_TALK] = 
$wgNamespaceUnprotection[NS_GADGET_TALK] = 
array( 'everyone' );

That would disable editing by anyone other than the sysop by default, but then unprotect just the talkpages for anonymous edits. Nicole Sharp (talk) 14:24, 23 February 2018 (UTC)

(Nonworking syntax striked. Nicole Sharp (talk) 16:14, 23 February 2018 (UTC))

Ciencia Al Poder (talkcontribs)

Ah, true. The manual page says it clearly, though. The values you pass to $wgNamespaceUnprotection must be a right, not a user group. You should edit a new right to sysops and use it for the namespace protection.

Nicole Sharp (talkcontribs)

I got it working with the syntax below:

$wgGroupPermissions['*']['createaccount'] = false;
# $wgGroupPermissions['*']['edit'] = false;

$wgNamespaceProtection[NS_MAIN] = 
$wgNamespaceProtection[NS_USER] = 
$wgNamespaceProtection[NS_PROJECT] = 
$wgNamespaceProtection[NS_FILE] = 
$wgNamespaceProtection[NS_IMAGE] = 
$wgNamespaceProtection[NS_MEDIAWIKI] = 
$wgNamespaceProtection[NS_TEMPLATE] = 
$wgNamespaceProtection[NS_HELP] = 
$wgNamespaceProtection[NS_CATEGORY] = 
$wgNamespaceProtection[NS_SPECIAL] = 
$wgNamespaceProtection[NS_MEDIA] = 
$wgNamespaceProtection[NS_GADGET] = 
array( 'editinterface' );

However, I noticed that an anonymous spammer could still create new spam talkpages such as "talk:Buy Buy Buy Now Now Now!," instead of only being able to create talkpages for pre-existing mainspace pages. Is there a way to restrict this? I actually see this type of spam often here on MediaWiki.org (creating new discussions for nonexistent pages). Nicole Sharp (talk) 16:08, 23 February 2018 (UTC)

Ciencia Al Poder (talkcontribs)

There's no way to do this AFAIK. You'll probably need to do some custom code with a hook. But still they can create spam talk pages of legitimate pages. You should try to identify some common patterns and use Extension:AbuseFilter to prevent them.

Reply to "editing of talkpages only"
37.9.184.216 (talkcontribs)

Hey guys, I want to move a wiki from one server to another. I can start wiki in the new server, but how can i put all the pages with pictures to the new one? The function with special pages is not helping.

AhmadF.Cheema (talkcontribs)

See Manual:Moving a wiki.

Reply to "Moving a wiki"
92.50.104.154 (talkcontribs)

Updated to 1.30 today - galleries (all modes) are not showing images anymore. Thumbnails are shown as "broken image", called directly they are good to go.

Page shows a 404 error on Page "X5" on every request.

Don't know, what to do to get them to work again.

Malyacko (talkcontribs)

https://www.mediawiki.org/wiki/Manual:FAQ#%E2%80%A6are_some_of_my_images_not_showing_up_after_an_upgrade?

62.96.230.167 (talkcontribs)

Running the maintenance script (Manual:FAQ#…are some of my images not showing up after an upgrade) does not fix the issue.

We face the same problem after upgrading to 1.30: Thumbnails are shown as broken images though they are correctly rendered on server side. The developer console of chrome reveals the following error messages:

Failed parsing 'srcset' attribute value since it has an unknown descriptor.

Dropped srcset candidate "/uploads/thumb/xxx.png/450px-xxx.png"

Failed parsing 'srcset' attribute value since it has an unknown descriptor.

Dropped srcset candidate "/uploads/thumb/xxx.png/450px-xxx.png"

GET https://aaa.bbb.ccc/5x 404 (Not Found)

Is this a known bug, can anybody confirm this behaviour or is there any solution?

62.96.230.167 (talkcontribs)

Maybe this topic deals with the same issue? Topic:U7h4x03lzgbzd2qd

62.96.230.166 (talkcontribs)

The solution for our environment is described here: Topic:U7h4x03lzgbzd2qd

Reply to "No Thumbnails (in gallery)"
Vledru (talkcontribs)

Hi everyone,

After migrating my wiki 1.28 in 1.30, my pictures are no longer displayed in my pages. Instead I have a link to the image. "www-data" is the owner of my images folder with this icon (https://rlv.zcache.be/icone_cassee_dimage_dinternet_photo_sur_toile-r69551bbb568344f6868770d9048c8cf2_a0ib_8byvr_324.jpg).

Any ideas?

Thx

Ciencia Al Poder (talkcontribs)

If your wiki is public, please share a link so we can take a look at the problem.

Open a file description page (a page of the File: namespace) and click on the "view full size". If it displays an error instead of the file itself, something is misconfigured. If the error is a 404 not found, either MediaWiki is pointing to the wrong URL or your webserver has problematic rewrite rules. If error is a "forbidden" or "unauthorized", there may be problems with permissions of those files.

If it works fine, then problem may be for thumbnails.

Vledru (talkcontribs)

Thank you Ciencia Al Poder

My wiki is not public ... However, I did your tests and everything works normally. When I remove the size of my thumbnail in my wikicode [[File: example.jpg | 400px | legend]] -> [[File: example.jpg | legend]] it works perfectly ...

Really strange ^^

Ciencia Al Poder (talkcontribs)

Problem is on thumbnails, then. Use the thumb.php script (from your browser) to request a file on your wiki (with the "f" parameter) and provide a width for the thumbnail (the "w" parameter), and see what happens, if it's displayed correctly or it displays an error.

Robert.hanke (talkcontribs)

Hi,

I have the same problem. This doesn't work in my wiki:

[[File:image.png|thumb|My Image]]

this works:

[[File:image.png|frame|My Image]]

thumb.php works just fine:

thumb.php?f=image.png&w=200&h=200

My wiki is also a private wiki.

Ciencia Al Poder (talkcontribs)

Maybe you turned off Manual:$wgGenerateThumbnailOnParse?

62.96.230.167 (talkcontribs)

We face the same problem after upgrading to 1.30: Thumbnails are shown as broken images though they are correctly rendered on server side. The developer console of chrome reveals the following error messages:

Failed parsing 'srcset' attribute value since it has an unknown descriptor.

Dropped srcset candidate "/uploads/thumb/xxx.png/450px-xxx.png"

Failed parsing 'srcset' attribute value since it has an unknown descriptor.

Dropped srcset candidate "/uploads/thumb/xxx.png/450px-xxx.png"

GET https://aaa.bbb.ccc/5x 404 (Not Found)

Turning off Manual:$wgGenerateThumbnailOnParse and running maintenance script Manual:FAQ#…are some of my images not showing up after an upgrade does not fix the issue.

thumb.php works perfectly.

Maybe this thread deals with the same issue: Topic:U7m4bysmlzhqp0y1 ?

Is this a known bug, can anybody confirm this behaviour or is there any solution?

Ciencia Al Poder (talkcontribs)

Inspect the image with the developer tools of your browser (right-click and inspect this element, or hit F12 and manually select the image). If the srcset property contains commas instead of dots, the problem is the server locale and you should change it on LocalSettings.php by adding:

setlocale(LC_NUMERIC, "C");

See task T181987

62.96.230.166 (talkcontribs)

This fixed our problem, thank you!

Reply to "Problems after migrating 1.28 to 1.30"
2406:5A00:4801:6100:61CA:80BD:F908:FB0E (talkcontribs)

Hi from Christchurch After a bit of help with the RTL.

Thanks Chris

Ciencia Al Poder (talkcontribs)

Can you please elaborate?

Reply to "Hi Any help with a RTL-SDR Please?"
Jjclayborn (talkcontribs)

Hi everyone, I'm sure (reasonably) that this topic has probably come up before, but I can't seem to find it in the forum menus. I'm a writer and I've been using MediaWiki to create a custom Wiki for my book series.

I've successfully installed the latest version on my server, and I've built a basic site from it.

I've been reading up on how Wikipedia does it (which is what I've been modeling my version after since it's so well-known). They use templates (particularly of interest are the "infobox" templates) to maintain consistency.

I've managed to re-create that look by forcing a table to display there, but it's wildly inefficient. I've been trying to set it up on my server to work the same, but I'm not have any luck. I tried just going to Wikipedia and exporting their infobox templates and importing them into my Wiki so that I could modify the code to fit what I need, but that was a disaster.

Does anyone have any tips on this? Or a good resources that walks through the process? I'm pretty technically proficient, but I don't know very much about MediaWiki. Any help would be appreciated.

Thanks!

Ciencia Al Poder (talkcontribs)

See Manual:Importing Wikipedia infoboxes tutorial

Reply to "Templates and Scripts"