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

Need to Install PDF Renderer Service which would support to embed the images.

8
Apatha11 (talkcontribs)

HI Support Desk,

Following are the installed software product version(s) those are being used in our RHEL7 server environment.

Installed software

Product Version
MediaWiki 1.35.1
PHP 7.4.15 (apache2handler)
MySQL 8
OS LINUX

We are looking for PDF Renderer Service which would support to embed the images in a Wiki page to a downloaded PDF file.

I have installed this Proton, but it did not work properly. As it's not well explained that how to integrate proton.

I followed this, https://m.mediawiki.org/wiki/ServiceTemplateNode/GettingStarted

it did not work successfully.

Error: {"status":500,"type":"internal_error","title":"ReferenceError","detail":"preq is not defined","method":"GET","uri":"/wikipoc.xyz.com/v1/png/Square_funny"}

URL: http://10.73.21.15:8080/wikipoc.xyz.com/v1/png/Square_funny


Kindly suggest how we can use this in our wiki 1.35.1.

Osnard (talkcontribs)
Apatha11 (talkcontribs)

Is this extension convert html to pdf with Image?

Osnard (talkcontribs)

Those extensions will export a wikipage into PDF.

Mpdf: Not sure, but I guess so. UEModulePDF: Yes.

Apatha11 (talkcontribs)

So UEModulePDF extension can download pdf with image?? Also there is no details for Extension:UEModulePDF on page that how to configure it.


Is this compatible with PHP 7.4?

I have tried MPDF and its downgliding pdf but not giving full path of image, can you please suggest where we can enable full path for image?


When I set as html not pdf so i saw the image url is not full (/wiki135/images/5/57/enterprise-wiki.jpg).


Can you please suggest from where its pickup up URL?

Malyacko (talkcontribs)
Osnard (talkcontribs)

Yes, UEModulePDF is compatible with PHP 7.4 and it will embed images in the PDF. Be aware that you will need to set up a Java Webserver as PDF renderer as well. See https://en.wiki.bluespice.com/wiki/Setup:Installation_Guide/Webservices/PDF-Export

You will probably need to set up the following extensions for UEModulePDF

Be aware that only LTS branches REL1_31 and REL1_35 are supported.

BlueSpice is also available as a MediaWiki distribution that bundels lots of extensions for the business usecase.

I am a little suprised that MPDF shouldn't be able to embed images. Are you sure you have set it up properly?

Apatha11 (talkcontribs)

Yes I have set it properly as given in MPDF documentation. (Extension:Mpdf)


The path is not coming full in HTML.

When I set as html not pdf so I saw the image url is not full (/wiki135/images/5/57/enterprise-wiki.jpg).

From where I can change it, or it should be pick this automatically. Path should be like  :

https://localhost/wiki135/images/5/57/enterprise-wiki.jpg not /wiki135/images/5/57/enterprise-wiki.jpg

Error: Error parsing image file - image type not recognised, and not supported by GD imagecreate


Steps I have done:

  1. wget https://extdist.wmflabs.org/dist/extensions/Mpdf-REL1_35-94bd27c.tar.gz

2. tar -xzf Mpdf-REL1_35-94bd27c.tar.gz -C /data/www/html/wiki135/extensions

3. cd data/www/html/wiki135

#php maintenance/update.php

4. added("extensions/Mpdf/composer.json") in wiki135/composer.local.json-sample


{

"extra": {

"merge-plugin": {

"include": [

"extensions/Mpdf/composer.json"] } } }


5. in mpdf dir

#composer update --no-dev

6.added in LocalSettings.php

require_once( "$IP/extensions/Mpdf/vendor/autoload.php");

wfLoadExtension( 'Mpdf' );

$wgMpdfSimpleOutput=true;

7.Given 777 to all 3 dir (/data/www/html/wiki135/extensions/Mpdf/vendor/mpdf/mpdf)

/ttfontdata/

/tmp/

/graph_cache/


http://localhost/wiki135/index.php/Main_Page?title=Main_Page&action=mpdf

Reply to "Need to Install PDF Renderer Service which would support to embed the images."

How to configure authentication with LDAPS?

4
Laujc (talkcontribs)

I have installed and configured LDAPAuthentication2, LDAPProvider, and PluggableAuth extensions for authentication via our domain. I can login with using port 389 but when using the secure port 636, it failed every time. In the ldap.log,it keeps showing: ldap_connect( $hostname = 'ldap://mysite.com:636', $port = 389


I'm not sure where that "$port=389" comes from in this log. In my localsettings.php, I specifically set the port to 636. The error said, "returns Can't contact LDAP server". I assumed either the port or server is wrong. I'm not sure what other settings need to be looked at. Any help is much appreciated.

Bawolff (talkcontribs)

I don't know much about ldap, but if using the secure port, you probably need ldaps://mysite.com:636 (The S in the protocol means secure). The second port 389, is an old mechanism in php, which should be overriden by the port in the url, so i think the log is confusing, but does not mean its actually using that port.

Laujc (talkcontribs)

How do I specify the "s" in the protocol? This is my php array configuration.

$LDAPProviderDomainConfigProvider = function() {

$config = [

'myDomain.com' => [

'connection' => [

"server" => "ldap.myDomain.com",

"port" => 636,

"user" => "cn=LDAPMediaWiki,ou=ldap,ou=other,ou=myDomain users,dc=myDomain,dc=com",

"pass" => "password",

"enctype" => "tls",

"options" => [

"LDAP_OPT_DEREF" => 1

],

"basedn" => "dc=myDomain,dc=com",

"groupbasedn" => "ou=myDomain groups,dc=myDomain,dc=com",

"userbasedn" => "ou=myDomain users,dc=myDomain,dc=com",

"searchattribute" => "samaccountname",

"usernameattribute" => "samaccountname",

"realnameattribute" => "displayname",

"emailattribute" => "mail",

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

],

]

];

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

};

Laujc (talkcontribs)

Does anyone has any suggestion?

Reply to "How to configure authentication with LDAPS?"

New site / garbage in Opera, Vivaldi / ok in Firefox / Chrome goes somewhere else

3
Summary by GordonBernstein
GordonBernstein (talkcontribs)

I've just installed MediaWiki for a test installation, but I am running into some unexpected results.

- Firefox is the only browser showning what I expected

- Opera and Vivaldi show just garbage

- Chrome shows a default page of the webhoster, that this domain is parked

Produkt Versjon
MediaWiki 1.36.0
PHP 7.3.19 (cgi-fcgi)
MySQL 5.7.23
ICU 63.1

Site: intranett.node.no

Malyacko (talkcontribs)
GordonBernstein (talkcontribs)

Please help me with Main Page layout

4
Itwasabadidea (talkcontribs)

Our company has just instalees MediaWiki.

We would like to use this kind of blocks for main page: https://yadi.sk/i/xBBc7uoXcNy70Q


Please help to add them to main page.

Malyacko (talkcontribs)
Itwasabadidea (talkcontribs)

Thank you for the answer! I am still not clear how to use it..

can help with simple steps ? How do I import Mainpage Template to mine wiki ? i need only those blocks...

Malyacko (talkcontribs)
Reply to "Please help me with Main Page layout"

Does Extension:Mpdf generate PDF with IMAGE?

2
Apatha11 (talkcontribs)

HI Support Desk,

Following are the installed software product version(s) those are being used in our RHEL7 server environment.

Product Version
MediaWiki 1.35.1
PHP 7.4.15 (apache2handler)
MySQL 8
OS LINUX

Is this extension convert html to pdf with Image?

Is this compatible with PHP 7.4?

I have tried MPDF and it's downloading pdf but not giving the full path of the image, can you please suggest where we can enable a full path for an image?

When I set format as a HTML in url (&format=html), I saw the image URL is not full (/wiki135/images/5/57/enterprise-wiki.jpg).

Can you please suggest from where its pickup up URL and how can get pdf with the image?

Malyacko (talkcontribs)

Extension:Mpdf answers the first two questions. Where to see some "full image URL"? In the PDF output?

Reply to "Does Extension:Mpdf generate PDF with IMAGE?"
Satyaps2251 (talkcontribs)

Hallo,

I have configured $wgSMTP in Mediawiki,but when im trying reset Password .

Mediawiki sends no mails on my account..

Please can anyone suggest me,how to find out it..


Thank you

Satyaps2251 (talkcontribs)

Hallo,

Thank you,but i dont understand..

Ciencia Al Poder (talkcontribs)

Maybe your server is blocking outgoing access to the SMTP port of the remote server (some hostings block them to prevent spam, unless users explicitly ask to open it), or the remote server doesn't accept your mails.

If you can run a command-line email tool to send a test email you may find if it errors or what could be the problem. If you feel adventurous, telnet or netcat can be used to send SMTP commands directly to the server. At least it allows for a basic connectivity test.

Jonathan3 (talkcontribs)

What are your $wgSMPT settings? When I moved off a shared server to a VPS I had to start using Mailgun (other services are available...) as it wasn't worth the effort setting up a mail server.

Ciencia Al Poder (talkcontribs)

Well, now that you mention it... some mail providers, specially Outlook, will block incoming emails from some VPS network ranges, and there's no way to lift them

Satyaps2251 (talkcontribs)

Hi,Thank you for your reply..

please can you prpvide screen shots, how can run command-line email tool ( Im not expert on mediawiki..,)

Thank you very much

Ciencia Al Poder (talkcontribs)
Reply to "Mediawiki sends no Mails.."

[RESOLVED] Category displaying "only the following" even for more than 1 item!

9
Phantomsteve (talkcontribs)
MediaWiki 1.22.1
PHP 5.3.27 (cgi-fcgi)
MySQL 5.1.72-cll

When I look at a category, it shows "only" no matter how many items are listed, for example:

Category:My-Category

Subcategories
This category has only the following subcategory.
S
Subcat1
Subcat2

Pages in category ‘My-Category’

This category contains only the following page.
P
Page-1
Page-2

Is there a setting that I need to change (or may have accidentally changed) to make sure it says "the following subcategories/pages" when there are more than one (it correctly show the "only" message for a single item)?

MarkAHershberger (talkcontribs)
Phantomsteve (talkcontribs)

The message is correct on other wikis that I tried - it seems to be just mine!

The two -count messages are both exactly as shown in the file, so I'm not sure why it's not working on my wiki!

Unless there are others who are having the problem, I think it's a problem with my set-up rather than a bug!

Ricordisamoa (talkcontribs)

Did you create MediaWiki:Category-subcat-count or MediaWiki:Category-article-count on your wiki? Then delete them.

Bawolff (talkcontribs)

Go to mywiki.com/w/index.php?title=Special%3ACategories&from=My-category&limit=1 (replacing My-category with the cat name, and mywiki.com with the url). What sort of counts are shown for that category.

It sounds like there is a mismatch between how many articles are actually in that category and how many MediaWiki thinks there is. However if its a small category (<200 members) this shouldn't happen as inconsistencies are checked for small categories. And even in a big category it should output category-subcat-count-limited in a situation like this.

Do you have any category related extensions installed (e.g. CategoryTree) [CategoryTree shouldn't cause this, but good to collect details]

If your wiki is public, a link to it would be helpful.

Phantomsteve (talkcontribs)

Thanks for the help and sugegstions so far, everyone - it is appreciated! This is only a little niggle, but it annoys me, and I'd prefer to get it sorted!

1. I have not created the system messages, it uses the default

2. A link to the wiki, going to an example category that isn't displaying properly, is here - do you need to be able to log in, or can you do it as is?

3. The only category-related addition is HotCat

4. The link you suggested trying (http://wiki.sepe.org.uk/index.php?title=Special%3ACategories&from=Comic_People&limit=1) shows: Comic People‏‎ (71 member)

Ricordisamoa (talkcontribs)

It looks like the 'plural' function is completely broken on your wiki: should return '$1 days and my bananas' but it returns '2 day and my banana' instead.

Try looking at your i18n/L10n settings.

Bawolff (talkcontribs)
Phantomsteve (talkcontribs)

Thanks - rebuilding the cache worked!

Thanks everyone for their help, I'll marked this as resolved!

Reply to "[RESOLVED] Category displaying "only the following" even for more than 1 item!"

MediaWiki Application on MS Azure

2
46.208.91.232 (talkcontribs)

Hi Mediawiki,

I am looking for a contact to send an email to, regarding a Mediawiki application on the MIicrosoft Azure AD gallery.

If someone can respond to v-mmahmood@microsoft.com. Your urgent response would be most appreciated.

Thank you

Kind regards

Mohammed

Bawolff (talkcontribs)

hi, i dont think that's an official mediawiki distribution, so we're not involved with it (AFAIK)

Reply to "MediaWiki Application on MS Azure"

Show text for only logged out or in users

2
Jkrosado (talkcontribs)

I want to put a greeting on the main page that says something like "Hello, <username>!" for logged in users and "Hello! Log in or register" for logged out users. How can I do this. I want it to display this on the same page, too.

Bawolff (talkcontribs)

extension:userFunctions might help.


May have performance implications (since it cannot reuse page text across users)

Reply to "Show text for only logged out or in users"

Problem reading article from inside extension

5
2003:E7:5704:900:AD27:9111:48F9:9408 (talkcontribs)

Hello Support.


I have written an extension which loads a Latex preamble, adds contents from Wiki page section and generates and displays the Latex compilation result. It has been working for many years. Now I need to make the preamble editable and I miserably fail.


The working code looks as follows:


    $templateFileName = TEMPLATE_PATH."amstex1.tex";

    $template = file_get_contents( $templateFileName);

    self::debugLog ("have template file \n");


What I now want to do instead is this:


   // attempt to get template from mediawiki itself

    self::debugLog  (" Will now load from mediawiki itself \n");

    try {

      $myTitle = Title::newFromTextThrow( 'MediaWiki:AmstexTemplate' );

      if ($myTitle->canExist) {self::debugLog ("can exist");}

      else {self::debugLog("not existing");}

      $myArticle = new Article( $myTitle );

      $template = $myArticle->getPage()->getContent()->getNativeData();

      self::debugLog ("Done");

    } catch (Exception $e) {  self::debugLog ("In generateTex exception handler");   }

    self::debugLog  ("Loaded template");


My problem is: It looks like the system vanishes into Nirwana in the Title::newFromTextThrow call. I get no debug information, no exception, just nothing. So I also fail to debug this.


What can I do?

2003:E7:5704:900:AD27:9111:48F9:9408 (talkcontribs)

I also had various other versions, such as

$myTitle = Title::newFromTextThrow( 'AmstexTemplate', NS_MEDIAWIKI );

but the problem seems that I get absolutely no debug or return information back.

2003:E7:5704:900:AD27:9111:48F9:9408 (talkcontribs)

Looks like the server is complaining that it does not find the class Title. How come?

2003:E7:5704:900:AD27:9111:48F9:9408 (talkcontribs)

But when I

include "/var/www/html/wiki4/includes/Title.php";

I get a Cannot declare class Title, because the name is already in use.

2003:E7:5704:900:AD27:9111:48F9:9408 (talkcontribs)

Ok. Sorry. Problem solved. It was a twisted logic in the extension. Sorry for bothering.

Reply to "Problem reading article from inside extension"