# Project:Support desk

(Redirected from Support desk)

Welcome to MediaWiki.org's Support desk, the central on-wiki place to ask MediaWiki questions!

The greater purpose of this page is to make our Manual and other available help so good that you do not have to come here to ask questions, or making them easier to find.

There are other ways for of communication as well (IRC, mailing lists etc.). Read more here.

## Post a new question

• MediaWiki (reported by your wiki's Special:Version page)
• PHP (likewise)
• Database (likewise, e.g. MySQL 5.5)
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 discussion".

## Archiving topics

Topics are automatically archived when they have been inactive for three weeks. If a question you have asked is approaching this limit and still has not been answered, please 'bump' it to prevent it being archived. However do not 'bump' for other reasons.

 First page Previous page Next page Last page

Edited by 2 users.
Last edit: 09:47, 1 August 2014

Hello Guys, I installed MediaWiki (1.23) in a Subdomain (http://wiki.prefixaut.net). It's in the wiki-Folder (http://www.prefixaut.net/wiki - Will redirect you to wiki-Subdomain). So after I have struggled for a while to get Short-URLs to work, I can't login. When I click on the Log in button, I get redirected and it tries to show me the index.php Wiki-Page.

To get it working on the Subdomain I tried everything till I REMOVED everything which could cause problems, so the .htaccess file in the /wiki folder is empty and the LocalSettings.php is the default one which MediaWiki generated from the Install.

I hope you can help me, thanks in advance.

07:04, 1 August 2014

Hello! And wiki.prefixauth.net points to what? The wiki/ folder? What you configured for $wgScriptPath? 08:13, 1 August 2014 As mentioned before: "It's in the wiki-Folder (http://www.prefixaut.net/wiki - Will redirect you to wiki-Subdomain)."$wgScriptPath = "/wiki";

09:35, 1 August 2014

You have:

Article path       /$1 Script path /wiki index.php /wiki/index.php api.php /wiki/api.php load.php /wiki/load.php  That's a very bad idea, because if anything from the domain name will be a title of a page, all access to scripts (namely, /wiki/index.php) will be treated as accessing the article named wiki/index.php You should rethink your URL scheme. Please read the recommendations again in Manual:Short_URL 09:49, 1 August 2014 ## New install with XAMPP on Win 2012 - cannot access wiki remotely I have a brand new install, can access the wiki on the localhost, but cannot from other systems. I can browse to the host itself, proving apache is working, but when attempting to access the wiki firefox complains with: Firefox can't establish a connection to the server at localhost I have modified httpd and httpd-xampp conf files to change the server name and allow from all access. This appears to be a config issue with the wiki but I can't figure out where. Any and all help is appreciated. 4.68.92.6823:40, 31 July 2014 You should set Manual:$wgServer to the public IP address or host name, accessible from all machines. It may be "localhost" now, which is a special hostname pointing to your own machine.

09:40, 1 August 2014

## extension MathJax math formula not displayed

I work with mediawiki 1.23 and the extension MathJax is installed and required into my local setting

  In one page is written this formula ː  blabla....... $(a+b)^3=(a+b)(a+b)^2$ blabla...

  OK ː If I am connect as wikiSysop the display is correct (about 3 lines as
blabla.....
the formula with the correct exposant in the middle of the line
blabla.....

  NOK ː if I am not connected (anonymous) or connect as another user (chantoune)
The display shows the syntax as written when I am in page edit


To solve this NOK case ː I have to install also the Extension Math (1465 files ǃǃadd ) and just add the line requiring Math in my local setting (no texvc compilation and so on.....)

So now, when I am not connected or connected as chantoune ː the display is correct (3 lines)

Is there a more simple solution ?
with for instance a specific $wgGroupPermissions['*'] to set ? Why when I am wikiSysop connected, the extension Math is not mandatory to have a correct display ? and why is it mandatory in other case ? 15:43, 31 July 2014 No, there does not seem to be another solution - at least not right now. MathJax is used in combination with the Math extension. Extension:MathJax has more information on the current state. 88.130.83.23716:14, 31 July 2014 The difference between being logged as sysop or not may be that you have set something different in your preferences that allows rendering math, and that's different from the default value. 09:37, 1 August 2014 ## How to create a bot to add a new section in a talk page? Edited by 2 users. Last edit: 16:04, 31 July 2014 Hi there, We are a group of researchers, trying to find a practical way to motivate professors and researchers who have published a fair number of research papers, to review Wikipedia pages and improve them. As they do not usually have enough time to edit Wikipedia pages, we are trying to ask their comments on their interested pages, and post those comments to the corresponding talk pages, which can potentially help active Wikipedians on those pages to take advantage of experts' feedback and apply them as they like to the main article. To this end, we need to implement a bot which posts experts' feedback as new sections on Talk pages. As a matter of efficiency, we prefer to use python HTTP POST requests using MediaWiki API rather than available MediaWiki libraries. We have not requested for an approval for the bot, and we are just trying to implement a trial version to test the bot on our own Talk pages. For this purpose, I went through the following steps: 1- As discussed at https://en.wikipedia.org/wiki/Wikipedia:Creating_a_bot: >Create an account for your bot. Click here when logged in to create the account, linking it to yours. (If you do not create the bot account while logged in, it is likely to be blocked as a possible sockpuppet or unauthorised bot until you verify ownership) >Create a user page for your bot. Your bot's edits must not be made under your own account. Your bot will need its own account with its own username and password. So, I logged in to my own Wikipedia account, and created a new account (for the bot). 2- As discussed at https://www.mediawiki.org/wiki/API:Login: Logging in through the API requires two requests. For the first request, I wrote the following code in python:  def logInRequestToWikipedia(): # Add required parameters to the request. request = { 'action' : 'login' } request['lgname'] = 'BotName' request['lgpassword'] = '*************' url = 'https://en.wikipedia.org/w/api.php' headers = { 'content-type' : 'application/x-www-form-urlencoded' } r = requests.post(url, data = json.dumps(request), headers=headers)  The response starts with an error as follows:  <error code="help" info="" xml:space="preserve">  And continues with the API documentation. 3- As discussed at https://www.mediawiki.org/wiki/API:Edit_-_Create%26Edit_pages: >Note: In this example, all parameters are passed in a GET request just for the sake of simplicity. However, action=edit requires POST requests; GET requests will cause an error. Do not forget to set the Content-Type header of your request to application/x-www-form-urlencoded. The token that you received is terminated with +\\, this needs to be urlencoded (so it will end with %2B%5C) before it is passed back. I added each of the following parameters separately and both together in the request data and tried all three cases, but it returns the same response.  request['lgtoken'] = '%2B%5C' request['Content-Type'] = 'application/x-www-form-urlencoded'  4- Also I tried each of the followings in my request data, but it returns the same response:  request['format'] = 'json' request['format'] = 'xml'  Do you think the problem can be related to the fact that we have not requested for an approval for the bot yet? Because we are just trying to implement a trial version to test the bot on our own Talk pages, and apply for the approval after making sure everything will work. I will appreciate it if you help us with this issue. Best regards. 17:01, 29 July 2014 Apparently, you shouldn't use data = json.dumps(request) in requests.post While you want a JSON response, that doesn't mean that you need to pass data to MediaWiki in JSON format! Try using this instead, by just passing the dictionary without further encoding:  r = requests.post(url, data = request, headers=headers)  http://docs.python-requests.org/en/latest/user/quickstart/#more-complicated-post-requests 09:33, 1 August 2014 Also note that, after logging in, you should save the cookies and send them back again on every other request, because cookies contain the session token to maintain you logged in. I don't know if python would do this automatically for you, so be sure to check this. 09:34, 1 August 2014 ## A locked wiki Hi I need a wiki library, but some of the content i secret, and should only by view able by users of the site, who is confirmed by an admin. Is that possible with Media Wiki and how? Kind regards Silas 195.41.97.408:45, 1 August 2014 ## Reducing the size of mediawiki database MediaWiki 1.19.9 PHP 5.3.10 MySQL 5.5.37 I have a mediawiki site which has a very large database size ( 11 GB) . I want to deploy the site onto a development server. But the development server has limited resources like disk space. So I want to reduce the size of the database to 200MB. I tried a couple of things 1. i ran the deleteBatch.php and deleted 80% of the pages and categories in my wiki 2. I ran deleteOldRevisions.php --delete and deleted all old revisions Earlier the size of my database was 11GB and now its only reduced to 9.5 GB which is really strange. Can anyone tell me what am I missing here? Or whether there is a better way to reduce the size of the database? I am aware of compressing the text to reduce table sizes, but I do not wish to compress the text. Ys, Arnab 109.133.131.8408:18, 1 August 2014 ## How do you make edit notices? How do you make edit notices on your own wiki? 01:27, 28 July 2014 You mean? 05:21, 28 July 2014 The thing what appears when you go to: https://en.wikipedia.org/w/index.php?title=Wikipedia:Administrators%27_noticeboard/Incidents&action=edit 02:50, 1 August 2014 Ah, ok. For this, i think the best is to read this page: Help:Edit_notice. If you have questions then, please ask :) 06:48, 1 August 2014 ## VisualEditor Support on Media Wiki 1.23.2 Edited by another user. Last edit: 06:40, 1 August 2014 Hello All, I am having a hard time to find out if the new MediaWiki 1.23.2 supports the Visual Editor. we are using Visual Editor on previous versions and we really need that so I was looking for information about the new media wiki version and the Visual Editor. Is it possible to use Visual Editor with the new Version? Where can I check information about this? Thanks in advance! LonelyRider82 11:45, 31 July 2014 I have the same problem. Can anyone help us? 179.180.183.17519:25, 31 July 2014 21:06, 31 July 2014 ## problems to migrate from Mediawiki 1.17.0 to 1.23.2 under Windows Hi all, I am having problems to migrate from Mediawiki 1.17.0 to 1.23.2 under Windows. I am following the instructions in in http://www.mediawiki.org/wiki/Manual:Upgrading. I reached the chapter "Run the update script" and: The call "php update.php" simply does nothing. My php installation seems to be ok, a call like "php info.php" runs fine. • OS: Windows Server 2003 • PHP version: 5.3.8 • MySQL version: 5.1.45 Thank you Hartmut 87.139.247.23013:27, 31 July 2014 What you mean with nothing? Is there _no_ output? 13:55, 31 July 2014 right. 'php update.php' returns immediatly with no output. Hartmut 87.139.247.23015:15, 31 July 2014 Hmm, have you changed the value of error_reporting in your php.ini (for the cli, not for webserver!)? Can you try to run the update from the webinstaller (make a backup!!!)? 06:38, 1 August 2014 ## time ParserFunction gives unexpected output On the afternoon of July 31, 2014 I noticed the following behaviour:  {{#time:Y-m}} => 2014-07 {{#time:Y-m|now -1 months}} => 2014-07 (<-same month?) {{#time:Y-m|now -2 months}} => 2014-05  By Aug 1st, the same functions yield as expected: {{#time:Y-m}} => 2014-08 {{#time:Y-m|now -1 months}} => 2014-07 {{#time:Y-m|now -2 months}} => 2014-06  Am I just using the function wrong? Tried it on my mediawiki.org talk page too with the same result. Are adjustments by month not doing what I think? Thanks! 03:03, 1 August 2014 Maybe i's possible, that you refer to your local time zone? The time parser function uses the server time (or a configured time in LocalSettings.php), so it's possible, that the server was in August and "you was still in July"? Just an idea :) 06:36, 1 August 2014 ## dupe Edited by 2 users. Last edit: 06:33, 1 August 2014 03:03, 1 August 2014 ## Using 'OR' operator in queries Simple questions, hopefully a simple solution. Basically, 'real' SQL queries allow you to do this: .WHERE 'foo' = 'pi' OR 'bar' = 'pi' Doing the same in 'Mediawiki style' isn't quite as apparent, though. It seems to only be known how to use the AND operator, like so: 'foo' => 'pi', 'bar' => 'pi' ...With the above example being equivalent to: WHERE 'foo' = 'pi' AND 'bar' = 'pi' In the simpleest of terms: How can I uss the 'OR' operator in a query while staying true to the 'wiki' style? I guess I could use the query() function (As opposed to delete(), select(), update(), write() and so forth), but the rest of my queries are 'wiki' style and I prefer for things to remain uniform. Thanks, if you happen to have the answer. 173.217.255.8105:33, 1 August 2014 Conditions in Database access layer's select are always connected with AND (like the documentation to this function say: https://doc.wikimedia.org/mediawiki-core/master/php/html/classDatabaseBase.html#a76f9e6cb7b145a3d9020baebf94b499e If you want to use OR; you can specify the conditions as a string, like (edited example from Manual:Database_access): $res = $dbr->select( 'category', //$table
array( 'cat_title', 'cat_pages' ),            // $vars (columns of the table) '( cat_pages > 0 ) OR ( cat_pages = 1 )', //$conds combined with OR
__METHOD__,                                   // $fname = 'Database::select', array( 'ORDER BY' => 'cat_title ASC' ) //$options = array()
);


But: Maybe you can consider to remove the OR condition if possible, sometimes it ive a way to get the same result with only one condition or with and connected conditions.

Another way that should work is to use DatabaseBase::makeList(). I haven't tested it, but you can define a new var and use this as a condition string (makeList() returns a string), example:

$conds = array( 'cat_pages > 0', 'cat_pages' => 1 );$res = $dbr->select( 'category', //$table
array( 'cat_title', 'cat_pages' ),            // $vars (columns of the table)$dbr->makeList( $conds, LIST_OR ), //$conds combined with OR
__METHOD__,                                   // $fname = 'Database::select', array( 'ORDER BY' => 'cat_title ASC' ) //$options = array()
);

06:29, 1 August 2014

Hi,

We have our website :http://www.trueerp.com/wiki/Main_Page We use to do wiki help files on it, by logging into it.

But unfortunately we have lost the password. How can we retrieve the password? mediawiki version 1.16.0 PHP version: 5.4.28

13:24, 31 July 2014

13:55, 31 July 2014

151.225.137.14521:42, 31 July 2014

Hi how can I create drop down user menu for example please visit http://www.pidgi.net/wiki/Main_Page and lcick guest I would like it to be like that but I have the codes for it but it breakes javascript for everything.

20:22, 23 July 2014

> but I have the codes for it but it breakes javascript for everything. Maybe you can say us, from where you have the code :) Maybe you have the link to your site, so we can have a look at this?

For me it looks like that this is a feature of the specific skin.

06:37, 24 July 2014

Hi but the javascript brakes.

94.197.122.7910:24, 24 July 2014

Hello!

> Hi but the javascript brakes. It's not a very good explanation of the problem ;) What say the javascript console? Some error mesages? Have you an example page?

11:27, 24 July 2014
Edited by 2 users.
Last edit: 09:41, 25 July 2014

Yes here http://en.random-wikisaur.tk/wiki/Main_Page wikieditor doesent show on any page search bar wont work.

it has to do with these codes

the second one is because I added something to make it drop down on action because it woulden work without the code because javascript is broken because of the following codes on top.

94.197.122.7613:25, 24 July 2014

Hello!

You try to load following ressource:
http://en.random-wikisaur.tk/wiki/%3Csidebar-feature-imgsrc%3E

which doesn't exist. It's the message key from the "feature" code:

<img width="100%" title="<?php $this->msg('sidebar-feature-alttext') ?>" alt="<?php$this->msg('sidebar-feature-alttext') ?>"
src="<?php $this->msg('sidebar-feature-imgsrc') ?>" /></a>  Can you remove or fix this first, please? :) 17:17, 24 July 2014 ## Patch from 1.23.1 to 1.23.2 Error I am trying to update Mediawiki 1.23.1 to 1.23.2 using the released patch file. My PHP version is 5.3.3, MySQL is 5.1.73 and OS is CentOS 6.5. I Gunzip'd the patch file and moved it into the Mediawiki main folder and did a dry run, and below shows the error I am getting. There is no tests folder in my wiki folder, so I'm not sure where I am supposed to get those from. wiki>patch -p1 --dry-run < mediawiki-1.23.2.patch patching file includes/api/ApiFormatJson.php patching file includes/db/DatabasePostgres.php patching file includes/DefaultSettings.php patching file includes/ImagePage.php patching file includes/OutputPage.php patching file includes/parser/ParserOutput.php patching file includes/Preferences.php patching file includes/SiteStats.php patching file maintenance/initSiteStats.php patching file RELEASE-NOTES-1.23 patching file resources/Resources.php patching file resources/src/mediawiki.page/mediawiki.page.image.pagination.js can't find file to patch at input line 276 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |diff -Nruw -x messages -x '*.png' -x '*.jpg' -x '*.xcf' -x '*.gif' -x '*.svg' -x '*.tiff' -x '*.zip' -x '*.xmp' -x '.git*' mediawiki-1.23.1/tests/phpunit/includes/api/format/ApiFormatJsonTest.php mediawiki-1.23.2/tests/phpunit/includes/api/format/ApiFormatJsonTest.php |--- mediawiki-1.23.1/tests/phpunit/includes/api/format/ApiFormatJsonTest.php 2014-07-30 19:29:15.619144417 +0000 |+++ mediawiki-1.23.2/tests/phpunit/includes/api/format/ApiFormatJsonTest.php 2014-07-30 19:24:41.560514483 +0000 -------------------------- File to patch: Skip this patch? [y] Skipping patch. 1 out of 1 hunk ignored  204.90.74.721:07, 30 July 2014 Pinging User:MarkAHershberger 21:20, 30 July 2014 I am having the exact same problem. I have the impression that the last bit of the patch file is where the problem lies. If I remove the following bit of the patch: diff -Nruw -x messages -x '*.png' -x '*.jpg' -x '*.xcf' -x '*.gif' -x '*.svg' -x '*.tiff' -x '*.zip' -x '*.xmp' -x '.git*' mediawiki-1.23.1/tests/phpunit/includes/api/format/ApiFormatJsonTest.php mediawiki-1.23.2/tests/phpunit/includes/api/format/ApiFormatJsonTest.php --- mediawiki-1.23.1/tests/phpunit/includes/api/format/ApiFormatJsonTest.php 2014-07-30 19:29:15.619144417 +0000 +++ mediawiki-1.23.2/tests/phpunit/includes/api/format/ApiFormatJsonTest.php 2014-07-30 19:24:41.560514483 +0000 @@ -14,4 +14,9 @@$this->assertInternalType( 'array', json_decode( $data, true ) );$this->assertGreaterThan( 0, count( (array)$data ) ); } + + public function testJsonpInjection( ) { +$data = $this->apiRequest( 'json', array( 'action' => 'query', 'meta' => 'siteinfo', 'callback' => 'myCallback' ) ); +$this->assertEquals( '/**/myCallback(', substr( $data, 0, 15 ) ); + }  The following happens: # patch -p1 --dry-run < mediawiki-1.23.2.patch_mod patching file includes/api/ApiFormatJson.php patching file includes/db/DatabasePostgres.php patching file includes/DefaultSettings.php patching file includes/ImagePage.php patching file includes/OutputPage.php patching file includes/parser/ParserOutput.php patching file includes/Preferences.php patching file includes/SiteStats.php patching file maintenance/initSiteStats.php patching file RELEASE-NOTES-1.23 patching file resources/Resources.php patching file resources/src/mediawiki.page/mediawiki.page.image.pagination.js Hunk #1 succeeded at 60 with fuzz 1.  06:06, 31 July 2014 I'm having exactly the same problem, no test folder. 'can't find file to patch at input line 276' 217.111.210.4306:17, 31 July 2014 Does this seem to you like it's not breaking any needed functionality? 204.90.74.713:52, 31 July 2014 The errors are all related to files in the folder tests/. This folder is not needed for MediaWiki to run; it is not present in the 1.23.x tarballs. Until the patch file has been fixed, you can just run the "broken" patch file and remove the .rej files, which it leaves behind. Afterwards you have a correctly updated installation - exactly what you should have! 88.130.83.23714:29, 31 July 2014 ## best practice to import Templates (Wikipedia Style Cite Web , german Internetquelle) Edited by another user. Last edit: 14:40, 30 July 2014 Hello, i have installed a brandnew 1.23.1 in a corporate environment. In Order to organize external web links i have activated Extension:Cite which is also running fine. However, neither the english wikipedia´s Template:Cite_Web nor the german Vorlage:Internetquelle is in my Wiki which i´d like to format external weblinks. Ich could now create the template and all depedencies manually by cut/copy/paste from some other sites. However, export (Special:Export/Template: ) doesn´t seem to work on Template: and Vorlage: , and import into these area also seems to be blocked. Is there a smart way to copy all those templates from another page ? Best would be repetitive job keeping my wiki in line with some other in terms of Templates and formatting. Holger Warnat 14:31, 30 July 2014 Export of Templates (german Vorlagen) is possible ;) Just request https://de.wikipedia.org/wiki/Spezial:Exportieren (german wikipedia) and type in "Vorlage:Internetquelle". If you want to have full dependencies, click "Inklusive Vorlagen" before click "Seiten exportieren". After this you become an export XML file which you can import simply in your wiki with Special:Import (german Spezial:Importieren"). 11:27, 31 July 2014 ## [RESOLVED] Changes affecting InstantCommons function? Has anything changed in the way Commons feeds to an outside Wiki? All the pictures disappeared from our wiki on Saturday 31 May 2014, with no change in programming (and the host denies changing or limiting anything). All the pictures other than the site's logo are from Commons (and we encourage our users to develop that resource). It's been so long I can't remember which MediaWiki version we use. 11:02, 2 June 2014 You use MediaWiki 1.15.4 (http://wikishire.co.uk/wiki/Special:Version), i would say: Update soon ;) InstantCommons works like before (if i'm right, tested with MW 1.24wmf2). Be sure, that you set$wgUseInstantCommons to true.

11:55, 2 June 2014

And after upgrading please run the update.php ether in the web updater or in ssh please. By going to here http://wikishire.co.uk/mw-config for the web updater.

5.66.153.13515:18, 2 June 2014

And you can uninstall the stringfunction extension because some of it was merged into ParserFunctions extension

And to enable the integrated string function in parser function just add this to LocalSettings.php

$wgPFEnableStringFunctions = true; 5.66.153.13515:20, 2 June 2014 http://wikishire.co.uk/w/mw-config/ 86.135.251.10022:02, 2 June 2014 Edited by another user. Last edit: 22:26, 2 June 2014 And please also add$wgUpgradeKey = 'set-me-to-some-random-string';

This to LocalSettings.php but please do change upgrade key to something else that no one else knows.

86.135.251.10022:03, 2 June 2014

## Can't delete image uploads. "Error deleting file: Could not create directory 'mwstore://local-backend/local-deleted/a/x/b'."

Edited by author.
Last edit: 16:02, 29 July 2014

Product Version
MediaWiki 1.23.1
PHP 5.5.9-1ubuntu4.3 (apache2handler)
MySQL 5.5.38-0ubuntu0.14.04.1

Ubuntu Server is running on a Virtual Machine. My /var/www/html/mediawiki/images directory is mounted to my storage drive as the boot drive is only for the OS. The Wiki is private.

LocalSettings.php does not have $wgUploadDirectory or$wgUploadPath set, so those are the default. $wgDeletedDirectory is a mount on another file server which has the same permissions as the images directory. 755 & www-data as both owner & group. Directory: /var/www/html/mediawiki/images (mounted to a different drive than the rest of /var/www/html/mediawiki) /mnt/fileserver/deletedwikifiles php.ini has file_uploads set to on and my version means that safe_mode isn't the issue. I read about a bug regarding upgrading MediaWiki from 1.22 to 1.23 causing file uploads to be broken, but that was traced back to shared hosts and this server isn't shared. Any help is appreciated. Edit: I just thought I'd bump this with a bit more technical information. I couldn't delete files, but I could upload them. Then I did the following commands from the root of MediaWiki: sudo chmod 775 -R ./ [Entire MediaWiki Root has rwxrwxr-x permission set.] sudo chmod 666 -R ./images [images * subdirectories has rw-rw-rw- permission set.] sudo chmod 775 ./images [The directory images has rwxrwxr-x permission set.] sudo chown root:www-data -R ./ [This means Root has full rwx for everything but files in images where it has rw- only while apache web group has rw- for images, but not the directory, and rwx for the rest of MediaWiki's root.]  Then I could delete the files, but when I tried to upload them, I got this error: 'Could not create directory "mwstore://local-backend/local-public/b/b9".' and the thumbnails were broken. Then I did this command from the same root directory of MediaWiki: sudo chmod 777 -R ./ [Everything has all the permission for MediaWiki's root directory.]  And once again, I can upload files, and see thumbnails/files, but I can't delete them again, getting 'Error deleting file: Could not create directory "mwstore://local-backend/local-deleted/8/d/b".' when I try. I'm baffled as to how to troubleshoot what appears to be a permissions problem in this situation after those results. 16:39, 28 July 2014 Can you check if the directory specified in Manual:$wgDeletedDirectory exist and is writeable from the webserver?

08:52, 29 July 2014

I figured you might be on to something there because I did the following:

ls -la /mnt/fileserver/deletedwikifiles

drwxrwxrwx  4 root root 4096 Jul 29 10:09 .
drwxrwxrwx  4 root root 4096 Jul 29 10:09 public
drwxrwxrwx  4 root root 4096 Jul 29 10:09 private


So I checked and I hadn't configured /etc/fstab to mount the drive such that www-data is owner/group because it's on an NTFS volume (which means it makes root owner/user by default). I tried redefining $wgDeletedDirectory =$wgScriptPath/images/deleted as a test.

ls -la ./images/deleted

drwxrwxrwx  4 www-data www-data 4096 Jul 29 10:09 .
drwxr-xr-x 14 www-data www-data 4096 Jul 29 09:39 ..
drwxrwxrwx  2 www-data www-data 4096 Jul 29 10:08 private
drwxrwxrwx  2 www-data www-data 4096 Jul 29 10:09 public


Yet it still gives the "Creating directory" error when trying to delete a file. I tried changing the above permissions to 755 (rwxr-xr-x), just like it is for the rest of ./images, but that didn't fix it either.

15:28, 29 July 2014

You may try creating the directory from the shell, directly, but as the webserver's account, using the sudo command.

If it succeeds, you may also set a debug log to see exactly the full path it's trying to access.

09:25, 31 July 2014

Note that this command will render your image folders inaccessible:

sudo chmod 666 -R ./images [images * subdirectories has rw-rw-rw- permission set.]


Directories need the execute permission set to be accessible.

Setting 777 for uploaded files is also not recommended.

The recommended way to set such permissions is to use the find command:

find ./images -type d -exec chmod 755 {} \;
find ./images -type f -exec chmod 644 {} \;


Depending on who's the owner of those files, permissions may vary from 777/666 for debugging or even 700/600 for strict permissions on shared hosts.

09:48, 29 July 2014

That's good to know.

Of course. That was a test to see if I could access them correctly. A test to see if permissions is the problem.

With these permissions, set exactly how you have them written there, I cannot upload or delete files. That's the first time this result has happened. I get both errors:

Could not create directory "mwstore://local-backend/local-public/2/26".
Error deleting file: Could not create directory "mwstore://local-backend/local-deleted/8/d/b".


I figured it might be because I had done this before that:

sudo chown root:www-data ./images


So I tried changing it to this:

sudo chown www-data:www-data ./images


And that let me upload files. Found the culprit there.

Check my response to Florianschmidtwelzow above if you want to know about the deleting files error.

15:15, 29 July 2014

## Edit Vector Tabs/Where Do Tabs Get Output?

I'm trying to heavily modify Vector (latest version), mostly the footer and the header. However, when trying to create a custom header, something annoying occurs. I figured out mw-page-base and mw-head-base via colors, and now I put the Namespaces, Variants, Views, Actions, Search tabs into mw-head-base, but they pop up into custom-header (my custom class for the header), and the logo doesn't appear either.

http://mustachio.madsplash.net/index.php/Main_Page is where you can see what's going on. The transparent black background is my custom header class, red is mw-page-base, and blue is mw-head-base. I want the tabs and the line of user links to be in the blue box, not in the black box.

Any help in this regard?

207.254.173.2519:54, 30 July 2014

Hi!

If you want to output parts of the page at another place inside it, then you should edit the skin file! In case of vector, this would be the file skins/Vector.php, in case of a custom skin the according PHP file of that skin. This file basically contains the HTML structure of each wiki page and inbetween some function calls, which create the markup of the according part. Move the HTML and or these function calls so that they create the strcutre, which you want! (After that you obviously will have to adjust the CSS to make things fit again on screen, but first things first, last things last.)

88.130.124.9420:10, 30 July 2014
Edited by another user.
Last edit: 21:21, 30 July 2014

Here's currently what I've got it outputting... if you read in the top section, you'll notice where I've got the tabs put, but unfortunately I may have to use Absolute positioning to fix it. #blegh

<div id="custom-header">
<div id="p-logo" role="banner" style="width: 180px; height: 100%;">
<a style="background-image: url(<?php $this->text( 'logopath' ) ?>; width: 100%; height: 100%;);" href="<?php echo htmlspecialchars($this->data['nav_urls']['mainpage']['href'] ) ?>" <?php echo Xml::expandAttributes( Linker::tooltipAndAccesskeyAttribs( 'p-logo' ) ) ?>></a>
</div>

<div class="clear: both;"> </div>
</div>

<div id="mw-page-base" class="noprint" style="background-color: red;"></div>

<?php $this->renderNavigation( 'PERSONAL' ); ?> <div id="left-navigation"> <?php$this->renderNavigation( array( 'NAMESPACES', 'VARIANTS' ) ); ?>
</div>

<?php $this->renderNavigation( array( 'VIEWS', 'ACTIONS', 'SEARCH' ) ); ?> </div> </div> </div> </div> <div id="content" class="mw-body" role="main"> <a id="top"></a> <div id="mw-js-message" style="display:none;"<?php$this->html( 'userlangattributes' ) ?>>

</div>

<?php
if ( $this->data['sitenotice'] ) { echo "<div id='siteNotice'>" .$this->html('sitenotice') . "</div>";
}
?>

$this->data['pageLanguage'] =$this->getSkin()->getTitle()->getPageViewLanguage()->getHtmlCode();
$this->text( 'pageLanguage' ); ?>"> <span dir="auto"> <?php$this->html( 'title' ) ?>
</span>
</h1>

<?php \$this->html( 'prebodyhtml' ) ?>


... (rest omitted for space)

207.254.173.2521:11, 30 July 2014

## Page error

Good morning.

My page is wiki.westeros.pl

I don't know but now it is not working. There is some error. Could somebody help me?

Thank You

18:19, 28 July 2014

When like in your case you get several errors, always solve the first one first.

> Warning: include_once(../wiki_settings.php) [function.include-once]: failed to open stream: No such file or directory in /home/trouse/domains/westeros.pl/public_html/wiki/LocalSettings.php on line 17

In LocalSettings.php on line 17 you are trying to include a file, which is not there. Either fix the include patch or move/rename the file accordingly (or do both)!

88.130.96.17521:07, 28 July 2014

Looks like your MediaWiki isn't installed correctly, is missing some files, or you are including files in the wrong directory. How did you install the MediaWiki and what version?

20:16, 29 July 2014

Mediawiki was installed one year ago and worked correctly until that happened

20:31, 30 July 2014

I see you have fixed the include path - a "Thank you" would have been nice...

88.130.124.9420:54, 30 July 2014

 First page Previous page Next page Last page