Project:Support desk

About this board

Welcome to the MediaWiki Support desk, where you can ask MediaWiki questions!

(Read this message in a different language)

See also

Other places to ask for help:

Before you post

Post a new question

  1. To help us answer your questions, please indicate which versions you are using, as found on your wiki's Special:Version page:
    • MediaWiki version
    • PHP version
    • Database type and version
  2. Please include the web address (URL) to your wiki if possible. It's often easier for us to identify the source of the problem if we can see the error directly.
  3. To start a new thread, click "Start a new topic".

EPrints- How to set auto email to new users that were created by admin?

6
Aman16777 (talkcontribs)

Eprints Issue!!!

Please help.


As admin if I were to create a new user, is it possible to set auto mail to the new user?

The content of the mail is to basically welcome the new user and provide them with their account username and password.

The flow:

Super admin creates a new user > User receives mail based on the email address entered by super admin> User checks mail > The mail content contains username & password for the user to log into the system.

Aman16777 (talkcontribs)

Could anyone please help me resolve this issue?

Jonathan3 (talkcontribs)
Aman16777 (talkcontribs)

Yeah I did check through wiki eprints but I did not manage to find anything related to my issue.

Bawolff (talkcontribs)

The create account page has a create account by email option that does this (you have to be logged in as a different user to do this)

Aman16777 (talkcontribs)

I am trying to set auto mail function when super admin user goes to create user. An auto mail will be send to the new user notifying them that an account has been created for them and the details of the account.

Reply to "EPrints- How to set auto email to new users that were created by admin?"

How to initiate a frontend module in all webpages of MediaWiki?

3
182.232.50.87 (talkcontribs)

I have created a frontend module with HTML-CSS which is a "call now" sticky button.

index.html

<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<link rel="stylesheet" href="./css/mobile_general_structure.css"></link>
		<link rel="stylesheet" href="./css/nonmobile_general_structure.css"></link>
	</head>
	<body>
		<div dir="rtl" class="camowb_main_box">
			<div class="camowb_phone_box">
				<a class="camowb_phone_link" href="https://wa.me/NUMBER">
					<img class="camowb_phone_icon" src="./images/whatsapp.svg"></img>
					<span class="camowb_phone_text">WhatsApp</span>
				</a>
			</div>
		</div>
	</body>
</html>
  • The module's files are located in a directory on top of the web application root (example.com/call_now).

What would be a reasonable way to initiate/boot the module in every MediaWiki webpage?

Bawolff (talkcontribs)

Its unclear what you are asking.maybe you want to make a custom Skin

49.230.4.89 (talkcontribs)

@Bawolff I will try to explain the core matter again better:

In my website directory example.com I have created a sub directory example.com/my_sub_directory in which I put a file index.html containing a "call now" button which I want to appear to in any webpage of my MediaWiki website.

Reply to "How to initiate a frontend module in all webpages of MediaWiki?"

U-37 Quotes's Audio are Actually Those of U-81's

2
LeFerdeLance (talkcontribs)

Hi, not sure if this is the right place to post, but I just found out that U-37's quotes audio are actually u-81's whereas u-81's audio is correct.

Bawolff (talkcontribs)

This is the wrong place. I have no idea what you're referring to.

Reply to "U-37 Quotes's Audio are Actually Those of U-81's"

404 error on rest.php on Mediawiki 1.35.1

1
PedroBraga1917 (talkcontribs)

Greetings,


In a server on my workplace, we've installed Mediawiki 1.35 running on a NGinx / Ubuntu Server 20.04 LTS setup.

We attempted to set up VisualEditor during the install process, but it simply do not open when we click on "edit" (nothing happens, it does not crash also).

As a placeholder, we are using TinyMCE but visual editor is a lot better and we need to set it up.


During our investigations on the cause of the problem, we've noticed that when Parsoid calls the rest.php located on the root folder of the installation, it returns a 404 error. We already checked the Nginx config file and the rest.php location is set there, so this should not happen.


Any help from this forum will be really helpful for us, we are kinda of chasing our own tails.

Reply to "404 error on rest.php on Mediawiki 1.35.1"
62.26.157.34 (talkcontribs)

Hello everybody, i don't understand how this api work. How can i authenticate with token, username and password? I have many tried and I don't know what to do next :(.


$wikiUrl = "http://www.example.de"; $endPoint = "http://www.example.de/api.php";

$createAccount_Token = getCreateAccountToken(); // Step 1 createAccount( $createAccount_Token );

function getCreateAccountToken() {

global $endPoint; $params1 = [ "action" => "query", "meta" => "tokens", "type" => "createaccount", "format" => "json" #username, password???? login token with credentials works not -,- ];

$url = $endPoint . "?" . http_build_query( $params1 ); $ch = curl_init( $url ); curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true ); curl_setopt( $ch, CURLOPT_COOKIEJAR, "cookie.txt" ); curl_setopt( $ch, CURLOPT_COOKIEFILE, "cookie.txt" ); $output = curl_exec( $ch ); curl_close( $ch );

echo $url; $result = json_decode( $output, true );

return $result["query"]["tokens"]["createaccounttoken"]; }

function createAccount( $createAccount_Token ) {

global $endPoint, $wikiUrl; $params2 = [ "action" => "createaccount", "createtoken" => $createAccount_Token, "username" => "test", "password" => "test", "retype" => "test", "createreturnurl" => $wikiUrl, "format" => "json" ];

$ch = curl_init(); curl_setopt( $ch, CURLOPT_URL, $endPoint ); curl_setopt( $ch, CURLOPT_POST, true ); curl_setopt( $ch, CURLOPT_POSTFIELDS, http_build_query( $params2 ) ); curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true ); curl_setopt( $ch, CURLOPT_COOKIEJAR, "cookie.txt" ); curl_setopt( $ch, CURLOPT_COOKIEFILE, "cookie.txt" ); $output = curl_exec( $ch ); curl_close( $ch );

echo( $output );

}

PHP output:

json{"createaccount":{"status":"FAIL","message":"Diese Aktion ist auf Benutzer beschr\u00e4nkt, die der Gruppe \u201e[[ Wiki:Administratoren|Administratoren]]\u201c angeh\u00f6ren.","messagecode":"permissiondenied"}}

Malyacko (talkcontribs)

What it says: "Diese Aktion ist auf Benutzer beschr\u00e4nkt, die der Gruppe Administratoren angeh\u00f6ren"; permission denied.

Bawolff (talkcontribs)

Sounds like you should login first.

See Api:Login

Reply to "create User with api failed"

Manuel Guide to Create php.ini file

5
Thatnewman (talkcontribs)

Hello Everyone I am Trying to install Extension:Scribunto and I got stuck at here

This extension runs on top of an executable. You must have permission to run executables on your host in order for this extension to work.


So I contacted them and they gave me the link to enable it.. But the settings is in the php.ini File which is : To enable exec() function, you need to remove it from the following line in your php.ini file:

disable_functions = "show_source, system, shell_exec, exec"


And I later found out I don't have php.ini file.. They already told me how to create new one.. But the problem is The file is Empty. Where do I get the configurations or where can I download an already made Php.ini....

Secondly ;-I am on shared hosting and my current Php version is 7.4 .. Should i upgrade to version 8.0???????????

Jonathan3 (talkcontribs)

I can only answer the last question... don't upgrade to PHP 8 yet - see Compatibility#PHP.

With the other stuff... maybe try out a cheap unmanaged VPS - I'm on Digital Ocean now and things "just work" (like Scribunto) including things that I had difficulty with for years on a shared server.

Thatnewman (talkcontribs)

I should Host on another server? okay will do thanks.

Jonathan3 (talkcontribs)

I don't know whether you should or not :-) Can't do any harm. It'll only cost $5 or whatever to find out.

Bawolff (talkcontribs)

The php.ini file might just be somewhere other than you expect it.

Reply to "Manuel Guide to Create php.ini file"

Video's and Google Sheets not working

2
92.40.183.22 (talkcontribs)

hello,

a couple of weeks ago all my embeded content on the land wiki alliance stopped working. its just says "this content is blocked, contact site owner to resolve the issue". It used to work fine. Can someone help me solve this?

Malyacko (talkcontribs)

We are not the site owner of "land wiki alliance". You need to contact "land wiki alliance" for this.

Reply to "Video's and Google Sheets not working"
185.159.162.42 (talkcontribs)

I can't find where I can withdraw tokens urgently

  Could you help me

Ciencia Al Poder (talkcontribs)

What tokens are you talking about?

Ciencia Al Poder (talkcontribs)
Reply to "token release"

How do I get and backup a list of installed extensions as part of my regular backup?

2
Anbh42 (talkcontribs)

I have neglected to keep a list of which extensions are installed on my mediawiki instance. I run it on Apache on my host and have configured my backups with an old tool called backup-manager, where I specify which databases to backup from my db instance, and which directories on my file system.


Can I backup my extensions directory and then just restore it simply into the right place when doing a restore, in order to re-install all my extensions?


Thanks

Jonathan3 (talkcontribs)

Yes, assuming you backed up the other things you need (LocalSettings.php, skins etc) that would be a way to resurrect your extensions.

Reply to "How do I get and backup a list of installed extensions as part of my regular backup?"

PDFEmbed not working in mw 1.35.3

3
Pooja2425 (talkcontribs)

HI ,

Product Version
MediaWiki 1.35.3
PHP 7.4.23 (apache2handler)
MySQL 8.0.26
Lua 5.1.5
Elasticsearch

when using PDFEmbed giving error " Call to undefined method Parser::disableCache() ", error given below.

<pdf height=800 width=800>CARBONATE_SEISMIC_CHECKLIST.pdf</pdf>

<embed>CARBONATE_SEISMIC_CHECKLIST.pdf</embed>

same file coming with simple embed extension, but not from <pdf> tag.

since we are using <pdf></pdf> tag into 1000+ pages. we cannot change manually.

pls suggest any supporting extension to support <pdf></pdf> tag.

or give working extenison PDFEmbed.

[YUNWMeVcOnGQwRm0xefEugAAAAI] /wiki/index.php/Discipline/Prospect_evaluation Error from line 39 of /data/www/html/wiki/extensions/PDFEmbed/PDFEmbed.hooks.php: Call to undefined method Parser::disableCache()

Backtrace:

#0 /data/www/html/wiki/includes/parser/Parser.php(3922): PDFEmbed::generateTag()

#1 /data/www/html/wiki/includes/parser/PPFrame_Hash.php(330): Parser->extensionSubstitution()

#2 /data/www/html/wiki/includes/parser/Parser.php(2887): PPFrame_Hash->expand()

#3 /data/www/html/wiki/includes/parser/Parser.php(1556): Parser->replaceVariables()

#4 /data/www/html/wiki/includes/parser/Parser.php(651): Parser->internalParse()

#5 /data/www/html/wiki/includes/content/WikitextContent.php(374): Parser->parse()

#6 /data/www/html/wiki/includes/content/AbstractContent.php(590): WikitextContent->fillParserOutput()

#7 /data/www/html/wiki/includes/Revision/RenderedRevision.php(263): AbstractContent->getParserOutput()

#8 /data/www/html/wiki/includes/Revision/RenderedRevision.php(235): MediaWiki\Revision\RenderedRevision->getSlotParserOutputUncached()

#9 /data/www/html/wiki/includes/Revision/RevisionRenderer.php(215): MediaWiki\Revision\RenderedRevision->getSlotParserOutput()

#10 /data/www/html/wiki/includes/Revision/RevisionRenderer.php(152): MediaWiki\Revision\RevisionRenderer->combineSlotOutput()

#11 [internal function]: MediaWiki\Revision\RevisionRenderer->MediaWiki\Revision\{closure}()

#12 /data/www/html/wiki/includes/Revision/RenderedRevision.php(197): call_user_func()

#13 /data/www/html/wiki/includes/poolcounter/PoolWorkArticleView.php(216): MediaWiki\Revision\RenderedRevision->getRevisionParserOutput()

#14 /data/www/html/wiki/includes/poolcounter/PoolCounterWork.php(162): PoolWorkArticleView->doWork()

#15 /data/www/html/wiki/includes/page/Article.php(810): PoolCounterWork->execute()

#16 /data/www/html/wiki/includes/actions/ViewAction.php(74): Article->view()

#17 /data/www/html/wiki/includes/MediaWiki.php(527): ViewAction->show()

#18 /data/www/html/wiki/includes/MediaWiki.php(313): MediaWiki->performAction()

#19 /data/www/html/wiki/includes/MediaWiki.php(940): MediaWiki->performRequest()

#20 /data/www/html/wiki/includes/MediaWiki.php(543): MediaWiki->main()

#21 /data/www/html/wiki/index.php(53): MediaWiki->run()

#22 /data/www/html/wiki/index.php(46): wfIndexMain()

#23 {main}

Malyacko (talkcontribs)
Pooja2425 (talkcontribs)

Hi ,

It works only for <pdf>test.pdf</pdf> not for filepath under <pdf> tag.

<pdf width="600" height="450">{{filepath:test.pdf|nowiki}}</pdf>

some pages includes pdf like this, where error came.ie. ⧼embed_pdf_invalid_relative_domain⧽

its working under 1.31.x but not in 1.35.x

pls suggest ,

Reply to "PDFEmbed not working in mw 1.35.3"