Project:Support desk/Flow/2014/12
This page is an archive. |
Please ask questions on the current support desk. |
This page used the LiquidThreads extension to give structured discussions. It has since been converted to wikitext, so the content and history here are only an approximation of what was actually displayed at the time these comments were made. |
feed from private wiki
We have a private wiki:
- MediaWiki 1.23.5
- PHP 5.3.3-7+squeeze21
- MySQL 5.1.73-1
Is there a way to read feeds from our wiki without a login? Is there something like the $wgWhitelistRead variable for feeds?
Can somebody help me, thanks in advance!
Greetings, Stefan 129.27.104.9 (talk) 08:49, 1 December 2014 (UTC)
- Which feeds? Watchlist feed? Recentchanges? Florianschmidtwelzow (talk) 09:41, 1 December 2014 (UTC)
- mainly the watchlist feed, recentchanges and new sides are also interesting 129.27.104.9 10:38, 1 December 2014 (UTC)
- And now the question is: What means private :) You mean that all users must login to read the content?
- For watchlists, you can use Watchlist tokens. Florianschmidtwelzow (talk) 12:28, 1 December 2014 (UTC)
- Yes, all users must login to read the content. I also don't see changes in the watchlist feed if I use tokens and I'm not logged in. 129.27.104.9 13:30, 1 December 2014 (UTC)
- mainly the watchlist feed, recentchanges and new sides are also interesting 129.27.104.9 10:38, 1 December 2014 (UTC)
- I am not the original poster but am also looking into getting Recent Changes RSS feeds to work from a wiki that requires login for access. I use tinytinyRSS, a web based feed aggregator. It's set up so that clicking on an RSS feed link generates a new feed. When I click on the recent changes RSS link in wikipedia, it creates a working link. When I click the same button in our password protected mediawiki it gives me an error:
No feeds found in http://ccmdb.kuality.ca/api.php?hidebots=1&days=7&limit=50&action=feedrecentchanges&feedformat=rss
Tenbergen (talk) 00:34, 12 March 2015 (UTC)- When I look at the feed from a different browser that is not set up to push rss links into tinyRSS. When I am logged in I get something that looks like an RSS feed. When I log out I get the API instructions, preceded by
<?xml version="1.0"?>
<api>
<error code="readapidenied" info="You need read permission to use this module" xml:space="preserve">
Tenbergen (talk) 00:51, 12 March 2015 (UTC)- When I look at the error in TinyRSS it says "LibXML error 5 at line 3217 (column 1): Extra content at the end of the document"
- When I copy and paste the API response into Notepad++ to count lines it only seems to have 3206. Tenbergen (talk) 01:22, 12 March 2015 (UTC)
- Firefox -> view source code: It displays line numbers, and it indeed has more than 3217 lines.
- There's no point in having a private wiki and also leak a recent changes feed. Sorry, but I don't think you would get support for opening that feed on a private wiki. Ciencia Al Poder (talk) 11:35, 12 March 2015 (UTC)
- Thanks for the source code hint, I was looking at the rendered page. Looking at the source code hint, it appears that the complaint is about the script section at the very end. Which makes sense, it expects an XML document and instead receives an html document with a script at the end. The RSS reader can't interpret that, so to get any meaningful idea what is going on takes a fair bit. I think it might make more sense if, in response to a feed request, the api generated a "feed" that states the error?
- Regarding the login requirement, I am not trying to get the feed to bypass it. TinyRSS can provide a login account and password, it just isn't working. I am trying to find out more about that. Tenbergen (talk) 23:37, 12 March 2015 (UTC)
- TinyRSS forums got back saying that for an authenticated feed listing to work, "http basic/digest auth" needs to be supported and that "digest authentication requires curl". Does Mediawiki work like that? Tenbergen (talk) 15:02, 16 March 2015 (UTC)
- I am still trying to figure this one out. https://en.wikipedia.org/wiki/Wikipedia:Syndication#Watchlist_feed_with_token makes it sound like I should be able to read at least my watch list as long as I give it the token from preferences, following pattern http://en.wikipedia.org/w/api.php?action=feedwatchlist&wlowner=USERNAME&wltoken=TOKEN. I get exactly the same error. If I understand right the whole purpose of the token is to be able to access things without having to log on. Am I misunderstanding this?
- T Tenbergen (talk) 03:11, 27 March 2015 (UTC)
- You are correct. But still you need readapi rights, since that's the first thing that gets checked, and logged out users don't have that right in your wiki. This may or may not be considered a bug.
- You may try to file a BUGREPORT about that so the readapi right is checked in this case for the user in wlowner, if the providen token is correct. Ciencia Al Poder (talk) 10:41, 27 March 2015 (UTC)
- Already reported in bug tracker, first for the inability for my RSS aggregator to log in (https://phabricator.wikimedia.org/T92469) and then seconded a pre-existing report that the watchlist token would still require login (https://phabricator.wikimedia.org/T76528). I had not initially thought to search for a watchlist bug, what I really want to see is recent changes, but I could make watchlist work by adding all articles to my watchlist. Nuisance, but...
- As it is, the only use I could see for the watchlist token is to log in and be able to monitor a different user's watchlist via token. Not sure what that would be good for, but hey... Tenbergen (talk) 14:47, 27 March 2015 (UTC)
- TinyRSS forums got back saying that for an authenticated feed listing to work, "http basic/digest auth" needs to be supported and that "digest authentication requires curl". Does Mediawiki work like that? Tenbergen (talk) 15:02, 16 March 2015 (UTC)
- Gorantornqvist (talk) 13:35, 29 June 2015 (UTC)
<?php // Simple wrapper script to allow access to MediaWiki Recent changes without authentication. // REST library , may be better ones out there. // https://github.com/nischayn22/MediaWiki_Api require_once( 'mediawikiapi.php' ); // NOTE: I needed to add trim($data) in mediawikiapi.php everywhere where simplexml_load_string was used to work with mediawiki. // Custom additions to above lib: /* function getFeedRecentChanges($days, $limit) { $url = $this->siteUrl . "/api.php?days=$days&limit=$limit&action=feedrecentchanges&feedformat=atom"; $data = httpRequest($url, $params = ''); $xml = simplexml_load_string(trim($data)); errorHandler($xml); return $xml; } */ // Config - PS: HTTPS is recommended $mediawikiurl = "https://my-mediawiki/api.php"; // API Login credentials, create this mediawiki user. $username = "rss"; $password = 'ThisIsMySecretPassword'; // Primitive authentication - The secret that needs to be passed by querystring to access the page rss.php // rss.php?secret=blahablaha $secret = "c5f63b6039e347a5899c8b3cc5e45966"; if ($_GET['secret'] != $secret) { die("Secret is incorrect!"); } if (isset($_GET['days'])) { $days = $_GET['days']; } else { $days = "7"; } if (isset($_GET['limit'])) { $limit = $_GET['limit']; } else { $limit = "50"; } $api = new MediaWikiApi($mediawikiurl); $api->login($username, $password); $xml = $api->getFeedRecentChanges($days, $limit); header("Content-Type: application/xml"); print $xml->asXML(); ?>
[RESOLVED] Pictures being blocked
I work in a school, we have Wikipedia open for staff and students to use. We've recently noticed that pictures are being blocked, but the site is still accessible. Are the pictures now held on a server with a different address that we need to unfilter? Thanks Matt 212.173.124.98 (talk) 09:54, 1 December 2014 (UTC)
- By "noticed that pictures are being blocked", do you mean that pictures are not loaded instead? Most browsers include "Developer Tools" which allow you to see the Network traffic and which specific items take a long time to load. AKlapper (WMF) (talk) 11:00, 1 December 2014 (UTC)
- Hvae you whitelisted
upload.wikimedia.org
? Florianschmidtwelzow (talk) 13:32, 1 December 2014 (UTC)- thanks Florianschmidtwelzow, that sorted it 212.173.124.98 11:33, 2 December 2014 (UTC)
[RESOLVED] Lessc issue with MW1.25alpha (40a8070) -- Vector Skin (fd9a9f0)
From the apache2 error.log: [Mon Dec 01 12:23:33 2014] [error] [client x.x.x.x] PHP Fatal error: Class 'lessc' not found in /var/www/w/xxxx/includes/resourceloader/ResourceLoader.php on line 1497, referer: http://xxxx/w/xxxx/index.php/Hauptseite
The entire CSS is gone. Install required as laid out here: http://stackoverflow.com/questions/7245826/less-compiler-for-linux or here: http://stackoverflow.com/questions/13671969/how-to-automatically-compile-less-into-css-on-the-server/13671970#13671970 ????? Temptuousinsolence (talk) 11:49, 1 December 2014 (UTC)
- That's why it's not a good idea to use git master in production :) With Gerrit change 175485 lessc isn't included in mediawiki core anymore. If you don't install MediaWiki via a tarball installer, you need to install the vendor dir with
composer install
or you clone the mediawiki/vendor repo:git clone https://gerrit.wikimedia.org/r/mediawiki/vendor
Florianschmidtwelzow (talk) 11:52, 1 December 2014 (UTC)- It is not my production system ... just for documentation.
- I have the vendor directory ... and composer.
- I have switched to chameleon for the moment. Temptuousinsolence (talk) 11:59, 1 December 2014 (UTC)
- If you already have composer, you must run an update to load all (new) dependencies :) Just run
composer install
Florianschmidtwelzow (talk) 12:25, 1 December 2014 (UTC)- Guess what I have already done:
- Loading composer repositories with package information
- Installing dependencies (including require-dev) from lock file
- Nothing to install or update
- Generating autoload files Temptuousinsolence (talk) 12:28, 1 December 2014 (UTC)
- Hmm, with this you should have a less libary tested with mediawiki already :/ Can you try to delete the vendor directory and load all composer dependencies again? Florianschmidtwelzow (talk) 09:38, 3 December 2014 (UTC)
- I have made a composer update today and a git pull to 1.25alpha (2e2958d) and all works fine again. Temptuousinsolence (talk) 11:57, 3 December 2014 (UTC)
- Hmm, with this you should have a less libary tested with mediawiki already :/ Can you try to delete the vendor directory and load all composer dependencies again? Florianschmidtwelzow (talk) 09:38, 3 December 2014 (UTC)
- If you already have composer, you must run an update to load all (new) dependencies :) Just run
Protected variable styles of includes/OutputPage.php vs. extension using it
In MW 1.24 variable styles which is defined in includes/OutputPage.php has been changed from public to protected. Because of this there is now a problem with extension wysiwyg where onBeforePageDisplay hook is trying to use $out->styles variable.
Only workaround which I have been able to find is to change type of variable "styles" back to "public". Does this cause some kind of security issues with MW ?
So far I have been unsuccessful with my attempts to "extend" visibility of protected variable "styles" from OutputPage.php to wysiwyg. Could some of you php experts give me a hint how this could be solved properly? Riparap (talk) 17:54, 1 December 2014 (UTC)
- You should file a bug against MW for this. That way whatever is needed to fix it will be more likely to stick around in the future.
- That said, you'll probably need to create an accessor and use it in the CKEditor code.
- If you file a bug for this, I'll work on helping you fix it. ☠MarkAHershberger☢(talk)☣ 02:36, 2 December 2014 (UTC)
- Alguna novedad sobre el tema, algún tio que pueda enviar paso a paso toda la instalación para mitigar esto. 186.101.118.158 16:07, 10 December 2014 (UTC)
- I have opened this in MW bug tracker T76461.
- Talk page of extension
- Issue in github repo of wysiwyg.
- Function onBeforePageDisplay of wysiwyg extension is trying to:
- read certain .css definitons from the page
- extract contents of each .css file and place it as inline style definition on page
- delete orginal -css definition from page
- I was trying to debug this with MW1.24.
-
- For issue 1. I used function buildCssLinksArray of OutputPage.php. With my limited skills of php programming I was able to extract names of style sheets but unable to get all the other data needed (f.ex type of css).
- Issue 2. is not a problem because public function addInlineStyle is available in OutputPage.php.
- For issue 3. I was unable to find a solution.
- Is it still possible to have above procedure in MW 1.24?
- On the other hand... comments of code block (function onBeforePageDisplay, lines ~194-214) in wysiwyg is referring to some limitation of IE (after max.31 style sheets IE hangs). I do not know if this has been some limitation of some older version of IE or perhaps caused by old version of IE + old CKeditor together. So is this kind of reformatting for style sheets of page necessary at all?
- Related code:
- Riparap (talk) 16:29, 12 December 2014 (UTC)
public static function onBeforePageDisplay( &$out, &$text ) { global $wgRequest, $wgScriptPath; //var_dump($out->styles); $action = $wgRequest->getText( 'action' ); if (! in_array($action, array('edit', 'submit'))) return $out; $inlineStyles = array(); foreach ( $out->styles as $key => $val ) { if (count($out->styles[$key]) > 0) { if (isset($out->styles[$key]['condition']) || isset($out->styles[$key]['dir']) || strpos($key, '?') !== false || strpos($key, 'jquery.fancybox') !== false) continue; $count = 1; $cssFile = dirname(__FILE__) . '/../../' . str_replace($wgScriptPath, '', $key, $count); $cssFile = str_replace('//', '/', $cssFile); if (isset($out->styles[$key]['media']) && file_exists($cssFile)) { $cssCont = file_get_contents($cssFile); if ($cssCont !== false) { if (! isset($inlineStyles[$out->styles[$key]['media']])) $inlineStyles[$out->styles[$key]['media']] = ''; $inlineStyles[$out->styles[$key]['media']] .= $cssCont."\n"; unset($out->styles[$key]); } } } } foreach($inlineStyles as $media => $css ) { $out->addInlineStyle( $css ); } return $out; }
- I guess CKeditor should use ResourceLoader, which already concatenates all styles in a single request Ciencia Al Poder (talk) 10:40, 16 December 2014 (UTC)
- I received a like error after installing the latest version of the WYSIWYG CK editor on MW 1.24. As suggested, changing the "$style" variable from "protected" to "public" solves the problem. So I would also be interested to know whether this presents a security issue. 27.33.94.164 11:18, 3 January 2015 (UTC)
- I would like to know as well. Is this a security risk? Ymoran00 (talk) 07:57, 6 February 2015 (UTC)
- The change from protected/private to public in a variable is not a security risk. The visibility of variables is just a coding practice to restrict the usage of such variables from external classes, so if you need to make a breaking change on a variable that's private or protected, you can be certain that it won't break external classes because they can't be using it directly. Ciencia Al Poder (talk) 10:12, 6 February 2015 (UTC)
- But you should think about, that the maintainer of the code doesn't changed the visibility without any thoughts about it :) Maybe the variable changes unexpectedly if something happens, or will be set to null somewhere or will be renamed in a future version of the code. A private/protected variable is, mostly, private or protected because it shouldn't be (needed) to use outside the class (private) or in classes, that inherits this class.
- But, like Ciencia Al Poder wrote, not really a security risk :) Florianschmidtwelzow (talk) 22:57, 8 February 2015 (UTC)
- The change from protected/private to public in a variable is not a security risk. The visibility of variables is just a coding practice to restrict the usage of such variables from external classes, so if you need to make a breaking change on a variable that's private or protected, you can be certain that it won't break external classes because they can't be using it directly. Ciencia Al Poder (talk) 10:12, 6 February 2015 (UTC)
- I would like to know as well. Is this a security risk? Ymoran00 (talk) 07:57, 6 February 2015 (UTC)
Infoboxes showing <tr> <td> tags although all templates are exported and installed
I installed mediawiki with the following parameters:
MediaWiki | 1.24.0 |
PHP | 5.4.35 (cgi-fcgi) |
MySQL | 5.5.40-cll |
More software and extensions installed can found here: http://bj.jolome.com/kpitan/Sp%C3%A9cial:Version
The issues that I am having is understand why although after I exported many pages and their templates.. Some of the infoboxes will not render properly... They will show
and tags
I installed all Lua related softwares and the wikibase extensions... Which fixed some Lua related errors containing "signal 11". But I don't know how to make the wikipages with infoboxes render without showing these tags.
Any thoughts?
Here is a couple of wikipages from mediawiki installation (fr) :
http://fr.wikipedia.org/wiki/Liste_des_pr%C3%A9sidents_du_B%C3%A9nin http://fr.wikipedia.org/wiki/St%C3%A9phane_Sess%C3%A8gnon
And here is what they look like on my installation:
http://bj.jolome.com/kpitan/Liste_des_pr%C3%A9sidents_du_B%C3%A9nin http://bj.jolome.com/kpitan/St%C3%A9phane_Sess%C3%A8gnon 68.198.240.252 (talk) 18:12, 1 December 2014 (UTC)
- It looks like you're missing some modules. If I look here, I can see some additions that are missing from here. ☠MarkAHershberger☢(talk)☣ 02:27, 2 December 2014 (UTC)
- When I made a diff of both versions of TableBuilder template, they come up the same. So I figure the additions you were referring to are the fact the official wiki template was using other templates that mine didn't. And here are the templates in question:
Modèle:Code Modèle:Icône de titre Modèle:Méta bandeau d'avertissement Modèle:Méta lien vers projet Modèle:Projet Scribunto Modèle:Protection Modèle:Test sous-page documentation Module:Documentation module Module:TableBuilder/Documentation
- I exported them using the Special:Export page, dumped them in my wiki installation with the maintenance script. Ran the update script but nothing changed. There was no error during the importDump, which took awfully long by the way. 68.198.240.252 16:55, 2 December 2014 (UTC)
- It looks like you aren't importing the dumps correctly. Download the dump from here and upload it here.
- Once you've done that, the appearance of on your wiki should match the appearance of this page on frwiki. ☠MarkAHershberger☢(talk)☣ 18:18, 2 December 2014 (UTC)
- I was doing everything you said except when importing it using the web interface. But following your instructions to the dot did not change the outcome. I exported using https://fr.wikipedia.org/w/index.php?title=Sp%C3%A9cial:Exporter&action=submit and I uploaded it to here http://bj.jolome.com/kpitan/Sp%C3%A9cial:Importer
- And the import was successful. No error .But no revision was imported because all these models had previously been imported. Here the import summary page after I upload the wiki xml dump into my wiki http://bj.jolome.com/kpitan/Sp%C3%A9cial:Importer
Importer des pages Importation des pages… Modèle:Code Aucune révision importée (toutes étaient déjà présentes, ou ignorées du fait d’erreurs). Modèle:Icône de titre Aucune révision importée (toutes étaient déjà présentes, ou ignorées du fait d’erreurs). Modèle:Méta bandeau d'avertissement Aucune révision importée (toutes étaient déjà présentes, ou ignorées du fait d’erreurs). Modèle:Méta lien vers projet Aucune révision importée (toutes étaient déjà présentes, ou ignorées du fait d’erreurs). Modèle:Projet Scribunto Aucune révision importée (toutes étaient déjà présentes, ou ignorées du fait d’erreurs). Modèle:Protection Aucune révision importée (toutes étaient déjà présentes, ou ignorées du fait d’erreurs). Modèle:Test sous-page documentation Aucune révision importée (toutes étaient déjà présentes, ou ignorées du fait d’erreurs). Module:Documentation module Aucune révision importée (toutes étaient déjà présentes, ou ignorées du fait d’erreurs). Module:TableBuilder/Documentation Aucune révision importée (toutes étaient déjà présentes, ou ignorées du fait d’erreurs). Modèle:Code/Documentation Aucune révision importée (toutes étaient déjà présentes, ou ignorées du fait d’erreurs). Modèle:Documentation Aucune révision importée (toutes étaient déjà présentes, ou ignorées du fait d’erreurs). Modèle:Sourire Aucune révision importée (toutes étaient déjà présentes, ou ignorées du fait d’erreurs). Modèle:Sous-page de documentation Aucune révision importée (toutes étaient déjà présentes, ou ignorées du fait d’erreurs). Module:Documentation Aucune révision importée (toutes étaient déjà présentes, ou ignorées du fait d’erreurs). Modèle:Avertissement méta-modèle Aucune révision importée (toutes étaient déjà présentes, ou ignorées du fait d’erreurs). Modèle:Icône de titre/Documentation Aucune révision importée (toutes étaient déjà présentes, ou ignorées du fait d’erreurs). Modèle:M Aucune révision importée (toutes étaient déjà présentes, ou ignorées du fait d’erreurs). Modèle:Méta bandeau d'avertissement/Documentation Aucune révision importée (toutes étaient déjà présentes, ou ignorées du fait d’erreurs). Modèle:Attention Aucune révision importée (toutes étaient déjà présentes, ou ignorées du fait d’erreurs). Modèle:C Aucune révision importée (toutes étaient déjà présentes, ou ignorées du fait d’erreurs). Modèle:Méta lien vers projet/Documentation Aucune révision importée (toutes étaient déjà présentes, ou ignorées du fait d’erreurs). Modèle:Documentation lien vers projet Aucune révision importée (toutes étaient déjà présentes, ou ignorées du fait d’erreurs). Modèle:Projet Aucune révision importée (toutes étaient déjà présentes, ou ignorées du fait d’erreurs). Modèle:Projet Portail et projet Aucune révision importée (toutes étaient déjà présentes, ou ignorées du fait d’erreurs). Modèle:Boîte déroulante/début Aucune révision importée (toutes étaient déjà présentes, ou ignorées du fait d’erreurs). Modèle:Boîte déroulante/fin Aucune révision importée (toutes étaient déjà présentes, ou ignorées du fait d’erreurs). Modèle:Protection/Documentation Aucune révision importée (toutes étaient déjà présentes, ou ignorées du fait d’erreurs). Modèle:Protection/Exemple icône Aucune révision importée (toutes étaient déjà présentes, ou ignorées du fait d’erreurs). Modèle:Test sous-page documentation/Documentation Aucune révision importée (toutes étaient déjà présentes, ou ignorées du fait d’erreurs). Module:Documentation module/Documentation Aucune révision importée (toutes étaient déjà présentes, ou ignorées du fait d’erreurs). L'importation a réussi !
- The appearance of http://bj.jolome.com/kpitan/Module:TableBuilder still does not match the one of . Any other suggestion? 68.198.240.252 19:26, 2 December 2014 (UTC)
- I apologize. I gave you the wrong link. When you click this link you should be prompted to download a file. Import that and then post the output. ☠MarkAHershberger☢(talk)☣ 02:29, 3 December 2014 (UTC)
- I clicked on this link https://fr.wikipedia.org/w/index.php?title=Sp%C3%A9cial:Exporter&action=submit&pages=Module:TableBuilder&templates=1&wpDownload=1 and downloaded the xml dump and went to http://bj.jolome.com/kpitan/Sp%C3%A9cial:Importer to import it. And here is the output of the import:
Importation des pages… Module:TableBuilder Aucune révision importée (toutes étaient déjà présentes, ou ignorées du fait d’erreurs). Modèle:Code Aucune révision importée (toutes étaient déjà présentes, ou ignorées du fait d’erreurs). Modèle:Icône de titre Aucune révision importée (toutes étaient déjà présentes, ou ignorées du fait d’erreurs). Modèle:Méta bandeau d'avertissement Aucune révision importée (toutes étaient déjà présentes, ou ignorées du fait d’erreurs). Modèle:Méta lien vers projet Aucune révision importée (toutes étaient déjà présentes, ou ignorées du fait d’erreurs). Modèle:Projet Scribunto Aucune révision importée (toutes étaient déjà présentes, ou ignorées du fait d’erreurs). Modèle:Protection Aucune révision importée (toutes étaient déjà présentes, ou ignorées du fait d’erreurs). Modèle:Test sous-page documentation Aucune révision importée (toutes étaient déjà présentes, ou ignorées du fait d’erreurs). Module:Documentation module Aucune révision importée (toutes étaient déjà présentes, ou ignorées du fait d’erreurs). Module:TableBuilder/Documentation Aucune révision importée (toutes étaient déjà présentes, ou ignorées du fait d’erreurs). L'importation a réussi !
- I don't why you'd expect a different outcome as all this download URL you sent me does is the same thing I have been doing (judging by its query string). Meaning simply export the template TableBuilder template and the templates it uses, from the fr wikipedia installation. I don't why you'd expect to have a different outcome when I import in my wiki installation.
- Thanks for all your help though 68.198.240.252 08:06, 3 December 2014 (UTC)
- If I create an account on your wiki, can you give me permission to run an import?
- I gave you a different URL since I wanted to make sure you were exporting the right pages. I'm still a bit confused but I think if I can take a stab at importing, I may be able to understand what the problem is. ☠MarkAHershberger☢(talk)☣ 15:31, 3 December 2014 (UTC)
- Sure Mark, create the account let me know what the username is and I would give the run import permission.
- Thanks again ! 68.198.240.252 17:00, 3 December 2014 (UTC)
- created, same name as here. ☠MarkAHershberger☢(talk)☣ 23:27, 3 December 2014 (UTC)
- Mark, I just set you up as admin..
- Thanks again! 68.198.240.252 04:45, 4 December 2014 (UTC)
- Mark, You abandoned me? 68.198.240.252 09:58, 5 December 2014 (UTC)
- Any help or pointer will be much appreciated. 68.198.240.252 08:02, 9 December 2014 (UTC)
- Did you see my reply below? This, that and the other (talk) 10:12, 9 December 2014 (UTC)
- If you still need help, please let me know. I'm sorry I missed you for a few days. ☠MarkAHershberger☢(talk)☣ 18:31, 16 December 2014 (UTC)
- Any help or pointer will be much appreciated. 68.198.240.252 08:02, 9 December 2014 (UTC)
- Mark, You abandoned me? 68.198.240.252 09:58, 5 December 2014 (UTC)
- created, same name as here. ☠MarkAHershberger☢(talk)☣ 23:27, 3 December 2014 (UTC)
- I apologize. I gave you the wrong link. When you click this link you should be prompted to download a file. Import that and then post the output. ☠MarkAHershberger☢(talk)☣ 02:29, 3 December 2014 (UTC)
- If you enclose the
{{trois colonnes|...}}
template call in<table>...</table>
tags, you will find that it works (albeit without the CSS styling, which you will need to copy in from fr:MediaWiki:Common.css). - Your modules are producing identical wikitext output to those on French Wikipedia (according to Special:ExpandTemplates). I think the modules have a bug which manifests itself on your wiki, but which is not seen on Wikipedia because of some aspect of Wikipedia's configuration. Possibly HTML Tidy is having an effect. This, that and the other (talk) 10:29, 6 December 2014 (UTC)
Infoboxes are gone and script error is displayed at the top of every page
I'm really ignorant to how all this works I just try my best to follow instructions. Yeah so ever since I special imported template:infobox church my infoboxes disappeared. On top of that I see "Script error" on every page above the text. On one page I see
Lua error in Module:Infobox at line 229: attempt to index field 'html' (a nil value). Backtrace: (tail call): ? Module:Infobox:229: ? (tail call): ? mw.lua:553: ? (tail call): ? [C]: in function "xpcall" MWServer.lua:73: in function "handleCall" MWServer.lua:266: in function "dispatch" MWServer.lua:33: in function "execute" mw_main.lua:7: in main chunk [C]:
It's slightly different on other pages. How can I fix this and get my infoboxes to show? 98.211.180.16 (talk) 03:37, 2 December 2014 (UTC)
- Just to clarify I updated Scribunto and some other extensions but it only seemed to make the situation worse. 98.211.180.16 03:38, 2 December 2014 (UTC)
- Could you post a link to your wiki? ☠MarkAHershberger☢(talk)☣ 18:04, 2 December 2014 (UTC)
Problem with EmailtoWiki
Hi,
I'm a beginner...
I have a problem with the extension EmailtoWiki (http://www.mediawiki.org/wiki/Extension:EmailToWiki)
I install it in extension -> EmailToWiki. I configure the EmailToWiki.conf like:
Name of the wiki which the emails will populate (must be running on the same host) $::wiki = "http://wiki.digitalfestival.net"; The wiki template to wrap the email paramaters in $::template = "Email"; Extract just the email address portion of the FROM and TO fields $::emailonly = 1; Don't import emails into the wiki if the From address isn't registered in the wiki $::fromfilter = 0; If there's HTML formatting in the email don't also add <pre> sections for non-HTML versions of the content $::html_only = 0; Details of the POP or IMAP server to check for messages $::type = "IMAP"; $::host = "imap.gmail.com"; $::user = "s.cividini@phid.it"; $::pass = "****"; Delete messages after processing them $::remove = 0; Maximum amount of message to download $::limit = 20000000; Format of the title for the corresponding article in the wiki $::format = "Email:\$id (\$subject)"; The user the webserver runs as $::owner = "www-data"; 1;
but the email can't update the article in my wiki.
Can you help me?
Thanks Serena SerenaCividini (talk) 12:01, 2 December 2014 (UTC)
- Hi!
- In the example conf file comments always are put behind a "#" sign, which is not present in your configuration.
- Also note that in the example $::wiki is not pointing to the domain name, but to the index.php file. 88.130.76.189 13:27, 2 December 2014 (UTC)
- Oh ok, in the conf file I have comments with #
- For the second point you mean the link must be http://wiki.digitalfestival.net/index.php ?
- Thanks
- Serena 151.84.195.76 13:47, 3 December 2014 (UTC)
CollapsibleVector pregernce help to fix it
Hi could I have some help to fix preference in extension:CollapsibleVector please. The problem is described at https://phabricator.wikimedia.org/T76314 and the extension page is at https://git.wikimedia.org/summary/mediawiki%2Fextensions%2FCollapsibleVector
Please help me fix it thanks 92.40.250.73 (talk) 13:42, 2 December 2014 (UTC)
- It seems it is also affecting extension:usermerge but when extension:CollapsibleVector is disabled usermerge works again. 92.40.250.73 13:44, 2 December 2014 (UTC)
- I am not sure how to fix. Please could someone help. 92.40.250.73 14:05, 2 December 2014 (UTC)
- Since this has been reported, your best bet now is to follow Phabricator. ☠MarkAHershberger☢(talk)☣ 17:51, 2 December 2014 (UTC)
- Ok. 92.40.250.85 11:06, 3 December 2014 (UTC)
- Since this has been reported, your best bet now is to follow Phabricator. ☠MarkAHershberger☢(talk)☣ 17:51, 2 December 2014 (UTC)
- I am not sure how to fix. Please could someone help. 92.40.250.73 14:05, 2 December 2014 (UTC)
Exception while upgrading from 1.23.7 to 1.24.0
Hello,
I'm getting the following exception while upgrading from 1.23.7 to 1.24.0 on a CentOS 5.10 release of Linux:
MediaWiki internal error. Original exception: [41fd252f] /index.php/Main_Page Exception from line 182 of /data1/mediawikidata/mediawiki-1.24.0/includes/Hooks.php: Invalid callback in hooks for LinkBegin Backtrace: #0 /data1/mediawikidata/mediawiki-1.24.0/includes/GlobalFunctions.php(3995): Hooks::run(string, array, NULL) #1 /data1/mediawikidata/mediawiki-1.24.0/includes/Linker.php(212): wfRunHooks(string, array) #2 /data1/mediawikidata/mediawiki-1.24.0/includes/Linker.php(269): Linker::link(Title, string, array, array, array) #3 /data1/mediawikidata/mediawiki-1.24.0/includes/parser/Parser.php(2275): Linker::linkKnown(Title, string, array, array) #4 /data1/mediawikidata/mediawiki-1.24.0/includes/parser/Parser.php(2240): Parser->makeKnownLinkHolder(Title, string, array, string, string) #5 /data1/mediawikidata/mediawiki-1.24.0/includes/parser/Parser.php(1901): Parser->replaceInternalLinks2(string) #6 /data1/mediawikidata/mediawiki-1.24.0/includes/parser/Parser.php(1262): Parser->replaceInternalLinks(string) #7 /data1/mediawikidata/mediawiki-1.24.0/includes/parser/Parser.php(405): Parser->internalParse(string) #8 /data1/mediawikidata/mediawiki-1.24.0/includes/content/WikitextContent.php(338): Parser->parse(string, Title, ParserOptions, boolean, boolean, integer) #9 /data1/mediawikidata/mediawiki-1.24.0/includes/content/AbstractContent.php(490): WikitextContent->fillParserOutput(Title, integer, ParserOptions, boolean, ParserOutput) #10 /data1/mediawikidata/extensions/FlaggedRevs/backend/FlaggedRevs.class.php(545): AbstractContent->getParserOutput(Title, integer, ParserOptions) #11 /data1/mediawikidata/extensions/FlaggedRevs/frontend/FlaggablePageView.php(693): FlaggedRevs::parseStableRevision(FlaggedRevision, ParserOptions) #12 /data1/mediawikidata/extensions/FlaggedRevs/frontend/FlaggablePageView.php(354): FlaggablePageView->showStableVersion(FlaggedRevision, string, string) #13 /data1/mediawikidata/extensions/FlaggedRevs/frontend/FlaggedRevsUI.hooks.php(194): FlaggablePageView->setPageContent(boolean, boolean) #14 [internal function]: FlaggedRevsUIHooks::onArticleViewHeader(Article, boolean, boolean) #15 /data1/mediawikidata/mediawiki-1.24.0/includes/Hooks.php(206): call_user_func_array(string, array) #16 /data1/mediawikidata/mediawiki-1.24.0/includes/GlobalFunctions.php(3995): Hooks::run(string, array, NULL) #17 /data1/mediawikidata/mediawiki-1.24.0/includes/page/Article.php(605): wfRunHooks(string, array) #18 /data1/mediawikidata/mediawiki-1.24.0/includes/actions/ViewAction.php(44): Article->view() #19 /data1/mediawikidata/mediawiki-1.24.0/includes/MediaWiki.php(414): ViewAction->show() #20 /data1/mediawikidata/mediawiki-1.24.0/includes/MediaWiki.php(282): MediaWiki->performAction(Article, Title) #21 /data1/mediawikidata/mediawiki-1.24.0/includes/MediaWiki.php(584): MediaWiki->performRequest() #22 /data1/mediawikidata/mediawiki-1.24.0/includes/MediaWiki.php(435): MediaWiki->main() #23 /data1/mediawikidata/mediawiki-1.24.0/index.php(46): MediaWiki->run() #24 {main} Exception caught inside exception handler: [5d193f75] /index.php/Main_Page Exception from line 182 of /data1/mediawikidata/mediawiki- 1.24.0/includes/Hooks.php: Invalid callback in hooks for LinkBegin Backtrace: #0 /data1/mediawikidata/mediawiki-1.24.0/includes/GlobalFunctions.php(3995): Hooks::run(string, array, NULL) #1 /data1/mediawikidata/mediawiki-1.24.0/includes/Linker.php(212): wfRunHooks(string, array) #2 /data1/mediawikidata/mediawiki-1.24.0/includes/Linker.php(269): Linker::link(Title, string, array, array, array) #3 /data1/mediawikidata/mediawiki-1.24.0/includes/skins/Skin.php(948): Linker::linkKnown(Title, string) #4 /data1/mediawikidata/mediawiki-1.24.0/includes/skins/Skin.php(973): Skin->footerLink(string, string) #5 /data1/mediawikidata/mediawiki-1.24.0/includes/skins/SkinTemplate.php(451): Skin->disclaimerLink() #6 /data1/mediawikidata/mediawiki-1.24.0/includes/skins/SkinTemplate.php(274): SkinTemplate->prepareQuickTemplate(OutputPage) #7 /data1/mediawikidata/mediawiki-1.24.0/includes/OutputPage.php(2195): SkinTemplate->outputPage() #8 /data1/mediawikidata/mediawiki-1.24.0/includes/exception/MWException.php(195): OutputPage->output() #9 /data1/mediawikidata/mediawiki-1.24.0/includes/exception/MWException.php(238): MWException->reportHTML() #10 /data1/mediawikidata/mediawiki-1.24.0/includes/exception/MWExceptionHandler.php(45): MWException->report() #11 /data1/mediawikidata/mediawiki-1.24.0/includes/exception/MWExceptionHandler.php(141): MWExceptionHandler::report(MWException) #12 /data1/mediawikidata/mediawiki-1.24.0/includes/MediaWiki.php(449): MWExceptionHandler::handle(MWException) #13 /data1/mediawikidata/mediawiki-1.24.0/index.php(46): MediaWiki->run() #14 {main}
I'm not sure if this might be because I'm using a symlink from my 1.23.7 LocalSettings.php file to the new release or if something else might be going on.
Any thoughts?
Cheers! Theanswriz42 (talk) 17:30, 2 December 2014 (UTC)
- A symlink would not cause this. ☠MarkAHershberger☢(talk)☣ 18:03, 2 December 2014 (UTC)
- I was thinking moreover that I'm using the same LocalSettings.php as the 1.23.7 setup in my 1.24.0 install, not by function of it being a symlink itself. Theanswriz42 (talk) 19:10, 2 December 2014 (UTC)
- https://phabricator.wikimedia.org/T71231 is about the same issue. 88.130.76.189 19:13, 2 December 2014 (UTC)
- I was thinking moreover that I'm using the same LocalSettings.php as the 1.23.7 setup in my 1.24.0 install, not by function of it being a symlink itself. Theanswriz42 (talk) 19:10, 2 December 2014 (UTC)
- I have the same problem -- can someone roll me a bone?
- MediaWiki internal error.
- Original exception: [1da9057a] /familywiki/index.php?title=Main_Page Exception from line 182 of /home/hiproots/public_html/familywiki/includes/Hooks.php: Invalid callback in hooks for LinkBegin
- Backtrace:
- 0 /home/hiproots/public_html/familywiki/includes/GlobalFunctions.php(3995): Hooks::run(string, array, NULL)
- 1 /home/hiproots/public_html/familywiki/includes/Linker.php(212): wfRunHooks(string, array)
- 2 /home/hiproots/public_html/familywiki/includes/parser/LinkHolderArray.php(425): Linker::link(Title, string, array, array, array)
- 3 /home/hiproots/public_html/familywiki/includes/parser/LinkHolderArray.php(276): LinkHolderArray->replaceInternal(string)
- 4 /home/hiproots/public_html/familywiki/includes/parser/Parser.php(5231): LinkHolderArray->replace(string)
- 5 /home/hiproots/public_html/familywiki/includes/parser/Parser.php(423): Parser->replaceLinkHolders(string)
- 6 /home/hiproots/public_html/familywiki/includes/content/WikitextContent.php(338): Parser->parse(string, Title, ParserOptions, boolean, boolean, integer)
- 7 /home/hiproots/public_html/familywiki/includes/content/AbstractContent.php(490): WikitextContent->fillParserOutput(Title, integer, ParserOptions, boolean, ParserOutput)
- 8 /home/hiproots/public_html/familywiki/includes/poolcounter/PoolWorkArticleView.php(139): AbstractContent->getParserOutput(Title, integer, ParserOptions)
- 9 /home/hiproots/public_html/familywiki/includes/poolcounter/PoolCounterWork.php(123): PoolWorkArticleView->doWork()
- 10 /home/hiproots/public_html/familywiki/includes/page/Article.php(688): PoolCounterWork->execute()
- 11 /home/hiproots/public_html/familywiki/includes/actions/ViewAction.php(44): Article->view()
- 12 /home/hiproots/public_html/familywiki/includes/MediaWiki.php(414): ViewAction->show()
- 13 /home/hiproots/public_html/familywiki/includes/MediaWiki.php(282): MediaWiki->performAction(Article, Title)
- 14 /home/hiproots/public_html/familywiki/includes/MediaWiki.php(584): MediaWiki->performRequest()
- 15 /home/hiproots/public_html/familywiki/includes/MediaWiki.php(435): MediaWiki->main()
- 16 /home/hiproots/public_html/familywiki/index.php(46): MediaWiki->run()
- 17 {main}
- Exception caught inside exception handler: [5e2f04c9] /familywiki/index.php?title=Main_Page Exception from line 182 of /home/hiproots/public_html/familywiki/includes/Hooks.php: Invalid callback in hooks for LinkBegin
- Backtrace:
- 0 /home/hiproots/public_html/familywiki/includes/GlobalFunctions.php(3995): Hooks::run(string, array, NULL)
- 1 /home/hiproots/public_html/familywiki/includes/Linker.php(212): wfRunHooks(string, array)
- 2 /home/hiproots/public_html/familywiki/includes/Linker.php(269): Linker::link(Title, string, array, array, array)
- 3 /home/hiproots/public_html/familywiki/includes/skins/Skin.php(948): Linker::linkKnown(Title, string)
- 4 /home/hiproots/public_html/familywiki/includes/skins/Skin.php(973): Skin->footerLink(string, string)
- 5 /home/hiproots/public_html/familywiki/includes/skins/SkinTemplate.php(451): Skin->disclaimerLink()
- 6 /home/hiproots/public_html/familywiki/includes/skins/SkinTemplate.php(274): SkinTemplate->prepareQuickTemplate(OutputPage)
- 7 /home/hiproots/public_html/familywiki/includes/OutputPage.php(2226): SkinTemplate->outputPage()
- 8 /home/hiproots/public_html/familywiki/includes/exception/MWException.php(195): OutputPage->output()
- 9 /home/hiproots/public_html/familywiki/includes/exception/MWException.php(238): MWException->reportHTML()
- 10 /home/hiproots/public_html/familywiki/includes/exception/MWExceptionHandler.php(45): MWException->report()
- 11 /home/hiproots/public_html/familywiki/includes/exception/MWExceptionHandler.php(141): MWExceptionHandler::report(MWException)
- 12 /home/hiproots/public_html/familywiki/includes/MediaWiki.php(449): MWExceptionHandler::handle(MWException)
- 13 /home/hiproots/public_html/familywiki/index.php(46): MediaWiki->run()
- 14 {main} 98.201.4.33 19:44, 8 May 2015 (UTC)
- Disregard -- It was because of an extension. I commented them out # in LocalSettings.php and then enabled one at a time until I found the offender. 98.201.4.33 20:23, 8 May 2015 (UTC)
- Which extension was it? (just for the benefit of people reading this in the future) This, that and the other (talk) 09:40, 10 May 2015 (UTC)
- I had the same problem, and for me it was the Translate extesion (http://www.mediawiki.org/wiki/Extension:Translate). 201.76.121.22 13:03, 19 May 2015 (UTC)
- Which extension was it? (just for the benefit of people reading this in the future) This, that and the other (talk) 09:40, 10 May 2015 (UTC)
Auto Installer and server files
OK so I'm new, but I have used the service of a web hosting system as it has an 'Auto Installer' for the MediaWiki software. It has installed for me the software on my wiki http://wggc.hostingsiteforfree.com. I don't know how to access the remote web server and get to the server files such as LocalSettings.php. Does anyone know how? I am using: MediaWiki 1.18.1 (I'll upgrade later), PHP 5.3.24 (apache2handler) and MySQL 5.1.61. Thank you! 110.148.171.252 (talk) 09:29, 3 December 2014 (UTC)
- That's a question for your hoster :) Normally you have access via an ftp server, so you can connect to your webspace with your prefered ftp client and transfer files.
- If you set up a new wiki, i suggest to don't use the autoinstaller (with an outdated version) and use the actual tarball installer :) Florianschmidtwelzow (talk) 09:33, 3 December 2014 (UTC)
php
1: Complete novice.
2: I have downloaded MediaWiki 1.24, renamed the root file (ThamesBoats) and uploaded it to my host site. (www.windsorpropertylettings.co.uk) When I try to open MediaWiki in the browser I get the following message - MediaWiki 1.24 internal error MediaWiki 1.24 requires at least PHP version 5.3.2, you are using PHP 5.2.17. I have downloaded PHP 5.4.35 and now have the root file php-5.4.35 unpacked on my desktop. I can find no instruction in the MediaWiki installation document to tell me what to do with, or where to place the php-5.4.35 file. How do the two work together.
(I am already using php for a forum site - riverthamesforum.com, so 1: above is not strictly true!) 2.103.9.30 (talk) 14:46, 3 December 2014 (UTC)
- You have to configure your host to use the updated PHP. Usually, this requires root access to the server.
- You should contact the people providing web hosting for you to see if you can get them to upgrade PHP or how you can use a newer version.
- If you can't do that, then you should download 1.19 which is an LTS supported till this next April and should work for your version of PHP. ☠MarkAHershberger☢(talk)☣ 15:27, 3 December 2014 (UTC)
- Thanks for this. Host server now upgraded PHP to v5.3
- New error message displayed searching for config file in browser - (http://www.windsorpropertylettings.co.uk/ThamesBoats/mw-config/) -
- [3cce11cc] [no req] Exception from line 61 of /websites/123reg/LinuxPackage23/wi/nd/so/windsorpropertylettings.co.uk/public_html/ThamesBoats/includes/WebRequest.php: MediaWiki does not function when magic quotes are enabled.
- Backtrace:
- 0 /websites/123reg/LinuxPackage23/wi/nd/so/windsorpropertylettings.co.uk/public_html/ThamesBoats/includes/Setup.php(544): WebRequest->__construct()
- 1 /websites/123reg/LinuxPackage23/wi/nd/so/windsorpropertylettings.co.uk/public_html/ThamesBoats/includes/WebStart.php(121): require_once(string)
- 2 /websites/123reg/LinuxPackage23/wi/nd/so/windsorpropertylettings.co.uk/public_html/ThamesBoats/mw-config/index.php(36): require(string)
- 3 {main}
- any ideas? 2.103.9.30 12:14, 5 December 2014 (UTC)
- > MediaWiki does not function when magic quotes are enabled.
- You need to contact your host to disable php's magic quotes, which is deprecated since php 5.3. MediaWiki will not be working with magic quotes enabled, see Release_notes/1.24. Florianschmidtwelzow (talk) 17:38, 5 December 2014 (UTC)
Edit Sidebar when using Shred User option
MediaWiki: 1.23.5 PHP: 5.3.3 MySQL 5.1.57
I use the shared user option for a multi-language Wiki. After the last Wiki update I noticed, that I only can eit the sidebar (MediaWiki:Sidebar) of the main Wiki, I can't edit the sidebars of the other language Wikis. Th eonly way to achieve this is ba adding "$wgGroupPermissions ['*']['editinterface']=true;" to the other language Wikis LocalSettings.php.
But that is not the way I want to do this.
Any help?
Cheers AWo 213.198.87.202 (talk) 15:16, 3 December 2014 (UTC)
- Are you an administrator on all those wikis? If so, something like this will work:
$wgGroupPermissions ['AdminGroupYouAreInOnAllWikis']['editinterface']=true;
☠MarkAHershberger☢(talk)☣ 15:21, 3 December 2014 (UTC)
[RESOLVED] Updating multiple table prefixes at the same time?
I have a little bit of an unconventional setup for my wiki family, I have one central wiki and 3 other wikis connected to it directly, due to most folders (with the exception of "cache", "images" and "mw-config") replaced with symlinks to the central wiki. Everything works completely fine, except for one thing, updating - which technically works too, but is a bit painful to do.
See, the "maintenance" folders are symlinked to the central wiki too, they won't work properly by themselves anyway due to other folders also symlinked, however, running the update script from the central wiki only updates the database prefix for the central wiki, to update the 3 other wikis I have to go into the LocalSettings.php of my central wiki and replace the DB prefix with each of the 3 wikis'. Even worse is that some people have asked if I could host their wikis, and I've agreed, but this would mean the update progress would be even more painful.
I've looked into the update script but I'm not exactly sure how I could define which prefixes to update, or if I could specify a certain prefix to update.
FYI, my wikis do share quite a bit of stuff, and I'm wondering if maybe I have set up my shared database wrong, due to the fact that installing extensions like Extension:GlobalCssJs and Extension:GlobalUsage proved impossible, with a "Database query error" every time.
This is all of code related to the shared database:
$wgSharedDB = 'mydb'; $wgSharedPrefix = 'lobby_'; $wgSharedTables = ['spoofuser', 'site_stats', 'user', 'user_properties', 'interwiki', 'ipblocks'];
(I changed the $wgSharedDB due to the fact that I'd rather not release my site to the public at the moment.) Snowstormer ( C ) 20:31, 3 December 2014 (UTC)
- The "Database query error" you got from installing with shared db should probably be reported as a bug.
- I have a similar so that I can use the same code for 3 different wikis. I just set the environment varialble
WIKI_ENV
to the wiki I want. From the LocalSettings.php, I can set up the required DB, extensions, etc. for that wiki. - This allows me to run maintenance scripts for each wiki by running them with
WIKI_ENV
set appropriately. - It sounds like this sort of setup would work for you, too. ☠MarkAHershberger☢(talk)☣ 23:36, 3 December 2014 (UTC)
- Note that update.php does not update shared tables, unless you provide the
--doshared
argument. Ciencia Al Poder (talk) 10:38, 4 December 2014 (UTC)- I am aware of that, I have run
--doshared
every time I've updated. - Not sure how I would go about setting
WIKI_ENV
, care to explain? Snowstormer (talk) 11:47, 4 December 2014 (UTC)- Assuming you're using *nix based hosting and have CLI access, you could set the WIKI_ENV variable by putting it at the beginning of the line (assuming your shell is sh or something similar):
$ WIKI_ENV=dev php maintenance/update.php --quick --doshared
☠MarkAHershberger☢(talk)☣ 04:30, 5 December 2014 (UTC)- That actually worked, thanks. Snowstormer (talk) 10:00, 5 December 2014 (UTC)
- I am aware of that, I have run
- Note that update.php does not update shared tables, unless you provide the
[RESOLVED] What informaition sould or should not be in Wikipedia
Dear community,
recenly I published an article about Ukrainian restaurant 'Chachapuri' (https://uk.wikipedia.org/wiki/Чачапурі). As you can see it is now nominated for deletion. The main argument is that restaurants have no right to 'live' in Wikipedia, because of non-enciclopedical information. On the other hand there are a majority information about hotels, foreign (!) restaurants etc. in Ukrainian Wikipedia. Are there any taboo on publishing of such kind of information. If not, I need support against non-professional moderating. If yes, then half Wiki should be deleted. Thank U for any answer.
--- GKMastergood 62.216.49.2 (talk) 09:59, 4 December 2014 (UTC)
- Hello,
- MediaWiki.org can not help with the content of other Wikimedia wiki projects. Please discuss the problem with the community of your wikipedia, i suggest on the delete discussion page. The content of Wikipedias is made by the community only. Thanks. Florianschmidtwelzow (talk) 10:49, 4 December 2014 (UTC)
[RESOLVED] Can't create local user / Invalid callback in hooks for UserCryptPassword
System upgraded from 1.18.1 to 1.23.5.
Works on identical wiki install from 1.23.5 - no upgrade.
Uses LDAP Auth Extension.
Localsettings.php has line:
$wgLDAPUseLocal = true;
Attempted to create a local user and received this error:
Internal error
[e00936e7] /mediawiki/index.php?title=Special:UserLogin&action=submitlogin&type=signup Exception from line 182 of /srv/www/htdocs/mediawiki/includes/Hooks.php: Invalid callback in hooks for UserCryptPassword
Backtrace:
- 0 /srv/www/htdocs/mediawiki/includes/GlobalFunctions.php(4013): Hooks::run(string, array, NULL)
- 1 /srv/www/htdocs/mediawiki/includes/User.php(4533): wfRunHooks(string, array)
- 2 /srv/www/htdocs/mediawiki/includes/User.php(2259): User::crypt(string)
- 3 /srv/www/htdocs/mediawiki/includes/User.php(2239): User->setInternalPassword(string)
- 4 /srv/www/htdocs/mediawiki/includes/specials/SpecialUserlogin.php(553): User->setPassword(string)
- 5 /srv/www/htdocs/mediawiki/includes/specials/SpecialUserlogin.php(532): LoginForm->initUser(User, boolean)
- 6 /srv/www/htdocs/mediawiki/includes/specials/SpecialUserlogin.php(282): LoginForm->addNewAccountInternal()
- 7 /srv/www/htdocs/mediawiki/includes/specials/SpecialUserlogin.php(219): LoginForm->addNewAccount()
- 8 /srv/www/htdocs/mediawiki/includes/specialpage/SpecialPage.php(379): LoginForm->execute(NULL)
- 9 /srv/www/htdocs/mediawiki/includes/specialpage/SpecialPageFactory.php(503): SpecialPage->run(NULL)
- 10 /srv/www/htdocs/mediawiki/includes/Wiki.php(285): SpecialPageFactory::executePath(Title, RequestContext)
- 11 /srv/www/htdocs/mediawiki/includes/Wiki.php(588): MediaWiki->performRequest()
- 12 /srv/www/htdocs/mediawiki/includes/Wiki.php(447): MediaWiki->main()
- 13 /srv/www/htdocs/mediawiki/index.php(46): MediaWiki->run()
- 14 {main}
Tcaton-nm (talk) 18:02, 4 December 2014 (UTC)
- What extensions do you have installed? Florianschmidtwelzow (talk) 01:02, 6 December 2014 (UTC)
- Cite
- ConfirmAccount
- Gadgets
- ImageMap
- InputBox
- Interwiki
- LdapAuthentication
- LocalisationUpdate
- Maintenance
- Nuke
- ParserFunctions
- PdfHandler
- Renameuser
- SecurePasswords
- SyntaxHighlight_GeSHi
- UserMerge
- WikiEditor
- embed_document.php
Tcaton-nm (talk) 19:59, 10 December 2014 (UTC)- Can you try to deactivate the SecurePasswords extension? Florianschmidtwelzow (talk) 13:41, 12 December 2014 (UTC)
- Cite
Can't launch MediaWiki module
I am technical writer, not an IT person, but I need to set up a local MediaWiki instance to generate output from WebWorks ePublisher. I've tried reading the docs, but I'm afraid they've not helped.
Here's what I've done so far, but I'm totally stuck on getting any further:
1. Installed XAMPP. 2. Installed Bitnami's MediaWiki.
Questions:
- I can't launch the MediaWiki module. I get the error: Error code: ERR_CONNECTION_REFUSED. I know this is trying to access localhost (my computer) at 127.0.0.1, but I don't know how to let the connection go through. What do I have to configure to permit access to localhost?
- I also need the URL to the wiki. Since it's not on an actual web server (say for www.example.com), I just don't know what the URL would be to MediaWiki.
I hope that after I get these configured that I'll be able to continue.
Thanks!
Linda Gallagher 2601:1:9300:2AE0:1197:4E02:A424:55E1 (talk) 18:57, 4 December 2014 (UTC)
- You may have a local firewall active that is blocking the connection. I suppose you're using Windows? And where exactly are you seeing this "ERR_CONNECTION_REFUSED" message?
- The URL to the wiki is "localhost" :) That will work fine for a local installation that will be accessed from your computer only. This, that and the other (talk) 10:32, 6 December 2014 (UTC)
Local Login no longer works after upgrade from 1.18.1 to 1.23.5
Local Login no longer works after upgrade from 1.18.1 to 1.23.5
System upgraded from 1.18.1 to 1.23.5.
Local login works on identical wiki install from 1.23.5 - no upgrade and restore from backup MW1.18.1.
Use LDAP Auth Extension.
Localsettings.php has line:
$wgLDAPUseLocal = true;
Error Message:
Login error
Incorrect password entered.
Please try again.
Start request POST /mediawiki-xxxx/index.php?title=Special:UserLogin&action=submitlogin&type=login&returnto=Main+Page
HTTP HEADERS:
HOST: alb-wit-wiki.xxxx.x.x.x
CONNECTION: keep-alive
CONTENT-LENGTH: 114
CACHE-CONTROL: max-age=0
ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
ORIGIN: http://alb-wit-wiki.xxxx.x.x.x
USER-AGENT: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.71 Safari/537.36
CONTENT-TYPE: application/x-www-form-urlencoded
REFERER: http://alb-wit-wiki.xxxx.x.x.x/mediawiki-xxxx/index.php?title=Special:UserLogin&returnto=Main+Page
ACCEPT-ENCODING: gzip, deflate
ACCEPT-LANGUAGE: en-US,en;q=0.8
COOKIE: wikixxxx_session=ei3vnrfjk9alekhk635aihak662snsv6i9ltq4ev0oll69k9kk20
[caches] main: APCBagOStuff, message: APCBagOStuff, parser: APCBagOStuff
[caches] LocalisationCache: using store LCStoreDB
Unstubbing $wgParser on call of $wgParser::setHook from registerEmbedDocumentHandler
Parser: using preprocessor: Preprocessor_DOM
Fully initialised
Connected to database 0 at 127.0.0.1:3306
IP: 10.1.x.x
MessageCache::load: Loading en... got from global cache
Unstubbing $wgLang on call of $wgLang::_unstub from ParserOptions::__construct
User: cache miss for user 176
User: loading options for user 176 from database.
Tcaton-nm (talk) 21:54, 4 December 2014 (UTC)
- I've opened this bug, but I have to ask: did you upgrade the ldap extension? ☠MarkAHershberger☢(talk)☣ 18:30, 16 December 2014 (UTC)
API: query recentchanges: Start at offset?
I query the recentchanges but I want to start at an offset of X. Is that possible?
I checked Special:ApiSandbox but I couldn't find anything.
Background is I use an extension to display the 20 latest new pages and I want to add an "load more" button. This needs to start at 21.
Atm I use
api.php?action=query&list=recentchanges&format=json&rcnamespace=0&rcprop=user%7Ctimestamp%7Ctitle&rclimit=10&rctype=new&redirects= Subfader (talk) 22:22, 4 December 2014 (UTC)
- Use the continue value in the response. API:Query#Continuing queries 120.144.185.33 08:21, 5 December 2014 (UTC)
- Yes, but that's a timestamp in list=recentchanges which I do not not know without running the first query. Subfader (talk) 19:54, 5 December 2014 (UTC)
- Well then you'll need to retrieve that timestamp. It's impossible to provide an offset value, as it would be incorrect if more edits happen since the original set was displayed. 110.148.123.212 00:40, 6 December 2014 (UTC)
- Yes, but that's a timestamp in list=recentchanges which I do not not know without running the first query. Subfader (talk) 19:54, 5 December 2014 (UTC)
API: Parse json result titles to links?
I receive titles using $.each but how can I pass them through the parser as links '[['+ item.title +']]'
?
{ "query-continue": { "recentchanges": { "rccontinue": "20141204064939|1459491" } }, "warnings": { "query": { "*": "Formatting of continuation data will be changing soon. To continue using the current formatting, use the 'rawcontinue' parameter. To begin using the new format, pass an empty string for 'continue' in the initial query." } }, "query": { "recentchanges": [ { "type": "new", "ns": 0, "title": "Wikibase/Indexing/Data Model", "timestamp": "2014-12-04T22:28:21Z" }, { "type": "new", "ns": 0, "title": "HHVM/About/ar", "timestamp": "2014-12-04T21:59:09Z" }, { "type": "new", "ns": 0, "title": "MediaWiki Stakeholders' Group/Tasks/Feature wishlist/NAME OF STUDENT", "timestamp": "2014-12-04T21:28:58Z" }, { "type": "new", "ns": 0, "title": "Iwlinks/pl", "timestamp": "2014-12-04T20:30:39Z" }, { "type": "new", "ns": 0, "title": "RecentChanges.php/pl", "timestamp": "2014-12-04T20:26:01Z" }, { "type": "new", "ns": 0, "title": "Random page/pl", "timestamp": "2014-12-04T18:36:37Z" }, { "type": "new", "ns": 0, "title": "Redirects/pl", "timestamp": "2014-12-04T18:36:07Z" }, { "type": "new", "ns": 0, "title": "Martin luther", "timestamp": "2014-12-04T13:44:14Z" }, { "type": "new", "ns": 0, "title": "Design/Living style guide/Requirements", "timestamp": "2014-12-04T11:24:19Z" }, { "type": "new", "ns": 0, "title": "Analytics/Server Admin Log/Archive/2014", "timestamp": "2014-12-04T08:17:09Z" } ] } }
Subfader (talk) 23:57, 4 December 2014 (UTC)
- Since the API should be returning well formed titles, you can just use
mw.util.getUrl()
to turn a title into a URL relative to the current page. mw.loader.using( 'mediawiki.util', function() { var url = mw.util.getUrl( 'Wikibase/Indexing/Data Model' ); // Gives '/wiki/Wikibase/Indexing/Data_Model' // Then you could use the URL in a link var $link = $( '<a>' ).attr( 'href', url ).text( 'Wikibase/Indexing/Data Model' ); console.log( $link ); } );
- If you really need the exact link HTML used by MediaWiki links, you could construct the links in wikitext format (
[[link]]
), then send that wikitext to the parse API, then read the returned HTML ($.parseHTML()
) and extract the links. 120.144.185.33 08:15, 5 December 2014 (UTC)- Hi, yes I need the exact Parser output since I have an extension adding classes to the link.
- I can't believe there is no easier way than passing the json result again through the API + through a jQuery extension :/
- Isn't the API designed to be used via jQuery on the server itself? 93.184.128.25 14:55, 5 December 2014 (UTC)
- Ok, I'm only parsing the end result, not inside the each loop. Thanks! Subfader (talk) 19:51, 5 December 2014 (UTC)
- This leads to the next problem:
Request-URI Too Large
Subfader (talk) 21:17, 5 December 2014 (UTC)- If you want to parse wikitext, then you use the parse API. What could it do to make things easier? If you're having to run wikitext through the parser, then extract HTML from that, you're probably doing something wrong. I don't see why anything in the API would be specifically designed for use with jQuery. The API's design isn't even optimal for JSON format, rather being designed around XML format.
- Use a POST request. 110.148.123.212 00:47, 6 December 2014 (UTC)
Can't log in with new user name
I originally had JHU_GOPC as my log in but was told that it had to be changed. The help chat recommended sarah_gopc but I'm unable to log in with that name. Can you assist? 162.129.44.17 (talk) 14:33, 5 December 2014 (UTC)
- Please refer to your rename request: https://en.wikipedia.org/wiki/Wikipedia:Changing_username/Simple/Archive176#JHU_GOPC_.E2.86.92_Sarah_at_GOPC
- You should be able to login with your new username and your password, if not, try to reset your password via Special:PasswordReset and your e-mail adrese or your new username. If this fails, unhappily, i don't have any idea. Florianschmidtwelzow (talk) 22:12, 5 December 2014 (UTC)
route from one map to another
hi, I am planning a route that starts in France and goes into/through Belgium. When I work in basecamp i have the France map open, go to the border and then open the Belgian map and have to start from scratch??? Is there a way of drawing from one map into the other?
thanks
Martin 86.130.90.113 (talk) 16:12, 5 December 2014 (UTC)
- This isn't the right place for that question. I would just use something like OpenStreetMap, though. ☠MarkAHershberger☢(talk)☣ 18:24, 16 December 2014 (UTC)
Mediawiki thinks I still have magic quotes enabled
Hi. I've manually set magic quotes off in multiple files and upgraded to PHP 5.4. My wiki works for a few minutes and then switches to the internal error message:
How can I stop this? It's really annoying when I'm trying to work on my wiki. Before you say turn off magic quotes, they're already off.
- ↑ [573c15ac] [no req] Exception from line 68 of /home/content/86/10853486/html/wiki/includes/WebRequest.php: MediaWiki does not function when magic quotes are enabled.Backtrace:#0 /home/content/86/10853486/html/wiki/includes/Setup.php(544): WebRequest->__construct()#1 /home/content/86/10853486/html/wiki/includes/WebStart.php(121): require_once(string)#2 /home/content/86/10853486/html/wiki/index.php(43): require(string)#3 {main}
98.211.180.16 (talk) 09:37, 6 December 2014 (UTC)
- Magic quotes are removed from php since version 5.4.0: http://php.net/manual/de/security.magicquotes.php
- If you really have PHP 5.4, make sure, that php files are executed with this version of PHP and not an (already installed) older version.
- And what do you mean with "Manually set magic quotes off in multiple files"? Which files, what have you added where? Please set magic quotes off in your php.ini:
- http://php.net/manual/de/security.magicquotes.disabling.php Florianschmidtwelzow (talk) 16:03, 6 December 2014 (UTC)
Unlocalised $wgExtensionCredits [] ['descriptionmsg']
In 1.24, Special:Version shows the English version of $wgExtensionCredits [] ['descriptionmsg'] as defined in (extension).i18n.php disregarding both content and user's language, in which the needed message is also provided by the localisation file. Alexander Mashin talk 10:56, 6 December 2014 (UTC)
- Hi Alex,
- I have just checked that with a wiki of mine and for me it's working. With e.g. uselang=de in the URL, I see the whole page in German including the different description texts of the extensions/skins. Maybe a caching problem? 88.130.87.233 11:24, 6 December 2014 (UTC)
- Sorry, it was capitalised I in array indices, which are case sensitive. Alex Mashin (talk) 12:51, 6 December 2014 (UTC)
- You should also think about to move your translations to the new JSON format, read Localisation_file_format Florianschmidtwelzow (talk) 15:56, 6 December 2014 (UTC)
- I tried. Couldn't make it work. The messages simply silently wouldn't load. Alex Mashin (talk) 07:32, 7 December 2014 (UTC)
- Works for me. Should you still have the old PHP message file you mentioned above, convert them to JSON format. Then make sure that you do not only have $wgExtensionMessagesFiles in your PHP file, but also the new $wgMessagesDirs! Afterwards the message should appear! 88.130.65.30 14:58, 7 December 2014 (UTC)
- I tried. Couldn't make it work. The messages simply silently wouldn't load. Alex Mashin (talk) 07:32, 7 December 2014 (UTC)
- You should also think about to move your translations to the new JSON format, read Localisation_file_format Florianschmidtwelzow (talk) 15:56, 6 December 2014 (UTC)
- Sorry, it was capitalised I in array indices, which are case sensitive. Alex Mashin (talk) 12:51, 6 December 2014 (UTC)
Watchlist and Ping not working all the time
I work mostly on Commons and the English and Swedish Wikipedia and my main user page is at Commons Goran_tek-en.
I do work as graphic and thereby different Requests on the Graphic_Lab pages of the wikis. I'm very depending on that I get a notification when someone edits a Request I'm working on or Pings me to get my attention.
My problem is that even though I have checked the box Watch this page or someone Pings me I don't get a notification all the time. Most often NOT.
When I look at my Watchlist I can see pages that I haven't got a notification on email as my Preferences says. Ping doesn't either give me notification by email most of the time.
- Is this a problem that is known or has it to do with something with my account/preferences?
To be sure to reach me please use my user page at Commons as above. Goran tek-en (talk) 15:14, 6 December 2014 (UTC)
- replied on talk page. ☠MarkAHershberger☢(talk)☣ 18:22, 16 December 2014 (UTC)
[RESOLVED] Remove login requirement for specific wiki page?
Hey folks,
Using MW 1.21.1 and PHP 5.3.3. Anyways, I have a private wiki (lsipedia.osu.edu) that currently requires login to view anything. I was hoping there was a way (I'm guessing in LocalSettings.php) to remove the login requirement to view a specific page (however the user would be prompted to login upon clicking any of the links on the page). Seems like this can be done, but a quick search didn't yield any obvious answers. Essentially I am building an FAQ that prospective students to Ohio State can view without needing to login. Cheers! 2620:0:1A10:409D:0:0:0:14 (talk) 17:44, 6 December 2014 (UTC)
- You are looking for $wgWhitelistRead! 88.130.87.233 19:13, 6 December 2014 (UTC)
- Bingo! Admin can mark this issue as resolved! 174.103.101.145 00:53, 9 December 2014 (UTC)
[RESOLVED] Extension: BreadCrumbs 2 troubleshooting
I was trying to configure the Wikimedia extension: BreadCrumbs2
I have it all installed, but I'm afraid that I'm having a little bit of trouble setting it up properly. I have a lot of subcategories so it's making things a little difficult.
Is anyone in here familiar with this extension and willing to take a look at what I have so far?
Thanks in advance! 2601:8:A780:899:6CEB:5F72:5599:106E (talk) 02:51, 7 December 2014 (UTC)
- No, I am not familiar with the extension. What is your wiki's URL? Does the extension show up on Special:Version? 88.130.65.30 15:01, 7 December 2014 (UTC)
- It's damn near empty because I'm just trying to get these breadcrumbs set up: www.diyautowiki.com
- To be honest, I don't know what Special:Version is. Sorry, brand new to this. 2601:8:A780:899:DCEE:CB79:BE38:2E00 04:42, 8 December 2014 (UTC)
- Hä? It's working, see: http://diyautowiki.com/index.php/Category:E88 Florianschmidtwelzow (talk) 08:03, 8 December 2014 (UTC)
- This is the Special:Version page: http://diyautowiki.com/index.php/Special:Version
- The extension shows up there, so it at least is installed correctly.
- Then the next question is what is not working.
- Btw. you should add
$wgGroupPermissions['*']['edit'] = false;
$wgGroupPermissions['*']['createaccount'] = false;
- to your LocalSettings.php to stop the spammers from flodding your wiki (which is already happening). 88.130.117.13 13:52, 8 December 2014 (UTC)
- It's close to working, however not fully. I must be messing something up with the Syntax.
- It should read = DIYAutoWiki Home > Manufacturers > BMW > BMW 1 Series and 2 Series > E81 (2007 - 2012)
- Instead it's reading = DIYAutoWiki Home > Manufacturers > BMW > BMW 1 Series and 2 Series >* E81 (2007 - 2012) E88
- I have no clue why the asterisk and the "E88" are showing up. This has to be an error in my formatting and I can't figure it out.
- Here is how I have it setup. Hopefully a fresh set of eyes can tell me where I am going wrong:
* Main Page @ * default @ [[Main Page|DIYAutoWiki Home]] > * Manufacturers @ [[Main Page|DIYAutoWiki Home]] > [[:Category:Manufacturers|Manufacturers]] > ---- <!-- Begin BMW --> * Bmw @ [[Main Page|DIYAutoWiki Home]] > [[:Category:Manufacturers|Manufacturers]] > [[:Category:Bmw|Bmw]] > <!-- Begin BMW 1 Series & 2 Series --> * Bmw 1 series and 2 series @ [[Main Page|DIYAutoWiki Home]] > [[:Category:Manufacturers|Manufacturers]] > [[:Category:Bmw|BMW]] > [[:Category:Bmw 1 series and 2 series|BMW 1 Series and 2 Series]] > * E81 (2007 - 2012) @ [[Main Page|DIYAutoWiki Home]] > [[:Category:Manufacturers|Manufacturers]] > [[:Category:Bmw|BMW]] > [[:Category:Bmw 1 series and 2 series|BMW 1 Series and 2 Series]] > [[:Category:E81 (2007 - 2012)|E81 (2007 - 2012)]] > * E82 (2007 - 2013) @ [[Main Page|DIYAutoWiki Home]] > [[:Category:Manufacturers|Manufacturers]] > [[:Category:Bmw|BMW]] > [[:Category:Bmw 1 series and 2 series|BMW 1 Series and 2 Series]] > [[:Category:E82 (2007 - 2013)|E82 (2007 - 2013)]] > * E87 (2004 - 2011) @ [[Main Page|DIYAutoWiki Home]] > [[:Category:Manufacturers|Manufacturers]] > [[:Category:Bmw|BMW]] > [[:Category:Bmw 1 series and 2 series|BMW 1 Series and 2 Series]] > [[:Category:E87 (2004 - 2011)|E87 (2004 - 2011)]] > * E88 (2007 - 2013) @ [[Main Page|DIYAutoWiki Home]] > [[:Category:Manufacturers|Manufacturers]] > [[:Category:Bmw|BMW]] > [[:Category:Bmw 1 series and 2 series|BMW 1 Series and 2 Series]] > [[:Category:E88 (2007 - 2013)|E88 (2007 - 2013)]] > * F20 (2011 - 2014) @ [[Main Page|DIYAutoWiki Home]] > [[:Category:Manufacturers|Manufacturers]] > [[:Category:Bmw|BMW]] > [[:Category:Bmw 1 series and 2 series|BMW 1 Series and 2 Series]] > [[:Category:F20 (2011 - 2014)|F20 (2011 - 2014)]] > * F22 (2014) @ [[Main Page|DIYAutoWiki Home]] > [[:Category:Manufacturers|Manufacturers]] > [[:Category:Bmw|BMW]] > [[:Category:Bmw 1 series and 2 series|BMW 1 Series and 2 Series]] > [[:Category:F22 (2014)|F22 (2014)]] > * F23 (2014) @ [[Main Page|DIYAutoWiki Home]] > [[:Category:Manufacturers|Manufacturers]] > [[:Category:Bmw|BMW]] > [[:Category:Bmw 1 series and 2 series|BMW 1 Series and 2 Series]] > [[:Category:F23 (2014)|F23 (2014)]] > <!-- End BMW 1 Series & 2 Series -->
- Sorry if this wasn't the best way to format this. You don't want to know how long it took me to accomplish posting this lol. 2601:8:A780:899:14B5:FA6A:BF2F:E310 07:10, 3 January 2015 (UTC)
- Try removing the blank lines between the items in MediaWiki:Breadcrumbs. This, that and the other (talk) 09:03, 3 January 2015 (UTC)
- YOU ARE THE MAN!
- It works! Thank you so much. You have no idea how much that helps me. 2601:8:A780:899:C4C3:195A:156F:A338 22:01, 3 January 2015 (UTC)
- Try removing the blank lines between the items in MediaWiki:Breadcrumbs. This, that and the other (talk) 09:03, 3 January 2015 (UTC)
- Hä? It's working, see: http://diyautowiki.com/index.php/Category:E88 Florianschmidtwelzow (talk) 08:03, 8 December 2014 (UTC)
Best way to grab parent categorization of article categories?
Let's say you have a movie wiki and movie articles are categorized like that:
[[Category:Action]]
>> is in[[Category:Genres]]
[[Category:Comedy]]
>> is in[[Category:Genres]]
[[Category:Bruce Willis]]
>> is in[[Category:Actors]]
[[Category:Will Smith]]
>> is in[[Category:Actors]]
On that movie page I want to be able to use the categories for the json API. But by depending on their parent category type:
- Get the genre categories of the article and do stuff with them.
- Get the actor categories of the article and do stuff with them.
I want to output these in the Javascript vars in the DOM like this (preferably in the order as they're added on the article)
"wgCategoryTypeGroupGenres":["Action","Comedy"]
"wgCategoryTypeGroupActors":["Bruce Willis","Will Smith"]
The parent category names are static and can be defined.
How the hell would I do that? I already have some code to grab the regular page categorization (regex on the article text before output > keeps the category order), but without checking the parent category of each.
It wouldn't make much sense to memcache the query on each page call I guess. Only if a further procedere is added on when a category page is edited. Subfader (talk) 13:58, 7 December 2014 (UTC)
- This sounds like you're looking for Semantic MediaWiki. ☠MarkAHershberger☢(talk)☣ 18:17, 16 December 2014 (UTC)
left, center and right for words
The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
I know how to use this commands for images or a galery, but I want to know hjow to use it for words. for exemple:
test 01 << want it at the right
test 02 << want it at the center
test 03 << want it at the left
And the most important, the can't be one under other, then it would be like this?:
teste 01 test 02 test 03
Can someone help? I looked on mediawiki formatting and I didn't find nothing.. 188.141.46.29 (talk) 14:17, 7 December 2014 (UTC)
- May I ask "why"? AKlapper (WMF) (talk) 13:10, 8 December 2014 (UTC)
- Use a table with 3 cells and specify alignment for each cell. See Help:Tables#Cell_contents_alignment Ciencia Al Poder (talk) 11:13, 9 December 2014 (UTC)
- https://www.mediawiki.org/wiki/Help:Tables#Basics
- without the pointless borders of course. Temptuousinsolence (talk) 13:47, 9 December 2014 (UTC)
- You could also use divs with styles:
<div style='text-align: right;'>I am right aligned</div> <div style='text-align: center;'>I am centered</div> <div style='text-align: left;'>I am left aligned</div>
- Proof of concept:
- I am right aligned
- I am centered
- I am left alignedMglaser (talk) 10:13, 10 December 2014 (UTC)
- Ah, sorry, I didn't see they need to be in the same line. In this case, CSS is possible but it gets a bit more complicated:
<div style='text-align: left;float:left;width:33%;'>I am left aligned</div> <div style='text-align: center;float:left;width:33%;'>I am centered</div> <div style='text-align: right;float:left;width:33%;'>I am right aligned</div>
- I am left aligned
- I am centered
- I am right alignedMglaser (talk) 10:16, 10 December 2014 (UTC)
- Use a table with 3 cells and specify alignment for each cell. See Help:Tables#Cell_contents_alignment Ciencia Al Poder (talk) 11:13, 9 December 2014 (UTC)
Error with Math extension and texvc
I have a fresh install of MediaWiki 1.24.0 on a dedicated CentOS 7 VM. Everything is up and running and seems to work fine. I've installed the standard texlive packages and downloaded the Math extension. I untar'd the folder into $IP/extensions/Math and compile both texvc and texvccheck. Here's a sanity check that everything is where it should be:
[root@wiki Math]# pwd /var/www/mediawiki/extensions/Math [root@wiki Math]# ./texvccheck/texvccheck -[root@wiki Math]# ./math/texvc -[root@wiki Math]# tail -1 /var/www/mediawiki/LocalSettings.php require_once "$IP/extensions/Math/Math.php";
I made no other changes to my installation when installing the Math extension:
[Sun Dec 07 13:35:13.131206 2014] [:error] [pid 20894] [client xxx.xxx.xxx.xxx:53015] PHP Warning: json_encode(): Invalid UTF-8 sequence in argument in /var/www/mediawiki/includes/json/FormatJson.php on line 237, referer: https://wiki.xxxxxx.net/index.php?title=Cryptography&action=edit
I'm not sure which component is generating the invalid JSON. If this is locale related, I have:
[root@wiki mediawiki]# cat /etc/locale.conf LANG="en_US.UTF-8" [root@wiki mediawiki]# grep UTF LocalSettings.php
- available UTF-8 locale
$wgShellLocale = "en_US.UTF-8";
Any ideas where the error might be? Since I'm currently installing the system I have SELinux still turned off. 151.15.184.113 (talk) 20:57, 7 December 2014 (UTC)
- Maybe you should ask your question on the extension talk page. Florianschmidtwelzow (talk) 13:35, 12 December 2014 (UTC)
How to create a whitelist?
Hellow guys, I trying to put youtu.be in the white list, but I couldn't find a tutorial for it and the MediaWiki:Spam-whitelist actually doesn't explain nothing. So, I'm lost. =(
Thx anyway. Brasiltos (talk) 21:09, 7 December 2014 (UTC)
- The page that you linked says: For documentation see http://www.mediawiki.org/wiki/Extension:SpamBlacklist
- Which specific parts of the documentation are unclear? AKlapper (WMF) (talk) 13:12, 8 December 2014 (UTC)
- This part:
- Whitelist
- A corresponding whitelist can be maintained by editing the MediaWiki:Spam-whitelist page.
- When I click on this whitelist page I can't understand what that means...
- I think it'll be easier to understand if I explain what I want:
- When I share a video on youtube I get a link called youtu.be instead a youtube.com, but the mediawiki is blocking this youtu.be and I need it to link video at a specific moment, and the youtube.com it doesn't work, your are obligated to use youtu.be to see a video starting at the exactly second ou minute.
- Basicly I want to put the youtu.be in a whitelist or remove it from the blacklist. 188.141.46.29 14:16, 8 December 2014 (UTC)
- You can have a video from youtube.com start at an exact time. All you have to do is to provide the according time as parameters to the URL. IIrc it was something like t=2m34s. 88.130.117.13 18:29, 8 December 2014 (UTC)
- Belive me, I tried, and it doesn't work, doesn't matter what time I specific using youtube.com the video always starts from the begining Brasiltos (talk) 01:52, 9 December 2014 (UTC)
- So what is your current entry on your whitelist page for this?
- And what does "but the mediawiki is blocking this youtu.be" mean? Clear steps to reproduce welcome. AKlapper (WMF) (talk) 03:52, 9 December 2014 (UTC)
- Video from youtube.com starting at second 13. I don't see a problem - it's working! 88.130.105.36 13:10, 9 December 2014 (UTC)
- Belive me, I tried, and it doesn't work, doesn't matter what time I specific using youtube.com the video always starts from the begining Brasiltos (talk) 01:52, 9 December 2014 (UTC)
- You can have a video from youtube.com start at an exact time. All you have to do is to provide the according time as parameters to the URL. IIrc it was something like t=2m34s. 88.130.117.13 18:29, 8 December 2014 (UTC)
How to specify unix sockets for memcached?
I have a server with memcached at unix:/tmp/memcached.sock
.
In the MediaWiki installation page, it would not allow me to enable memcached for a server that wasn't a number.
The manual pages on $wgMainCacheType and $wgMemCachedServers seem to be for memcached running on TCP ports. What am I not understanding? MadenssContinued (talk) 21:34, 7 December 2014 (UTC)
- Apparently, connecting through socket is not supported by MediaWiki. Please file a BUGREPORT for it. Ciencia Al Poder (talk) 11:08, 9 December 2014 (UTC)
- I have filed a new task. MadenssContinued (talk) 16:49, 26 December 2014 (UTC)
Section titles and TOC
Because of my project, my section titles have to match curriculum headings and are predefined. Some of them are long sentences and look terrible in the TOC. Is there any way to make what appears in the TOC something different than the actual name of the section? Can the section name be truncated in the TOC? Thanks, 99.122.61.20 (talk) 03:41, 8 December 2014 (UTC)
- It's possible to add some css rules in MediaWiki:Common.css to truncate the text of the TOC, the key words are "text-overflow2" and "css" :) Florianschmidtwelzow (talk) 07:59, 8 December 2014 (UTC)
Short URL Problem
So I am using redwerk's short URL method, but it currently doesn't "work" for some reason. The .htaccess seems to work fine, but the "/wiki" in the $wgArticlePath doesn't.
My MediaWiki version is 1.23.6, and it's installed in the "/w" folder.
Here's my .htaccess:
RewriteEngine On
# Short url for wiki pages
RewriteRule ^/?wiki(/.*)?$ %{DOCUMENT_ROOT}/w/index.php [L]
# Redirect to Main Page
RewriteRule ^/*$ %{DOCUMENT_ROOT}/w/index.php [L]
LocalSettings.php:
$wgScriptPath = "/w";
$wgScriptExtension = ".php";
$wgArticlePath = "/wiki/$1";
Here's my error log:
[Mon Dec 08 02:28:42 2014] [error] [client 199.27.128.118] File does not exist: /home/admin/web/sample.com/public_html/wiki
[Mon Dec 08 02:28:48 2014] [error] [client 199.27.128.118] File does not exist: /home/admin/web/sample.com/public_html/wiki
[Mon Dec 08 02:30:50 2014] [error] [client 199.27.128.118] File does not exist: /home/admin/web/sample.com/public_html/wiki
[Mon Dec 08 02:34:14 2014] [error] [client 199.27.128.118] File does not exist: /home/admin/web/sample.com/public_html/wiki
Does anyone know what's wrong? I've been trying to solve this for hours. Ugh... 203.87.176.19 (talk) 08:04, 8 December 2014 (UTC)
- Apparently your .htaccess rules aren't being applied by the webserver, since error logs shows it's still trying to load /wiki, where the rewrite rules tells it to look at /w/index.php instead.
- Maybe your web hosting doesn't allow rewrite rules. Ciencia Al Poder (talk) 11:11, 9 December 2014 (UTC)
- I believe it does since my Vanilla Forum's rewrite rules are being applied. The forum is installed in the same VPS, but just in another directory so I'm not sure..
- Anyway, I tried to add it to my httpd.conf, and still nothing:
<VirtualHost 101.101.101.101:8080> ServerName sample.com ServerAlias www.sample.com ServerAdmin info@sample.com DocumentRoot /home/sample/web/sample/public_html ScriptAlias /cgi-bin/ /sample/admin/web/sample.com/cgi-bin/ Alias /vstats/ /home/sample/web/sample.com/stats/ Alias /error/ /home/sample/web/sample.com/document_errors/ #SuexecUserGroup sample sample CustomLog /var/log/httpd/domains/sample.com.bytes bytes CustomLog /var/log/httpd/domains/sample.com.log combined ErrorLog /var/log/httpd/domains/sample.com.error.log <Directory /home/sample/web/sample.com/public_html/w> RewriteEngine On RewriteRule ^/?wiki(/.*)?$ %{DOCUMENT_ROOT}/w/index.php [L] RewriteRule ^/?$ %{DOCUMENT_ROOT}/w/index.php [L] </Directory> <Directory /home/sample/web/sample.com/public_html> AllowOverride All Options +Includes -Indexes +ExecCGI </Directory> <Directory /home/sample/web/sample.com/stats> AllowOverride All </Directory> <IfModule mod_ruid2.c> RMode config RUidGid sample sample RGroups apache </IfModule> <IfModule itk.c> AssignUserID sample sample </IfModule> Include /home/sample/conf/web/httpd.sample.com.conf* </VirtualHost>
- Ughh.. 203.87.176.19 04:48, 13 December 2014 (UTC)
- Your rewrite rules aren't be applied because they're defined inside the Directory /home/sample/web/sample.com/public_html/w directive, but the rewrite rule applies to /wiki requests.
- You should move them to be directly under the VirtualHost directive.
- Also, the documentation say:
- Note: Enabling rewrites in per-directory context
- To enable the rewriting engine for per-directory configuration files, you need to set ``RewriteEngine On´´ in these files and ``Options FollowSymLinks´´ must be enabled. If your administrator has disabled override of FollowSymLinks for a user's directory, then you cannot use the rewriting engine. This restriction is needed for security reasons.
- So maybe your .htaccess didn't work because you didn't had Options FollowSymLinks for the directory. Ciencia Al Poder (talk) 12:04, 13 December 2014 (UTC)
Apache http_auth and PBKDF2
It appears that in (one of) the latest version(s) of the MediaWiki installation a change in the password style has been implemented.
Is there somewhere some kind of documentation that would help to get some insights in the difficulties that would be created once somehting like http_auth (apache extension) is being used and on how to solve these issues?
The idea is to create a wiki that requires authentification even before the main page of the site can be seen. Temptuousinsolence (talk) 12:07, 8 December 2014 (UTC)
- Not really an answer, but there is a maintenance script called wrapOldPasswords.php, which can change(?) the password type. Anyway, I tried using this script, but its parameters currently are so underdocumented and I also couldn't figure them out by myself so that I didn't manage to get it running. :-( 88.130.117.13 13:40, 8 December 2014 (UTC)
- That is actually quite interesting. Where do you add these parameters?
- https://www.mediawiki.org/wiki/Manual:$wgPasswordDefault
- $wgPasswordDefault
- https://www.mediawiki.org/wiki/Manual:$wgPasswordConfig
- $wgPasswordConfig
- All in LocalSettings? Would this make sense? Temptuousinsolence (talk) 14:31, 8 December 2014 (UTC)
- Works ...
- just add $wgSetPasswortDefault ='B'; (as one example) to the LocalSettings.php, check the entry in the MySQL-database (Select * from Wikiname.user), log off from the Wiki, log on to the Wiki, check database again and compare ...
- works for me. Temptuousinsolence (talk) 15:07, 8 December 2014 (UTC)
Filter view of user list
Hello, how do I filter my user list so that I only see users that are not blocked? I have over 3000 spam users that I blocked (with block and nuke) and just a few real users. I want to see only my real users and it is kind of impossible with the 3000+ blocked users. Thanks.
MW: 1.22.0 PHP: 5.5.3-1ubuntu2.1 (fpm-fcgi) MySQL: 5.1.72-2 cdepedia.thacher.org/cdepedia/ 208.106.122.35 (talk) 17:53, 8 December 2014 (UTC)
- Anyone? Help?! 208.106.122.35 17:19, 15 December 2014 (UTC)
- If you want you can merge all your spam users to a single user with UserMerge. I just started working on BaN again and plan to make it work with the latest UserMerge, but you can just use UserMerge by itself for now. ☠MarkAHershberger☢(talk)☣ 06:40, 16 December 2014 (UTC)
- Thank you for the option.
- Is there no way to simply view only non spam users? 208.106.122.35 17:55, 23 December 2014 (UTC)
- If you want you can merge all your spam users to a single user with UserMerge. I just started working on BaN again and plan to make it work with the latest UserMerge, but you can just use UserMerge by itself for now. ☠MarkAHershberger☢(talk)☣ 06:40, 16 December 2014 (UTC)
API: Join parameter values "foo OR bar"?
How can I join parameter values? E.g. to list the latest audio files (aimime = "audio/mp3" OR "application/ogg").
Is there a workaround? Like running 2 calls and joining the results? Subfader (talk) 21:44, 8 December 2014 (UTC)
- That should be a bug. You should be able to add something like "aimime=audio/mp3|application/ogg" but you can't. The workaround is to run two calls. ☠MarkAHershberger☢(talk)☣ 18:15, 16 December 2014 (UTC)
No localsettings.php file being created
hi,
the installation has finished and I am looking at a link to download LocalSettings.php I click the link and I get a pop up window saying :-
unable to download mw-config/ from myservername. Unable to open this internet site. The requested site is either unavailable or cannot be found. Please try again later
BUT...I am on the server itself so I know its OK..I can access it from another PC ...I can ping it, blah blah so not a connectivity issue.
Also I try to actually find the localsettings.php file and it does not exist anywhere. I looked believe me. So maybe the issue is the local settings file not being created so it cannot find it to download it.. BUT why ..?
Thanks Mike 88.98.65.197 (talk) 14:54, 9 December 2014 (UTC)
- you downloaded and unpacked then files on your system not as root, or? What kind of user has been assigned to the files and folders? Temptuousinsolence (talk) 15:31, 9 December 2014 (UTC)
- HI,
- well its windows box - I should have mentioned....running with xampp
- I unzipped and moved all the files to a folder off htdocs (mw) ,
- no issues while unzipping or installing for that matter other than this ... 88.98.65.197 16:34, 9 December 2014 (UTC)
- sorry I didn't answer - I am dom admin and local admin so shouldn't be an issue I think... 88.98.65.197 16:38, 9 December 2014 (UTC)
- did you check the error log in
xampp\apache\logs
- Have you set up the vhost configuration for xampp? Temptuousinsolence (talk) 16:55, 9 December 2014 (UTC)
- "File does not exist: C:/xampp/htdocs/wiki, referer: https://servername/mw/mw-config/?page=Complete"
- I set the folder to be mw not wiki?
- I have not set up the vhost config for xampp...do I need to? ...I do not recall seeing any mention of that ...
- though I'm a typical man and didn't read the instructions fully... 88.98.65.197 17:03, 9 December 2014 (UTC)
- sorry the error was: /xampp/htdocs/wiki,
- when I set it to mw 88.98.65.197 17:06, 9 December 2014 (UTC)
- did you check the error log in
- sorry I didn't answer - I am dom admin and local admin so shouldn't be an issue I think... 88.98.65.197 16:38, 9 December 2014 (UTC)
[RESOLVED] Internal Error - PEAR mail package is not installed - Fixed in Localsettings.php
I followed the help guide at http://pear.php.net/manual/en/installation.checking.php
pear list Installed packages, channel pear.php.net: ========================================= Package Version State Archive_Tar 1.3.11 stable Auth_SASL 1.0.6 stable Console_Getopt 1.3.1 stable Mail 1.2.0 stable Mail_Mime 1.8.9 stable Net_SMTP 1.6.2 stable Net_Socket 1.0.14 stable PEAR 1.9.4 stable Structures_Graph 1.0.4 stable XML_Util 1.2.1 stable
check_pear.php comes back as true
Is it possible that my cli php/pear is installing somewhere different than where apache is looking? I don't use pear much so it's possible this is my issue somewhere.
Internal error PEAR mail package is not installed Backtrace:
- 0 /var/www/mediawiki/includes/User.php(3605): UserMailer::send(Object(MailAddress), Object(MailAddress), 'ACTSWiki email ...', 'Someone, probab...', NULL)
- 1 /var/www/mediawiki/includes/User.php(3583): User->sendMail('ACTSWiki email ...', 'Someone, probab...')
- 2 /var/www/mediawiki/includes/User.php(2182): User->sendConfirmationMail('changed')
- 3 /var/www/mediawiki/includes/specials/SpecialChangeEmail.php(240): User->setEmailWithConfirmation()
- 4 /var/www/mediawiki/includes/specials/SpecialChangeEmail.php(94): SpecialChangeEmail->attemptChange(Object(User), , )
- 5 /var/www/mediawiki/includes/SpecialPage.php(613): SpecialChangeEmail->execute(NULL)
- 6 /var/www/mediawiki/includes/SpecialPageFactory.php(487): SpecialPage->run(NULL)
- 7 /var/www/mediawiki/includes/Wiki.php(291): SpecialPageFactory::executePath(Object(Title), Object(RequestContext))
- 8 /var/www/mediawiki/includes/Wiki.php(565): MediaWiki->performRequest()
- 9 /var/www/mediawiki/includes/Wiki.php(458): MediaWiki->main()
- 10 /var/www/mediawiki/index.php(59): MediaWiki->run()
- 11 {main} 24.182.132.146 (talk) 20:00, 9 December 2014 (UTC)
- Yes, usually PHP installs with different php.ini files, one for CLI and other for apache.
- Follow the steps of that webpage you linked, specially when it talks about "To check PHP's include_path in your web server (...)" Ciencia Al Poder (talk) 10:49, 10 December 2014 (UTC)
- I did that, unless I did it wrong. I put in above that check_pear.php comes back as true, which I thought means that it finds pear.
- I know php has different files, but would pear be in more than once place? C
- Can i be installing/checking pear from CLI and it really be somewhere different from the web interface?
- Everything I type shows pear at /usr/share/php
- root@localhost:~#pear config-get php_dir
- /usr/share/php
- check_php.php from the web shows
- include_path .:/usr/share/php
- Is there anything for me to add to check_pear.php that would do the pear list to get an idea of what it is showing?
- Thanks in advance! Travs69 (talk) 20:21, 10 December 2014 (UTC)
- Another update.. I added some code to the check pear script
- <?php
- require_once 'System.php';
- require_once 'Mail.php';
- var_dump(class_exists('System', false));
- var_dump(class_exists('Mail', false));
- ?>
- When ran from the web browser it returns
- bool(true) bool(true)
- So still poking around I found the ini_set part of LocalSettings.php and added my /usr/share/php directory to the include path there.. and that solved the issue. I'm still confused why adding it there was needed.
- I should add that I inherited this setup and have no clue if this is standard in the LocalSettings.php or not
- $IP = "/var/www/mediawiki";
- ini_set( "include_path", ".:$IP:$IP/includes:$IP/languages:/usr/share/php" ); Travs69 (talk) 21:56, 11 December 2014 (UTC)
- That's really odd. You said that check_php.php from the web shows include_path .:/usr/share/php, so adding it to ini_set in LocalSettings.php shouldn't be necessary, since it should be there already.
- Maybe try a var_dump(ini_get('include_path')); in LocalSettings.php to see if it's really there Ciencia Al Poder (talk) 11:34, 12 December 2014 (UTC)
- I think the problem is that check_pear.php uses the default include, my Localsettings.php had this: ini_set( "include_path", ".:$IP:$IP/includes:$IP/languages" ); which overwrites the include_path just for that php script.. so I would never see the wrong path in check_pear.php, and unless I had added those actual checks as part of Mediawiki somewhere (maybe in LocalSettings.php idk) to check it there. I'm not sure if that ini_set is standard in mediawiki (I only have one installation so know way to tell) but it looks like a better choice as of php 4.3.0 would be something like this (not tested!)
- set_include_path(get_include_path() .":$IP:$IP/includes:$IP/languages");
- which would add the path we want to the default include_path.
- Just for tests I removed setting the ini_set part of LocalSettings.php and everything works as expected (so far) so I'm not even sure why that was in my LocalSettings.php.
- Thanks for all the help Travs69 (talk) 17:03, 12 December 2014 (UTC)
Can anyone generate a "Before and after" diff of a filesystem with short URLs working?
Does anyone have a complete filesystem-level diff showing exactly what needs to be changed to get Short URLs working on a Mediawiki on Apache 2.4? This can be either using the "root access" method or the ".htaccess" method.
I have spent a lot of time trying to get short URLs working but without success. Rarely does any set of instructions actually say exactly which files were changed (including path) or exactly where in a given file the necessary statements have to be inserted.
I would hope that a simple "before and after" diff of a filesystem will be an easy task for someone.
I'm running: Mediawiki 1.24.0, Apache 2.4.7-1ubuntu4.1, Ubuntu 14.04 LTS, PHP 5.5.9, MySQL 5.5.40-0ubuntu0.14.04.1
Thanks. Gareth.randall (talk) 23:41, 9 December 2014 (UTC)
- Not exactly what you asked for, but my wiki is at domain.com/wiki/ (not /w/index.php, but /wiki/index.php) and I added the following line to my LocalSettings:
$wgArticlePath = "/wiki/$1";
- I added the following three lines to my /wiki/.htaccess file:
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d
RewriteRule ^(.*)$ %{DOCUMENT_ROOT}/wiki/index.php [L]
☠MarkAHershberger☢(talk)☣ 06:38, 16 December 2014 (UTC)
How to edit a wiki page under a section using wiki bot
Hi team, I am using Livingbot http://en.wikipedia.org/wiki/User:LivingBot/Wikibot#How_to_make_your_own_bot My prime aim is to get a page check its content and do edit action or create a subpage and add it to this page using wikibot. I hope this bot can satisfy this, but the edit always replaces the contents. Getting the category and creating a page give the following error ^^^ Error with put_page called from edit_page.
Warning: Cannot modify header information - headers already sent by (output started at /serverlocation/Livingbot.php:188) in /serverlocation/includes/WebResponse.php on line 38
Also i had some errors regarding log-in.
I have installed php version 5.3.3>
Is there a bot some one can help me in doing this.
I am new to both mediawiki and php.
this is the config.php file i used to run the bot
<?php include("Livingbot.php"); $username="usname"; //your username $password="pass"; //your password $wiki='http://localhost:port/mediawiki/api.php'; //prefix your wiki $bot=new Wikibot($username,$password); $page=$bot->get_page('Ajith'); $bot->create_page('Arya', '=Anirudh Karthik V =', 'Subpage'); $bot->edit_page('Ajith', '===Anirudh Karthik V===', 'Minor edit'); ?>
202.88.239.42 (talk) 06:41, 10 December 2014 (UTC)
- That's a question particular to that bot framework. I guess you should ask directly on the talk page of that project.
- The edit_page method say which parameters it accepts, but it doesn't contain a parameter to specify the section, so my guess is that the framework is unable to edit specific sections of the page. Ciencia Al Poder (talk) 10:54, 10 December 2014 (UTC)
- Is there any code or api running on mediawiki to edit a particular section?? Yes, i understand as you said, we are not specifying the section, so if i get the api, i will try to add this with my bot, thanks 202.88.239.42 10:58, 10 December 2014 (UTC)
- API:Edit has a parameter named
section
. Ciencia Al Poder (talk) 11:49, 11 December 2014 (UTC)- what is the link for bot framework support ?? is there any mailing list or support community for bot framework.. 202.88.239.42 13:03, 12 December 2014 (UTC)
- See Manual:Bots and Help:Bots Ciencia Al Poder (talk) 12:14, 13 December 2014 (UTC)
- what is the link for bot framework support ?? is there any mailing list or support community for bot framework.. 202.88.239.42 13:03, 12 December 2014 (UTC)
- API:Edit has a parameter named
- Is there any code or api running on mediawiki to edit a particular section?? Yes, i understand as you said, we are not specifying the section, so if i get the api, i will try to add this with my bot, thanks 202.88.239.42 10:58, 10 December 2014 (UTC)
Warning Unknown: in Unknown on line 0
Warning: Unknown: in Unknown on line 0
Warning: Unknown: failed to open stream: Operation not permitted in Unknown on line 0
Fatal error: Unknown: Failed opening required '/clientdata/apache-www/s/o/solidarity.coop/www/w/index.php' (include_path='.:/clientdata/php/pear-5-4:/clientdata/php/lib') in Unknown on line 0 210.56.82.62 (talk) 17:19, 10 December 2014 (UTC)
- Maybe it is a issue of incorrect permissions:
- http://stackoverflow.com/questions/5326531/php-warning-unknown-failed-to-open-stream Temptuousinsolence (talk) 15:49, 11 December 2014 (UTC)
update.php 1.19 -> 1.23.7
Hi. I am having problems upgrading my mediawiki instance. SO far I have: replaced all files with 1.23.7 files, added back a couple of custom lines for auth, upgraded all extensions to 1.23 and removed unsupported ones and then tried to run php update.php. The script connects and then fails shorty afterward on Error: 1054 Unknown column 'page_content_model' in 'field list'. Does anyone know where this table gets created? Racerxpa7777 (talk) 20:43, 10 December 2014 (UTC)
- Sorry, I don't know. But you at least are not the first and only person, who has this problem. I found a number of hits for this problem on Google. Maybe they bring you to the right idea? 88.130.95.110 01:38, 11 December 2014 (UTC)
[RESOLVED] How can I position the table of contents
Hi I am trying position the table of contents within a page.
I know that you use:
what is the syntax to position it on the right side. they say to use: float:right;
I am using the standard EDIT window.
thanks 184.164.106.167 (talk) 21:02, 10 December 2014 (UTC)
<div style="float:right">__TOC__</div>
Jackmcbarn (talk) 21:09, 10 December 2014 (UTC)- Yeah! it works
- next question:
can I setup a sub-table of contents, Not the main TOC, but a table of contents specific to the section I designate.
- Main Table of Contents:
- 1 Description
- 2 Related Links
- 3 Solution
- 4 Search Strings
- Sub Table of Contents - under Solution Section:
- 1 Startup Server
- 2 Check Settings
- .
- .
- 4 Email person... blah blah... Terillum (talk) 19:07, 18 December 2014 (UTC)
- I want to have multiple table of contents Terillum (talk) 19:11, 18 December 2014 (UTC)
- Another question - can I have the table of content float as I scroll down the page. Terillum (talk) 21:10, 18 December 2014 (UTC)
- MediaWiki will only generate one table of contents per page. If you want more, you'd have to build and maintain them manually. If you want it to float as you scroll down the page, you can do <div style="position:fixed;top:0;right:0">__TOC__</div> (though you'd probably want to do some tweaking to that CSS). Jackmcbarn (talk) 04:18, 19 December 2014 (UTC)
- perfect regarding the capability of having a floating table of contents.
- - your tip helps
- thanks 184.164.106.167 00:14, 20 December 2014 (UTC)
- MediaWiki will only generate one table of contents per page. If you want more, you'd have to build and maintain them manually. If you want it to float as you scroll down the page, you can do <div style="position:fixed;top:0;right:0">__TOC__</div> (though you'd probably want to do some tweaking to that CSS). Jackmcbarn (talk) 04:18, 19 December 2014 (UTC)
- Another question - can I have the table of content float as I scroll down the page. Terillum (talk) 21:10, 18 December 2014 (UTC)
- I want to have multiple table of contents Terillum (talk) 19:11, 18 December 2014 (UTC)
[RESOLVED] create nested template
Hi !
i want to create a template for special persons and the base should be another template. say nested template.
when i create one template for every user it should look like:
''<onlyinclude> <div style="text-align: left; border: 2px red solid; background: #FFFFFF; padding: 5px;"> [[File:Baustelle.png|30px]] Baustelle von Björn: <span style="font-style:italic;font-family:'Courier New';font-weight:bold;font-size:10pt;">{{{1}}}</span> </div>''
the new template for Björn in my opionion should be {{Minibaustelle|Björn|{{1}}}}
the call is ''{{Björn|his job}}''
in my option the new main-template "Minibaustelle" should look like ''<onlyinclude> <div style="text-align: left; border: 2px red solid; background: #FFFFFF; padding: 5px;"> [[File:Baustelle.png|30px]] Baustelle von {{{1}}}: <span style="font-style:italic;font-family:'Courier New';font-weight:bold;font-size:10pt;">{{{2}}}</span> </div>''
call this code did not work correct - is there somebody who can say the correct way ?
regards Jan JanTappenbeck (talk) 09:37, 11 December 2014 (UTC)
- If I understand correctly:
- Template:Minibaustelle
- <onlyinclude> <div style="text-align: left; border: 2px red solid; background: #FFFFFF; padding: 5px;"> [[File:Baustelle.png|30px]] Baustelle von {{{1}}}: <span style="font-style:italic;font-family:'Courier New';font-weight:bold;font-size:10pt;">{{{2}}}</span> </div>
- Template:Björn
- {{Minibaustelle|Björn|{{{1}}}}}
- Article:
- {{Björn|His job}} Ciencia Al Poder (talk) 11:51, 12 December 2014 (UTC)
- thanks ! JanTappenbeck (talk) 06:58, 15 December 2014 (UTC)
Social Login Extension Issues
This post by Revibot was moved on 2015-07-11. You can find it at Extension talk:SocialLogin#h-Social_Login_Extension_Issues-2014-12-11T06:21:00.000Z. Florianschmidtwelzow (talk) 10:10, 11 December 2014 (UTC)
[RESOLVED] Page Edits or creation not working
Using MW 1.24.0 MySQL 5.0 PHP 5.3.21
I have created a private wiki and added 6 users. The user group has permission to edit and createpage. However when I or a user goes to edit, on the main page, then the edit is not carried out, there is no error and you are returned to the page as it was.
Also adding a page via search doesn't do anything and returns you to teh main page with no error.
Any ideas? 194.73.70.207 (talk) 11:47, 11 December 2014 (UTC)
- https://www.mediawiki.org/wiki/Manual:How_to_debug
- Could you active some of the debugging tools and check whether there are any errors?
- Have you checked the apache log files and see whether there are any errors? Temptuousinsolence (talk) 08:22, 12 December 2014 (UTC)
- I have turned on the debugging and get see the print out at the bottom of the page; there only seems to be DB SELECTS and no writes.
- Will check Apache logs... 194.73.70.207 09:37, 12 December 2014 (UTC)
- No luck on the Apache logs, I have raised a support ticket with the hoster to get them as they don't allow SSH access.
- Are there specific parts of the MediaWiki debug tools I should be looking at? 194.73.70.207 13:00, 12 December 2014 (UTC)
- Ok so this was a conflict with an Apache module called mod_security. Apparently also some invalid characters in some Joomla RSS... 194.73.70.207 10:21, 15 December 2014 (UTC)
[Resolved] Pages in subfolders
Hi,
I have a wiki for a game and I would like to add pages for items in a separate subfolder, for example right now all pages are created with url like that http://aionpowerbook.com/powerbook/name_of_the_page , I would like items to be in a different folder and all related urls to look like this http://aionpowerbook.com/powerbook/items/name_of_the_item.
Is it possible without creating a 2nd wiki in the 'items' folder? Cristal01 (talk) 13:32, 11 December 2014 (UTC)
- Yes, you can have a page called [[Name of the page]] and another called [[Name of the page/items]] and another called [[Name of the page/items/name of the item]]
- See Help:Subpages Ciencia Al Poder (talk) 11:53, 12 December 2014 (UTC)
- That is right.
- Another option would be to create separate namespaces and to put the different pages into different namespaces. However, this requires further setup and I don't know, if it will be a help for you to have different namespaces. 88.130.75.116 15:30, 21 December 2014 (UTC)
[RESOLVED] Searching words in page contents
When entering a searchstring that does not match a page name and clicking on "contains" no search results are displayed. Instead it is offered to create a new page.
Question is, how full text search in version 1.23.7 is supposed to work? 91.46.143.66 (talk) 15:29, 11 December 2014 (UTC)
- No answers? Did I miss something?
- I have compiled mediawiki with sqlite3 as database.
- Any hints are appreciated. 91.46.177.135 14:45, 14 December 2014 (UTC)
- See Manual:SQLite#Search_engine Ciencia Al Poder (talk) 10:35, 15 December 2014 (UTC)
- My sqlite3 is compiled with FTS3 option and related commands work when entered in sqlite3.
- What to do next? 91.46.131.132 16:36, 16 December 2014 (UTC)
- I have no idea. Maybe try to rebuild the search index? Ciencia Al Poder (talk) 22:00, 17 December 2014 (UTC)
- Thank you so much! Having done so full text search works.
- Now a last question: Has this to be done manually or might there be some misconfiguration that caused the problem? 91.46.135.241 10:18, 18 December 2014 (UTC)
- The search index should be updated whenever you make an edit (just for that page), otherwise it may be a bug affecting sqlite. Ciencia Al Poder (talk) 10:35, 18 December 2014 (UTC)
- I tested this. New added text to an existing page is not recognized when searched.
- Obviously the index is not rebuild after an edit. 91.46.160.66 19:10, 18 December 2014 (UTC)
- Have you set
$wgDisableSearchUpdate = false;
in your LocalSettings.php? Florianschmidtwelzow (talk) 20:50, 18 December 2014 (UTC)- Negative. Regarding search I have only this line
- $wgDisableTextSearch = false; 91.46.182.146 23:02, 18 December 2014 (UTC)
- Have you set
- The search index should be updated whenever you make an edit (just for that page), otherwise it may be a bug affecting sqlite. Ciencia Al Poder (talk) 10:35, 18 December 2014 (UTC)
- I have no idea. Maybe try to rebuild the search index? Ciencia Al Poder (talk) 22:00, 17 December 2014 (UTC)
- See Manual:SQLite#Search_engine Ciencia Al Poder (talk) 10:35, 15 December 2014 (UTC)
need help cleaning up spammed wiki
Greetings,
We've run a university-based Mediawiki instance
https://www.artsrn.ualberta.ca/fwa_mediawiki/index.php?title=FolkwaysAlive!_Wiki_Main_Page
for years, but for several of them it was unfortunately subject to heavy spam attacks, resulting in the daily insertion of 1000s of junk pages containing links to commercial websites (presumably to boost google pagerank?). I noticed and reported but no one did anything. For a long time I think a user didn't even need to create an account to create a page.
With an administrative change, new IS people eventually removed much of the junk and closed the wiki to any new posts except from admins, resulting in a less useful but still well-used ROM type wiki, but much spam remains.
Now I'm being told (due to liability issues) either to eliminate all the spam, or to manually copy good pages to a new (better secured) instance. But I've created 1000s of useful pages, there are probably tens of thousands of spam pages, and don't have unlimited time either to hand-copy or to hand-delete, and so neither option looks good.
The spam pages are not trivial to identify, unless by an external algorithm (see 2 below). The spam bots created new users, so we can't just delete pages of particular users (blacklist), though we might have better luck deleting all pages except those created by a particular set of users (whitelist), since there are not so many on the latter. Spam bots typically did not overwrite good pages, but created new ones. These are not usually orphans or regular pages - most often they are Talk pages, which are a well-defined class of page. And talk pages are rarely if ever useful in our wiki. So it may be easy to avoid harmful false positives if we want to get most of it; harder to avoid harmful false negatives if we want to get all of it.
In any case, what I think I need are tools allowing me to mass delete pages likely to contain spam. The more flexible, the better.
1) For instance, again, nearly all the spam is on Talk pages. I wouldn't mind deleting them all, as I've never used them. But I don't know how. Is there a way to flexibly delete all pages that meet a certain condition, e.g. that are Talk pages or that contain a certain string or were created by a certain class of user (for instance, allowing me to provide a whitelist of good users, and deleting pages for all the other users)?
2) We were prompted by a report from Research and Education Networking ISAC (http://www.ren-isac.net) providing URLs for spam pages. If their algorithms (I don't know what they are) could generate a complete list, perhaps I could delete the corresponding pages - but I'd need a tool to do this also, taking a URL list as input and deleting corresponding pages.
Prior to any mass deletions we could archive a copy of the wiki, allowing us to restore false positives later. Then we could mass copy the remaining (good) pages to a new mediawiki instance with better protection, and any missing pages could be manually retrieved from the archive.
I'd really appreciate any advice on this- either for (1) and (2) above or new strategies - so long as they won't require exorbitant amounts of time - I don't want to lose so many years of work, but I don't have years to put into saving them either!
many, many thanks,
Michael Frishkopf
michaelf@ualberta.ca
wiki:
https://www.artsrn.ualberta.ca/fwa_mediawiki/index.php?title=FolkwaysAlive!_Wiki_Main_Page
PS:
Here is our version information:
Product Version
MediaWiki 1.21.1
PHP 5.3.10-1ubuntu3.11 (cgi-fcgi)
MySQL 5.5.37-0ubuntu0.12.04.1
Entry point URLs
Entry point URL
Article path /fwa_mediawiki/index.php?title=$1
Script path /fwa_mediawiki
index.php /fwa_mediawiki/index.php
api.php /fwa_mediawiki/api.php
load.php /fwa_mediawiki/load.php
Miaafr (talk) 18:22, 11 December 2014 (UTC)
- If you can identify the "good" pages, you can Special:Export them, nuke all pages (using nukeNS.php for example, for entire namespaces) and reimport them.
- If you can identify the "bad" pages and you can get a list of them, you can use NukePage.php to permanently delete them. You can create a script that runs this script in batch mode for each page. Ciencia Al Poder (talk) 12:00, 12 December 2014 (UTC)
špatné založení jména
Dobrý den, chtěl bych se zeptat, kde se dá změnit jméno účtu, založil jsem špatný jméno, a chtěl bych ho změnit na jiné. V nastavení jsem to nenašel. Děkuji za odpověď
translation via google
Hello, I would like to ask you where you can change the name of the account, I set a bad name, and I would like to change it to another. In the settings I could not find it. Thanks for the answer Pharaon (talk) 09:06, 12 December 2014 (UTC)
- Do you mean on your own wiki or on this wiki? Ask a bureaucrat to rename your user on the Special:Renameuser page.
- === translation via google ===
- Máte na mysli na vlastní wiki, nebo na této wiki? Zeptejte se byrokrata přejmenovat uživatele na Special: Renameuser stránky. ☠MarkAHershberger☢(talk)☣ 18:36, 14 December 2014 (UTC)
Error creating thumbnail: Unable to run external programs, proc_open() is disabled. Error code: 1
MediaWiki 1.23.7 (and 1.23.5) PHP 5.3.29 (cgi-fcgi) MySQL 5.5.40-cll
When ever i am uploading a new image it tells me it could not create a thumbnail. The error message: Error creating thumbnail: Unable to run external programs, proc_open() is disabled. Error code: 1 . This was happening since 1.23.5, upgrading to .7 did not work.
I have tried to enable proc_open but it was denied by my web hoster since enabling it was a security risk. I have googled the problem and found a few solutions but none of them worked. I tried changing the FileOpBatch.php but it did not work.
Does anyone have an idea? 217.149.143.1 (talk) 10:42, 12 December 2014 (UTC)
- MediaWiki in fact needs the proc_open function while it is running some external programs. Basically this code could also be changed to use another function, e.g. exec(), but if your host believes he cannot create a secure setup with proc_open() enabled, then he will most likely tell you the same for any function, which runs external programs.
- For the thumbnail creation you might get it solved by setting
$wgUseImageMagick = false;
- in LocalSettings.php. MediaWiki will then no longer use ImageMagick to create thumbnails. Anyway, even if that works, it is not a solution, but only a workaround. 88.130.85.2 12:41, 12 December 2014 (UTC)
- Thanks for the info, i have tried the $wgUseImageMagick = false; method and that works for now. In the mean time ill sort it out with my web host to get that Proc_open function enabled.
- Thanks again!! 217.149.143.1 14:11, 12 December 2014 (UTC)
domain of URL automatically replaced by servername (IMHO not a apache redirect issue)
Hello,
I really searched well because it seems a simple problem. The only thing I know is that is isn't an apache redirect thing (redirect works but AFAIK I don't need redirect).
In short: I want that my domain name stays in the URL of the browser. Right now, it gets changed to the server-name as soon as I access the wiki. I think it is the wiki who does this but I don't know how to change the behaviour.
A) Setup: Ubuntu 12.04 server LTS
1)Mediawiki:
MediaWiki 1.24.0
PHP 5.3.10-1ubuntu3.15 (apache2handler)
MySQL 5.5.40-0ubuntu0.12.04.1
Entry points:
Article path /mediawiki/index.php/$1
Script path /mediawiki
index.php /mediawiki/index.php
api.php /mediawiki/api.php
load.php /mediawiki/load.php
2) apache config:
<VirtualHost *:80> ServerAdmin webmaster@localhost ServerName wiki.mydomain.com ServerAlias mywiki DocumentRoot /var/www/mediawiki/ <Directory /> Options FollowSymLinks AllowOverride None </Directory> <Directory /var/www/> Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all </Directory> ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ <Directory "/usr/lib/cgi-bin"> AllowOverride None Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch Order allow,deny Allow from all </Directory> ErrorLog ${APACHE_LOG_DIR}/error.log # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. LogLevel warn CustomLog ${APACHE_LOG_DIR}/access.log combined Alias /doc/ "/usr/share/doc/" <Directory "/usr/share/doc/"> Options Indexes MultiViews FollowSymLinks AllowOverride NoneInsert non-formatted text here Order deny,allow Deny from all Allow from 127.0.0.0/255.0.0.0 ::1/128 </Directory> </VirtualHost>
3) LocalSettings.php:
it is a fresh wiki, so nothing special is edited here. I have the following parameters set:
$wgMetaNamespace = "my_fancy_wiki"; $wgScriptPath = "/mediawiki"; $wgScriptExtension = ".php"; ## The protocol and server name to use in fully-qualified URLs $wgServer = "http://lorette"; ##<== this is the name of the webserver ## The relative URL path to the skins directory $wgStylePath = "$wgScriptPath/skins";
B) current outcome:
1) I access the mediawiki via http://wiki.mydomain.com.
2) the page is correctly shown but the URL in the browser changes to
http://lorette/mediawiki/index.php/my_fancy_wiki
C) wished outcome:
1) I access the mediawiki via http://wiki.mydomain.com.
2) the domain-part of the URL stays the same, eg: http://wiki.mydomain.com/index.php/my_fancy_wiki
it is an intranet site and I have an appropriate AAA record set to have the domain point to the IP. TimBanchi (talk) 13:01, 12 December 2014 (UTC)
- Hello,
- change $wgServer to the domain you want to use ;) Florianschmidtwelzow (talk) 13:30, 12 December 2014 (UTC)
- Hello Florian,
- I already did that but this doesn't work. If I do so the URL stays a bit nicer:
- http://wiki.mydomain.com/mediawiki/index.php/Main_Page
- but I get a
- Not Found
- The requested URL /mediawiki/index.php/Main_Page was not found on this server. TimBanchi (talk) 14:19, 12 December 2014 (UTC)
- Your document root is already /var/www/mediawiki (DocumentRoot /var/www/mediawiki/), so are you sure, that your script path is
$wgScriptPath = "/mediawiki";
??? So your wiki's root is /var/www/mediawiki/mediawiki? Florianschmidtwelzow (talk) 23:03, 13 December 2014 (UTC)- Florian, thank you so much :) I knew it was something stupid. I just didn't understand that the scriptpath is (I guess) relative to documentRoot, so I didn't see it.
- I changed $wgScriptPath to:
$wgScriptPath = "";
- and $wgServer to:
$wgServer = "http://wiki.mydomain.com";
- the wiki works and the url looks much nicer:
- http://wiki.mydomain.com/index.php/my_fancy_wiki
- DONE! TimBanchi (talk) 14:12, 16 December 2014 (UTC)
- You can remove the index.php, too ;) Just read Manual:Short_URL :) Florianschmidtwelzow (talk) 21:08, 16 December 2014 (UTC)
- Your document root is already /var/www/mediawiki (DocumentRoot /var/www/mediawiki/), so are you sure, that your script path is
Ask Question Mediawiki: How to permantly move the location of the table of contents
As it stands, mediawiki automatically places the Table of contents after the first paragraph. Where do I go to change that placement to say the beginning of the article, or above the infobox, or anything like that?
I ask because I'm using a new skin and the placement of the TOC is not aesthetically pleasing so I'm trying to move it. If I can understand how to move it in a regular skin, I'd be able to figure out how to move it there. Mediawiki 1.24 Vapblack (talk) 14:00, 12 December 2014 (UTC)
- Use CSS to position the #toc element and you can put it where you like. ☠MarkAHershberger☢(talk)☣ 15:57, 15 December 2014 (UTC)
Help:Magic words
On Help:Magic words#Statistics I can exactly determine when and where NUMBEROFVIEWS
was introduced: Special:Code/MediaWiki/42721 blames CoreParserFunctions.php in SVN revision 42721 (2008-10-28). Now I want to figure out if, when, and where this magic word was removed or conditionally disabled here. How can I solve this without a copy of the sources on my box. If NUMBEROFVIEWS
turns out to be removed Wikitext_parser/Core_parser_functions#numberofviews also has to be updated. –Be..anyone 💩 01:28, 13 December 2014 (UTC)
- See https://gerrit.wikimedia.org/r/#/c/150699/
- I recall this commit (now that I found it) but I found it using git bisect. ☠MarkAHershberger☢(talk)☣ 18:28, 14 December 2014 (UTC)
- Thanks, I've updated the help and the parser pages. There's now an interesting green + red version box for NUMBEROFVIEWS, instead of only red as for __END__. How could I find out when CoreParserFunctions.php was modified? And how could I check my wild guess 1.23 as the last version with a NUMBEROFVIEWS? Be..anyone (talk) 04:11, 15 December 2014 (UTC)
- 1.24 is the latest version that will have it. You can tell by the inclusion of the RELEASE-NOTES in the linked change request. ☠MarkAHershberger☢(talk)☣ 15:28, 15 December 2014 (UTC)
- Okay, I found 1.25, fixed s/1.23/1.24/ on the help page, and the colours are apparently okay when something (no idea what) on the translation side happens.
Be..anyone (talk) 01:00, 16 December 2014 (UTC)
- Okay, I found 1.25, fixed s/1.23/1.24/ on the help page, and the colours are apparently okay when something (no idea what) on the translation side happens.
- 1.24 is the latest version that will have it. You can tell by the inclusion of the RELEASE-NOTES in the linked change request. ☠MarkAHershberger☢(talk)☣ 15:28, 15 December 2014 (UTC)
- Thanks, I've updated the help and the parser pages. There's now an interesting green + red version box for NUMBEROFVIEWS, instead of only red as for __END__. How could I find out when CoreParserFunctions.php was modified? And how could I check my wild guess 1.23 as the last version with a NUMBEROFVIEWS? Be..anyone (talk) 04:11, 15 December 2014 (UTC)
#1100 - Table 'wik_templatelinks' was not locked with LOCK TABLES
Trying to restore a hacked wiki on my local server,
When I import the table wik_text, the following error message appears:
- 1100 - Table 'wik_templatelinks' was not locked with LOCK TABLES
How do I go about resolving this? The wik_templatelinks is empty by the way.
david 67.248.251.75 (talk) 23:36, 13 December 2014 (UTC)
- This could happen if you did a mysqldump without the --single-transaction option. Apparently, it also adds some comments that are parsed by MySQL to lock/unlock tables while importing the data
- The error isn't on the dump itself you did, but can happen if you import the dump while MediaWiki is running and there is someone browsing/editing the wiki.
- You can import the dump again and be sure to put offline your wiki when doing that to prevent that error from happening. Ciencia Al Poder (talk) 13:03, 14 December 2014 (UTC)
My wiki look strange!
After instal with Sqlite, my Wiki page is strange. This is how look:http://s28.postimg.org/uk0ji8vn1/wiki.png 109.122.92.38 (talk) 02:23, 14 December 2014 (UTC)
- Manual:Errors and symptoms#The wiki appears without styles applied and images are missing Ciencia Al Poder (talk) 13:04, 14 December 2014 (UTC)
Mediawiki Programming Book
Dear Member, Mark,
Is a good MediaWiki programming book available?
Thank you,
Hansie Hansie (talk) 18:51, 14 December 2014 (UTC)
- There is wikibooks:MediaWiki_Developer's_Handbook but that is full of holes. There is also Yaron's Working with MediaWiki]. ☠MarkAHershberger☢(talk)☣ 15:18, 15 December 2014 (UTC)
Server hangs up while using bot class
Server hangs up when i use my mediawiki bot, My code is as follows, I hope there is some issue with curl or may be some other. can some one help me what is the problem why server hands up during initialising the class and calling the functionality.
Extended content |
---|
class Wikibot {
public $epm;
public $editdetails;
public $wiki='http://localhost/mediawiki-1.21.2/';
public $max_lag;
public $username;
public $password;
public function __construct($username, $password, $wiki , $epm = 5, $lag = 5)//log in the wiki
{
if (!isset($username) || !isset($password)) {
die("\r<br />\nError: configuration variables not set\r<br />\n");
}
$this->wiki = $wiki;
$this->epm = 60 / $epm;
$this->max_lag = $lag;
$this->username = $username;
$this->password=$password;
$this->login($username, $password, $wiki);
}
private function login($username, $password, $wiki) {
$response = $this->postAPI($wiki, 'api.php?', 'action=login&lgname=' . urlencode($username) . '&lgpassword=' . urlencode($password));
print_r($response);
if ($response['login']['result'] == "Success") {
} elseif ($response['login']['result'] == "NeedToken") {
print_r($response);
$token = $response['login']['token'];
$newresponse = $this->postAPI($wiki, 'api.php?', 'action=login&lgname=' . urlencode($username) . '&lgpassword=' . urlencode($password) . '&lgtoken=' . $token);
if ($newresponse['login']['result'] == "Success") {
} else {
echo "Forced by server to wait. Automatically trying again.<br />\n";
sleep(10);
$this->login($username, $password, $wiki);
}
} else {
if (isset($response['login']['wait']) || (isset($response['error']['code']) && $response['error']['code'] == "maxlag")) {
echo "Forced by server to wait. Automatically trying again.<br />\n";
sleep(10);
$this->login($username, $password, $wiki);
} else {
die("Login failed: " . $response . "\r<br />\n");
}
}
}
public function get_page($page, $wiki = "")//get page's content
{
$response = $this->callAPI($wiki, 'api.php?action=query&prop=revisions&titles=' . urlencode($page) . '&rvprop=content');
print_r($response);
if (is_array($response)) {
$array = $response['query']['pages'];
$array = array_shift($array);
$pageid = $array["pageid"];
return $response['query']['pages'][$pageid]['revisions'][0]["*"];
} else {
echo "Unknown get_page error.<br />\n";
return false;
}
}
public function get_cats_of_page($page, $wiki = "")//get page's categories
{
$response = $this->callAPI($wiki, 'api.php?action=query&prop=categories&titles=' . urlencode($page));
foreach ($response['query']['pages'] as $key => $value) {
foreach ($value["categories"] as $key2 => $value2) {
$cats[] = $value2["title"];
}
}
return $cats;
}
public function category($category, $limit = 500, $start = "", $ns = "all", $wiki = "")//get all the pages of a category, NOT RECURSIVE
{
sleep(10);
$url = 'api.php?action=query&list=categorymembers&cmtitle=' . urlencode("Category:" . $category) . '&cmlimit=' . $limit;
if ($ns != "all") {
$url .= "&cmnamespace=" . $ns;
}
if ($start != "") {
$url .= "&cmcontinue=" . urlencode($start);
}
$result = $this->callAPI($wiki, $url);
$cm = $result["query"]["categorymembers"];
$pages = array();
for ($i = 0; $i < count($cm); $i++) {
$pages[] = $cm[$i]["title"];
}
$next = $result["query-continue"]["categorymembers"]["cmcontinue"];
if ($next != "") {
array_push($pages, $next);
}
return $pages;
}
public function create_page($page, $text, $summary, $minor = false, $bot = false, $wiki = "")//create a new page
{
$response = $this->callAPI($wiki, "api.php?action=query&prop=info|revisions&intoken=edit&titles=" . urlencode($page));
$this->editdetails = $response["query"]["pages"];
if (!isset($this->editdetails[-1])) {
echo "Page $page already exists. Call edit_page instead.<br />\n";
return false;
}
if ($this->put_page($page, $text, $summary, $minor, $bot, $wiki)) {
return true;
} else {
echo "^^^ Error with put_page called from edit_page.<br />\n";
return false;
}
}
public function edit_page($page, $text, $summary, $minor = false, $bot = true, $wiki = "")//edit a page which already exists
{
$response = $this->callAPI($wiki, "api.php?action=query&prop=info|revisions&intoken=edit&titles=" . urlencode($page));
$this->editdetails = $response["query"]["pages"];
if (isset($this->editdetails[-1])) {
echo "Page $page does not already exist. Call create_page instead.<br />\n";
return false;
}
if ($this->put_page($page, $text, $summary, $minor, $bot, $wiki)) {
return true;
} else {
echo "^^^ Error with put_page called from edit_page.<br />\n";
return false;
}
}
private function put_page($name, $newtext, $summary, $minor = false, $bot = true, $wiki = "")//edit a page, regardless of whether it exists before or not
{
foreach ($this->editdetails as $key => $value) {
$token = urlencode($value["edittoken"]);
$sts = $value["starttimestamp"];
if (isset($this->editdetails[-1])) {
$ts = $sts;
$extra = "&createonly=yes";
} else {
$ts = $value["revisions"][0]["timestamp"];
$extra = "&nocreate=yes";
}
}
$newtext = urlencode($newtext);
$rawoldtext = $this->get_page($name, $wiki);
$oldtext = urlencode($rawoldtext);
$summary = urlencode($summary);
if ($newtext == $oldtext) {
//the new content is the same, nothing changes
echo "The new content for " . $name . " is exactly the same as the current content, so the page wasn't edited.<br />\n";
return false;
}
if ($newtext == "") {
//the new content is void, nothing changes
echo "Error: you were about to blank the page of " . $name . ".<br />\n";
return false;
}
$post = "title=$name&action=edit&basetimestamp=$ts&starttimestamp=$sts&token=$token&summary=$summary$extra&text=$newtext";
if ($bot) {
if (!$this->allowBots($rawoldtext)) {
echo "Bot edits, or those specifically from this bot, have been blocked on this page.<br />\n";
return false;
}
$post .= "&bot=yes";
}
if ($minor) {
$post .= "&minor=yes";
} else {
$post .= "¬minor=yes";
}
$response = $this->postAPI($wiki, 'api.php', $post);
if ($response["edit"]["result"] == "Success") {
echo "Successfully edited " . $response["edit"]["title"] . ".<br />\n";
sleep($epm);
return true;
} elseif (preg_match('/^Waiting for (.*) seconds lagged/', $result)) {
echo "Error: max lag hit, not posted<br />\n";
return false;
} elseif (isset($response["error"])) {
echo "Error - [" . $response["error"]["code"] . "] " . $response["error"]["info"] . "<br />\n";
return false;
} else {
echo "Error - " . $response["edit"]["result"] . " <br />\n";
return false;
}
}
private function wiki($wiki)//manager wiki different from default wiki
{
$wiki='http://localhost/mediawiki-1.21.2/';
if ($wiki == "") {
$wiki='http://localhost/mediawiki-1.21.2/';
return $this->wiki;
} elseif (strpos($wiki, "://") == false) {
$wiki='http://localhost/mediawiki-1.21.2/';
return $this->wiki;
}
//if it is a other wiki project
return $wiki;
}
private function callAPI($wiki, $url, $format = "php") {
$wiki = $this->wiki($wiki);
$ch = curl_init();
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_COOKIEJAR, 'cookie.txt');
curl_setopt($ch, CURLOPT_COOKIEFILE, 'cookie.txt');
curl_setopt($ch, CURLOPT_URL, ($wiki . $url . "&maxlag=" . $this->max_lag . "&format=$format"));
curl_setopt($ch, CURLOPT_URL, ($wiki . $url . "&maxlag=" . $this->max_lag . "&format=$format"));
$response = curl_exec($ch);
if (curl_errno($ch)) {
return curl_error($ch);
}
curl_close($ch);
return unserialize($response);
}
private function postAPI($wiki, $url, $postdata = "") {
$wiki = $this->wiki($wiki);
$ch = curl_init();
$url = $wiki . $url;
if ($postdata !== "") {
$postdata .= "&";
}
$postdata .= "format=php&maxlag=" . $this->max_lag;
//echo "Final postdata: $postdata<br />\n";
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_COOKIEJAR, 'cookie.txt');
curl_setopt($ch, CURLOPT_COOKIEFILE, 'cookie.txt');
curl_setopt($ch, CURLOPT_USERAGENT, 'Wikibot 0.24');
curl_setopt($ch, CURLOPT_POSTFIELDS, $postdata);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/x-www-form-urlencoded;charset=UTF-8'));
curl_setopt($ch, CURLOPT_HEADER, false);
$response = curl_exec($ch);
if (curl_errno($ch)) {
return curl_error($ch);
}
curl_close($ch);
return unserialize($response);
}
private function allowBots($text) {
if (preg_match('/\{\{(nobots|bots\|allow=none|bots\|deny=all|bots\|optout=all|bots\|deny=.*?' . preg_quote($this->username, '/') . '.*?)\}\}/iS', $text)) {
return false;
}
return true;
}
} //end class
?>
|
I tried to fine the discussion thread for wikibot page, i didnt get, if possible give me the link where i should create a thread for wikibot 202.88.239.42 (talk) 08:35, 15 December 2014 (UTC)
- You could start by putting debug statements to find exactly the line that causes your server to hang. Ciencia Al Poder (talk) 10:41, 15 December 2014 (UTC)
- No statements in my error log of server, and no php errors also. Should i specifically put any statement to get more info about, Kindly help coz i am a fresher, i had made php errors in localsettings . 202.88.239.42 10:48, 15 December 2014 (UTC)
- I restarted my server after stopping the httpd service, changed my port still get the same error, I think the curl function present in callAPI has issues with my server, I am attaching the configuration along with .As you can see, i have just called a single function, which gives me error
- 202.88.239.42 12:36, 15 December 2014 (UTC)
<?php include("Phpwikibot.php"); $username="a"; $password="p"; $wiki='http://localhost/'; $url='api.php?action=query&prop=revisions&titles=Ajith&rvprop=content'; $bot=new Wikibot($username, $password, $wiki); $bot->callAPI($wiki, $url);
- The bot page seems to be w:User:Kaspo/Phpwikibot
- Try contacting him, although that project seems dead. Maybe you should use another bot framework.
- About the "error", it could help if you are more specific. What specific error message do you get? Ciencia Al Poder (talk) 10:37, 16 December 2014 (UTC)
- Ciencia, I am actually unlucky to get any error from my error log, actually the error log has no errors pertaining to it. I restatrted my server and it has only logs pertaining to restart. By the was, I found the following error in my mediawiki, does this affect my server hang?? Interface 'IContextSource' not found in /usr/local/apache2/htdocs/mediawiki-1.21.2/includes/context/ContextSource.php on line 30 202.88.239.42 07:02, 17 December 2014 (UTC)
- @Ciencia, Sir, I was unlucky to get any error regarding the issue in my error_log file. I restarted my server and have the log pertaining to it.
[Mon Dec 15 17:05:41 2014] [notice] Apache/2.2.24 (Unix) PHP/5.4.13 configured -- resuming normal operations
. By the way i found the following error in my mediawiki, does this affects my hang or does it makes sense when we use a bot .
Interface 'IContextSource' not found in /Serverlocation/includes/context/ContextSource.php on line 30
202.88.239.42 07:06, 17 December 2014 (UTC)- I don't know anything from the script you linked, and I'm not sure if I understand correctly your issue.
- You say the server hangs. Could you please specify? The entire server (operating system) freezes? Just the web service (apache?). I doubt any of both issues could happen, and if they happen there must be something wrong with the web service and not MediaWiki.
- If it's the script that you run what hangs, then you could look in the server access logs to see if the request even arrives to the server. If not it may be a firewall issue or some other interference. Ciencia Al Poder (talk) 21:59, 17 December 2014 (UTC)
- No statements in my error log of server, and no php errors also. Should i specifically put any statement to get more info about, Kindly help coz i am a fresher, i had made php errors in localsettings . 202.88.239.42 10:48, 15 December 2014 (UTC)
watchlist feed show diffs
hi,
MediaWiki 1.23.5 PHP 5.4.4-14+deb7u14 (apache2handler) MySQL 5.5.38-0+wheezy1-log
why doesn't show the watchlist feed differences between versions? the recent changes feed does it. the watchlist feed show only the username and not the content that has changed. is it possible to display the changed content in the watchlist feed, i didn't find any variables?
thanks in advance!
best regards, stefan 129.27.104.9 (talk) 10:47, 15 December 2014 (UTC)
- You would need to file a bug report for this. It isn't possible at the moment AFAIK. ☠MarkAHershberger☢(talk)☣ 15:08, 15 December 2014 (UTC)
[1.24.0] "Fatal exception of type MWException" error
- Hi.
- I freshly installed MW 1.24.0 on a dedicated server, and while everything else works,
- "Fatal exception of type MWException" error pops up when I try to upload a file.
- I have tried giving writable permission to the
images
folder, and tried almost every solution posted on this board, - and still haven't succeeded.
- I'm running a CentOS 6, with PHP 5.3.3 & MySQL 5.1.73. I'm in desperate need of any advice.
- ANY help would be grateful.
- Thank you. LILIS (talk) 04:51, 16 December 2014 (UTC)
- Here's the backtrace log.
- Lilis2nd (talk) 04:54, 16 December 2014 (UTC)
[8ae2b2fe] /wiki/index.php/Special:Upload Exception from line 1871 of /home/ast-wiki/www/wiki/includes/filerepo/file/LocalFile.php: Could not acquire lock for 'Delete_error.PNG.' Backtrace: #0 /home/ast-wiki/www/wiki/includes/filerepo/file/LocalFile.php(1174): LocalFile->lock() #1 /home/ast-wiki/www/wiki/includes/upload/UploadBase.php(738): LocalFile->upload(string, string, string, integer, array, boolean, User) #2 /home/ast-wiki/www/wiki/includes/specials/SpecialUpload.php(467): UploadBase->performUpload(string, string, boolean, User) #3 /home/ast-wiki/www/wiki/includes/specials/SpecialUpload.php(186): SpecialUpload->processUpload() #4 /home/ast-wiki/www/wiki/includes/specialpage/SpecialPage.php(363): SpecialUpload->execute(NULL) #5 /home/ast-wiki/www/wiki/includes/specialpage/SpecialPageFactory.php(584): SpecialPage->run(NULL) #6 /home/ast-wiki/www/wiki/includes/MediaWiki.php(275): SpecialPageFactory::executePath(Title, RequestContext) #7 /home/ast-wiki/www/wiki/includes/MediaWiki.php(584): MediaWiki->performRequest() #8 /home/ast-wiki/www/wiki/includes/MediaWiki.php(435): MediaWiki->main() #9 /home/ast-wiki/www/wiki/index.php(46): MediaWiki->run() #10 {main}
- Try adding this to LocalSettings.php:
$wgFileBackends[] = array( 'name' => 'local-backend', 'class' => 'FSFileBackend', 'lockManager' => 'nullLockManager', 'containerPaths' => array( 'local-public' => "{$wgUploadDirectory}", 'local-thumb' => "{$wgUploadDirectory}/thumb", 'local-deleted' => $wgDeletedDirectory, 'local-temp' => "{$wgUploadDirectory}/temp", ), 'fileMode' => 0644, ); $wgLocalFileRepo = array ( 'class' => 'LocalRepo', 'name' => 'local', 'directory' => $wgUploadDirectory, 'scriptDirUrl' => $wgScriptPath, 'scriptExtension' => $wgScriptExtension, 'url' => $wgUploadBaseUrl ? $wgUploadBaseUrl . $wgUploadPath : $wgUploadPath, 'hashLevels' => $wgHashedUploadDirectory ? 2 : 0, 'thumbScriptUrl' => $wgThumbnailScriptPath, 'transformVia404' => !$wgGenerateThumbnailOnParse, 'deletedDir' => $wgDeletedDirectory, 'deletedHashLevels' => 3, 'backend' => 'local-backend', );
- (extracted from Project:Support desk/Flow/2012/12#h-[SOLVED?]_Problem_With_File_Upload:_Could_not_acquire_lock_for_"mwstore://local--2012-12-18T16:18:00.000Z)
- Please come back to say if that works for you Ciencia Al Poder (talk) 10:51, 16 December 2014 (UTC)
- I have this problem too. I'm using a hosting service. איתי בריבוע (talk) 15:55, 23 March 2015 (UTC)
- No, it say another truble: Could not create «mwstore://local-backend/local-public/0/06». 87.229.231.234 10:01, 14 April 2015 (UTC)
- That block of code fixed it for me. THANKS!
- I'm hosting on a windows 2012 Virtual Server with IIS8 Abswv (talk) 14:36, 14 April 2015 (UTC)
- Worked for me, too. Server 2008R2 with IIS 7.5 209.191.21.234 (talk) 16:35, 6 June 2016 (UTC)
2 login-links on page but different behaviour
Hi,
We have a wiki which has a part which can be accessed without logging in and a part which can only be read (and modified) after you are logged on. When you try to access a page for which you have to be logged on you get the following screen:
Login required Please log in to view other pages.
Return to Main Page.
The text 'log in' after Please is a link so that after you click this and logon you return immediately to the required page. On top of the screen there is also a login-link-button which points to http://ourwiki/index.php?title=Special:UserLogin&returnto=Special%3ABadtitle
We can notify to use the link provided after 'Please' but it would be convenient that the loginlink at the top of the screen responds the same. I have googled around but haven't found a solution (yet) for this (if there is any). So question: Is there a way to solve this?
We use Mediawiki 1.23.7.
Thanx in advance. DikkieDick (talk) 08:50, 16 December 2014 (UTC)
- I'd recommend to open a BUGREPORT for this. Ciencia Al Poder (talk) 10:53, 16 December 2014 (UTC)
- Done. Don't know if it's really a bug or is it just me doing something wrong. ;-) DikkieDick (talk) 11:52, 16 December 2014 (UTC)
- Can you give the task number? :) Florianschmidtwelzow (talk) 13:27, 16 December 2014 (UTC)
- T78646 DikkieDick (talk) 13:14, 23 December 2014 (UTC)
- Can you give the task number? :) Florianschmidtwelzow (talk) 13:27, 16 December 2014 (UTC)
- Done. Don't know if it's really a bug or is it just me doing something wrong. ;-) DikkieDick (talk) 11:52, 16 December 2014 (UTC)
Image thumbnail creation broken
I've noticed that no thumbnails have been made for any uploads made in the past few months.
The site is www.peckhamvision.org and runs: MediaWiki: 1.8.2 PHP: 5.2.17 (cgi) MySQL: 4.1.22-standard
All that is shown on the page instead of the thumbnail is some text "Error creating thumbnail:". The MW log has the following lines:
img_width match: 300 makeImageLinkObj: '300'x, "architects meet the CoDesigners" reallyRenderThumb: running ImageMagick: -quality 80 -background white -size 300 -coalesce -thumbnail -depth 8 2>&1 wfShellExec: -quality 80 -background white -size 300 -coalesce -thumbnail -depth 8 2>&1 thumbnail failed on nativespace-mercury.ns-mercury.com: error 1 "" from " -quality 80 -background white -size 300 -coalesce -thumbnail -depth 8 2>&1"
Nothing has changed in the LocalSettings.php file to stop this from working and the server is running ImageMagick 6 in the correct location "/usr/bin/convert".
I have seen a few other posts that recommend increasing the $wgMaxShellMemory but even after doing that nothing changes.
Can anyone think of anything else?
thanks 90.244.185.24 (talk) 11:07, 16 December 2014 (UTC)
- First, upgrade. MW 1.8 hasn't been supported in quite a while. Please contact me or another professional if you need help with this.
- Second, you don't state where you got the logs from, but I assume they are not error logs. Check out How to debug for help with debugging. ☠MarkAHershberger☢(talk)☣ 17:57, 16 December 2014 (UTC)
- Hi,
- Yes i do need to upgrade it at some point.
- The logs are from a debug log that i turned on earlier today using that How to debug page.
- thanks 90.244.185.24 20:18, 16 December 2014 (UTC)
- Do you see anything in your server error log?
- Separately, can I ask why you haven't upgraded yet? What is stopping you? If I were to do it for you at no cost, would you upgrade? ☠MarkAHershberger☢(talk)☣ 21:35, 16 December 2014 (UTC)
- I'm not sure if I can get access to the server error logs. I'm on a shared server and asked the hosts to look into the problem but they couldn't find anything wrong.
- I am actually trying to upgrade it now, but need the server updated to a newer PHP and MySQL so I have to wait for that to happen.
- The reason I haven't upgraded yet is simply that I am not that active on the site. I set it up and left it for others to use and only step in if something goes wrong, which has probably only been a couple of times in about 7 years - shows how good MW is I suppose. 90.244.185.24 21:45, 16 December 2014 (UTC)
- If the site can afford $10/month, you could move it to linode and upgrade it in the process. You'd also get more control over the server.
- Alternatively, another shared hoster (I have a server...) could host it so you don't have to wait on the current hoster. ☠MarkAHershberger☢(talk)☣ 15:43, 17 December 2014 (UTC)
- You should contact the hoster and get them to tell you how to get access to your error log. ☠MarkAHershberger☢(talk)☣ 15:44, 17 December 2014 (UTC)
Not all pictures, or picturesizes are shown.
I upgraded mediawiki (from 1.14 to 1.24) with the following parameters:
PHP 5.4.29 (apache2handler)
MySQL 5.1.69-log
More software and extensions installed can be found at: http://www.imkerpedia.nl/wiki/index.php/Speciaal:Softwareversie
After upgrading (and the needed copying of the image-folder) some pictures (sizes) are shown, but others aren't. To me it's completely random why some pictures (with specific picturesizes) don't exist in images/thumb/././, and others do.
After rereading http://www.mediawiki.org/wiki/Manual:Upgrading I see I forgot 'chmod -R 755 images' and 'chgrp -R apache images'.
At the moment all (sub)folders in the image-folder are 755 or 777. The image-folder itself is 755. So, that that's okay, isn't it?
However, I don't know how to 'chgrp -R apache images' (if that's the problem).
I'm using FTP (Total Commander) to manage files. 77.166.176.131 (talk) 20:46, 16 December 2014 (UTC)
- If I understand, you installed 1.24 in a different directory and then copied over the images directory, right? And now some thumbnails aren't showing up? Were they showing up before the upgrade? ☠MarkAHershberger☢(talk)☣ 21:47, 16 December 2014 (UTC)
- Before the upgrade everything was fine.
- I made some mistakes while upgrading:
- I first unpacked mediawiki-1.24.0.tar.gz on my laptop, and uploaded it to folder /wiki-124 on the website.
- Renamed /wiki to /wiki-114 and /wiki-124 to /wiki.
- With browser went to http://www.imkerpedia/wiki/mw-config/. And continued there.
- After that there were no images on the wiki and I realized that I had forgotten tot copy /images to the new wiki.
- Then I copied wiki-114/images over the wiki/images directory (but left the new .htacces in 1.24 - # Protect against bug 28235 - intact). Now some pictures were present, but others weren/t. 77.166.176.131 09:36, 17 December 2014 (UTC)
- Could you link to a page that shows the problem you're describing?
- Also, if you could bring the 114 wiki back at /wiki-114/, that might help so I can see what you expect and compare with what is happening now. ☠MarkAHershberger☢(talk)☣ 15:39, 17 December 2014 (UTC)
- In reply to MarkAHershberger's "Also, if you could bring the 114 wiki back at /wiki-114/, that might help so I can see what you expect and compare with what is happening now."
- Is bringing back /wiki-114 as simple as changing the name to /wiki again and importing the old (backuped) database? AlbertStoter (talk) 11:24, 18 December 2014 (UTC)
- A link to a page where a file fails to display would help.
- At least I found one example where it fails: http://www.imkerpedia.nl/wiki/index.php?title=Bestand:Dropplant-01.jpg&uselang=en
- It displays the error Error creating thumbnail: Unable to save thumbnail to destination. The problem seems to be with permissions in the images folder.
- A direct URL for the error:
- You should debug by adding this to LocalSettings.php:
$wgShowExceptionDetails = true; error_reporting( -1 ); ini_set( 'display_errors', 1 ); # Set it to a writable directory and filename by the webserver $wgDebugLogFile = "/tmp/mediawiki-debug.log";
- Then open and remove (or comment out) those added lines.
- See if it displays a detailed error message about what folder/path is failing to access, or look at the debug log.
- The debug log file may contain sensitive information, so be sure it writes to a folder not accessible from the internet or it has a weird name that couldn't be easily guessed, and delete it after you've saved it somewhere else. Ciencia Al Poder (talk) 10:31, 18 December 2014 (UTC)
- I hope I can reply again (yesterday, somehow I couldn't)
- Adding those lines tot LocalSettings didn't work. Yesterday I (only) used $wgDebugLogFile ... and that did deliver a logfile (but I couldn't reproduce that today; strange).
- I think You are looking for the following lines (from yesterdays logfile):
ExifBitmapHandler::isMetadataValid: back-compat version File::transform: Doing stat for mwstore://local-backend/local-thumb/f/f7/Dropplant-01.jpg/180px-Dropplant-01.jpg FileBackendStore::getFileStat: File mwstore://local-backend/local-thumb/f/f7/Dropplant-01.jpg/180px-Dropplant-01.jpg does not exist.
- Also, since the upgrade (in which, I admit, I made the already mentioned mistakes) I still can login, but am not allowed to make changes anymore.
- I can open the Edit-tab, but 'show preview' and 'Save page' react with "Forbidden You don't have permission to access /wiki/index.php on this server Apache/2.2.15 (CentOS) Server at www.imkerpedia.nl Port 80". AlbertStoter (talk) 11:11, 18 December 2014 (UTC)
- Well, that excerpt from the debug log says what we already know, that the thumbnail file does not exists. But the interesting part of the log should be the attempt to create the thumbnail. Ciencia Al Poder (talk) 15:49, 19 December 2014 (UTC)
Sidebar won't change.
Why can't I change the sidebar. ( tried purge )
http://solidarity.coop/wiki/MediaWiki:Sidebar 210.56.87.223 (talk) 22:34, 16 December 2014 (UTC)
- Nice wiki!
- See changes not showing up. ☠MarkAHershberger☢(talk)☣ 15:35, 17 December 2014 (UTC)
- Yes I tried these, any other ideas? Sirjazzfeet (talk) 09:58, 20 December 2014 (UTC)
- Just an idea: Can you try to edit MediaWiki:Sidebar/en and check, if these changes are visible in the sidebar? Florianschmidtwelzow (talk) 16:57, 20 December 2014 (UTC)
- Made same changes, not showing either. http://solidarity.coop/wiki/MediaWiki:Sidebar/en Sirjazzfeet (talk) 05:44, 1 January 2015 (UTC)
- Just an idea: Can you try to edit MediaWiki:Sidebar/en and check, if these changes are visible in the sidebar? Florianschmidtwelzow (talk) 16:57, 20 December 2014 (UTC)
- Yes I tried these, any other ideas? Sirjazzfeet (talk) 09:58, 20 December 2014 (UTC)
- You should, as a side note, think about to upgrade your MediaWiki version to the latest stable, or at least to the latest legacy version, see: Version_lifecycle and Upgrade. Florianschmidtwelzow (talk) 22:02, 17 December 2014 (UTC)
- Thanks, but my host is quite strict and latest version doesn't work too well (too many connections) Sirjazzfeet (talk) 05:45, 1 January 2015 (UTC)
[RESOLVED] My Wiki's logo is the Wikipedia Logo... And I have NO IDEA WHY
Here's my wiki: http://mafia-town.net/wiki/index.php?title=Main_Page
In the top left is a logo. It should be this image: http://mafia-town.net/wiki/mafia-town-wiki-logo.png
For some users, the correct image appears. For others, including myself, the Wikipedia logo appears. This is odd, as the default logo is the MediaWiki logo, and the Wikipedia logo is no where on my server, nor has it ever been.
In fact, when I view the site on my laptop, I see the Wikipedia logo. On my desktop, I get the correct logo.
When I inspect the image in Firefox, the image file name is the correct file (mafia-town-wiki-logo.png), even though Wikipedia's logo is showing up.
The image file I want to appear is uploaded to the root directory of my Wiki. It is in the same directory as my LocalSettings.php file. In that file, I have this line:
$wgLogo = "{$wgScriptPath}/mafia-town-wiki-logo.png";
I have hard refreshed my browser. I have tried even changing the image in my LocalSettings.php file to another image, and it is still the Wikipedia logo (which, again, is no where to be found on my server). This issue arises for many users on many different devices and has been like this for months.
And I have no idea why. 67.41.84.34 (talk) 02:21, 17 December 2014 (UTC)
- It's because you copied the
Common.css
stylesheet in its entirety from en.wikipedia.org to your wiki. Please review it carefully and only copy the parts of it that you actually know you need. Krinkle (talk) 03:12, 17 December 2014 (UTC)- Thank you. I was able to fix it there.
- MediaWiki is a headache to figure out, man. 67.41.84.34 04:26, 17 December 2014 (UTC)
- You blindly copying things from wikipedia then wondering why your wiki looks like wikipedia isn't mediawiki's fault. 58.166.42.142 09:58, 17 December 2014 (UTC)
- Didn't say it was. Just that it is hard for me to figure out, as the way it works is very different from the CMS software I am used to. Which is why I am thankful for the help this support desk provides. 67.41.84.34 20:55, 17 December 2014 (UTC)
- Just be certain that you understand that MediaWiki isn't really designed to be a CMS. It can be used as one, but that use case isn't a considered in its development. ☠MarkAHershberger☢(talk)☣ 21:22, 17 December 2014 (UTC)
- Didn't say it was. Just that it is hard for me to figure out, as the way it works is very different from the CMS software I am used to. Which is why I am thankful for the help this support desk provides. 67.41.84.34 20:55, 17 December 2014 (UTC)
- You blindly copying things from wikipedia then wondering why your wiki looks like wikipedia isn't mediawiki's fault. 58.166.42.142 09:58, 17 December 2014 (UTC)
Localized namespaces not working
Localized namespaces have stopped working in a MediaWiki installation: they are not translated into localized links, and localized links do not lead to the special pages. For example, for language "De", the entry "Kategorien" (categories) under special pages links to "Special:Categories" rather than to "Special:Kategorien". Also, opening the page "http://.../wiki/Special:Kategorien" gives "Spezialseite nicht vorhanden" (nosuchspecialpage: No such special page). The problem occurs both for the wiki's configured language in LocalSettings (Greek - El), and for a user-configured language (Deutsch - De) through user preferences.
I noticed this problem after upgrading from MediaWiki 1.19.3 to 1.24.0.
These are the software versions used: MediaWiki 1.24.0, PHP 5.3.5 (apache2handler), MySQL 5.1.55-log. Diomidis Spinellis (talk) 09:22, 17 December 2014 (UTC)
- Could you provide a link to your wiki?
- I don't recall localized links like this working (and I remember filing a feature request for them them a few years ago). Sure, for a German wiki, you would get special page names in German and English Special page names would work, but German page names wouldn't work on an English wiki. ☠MarkAHershberger☢(talk)☣ 15:28, 17 December 2014 (UTC)
- The wiki in question is configured to run in Greek. I am sure localized namespaces were working, because now the wiki in question is full of dead links, which used to work. You can also see localized namespaces working in the special pages of the German Wikipedia. In the German Wikipedia all special page links are in German, whereas in the corresponding page of the wiki in question the links are in English, rather than in Greek. Diomidis Spinellis (talk) 16:55, 17 December 2014 (UTC)
- Ah, I misunderstood what you meant. This is definitely a bug, but maybe there is some configuration that is needed. Pinging User:Amire80 to see if he has ideas. ☠MarkAHershberger☢(talk)☣ 19:18, 17 December 2014 (UTC)
- The wiki in question is configured to run in Greek. I am sure localized namespaces were working, because now the wiki in question is full of dead links, which used to work. You can also see localized namespaces working in the special pages of the German Wikipedia. In the German Wikipedia all special page links are in German, whereas in the corresponding page of the wiki in question the links are in English, rather than in Greek. Diomidis Spinellis (talk) 16:55, 17 December 2014 (UTC)
- Opened a bug: https://phabricator.wikimedia.org/T78794 ☠MarkAHershberger☢(talk)☣ 15:29, 17 December 2014 (UTC)
- I got a fresh wiki installation on another host to work correctly with a copy of the original wiki's database and a fresh version of LocalSettings.php created by the maintenance/install.php script (called from a Puppet module). The corresponding software versions are as follows:
- MediaWiki 1.24.0,
- PHP 5.4.35-0+deb7u2 (apache2handler),
- MySQL 5.5.40-0+wheezy1.
- Note that the settings created had $wgDBmysql5 = true; (although the documentation claims it is false by default), which caused an "Illegal mix of collations" database error. The error was rectified by setting $wgDBmysql5 = false in LocalSettings.php to mirror the setting in the original wiki. Diomidis Spinellis (talk) 23:16, 17 December 2014 (UTC)
- Thanks for the update. I've updated phabricator with your comment. ☠MarkAHershberger☢(talk)☣ 04:01, 22 December 2014 (UTC)
[RESOLVED] Want only registered users to view and edit site, and use email authenticated new user registration
I have just installed MediaWiki 1.24
I would like our staff to be able to create their own accounts via email authentication. I would like the site to be viewable only by registered staff. In the install process I answered the questions to set the site private. I also installed the extension EmailDomainCheck.
The site comes up fine, with a note that you have to log in to view it. No create an account link is displayed, and following the link to the log in page, no link is presented there to create a new account.
What settings do I need to change in localsettings.php in order to allow staff to be presented with the choice to create a new account?
Please advise
Thanks, John Dooley 167.29.4.150 (talk) 20:57, 17 December 2014 (UTC)
- Your LocalSettings.php file probably contains a line something like:
$wgGroupPermissions['*']['createaccount'] = false;
- You need to change the "false" to "true". ☠MarkAHershberger☢(talk)☣ 21:26, 17 December 2014 (UTC)
- Thanks that solved the issue and things work just as we wanted! 167.29.4.150 22:55, 17 December 2014 (UTC)
Windows Phone
Dear wiki.. When u planned to release official app for windows phone, please release it asap with edit option... we were eagerly waiting for your reply 117.202.133.179 (talk) 06:29, 18 December 2014 (UTC)
- Requesting a mobile "app" vesion of a server software does not make much sense. Did you mix up Wikipedia and MediaWiki maybe? If so, does https://en.wikipedia.org/wiki/List_of_Wikipedia_mobile_applications help? Malyacko (talk) 14:15, 18 December 2014 (UTC)
- The Mobile Apps Team is very small (four engineers right now) so we're focussing iOS and Android. We have no plans at the minute to work on a Windows Phone app, but it's something we could consider in the future if our team grows. Thanks! Dan Garry, Wikimedia Foundation (talk) 17:29, 18 December 2014 (UTC)
How to get oldid of a page?
Is there anyway of getting the 'oldid' or 'direction' parameters with the arguments passed to the hooks 'getUserPermissionErrors' or 'performMediawikiAction' ?
I'm unable to get a proper URL from $title,$request,etc. It's like there is some kind of hash applied to the request URL and it's impossible to strip out the parameter values that I'm looking for. For instance, $request->getRequestURL() doesn't yield the original URL path such as 'http://www.example.com/mediawiki/index.php?title=Main_Page&oldid=617'
My setup:
- mw 1.23
- apache server
- API must stay disabled
Any ideas are appreciated. Mfort123 (talk) 15:42, 18 December 2014 (UTC)
- I did some more searching and it seems like I would need to get a 'revision' object and then I could use the 'getId()' method. Is there any way of getting a revision object associated with a request,user or title object? Mfort123 (talk) 15:59, 18 December 2014 (UTC)
- Why not just (for MediaWikiPerformAction)
$reuest->getVal( 'oldid' )
or$request->getValues()
(to get all values of this request). If you really need a Revision object (i think not), you can create one from the oldid param:$rev = Revision::newFromId( $oldid )
. But if you really need a revision object, look for a Hooks with a revision as a paremeter, i think it will be better for what you want to do. - Last question: What do you want to do (for what you need the oldid param)? :) Florianschmidtwelzow (talk) 17:25, 18 December 2014 (UTC)
- Why not just (for MediaWikiPerformAction)
Not generating image preview
Images work for Wiki, but previews don't show. Sirjazzfeet (talk) 17:41, 18 December 2014 (UTC)
- Fix your ImageMagick/GD config! 88.130.110.249 18:57, 18 December 2014 (UTC)
Ask for more(custom) details when uploading a file in mediawiki.
Is there any way that I can ask users for more details about the file they upload into the wiki and show it in a page where the file is used?
Version:
Mediawiki: 1.23.2
PHP : 5.3.27 (cgi-fcgi)
MySQL : 5.1.73-cll 208.116.10.33 (talk) 05:12, 19 December 2014 (UTC)
- No reply. Not even 1 extension for that? Could someone please help? 208.116.10.33 06:37, 20 December 2014 (UTC)
- It sounds like a very particular use case. I don't know of an extension that does this.
- From what I understand, you want to give a piece of data (e.g. "Description") to an uploaded file and then have that data used whenever the file is used. So, if a user uploads a picture of a pig, they can designate "Wilbert" as the description that will always be shown with the image's thumbnail.
- Is that right?
- I think something like this could be accomplished using templates, though, or even a bit of JavaScript. It would take a little time to implement, though. ☠MarkAHershberger☢(talk)☣ 03:55, 22 December 2014 (UTC)
- Can we add templates for the file upload page? What about the columns in the file upload table? If I add custom details like author name, archived date etc., the upload should add those details to the table too right? 208.116.10.33 11:54, 22 December 2014 (UTC)
- Hackin the DB is the wrong way to introduce those fields. Instead, you should probably use Semantic MediaWiki. ☠MarkAHershberger☢(talk)☣ 13:19, 22 December 2014 (UTC)
- What about https://commons.wikimedia.org/wiki/MediaWiki:UploadForm.js/Documentation ? 208.116.10.33 06:30, 29 December 2014 (UTC)
- I didn't know about that. Try it out and see if it works for you. ☠MarkAHershberger☢(talk)☣ 21:06, 29 December 2014 (UTC)
- How do I implement that? Its not easy for me? All I know is to install extension and thats it.. Could someone please help..? 208.116.10.33 05:39, 5 January 2015 (UTC)
- I didn't know about that. Try it out and see if it works for you. ☠MarkAHershberger☢(talk)☣ 21:06, 29 December 2014 (UTC)
- What about https://commons.wikimedia.org/wiki/MediaWiki:UploadForm.js/Documentation ? 208.116.10.33 06:30, 29 December 2014 (UTC)
- Hackin the DB is the wrong way to introduce those fields. Instead, you should probably use Semantic MediaWiki. ☠MarkAHershberger☢(talk)☣ 13:19, 22 December 2014 (UTC)
- Can we add templates for the file upload page? What about the columns in the file upload table? If I add custom details like author name, archived date etc., the upload should add those details to the table too right? 208.116.10.33 11:54, 22 December 2014 (UTC)
[RESOLVED] Bug
Hi, I upgraded my site to Media Wiki 1.24 and I have a bug that I had never seen before. After you read a message on your talk page, you will still see "You have new messages". Thanks, Dekel E (talk) 07:24, 19 December 2014 (UTC)
- Are you clicking on the "new messages" link? Could I set up an account on your wiki to test this? ☠MarkAHershberger☢(talk)☣ 03:48, 22 December 2014 (UTC)
[RESOLVED] cannot modify header information - headers already sent in webresponse.php-line 38
I am using a SMW extension , the code is as follows
<?php
ini_set('display_errors', 'on');
error_reporting(E_ALL);
$wgExtensionCredits['other'][] = array(
'name' => 'DoExample',
'version' => '0.0.1',
'author' => 'anirudhkv',
'url' => '',
'description' => 'To test an example SMW',
);
$wgHooks['ParserFirstCallInit'][] = array( 'Docall');
$wgExtensionMessagesFiles['DoExample'] = __DIR__ . '/Doexample.i18n.php';
function Docall(&$parser)
{
$parser->setFunctionHook( 'Doaction', 'callpage' );
return true;
}
function callpage($output) {
$params = array ("[[Category:Platform features]]", "?Buisness requirement=", "?Design=");
$result1 = SMWQueryProcessor::getResultFromFunctionParams( $params, SMW_OUTPUT_WIKI );
}
I am getting the following warning 4 times Cannot modify header information - headers already sent by (output started at /serverlocation/filename.php:1) in /serverlocation/includes/WebResponse.php on line 38
can some one help me out? what is the reason behind this 202.88.239.42 (talk) 09:36, 19 December 2014 (UTC)
- Look at /serverlocation/filename.php, Be sure you do not have anything (even whitespace) before the <?php tag Ciencia Al Poder (talk) 10:27, 19 December 2014 (UTC)
- Yea got it :) thank you :) 202.88.239.42 11:28, 19 December 2014 (UTC)
A bot that can read xml
Hello,
Does anyone know if there is a already created bot that could create about 300k pages for me by putting specific data from an xml file into a template I would create preferable with if function. If there isn't any ideas what would be the easiest way to do something like this? Any dummy-proof guides how to create page-creating scripts?
Thanks in advance. Cristal01 (talk) 11:11, 20 December 2014 (UTC)
- It almost sounds like you're setting up an SEO honey pot, but I could see cases where you have a large stash of documents that you want to publish, so I'll offer you this:
- After setting up MediaWiki, check out a bot-building toolkit like Pywikibot. A friend of mine built a tool that he used to publish a bunch of academic paper abstracts to a wiki using a spreadsheet as the source.
- So, yes, what you want is possible. I'm not sure what you mean by "dummy-proof", though. Perhaps looking at the documentation for Pywikibot will give you the information you need. ☠MarkAHershberger☢(talk)☣ 03:47, 22 December 2014 (UTC)
Is escapeshellarg() absolutely necessary for MediaWiki to function
I have just upgraded my MW installation from 1.8.2 to 1.24.1 and now at the top of some pages I am seeing a lot of:
Warning: escapeshellarg() has been disabled for security reasons in /home/smtkwgqq/public_html/wiki/includes/GlobalFunctions.php on line 2714
Does anyone know if MediaWiki has always needed escapeshellarg?
thanks 86.178.54.108 (talk) 13:19, 20 December 2014 (UTC)
- I don't know, when it was added, but it is always used, when a shell function is executed, so it's essential for all upload actions. Maybe you should ask your provider, why they blocked the access to it :) Florianschmidtwelzow (talk) 16:56, 20 December 2014 (UTC)
- There basically are two answers - and neither of them is pleasant: Either the host is unable to create a save setup with such functions enabled so that you should better change your host. The other option is that he wants you to pay additionally for this/these function(s). In this case you might want to change to a more reputable host. 88.130.79.177 22:13, 20 December 2014 (UTC)
Hi, I'm getting the "Could not create directory "mwstore://local-backend/local-public..." error on upload
Hi, I'm getting the "Could not create directory "mwstore://local-backend/local-public..." error when I attempt to upload a file. I verified that the privledges on the image upload dir and all sub dirs allow members of the apache group to write (modify/delete). A potential clue is that [[image:TooBusyToImprove.png|Too Busy To Improve]] link results in a broken link, the image does not appear. Thanks for your help!
drwxrwxr-x. 6 apache apache 4096 Dec 12 01:22 images
server: Red hat Enterprise Linux Server Rel 6.6 (Santiago) kernel Linux 2.6.32-504.el6.x86_64 GNOME 2.28.2
MediaWiki 1.23.2
PHP 5.3.3 (apache2handler)
MySQL 5.1.73 PhilLord (talk) 04:39, 21 December 2014 (UTC)
- Try to get the exact folder MediaWiki is trying to write to by setting a debug log (local-backend/local-public is just a placeholder). See manual:How to debug. Then check permissions for that directory.
- If permissions are good, then the problem may be an external source, like SELinux. Ciencia Al Poder (talk) 10:26, 22 December 2014 (UTC)
[RESOLVED] API in JavaScript. Script edits not all pages from category
My script:
// this function from mediawiki.org function addNewSection( page, summary, content ) { var api = new mediaWiki.Api(); api.postWithToken( "edit", { action: "edit", title: page, section: "new", summary: summary, text: content } ).done( function( result, jqXHR ) { mw.log( "Saved successfully" ); //location.reload(); } ).fail( function( code, result ) { if ( code === "http" ) { mw.log( "HTTP error: " + result.textStatus ); // result.xhr contains the jqXHR object } else if ( code === "ok-but-empty" ) { mw.log( "Got an empty response from the server" ); } else { mw.log( "API error: " + code ); } } ); } // this function created by me. I called it as javascript:vld("some cat","some text"); in addressbar function vld (catname,addtext){ $.get ("/w/index.php",{"title":"Special:Export","addcat":"addcat","catname":catname,"pages":"XXXXX"},function(data){ ttt=data.split("<textarea")[1].split(">")[1].split("</textarea")[0].split("\n"); // full list of pages from cat. I checked - working for (t in ttt){ tt=ttt[t] if(! (tt=="XXXXX")){ addNewSection(tt,"",addtext); // add section } } alert("Done!"); }) }
Not all pages are edited. Why? How to make all the pages to be edited from the list?
problem solved. no help needed Nicholas aka 16x16px (talk) 13:11, 21 December 2014 (UTC)
- Maybe you can explain, what you did, if someone other has the same problem and find your thread without any solution? :) Florianschmidtwelzow (talk) 17:31, 21 December 2014 (UTC)
Question about Translation Extension
This post by Revibot was moved on 2015-07-11. You can find it at Extension talk:Translate/Archive 2/2014#h-Question_about_Translation_Extension-2014-12-21T09:03:00.000Z. Florianschmidtwelzow (talk) 17:30, 21 December 2014 (UTC)
[RESOLVED] SVG thumbnail creation error
Hello,
I am having a problem with rendering new svg thumbnails on this wiki. I get an error that says:
Error creating thumbnail: libgomp: Thread creation failed: Resource temporarily unavailable
The error happens at attempts to create a thumbnail of any size. JPGs and PNGs render fine.
I am using:
- Debian 4.7.2 on 64-bit architecture
- Apache 2.4.10
- ImageMagick 6.7.7-10
- MediaWiki 1.24.1
- MySQL 5.5.40
- PHP 5.4.35
(Source: https://nsindex.net/wiki/Special:Version)
Relevant switches on LocalSettings.php:
$wgMaxShellMemory = 204800; $wgUseImageMagick = true; $wgImageMagickConvertCommand = '/usr/bin/convert'; $wgFileExtensions = array('png ... oga');
(NB: the last option was snipped for length).
I did check the FAQs. Can you provide advice please? Thanks. Minoa (talk) 03:09, 22 December 2014 (UTC)
- Have you tried increasing $wgMaxShellMemory? Searching for the error offers this page which suggests that. ☠MarkAHershberger☢(talk)☣ 03:35, 22 December 2014 (UTC)
- Hi,
- It appears that the error I got was very misleading because I was lead to think that something in the configuration was missing.
- Fortunately, I have been able to resolve this by clearing the thumbnail cache via FTP and then, for measure, increasing the memory to 819600. I am quite surprised, because I got the error in question when the value was set to 307200, leading me to initially think that the wiki was complaining about "too much memory" or "out of range".
- I am concerned though, that a much larger value in six digits or more, could cause the installation to crash or seriously slow down. Does $wgMaxShellMemory support "unlimited" or similar? Marianian (talk) 03:56, 22 December 2014 (UTC)
- From $wgMaxShellMemory:
- Under Linux, shell commands are executed with the time and memory limits given by $wgMaxShellTime and $wgMaxShellMemory. Setting either variable to 0 will disable both limits. ☠MarkAHershberger☢(talk)☣ 04:07, 22 December 2014 (UTC)
- Thank you!
- Hopefully, users who look up "Error creating thumbnail: libgomp: Thread creation failed: Resource temporarily unavailable" will find this topic and they will not be as confused as I was at first because of the wording. Marianian (talk) 04:17, 22 December 2014 (UTC)
- From $wgMaxShellMemory:
Automatic TOC
On the Automatic table of contents, the numbers are all repeated twice like
1.1 1.1 The Advantages of a Logical Approach 1.2 1.2 Main High-Level Conclusions 1.3 1.3 Summary
I just copied the first three headings on the table of content from my page so you can see how it repeats and this goes on to the end of the page and as you can see the numbers are repeated twice, how can I edit this? 213.55.114.167 (talk) 08:40, 22 December 2014 (UTC)
- That doesn't happen here. Providing a link to your wiki would help. Ciencia Al Poder (talk) 10:32, 22 December 2014 (UTC)
- Am Kind of trying to keep the link private :) will it make a difference? The table just repeats the number; if the heading is 1.1 on the automatic table it will appear as 1.1.1.1 213.55.114.167 10:35, 22 December 2014 (UTC)
- Without seeing the wiki its harder to figure out.
- This problem might be caused by CSS, e.g. if you have changed the CSS of the toc, then you might once get the numbers from the actual HTML source code and once from the CSS styling of it. 88.130.118.234 12:28, 22 December 2014 (UTC)
- Maybe you can make the wiki's information public, like your installed MediaWiki version and installed extensions. Florianschmidtwelzow (talk) 20:34, 24 December 2014 (UTC)
- Am Kind of trying to keep the link private :) will it make a difference? The table just repeats the number; if the heading is 1.1 on the automatic table it will appear as 1.1.1.1 213.55.114.167 10:35, 22 December 2014 (UTC)
Getting "Sorry. The Cache connection is temporarily unavailable." error on every page.
Hi, I am using Mediawiki version 1.23.2
Few days ago I migrated to mediawiki 1.23.2 after migration I was getting "Uncommitted DB writes" error so I ran update.php from maintenance folder and then site was working fine. From few days I am getting following error
Sorry. The Cache connection is temporarily unavailable.
Notice: Uncommitted DB writes (transaction from DatabaseBase::query (WikiPage::pageData)). in /data/web/public/wiki/doc_root/includes/db/Database.php on line 4147
for Uncommitted I tried to run update.php again but this time its not working.
Thanks in advance. Swami-elevati (talk) 14:23, 22 December 2014 (UTC)
- Note to MediaWiki developers: That Uncommitted DB writes error should go to the hell from where it comes, because it's not useful for debugging and it's hiding the real error that's happening!!
- Please set display errors to true, by adding this in LocalSettings.php:
error_reporting( -1 );
ini_set( 'display_errors', 1 );
$wgShowExceptionDetails = true;
- Reload the page again, and post the error message, ignoring the Uncommitted DB writes error, since this one happens after something else went wrong. Ciencia Al Poder (talk) 10:23, 23 December 2014 (UTC)
[RESOLVED] password
This post by Revibot was moved on 2015-07-11. You can find it at Project:Village Pump/Flow/2014#h-[RESOLVED]_password-2014-12-22T18:26:00.000Z. Florianschmidtwelzow (talk) 20:13, 22 December 2014 (UTC)
coord section in infobox wide infoboxes
So if I make an infobox with cooridinates that link to a map, the infobox is rendered really wide. Vapblack (talk) 20:45, 22 December 2014 (UTC)
- The wiki seems to be missing the Module:Coordinates and/or Scribunto extension. Ciencia Al Poder (talk) 10:25, 23 December 2014 (UTC)
- I would say it is more likely you are missing the GeoData extension. It's not clear to me whether "Solr" is required for that extension; if so, you could be in for a lot of work setting that up.
- Alternatively, you could alter the infobox template (or module, if it is generated by Scribunto) to simply not output
{{#coordinates}}
data. This, that and the other (talk) 11:54, 23 December 2014 (UTC)- Ah!, yes, I though that was a scribunto module, but it's not. So yeah, you seem to be missing that GeoData extension Ciencia Al Poder (talk) 20:42, 23 December 2014 (UTC)
How to insert a html table inside a mediawiki extension??
I am using a SMW extension for sorting down few data result . My desired output is a HTML table to be added at a place that i wish in any part of a page . Currently my coding is ,
function callpage($output) {
$params = array (
"[[Category:Platform features]]",
"?Buisness requirement=",
"?Design=",
"format=php"
);
$result = SMWQueryProcessor::getResultFromFunctionParams ( $params, SMW_OUTPUT_WIKI );
$pages = smwfNormalTitleDBKey ( $result );
$keywords = preg_split ( "[[:|:]]", $pages );
$i = - 1;
echo '<table style="width:100%">';
echo '<th>Business Requrement</th>';
echo '<th>Platform features</th><th>Design Points</th>';
for(; $i < count ( $keywords ) - 2;) {
echo '<tr>';
$i = $i + 4;
echo '<td> '. $keywords[$i]. '</td>';
$i = $i - 2;
echo '<td>'.$keywords[$i].'</td>';
$i = $i + 4;
echo '<td>'.$keywords[$i].'</td>';
echo ' </tr>';
}
echo '</table>';
}
This displays the desired output but its not in form of table.. is there any predefined API for displaying this as a HTML table , just as a ask table ?? Thanks in advance 202.88.239.42 (talk) 08:24, 23 December 2014 (UTC)
- You can't output contents directly from any function (like what are you doing with those
echo
)! - Instead, use the
$output
variable that you receive as a parameter, that for the name I assume it could be an instance of OutputPage class. Still, that would only make sense if your extension will output that content for all pages, and not based on the presence of an extension tag or parser function within the wikitext of a page. Ciencia Al Poder (talk) 10:37, 23 December 2014 (UTC)- Thanks again sir, this is the second time you are helping me, thanks :) 202.88.239.42 12:09, 23 December 2014 (UTC)
- You should also think about to use our Html/Xml classes to build a table or any other element. The advantage is, that these classes (normally, see the documentation for it) escape the contents, e.g. if you sometimes want to output (or it is possible, that you want to output) user inputs, they can insert code which is directly added to the output (that can be really bad). E.g. for a table you can use Xml::buildTable(). Florianschmidtwelzow (talk) 16:02, 23 December 2014 (UTC)
[RESOLVED] Projects as article pages.
Hi, My wiki has a very strange problem. There are no any project pages under the main pages, which he will count as a article page. For example: The "Privacy policy" is not a "project page" but an "article page", as well as "General disclaimer" and many pages that goes under the SITENAME of the wiki as well. I hope you guys can help me out about what the problem is. KidProdigy (talk) 09:14, 23 December 2014 (UTC)
- If you mean that those pages are counted as mainspace pages in
{{NUMBEROFARTICLES}}
, that's because that namespace is part of Manual:$wgContentNamespaces. Ciencia Al Poder (talk) 10:40, 23 December 2014 (UTC)- Ok, I'll see what I can do. How can I fix it actually? Already a question if it doesn't work. Thanks for your help. KidProdigy (talk) 12:26, 23 December 2014 (UTC)
- I've tried that, but it still give the same error. Can someone please help me out with this issue. Already, thanks. KidProdigy (talk) 14:34, 23 December 2014 (UTC)
- Error? What's the error message? Ciencia Al Poder (talk) 20:40, 23 December 2014 (UTC)
- The problem is fixed actually. But thanks for your help. KidProdigy (talk) 03:10, 24 December 2014 (UTC)
- Can you rephrase what the problem is?
- You say that you have certain pages with content on them. E.g. on Wikipedia the Privacy policy is a normal page in the article namespace (that is the MAIN namespace). What is wrong with these pages? Where are they not counted? 88.130.69.208 03:34, 24 December 2014 (UTC)
- I've fixed the problem, actually. Thanks for your help. KidProdigy (talk) 13:48, 25 December 2014 (UTC)
- Error? What's the error message? Ciencia Al Poder (talk) 20:40, 23 December 2014 (UTC)
- I've tried that, but it still give the same error. Can someone please help me out with this issue. Already, thanks. KidProdigy (talk) 14:34, 23 December 2014 (UTC)
- Ok, I'll see what I can do. How can I fix it actually? Already a question if it doesn't work. Thanks for your help. KidProdigy (talk) 12:26, 23 December 2014 (UTC)
jesmion
It's believed that the first created wiki is wikiwikiweb, if i may ask, was wikiwikiweb replaced by mediawiki or wiki? --jesmion 41.206.11.62 41.206.11.62 (talk) 06:46, 24 December 2014 (UTC)
- Read here and ask questions on that article's talk page. ☠MarkAHershberger☢(talk)☣ 22:29, 25 December 2014 (UTC)
- Hi, i been through wiki, discovering that wiki is a language, but widely use in media, example: wiki.creativecommons.org/user/jesmion 41.206.12.50 17:06, 22 April 2015 (UTC)
- See Differences between Wikipedia, Wikimedia, MediaWiki, and wiki . Shirayuki (talk) 22:37, 25 December 2014 (UTC)
- hi, that's interesting 41.206.11.182 06:35, 1 May 2015 (UTC)
[RESOLVED] Database error
Hello, I'm using XAMPP, updated MediaWiki to verison 1.24.1 and get the following error when I try to save a page:
Notice: Uncommitted DB writes (transaction from DatabaseBase::query (LCStoreDB::get)). in XAMPP\htdocs\MediaWiki\includes\db\Database.php on line 4266.
Function: LinksUpdate::incrTableUpdate
Error: 1054 Unknown column 'pl_from_namespace' in 'field list'
Any ideas how to fix this error?
- XAMPP Version 5.6.3
- MediaWiki Version 1.24.1
- PHP Version 5.6.3
- MySQL Version 5.6.21 80.136.249.88 (talk) 14:34, 24 December 2014 (UTC)
- Did you run the update script (either from the web installer, or update.php from command line)? See Manual:Upgrading#Run_the_update_script Ciencia Al Poder (talk) 18:38, 24 December 2014 (UTC)
- The update script solved the problem. Thank you! 87.180.157.164 19:58, 24 December 2014 (UTC)
Offline wikipedia mirror
I wanted to know if anyone has any experience creating an offline english full wikipedia mirror. I'll be traveling to Ethiopia in February to help setup a community clinic and computer lab. This site has no internet connection and is not likely to acquire one. I'd like to have a nas device or small server setup to host all of the english content on this site and then periodically have someone update the site when they can get an internet connection. There will be about 40 computers/tablets in the lab accessing it via wireless. Specs on the device I'm looking at are below. Should this be sufficient to host wikipedia for 40 computers? Mindspeed Comcerto 2000 (M86261G-12) dual-core ARM Cortex-A9 Communication Processor running at 650 MHz. The Gigabit Ethernet port is a Broadcom BCM54612E Gigabit Ethernet Transceiver. Other components include 256 MB of Samsung K4B2G1646E DDR3 RAM and 512 KB of Winbound 25X40CL flash. The drive is a WD Red 2 TB (WD20EFRX).
Any and all help is greatly appreciated! Jvonschmidt (talk) 17:16, 24 December 2014 (UTC)
- I think if you were serving up a static copy of Wikipedia -- all pre-rendered pages -- then the CPU wouldn't have a problem. I'm not sure you could run a copy of MediaWiki and expect it to handle 40 clients with that kind of power.
- Also, which Wikipedia? The English one or
- one? The dumps from amwiki are smaller than enwiki ones.
- If you have time, I'd try to take the Amharic wiki (if you were going to use that one) and try to create static pages for it.
- Alternately, have a look at Kiwix -- you may be able to put a copy on each of the 40 computers. ☠MarkAHershberger☢(talk)☣ 22:24, 25 December 2014 (UTC)
- You can download a complete copy of Wikipedia (all main namespace articles with pictures) here (this is directly usable on Windows/Linux, just unzip the file and run Kiwix):
- https://download.kiwix.org/portable/wikipedia_en_all.zip.torrent
- https://download.kiwix.org/portable/wikipedia_am_all.zip.torrent Kelson (talk) 17:52, 26 December 2014 (UTC)
- Thanks for the feedback! I'll give it a go and let you know how it went. Jvonschmidt (talk) 04:06, 27 December 2014 (UTC)
Jesmion
Could my apology reach mediawiki and all its projects: 41.206.11.6 09:54, 25 December 2014 (UTC) perhaps, does it limit circulation within mediawiki? 41.206.11.6 10:02, 25 December 2014 (UTC) i had apologic expression to wikipedia during my suckpuppet's queries, does it reach mediawiki, or is it only within wikipeida project ranges? 41.206.11.4 10:40, 25 December 2014 (UTC)
Problem with saving MediaWiki posts
I responded to a question here on Quora regarding a problem someone is having with (I believe) an installation of MediaWiki, by suggesting that he post his question here. His response was "I can see already that they can help but even after creaying an account with them it seems that they are also affected by the same issue: I can't start a discussion! The save button does nothing."
I don't have a clue as to (a) what's wrong with his installation, or (b) why it would impact his posting to a web page. If someone could help (either by posting here, and I'll play middleperson/relay, or by posting at Quora), that would be much appreciated. John Broughton (talk) 16:05, 25 December 2014 (UTC)
- I have been having this same exact problem. I've been fighting with a new installation, trying to make it functional. Creating users is not a problem, but creating pages is... After editing/creating a page and clicking the "Save page" button the screen refreshes and the text editor is back to its original state before any changes/creation happened..
- I have done a complete manual re-install of the most recent version of mediawiki. I can't find a solution to my problem... 198.7.59.204 16:24, 25 December 2014 (UTC)
- My Set Up:
- MediaWiki 1.24.1
- PHP 5.3.29 (cgi-fcgi)
- MySQL 5.5.32-cll-lve
- Apache 2.2.29
- Linux
- x86_64
- Hosting by Namecheap
- I am wondering if there is some problem with write permissions to a database? Or if some other configuration is wrong.. I have done several different un-install / re-install attempts and nothing is working..
- Any help would be much appreciated! 198.7.59.204 16:42, 25 December 2014 (UTC)
- Hmmmm, Now I seem to be having an issue saving any posts here... 198.7.59.204 00:41, 26 December 2014 (UTC)
- I think this points to a problem with your browser.... Could you try testing that? ☠MarkAHershberger☢(talk)☣ 01:11, 26 December 2014 (UTC)
- Hmmmm, Now I seem to be having an issue saving any posts here... 198.7.59.204 00:41, 26 December 2014 (UTC)
- Since you're able to post here and he isn't, I don't think your problem is the same. Still, what happens if you try another browser?
- Are you using Namecheap's shared hosting? ☠MarkAHershberger☢(talk)☣ 21:50, 25 December 2014 (UTC)
- I've created an account here.. It's me from the 59.204 IP.. Cwb3.0 (talk) 01:29, 26 December 2014 (UTC)
- Still having issues? Getting very frustrated..
- Will return when I can think more clearly and without stress..... 198.7.59.204 01:33, 26 December 2014 (UTC)
- I am using shared hosting from namecheap. I've also tried editing/creating from a few different computers (linux and chrome os) using both firefox and chrome, with no luck... 38.103.208.34 14:02, 26 December 2014 (UTC)
- Could you give me a log in to your wiki so that I can test it? ☠MarkAHershberger☢(talk)☣ 17:08, 26 December 2014 (UTC)
- I finally solved it:
- CHMOD 750/755 on public_html solves the problem instantly.
- EDIT:
- CHMOD does seem to solve it but when I edit the LocalSettings.php, it starts again...
- Getting very irritated here ╬¬_¬ WindSplitter1 (talk) 12:46, 28 December 2014 (UTC)
- Replied there, but his issue sounds like a browser problem. ☠MarkAHershberger☢(talk)☣ 21:48, 25 December 2014 (UTC)
- Could this be an update problem? SHould I just use the 1.19 version instead? WindSplitter1 (talk) 17:07, 26 December 2014 (UTC)
- Hmm.. seems I can post. but just short text... I'm the guy having this trouble. WindSplitter1 (talk) 17:08, 26 December 2014 (UTC)
- 1.19 is only supported for about 6 more months. You should at least switch to 1.23. ☠MarkAHershberger☢(talk)☣ 17:11, 26 December 2014 (UTC)
- I think that was the version that worked properly without the bug. I'll look for it. If it works, Super. If not, then I'll have to choose another platform... WindSplitter1 (talk) 20:03, 26 December 2014 (UTC)
- Could this be an update problem? SHould I just use the 1.19 version instead? WindSplitter1 (talk) 17:07, 26 December 2014 (UTC)
- Someone came with the same problem to #mediawiki IRC channel, and I said that the problem could be caused by
mod_security
, which is a module installed in the webserver. Trivial edits went through, but the edit the user was trying to save not. - mod_security is most likely the problem here. See other examples about mod_security problems in namecheap: , , ...
- Please contact namecheap staff to resolve this issue, or get a better hosting. Ciencia Al Poder (talk) 09:45, 27 December 2014 (UTC)
- Hmm.. This sounds like my problem... So I should ask my host to whitelist this mod_security?
- I don't use Namecheap. WindSplitter1 (talk) 15:32, 27 December 2014 (UTC)
- I've tried now to manually install a MW but I get an error related to an "Access denied" when creating an UTF-8 table.
- Looks that I'm having some problem's with enconding... WindSplitter1 (talk) 20:01, 27 December 2014 (UTC)
- Is it possible to simply copy and paste content right into the DB itself? I just can't forgo this CMS and given this problem, this may be the most cost-effective solution. WindSplitter1 (talk) 20:24, 27 December 2014 (UTC)
- I don't know what you mean by "simply copy and paste content right into the DB itself", but if you're considering that, you should look at new hosting. ☠MarkAHershberger☢(talk)☣ 20:49, 29 December 2014 (UTC)
- Unfortunately, I have come to that. My soon-to-become previous host, doesn't even allow me to use make changes to the mod_security besides toggling on or off.
- That made me extremely irritated but fine. I'll post the solution back on Quora. Thanks for everything Mark. ~S~ WindSplitter1 (talk) 14:18, 30 December 2014 (UTC)
- I don't know what you mean by "simply copy and paste content right into the DB itself", but if you're considering that, you should look at new hosting. ☠MarkAHershberger☢(talk)☣ 20:49, 29 December 2014 (UTC)
subdirectories /images in mediawiki 1.9
I changed the server and updated from 1.10 to 1.19. Now my wiki doesn't find the pictures anymore. The error in german:
"Fehler beim Erstellen des Vorschaubildes: Datei scheint fehlend zu sein: mediawiki-1.19.23/images/1/1f/Mannheim_Atlantis.jpg"
In the old version the pictures are in /images but now there are subdirectories /images/1/1f etc. And because there are a lot of them, I don't know in which I should copy the photos.
Is there a reason for these directories and can I change it back to /images? Wegavision (talk) 21:35, 25 December 2014 (UTC)
- You probably need to set $wgHashedUploadDirectory to false. Read that page for more information. ☠MarkAHershberger☢(talk)☣ 21:40, 25 December 2014 (UTC)
Section numbering conflicts
I don't know if this is the right place to report this, but I've encountered an issue with section numbering on Wiktionary. The names of sections in the URL (page#Etymology, page#Etymology_2, etc.) do not take into account the possibility that other sections might have the same name for different reasons, and links to such sections, including those in the TOC, automatically default to the first such section on the page and it is impossible to directly link to all subsequent such sections. For example, the first ‘Etymology 2’ section on the page would have the same name in the URL (page#Etymology_2) as the second ‘Etymology’ section on the page, and links to page#Etymology_2 would automatically take the user to whichever comes first on it (see wikt:malo (‘Etymology 2’ under ‘Latin’) and wikt:si (‘Etymology’ under ‘Dalmatian’) for examples). I don't know much about coding, but can the MediaWiki source code be edited so that when creating section names in the URL, the Wiki takes into account all previous section names in the URL and not just those of sections that have the same name in the page's source code? Esszet (talk) 01:44, 26 December 2014 (UTC)
- I've opened a bug for that Ciencia Al Poder (talk) 11:10, 26 December 2014 (UTC)
[RESOLVED] showEditForm:initial hook and specifying the preloaded content in the edit box
Here is my setup:
- mw 1.23
- php/mysql
- apache web server
I'm writing an event handler for the showEditForm:initial hook. The event handler takes two arguments: $editPage and $outputPage.
I would like to modify the preloaded content that goes in the edit box. For instance, if someone tries to edit a section then whatever is currently in that section will appear in the edit box. Now I want to modify what is preloaded in that edit box. How do I do it?
I tried a few things and nothing seems to work. As an example, I tried
$editPage->setPreloadedContent=$content
with $content some content object and that doesn't do anything at all.
[RESOLVED] Support desk broken?
cwb is reporting that they cannot post here. LGTM. Krenair (talk • contribs) 02:27, 27 December 2014 (UTC)
- Apparently this is an issue on multiple browsers on multiple devices and occurs regardless of being logged in or out. Nothing failing to load according to console except for an imahe. Intermittent issue. More details to come as learned. Technical 13 (talk) 03:07, 27 December 2014 (UTC)
Multimediaviewer extension - how to use description rather than image filename
I installed Multimediaviewer and CommonsMetadata extensions and all is working fine but when I click on an image I'd like it displays the description of my image as title instead of the actual image filename.
When viewing a picture, I can the see description of my image if I scroll with mouse but I'd like to see it without scrolling, description replacing picture filename I don't want displayed.
Thanks mediawiki-1.24.1 78.233.242.32 (talk) 14:18, 27 December 2014 (UTC)
- for example on this page :
- https://www.mediawiki.org/wiki/Help:Images/fr#mediaviewer/File:Example.jpg
- It display text "Tournesols" not the actual picture filename (Example.jpg)
- But on my mediawiki it would display Example.jpg instead of Tournesols despite I put a text description like:
78.233.242.32 15:36, 27 December 2014 (UTC)
- That was discussed on IRC, and apparenty the cause is that the description is an addition on current master branch, which isn't present in REL1_24 versions of MMV.
- This resulted in task phab:T85420 Ciencia Al Poder (talk) 10:48, 29 December 2014 (UTC)
Creating a Portal Namespace
Hello
Help!!
I'm newbie in this, I put the code in localsettings.php and I made the page Portal:Topic then I added {{subst:box portal skeleton}} in the page but nothing happens could you help me plase I spent 10 hours in this !!
Many Thanks!
P. Pauline85 (talk) 22:23, 28 December 2014 (UTC)
- Could you link to the your website so we can inspect what you've done. ☠MarkAHershberger☢(talk)☣ 21:25, 29 December 2014 (UTC)
- > I put the code in localsettings.php
- Which code? And what you want to do exactly? :) Florianschmidtwelzow (talk) 01:54, 10 January 2015 (UTC)
How to get character count of a Proofread page?
Is there any extension available for displaying the character count and characters contributed by a user of a transcribed page? Does anybody know how to do this even if an extension is not available? 208.116.10.33 (talk) 08:53, 29 December 2014 (UTC)
- Here is one way to get the word count: http://www.dementedkitty.com/index.php/2007/11/24/index.php?blogid=1&archive=2007-11
- Nemo answered a similar question on SuperUser by suggesting that the Contribution Scores extension could be modified to provide word counts. ☠MarkAHershberger☢(talk)☣ 20:44, 29 December 2014 (UTC)
- Superuser answer did not help. As a newb to mediawiki it is very difficult for me to tweak something without a proper guide. The other link says that it will show the approximate word count, but what I need is the character count of a page which is proofread(or page:). This may be impossible but what makes it more difficult is when multiple user's contributes for the same page and getting the character count of each of them. 208.116.10.33 04:44, 30 December 2014 (UTC)
- Can I ask what the purpose of this is? Do you wan this displayed on-wiki?
- But, you're right. Getting the number of characters each user has contributed to a page isn't easy. You would have to track modifications made by each user and be able to say whose edit produced which character.
- It would be hard, but not impossible. It is possible that you already know how to do this and are just asking for help with the MediaWiki bits.
- If this problem just involved different versions of texts with each version being the result of some individual's editing work, would you be able to trace who had contributed each character? ☠MarkAHershberger☢(talk)☣ 16:14, 30 December 2014 (UTC)
- This is for a Transcribing project which gives users a certain amount of money per 1500 characters. It should be displayed either on each page or in a different page of admin. 208.116.10.33 04:08, 31 December 2014 (UTC)
- So, yeah, it is completely possible, but it isn't trivial. If you want this you're going to have to implement this yourself or find someone willing to do it for you. ☠MarkAHershberger☢(talk)☣ 04:12, 31 December 2014 (UTC)
- This is for a Transcribing project which gives users a certain amount of money per 1500 characters. It should be displayed either on each page or in a different page of admin. 208.116.10.33 04:08, 31 December 2014 (UTC)
- Superuser answer did not help. As a newb to mediawiki it is very difficult for me to tweak something without a proper guide. The other link says that it will show the approximate word count, but what I need is the character count of a page which is proofread(or page:). This may be impossible but what makes it more difficult is when multiple user's contributes for the same page and getting the character count of each of them. 208.116.10.33 04:44, 30 December 2014 (UTC)
A html input text box to fetch the value
Hi i need to have a input html text box in my mediawiki extension, say label:<input type='text' name='something'> and inturn i need to use the value given in the textbox"something" > if user has typed Hello world in text box, i need to have echo $something to use the value. Is it possible?? any predefined text box is available ? Thanks in advance 202.88.239.42 (talk) 09:34, 29 December 2014 (UTC)
- Where you want to add this input field? Normally there are two possible ways:
- Through a hook:
- If you're using a Hook you can add contents to the output of MediaWiki on several places with an extension. Here you normally have a way to get the actual instance of OutputPage (e.g. through a class inherited from IContextSource and the method IContextSource::getOutput() or, if there is really no way (what i don't think) with the global variable $wgOut). With OutputPage::addHtml() you can add plain html content, which will be visible on the page the user see.
- On a special page:
- With a special page extension you will do your stuff in the execute() function of your SpecialPage class. There you can get the output page through SpecialPage::getOutput() and add Html content with OutputPage::addHtml().
- To create the input field i suggest to use the Html and Xml classes provided by MediaWiki, e.g. with Html::input. If you want to create a full form (i think you want) i suggest to use HTMLForm. Florianschmidtwelzow (talk) 11:22, 29 December 2014 (UTC)
Too many redirections error on Windows IIS 7
My wiki worked fine until I added url rewrite rules and tried to make the url "pretty".
My mediawiki is installed in C:\inetpub\mediawiki\w, ie. I have C:\inetpub\mediawiki\w\LocalSettings.php.
In IIS, the physical path of the website is C:\inetpub\mediawiki. Therefore I can access my wiki at http://www.example.com/w/. Main page is at http://www.example.com/w/index.php?title=首页(Main Page).
Now I want to add url rewrite so that the url of my wiki looks like ones of Wikipedia, http://www.example.com/wiki/首页(Main Page).
I'm following Manual:Short_URL/IIS7.
In LocalSettings.php I have
$wgScriptPath = "/w";
$wgScriptExtension = ".php";
$wgArticlePath = "/wiki/$1";
$wgUsePathInfo = true;
The rewrite rule of the website is
pattern: ^wiki/(.*)$ rewrite url: w/index.php?title={R:1}
I don't know whether the above is recommended setting or not, but I know one bad idea is to install wiki at root directory of a website. If I didn't do it in recommended way, I'm free to change it.
After this configuration, I can still access my wiki through http://www.example.com/w/index.php?title=首页, and the links of the webpage becomes, for example, http://www.example.com/wiki/特殊%3A上传文件(Special: Upload Files).
Then I try to access through http://mediawiki.gqqnbig.me/wiki/首页(Main Page). The browser tells me the error "Too many redirections".
This is the HTTP request and response:
GET /wiki/%E9%A6%96%E9%A1%B5 HTTP/1.1 Host: mediawiki.gqqnbig.me Connection: keep-alive Cache-Control: max-age=0 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.122 Safari/539.36 Accept-Encoding: gzip, deflate, sdch Accept-Language: zh-CN,zh;q=0.8,en-US;q=0.6,en;q=0.4 Cookie: ... HTTP/1.1 301 Moved Permanently Cache-Control: private, must-revalidate, max-age=0 Content-Type: text/html; charset=UTF-8 Expires: Thu, 01 Jan 1970 00:00:00 GMT Last-Modified: Tue, 30 Dec 2014 20:04:15 GMT Location: http://mediawiki.gqqnbig.me/wiki/%E9%A6%96%E9%A1%B5 Vary: Accept-Encoding, Cookie Server: Microsoft-IIS/7.0 X-Powered-By: PHP/5.4.24 X-Content-Type-Options: nosniff X-Powered-By: ASP.NET Date: Tue, 30 Dec 2014 20:04:15 GMT Content-Length: 174
How should I fix the error and keep using "pretty" url? Renamed user 63506961370 (talk) 19:45, 30 December 2014 (UTC)
- It looks like you've fixed the problem. Any hint what changes you made? ☠MarkAHershberger☢(talk)☣ 03:44, 31 December 2014 (UTC)
- From where did you see I've fixed the problem? I would remove the sentence now.
- I didn't fix it at all. I'm still in trouble! Gqqnb (talk) 01:36, 2 January 2015 (UTC)
- When I visit http://mediawiki.gqqnbig.me/wiki/首页 the site comes up fine.
- I see that the request
GET /wiki/%E9%A6%96%E9%A1%B5 HTTP/1.1
Host: mediawiki.gqqnbig.me
Connection: keep-alive
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.71 Safari/537.36
Accept-Encoding: gzip, deflate, sdch
Accept-Language: en-US,en;q=0.8
- and the response:
HTTP/1.1 200 OK
Cache-Control: private, must-revalidate, max-age=0
Content-Type: text/html; charset=UTF-8
Content-Language: zh-cn
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Last-Modified: Fri, 02 Jan 2015 21:52:49 GMT
Vary: Accept-Encoding, Cookie
Server: Microsoft-IIS/7.0
X-Powered-By: PHP/5.4.24
X-Content-Type-Options: nosniff
X-Powered-By: ASP.NET
Date: Sat, 03 Jan 2015 00:54:37 GMT
Content-Length: 13431
☠MarkAHershberger☢(talk)☣ 00:57, 3 January 2015 (UTC)- Maybe if you clear your cookies it would work? ☠MarkAHershberger☢(talk)☣ 00:59, 3 January 2015 (UTC)
- Ok... Today I can't wait and started to debug the program by myself.
- I configured another brand new virtual machine and the problem persists. It appears that the problem occurs on a considerable amount of Windows+IIS environments, if not every.
- I spent one morning and changed some code so my site works again, but it is really specific to my environment and I don't know whether it will cause other problems or not.
- I prefer not to publish my modification as it's too dirty and too specific.
- I believe in such a big community, some experts must have met this problem, and I need their advice. Gqqnb (talk) 07:21, 3 January 2015 (UTC)
- Have you tried other browsers or other machines? It may be something on your local machine because I'm not able to reproduce your problem. ☠MarkAHershberger☢(talk)☣ 19:05, 3 January 2015 (UTC)
- Now I understand it. You need to reproduce the problem.
- But unfortunately I can't let the problem be there. It slows down my server.
- Thanks for you suggestion. When I have time I will ask other people to see if they can reproduce the problem, but now the site is off to save resources. Gqqnb (talk) 21:33, 9 January 2015 (UTC)
- Have you tried other browsers or other machines? It may be something on your local machine because I'm not able to reproduce your problem. ☠MarkAHershberger☢(talk)☣ 19:05, 3 January 2015 (UTC)
- Maybe if you clear your cookies it would work? ☠MarkAHershberger☢(talk)☣ 00:59, 3 January 2015 (UTC)
Too much traffic
I started a Wiki: http://solidarity.coop/wiki
For weeks it had hardly very few visits, then since two weeks ago the traffic has increased sharply. If it continues at this pace I can't afford the hosting costs.
Traffic stats: http://i.imgur.com/pHoCge9.png
I don't think the traffic is organic, there's very little content on the wiki, but I did notice lot's of spammers. I've clicked 'protect' so they can't change pages anymore, but it seems they are still visiting.
Any idea's? Sirjazzfeet (talk) 00:51, 31 December 2014 (UTC)
- Your wiki is overrun with spam. Your RecentChanges page shows a lot of activity.
- I'm not sure how this would affect your hosting costs, but I don't really deal with that sort of hosting.
- You may want to look at using a place like Orain for your hosting. ☠MarkAHershberger☢(talk)☣ 03:39, 31 December 2014 (UTC)
- Thanks, but I would prefer to work on reducing the spam. Sirjazzfeet (talk) 22:40, 31 December 2014 (UTC)
- https://www.mediawiki.org/wiki/Manual:Combating_spam AKlapper (WMF) (talk) 12:56, 2 January 2015 (UTC)
- Thanks, but I would prefer to work on reducing the spam. Sirjazzfeet (talk) 22:40, 31 December 2014 (UTC)
- Your wiki is fu**ed: http://solidarity.coop/w/index.php?title=Special:RecentChanges&limit=500
- Better start all over again. You should have disabled editing and registering days ago. Subfader (talk) 23:35, 4 January 2015 (UTC)
- Yes it's $2,000+ in excess traffic.
- So when I re-install, do I need to sacrifice user freedom by using..
- ( Prevent new user registrations except by sysops )
- $wgGroupPermissions['*']['createaccount'] = false;
- and / or
- ( Requires that a user be a member of the administrators (sysop) usergroup )
- $wgGroupPermissions['*']['edit'] = false;
- $wgGroupPermissions['user']['edit'] = false;
- $wgGroupPermissions['sysop']['edit'] = true;
- ? Sirjazzfeet (talk) 01:23, 5 January 2015 (UTC)
- Huh? Get a serious hoster first. Subfader (talk) 02:25, 5 January 2015 (UTC)
- You don't have to sacrifice user freedom, although if you are prepared to do that, you problem will most likely be solved once and for all. There's normally no need to restrict editing to sysops - if account creation is locked down then
$wgGroupPermissions['*']['edit'] = false; $wgGroupPermissions['user']['edit'] = true;
is normally enough. - If you want to keep a more open wiki, you should at least install SimpleAntiSpam, which apparently blocks the dumb varieties of spambots; and a captcha extension, which if set up properly, will require the solution of a captcha before you can create an account or add external links to pages.
- Read the Manual:Combating spam page in full before reopening your wiki.
- If I were you I would also check out Google Webmaster Tools. That spam can't have done any good for your Google ranking. This, that and the other (talk) 05:28, 5 January 2015 (UTC)
- SimpleAntiSpam isn't needed anymore since MediaWiki 1.22 :) But a CAPTCHA at least for registering is a first step, and other nice tools, but it's all explained on the manual This, that and the other linked :) Florianschmidtwelzow (talk) 01:52, 10 January 2015 (UTC)