Project:Support desk

Jump to navigation Jump to search

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.

25
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 up properly as given in MPDF documentation. (Extension:Mpdf)


The path is not coming full in HTML. (/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

Osnard (talkcontribs)

Have you set `$wgServer` or `$wgCanonicalServer` in you wikis configuration?

Have you set `$wgMpdfSimpleOutput = false`?

Apatha11 (talkcontribs)

When I set $wgMpdfSimpleOutput = true , its giving me PDF without image, but when I set it false its giving error:

/data/www/html/wiki135/extensions/Mpdf/vendor/mpdf/mpdf/classes/otl.php: Can't open file /data/www/html/wiki135/extensions/Mpdf/vendor/mpdf/mpdf/ttfontdata/dejavusanscondensed.GSUBGPOStables.dat


I cant see this file dejavusanscondensed.GSUBGPOStables.dat in /ttfontdata

I have already given 777 to Dir /Mpdf/vendor/mpdf/mpdf/ttfontdata/


$wgServer , Yes we have set our server name in Localsettings.php

Apatha11 (talkcontribs)

Please help me to fix this.

Osnard (talkcontribs)
Apatha11 (talkcontribs)

Hi As I can see there are many posts are pending, no one replied even. Could you please suggest to me something else, I need to fix this ASAP.

Kindly check my steps what I have done, if you think that something I missed please let me know.

Osnard (talkcontribs)

You may want to evaluate BlueSpice. It is available as Docker image. So you don't need to set up the PDF-Export manually.

Apatha11 (talkcontribs)

How to use BlueSpice, As there is no proper documentation that how to implement this in our application.

Osnard (talkcontribs)
Apatha11 (talkcontribs)

Is BlueSpice work as an extension like Mpdf or its separate CMS like a wiki. The new implementation will take time and I need to fix it by this week only. Kindly suggest working extension with PHP 7.4, if possible provide proper documentation for PDF export with BlueSpice.

One more thing, We are using LDAP+SSO login in our application Can you confirm that is MPDF compatible with these Protocol services.

Apatha11 (talkcontribs)

Hello Team,

Can you please confirm the above information?

Osnard (talkcontribs)

AFAIK MPdf is not affected in any way by the choice of the authentication method.

BlueSpice is a "distriution" of MediaWiki. You can think of it as an extension bundle, tailored to business needs. It has extensions for PDF export and LDAP/SSO.

157.39.144.18 (talkcontribs)

Hello,

I am facing issue when trying to export PDF.


Internal error

Jump to navigationJump to search

[YNA2dtUOfwBtUQ0sXxfrYQAAAAo] 2021-06-21 06:49:26: Fatal exception of type "MpdfException"

Apatha11 (talkcontribs)

But it's affecting our project, with LDAP+SSO it's not working and it's throwing us an unauthorized error in the image function. ( function _imageTypeFromString(&$data) )

$data is printing unauthorized error.

We have set 777 permission to the image folder.

We are already configured MPDF, if possible please provide any resource who can resolve this issue, In the above post, I have mentioned all steps that I have done in MPDF.


The same code is working fine where we are not using LDAP+SSO. Are you sure that MPDF works with the server which is secured with a password?

Osnard (talkcontribs)

No I am not sure. Apparently Mpdf actually tries to load the files via HTTP and therefore fails on the webserver authentication. One way to fix this could be to add a "bypass" of that authentication for any HTTP call coming from "localhost". If you are using Apache Webserver with "mod_auth_kerb" you can do this by "Require ip 127.0.0.1". Be aware that the requests by Mpdf will probably be "anonymous" (no user context). Therefore you may need to also adjust wiki permissions in such cases (e.g. setting "read" permission for "*" group). Such bypasses are always a little hacky.

Btw. you should not use "777" on your "images/" directory.

Apatha11 (talkcontribs)
Malyacko (talkcontribs)
Apatha11 (talkcontribs)

Is ElectronPDFService is compatible with wiki 1.35?

Error:

The requested URL /api/rest_v1/page/pdf/Main_Page was not found on this server.

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

contact hosting customer support

1
Michaelbaribeau (talkcontribs)

"Internal Server Error: The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator at webmaster@rockyhorrorwiki.org to inform them of the time this error occurred, and the actions you performed just before this error. More information about this error may be available in the server error log."

according to faq...

Ask your hosting customer support to disable it completely or the rules affecting your edits."

But who is my "hosting customer support" and how do I contact them?

@Michaelbaribeau

Reply to "contact hosting customer support"

What is an Nstab in MediaWiki terminology?

6
2001:44C8:44C8:6B18:28FD:BC92:A295:3870 (talkcontribs)
Malyacko (talkcontribs)

It is a namespace tab.

2001:44C8:44C8:6B18:28FD:BC92:A295:3870 (talkcontribs)

Some example of the term in the context of MediaWiki would be helpful.

Jonathan3 (talkcontribs)

On the standard Vector skin there are two main tabs, one for the page and one for the related talk page. I guess their names vary per namespace and this is how you set the relevant values.

PerfektesChaos (talkcontribs)

The tab in the upper left corner of this (desktop) page is labeled “Topic” in English but “Thema” in German as controlled via MediaWiki:nstab-topic (imported from upstream) and “Wątek” in Polish via local MediaWiki:nstab-topic/pl. Well, if you visit the particular thread.

The main namespace, the focus of interest with ns=0, is called “Gallery” on commons:Earth but “Article” on w:en:Earth (English Wikipedia) and “Item” on d:Q2 (Wikidata). Defined via MediaWiki:nstab-main or inherited from upstream (“Page”).

2001:44C8:424C:7D3F:F1D0:3E15:B502:52D5 (talkcontribs)

So I understand that Nstab is the tab which would generally be "main page" (for main pages only) or "article" (for article pages only), "topic" (for topic pages here in the MediaWiki community website), etc. and is pretty much only the uppermost-leftmost tab in MediaWiki websites.

Reply to "What is an Nstab in MediaWiki terminology?"

There seems to be a problem with your login session; this action has been canceled as a precaution against session hijacking. Please resubmit the form. - again, but on a local host

5
Keyacom (talkcontribs)

Hello, I have installed MediaWiki on a local host, but this message appeared while logging in to the MediaWiki account: "There seems to be a problem with your login session; this action has been canceled as a precaution against session hijacking. Please resubmit the form." I'm using XAMPP to launch the local host.

Bawolff (talkcontribs)

try setting $wgSessionCacheType = CACHE_DB;

This issue usually means something is wrong with cache config (e.g. apcu). It will likely also make your wiki be slow.

Check also you have cookies enabled

Keyacom (talkcontribs)

But then, I got the following (in Polish):

[acc7e29f297d1335de199a15] 2020-01-26 08:07:31: Krytyczny wyjątek typu „InvalidArgumentException”

I refreshed the page and got:

[894563b0ab7719a1d0e77f99] 2020-01-26 08:07:57: Krytyczny wyjątek typu „InvalidArgumentException”

I copied the coding and placed in LocalSettings.php, with quote marks around "CACHE_DB". I ended up removing the quote marks. The login works.

Bawolff (talkcontribs)

yes, not having quote marks is important. CACHE_DB is a constant not a string.

Rbirmann (talkcontribs)

Hi all, I was having the exact same issue. No recent install or upgrade. Things were running fine and than, all of the sudden, I could not login on my browser of choice (Chrome). I could, however, login using an incognito window on Chrome or a different browser (tryed Firefox).

I solved it by clicking on the "forgot password" link and changing my password. Now things are back to normal.

Hope this helps

Reply to "There seems to be a problem with your login session; this action has been canceled as a precaution against session hijacking. Please resubmit the form. - again, but on a local host"

Cargo query export to Excel or CSV gives error This page isn’t working

11
Pharmankur (talkcontribs)

Hi,

I am trying to install Mediawiki for our internal Documentation in organisation.

Product Version
MediaWiki 1.35.2
PHP 8.0.7 (apache2handler)
MariaDB 10.1.48-MariaDB-0ubuntu0.18.04.1
ICU 65.1
Lua 5.1.5

When I am setting a cargo query to output as table, it works fine. But when I set it to export results to CSV or Excel file then on clicking file download link, it shows a blank page saying --


This page isn’t working

XXX.XX.XXX.XX is currently unable to handle this request.

HTTP ERROR 500


I am sure our server is working fine, so there is no problem with it.

I also did NOT find any special settings instructions in Cargo to enable export in CSV or Excel. So I am clueless what is wrong or where to find out.

Please help !

Osnard (talkcontribs)

Hi! Are there any logs available? PHP error log for example? Please have a look at Manual:How_to_debug to learn about getting logs.

Jonathan3 (talkcontribs)

You'd definitely get an answer on the Cargo talk page.

Pharmankur (talkcontribs)

@Osnard

Hi, Php error reporting is already enabled by


<?php

error_reporting( -1 );

ini_set( 'display_errors', 1 );


@Jonathan3

Somehow I did not find any help available on setting up excel or csv export !

Osnard (talkcontribs)

An Error 500 must leave traces in the logs. Without them the error can not be fixed.

Jonathan3 (talkcontribs)

What's your Cargo query?

Pharmankur (talkcontribs)

Hi

@Osnard

With my default log setting LogLevel warn [ in /etc/apache2/apache2.conf ]

Only log entry there [ in /var/log/apache2/error.log ] is :-


[Sat Jun 19 13:24:29.712779 2021] [mpm_prefork:notice] [pid 21458] AH00163: Apache/2.4.29 (Ubuntu) configured -- resuming normal operations

[Sat Jun 19 13:24:29.712864 2021] [core:notice] [pid 21458] AH00094: Command line: '/usr/sbin/apache2'


If there is any other place to look for the logs, I am not aware.


@Jonathan3

My cargo query which works (shows a table on webpage) :-

{{#cargo_query: tables=Infobox |fields=Infobox._ID, Infobox._pageName, Infobox.Description, Infobox.01_Type_of_Document, Infobox.02_Doc_ID_No, Infobox.03_Supersede_by, Infobox.06_Effective_from_date, Infobox.07_Review_on_date, Infobox.04_For_Department, Infobox.09_Other_Info, Infobox.10_Prepared_by, Infobox.11_Checked_by, Infobox.12_Approved_by |format=table }}


But when I want the same table downloadable in excel, I am trying (and gives error in the discussion) :-

{{#cargo_query: tables=Infobox |fields=Infobox._ID, Infobox._pageName, Infobox.Description, Infobox.01_Type_of_Document, Infobox.02_Doc_ID_No, Infobox.03_Supersede_by, Infobox.06_Effective_from_date, Infobox.07_Review_on_date, Infobox.04_For_Department, Infobox.09_Other_Info, Infobox.10_Prepared_by, Infobox.11_Checked_by, Infobox.12_Approved_by |format=excel }}

Pharmankur (talkcontribs)
Jonathan3 (talkcontribs)

That's helpful. I get the same error:

This page isn’t working
www.... is currently unable to handle this request.
HTTP ERROR 500

format=csv works and can be loaded by Excel.

I wonder whether @Yaron Koren: could help here.

Osnard (talkcontribs)

Can you confirm you have installed "PhpSpreadsheet" as stated on the official docs?

  • If you plan to export data to an Excel spreadsheet, you need to install the PhpSpreadsheet library on your server. This can be done by adding phpoffice/phpspreadsheet to your composer.local.json and running composer update --no-dev -o.
Jonathan3 (talkcontribs)

I don't, and hadn't noticed that requirement when reproducing the error above - oops.

Reply to "Cargo query export to Excel or CSV gives error This page isn’t working"

I want to start a wiki like wikiHow experts can you help me?

1
Kunalyadav1234 (talkcontribs)

Please help me in creating a wiki like wikiHow

Reply to "I want to start a wiki like wikiHow experts can you help me?"
EGCasas (talkcontribs)

Hi everyone,


I have a wiki site that I can edit. I can create pages and edit them just fine, but I need to build the whole site in english and spanish. Is it possible to do this without installing the translation extension? I don't have access to the server, just the frontend functionality for editing the site. Is it possible to create a link in the left sidebar to spanish and english versions of the site; is there an easier way to do this?

I'm very new to MediaWiki and any help is appreciated.


Thanks!

MarioSuperstar77 (talkcontribs)
EGCasas (talkcontribs)

Thanks

Reply to "Translating Content"
143.97.2.35 (talkcontribs)

I am getting error for some pages. Can anyone help here?

AA] 2021-06-21 10:39:18: Fatal exception of type "MpdfException"

Reply to "Error in MPDF"

execute php in mediawiki page

1
2A02:2F0C:5A0C:4E00:9C78:A978:1B20:2BD7 (talkcontribs)

Hi,

I want MediaWiki to execute a PHP code when I open a page. Example

<?php $_SESSION['pageName']="XYZ"; ?>

so I can use this information (the session value) in another PHP form that I have designed.

Is there a way?

thanks in advance

Reply to "execute php in mediawiki page"

Is it possible to clear a user's watchlist as an Admin user?

8
71.192.251.183 (talkcontribs)

When we have users that leave our organization we disable them in mediawiki, however, if they had pages in their watchlist that get edited, mediawiki still tries to send them an email. This email bounces due to their email account no longer existing. What is the best way to manage watchlist for 'gone' accounts?

PerfektesChaos (talkcontribs)

An “Admin user” has no access to private things, and I am not aware of any configuration that permits wiki users to interact here.

However, there is the site sysop with database access. They can act as master next to god and at least delete records and field contents from involved databases.

71.192.251.183 (talkcontribs)

How would this work exactly? We are hoping to not have to manually interact with the underlying database.

Jonathan3 (talkcontribs)
71.192.251.183 (talkcontribs)

We don't know the user's credentials.

Jonathan3 (talkcontribs)
71.192.251.183 (talkcontribs)

Thank you. Yes, we can do that, but were hoping for a simpler process. 'Blocking' a user should prevent email from sending to that account and ideally clear their watchlist as well, or at least have the option to.

PerfektesChaos (talkcontribs)

I am afraid a password reset has no influence on mailing behaviour. For security I will tell you the more safe way.

  • First you need any DMS tool which is able to edit your database. There are hundreds, also for free.
  • If you want to disconnect people forever, you may open database table user.
    • Flter to the user_name in question.
    • Clear field user_email of that record.
    • Without address there is no spam any longer.
  • If you want to keep connection in some cases, you could operate selectively.
  • Then you need the user ID of the account in question.
  • Now open database table user_properties​ and filter to that user ID.
  • There are three fields in this table:
    • up_user
    • up_property
    • up_value
  • You might simply delete records you do not like.
  • Or you might want to selectively change preferences. Those up_property related to page editing business are and may be deleted or cleared:
    • echo-subscriptions-email-article-linked
    • echo-subscriptions-email-edit-thank
    • echo-subscriptions-email-mention
    • echo-subscriptions-email-page-review
    • echo-subscriptions-email-reverted
Reply to "Is it possible to clear a user's watchlist as an Admin user?"