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.
 

MediaWiki:Common.js is not running on Source Editor

1
Eduemoni (talkcontribs)

I want to apply a class to html through javascript, it only works on action-view, in action-edit pages it is not been applied

Reply to "MediaWiki:Common.js is not running on Source Editor"
Jcburris (talkcontribs)

I had set the wiki and all works with the $wgServer = the server ip. (http://xxx.xxx.xxx.xxx) the server worked as expected. I moved the wiki from an old server to a new server and everything worked. This is a windows server with IIS. I installed a cert for SSL traffic and that part is working. If I change the $wgServer = https://wiki.mysite.net the site will come up and I can see all pages, but when I login it will not let me. Invalid username or password. If I switch back I can login again.

I have restarted the IIS server, I have tried from other browsers, tried in incognito mode thinking it was a cache problem. This did not help. Found several places where it talkes about having the wgServer variable wrong. Not sure what could be wrong here.

Any help would be great.

MediaWiki 1.34.1
PHP 7.4.5 (cgi-fcgi)
MySQL 8.0.20

Thanks

John

Bawolff (talkcontribs)

thats very odd. Usually server name has nothing to do with ability to login.

Reply to "Can't login to wiki"

Upgrade Error: includes/MagicWord.php: Error: invalid magic word 'ev'

2
Balloonhead666 (talkcontribs)

searched for a while and cannot get it to work after Upgrade from 1.30 to 1.34.

the System didn't worked with 1.30 anymore (blank pages) and i wanted to upgrade to 1.34 to see if this helps. Now I only get the magic word error. Independant of the PHP-Version 7.2 - 7.4


#0 /wiki/includes/MagicWordFactory.php(222): MagicWord->load(string)

#1 /wiki/includes/parser/Parser.php(5288): MagicWordFactory->get(string)

#2 /wiki/includes/StubObject.php(112): Parser->setFunctionHook(string, string)

#3 /wiki/includes/StubObject.php(138): StubObject->_call(string, array)

#4 /wiki/extensions/EmbedVideo/EmbedVideo.hooks.php(24): StubObject->__call(string, array)

#5 /wiki/extensions/EmbedVideo/EmbedVideo.hooks.php(17): EmbedVideo::addMagicWord(string, string, string)

#6 /wiki/includes/Hooks.php(174): EmbedVideo::setup(Parser)

#7 /wiki/includes/Hooks.php(202): Hooks::callHook(string, array, array, NULL)

#8 /wiki/includes/parser/Parser.php(476): Hooks::run(string, array)

#9 /wiki/includes/cache/MessageCache.php(1189): Parser->firstCallInit()

#10 /wiki/includes/cache/MessageCache.php(1165): MessageCache->getParser()

#11 /wiki/includes/language/Message.php(1280): MessageCache->transform(string, boolean, Language, Title)

#12 /wiki/includes/language/Message.php(884): Message->transformText(string)

#13 /wiki/includes/language/Message.php(944): Message->toString(string)

#14 /wiki/includes/OutputPage.php(888): Message->text()

#15 /wiki/includes/OutputPage.php(937): OutputPage->setHTMLTitle(Message)

#16 /wiki/includes/page/Article.php(638): OutputPage->setPageTitle(string)

#17 /wiki/includes/actions/ViewAction.php(63): Article->view()

#18 /wiki/includes/MediaWiki.php(511): ViewAction->show()

#19 /wiki/includes/MediaWiki.php(302): MediaWiki->performAction(Article, Title)

#20 /wiki/includes/MediaWiki.php(900): MediaWiki->performRequest()

#21 /wiki/includes/MediaWiki.php(527): MediaWiki->main()

#22 /wiki/index.php(44): MediaWiki->run()

#23 {main}

Osnard (talkcontribs)

Have you also updated the "EmbedVideo" extension to REL1_34?

Reply to "Upgrade Error: includes/MagicWord.php: Error: invalid magic word 'ev'"

LDAP query works with script but not on MediaWiki.

2
Kittencorn (talkcontribs)

I am trying to migrate from IIS to CentOS apache, but I am having issues with LDAP. My original config worked with Remote Auth, but this seems more complicated in Linux.

If I run ' php extensions/LDAPProvider/maintenance/ShowUserInfo.php --domain mydomain --username 1234567' I get results back fine. But if I try and sign in with pluggable auth I get the error 'Could not fetch required user info to complete login' and no LDAP logs are generated.


wfLoadExtension( 'PluggableAuth' );

wfLoadExtension( 'LDAPAuthentication2' );

wfLoadExtension( 'LDAPAuthorization' );

wfLoadExtension( 'LDAPProvider' );

wfLoadExtension( 'LDAPUserInfo' );

wfLoadExtension( 'LDAPGroups' );

$LDAPAuthorizationAutoAuthRemoteUserStringParser = 'domain-backslash-username';

$LDAPAuthentication2UsernameNormalizer = 'strtolower';

$LDAPAuthentication2AllowLocalLogin = false;

# $wgAuthRemoteuserAllowUserSwitch = false;

$wgPluggableAuth_EnableLocalLogin = false;

$wgDebugLogGroups['LDAPUserInfo'] = "/var/www/mydomain.my.com/log/DAPUserInfo.log";

$wgDebugLogGroups['LDAPGroups'] = "/var/www/mydomain.my.com/log/LDAPGroups.log";

$LDAPProviderDomainConfigProvider = function() {

        $config = [

                'mydomain' => [

                        'connection' => [

                                "server" => "dc.mydomain.my.com",

                                "user" => "CN=Media Wiki,CN=Managed Service Accounts,DC=mydomain,DC=my,DC=com",

                                "pass" => "xxxxxxxxxxx",

                                "options" => [

                                        "LDAP_OPT_DEREF" => 1

                                ],

                                "basedn" => "DC=mydomain,DC=my,DC=com",

                                "groupbasedn" => "DC=mydomain,DC=my,DC=com",

                                "userbasedn" => "DC=mydomain,DC=my,DC=com",

                                "searchattribute" => "samaccountname",

                                "usernameattribute" => "samaccountname",

                                "realnameattribute" => "displayname",

                                "grouprequest" => "MediaWiki\\Extension\\LDAPProvider\\UserGroupsRequest\\UserMemberOf::factory"

                        ],

                                'authorization' => [

                                'rules' => [

                                        'groups' => [

                                                'required' => [

                                                        "CN=My Grup,DC=mydomain,DC=my,DC=com"

                                                ]

                                        ]

                                ]

                        ],

                        'userinfo' => [

                                'attributes-map' => [

                                        'realname' => 'fullname'

                                ]

                        ],

           'groupsync' => [

               "mechanism" => "mappedgroups",

               "mapping" => [

                                        "sysop" => "CN=My Grup,DC=mydomain,DC=my,DC=com"

                                ]

                        ]

                ]

        ];

        return new \MediaWiki\Extension\LDAPProvider\DomainConfigProvider\InlinePHPArray( $config );

};

Any ideas?


Osnard (talkcontribs)

You config looks fine and it is a good sign that the ShowUserInfo.php script works. If this particular error message occurs there must be an entry in the "LDAPAuthentication2" log. Please add $wgDebugLogGroups['LDAPAuthentication2'] = "/var/www/mydomain.my.com/log/LDAPAuthentication2.log"; to your LocalSettings.php. Please also see LDAP_hub#Debugging (entry for "LDAPAuthentication2" was missing there, sorry).

Reply to "LDAP query works with script but not on MediaWiki."

New Mediawiki install slow

3
Summary by Kittencorn

Moving to Apache

Kittencorn (talkcontribs)

I installed Mediawiki on an internal IIS server, but the original page loads can easily be 10-15 seconds.


LocalSettings:

$wgCacheDirectory = "$IP\cache";

$wgFileCacheDirectory = "$IP\cache ";

$wgEnableSidebarCache = true;

$wgUseFileCache = true;

$wgShowIPinHeader = false;

$wgEnableParserCache = true;

$wgCachePages = true;

$wgMainCacheType = CACHE_ACCEL;

$wgMessageCacheType = CACHE_ACCEL;

$wgParserCacheType = CACHE_ACCEL;

$wgMemCachedServers = array();


$wgShowExceptionDetails = true;

$wgShowDBErrorBacktrace = true;

$wgDebugComments = true;

$wgDebugLogFile = 'C:\Windows\Temp\MediaWiki\debug-{$wgDBname}.log';

wfLoadExtension( 'WikiEditor' );

wfLoadExtension( 'PluggableAuth' );

wfLoadExtension( 'Auth_remoteuser' );

wfLoadExtension( 'LDAPAuthentication2' );

wfLoadExtension( 'LDAPAuthorization' );

wfLoadExtension( 'LDAPProvider' );

wfLoadExtension( 'LDAPUserInfo' );

wfLoadExtension( 'LDAPGroups' );


php.ini:


[PHP]

display_errors = On

log_errors = On

error_log = C:\Windows\Temp\MediaWiki\php.log

[WinCache]

extension = php_wincache.dll

wincache.fcenabled = 1

wincache.ucenabled = 1

wincache.fcachesize = 64

wincache.fcndetect = 1

wincache.maxfilesize = 256

wincache.chkinterval = 10

wincache.enablecli = 1

wincache.ucachesize = 8

wincache.scachesize = 8


[opcache]

zend_extension=php_opcache.dll

opcache.enable=1


Once the page is loaded first time, it can take less than a second to reload, but 'new' pages still take anywhere between 6-20 seconds to load.


Any ideas as to how I can improve this or what to look for?


Windows Server 2016

IIS 10.0

PHP 7.3

WinCache 2.0.0.8 7.3


Bawolff (talkcontribs)

so beyond caching, the next step would be to look at a profile of a page taking a long time to load. See Profiling for help on how to generate one. Post the profile here or in a pastebin. You could also try increasing wincache.ucachesize to 16 which might help or might do nothing.


Note: the majority of performance testing is done on apache+mysql+linux. Performance may be better on that platform (of course switching is not an option for most people)

Kittencorn (talkcontribs)

For the second time I have left it over night and come back to 500 Internal Error in the morning. I have every kind of logging on but there are no errors. I think I am going to need to move it to Linux.

What are some essential plugins/extensions you like?

2
BubbaUsesWiki (talkcontribs)

What are some of the more useful or essential plugins/extensions I should look at or consider?

I'm thinking about:

  • Extension:VisualEditor
  • Extension:WikiSEO 2.4.1

And maybe:

  • Extension:PermissionManager
  • Extension:GroupManager

Are those the most useful, essential, or up to date? Or does someone else have some favourites and must-haves?

Thanks for your input.

Jonathan3 (talkcontribs)

There is a list on the the "Professional Wiki" website:

AdminLinks Beta Features CategoryTree CharInsert Cite CiteThisPage ConfirmEdit CookieWarning Data Transfer DateDiff DismissableSiteNotice Echo External Data HitCounters HostStats ImageMap InputBox Interwiki JSBreadCrumbs LoginNotify Maps MobileFrontend Modern Timeline MultimediaViewer Nuke OATHAuth Page Forms ParserFunctions PdfHandler Poem RenameUser ReplaceText SandboxLink Semantic Compound Queries Semantic Extra Special Properties Semantic MediaWiki Semantic Meta Tags Semantic Result Formats SpamBlacklist TemplateData TemplateStyles Thanks TitleBlacklist UploadWizard UploadsLink Visual Editor Arrays Babel CLDR CodeMirror DeleteBatch Display Title Gadgets Lingo Lockdown Loops MagicNoCache Mpdf MyVariables NewUserMessage NumberFormat NumerAlpha Page Icons PagedTiffHandler PipeEscape Rotten Links Scribunto Semantic Breadcrumb Links Semantic Cite Semantic Drilldown Semantic Glossary Semantic Rating Semantic Scribunto SimpleBatchUpload SyntaxHighlight TimedMediaHandler Title Icon UniversalLanguageSelector UrlGetParameters UserFunctions Variables VariablesLua Widgets AbuseFilter Approved Revs AutoCreatePage CirrusSearch CodeEditor CommentStreams ConfirmAccount ContactPage Elastica Hover Cards ImportUsers Labeled Section Transclusion Math Mermaid RevisionSlider Semantic Interlanguage Links Semantic Notifications Semantic Tasks Summary Cards Translate

Reply to "What are some essential plugins/extensions you like?"

How to translate this Cite template to Hebrew?

7
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.

Reply to "How to translate this Cite template to Hebrew?"

How to make font smaller in specific subcontent?

3
220.121.235.23 (talkcontribs)

I want to make the font size smaller of title and content in subcontent (which start with '=='). Can anybody tell me how to do it?

220.121.235.23 (talkcontribs)

I mean, for example, in my wiki, every article has subcontent with title of 'references'.

and I want to make the title (references) and content smaller in font size in every articles.

Malyacko (talkcontribs)

Define custom CSS for specific classes or IDs: Manual:CSS

Reply to "How to make font smaller in specific subcontent?"
Ybuskila (talkcontribs)

Hi, Could you please tell me where can I download a Hebrew supported Media-Wiki I which we can write in RTL mode.

Can we define the same WIKI to support both RTL and LTR writing?

Regads, Yaron

Ciencia Al Poder (talkcontribs)

Export wiki tables into CSV or other formats

4
Abdeaitali (talkcontribs)

This is my first created topic here, so apologies if it is not well formulated!

I am wondering if there is a tool to simply extract data tables from Wikipedia articles (or other wiki projects) to other formats such as CSV.

Thanks!

AhmadF.Cheema (talkcontribs)
Abdeaitali (talkcontribs)

Thanks @AhmadF.Cheema for your comment!

Yeah, this is exactly the tool I use now but I was wondering if there is some tool integrated in the wiki or if there is a plan to integrate it.

A right click on a wiki table giving export options would be a great integration.

Cheers!

Ciencia Al Poder (talkcontribs)
Reply to "Export wiki tables into CSV or other formats"