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.
 

Request resultsets programmatically from wiki tools.

3
Ramu ummadishetty (talkcontribs)
Format
https://quarry.wmflabs.org/run/query_run_ID/output/run_number/<format>
Example
https://quarry.wmflabs.org/run/1534/output/0/json

Using https://quarry.wmflabs.org/ we can query and get result but in order to request resultsets programmatically we need query_run_ID . This query_run_ID doesn't give live feeds from wiki . Every time we need to submit the query and need to change this query_run_ID in order to get live stats.

https://quarry.wmflabs.org/query/45632

https://quarry.wmflabs.org/run/473069/output/0/json

Is there any other alternative way?

Bawolff (talkcontribs)

create an actual toolforge tool. Requires programming knowledge. See docs in wikitech.

2A03:2880:20FF:F:0:0:FACE:B00C (talkcontribs)

Create a new web

Reply to "Request resultsets programmatically from wiki tools."

How to find users to join my wiki project?

2
Fokebox (talkcontribs)

Hello dear users. I have multilingual wiki website, but don‘t know how to find users and built the community. Please advice how to do it. Thx

Malyacko (talkcontribs)

Finding users and building a community (=social) is not directly related to the actual underlying software that your website is running (=technical). Hence you will need to ask in a community building forum.

Reply to "How to find users to join my wiki project?"

Last picture not displaying

2
Triton (talkcontribs)

Hello! The last picture I had on commons doesn't display (here: http://wiki.lokal-life.org/index.php?title=R%C3%A9seau_d%27eau_potable_de_Schoelcher) . I checked the name several times so I don't really get it. The only issue I see is that I may have created the page on the wiki with on the link for the picture BEFORE I uploaded the picture itself on Commons. I tought it was only some cookie issue but apparently not?

Do you have any idea apart from uploading it again on another name? Thanks!

Bawolff (talkcontribs)

you have to purge the page (add &action=purge to end of url) to clear cache. Commons only keeps track of image usages on wikimedia sites so there is no process to automstically refresh pages when the image changes outside wikimedia wikis (sort of. There are several types of caches. Its complicated. Certain changes will be instant)

Reply to "Last picture not displaying"

Does it possible to Query the given questions below?

5
Ramu ummadishetty (talkcontribs)
What is the total number of orphan articles on Wikipedia?
What is the total number of dead-end articles on Wikipedia?
What is the total number of articles on Wikipedia that have at least one media element (picture or video)?
What is the total number of articles on Wikipedia that have more than one media element (picture or video)?
What is the total number of articles on Wikipedia that have infoboxes?
What is the total number of articles on Wikipedia that links to (or powered/controlled by) Wiki data?
What is the total number of Wikidata Items connected to articles on Wikipedia
What is the total number of articles on Wikipedia that are marked as stubs?
What is the Average edits per page
What is the total number of articles on Telugu Wikipedia that are marked as featured articles?

using https://quarry.wmflabs.org/ .

Bawolff (talkcontribs)

yes for all of these, however for some of these you can only do the query for one specific language edition of wikipedia.

That said, actually making the queries is a lot of work. Some of the queries would likely timeout before giving sn answer on large languages. They might be runnable via toolforge shell but not quarry web frontend.

Ramu ummadishetty (talkcontribs)

I don't have any idea for above queries like which tables to use in database... Can I get one example using toolforge shell ? coz i never used it . Can it possible to fetch using API's?

This post was hidden by Ramu ummadishetty (history)
Bawolff (talkcontribs)

most of these would use page, pagelinks, page_props, and templatelinks. Some would use others.

Reply to "Does it possible to Query the given questions below?"

How to link to a page named <ref>

2
182.232.4.49 (talkcontribs)

In an RTL (Hebrew) principally all core MediaWiki 1.34.0 website I try to create the following internal (MediaWiki) link, inside an article:

[[תגי <ref>]]

It appears as plain text rather than a blue link; why?

Bawolff (talkcontribs)

< and > are not allowed to be used in page name titles. You can use look alike characters like ⟨

Reply to "How to link to a page named <ref>"

[RESOLVED] Problem With Images Showing Broken If Large

5
Z3ther (talkcontribs)

I'm having issues with my own wiki running 1.19 on dreamhost, in that all my images if I upload a large size and then scale it down end up showing nothing but the broken image icon in the area that I've scaled it at. If I upload the full size and use that however, it shows up fine. Anyone else having this problem or know where I can look for a solution? Here's an example of one of the 1920x1080 images being scaled down to 800 x 450 pixels.

88.130.85.104 (talkcontribs)

Hi!

It seems like thumbnails of your images are not being generated.

I can access the original files inside the folder images/, but not the thumbnails. Instead, MediaWiki kicks in and serves a wiki page (most probably because the thumbnails have not been generated and so are not present in the file system).

You can now try the hints on Manual:How_to_debug. Especially it would be helpful to know what you get in the debug log when you call such a page, where MediaWiki does not show thumbnails. Debug log will contain some lines for each images, which MediaWiki is trying to generate/show. That is what would help now!

Z3ther (talkcontribs)

YES! I LOVE YOU!

This was it, thumbnails weren't being generated, I found that in my localsettings.php my $wgGenerateThumbnailOnParse was "truue" instead of true, so silly spelling error messed me up. You are the best thing that has happened to me today. Thank you very much.

88.130.85.104 (talkcontribs)

And that on the day of my birthday! :-)

Moscowdreams (talkcontribs)

I found if the resized image is only a link, I changed

$wgGenerateThumbnailOnParse = true;

in LocalSettings.php

and this fixed the problem

I can't reduce the size of images

3
Joaogsdc (talkcontribs)

When I set a reduced size to its original size, a broken image is displayed. What could be causing this?

This problem is present if I use the gallery or a size in the file (File: example.png | 120px)


Already used:

$wgUploadPath

$wgUploadDirectory

$wgEnableUploads

$wgUseImageMagick

$wgImageMagickConvertCommand

$wgHashedUploadDirectory

Malyacko (talkcontribs)
Moscowdreams (talkcontribs)

I found if the resized image is only a link, with no picture/image, I changed

$wgGenerateThumbnailOnParse = true;

in LocalSettings.php

and this fixed the problem

Error on Echo after installation

8
WikiGamee (talkcontribs)

Hey there,

I recently installed echo extension on my wiki and I get error like this:

[XtnxGA5HlhkDk-tPralCPwAAABI] /wiki/Main_Page MWException from line 588 of /home/vol5_4/epizy.com/epiz_25902755/htdocs/wiki/includes/cache/localisation/LocalisationCache.php: LocalisationCache::readJSONFile: Invalid JSON file: /home/vol5_4/epizy.com/epiz_25902755/htdocs/wiki/extensions/Echo/i18n/hi.json

Backtrace:

#0 /home/vol5_4/epizy.com/epiz_25902755/htdocs/wiki/includes/cache/localisation/LocalisationCache.php(918): LocalisationCache->readJSONFile(string)

#1 /home/vol5_4/epizy.com/epiz_25902755/htdocs/wiki/includes/cache/localisation/LocalisationCache.php(489): LocalisationCache->recache(string)

#2 /home/vol5_4/epizy.com/epiz_25902755/htdocs/wiki/includes/cache/localisation/LocalisationCache.php(363): LocalisationCache->initLanguage(string)

#3 /home/vol5_4/epizy.com/epiz_25902755/htdocs/wiki/includes/cache/localisation/LocalisationCache.php(304): LocalisationCache->loadItem(string, string)

#4 /home/vol5_4/epizy.com/epiz_25902755/htdocs/wiki/languages/Language.php(4413): LocalisationCache->getItem(string, string)

#5 /home/vol5_4/epizy.com/epiz_25902755/htdocs/wiki/languages/Language.php(265): Language::getFallbacksFor(string)

#6 /home/vol5_4/epizy.com/epiz_25902755/htdocs/wiki/languages/Language.php(225): Language::newFromCode(string)

#7 /home/vol5_4/epizy.com/epiz_25902755/htdocs/wiki/includes/ServiceWiring.php(163): Language::factory(string)

#8 /home/vol5_4/epizy.com/epiz_25902755/htdocs/wiki/includes/libs/services/ServiceContainer.php(458): Wikimedia\Services\ServiceContainer->{closure}(MediaWiki\MediaWikiServices)

#9 /home/vol5_4/epizy.com/epiz_25902755/htdocs/wiki/includes/libs/services/ServiceContainer.php(427): Wikimedia\Services\ServiceContainer->createService(string)

#10 /home/vol5_4/epizy.com/epiz_25902755/htdocs/wiki/includes/MediaWikiServices.php(540): Wikimedia\Services\ServiceContainer->getService(string)

#11 /home/vol5_4/epizy.com/epiz_25902755/htdocs/wiki/includes/Setup.php(801): MediaWiki\MediaWikiServices->getContentLanguage()

#12 /home/vol5_4/epizy.com/epiz_25902755/htdocs/wiki/includes/WebStart.php(81): require_once(string)

#13 /home/vol5_4/epizy.com/epiz_25902755/htdocs/wiki/index.php(41): require(string)

#14 {main}

I follow all the instructions provided for avoid this error but, nothing happens. This is very important extension for me please help. I set my wiki to Hindi language.

Thanks

Ciencia Al Poder (talkcontribs)

Looks like the /home/vol5_4/epizy.com/epiz_25902755/htdocs/wiki/extensions/Echo/i18n/hi.json file is corrupted. Try to download the extension again

WikiGamee (talkcontribs)

@Ciencia Al Poder: Thanks for reply. but, when I reinstall echo after download. I see "HTTP 500 error - unable to handle this request".

AhmadF.Cheema (talkcontribs)

The 500 error could be because of some syntax mistake you might've made while editing your LocalSettings.php file. Kindly check and make sure that such errors don't exist.

WikiGamee (talkcontribs)

@AhmadF.Cheema: I check that file, there is nothing any syntax mistake. but, when I remove "wfLoadExtension( 'Echo' )" line from LocalSettings.php file then my wiki is work like before.

AhmadF.Cheema (talkcontribs)

There should be a semicolon ; at the end of wfLoadExtension( 'Echo' ).

WikiGamee (talkcontribs)

Sorry. but, I forget to add semicolon on my previous comment. Semicolon is already exist in my file.

Ciencia Al Poder (talkcontribs)

See Blank page. Obviously we're not on your server to check what the error is.

Most likely you forgot to run composer update --no-dev

Reply to "Error on Echo after installation"

how to start a wikipedia page

3
Tinatalley (talkcontribs)

how to start a wikipedia page for a music artist


Bawolff (talkcontribs)
AhmadF.Cheema (talkcontribs)
Reply to "how to start a wikipedia page"

How to translate this Cite template to Hebrew?

29
49.230.87.239 (talkcontribs)

I have an RTL (Hebrew) 1.34.0 principally all-core MediaWiki website with Cite extension and ParserFunctions extension loaded in LocalSettings.php.

In this website I have Template:Cite with the following content, which I use to create English footnotes in English-only pages:

<includeonly>{{#if:{{{refname|}}}
| {{#tag:ref|{{{content|}}}|name={{{refname}}}}}
| {{#tag:ref|{{{content|}}}}}
}}</includeonly>

Credit for @Jonathan3 for developing this template.

Call input examples:


1) Cite with parameter calls WITHOUT English naming (by name attribute)

First check{{Cite|content=First check}}
Second check{{Cite|content=Second check}}
Third check{{Cite|content=Third check}}

<references />

2) Cite with parameter calls WITH English naming (by name attribute)

First check{{Cite|content=First check}}
Second check{{Cite|content=Second check|refname=First_name}}
Third check {{Cite|refname=First_name}}

<references />


Call output examples (appear fine in dir="rtl" modes):


1) Cite with parameter calls WITHOUT English naming

First check[1] Second check[2] Third check[3]

  1. ^ First check
  2. ^ Second check
  3. ^ Third check

2) Cite with parameter calls WITH English naming

First check Second check Third check

  1. ^ First check
  2. ^ לקפוץ מעלה אל:2.0 2.1 Second check

---

Note: Brackets appear flipped (][) in dir="ltr" modes

---

My problem

I want to use this template in an Hebrew project, that is, in an RTL && Right-align writing mode but if I write for example:

{{Cite|Content=non_messy_content}}

and my footnote happens to start with English after the first pipeline and also including Hebrew (say, as with links) than everything becomes jumbled up:

{{Cite|Content=תוכן_שהתבלגן}}

The first example shows non messy content and the second shows messy content (תוכן שהתבלגן); in the second example the "Content" part is situated wrongly.

My question

The only solution which comes to my mind to solve this problem is having an Hebrew call to the template such as

{{הערה|תוכן=תוכן_שלא_התבלגן}}

Which means Content=content which didn't go messy.

If there were ready to use RTL&&RA Hebrew (or any other RTL) <ref> tags than I wouldn't need such a Hebrew call but HTML is all English so I do need a template and an all-Hebrew one.


Hence I ask,

How to translate my template from English to Hebrew in a successful manner?

How to translate this Cite template to Hebrew?

49.230.87.239 (talkcontribs)

I give you my word of honor that this is generally and most likely the last time I will tag your profiles here with this RTL&&RA issue:

@Amire80

49.230.87.239 (talkcontribs)

I give you my word of honor that this is generally and most likely the last time I will tag your profiles here with this RTL&&RA issue:

@קיפודנחש

49.230.87.239 (talkcontribs)

I give you my word of honor that this is generally and most likely the last time I will tag your profiles here with this RTL&&RA issue

@IKhitron

Bawolff (talkcontribs)

So this is a bit harder. Some possible solutions:

  • If you switch the page language via Special:PageLanguage (After enabling $wgUseDBPageLanguage), the edit box will be the directionality of the page language. (You can see an example of this by comparing the edit box for the page named MediaWiki:Translateinterface/en and MediaWiki:Translateinterface/he )
  • The following js might help: $( function() {box = document.getElementById( 'wpTextbox1' ); if (box) box.dir = 'auto';});
  • If you don't want to specify an overall override, or are authoring a mix of directionality in one page, you can directly insert RLM (right-to-left mark), LRM (Left-to-right mark) or FSI (first-strong-isolate) characters (You would have to directly insert the character, not the entity, for it to affect the edit box. However it may also have an effect on the output, in most cases it should probably be fine, and the isolate characters are probably less likely to have a negative effect than the other characters). This is kind of hard to do, and how to do it varries by operating system. In windows, you can insert an LRM using the key combination Alt+0253. This is what it looks like if you put an LRM character before and after the hebrew part:
{{Cite|content=‎תוכן_שהתבלגן‎}}
49.230.87.239 (talkcontribs)

@Bawolff

example.com/MediaWiki:Translateinterface/en

example.com/MediaWiki:Translateinterface/he

Brought me a 404 in my own website.


---

Running the JS

$( function() {box = document.getElementById( 'wpTextbox1' ); if (box) box.dir = 'auto';});

in an edit page juxtaposed all English content left and all Hebrew content right; so I still have a problem calling {{Cite|Content=CONTENT}} in the middle of two Hebrew structures, if the content of the footnote is not solely in English.


---

About using either RLM/LRM; I don't know these

About FSI; If I understand correctly it is still experimental


---

Is there a way to tell the backend, for example

Where "הערה" put "Cite" AND where "שם" put "name"?

This way I write everything in Hebrew but the output will always be based on a preexisting English translation of the output, just one step before parsing and rendering everything else?

Bawolff (talkcontribs)

you can use redirects for alternate template names. Template parameters can have multiple names in a fallback pattern.

49.230.87.239 (talkcontribs)

@Bawolff I have read in that page and what I understood is that a redirect does with transferring a human or a bot from one webpage to another.

Perhaps you meant something like that the page

תבנית:הערה

Should contain:

#REDIRECT [[Template:Cite]]


About fallback patterns for template parameters: I want to read about it, but I don't know where exactly,

Did you mean to: Help:Templates#Exceptions to the order of evaluation

I mostly misunderstand how is it essentially different than redirections and how does a template gets directed to do the "fallback",


Kindly,

Bawolff (talkcontribs)

you can do {{{parametername|{{{alternativeparamname}}}}}}

49.230.87.239 (talkcontribs)

@Bawolff

I want to better understand that code

I went to Help:Templates and searched:

|{{{

I didn't match any data.


Please tell us the name of the concept or refer to a man page.

At least a bit more detailing would be helpful.

Bawolff (talkcontribs)
49.230.87.239 (talkcontribs)

So,

parameter תוכן has the default value of content

AND

parameter שם has the default value of refname (a name attribute)

?

49.230.87.239 (talkcontribs)

@Jonathan3 now after the English phase was dealt with in depth (and success), you might have an approach to recommend about translating the template to Hebrew.

Jonathan3 (talkcontribs)

I don't have any experience of foreign languages but will have a look next week. I'd start by changing "refname" to "name", just to simplify things in finding a translation. I just kept it as "refname" as it had been suggested by someone else. They say a camel is a horse designed by a committee. Apologies if it turns out that the distinction is necessary!

49.230.17.183 (talkcontribs)

I agree that in the content of parameter names, name is better than refname (as long as there is no conflict between name as a mere parameter name and name as a special value representing HTML name attribute).

I preferred it all along without knowing if its a problem or not and seemingly it isn't (smile of happiness).

49.230.17.183 (talkcontribs)

@Bawolff

Okay, I have redirected תבנית:הערה to Template:Cite

Perhaps it would be redundant to say that English tests go fine


All Hebrew tests fail with the exact two errors:

  • שגיאת ציטוט: תג <ref> לא תקין;
  • להערות שוליים ללא שם חייב להיות תוכן


If you translate this to Hebrew you could understand that the parameters content and refname aren't applicable by through the תבנית:הערה TO Template:Cite redirect.


Why?

Because I got lost with Help:Templates#Exceptions to the order of evaluation

Please consider to give an example to how one should implement it in the (confusing and much-background-knowledge requiring context of LTR-to-RTL default parameters).

49.230.17.183 (talkcontribs)

by through = through


(confusing and much-background-knowledge requiring

=

(confusing and much-background-knowledge requiring)

Bawolff (talkcontribs)
49.230.17.183 (talkcontribs)

@Bawolff

My template is the same one Jonathan3 created:

<includeonly>{{#if:{{{refname|}}}
| {{#tag:ref|{{{content|}}}|name={{{refname}}}}}
| {{#tag:ref|{{{content|}}}}}
}}</includeonly>

Currently I also have a redirect from תבנית:הערה to it (Template:Cite)


Although this template (Template:Cite) is in English, I want to call it in Hebrew, as with, say;

בדיקה_ראשונה{{הערה|תוכן=בדיקה_ראשונה}}

בדיקה_שנייה{{הערה|תוכן=בדיקה_שנייה|שם=שם_ראשון}}
בדיקה שלישית{{הערה|שם=שם_ראשון}}

But; I don't know how I might be able be able to do that.

49.230.17.183 (talkcontribs)

@Bawolff do you know a way to do that or would you say it's even possible with the current release?

If it's not possible with the current release than maybe I should indeed migrate, somehow, from MediaWiki to TikiWiki or some other MediaWiki derivative.

Bawolff (talkcontribs)

As i already said above, you can use default values of parameters to have template parameters that have more than one name and you can have redirects to make the template have more than one name.

49.230.17.183 (talkcontribs)

@Bawolff

You said:

"you can use default values of parameters to have template parameters that have more than one name"

So, I tried to read Help:Templates#Default_values on which you said:

"It is a parameter that has as its default value a different parameter"

But I said I got lost with it and you said:

"I dont see anything in that section relavent to what you are doing"

So is it relevant or irrelevant?

49.230.17.183 (talkcontribs)

Use default values of parameters

To have template parameters

That have more than one name

---

So,

Should the default value of the parameter content be תוכן and should the default value of the parameter refname be שם?

Please share with us if I misunderstood.

182.232.57.75 (talkcontribs)
182.232.57.75 (talkcontribs)

@Jonathan3 I start to think that translating this template into Hebrew is impossible.

182.232.57.75 (talkcontribs)

@Jonathan3 I take back what I wrote one post above (which was anyway humorous);

I think I found a way to translate that template;

This version passed my tests below:

<includeonly>{{#תנאי:{{{שם|}}}
    | {{#תגית:ref|{{{תוכן|}}}|name={{{שם}}}}}
    | {{#תגית:ref|{{{תוכן|}}}}}
}}</includeonly>
  • Instead if I wrote תנאי
  • Instead tag I wrote תגית
  • Instead refname I wrote שם
  • Instead content I wrote תוכן

Tests passed successfully


1) Cite with parameter calls WITHOUT English naming (by name attribute)

* בדיקה ראשונה{{הערה|תוכן=בדיקה ראשונה}}
* בדיקה שנייה{{הערה|תוכן=בדיקה שנייה}}
* בדיקה שלישית{{הערה|תוכן=בדיקה שלישית}}
* בדיקה רביעית{{הערה|תוכן=בדיקה רביעית}}

Output:

  • [1]בדיקה ראשונה
  • [2]בדיקה שנייה
  • [3]בדיקה שלישית
  • [4]בדיקה רביעית
  1. ^ בדיקה ראשונה
  2. ^ בדיקה שנייה
  3. ^ בדיקה שלישית
  4. ^ בדיקה רביעית

2) Cite with parameter calls WITH English naming (by name attribute)

* בדיקה ראשונה{{הערה|תוכן=בדיקה ראשונה}}
* בדיקה שנייה{{הערה|תוכן=בדיקה שנייה|שם=שם_ראשון}}
* בדיקה שלישית{{הערה|שם=שם_ראשון}}

Output:

  • [1]בדיקה ראשונה
  • [2]בדיקה שנייה
  • [2]בדיקה שלישית
  1. בדיקה ראשונה
  2. ^ לקפוץ מעלה אל:2.0 2.1 בדיקה שנייה

Notes


Note 1)

Instead ref it was written תגית but in version 1.35.0 or 1.36.0 one could write תג instead תגית and the credit for that goes to @Amire80 for commiting the source code change.

תג is a "male" manner for tag in Hebrew instead the longer "female" manner of תגית.


Note 2)

I haven't tested the template with regards to links. I should do that ASAP and publish my progress here.


Note 3)

Any constructive comment about my translation of Jonathan3's template is most welcome.

Jonathan3 (talkcontribs)

If it works it works! Well done.

It looks like the references/footnotes part is a mixture of LTR and RTL (e.g. the number 1 and its full stop are LTR on the left, then the text itself is RTL). Is that a problem?

182.232.7.125 (talkcontribs)

@Jonathan3 thanks !

Actually in practice (in the Hebrew site) everything is RTL for me but here in mediawiki.org the output appears aligned-left for some reason but I cannot edit to try HTMLize the output chapters to give them dir="rtl" and style="text-align: right" or something similar I guess.

182.232.7.53 (talkcontribs)
Reply to "How to translate this Cite template to Hebrew?"