Project:Support desk

About this board

Welcome to the MediaWiki Support desk. This is a place where you can ask any questions you have about installing, using or administrating the MediaWiki software.

(Read this message in a different language)

See also

Before you post

Post a new question

  1. To help us answer your questions, please indicate which version of MediaWiki you are using, as found on your wiki's Special:Version page:
  2. If possible, add $wgShowExceptionDetails = true;error_reporting( -1 );ini_set( 'display_errors', 1 ); to LocalSettings.php in order to make MediaWiki show more detailed error messages.
  3. 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.
  4. To start a new thread, click the box with the text "Start a new topic".

How to insert Note references through VisualEditor

1
Guillaume Taillefer (talkcontribs)

Hello, I was trying to find out if it was possible to insert notes instead of citations in VisualEditor instead of having to just do hidden comments from readers. I would like to have it like Wikipedia where you are given the option to easily use templates such as Template:Refn without having to manually do it each time within the wiki editor.

Thanks

Reply to "How to insert Note references through VisualEditor"

The Translation tool has too many problems

3
Filipe46 (talkcontribs)

I already complained about that, made the ticket and everything. Yet, no solutions were presented.

The tool keeps flagging every single stretch of the text as having 100% to 96% unmodified text, thus blocking the publication of the article. Almost every translation keeps giving me the false-positive of it being an earlier version of the article, thus also impeding the publication of the same.

The tool never saves the infobox, thus forcing me to remake it every time I open the translation. It keeps losing entire paragraphs already translated, thus wasting my time in re-translating the same thing 3 or 4 times.

It also clashes auto translation with my translations, usually on links.

Malyacko (talkcontribs)
Filipe46 (talkcontribs)

No, and nothing was done to correct it.

Reply to "The Translation tool has too many problems"
CrickCity (talkcontribs)

I can't log in with either my BoxRec Account or my Media Wiki account. I am trying ti upload an image to BoxRec.

Reply to "Log-in issues"

Add Sitelinks to my local wikibase instance

1
Antoine7812 (talkcontribs)

Hello,

Mediawiki version: 1.40.1

I am currently trying to add sitelinks to my wikibase. I succeeded by adding wikipedia (I have the box Wikipedia), so I can add for example the sitelinks "enwiki" with the page "Earth" (that is autosuggested by the input) but I encounter this error:

    "errors": [

        {

            "code": "no-external-page",

            "data": {

                "messages": [

                    {

                        "name": "wikibase-api-no-external-page",

                        "parameters": [

                            "enwiki",

                            "Password"

                        ],

                        "html": {

                            "*": "The external client site \"enwiki\" did not provide page information for page \"Earth\"."

                        }

                    }

                ]

            },

            "module": "main",

            "*": "The external client site \"enwiki\" did not provide page information for page \"Earth\"."

        }

    ],

I don't understand the error because I have the autosuggested propositions on the input where I can add the sitelinks. My sites table was filled with the populateSitesTable script.

Thank you in advance for your help,

Best regards,

Antoine

Reply to "Add Sitelinks to my local wikibase instance"

Assistance Needed with Calculating Totals in a Wiki

1
Anuragvani (talkcontribs)

Hello,

I hope this message finds you well.

I am reaching out for some assistance with formulating codes. I have a list of speakers from a book(attached a link for the same) and need a way to automatically calculate the totals in a column within a wiki. Is there any existing functionality in wiki tools that can help with this?

https://vanipedia.org/wiki/User:Anurag/Vanifun

Thank you in advance for your help!

Best regards,

Anurag

Reply to "Assistance Needed with Calculating Totals in a Wiki"

Force thumbnail generation with PdfHandler?

6
Kjecl (talkcontribs)

I recently performed an reinstall and database restore of a Wiki to fix a different problem. An unexpected positive side effect was that thumbnails are now generated for new PDF files uploaded to the Wiki. Cool!

Is there a way to force the generation of thumbnails for previously uploaded PDFs? I have tried:

php refreshImageMetadata.php -f

followed by:

php rebuildImages.php

without effect.

Thanks for any suggestions.

Bawolff (talkcontribs)

What do the old images look like? Is there an error message instead of a thumbnail or is it just missing. Does mediawiki show the correct dimensions for the files in question (as in, does it say it is 0x0 pixels or does it give a real number)?

Kjecl (talkcontribs)

Thank you for your interest in my problem.

The thumbnails for older files are a red stylized 'A' on a white background. Nope, no error message.

If I go to the Special:ListFiles page, and click on a red A icon, it shows dimensions of 0 x 0.

I wonder if I could use importImages.php to reload all of the older files. An experiment is in order for one of those files, I think.

Kjecl (talkcontribs)

Yes, I can use importImages.php to reload an older file. No, it does not help.

Bawolff (talkcontribs)

So the 0x0 usually means that Extension:PdfHandler had problems running the pdfinfo command, which would prevent the creating of thumbnails.

However if new files are working, then that means that it should be able to run the pdfinfo command.

In general, running refreshImageMetadata.php -f should fix that. Does the script actually say it refreshed the file in question? If it still isn't working, i could see two possible problems:

  • some sort of cache issue. You could try adding ?action=purge (or &action=purge ) to the end of the File: page (the page in the wiki, not the actual file) to see if that does anything to help
  • the older files aren't readable by the webserver. This could potentially happen if when you transfered webservers the image files had the wrong permissions or some other sandboxing system prevented access.

Both of those feel kind of a long shot though.

Of course its always possible the file being tested is just a broken pdf.

Kjecl (talkcontribs)

I used:

ls -lR | grep -v -e <string>

at the top level of the image upload folder, where string was either the owner or the permissions, to check that. I did not find any files with the wrong permissions or ownership.

refreshImageMetadata.php -f

does not say that it refreshed the files (~80 of them) in question. pdfinfo is able to run against all of the files in question sufficiently to report the PDF version. PDF versions for these files range from 1.3 to 1.7.

FILES=$(find $PREFIX -name "*.pdf" -type f | grep -v "/temp" | grep -v "/deleted" | grep -v "/archive" )

for F in $FILES; do

   echo $(pdfinfo $F | grep "PDF version")    $F

done

So, there are about 80 of these files with the 'red A' thumbnails. Apart from the likelihood of error, we could re-upload all of them to get the new thumbnails. We would prefer not to need to take that approach. Also, there is the concern that this symptom betides some problem that will bite us later.

Thanks again for your help.

Reply to "Force thumbnail generation with PdfHandler?"

Images not shown - "you don't have permission to access this resource"

8
FipsStel (talkcontribs)

I am not seeing the images I am uploading into my wiki.

I am getting the following message when clicking on an image.

"you don't have permission to access this resource.Server unable to read htaccess file, denying access to be safe"

So, it's about permissions, but where can I change them?


I am using MediaWiki 1.39.1.

Bawolff (talkcontribs)

So it sounds like the permissions of a .htaccess file. You should be able to change it from the command line with chmod (e.g. chmod a+r /var/www/html/w/images/.htaccess assuming your wiki is installed in /var/www/html/w/ ).

FipsStel (talkcontribs)

This needs to be inputed into the .htacess?

Bawolff (talkcontribs)

No. The permissions on the .htaccess file need to be changed.

77.0.27.3 (talkcontribs)

Dear Community,

I have exactly the same problem. I can upload images to wikimedia, but when I try to access them, it says "You don't have permission to access this resource.Server unable to read htaccess file, denying access to be safe"

The permissions for htaccess are set correctly though(either 664 or 775 doesn't work). Can anyone help me further with this`?


kind regards,

Stefan

DAChristiansen (talkcontribs)

Has anyone figured this issue out? I am able to upload images - but get the same error above - Am also able to change permissions on the .htaccess file but no combination seems to work.

Thanks in advance,

Dean

Bawolff (talkcontribs)

If its not file permissions, it could be some other access control technique, like selinux or ACLs. Also be sure you are changing permissions on the correct .htaccess file as well as the .htaccess in all parent directories if they exist.

DAChristiansen (talkcontribs)

I deleted the image directory .htaccess file; and my image directory permission is set to 755 - my images now seem to be showing normally.

thanks,

Dean

Reply to "Images not shown - "you don't have permission to access this resource""

$wgHiddenPrefs[] = “skin”; error

2
鈴音雨 (talkcontribs)

Hi, I have only loaded the Citizen skin on my wiki and I used $wgHiddenPrefs[] = “skin”; to hide the skin settings from Preferences, but I get an error on the preferences page.

[7fc6880336eec79626218910] /wiki/Special:Preferences DomainException: HTMLForm::getField: no field named skin
Backtrace:
from /home/<username>/domains/<domain>/public_html/includes/htmlform/HTMLForm.php(458)
#0 /home/<username>/domains/<domain>/public_html/includes/htmlform/HTMLFormField.php(153): HTMLForm->getField()
#1 /home/<username>/domains/<domain>/public_html/includes/htmlform/HTMLFormField.php(168): HTMLFormField->getNearestField()
#2 /home/<username>/domains/<domain>/public_html/includes/htmlform/HTMLFormField.php(284): HTMLFormField->getNearestFieldValue()
#3 /home/<username>/domains/<domain>/public_html/includes/htmlform/HTMLFormField.php(272): HTMLFormField->checkStateRecurse()
#4 /home/<username>/domains/<domain>/public_html/includes/htmlform/HTMLFormField.php(350): HTMLFormField->checkStateRecurse()
#5 /home/<username>/domains/<domain>/public_html/includes/htmlform/HTMLFormField.php(396): HTMLFormField->isHidden()
#6 /home/<username>/domains/<domain>/public_html/includes/preferences/DefaultPreferencesFactory.php(350): HTMLFormField->validate()
#7 /home/<username>/domains/<domain>/public_html/includes/preferences/DefaultPreferencesFactory.php(265): MediaWiki\Preferences\DefaultPreferencesFactory->loadPreferenceValues()
#8 /home/<username>/domains/<domain>/public_html/includes/preferences/DefaultPreferencesFactory.php(1895): MediaWiki\Preferences\DefaultPreferencesFactory->getFormDescriptor()
#9 /home/<username>/domains/<domain>/public_html/includes/specials/SpecialPreferences.php(147): MediaWiki\Preferences\DefaultPreferencesFactory->getForm()
#10 /home/<username>/domains/<domain>/public_html/includes/specials/SpecialPreferences.php(114): MediaWiki\Specials\SpecialPreferences->getFormObject()
#11 /home/<username>/domains/<domain>/public_html/includes/specialpage/SpecialPage.php(727): MediaWiki\Specials\SpecialPreferences->execute()
#12 /home/<username>/domains/<domain>/public_html/includes/specialpage/SpecialPageFactory.php(1621): MediaWiki\SpecialPage\SpecialPage->run()
#13 /home/<username>/domains/<domain>/public_html/includes/MediaWiki.php(357): MediaWiki\SpecialPage\SpecialPageFactory->executePath()
#14 /home/<username>/domains/<domain>/public_html/includes/MediaWiki.php(960): MediaWiki->performRequest()
#15 /home/<username>/domains/<domain>/public_html/includes/MediaWiki.php(613): MediaWiki->main()
#16 /home/<username>/domains/<domain>/public_html/index.php(50): MediaWiki->run()
#17 /home/<username>/domains/<domain>/public_html/index.php(46): wfIndexMain()
#18 {main}

I originally posted this on Skin talk:Citizen, but I heard that the problem is not Citizen related, so I came here. Using: MediaWiki 1.41.1 Citizen: 2.13.1

Bawolff (talkcontribs)
Reply to "$wgHiddenPrefs[] = “skin”; error"

Scripted initial population of MediaWiki database

5
Dstahlberg (talkcontribs)

As part of an Ansible-scripted setup of a MediaWiki site, I need to configure MediaWiki. The LoadSettings.php can be prepared in advance and copied to the site, but is there a scripted way to initially populate the database without manually accessing the Installation page?

Thanks for any pointers and tips!

Bawolff (talkcontribs)

Use install.php script in the maintenance directory which can be run from commandline.

Alternatively you could just take a database dump of a fresh install and import that.

Dstahlberg (talkcontribs)

Thank you for the reply! I will use Install.php. When I previously looked at the documentation it did not say that it populated the database so I skipped it, but now I've tried and it does. I will try to add this to the documentation.

Bawolff (talkcontribs)

P.s. you might also be interested in the Meza project

Dstahlberg (talkcontribs)

Will Do !

Reply to "Scripted initial population of MediaWiki database"

1.39 how to setup mobile skin?

5
2003:C2:3F21:FD00:9449:AC0F:F20E:94B7 (talkcontribs)

Mediawiki 1.39.6, PHP 7.4.3, MySQL 8.0.36

wfLoadExtension( 'MobileDetect' );
wfLoadExtension( 'MobileFrontend' );
wfLoadSkin( 'MinervaNeue' );
$wgMFDefaultSkinClass = 'SkinMinerva';
$wgDefaultMobileSkin = 'MinervaNeue';
$wgMinervaEnableSiteNotice = true;
$wgMFAutodetectMobileView = true;
$wgMFEditorOptions = array(
        'anonymousEditing' => false,
        'skipPreview' => false
);


Till 1.35 we used to have MinervaNeue as mobile skin. With 1.39, this doesn't work anymore. Mobile devices apparently use the vector skin. What will i have to do to make the mobile skin work?

The mediawiki logfile is full of thousands of lines which don't say nothing to me, by filtering "mobile" i found one interesting line:

[resourceloader] Module "ext.MobileDetect.mobileonly" not loadable on target "mobile".

???

Bawolff (talkcontribs)

Do you have the correct versions of all your extensions? You need 1.39 version of Minerva and MobileFrontend etc.

2003:C2:3F21:FD00:E5D4:4DFC:FAFA:3692 (talkcontribs)

I am quite sure. MobileDetect 2.2 (fc3a66e) 18:49, 11. Feb. 2024, MobileFrontend 2.4.0 (7dc20b0) 07:36, 4. Mär 2024, MinervaNeue – (d515f6a) 08:24, 29. Apr. 2024

These are the versions I get when using ExtensionDistributor and SkinDistributor using target "1.39"

In the desktop browser, skin MinervaNeue has got the look. After login, of course. On my mobile, the skin is s.th. like vector, whether I am logged in or not. This means even when I select MinervaNeue in my user preferences!

Certainly the problem is sitting here in front of my screen, but I've got no more ideas where to look.

Pspviwki (talkcontribs)

How about $wgDefaultMobileSkin = 'minerva';

2003:C2:3F3F:4A00:49D7:2504:A269:1D1 (talkcontribs)

This answer is not helpful. In fact, may you be volunteers or not, this is exactly the kind of answer that makes me angry. This is exactly the kind of support that is superfluous. "Why do you want to use x, use y" is intolerable.

We used to have MinervaNeue as mobile skin for years and years. It used to work for years and years. Now with the upgrade it does not work anymore. You tell me I should use another skin. I am upset, i am outraged. If it does not work THEN DO NOT OFFER IT.

Reply to "1.39 how to setup mobile skin?"