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.
Other languages: English  العربية čeština Esperanto français 日本語 中文

Add custom html menu on top of the page, and padding down content.

4
194.42.11.39 (talkcontribs)

Hello,

I'm trying to find a way to add a custom html menu to the top of the page, which in result will pad down everything else in the page. What are the files I should edit?

It should look something like this (image from similar thread on SO):

https://i.stack.imgur.com/UhvJp.jpg


I've tried in vectortemplate.php, but it keeps adding the content under main page.


Thank you in advance!

Malyacko (talkcontribs)
194.42.11.39 (talkcontribs)

I've checked this, but it's not what i'm looking for. This adds custom content in the content.

Malyacko (talkcontribs)

Add your customization to the <div id="mw-header-container"> before <div id="mw-header">?

Reply to "Add custom html menu on top of the page, and padding down content."
2003:DE:AF23:6100:4164:2072:556B:5ED8 (talkcontribs)

I am using Media Wiki 1.32.1. I would like to include a video in mp4 format.

Can someone tell me which extension I need?

What are your experiences?

Victwana (talkcontribs)

My experience is very limited as it been few days ago I've been using or joined Wikipedia.

AhmadF.Cheema (talkcontribs)
2003:DE:AF23:6100:84CB:6414:DFA1:A917 (talkcontribs)

Thank you for the tip. But when I add the extension to the localSettings.php

wfLoadExtension( 'TimedMediaHandler' );

I can't reach my side anymore. The wiki website is then white.

AhmadF.Cheema (talkcontribs)
2003:DE:AF23:6100:E0C8:4FCE:B5BB:E074 (talkcontribs)

Can somebody give me a hint on what I can do?

Would like to use the TimedMediaHandler extension.

I get the following message in my browser:

Uncaught Exception: /var/www/vhosts/hosting.netcup.net/httpdocs/wiki/extensions/TimedMediaHandler/extension.json does not exist! in /var/www/vhosts/hosting.netcup.net/httpdocs/wiki/includes/registration/ExtensionRegistry.php:107 Stack trace: #0 /var/www/vhosts/hostingnetcup.net/httpdocs/wiki/includes/GlobalFunctions.php(50): ExtensionRegistry->queue('/var/www/vhosts...') #1 /var/www

Malyacko (talkcontribs)

You could post version information for TimedMediaHandler and you could post a complete stacktrace (your last post is just a small part of the stacktrace) with line breaks.

2003:DE:AF23:6100:E0C8:4FCE:B5BB:E074 (talkcontribs)

Sorry about that. Here is the complete message

Fatal error: Uncaught Exception: /var/www/vhosts/hosting.netcup.net/httpdocs/wiki/extensions/TimedMediaHandler/extension.json does not exist! in /var/www/vhosts/hosting.netcup.net/httpdocs/wiki/includes/registration/ExtensionRegistry.php:107 Stack trace: #0 /var/www/vhosts/hosting.netcup.net/httpdocs/wiki/includes/GlobalFunctions.php(50): ExtensionRegistry->queue('/var/www/vhosts...') #1 /var/www/vhosts/hosting.netcup.net/httpdocs/wiki/LocalSettings.php(149): wfLoadExtension('TimedMediaHandl...') #2 /var/www/vhosts/hosting.netcup.net/httpdocs/wiki/includes/Setup.php(103): require_once('/var/www/vhosts...') #3 /var/www/vhosts/hosting.netcup.net/httpdocs/wiki/includes/WebStart.php(77): require_once('/var/www/vhosts...') #4 /var/www/vhosts/hosting.netcup.net/httpdocs/wiki/index.php(39): require('/var/www/vhosts...') #5 {main} thrown in /var/www/vhosts/hosting.netcup.net/httpdocs/wiki/includes/registration/ExtensionRegistry.php on line 107

Malyacko (talkcontribs)

My previous comment asked for version information for TimedMediaHandler and a complete stacktrace (having every line end in "..." is not a complete stacktrace), but anyway: /var/www/vhosts/hosting.netcup.net/httpdocs/wiki/extensions/TimedMediaHandler/extension.json does not exist!

So you have to find out why it does not exist. And explain how exactly you install TimedMediaHandler.

AhmadF.Cheema (talkcontribs)

From where exactly did you download the Extension:TimedMediaHandler files (or maybe you didn't)?

What is the version of your MediaWiki?

Can you provide a link to your Wiki?

2003:DE:AF23:6100:E0C8:4FCE:B5BB:E074 (talkcontribs)

During the installation of the TimedMediaHandler in the LocalSettings.php the directory wiki/extensions/

the TimedMediaHandler extension or folder is not created.

2003:DE:AF23:6100:E0C8:4FCE:B5BB:E074 (talkcontribs)

I defined the extension in Localsettings.php as follows: wfLoadExtension( 'TimedMediaHandler' );

The version of the Media Wiki is 1.32.1

Corraggiouno (talkcontribs)
AhmadF.Cheema (talkcontribs)

Have you followed this step:

  • Download and place the file(s) in a directory called TimedMediaHandler in your extensions/ folder.
Corraggiouno (talkcontribs)

Okay, that worked. Great. The Wiki page is available again. I also did an update. What I unfortunately noticed. If I want to upload a video (about 20 MB) mp4, then I get the following message: [55fbb821de0d3c8f870f2623] 2019-05-23 14:30:20: Fatal exception error of type "Error 

AhmadF.Cheema (talkcontribs)

For the "Fatal exception error", in your LocalSettings.php, set:

$wgShowExceptionDetails = true;

$wgDevelopmentWarnings = true; error_reporting( -1 ); ini_set( 'display_errors', 1); error_reporting(E_ALL);

and then perform the same actions which led to the fatal error. This should provide a more detailed error description.

Corraggiouno (talkcontribs)

Thank you so much for your help. This is my output:

/wiki/extensions/TimedMediaHandler/includes/handlers/Mp4Handler/Mp4Handler.php(12): ID3Handler->getID3(string)

/httpdocs/wiki/extensions/TimedMediaHandler/includes/handlers/ID3Handler/ID3Handler.php(51): Mp4Handler->getID3(string)

t/httpdocs/wiki/includes/utils/MWFileProps.php(84): ID3Handler->getMetadata(FSFile, string)

httpdocs/wiki/includes/upload/UploadBase.php(509): MWFileProps->getPropsFromPath(string, string)

httpdocs/wiki/includes/upload/UploadBase.php(444): UploadBase->verifyPartialFile()

httpdocs/wiki/includes/upload/UploadBase.php(347): UploadBase->verifyFile()

httpdocs/wiki/includes/upload/UploadFromFile.php(95): UploadBase->verifyUpload()

/httpdocs/wiki/includes/specials/SpecialUpload.php(503): UploadFromFile->verifyUpload()

httpdocs/wiki/includes/specials/SpecialUpload.php(207): SpecialUpload->processUpload()

httpdocs/wiki/includes/specialpage/SpecialPage.php(569): SpecialUpload->execute(NULL)

/wiki/includes/specialpage/SpecialPageFactory.php(568): SpecialPage->run(NULL)

/wiki/includes/MediaWiki.php(288): MediaWiki\Special\SpecialPageFactory->executePath(Title, RequestContext)

/httpdocs/wiki/includes/MediaWiki.php(860): MediaWiki->performRequest()

t/httpdocs/wiki/includes/MediaWiki.php(517): MediaWiki->main()

/wiki/index.php(42): MediaWiki->run()

#15 {main}

Ciencia Al Poder (talkcontribs)

That's the stack trace but not the error message. The extension may be missing the id3 library, that you need to get with composer.

Inside the TimedMediaHandler extension directory, run:

composer install --no-dev
Reply to "Video extension"

Showing a complete table of contents (categories and pages)

3
Grmblfx5 (talkcontribs)

Hello,

on my wiki pages, I used the extension "NiceCategoryList2" to get a complete TOC on my starting page, as you can see here:

http://www.psych-med.de/wiki/index.php?title=Hauptseite

Unfortunately, the extension isn't maintained anymore, so I need an alternative after updating.

I tried "categorytree" and "DynamicPageList3" but wasn't able to get the same result (categories as headings, subpages as links).

For "DynamicPageList3" I studied the manual but didn't find a support page or forum to ask.


Can anyone tell me if or how I can get a complete table of contents on a wiki-page?


Thank you!

Jonathan3 (talkcontribs)

I'm pretty certain this would be possible with DPL3 - I need to do something similar and if I manage it I'll add a message here.

Jonathan3 (talkcontribs)

Just read your comments on your other topic. It's definitely possible to use recursion in DPL3 to display the category/page structure from a named top category (or alternatively to use separate sub-templates/queries for whatever level you want to go down to). I've got this working but it is similar to CategoryTree in that it displays the categories as links too, which is not what you want. I hope it will be possible to add some sort of "if" statement in the middle of the DPL3 query to show the categories as text (maybe even headings) rather than links. Maybe wishful thinking.

Reply to "Showing a complete table of contents (categories and pages)"
Jonathan3 (talkcontribs)

I'd like to be able to delete nearly every user on my wiki - probably "every user which has never made an edit" - or "every user who has only edited his own user page".

Is there an extension that could do this? Or a tried-and-tested SQL query?

Thanks in anticipation.

AhmadF.Cheema (talkcontribs)

The most appropriate way to achieve something similar is by way of Extension:UserMerge. The more customized solutions, either don't exist or are likely to be very unreliable.

Jonathan3 (talkcontribs)

Thanks. That extension doesn't look useful for removing (or merging) hundreds of users. Its page has a link to Extension:BlockAndNuke but that's not maintained and from the talk page looks not to be working with the latest MW version.

Jonathan3 (talkcontribs)

Back to SQL, do you think the following would work? The intention would be to delete every user from the user table who has never made a revision which appears in the revision table.

DELETE 
FROM wm_user 
WHERE user_id NOT IN (SELECT DISTINCT rev_user FROM wm_revision)

There are no pages in the User or User Talk namespaces to worry about having to delete.

Jonathan3 (talkcontribs)

@Samwilson I saw you reply to another message about users, and wondered if you would be able to help with my (SQL) query above. Thanks in anticipation.

Samwilson (talkcontribs)

I'd recommend against trying to do this directly with SQL. It's really likely to be a headache.

I suspect that getting the BlockAndNuke extension up to date would be easier, and result in a more reliable solution that's more usable by more people. :)

(I might have a look at it this weekend...)

Deimos (talkcontribs)

>> every user which has never made an edit

Well, this is simple. Just run the maintenance script 'RemoveUnusedAccounts.php' - Manual:RemoveUnusedAccounts.php

This post was hidden by 94rain (history)
Jonathan3 (talkcontribs)

Thank you very much. I'll look into it as soon as I get a chance! Because of the settings on my wiki, the spam accounts get created but don't edit pages, so this looks like the right solution for me.

Reply to "Deleting multiple users"

Embedding HTML from trusted external site

4
Jonathan3 (talkcontribs)

I'd like to be able to add HTML from an external site (via its API) into wiki pages.

Is there an extension that would allow this? Thanks.

AhmadF.Cheema (talkcontribs)
TheDJ (talkcontribs)
Jonathan3 (talkcontribs)

What about writing a short extension that just uses file_get_contents (and sanitises what it receives)?

Reply to "Embedding HTML from trusted external site"
77.96.163.173 (talkcontribs)

Hi

i cant seem to log into account. My user name should be harrysixty9 and i have tried logging in but the password is incorrect. I cant reset my password because I do not longer have the harrysixty9@hotmail.co.uk email address. My new email is harrysixty9@gmail.com.


I last posted something last year in summer topic "Nina".


Is there anyway I could reset my password.


Thanks


Harry

AhmadF.Cheema (talkcontribs)
Reply to "logging problem"

how use ttf font in media wiki ?

2
Hamid227 (talkcontribs)

i need a font that is not in google font api but i have ttf file of it. what to do?

Malyacko (talkcontribs)
Reply to "how use ttf font in media wiki ?"

MWException from line 357 - ***/includes/resourceloader/ResourceLoader.php: ResourceLoader module info type error for module '0': expected ResourceLoaderModule or array (got: NULL)

3
Summary by AhmadF.Cheema

Missing resources directory.

96.250.0.88 (talkcontribs)

Hey guys,


I just spent the day trying to upgrade my mediawiki from 1.27 to 1.32, and after a ton of troubleshooting I'm now stuck. I had to upgrade my server to use PHP 7.2, force my ssh to do likewise by calling the binary files because it was stuck using version 4.something, but it seems like the server itself is using the right PHP version, although when I try to load mydomain.com/mw-config/index.php it doesn't seem to have any styling or functionality, almost as if the php isn't working properly, and when I try to load most of the main pages I get this error:


MediaWiki internal error.

Original exception: [XOSbF0rQO3cAANkY4XkAAAAI] /Main_Page MWException from line 357 of /homepages/24/d******/htdocs/mymainwikiwiki/includes/resourceloader/ResourceLoader.php: ResourceLoader module info type error for module '0': expected ResourceLoaderModule or array (got: NULL)

Backtrace:

#0 /homepages/24/d******/htdocs/mymainwikiwiki/includes/resourceloader/ResourceLoader.php(260): ResourceLoader->register(integer)

#1 /homepages/24/d******/htdocs/mymainwikiwiki/includes/OutputPage.php(3271): ResourceLoader->__construct(GlobalVarConfig, MediaWiki\Logger\LegacyLogger)

#2 /homepages/24/d******/htdocs/mymainwikiwiki/includes/OutputPage.php(3052): OutputPage->getResourceLoader()

#3 /homepages/24/d******/htdocs/mymainwikiwiki/includes/OutputPage.php(3096): OutputPage->getRlClientContext()

#4 /homepages/24/d******/htdocs/mymainwikiwiki/includes/OutputPage.php(3318): OutputPage->getRlClient()

#5 /homepages/24/d******/htdocs/mymainwikiwiki/includes/skins/Skin.php(681): OutputPage->getBottomScripts()

#6 /homepages/24/d******/htdocs/mymainwikiwiki/includes/skins/SkinTemplate.php(469): Skin->bottomScripts()

#7 /homepages/24/d******/htdocs/mymainwikiwiki/includes/skins/SkinTemplate.php(225): SkinTemplate->prepareQuickTemplate()

#8 /homepages/24/d******/htdocs/mymainwikiwiki/includes/OutputPage.php(2706): SkinTemplate->outputPage()

#9 /homepages/24/d******/htdocs/mymainwikiwiki/includes/MediaWiki.php(867): OutputPage->output(boolean)

#10 /homepages/24/d******/htdocs/mymainwikiwiki/includes/MediaWiki.php(879): MediaWiki->{closure}()

#11 /homepages/24/d******/htdocs/mymainwikiwiki/includes/MediaWiki.php(517): MediaWiki->main()

#12 /homepages/24/d******/htdocs/mymainwikiwiki/index.php(42): MediaWiki->run()

#13 {main}

Exception caught inside exception handler: [XOSbF0rQO3cAANkY4XkAAAAI] /Main_Page MWException from line 357 of /homepages/24/d******/htdocs/mymainwikiwiki/includes/resourceloader/ResourceLoader.php: ResourceLoader module info type error for module '0': expected ResourceLoaderModule or array (got: NULL)

Backtrace:

#0 /homepages/24/d******/htdocs/mymainwikiwiki/includes/resourceloader/ResourceLoader.php(260): ResourceLoader->register(integer)

#1 /homepages/24/d******/htdocs/mymainwikiwiki/includes/OutputPage.php(3271): ResourceLoader->__construct(GlobalVarConfig, MediaWiki\Logger\LegacyLogger)

#2 /homepages/24/d******/htdocs/mymainwikiwiki/includes/OutputPage.php(3052): OutputPage->getResourceLoader()

#3 /homepages/24/d******/htdocs/mymainwikiwiki/includes/OutputPage.php(3096): OutputPage->getRlClientContext()

#4 /homepages/24/d******/htdocs/mymainwikiwiki/includes/OutputPage.php(3318): OutputPage->getRlClient()

#5 /homepages/24/d******/htdocs/mymainwikiwiki/includes/skins/Skin.php(681): OutputPage->getBottomScripts()

#6 /homepages/24/d******/htdocs/mymainwikiwiki/includes/skins/SkinTemplate.php(469): Skin->bottomScripts()

#7 /homepages/24/d******/htdocs/mymainwikiwiki/includes/skins/SkinTemplate.php(225): SkinTemplate->prepareQuickTemplate()

#8 /homepages/24/d******/htdocs/mymainwikiwiki/includes/OutputPage.php(2706): SkinTemplate->outputPage()

#9 /homepages/24/d******/htdocs/mymainwikiwiki/includes/exception/MWException.php(181): OutputPage->output()

#10 /homepages/24/d******/htdocs/mymainwikiwiki/includes/exception/MWException.php(222): MWException->reportHTML()

#11 /homepages/24/d******/htdocs/mymainwikiwiki/includes/exception/MWExceptionHandler.php(96): MWException->report()

#12 /homepages/24/d******/htdocs/mymainwikiwiki/includes/exception/MWExceptionHandler.php(172): MWExceptionHandler::report(MWException)

#13 /homepages/24/d******/htdocs/mymainwikiwiki/includes/MediaWiki.php(544): MWExceptionHandler::handleException(MWException)

#14 /homepages/24/d******/htdocs/mymainwikiwiki/index.php(42): MediaWiki->run()

#15 {main}


I've tried disabling all extensions and skins in my localsettings.php but that doesn't seem to help anything. I'm at a bit of a loss for what to do next- any help would be appreciated!

AhmadF.Cheema (talkcontribs)
96.250.0.88 (talkcontribs)

Thanks! It turned out that my entire "Resources" folder had disappeared. After replacing it things are now working again!

5inch HDMI Display no signal,what can I do?

1
Summary by Tomybrz

off topic about MediaWiki, see Project:About#What_MediaWiki.org_is_not

Janice12121 (talkcontribs)

http://www.lcdwiki.com/zh/5inch_HDMI_Display

This LCD. After I connect it to computer,It work 3 times,then no work.

In Raspberry and computer,all shows 'VGA',no signal.

In computer,I can't search this LCD also.

I think may because I connect with computer,but no change it for 800x480.

now,what's the problem?how to deal with it?

[RESOLVED] Cannot input UTF-8 characters (Japanese) when editing wiki pages

3
Genesishana (talkcontribs)

I have a fresh installation of MediaWiki 1.24.2 and I have difficulties inputting Japanese characters (and probably UTF-8 characters in general). When I am editing a wiki page using the editor, I start typing some Japanese characters and then click 'Save Page'. But then the characters become "???" after the edited page loads. Attempting to edit the page again shows the same "???" kind of characters.

I initially suspected it had something to do with how my database was configured since some of the character_set variables were set to 'latin1' but I have modified my database's /etc/my.cnf.d/server.cnf file to use utf8 (as shown below).

Default charset of httpd and php are set to utf8 as well.

Just now, I setup the VisualEditor (and parsoid service) and it seems I can input Japanese characters just fine within the VisualEditor and after saving, the wiki page looks fine. When I edit using the WikiEditor, the wiki page has the same garbled text after saving. I've also noticed when using the VisualEditor, I can create a link to a new page whose title consists of Japanese characters but when I proceed to actually create the new page, I get garbled text using the WikiEditor and when trying the VisualEditor, I get a bad title error.

What could be the problem with my MediaWiki's configuration? Any input is greatly appreciated.

Update: I've also realized when using the 'edit source' tab, I can correctly preview utf-8 edits using the 'preview tab' and the 'changes tab' without a problem. The encoding problem seems to occur only after I saved the page. In the VisualEditor case, I can successfully save page and it will reload correctly. However, pages whose titles are utf-8 based behave strangely, for example: I create a link to a new wiki page using utf-8 characters, then I click its red link to create its content. For some reason, utf-8 based content won't save but ASCII characters do. Also, it feels like it made two versions of the page, one with the correct utf-8 title, and then another with a broken title.

Solved: I did a complete re-installation of the LAMP stack on the server, taking extra care that utf-8 is the default charset everywhere during configuration. I also upgraded PHP to 5.6.7 and MariaDB to 10.0.17. Now MediaWiki behaves well with UTF-8 characters in both titles and content of pages.

Environment Specifications

  • MediaWiki 1.24.2
  • PHP 5.4.16 (apache2handler)
  • MariaDB 5.5.42-MariaDB-wsrep
  • CentOS Linux release 7.1.1503 (Core)


mysql> show variables like "collation%";
+----------------------+-----------------+
| Variable_name        | Value           |
+----------------------+-----------------+
| collation_connection | utf8_general_ci |
| collation_database   | utf8_general_ci |
| collation_server     | utf8_general_ci |
+----------------------+-----------------+
mysql> show variables like "char%";
+--------------------------+----------------------------+
| Variable_name            | Value                      |
+--------------------------+----------------------------+
| character_set_client     | utf8                       |
| character_set_connection | utf8                       |
| character_set_database   | utf8                       |
| character_set_filesystem | binary                     |
| character_set_results    | utf8                       |
| character_set_server     | utf8                       |
| character_set_system     | utf8                       |
| character_sets_dir       | /usr/share/mysql/charsets/ |
+--------------------------+----------------------------+
2401:4900:1908:9404:1034:59E5:BB04:CBE5 (talkcontribs)

How to change the values of variables permanently ?

Ciencia Al Poder (talkcontribs)
Reply to "[RESOLVED] Cannot input UTF-8 characters (Japanese) when editing wiki pages"