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.
 

Restrict pages for a group of users

4
Thiagosantiagomelo (talkcontribs)

How can I restrict a page for a group of users?

I'm using the Mediawiki to build and to document all of information from my business. Now I need a way to restrict data from determined departament of the company. There a extension or configuration that allow me to do this?

Ammarpad (talkcontribs)
Thiagosantiagomelo (talkcontribs)

Thanks for you help. From what I read, there's no way to do that without any risk, right?

Jackmcbarn (talkcontribs)

It's not a use case that MediaWiki is designed for. It's meant to be that either everything is public, or the whole wiki is restricted to the same group of people. The risk-free way to do it is to have a separate wiki for each department that wants private data.

Reply to "Restrict pages for a group of users"

Show feedback from for not log-in user on home page (ArticleFeedbackv5)

4
Carolina Reid BangingRocks (talkcontribs)

I would like to know if it is possible to show the feedback form on the home page for the non-logged-in users. I have Mediawiki 1.31.6. The form is getting displayed on the home page for logged-in users, but not for the non-logged-in users.

Is it possible to make it visible?

Below you can find the link to the site.

http://jpwiki.clicklaw.bc.ca/index.php?title=Main_Page

Thanks in advance for your help.

TiltedCerebellum (talkcontribs)

Your site is password protected (on the server) before even entering the wiki so it is impossible to view it to see the wiki.

Carolina Reid BangingRocks (talkcontribs)
TiltedCerebellum (talkcontribs)

Can you provide a link to where the feedback form is located or displaying elsewhere? (We can't see it because we're non-logged in, we can't view the page source because that appears to be hidden, we can't create an account because that is also removed or hidden from its normal location). Without something to go on or being able to view how the page is composed it's impossible to help, sorry. What method was used to put the form on the homepage? I can't even view that. Without view source ability at the very least, it's pretty tough to help.

Reply to "Show feedback from for not log-in user on home page (ArticleFeedbackv5)"

Reattribute edits made under a group account to the ip address of each edit

4
76.173.103.102 (talkcontribs)

I have some edits made on the wiki that were made under a "group account". I'd like to reattribute these individual edits to their ip address instead and delete the group account. I saved which ip address made each edit.

Is this possible? I'm fine making each edit by hand even if I have to edit the database directly.

Ammarpad (talkcontribs)
76.173.103.102 (talkcontribs)

Thank you, but wouldn't that assign all edits made in the group account to one IP address?

Ammarpad (talkcontribs)

I don't think there's a way to selectively distribute edits the way you want, probably because this is not something common that needs to be done. You can amend the script though to pick and distribute the edits for you. Alternatively you can try Extension:ChangeAuthor to see whether it works, note the warning on the extension page. It's currently unmaintained.

Reply to "Reattribute edits made under a group account to the ip address of each edit"

How to delete a default footer link in MediaWiki >=1.35.0?

8
182.232.183.244 (talkcontribs)

I have an Hebrew MediaWiki 1.34.0 website with the Timeless responsive skin.

I desire to delete one of the default links of the default footer menu of that site, programatically, by PHP (most probably with a hook);

I desire not to delete the link with an installed extension or via frontend (although if it is possible in PHP, I would gladly use a CSS selector to select that particular link, by PHP).


How to delete a default footer link in MediaWiki >=1.35.0?

182.232.183.244 (talkcontribs)

I seek an all-LocalSettings.php solution

182.232.185.156 (talkcontribs)

@Malyacko I think that this manual chapter is totally unhelpful because it only show how to unset a "powered by" text and some frontend tricks that I already stated I personally don't want, so what did you mean by linking to it?... Or was it a mistake?...

TiltedCerebellum (talkcontribs)

The link that Malyacko provided has an example of how to do it via LocalSettings.php... Please read the second example and the text above it.

182.232.185.156 (talkcontribs)

@TiltedCerebellum I have re read there;

It starts by:

How do I change the footer?

See: Manual:Footer, Manual:Configuration settings#Copyright

And ends by:

Note that this will also remove other powered-by icons, e.g. also the one coming from BlueSpice.

If you wish to change the icon images, urls, alt text, or add new icons please see $wgFooterIcons' documentation.


---


I found nothing about deleting standalone links (which aren't "powered by") in the footer, in that chapter.

TiltedCerebellum (talkcontribs)

And in between it has:


"If you want to remove it completely, you can use $wgFooterIcons to remove it using this in your LocalSettings.php:"

unset( $wgFooterIcons['poweredby'] );

And it links to a page with this:

Manual:$wgFooterIcons

You can use the information provided in that link add/keep/change the ones you want. It still don't quite understand why you won't just hide it with css.

182.232.185.156 (talkcontribs)

@TiltedCerebellum

I don't do it with CSS because it creates a non elegant source and because it is potentially an SEO problem; furthermore, I don't want to habit myself of removing things via frontend.

Reply to "How to delete a default footer link in MediaWiki >=1.35.0?"

Can Wikipedia API be used for commercial purpose ?

2
193.32.30.50 (talkcontribs)

Can Wikipedia API be used for commercial purpose ? Is there a link to the copyright terms and condition?

Malyacko (talkcontribs)

Which "Wikipedia API" (link)? What is a "commercial purpose", and do you refer to the API use itself, or to the content being used? For the latter, the content has a license, so see its license linked on any page.

Reply to "Can Wikipedia API be used for commercial purpose ?"

BlueSpice: PermissionManager - Stand Alone?

6
BubbaUsesWiki (talkcontribs)

Does anyone know if the BlueSpice Extension:PermissionManager can be installed by itself?

I'm not sure if I made a mistake while extracting the files, uploading them, or registering them in the LocalSettings.php, but after doing all that, it completely killed my website.

So I'm wondering if I did something wrong, or if I'm missing some dependencies and it does not work on it's own.

Thanks.

Bawolff (talkcontribs)

if you enable php error reporting it will help to determine if its just a silly typo somewhere or if its a bigger issue.

BubbaUsesWiki (talkcontribs)

Notice: Undefined variable: wgSpecialPageGroups in /usr/www/users/majorct/wiki/LocalSettings.php on line 220

Notice: Undefined variable: wgSpecialPageGroups in /usr/www/users/majorct/wiki/LocalSettings.php on line 221

Notice: Undefined variable: wgSpecialPageGroups in /usr/www/users/majorct/wiki/LocalSettings.php on line 222

Fatal error: Uncaught ExtensionDependencyError: BlueSpicePermissionManager is not compatible with the current MediaWiki core (version 1.34.1), it requires: >= 1.36.0. BlueSpicePermissionManager requires BlueSpiceFoundation to be installed. in /usr/www/users/majorct/wiki/includes/registration/ExtensionRegistry.php:334 Stack trace: #0 /usr/www/users/majorct/wiki/includes/registration/ExtensionRegistry.php(186): ExtensionRegistry->readFromQueue(Array) #1 /usr/www/users/majorct/wiki/includes/Setup.php(143): ExtensionRegistry->loadFromQueue() #2 /usr/www/users/majorct/wiki/includes/WebStart.php(81): require_once('/usr/www/users/...') #3 /usr/www/users/majorct/wiki/index.php(41): require('/usr/www/users/...') #4 {main} thrown in /usr/www/users/majorct/wiki/includes/registration/ExtensionRegistry.php on line 334

Ammarpad (talkcontribs)

So the error is quite self-explanatory. Do you need anything else?

BubbaUsesWiki (talkcontribs)

Yes, I need someone to explain it, or are you just posting to boost your ego and make yourself feel good?

Majavah (talkcontribs)

The error message says "BlueSpicePermissionManager is not compatible with the current MediaWiki core (version 1.34.1), it requires: >= 1.36.0. BlueSpicePermissionManager requires BlueSpiceFoundation to be installed". That means that you need to install BlueSpiceFoundation for it to work. You're also using a version of it that does not support MediaWiki 1.34.1 (that's what you are using). According to Special:ExtensionDistributor/BlueSpicePermissionManager the extension only supports LTS versions 1.31 and 1.35 (which is due to be released later this month).

Reply to "BlueSpice: PermissionManager - Stand Alone?"

I need to change the Platform-Product Roadmap Subproject into Project

2
NNzali (WMF) (talkcontribs)
Majavah (talkcontribs)

Try posting at Talk:Phabricator/Help to ensure Phab admins see it or just file a task in the Phabricator project (as I believe this needs database fiddling)

Reply to "I need to change the Platform-Product Roadmap Subproject into Project"

I need help with my mediawiki.

6
70.95.232.66 (talkcontribs)

I have a site called bookofrealms.com

I keep getting a slew of header errors and my hosting provider keeps telling me I was attacked by malware bots. They want to charge me $300 to fix it. I don't want to pay that so I'm trying to fix this myself.


These are the errors:

Warning: Cannot modify header information - headers already sent by (output started at /home3/sully/public_html/bookofrealms.com/index.php:4) in /home3/sully/public_html/bookofrealms.com/includes/WebStart.php on line 35

Warning: Cannot modify header information - headers already sent by (output started at /home3/sully/public_html/bookofrealms.com/index.php:4) in /home3/sully/public_html/bookofrealms.com/includes/libs/HttpStatus.php on line 112

Warning: Cannot modify header information - headers already sent by (output started at /home3/sully/public_html/bookofrealms.com/index.php:4) in /home3/sully/public_html/bookofrealms.com/includes/WebResponse.php on line 46

Warning: Cannot modify header information - headers already sent by (output started at /home3/sully/public_html/bookofrealms.com/index.php:4) in /home3/sully/public_html/bookofrealms.com/includes/WebResponse.php on line 46

Warning: Cannot modify header information - headers already sent by (output started at /home3/sully/public_html/bookofrealms.com/index.php:4) in /home3/sully/public_html/bookofrealms.com/includes/WebResponse.php on line 46

Warning: Cannot modify header information - headers already sent by (output started at /home3/sully/public_html/bookofrealms.com/index.php:4) in /home3/sully/public_html/bookofrealms.com/includes/WebResponse.php on line 46

Warning: Cannot modify header information - headers already sent by (output started at /home3/sully/public_html/bookofrealms.com/index.php:4) in /home3/sully/public_html/bookofrealms.com/includes/WebResponse.php on line 46

Warning: Cannot modify header information - headers already sent by (output started at /home3/sully/public_html/bookofrealms.com/index.php:4) in /home3/sully/public_html/bookofrealms.com/includes/WebResponse.php on line 46


I cannot figure out for the life of me what is going on wrong here. I made sure the <?> was correct on the local settings file and I just can't figure out what else to do here. Please help me as this private wiki is very important to me. thanks.

Bawolff (talkcontribs)

the error probably means that index.php was modified. If your server was compromised, index.php was possibly modified to serve malware.

If you were attacked by malware, generally you should do the following:

Take a backup of everything for reference. include both db and filesystem

Try and figure out how it happened (apache access logs can be helpful). Otherwise you will just get compromised again.

Delete the server. This is to get rid of any backdoors the attacker may have installed.

Make a new server. Reinstall mediawiki and extensions (from official sources not from your backup. Use your backup only for the database, uploaded images and LocslSettings.php. verify that LocalSettings.php hss nothing suspicious in it)

Check that it all works.

70.95.232.66 (talkcontribs)

Thank you!

70.95.232.66 (talkcontribs)

Im on a shared hosting account though. I cant delete the server.

Bawolff (talkcontribs)

in that case i would consider terminating your account and starting a new one (that way you know for sure any backdoors are gone. Be sure to backup all data including dbs before doing this).

Failing that, deleting all files is probably good enough. Or at least all files (including dotfiles) in your public_html directory (if your host allows crontabs, ensure nothing evil in there)

70.95.232.66 (talkcontribs)

thank you. You've been extraordinarily helpful.

Reply to "I need help with my mediawiki."

Do not show Print/export options on side bar for main page (Collection extension)

5
Carolina Reid BangingRocks (talkcontribs)

I would like to know if it is possible to remove/hide the Print/export options on the home page of my site http://jpwiki.clicklaw.bc.ca/. I have Mediawiki 1.31.6. Is this possible to do?

Thanks in advance for your help.

TiltedCerebellum (talkcontribs)

Yes it is possible with CSS or via a hook, but I can't view your site to provide it to you, it requires a login and password. What skin are you using?


For example, using the web inspector in chrome, I could inspect the "Help" link on this page to see what it's li (list item) ID is:

https://en.wikipedia.org/wiki/Cat

<li id="n-help">

Then in the wiki's skin css (if the skin was Vector the appropriate css page would be MediaWiki:Vector.css) I would add something like the following: Note that IDs in css are denoted by a "#" symbol and classes by a "."

li#n-help {

    display:none;

}

Then when I do a hard refresh on the site page (Ctrl + Shift + R) on PC, then I would see my changes reflected.

Bawolff (talkcontribs)

are you using collection for other things? If not id suggest just disabling extension.

Carolina Reid BangingRocks (talkcontribs)
Bawolff (talkcontribs)
Reply to "Do not show Print/export options on side bar for main page (Collection extension)"

Offset anchor targets to account for sticky navbar

2
Summary by JeremiPlazas

For anyone wondering. I figured out the problem. The parent element of span.mw-headline had overflow: hidden;set, which prevented any CSS solution from working. See thread for details.

JeremiPlazas (talkcontribs)

Hi there,

I'm using Mediawiki with a custom skin on this new website we launched. I have tried everything under the sun to offset the achor links' destinations to account for the navbar height and actually show up. I can not get it to work on mobile. I have a toggle menu in mobile view with the TOC in there. When a TOC link is clicked, it closes the menu and goes to the proper header. But no offsetting technique seems to work. Some JS snippets i've found will overwrite the default option but the offset is all over the place and you end up on a completely random part of the page. To clarify, some JS techniques do work on Desktop, that is not my concern, i can get it to work on desktop. Mobile though...

See for yourselves: https://buddhanature.tsadra.org/index.php/Articles/A_History_of_Buddha-Nature_Theory:_The_Literature_and_Traditions

Try the links in the "Content" section in the sidebar.


Here's what i've tried:

CSS
.mw-headline {
     margin-top: -100px;
     padding-top: 100px;
     display: block;
}
.mw-headline::before {
     display: block;
     content: " ";
     margin-top: -285px;
     height: 285px;
     visibility: hidden;
     pointer-events: none;
}
.toc a:target::before {
     content: "";
     display: block;
     height: 100px; /* fixed header height*/
     margin: -100px 0 0; /* negative fixed header height */
}
JS
jQuery(function($) {
  $('a[href*="#"]:not([href="#"])').click(function(e) {
     if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') || location.hostname == this.hostname) {
      var target = $(this.hash);
      headerHeight = 100;
      target = target.length ? target : $('[id="' + this.hash.slice(1) +'"]');
      if (target.length) {
        $('html,body').stop().animate({
          scrollTop: target.offset().top - headerHeight //offsets for fixed header
        }, 'linear');
      }
    }
  });
}); 
$("a[href^='#']").not(".no-offset a").click(function(e) {
	if ($(e.target.hash)) {
		var hash = e.currentTarget.hash.substring(1);
		var anchorTagOffset = $("*[id='" + hash + "']").offset().top - 100;
		$('body').animate({
			scrollTop : anchorTagOffset,
		}, 100);
	}
});
jQuery(function($) { 
	$('a[href^="#"]').click(function(event){
	    event.preventDefault();
	    var target_offset = $(this.hash.substring(1)).offset() ? $(this.hash.substring(1)).offset().top : 0;
	    //change this number to create the additional off set        
	    var customoffset = 100;
	    $('html, body').animate({scrollTop:target_offset - customoffset}, 200);
	});
};


Any clues or suggestions as to what direction i should go into?

I've also tried to switch the behavior of the navbar from sticky to fixed (I'm using Bootstrap 4) and add a top padding/margin to the body element. No luck either.

I'm asking here in case anyone has information about this as it relates to the wiki software itself.

Thanks in advance!

JeremiPlazas (talkcontribs)

For anyone wondering. I figured out the problem. The parent element of span.mw-headline had overflow: hidden;set, which prevented any CSS solution from working. Here's what i did in the end:

JS
$('span.mw-headline').each(function() {
	$(this).addClass('offset-header');
	$(this).parent().css('overflow', 'visible');
});
CSS
.offset-header {
    display: block;
    margin-top: -100px;
    padding-top: 100px;
}

This did the trick for me.

Cheers.