Project:Support desk/Flow/2014/06
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. |
how to list all categories subcategories and pages within by a multi column layout.
hi guys, newbie here,
just installed mediawiki, it is so powerful, enough cause me lost. :(
USING: MW 1.22.7 MYSQL
what i am trying to do is list all the categories and subcategories and pages within that category/subcategories in main page, installed DynamicPageLis(MW) and CategoryTree extensions already.
and i put the current code in my main page:
<categorytree>CATEGORY NAME</categorytree>
and this one:
<table> <tr><th colspan="3"> recent articles in [[:category:Category Name]]</th></tr> <tr><td>
just for test purpose.
CategoryTree is a nice one, But the output of it is in a single column, which can get very long if there is a lot of subcategories and pages. Is it possible to format the output so the list is in multiple columns? just like what mediawiki did in the following page:
https://www.mediawiki.org/wiki/Category:Extensions_by_category
thanks in advance! Dcondense (talk) 00:24, 2 June 2014 (UTC)
- Use CSS columns:
<nowiki><categorytree style="column-count:3;-moz-column-count:3;-webkit-column-count:3">Extensions by category</categorytree></nowiki>
shows:
find category of current page
How would I find the category of a current page? Or check if a page is in a certain category? LTech (talk) 08:26, 2 June 2014 (UTC)
- You mean as user on page itself or with a script/extension? For first: Simply look at the bottom of page, which categories listed in "categories" area. If the area isn't there, not categories set to this page :) You can see the categories in edit view, too. Simply search for term "[[Category" (in your language).
- If you want to do that via code/script/extension, you can use getParentCategories() of your Title-Instance (https://doc.wikimedia.org/mediawiki-core/master/php/html/classTitle.html#ad44b1db65e5e1ccafa71512f0014d43d) or better use getCategories() of your WikiPage Instance (https://doc.wikimedia.org/mediawiki-core/master/php/html/classWikiPage.html#a7acdb0a992e0ff6c8c7053a5d6f83cc0). Florianschmidtwelzow (talk) 09:01, 2 June 2014 (UTC)
- getCategories() seems to be what I'm looking for but I'm not sure how to use it.
- I would like to code it in my skin, to find the categories the current page is in, and then if it has certain categories run a specific code.
- I've tried $get_cat = WikiPage::getCategories();
- but it gives the error Fatal error: Call to undefined method WikiPage::getCategories() LTech (talk) 09:30, 2 June 2014 (UTC)
- You can also use the API.
- Categories of the current page: API:Categories
- Members (pages) of a given category: API:Categorymembers Ciencia Al Poder (talk) 09:24, 2 June 2014 (UTC)
- But why use api, when he is in the wanted wiki installation :P
- @LTech: You can not call a non static function statically ;) You must create a new instance of WikiPage (or use an existing, i'm unsure, if skin has a instance of WikiPage), for example (untestes):
- $page = new WikiPage( $title );
- Before do that, you must have an Object of Title-Class:
- &title = Title::newFromText( $wgRequest->getVal( 'title' ) );
- After this you can get the Categories from your new WikiPage Object:
- $categories = $article->getCategories();
- In this constellation it's maybe easier (if you don't want to use other functions from WikiPage) to get the categories directly from the Title Object using getparentCategories():
- $categories = $title->getParentCategories();
- The last will return an array with category=>article_title. Florianschmidtwelzow (talk) 19:02, 2 June 2014 (UTC)
[RESOLVED] How to create an "info bubble" which popup when I am over one word in my page
I have install the mediawiki extension "infobox"
but I don't know how to popup the info bubble when i am above a word in my page :
I think to use template Template:Overword including the text to set in the info bubble
a help will be appreciated
Thanks 78.206.72.23 (talk) 10:49, 2 June 2014 (UTC)
- What extension you installed? I don't know an extension infobox :) Florianschmidtwelzow (talk) 11:57, 2 June 2014 (UTC)
- soory my extension is InputBox but it is not convenient for my aim because it creates "button"
- In fact i research something as the "alt" on a picture
- or as the help when I am on the tab of the sidebar page,discussion,update..... 78.206.72.23 12:16, 2 June 2014 (UTC)
- You can achieve this by using the
title
attribute of any HTML element: - Example: text
- Code:
- Ciencia Al Poder (talk) 09:36, 3 June 2014 (UTC)
<span title="bubble">text</span>
- many thanks 78.206.72.23 09:59, 3 June 2014 (UTC)
- You can achieve this by using the
[RESOLVED] Changes affecting InstantCommons function?
Has anything changed in the way Commons feeds to an outside Wiki? All the pictures disappeared from our wiki on Saturday 31 May 2014, with no change in programming (and the host denies changing or limiting anything). All the pictures other than the site's logo are from Commons (and we encourage our users to develop that resource).
It's been so long I can't remember which MediaWiki version we use. Hogweard (talk) 11:02, 2 June 2014 (UTC)
- You use MediaWiki 1.15.4 (http://wikishire.co.uk/wiki/Special:Version), i would say: Update soon ;)
- InstantCommons works like before (if i'm right, tested with MW 1.24wmf2). Be sure, that you set $wgUseInstantCommons to true. Florianschmidtwelzow (talk) 11:55, 2 June 2014 (UTC)
- And after upgrading please run the update.php ether in the web updater or in ssh please. By going to here http://wikishire.co.uk/mw-config for the web updater. 5.66.153.135 15:18, 2 June 2014 (UTC)
- And you can uninstall the stringfunction extension because some of it was merged into ParserFunctions extension
- And to enable the integrated string function in parser function just add this to LocalSettings.php
- $wgPFEnableStringFunctions = true; 5.66.153.135 15:20, 2 June 2014 (UTC)
- http://wikishire.co.uk/w/mw-config/ 86.135.251.100 22:02, 2 June 2014 (UTC)
- And please also add
- $wgUpgradeKey = 'set-me-to-some-random-string';
- This to LocalSettings.php but please do change upgrade key to something else that no one else knows. 86.135.251.100 22:03, 2 June 2014 (UTC)
- Although it is kind of off-topic: A complete Upgrade guide is already available. 88.130.108.126 22:27, 2 June 2014 (UTC)
- It worked! The functionality is greatly improved too, and the extensions slip in without a hitch. Thanks. Hogweard (talk) 13:31, 30 July 2014 (UTC)
- It worked! The functionality is greatly improved too, and the extensions slip in without a hitch. Thanks. Hogweard (talk) 13:32, 30 July 2014 (UTC)
- Hi you know you can upgrade to mediawiki 1.23 which is an lts release. 86.173.54.174 17:20, 30 July 2014 (UTC)
- Although it is kind of off-topic: A complete Upgrade guide is already available. 88.130.108.126 22:27, 2 June 2014 (UTC)
- http://wikishire.co.uk/w/mw-config/ 86.135.251.100 22:02, 2 June 2014 (UTC)
- And after upgrading please run the update.php ether in the web updater or in ssh please. By going to here http://wikishire.co.uk/mw-config for the web updater. 5.66.153.135 15:18, 2 June 2014 (UTC)
Use JavaScript modules from other sites
I am searching for a way to dynamically require some useful MediaWiki modules from an external project, specifically toollabs:dewkin. The parts most concerned with my purpose are mediawiki.api, mediawiki.jqueryMsg and mediawiki.language (for PLURAL parsing). Is there a simple way to load them with all dependencies (via https://bits.wikimedia.org/www.mediawiki.org/load.php) and actually use them without having to load the entire "mediawiki" module? Or is it worth reimplementing the whole stuff? Ricordisamoa 16:05, 2 June 2014 (UTC)
- This is unofficial, but I'd recommend trying it like this:
- Krinkle (talk) 15:55, 3 June 2014 (UTC)
<head> <meta charset="utf-8"> <title>Example</title> <link rel=stylesheet href="myapp.css"> <script src="//bits.wikimedia.org/www.mediawiki.org/load.php?lang=en&modules=startup&only=scripts"></script> </head> <body> <div class="mw-body-content"> .. </div> ... <script src="myapp.js"> // Skip unsupported browsers or in case of an error if (!window.mw) { return; } // Load these modules first, as needed by "MYAPP.init()". mw.loader.using(['mediawiki.api', 'mediawiki.jqueryMsg'], MYAPP.init); </script> </body>
Extensions
Hello,
I was wondering if the most current version of Mediawiki is required in order to correctly install new extensions?
This is my Mediawiki page info: MediaWiki 1.21.2 PHP 5.4.20 (apache2handler) MySQL 5.5.32 Tuesmorning (talk) 17:16, 2 June 2014 (UTC)
- Hi!
- It depends on the extension: For example Extension:CategoryTree has in its Git repository several branches for the different versions. Just pick code, that is for your branch and you should be fine. That is how it works for most extensions. 88.130.108.126 17:33, 2 June 2014 (UTC)
- Great thanks! Tuesmorning (talk) 17:43, 2 June 2014 (UTC)
- But often new features and updates will only provided for the new or a part of the newest barnches, so it's good, if you think about to update your MediaWiki installation from stable version to stable version constantly :) Florianschmidtwelzow (talk) 19:07, 2 June 2014 (UTC)
help to restore an abandoned wiki
Some years ago i set up a wiki, here www.wiki.mjj.it it's so many years i didn't "work" on that wiki, the project was "de facto" abandoned now i want to begin to work again on that wiki... but i don't know why is not working anymore... and I don't know why The main page is completely blank... and now? What i can do? I really don't remember so much on wikimedia admin I have password (and so access) of the ftp site I can also check and have access to the db
But i really can't restore the wiki someone can help? Mjfan80 (talk) 18:26, 2 June 2014 (UTC)
- Hey! If i open http://www.wiki.mjj.it i become a completly white page without source code :) Can you check, if all mediawiki files uploaded and the vhost/sudomain locate to the right directory where the mediawiki installation can be found? Florianschmidtwelzow (talk) 19:10, 2 June 2014 (UTC)
- That's the problem... i don't know why nothing is show.
- In the ftp directory i see many files, also the index.php Mjfan80 (talk) 22:32, 6 June 2014 (UTC)
- Try reinstalling it. And if you have a really old version of Mediawiki please download a newer version and recreate the LocalSettings.php please. 2.124.129.220 23:31, 6 June 2014 (UTC)
- If you reinstall/upgrade, please read this first:
- https://www.mediawiki.org/wiki/Manual:Upgrading#Basic_overview Florianschmidtwelzow (talk) 00:23, 7 June 2014 (UTC)
- I make a full backup...
- then download the latest mediawiki version
- and via ftp transferred the files (ovrewriting the olds ones)
- now i get this here: http://wiki.mjj.it/config/index.php
- Fatal error: Class 'SiteConfiguration' not found in /home2/mjjit/public_html/wiki/includes/DefaultSettings.php on line 60
- but maybe this is an old directory files (old version of mediawiki)
- searching the install script for the new version of mediawiki, i found that i have to go there
- http://wiki.mjj.it/mw-config/index.php
- but here i see nothing
- why? Mjfan80 (talk) 22:52, 10 June 2014 (UTC)
- Do you really have overwritten all files? Can you try it again? Maybe you can try to delete all files (make sure you really have a backup ;)) and copy all MediaWiki 1.23 files to the location of old MW and run the update script (copy the LocalSettings.php from old MW to new MW installation). Be sure: If there was some extensions installed, please comment out the lines in LocalSettings.php (require_once). Florianschmidtwelzow (talk) 08:00, 11 June 2014 (UTC)
- I've deleted all the old file
- put all the new file in the directory
- and now here www.wiki.mjj.it i see the correct version number... but a blank page is shown here
- http://wiki.mjj.it/mw-config/index.php Mjfan80 (talk) 20:22, 12 June 2014 (UTC)
- Then is something other wrong. Can you check, if maybe all error messages are invisble, e.g. by error_reporting in php.ini? Florianschmidtwelzow (talk) 20:35, 12 June 2014 (UTC)
- Hi your need to set up your wiki again and the setup will recreate the LocalSettings.php once that is done just install all your extensions again please visit this http://wiki.mjj.it the other one is wrong. 86.135.251.100 21:46, 12 June 2014 (UTC)
- The hint by 86.135 will most likely cause more problems than it can solve. I would not do that.
- Instead, you should follow Florian's advice to activate error logging so that you see the error, which is happening there. See blank page for more information! 88.130.87.84 22:36, 12 June 2014 (UTC)
- but i already deleted all the old files... so i don't have a new localsetting file
- I restored the old localsetting file, and put the lines you told me...
- that's is what i get
- http://wiki.mjj.it/
- Warning: require_once(/home2/mjjit/public_html/wiki/extensions/inputbox/inputbox.php) [function.require-once]: failed to open stream: No such file or directory in /home2/mjjit/public_html/wiki/LocalSettings.php on line 139
- Fatal error: require_once() [function.require]: Failed opening required '/home2/mjjit/public_html/wiki/extensions/inputbox/inputbox.php' (include_path='/home2/mjjit/public_html/wiki:/home2/mjjit/public_html/wiki/includes:/home2/mjjit/public_html/wiki/languages:.:/usr/lib/php:/usr/local/lib/php') in /home2/mjjit/public_html/wiki/LocalSettings.php on line 139 Mjfan80 (talk) 09:58, 15 June 2014 (UTC)
- > require_once(/home2/mjjit/public_html/wiki/extensions/inputbox/inputbox.php) [function.require-once]: failed to open stream: No such file or directory in
- That means that the inputbox extension is currently missing. Either remove it from LocalSettings.php or put the missing extensions (like the inputbox extension) back into the extensions/ folder. 88.130.66.164 11:29, 15 June 2014 (UTC)
- restored all the extension
- got some error... tryng to understand it and resolved them
- then mw-config/index.php,
- and now is working... with some error, but is working
- www.wiki.mjj.it
- Thanks to everyone.
- now i will try to figure it out how to remove all the remaining errors Mjfan80 (talk) 21:04, 16 June 2014 (UTC)
- Hi your need to set up your wiki again and the setup will recreate the LocalSettings.php once that is done just install all your extensions again please visit this http://wiki.mjj.it the other one is wrong. 86.135.251.100 21:46, 12 June 2014 (UTC)
- Then is something other wrong. Can you check, if maybe all error messages are invisble, e.g. by error_reporting in php.ini? Florianschmidtwelzow (talk) 20:35, 12 June 2014 (UTC)
- Do you really have overwritten all files? Can you try it again? Maybe you can try to delete all files (make sure you really have a backup ;)) and copy all MediaWiki 1.23 files to the location of old MW and run the update script (copy the LocalSettings.php from old MW to new MW installation). Be sure: If there was some extensions installed, please comment out the lines in LocalSettings.php (require_once). Florianschmidtwelzow (talk) 08:00, 11 June 2014 (UTC)
- Try reinstalling it. And if you have a really old version of Mediawiki please download a newer version and recreate the LocalSettings.php please. 2.124.129.220 23:31, 6 June 2014 (UTC)
How to prevent users from creating accounts with specific words in the username?
How would you prevent users from creating accounts with specific words in the user name?
Eg: swear words, roles, sysop, and so on. JaxFLGuy (talk) 23:33, 2 June 2014 (UTC)
- Hi!
- Extension:TitleBlacklist and Extension:AntiSpoof were made for this use case: The first one can be used to forbid the creation of accounts, which match certain patterns, while the second one prevents people from choosing confusable usernames. They are both stable and in use on a variety of MediaWiki wikis. 88.130.108.126 01:20, 3 June 2014 (UTC)
Special Pages
I have update my wiki to the last stable version, but when i want go to my special pages it shows me that the special pages can not load or do not exist....
Any clue?
Regards.. Enrique.umana (talk) 13:12, 3 June 2014 (UTC)
- Hello! How do you want to open the Special Pages, e.g.:
- example.com/Special:Version
- example.com/index.php/Special:Version
- example.com/index.php?title=Special:Version
- The second is the standard after the new installation of mediawiki, the third must work everytime (if the wiki is correctly installed). Maybe you use the false language (Spezial: instead of Special: e.g.)? Florianschmidtwelzow (talk) 13:44, 3 June 2014 (UTC)
- Hi i just reinstall the wiki and still not working...
- The language is correct...
- Thanks for your help.. Enrique.umana (talk) 20:08, 3 June 2014 (UTC)
- Hi!
- I understand that even the - from MediaWiki's point of view - "simple" call index.php?title=Special:Version does not work.
- What exactly happens when you call that page with that URL in your wiki? What do you get on screen? Error 404? blank page? A browser message telling you the page won't load? Something else? 88.130.77.186 21:58, 3 June 2014 (UTC)
22:49, 3 June 2014 (UTC)
- Hi, all the other links are working.. But the page of the users (Special:specialpages) is not working..
- 404 error...
- Regards! Enrique.umana (talk) 22:01, 4 June 2014 (UTC)
- Usually, when MediaWiki handles a request, MediaWiki also is the software, which gives out 404 error pages. However, this should not happen in case of this special page.
- Please try this URL in your wiki:
example.com/index.php?title=Special:SpecialPages
- Does this exact URL also end up in an error 404 or can you with this URL see the special page? 88.130.111.6 22:33, 4 June 2014 (UTC)
- Hi i have install the mediawiki-1.23.0 version in another server, i have create a new database.. but when i try to open my index.php?title=Special:SpecialPages does not load..
- Regards! Enrique.umana (talk) 20:43, 5 June 2014 (UTC)
- You aready wrote that it "does not load" in your very first post - however, this is not enough information. Have a look at the Apache error log - maybe you find a related error there. Maybe you also have some interfering RewriteRules. If you don't tell more, it will be hard to help. 88.130.122.130 00:09, 6 June 2014 (UTC)
- I get a blank page. I installed media wiki with apt-get on ubuntu .... 90.219.86.218 23:53, 25 June 2015 (UTC)
- You aready wrote that it "does not load" in your very first post - however, this is not enough information. Have a look at the Apache error log - maybe you find a related error there. Maybe you also have some interfering RewriteRules. If you don't tell more, it will be hard to help. 88.130.122.130 00:09, 6 June 2014 (UTC)
Gerrit error
Hi a few months ago an error started on gerrit where if you were on a mobile operating system this link would http://gerrit.wikimedia.org/r/#/q/8f4ee751,n,z not work. I doint know if it works on the desktop. But it doesent work on iOS. On the iPad and iPhone. Please fix it. 90.198.237.65 (talk) 15:50, 5 June 2014 (UTC)
- Works fine on Android :) What error message comes? Can you try another browser? Florianschmidtwelzow (talk) 19:40, 5 June 2014 (UTC)
- Also works in Firefox on Windows. 88.130.122.130 00:12, 6 June 2014 (UTC)
- no when I click on a link that goes to gerrit on mediawiki it goes straight to the open tag and not to the commit id I want it to go to. 2.124.129.220 16:42, 6 June 2014 (UTC)
- What do you mean with "it goes to the open tag"? When I click a link, I am redirected to the correct page in Gerrit. No problems. 88.130.77.185 22:08, 6 June 2014 (UTC)
- no when I click on a link that goes to gerrit on mediawiki it goes straight to the open tag and not to the commit id I want it to go to. 2.124.129.220 16:42, 6 June 2014 (UTC)
- Also works in Firefox on Windows. 88.130.122.130 00:12, 6 June 2014 (UTC)
[RESOLVED] centralauth error
hi I get this error in centralauth
Warning: array_map() [function.array-map]: An error occurred while invoking the map callback in /home/paladox/public_html/en/extensions/CentralAuth/specials/SpecialMergeAccount.php on line 443
I am running mediawiki 1.24 wmf 8 and the website it http://en.random-wikisaur.tk 90.198.237.65 (talk) 17:27, 5 June 2014 (UTC)
- fixed. 90.198.237.65 17:53, 5 June 2014 (UTC)
- Fixed how? AKlapper (WMF) (talk) 09:00, 9 June 2014 (UTC)
- I had an old database isetting n centralauth causing it to not work. 5.66.148.109 15:14, 9 June 2014 (UTC)
- Fixed how? AKlapper (WMF) (talk) 09:00, 9 June 2014 (UTC)
add text to footer
How do I add text to the bottom of page? such as how mediawiki has it on the bottom "Text is available under the Creative Commons Attribution-ShareAlike License; additional terms may apply. See Terms of Use for details." Running MediaWiki 1.20.2
Thanks Meinmein~mediawikiwiki (talk) 21:38, 5 June 2014 (UTC)
- Hi!
- You can provide a link to the licence page with the variable $wgRightsPage in LocalSettings.php. See Manual:$wgRightsPage. That page also has links to $wgRightsText and $wgRightsIcon, which you might be interested in as well! 88.130.122.130 00:20, 6 June 2014 (UTC)
- Thank you, I was able to find the code.
- Is there a way to put my own text and without "Text is available under the"? 50.136.198.209 04:12, 6 June 2014 (UTC)
- Not without an extension (do not hack the core files itself: https://www.mediawiki.org/wiki/Do_not_hack_MediaWiki_core). You can use Hooks to add elements to a specific point of the site, e.g. SkinAfterContent: https://www.mediawiki.org/wiki/Manual:Hooks/SkinAfterContent
- You can customize the Copyrigth text with this hook:
- https://www.mediawiki.org/wiki/Manual:Hooks/SkinCopyrightFooter Florianschmidtwelzow (talk) 05:47, 6 June 2014 (UTC)
Templates
I'm working straight in Mediawiki.
I'm having trouble with templates. Is there a way to work from a template without editing the template itself. For example, if I create "template:how-tos" and then create a new page and base it off of that template, why is that whenever I edit something in the new page it changes the actual template, as well? 65.112.244.2 (talk) 21:46, 5 June 2014 (UTC)
Templates
I'm working straight in Mediawiki.
I'm having trouble with templates. Is there a way to work from a template without editing the template itself. For example, if I create "template:how-tos" and then create a new page and base it off of that template, why is that whenever I edit something in the new page it changes the actual template, as well? 65.112.244.2 (talk) 21:46, 5 June 2014 (UTC)
- Hello! A good introduction in templates you can find here:
- https://www.mediawiki.org/wiki/Help:Templates
- And here:
- https://en.wikipedia.org/wiki/Help:Templates
- Otherwise i don't know, what you want to do exactly :) Florianschmidtwelzow (talk) 05:21, 6 June 2014 (UTC)
Format test
This post by Revibot was moved on 2015-07-11. You can find it at LiquidThreads Test Page#h-my_test-2014-06-06T03:39:00.000Z. Ciencia Al Poder (talk) 09:20, 6 June 2014 (UTC)
[RESOLVED] Upgrade 1.22.7 to 1.23.0 --- problem with shared database
hello,
i've problem with "If you use a Shared database, you should pass the --doshared parameter if you want the shared tables to be updated. Otherwise they won't be touched by the update script."
i typed "php --doshared maintenance/update.php" and putty told me that isn't a correct parameter.
how can i run the update.php to change my two shared tables "global_users" and "global_users_properties" too?
best regards
178.25.81.217 (talk) 14:03, 6 June 2014 (UTC)
- Hi!
- I have not tested it, but I think that just the order of arguments is wrong. Provide the arguments behind the script name. Does it work when you try as follows?
php maintenance/update.php --doshared
88.130.77.185 14:32, 6 June 2014 (UTC)- What the script says is right :) the parameter you give is "--doshared" which isn't a correct parameter for command "php". You want to give an argument to the script you want to run, so type first the command, then the parameters (in your case no parameters), then the file and after the script file the arguments. Correct call is:
- php maintenance/update.php --doshared Florianschmidtwelzow (talk) 15:18, 6 June 2014 (UTC)
- thx 88.130.77.185 & dank an florian!
- it works.
- best regards s.net 17:02, 6 June 2014 (UTC)
- Das ist ja super! ;-) 88.130.77.185 22:07, 6 June 2014 (UTC)
New skin not working..?
Scenario:
- Downloaded DeepSea
- Extracted all files to the /skins directory of my installation
- "DeepSea" appears as option in user Preferences
- However, when selecting/previewing DeepSea, vector appears instead.
- In addition, the skin's credits do not appear in my Special:Version either.
Any reason why such a thing would happen? It appears in User prefences, however it fails to work and does not appear in Special:Version. 24.119.228.221 (talk) 05:23, 7 June 2014 (UTC)
- Hi!
- In the central skin file DeepSea.php you have the variables, which this skin is setting also containing the "extension credits". This code makes it look like you have to require_once() DeepSea.php in LocalSettings.php - just the way you would require an extension.
- If that works, then please update Skin:DeepSea accordingly - so that others will know as well! :-) 88.130.97.146 10:17, 7 June 2014 (UTC)
- That doesn't work - All I get is a plain-text version of every wiki page - No CSS/Stlying data, and there's a random closing bracket (>) at the top of every page. 24.119.228.221 18:31, 7 June 2014 (UTC)
- Create a new Directory in skins/ and name it: DeepSea
- In LocalSettings insert new line:
- require_once( "$IP/skins/DeepSea/DeepSea.php" );
- Have Fun ;) Florianschmidtwelzow (talk) 21:28, 7 June 2014 (UTC)
- That doesn't work - All I get is a plain-text version of every wiki page - No CSS/Stlying data, and there's a random closing bracket (>) at the top of every page. 24.119.228.221 18:31, 7 June 2014 (UTC)
Wikia's Oasis Skin
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.
- MediaWiki Version: 1.23.0
- PHP: 5.5.12 (apache2handler)
- MySQL: 5.6.17
- I want to get the Wikia/Oasis skin working on my wiki. I inserted the skin files found inside Wikia's Git, and added all the corresponding "required_once" things into LocalSettings.php (Using Notepad++). Upon loading the wiki, it spits out a whole bunch of errors at me. Is there any way to get Wikia's skin working outside of Wikia or am I just SOL (**** Outta Luck). WilliamLazycat (talk) 06:14, 8 June 2014 (UTC)
- Wikia's Oasis Skin is tied with a lot of extensions and local modifications of Wikia made to core MediaWiki files. You won't get it to work, simply, unless you spend a lot of time trying to cleanup their code Ciencia Al Poder (talk) 11:30, 8 June 2014 (UTC)
- I created a skin that's highly based off of and similar to Fandom's Oasis. See Skin:Cosmos Universal Omega (talk) 02:37, 6 October 2020 (UTC)
wikia needs updating
hi wikia needs updating because it is using a really old version of mediawiki https://github.com/Wikia/app 86.135.251.100 (talk) 13:35, 8 June 2014 (UTC)
- Öhm, if i'm right, here isn't the right place to give support for wikia :) Florianschmidtwelzow (talk) 14:24, 8 June 2014 (UTC)
- hi do you know how to push changes there through ssh. because I doint know how to push the changes there 86.135.251.100 17:19, 8 June 2014 (UTC)
- You mean push to wikia git? Idk, maybe you can find the answer here: http://dev.wikia.com/
- If you mean how to push changes to MediaWiki repositories: You can find all things here: https://www.mediawiki.org/wiki/How_to_contribute
- You need a developer account, so you can commit changes. The commit into git is only available via gerrit, so we can review your change before some new code comes into master branch :) Florianschmidtwelzow (talk) 19:55, 8 June 2014 (UTC)
- hi do you know how to push changes there through ssh. because I doint know how to push the changes there 86.135.251.100 17:19, 8 June 2014 (UTC)
image/file upload broken after upgrade from MW 1.19 to MW 1.23
http://pool.publicdomainproject.org/index.php/Special:Version
MediaWiki 1.23.0-rc.3 PHP 5.4.4-14+deb7u10 (apache2handler) MySQL 5.5.37-0+wheezy1 Lua 5.1.5
Apache is running chrootet and PHP is using APC for caching.
This is the file I used for my trial and errors: http://pool.publicdomainproject.org/index.php/File:OHM2013_logo.png
The Debug Log for an upload says this:
Start request POST /index.php/Special:Upload HTTP HEADERS: HOST: pool.publicdomainproject.org USER-AGENT: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20140205 Firefox/24.0 Iceweasel/24.3.0 ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 ACCEPT-LANGUAGE: en-US,en;q=0.5 ACCEPT-ENCODING: gzip, deflate REFERER: http://pool.publicdomainproject.org/index.php?title=Special:Upload&wpDestFile=OHM2013_logo.png&wpForReUpload=1 COOKIE: publicdomainwiki_poolUserName=Nuess0r; vector-nav-p-Encyclopedia=true; publicdomainwiki_poolUserID=1; publicdomainwiki_poolToken=f668ef2de0090877dcea7d 348da44e06; vector-nav-p-tb=true; publicdomainwiki_pool_session=7c409c43a15f3a920b8fcb79591a740f CONNECTION: keep-alive CONTENT-TYPE: multipart/form-data; boundary=---------------------------17965292055331612921544979489 CONTENT-LENGTH: 37564 [caches] main: APCBagOStuff, message: APCBagOStuff, parser: APCBagOStuff [caches] LocalisationCache: using store LCStoreCDB Unstubbing $wgParser on call of $wgParser::setHook from efYearsOldSetup Parser: using preprocessor: Preprocessor_DOM Fully initialised User: got user 1 from cache User: loading options for user 1 from override cache. User: logged in from session User: loading options for user 1 from override cache. MessageCache::load: Loading de-ch... got from global cache Unstubbing $wgLang on call of $wgLang::_unstub from ParserOptions::__construct User::getBlockedStatus: checking... Connected to database 0 at 127.0.0.1 UploadBase::createFromRequest: class name: UploadFromFile FSFile::getProps: Getting file info for /tmp/phpyzVBrz MimeMagic::__construct: loading mime types from /pool.publicdomainproject.org/includes/mime.types MimeMagic::__construct: loading mime info from /pool.publicdomainproject.org/includes/mime.info MimeMagic::doGuessMimeType: analyzing head and tail of /tmp/phpyzVBrz for magic numbers. MimeMagic::doGuessMimeType: getimagesize detected /tmp/phpyzVBrz as image/png MimeMagic::guessMimeType: guessed mime type of /tmp/phpyzVBrz: image/png MimeMagic::improveTypeFromExtension: improved mime type for .png: image/png FSFile::getProps: /tmp/phpyzVBrz loaded, 36313 bytes, image/png. mime: <image/png> extension: <png> UploadBase::detectScript: checking for embedded scripts and HTML stuff UploadBase::detectScript: no scripts found ZipDirectoryReader: Fatal error: zip file lacks EOCDR signature. It probably isn't a zip file. UploadBase::detectVirus: virus scanner disabled FSFile::getProps: Getting file info for /tmp/phpyzVBrz MimeMagic::doGuessMimeType: analyzing head and tail of /tmp/phpyzVBrz for magic numbers. MimeMagic::doGuessMimeType: getimagesize detected /tmp/phpyzVBrz as image/png MimeMagic::guessMimeType: guessed mime type of /tmp/phpyzVBrz: image/png MimeMagic::improveTypeFromExtension: improved mime type for .png: image/png FSFile::getProps: /tmp/phpyzVBrz loaded, 36313 bytes, image/png. UploadBase::verifyExtension: mime type image/png matches extension png, passing file Title::getRestrictionTypes: applicable restrictions to [[File:OHM2013 logo.png]] are {edit,move,upload} UploadBase::verifyFile: all clear; passing. MessageCache::load: Loading en... got from global cache FileBackendStore::getFileStat: File mwstore://local-backend/local-public/d/d8/OHM2013_logo.png does not exist. [FSFileBackend] chmod(): No such file or directory FileBackendStore::getFileStat: File mwstore://local-backend/local-public/archive/d/d8/20140609004529!OHM2013_logo.png does not exist. DatabaseBase::query: Writes done: INSERT IGNORE INTO `image` (img_name,img_size,img_width,img_height,img_bits,img_media_type,img_major_mime,img_minor_mime,img_timestamp,img_description,img_user,img_user_text,img_metadata,img_sha1) VALUES ('OHM2013_logo.png','36313','359','167','8','BITMAP','image','png','20140609004529','','1','Nuess0r','a:6:{s:10:\"frameCount\";i:0;s:9:\"loopCount\";i:1;s:8:\"duration\";d:0;s:8:\"bitDepth\";i:8;s:9:\"colorType\";s:10:\"truecolour\";s:8:\"metadata\";a:4:{s:11:\"XResolution\";s:8:\"3780/100\";s:11:\"YResolution\";s:8:\"3780/100\";s:14:\"ResolutionUnit\";i:3;s:15:\"_MW_PNG_VERSION\";i:1;}}','kjnzpiz0d9uh643p7x3tn8v3kcxego9') IP: *****[anonymized by myself] User: got user 1 from cache [ContentHandler] Created handler for wikitext: WikitextContentHandler FSFileBackend::getFileListInternal() given directory does not exist: '/pool.publicdomainproject.org/images/thumb/d/d8/OHM2013_logo.png' LocalFile::purgeThumbList: array () [squid] SquidUpdate::purge: /images/d/d8/OHM2013_logo.png Title::getRestrictionTypes: applicable restrictions to [[File:OHM2013 logo.png]] are {edit,move,upload} BacklinkCache::queryLinks: got results from DB BacklinkCache::partition: got from full result cache OutputPage::sendCacheControl: private caching; ** Request ended normally
You can see, the file upload to the temp directory works and MW can analyse it, but after it says "passing" something goes wrong and in the next line, MW can't find the file anymore (that should been moved). On the server the file disapears from the tmp directory but I don't know where it is after the move and why it does not end up in the correct directory.
File upload worked fine in MW 1.19 for years. The problem also occours when I disable ALL extensions in this wiki, upload is then still broken.
--213.196.168.246 23:47, 8 June 2014 (UTC) (nuess0r on the publicdomainproject wiki) 213.196.168.246 (talk) 23:47, 8 June 2014 (UTC)
- Hey :) can you check the permissions for the images/ directory in root of mediawiki installation? Compare with this:
- https://www.mediawiki.org/wiki/Manual_talk:Configuring_file_uploads#Chmod Florianschmidtwelzow (talk) 01:34, 9 June 2014 (UTC)
- Sure you have to ask this question. Yes, I checked the folder permission several times and it's the same as before (it is the same image folder as used for the MW 1.19 installation). I'm using Debian 7.1 Stable. Folder rights currently are: "drwxr-xr-x 23 www-data www-data 4096 Jun 9 00:20 images"
- As you mentioned for the other unlucky guy temporally I gave full wright permission to the group and all others. Nothing changed.
- I also did a "find /var/www/* -cmin -15" to find any changed file directely after I tried to upload an image. As you see from the debug log, the file was in the tmp directory, but the find command doesn't list is anymore, it's was moved to an unknown place. The only "file" changed in the image diretory is the empty "lockdir" (once I tried it to delete and it was recreated by mediawiki, again empty). 213.196.168.246 18:18, 9 June 2014 (UTC)
- So, no we have at least four support questions related to the (same) upload problem when upgrading to MW1.23.
- Can someone with a bugzilla account file a bug report including our four support questions? 84.20.36.138 09:07, 11 June 2014 (UTC)
- Tracked in bug 66467 Florianschmidtwelzow (talk) 10:22, 11 June 2014 (UTC)
Article names only numbers with length of 8 or 13
I want the article names to be valid EAN-8 or EAN-13 codes. Is there a way to permit only article names who match that pattern? 80.129.174.17 (talk) 02:55, 9 June 2014 (UTC)
- Hi!
- You can definitely do that with a hook. You need a hook, which is executed when a page is about to be created.
- Manual:Hooks/PageContentSave is executed on every save (not only on new article creations), but I think it comes at least close to that. In this hook you have the information on the article in $wikiPage. Use this WikiPage object to check the page name and if it fits your pattern (see International_Article_Number_(EAN)#Payload:_GTIN-13_number for the calculation process), then continue processing, otherwise abort it.
- You might want to implement further conditions like "only use these limitations for pages in the main namespace" (so that e.g. user pages can still be created). However, that would still be a problem for all other pages in the main namespace then - maybe you want to put your EAN articles into their own namespace?! Or "also allow minus signs in the pagename" (or maybe you want to automatically remove them if present?) and so on... 88.130.91.32 11:57, 9 June 2014 (UTC)
- Thank you very much. May I ask a little assistance? I've never written php and can't get the hook running. In my understanding I have to write a new Extension with a hook. So I registered my simple and minimal extension in my LocalSettings.php:
require_once( "$IP/extensions/TitleCheck/TitleCheck.php" );
and added the following files to .../extensions/TitleCheck: - == TitleCheck.php: ==
<?php $wgExtensionCredits['parserhook'][] = array( 'path' => __FILE__, 'name' => 'TitleCheck', 'author' => '...', 'url' => '... 'description' => 'Checks if the article page is a valid EAN-8 or EAN-13 code', 'version' => 1.0, 'license-name' => "", ); /* Setup */ // Register files //$wgMessagesDirs['TitleCheck'] = __DIR__ . '/i18n'; $wgExtensionMessagesFiles['TitleCheck'] = __DIR__ . '/TitleCheck.i18n.php'; $wgAutoloadClasses['TitleCheck'] = __DIR__ . '/TitleCheck.body.php'; // Register hooks $wgHooks['PageContentSave'][] = 'TitleCheck::onPageContentSave';
- == TitleCheck.body.php: ==
<?php class TitleCheck { public static function onPageContentSave( $wikiPage, $user, $content, $summary, $isMinor, $isWatch, $section, $flags, $status ) { var_dump($wikiPage); //titleText = $wikiPage->getTitle()->getFulltext(); //var_dump($titleText); } }
- == TitleCheck.i18n.php: ==
- 91.67.3.64 13:35, 10 June 2014 (UTC)
<?php $messages = array(); $messages[ 'en' ] = array( 'titlecheck' => "TitleCheck", // Important! This is the string that appears on Special:SpecialPages 'titlecheck-desc' => "Checks if article name is valid EAN-8 or EAN-13", ); $messages[ 'qqq' ] = array( 'titlecheck' => "The name of the extension's entry in Special:SpecialPages", 'titlecheck-desc' => "{{desc}}", );
- Sorry, I forgot my point:
- When I now edit a page and click save, shouldn't there be some information in the left upper corner that
var_dump($wikiPage);
produces? But there is nothing there... Mario 13:44, 10 June 2014 (UTC)- add a return false; to avoid redirecting to the page ;)
- EDIT: in onPageContentSave Florianschmidtwelzow (talk) 17:25, 10 June 2014 (UTC)
- I added a
return false;
, but still nothing. But I did this the right way? Mario 17:34, 10 June 2014 (UTC)- Refer to extensioncredits:
- 'url' => '...
- you must close the ', so replace with:
- 'url' => '...',
- After this it must work ;) Florianschmidtwelzow (talk) 17:53, 10 June 2014 (UTC)
- Um, I accidentally removed the
',
when replacing my site with...
. This is not the error I'm looking for. :) 91.67.3.64 18:19, 10 June 2014 (UTC)- Then you did something other wrong. returning false in one of the function running in hook PageContentSave must stop/abort the save process with (if no other error message provided) an error in one of the interface ;) Florianschmidtwelzow (talk) 19:53, 10 June 2014 (UTC)
- 91.67 expects to see the debug output and says it is not there. This is strange; maybe inspect the page source code to make sure it is really not there (and not just hidden by some CSS).
- From reading the code, I would expect it to execute as expected... 88.130.110.212 21:05, 10 June 2014 (UTC)
- Okay, just to be sure I inserted a
die()
inside my function: <?php class TitleCheck { public static function onPageContentSave( $wikiPage, $user, $content, $summary, $isMinor, $isWatch, $section, $flags, $status ) { var_dump($wikiPage); die("He's dead, Jim."); return false; } }
- The site just saves normally (when editing and also when creating a new page), so it is save to assume the extension is not loaded? What would be a wise approach to debug this? I'm a bit helpless here... :/ Mario (91.67) 23:23, 10 June 2014 (UTC)
- Yeah, see, you did something wrong :D Have you insatlled the extension in LocalSettings? Florianschmidtwelzow (talk) 07:57, 11 June 2014 (UTC)
- Yes:
require_once( "$IP/extensions/TitleCheck/TitleCheck.php" );
2A02:810B:100:544:8816:AF26:5CBA:55B6 09:55, 11 June 2014 (UTC)- Nobody sees any mistake? Hm... :/
- The single entry in the LocalSettings.php and the three files I created are sufficient, yes? Does someone knows by any chance a minimal example for an extension somewhere that I can adopt and modify? 2A02:810B:100:544:95E9:BCF1:50CE:B4D8 21:01, 11 June 2014 (UTC)
- I added for testing purpose the extension GraphViz which is also using the onPageContentSave hook. When modifying the _body file to misformed php my wiki stops loading so the file is definitely been loaded from the wiki. But when I insert a
return false
or adie()
like this: public static function onPageContentSave( $wikiPage, $user, $content, $summary, $isMinor, $isWatch, $section, $flags, $status ) { die("He's dead, Jim!"); ...
- as first command of the function onPageContentSave the article saving process is not affected at all. Could someone try to enlighten me? :/ 109.84.2.246 (91.67) 15:55, 17 June 2014 (UTC)
- The hook in fact is not called onPageContentSave, but PageContentSave, but in your code you have named it correctly.
- Are you maybe using a MediaWiki version older than 1.21? The hook is just not present then, which would explain the issue... 88.130.70.40 16:53, 17 June 2014 (UTC)
- Awesome... Since I'm using Debian Sid as rolling release I was pretty sure that the version can't be that old... but it is... 1.19 and therewith too old for that hook... Thank you very much.
- Is there any half-descent actual Debian repo I can integrate in my sources.list? I would prefer it that way if one does exist... Mario 20:53, 17 June 2014 (UTC)
- I'm not sure, but i think no :) But you can subscribe the mailing list to get notified, when a new mediawiki version will be released:
- https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce
- If you get an e-mail, simply follow these Manual to upgrade to the newest version:
- https://www.mediawiki.org/wiki/Manual:Upgrade Florianschmidtwelzow (talk) 20:57, 17 June 2014 (UTC)
- I don't found one either, so I just installed the 1.23.0 and my hook instantly worked.
- Just for the sake of completeness for my original question: a simple solution for my problem would be the hook:
$titleText = $wikiPage->getTitle()->getFulltext(); if (preg_match ('/^\d{8}+(\d{5})?$/', $titleText)) { return true; } else { return false; }
- (Btw... what is be the right tag for code snippets?)
- Thanks to all who helped me out with this. Problem solved. Mario 22:32, 17 June 2014 (UTC)
- Nice to hear its working! :-)
- You can use <syntaxhighlight> tags like <syntaxhighlight lang="php">your code</syntaxhighlight>.
- I added for testing purpose the extension GraphViz which is also using the onPageContentSave hook. When modifying the _body file to misformed php my wiki stops loading so the file is definitely been loaded from the wiki. But when I insert a
- Yes:
- Yeah, see, you did something wrong :D Have you insatlled the extension in LocalSettings? Florianschmidtwelzow (talk) 07:57, 11 June 2014 (UTC)
- Okay, just to be sure I inserted a
- Then you did something other wrong. returning false in one of the function running in hook PageContentSave must stop/abort the save process with (if no other error message provided) an error in one of the interface ;) Florianschmidtwelzow (talk) 19:53, 10 June 2014 (UTC)
- Um, I accidentally removed the
- I added a
- Thank you very much. May I ask a little assistance? I've never written php and can't get the hook running. In my understanding I have to write a new Extension with a hook. So I registered my simple and minimal extension in my LocalSettings.php:
Let me just copy in what I wrote in my first response above: You might want to implement further conditions like "only use these limitations for pages in the main namespace" (so that e.g. user pages can still be created). However, that would still be a problem for all other pages in the main namespace then - maybe you want to put your EAN articles into their own namespace?! Or "also allow minus signs in the pagename" (or maybe you want to automatically remove them if present?) and so on... 88.130.100.202 22:37, 17 June 2014 (UTC)
- Yes I know, I will definitely look into the namespaces. Allowing minus signs is not desirable for me because the pages must have this digit only syntax (I'm writing clients for Android/iOS who are requesting the sites for the eans they scan and I want to make sure for each product there is only one page). Mario 22:51, 17 June 2014 (UTC)
- Then maybe you want to remove minus signs, like the people behind IP 88.130.100.202 (;)) said :) Florianschmidtwelzow (talk) 11:22, 18 June 2014 (UTC)
- And if the article 12345678 already exists und someone wants to create the article 1234-5678? Than I have to tell him the article 12345678 already exists and he should expand this. I could erase the minus signs and save the article and then he searches for his new article (with minus) and cannot find it and is confused. Wouldn't it be better if will be just told by creation that no minus signs are allowed and he knows it from there on? But hey - thats a very minor problem and I'll see. If you want to help me some more you could tell me how I can return an error message to the page to tell the user, why his page wasn't saved. I'm trying around with something like
$errorText = wfMessage( 'That was not very clever.' )->text();
but it doesn't seem to be so easy? 2A02:810B:100:544:7497:78BB:24E5:A7E1 12:30, 18 June 2014 (UTC)- If i'm right, you can not return a status except true or false :) But you can add a text to the content. If you want to do that without message keys (like you try in your example, then use OutputPage::addHtml.
- If you want to use wfMessage you must define an localization file in your extension setup and use the messages keys, look here:
- https://www.mediawiki.org/wiki/Manual:Messages_API
- This messages you can add with OutputPage::addHtml. Florianschmidtwelzow (talk) 12:48, 18 June 2014 (UTC)
- But it says after abort: "Edit aborted by hook. It gave no explanation." (or in my case in german: "Die Bearbeitung wurde ohne Erklärung durch eine Schnittstelle abgebrochen.")
- One could suppose that there is a correct way to return a message but I don't use it? In another hooks I saw a pointer &$message assigned to the function where a message like this could be returned... PageContentSave seems not to have such thing... When I var_dump $status it gives me: , is 2A02:810B:100:544:7497:78BB:24E5:A7E1 13:11, 18 June 2014 (UTC)
object(Status)#174 (7) { ["ok"]=> bool(true) ["value"]=> array(0) { } ["successCount"]=> int(0) ["failCount"]=> int(0) ["success"]=> array(0) { } ["errors"]=> array(0) { } ["cleanCallback"]=> bool(false) }
- Sorry, I hit accidentally "save". I created an account now, so I can edit.
- I wanted to write:
- But it says after abort: "Edit aborted by hook. It gave no explanation." (or in my case in german: "Die Bearbeitung wurde ohne Erklärung durch eine Schnittstelle abgebrochen.")
- One could suppose that there is a correct way to return a message but I don't use it? In another hooks I saw a pointer &$message assigned to the function where a message like this could be returned... PageContentSave seems not to have such thing... When I var_dump $status it gives me:
object(Status)#174 (7) { ["ok"]=> bool(true) ["value"]=> array(0) { } ["successCount"]=> int(0) ["failCount"]=> int(0) ["success"]=> array(0) { } ["errors"]=> array(0) { } ["cleanCallback"]=> bool(false) }
, could the "errors" array maybe such a possibility? Mario1981 (talk) 13:15, 18 June 2014 (UTC) - Ah, sorry, my fault, after my short look, it is possible to set an error message using $status->fatal( 'messagekey' ); Florianschmidtwelzow (talk) 13:19, 18 June 2014 (UTC)
- Ah, great. Thank you. :D Mario1981 (talk) 13:42, 18 June 2014 (UTC)
- And if the article 12345678 already exists und someone wants to create the article 1234-5678? Than I have to tell him the article 12345678 already exists and he should expand this. I could erase the minus signs and save the article and then he searches for his new article (with minus) and cannot find it and is confused. Wouldn't it be better if will be just told by creation that no minus signs are allowed and he knows it from there on? But hey - thats a very minor problem and I'll see. If you want to help me some more you could tell me how I can return an error message to the page to tell the user, why his page wasn't saved. I'm trying around with something like
- Then maybe you want to remove minus signs, like the people behind IP 88.130.100.202 (;)) said :) Florianschmidtwelzow (talk) 11:22, 18 June 2014 (UTC)
- Yes I know, I will definitely look into the namespaces. Allowing minus signs is not desirable for me because the pages must have this digit only syntax (I'm writing clients for Android/iOS who are requesting the sites for the eans they scan and I want to make sure for each product there is only one page). Mario 22:51, 17 June 2014 (UTC)
i think $wgDeleteRevisionsLimit is useless
I think $wgDeleteRevisionsLimit is useless. 117.79.232.231 (talk) 07:53, 9 June 2014 (UTC)
- Hä? Why? Florianschmidtwelzow (talk) 10:03, 9 June 2014 (UTC)
- Let me put my thoughts this way:
- ??? 88.130.91.32 11:58, 9 June 2014 (UTC)
Short URLs not working after upgrade from 1.19 to 1.23
I've just upgraded from 1.19 to 1.23 and since that the short URLs only works, if the title contains ASCII characters only. If there are czech national characters in the title, the page is not found, because the national characters are wrongly encoded. I can still open the pages using short URLs, when I enter the short URL directly into the navigation bar. So redirection in my IIS7 seems to work normally. If I disable the short URLs by $wgArticlePath, it works (except for showing images, but this is a different problem).
IIS7 logs:
'''1) short Url disabled''' 2014-06-09 12:09:23 192.168.5.203 GET /w/index.php title=Hlavn%C3%AD_strana 80 UNICONTROLS\kalas 10.10.2.45 Mozilla/5.0+(Windows+NT+6.1)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/35.0.1916.114+Safari/537.36 304 0 0 281 '''2) short Url enabled''' 2014-06-09 10:43:57 192.168.5.203 GET /w/index.php title=HlavnĂ_strana 80 UNICONTROLS\kalas 10.10.2.45 Mozilla/5.0+(Windows+NT+6.1)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/35.0.1916.114+Safari/537.36 404 0 0 140
From the logs it is clear, that if short URL is disabled the title is escaped, but if short URL is enabled, it is not escaped (and probably in wrong encoding). 94.113.242.66 (talk) 12:19, 9 June 2014 (UTC)
- I found something related in the HISTORY file:
* `$wgUsePathInfo = true;` is no longer needed to make $wgArticlePath work on servers
using like nginx, lighttpd, and apache over fastcgi. MediaWiki now always extracts
path info from REQUEST_URI if it's available.
- Which corresponds to this:
_SERVER["REQUEST_URI"] = "/HlavnĂ_strana"
_SERVER["QUERY_STRING"] = "title=Hlavn%C3%AD_strana"
- It seems, that while the article name is correct in _SERVER["QUERY_STRING"] variable, the _SERVER["REQUEST_URI"] contains it invalid encoded. 94.113.242.66 15:43, 9 June 2014 (UTC)
- I'm still not further. What I only see, is that the original URL is processed by mediawiki and for some reason it is redirected to the wrong encoded URL.
- What PHP variable uses mediawiki to parse the title? Is it $_SERVER['REQUEST_URI']? Is WebRequest::getPathInfo related? I found that it uses parse_url(), but this is not UTF8 safe. My IIS/PHP server sets the $_SERVER['REQUEST_URI'] variable with UTF8 encoded URL. It is not escaped. 94.113.242.66 11:42, 10 June 2014 (UTC)
- I found a workaround:
- add following line in LocalSettings.php:
- $_SERVER['REQUEST_URI'] = urlencode($_SERVER['REQUEST_URI']);
- Is there any configuration option in IIS or PHP to force the REQUEST_URI to be URL safe encoded? 94.113.242.66 11:53, 10 June 2014 (UTC)
- I've filed bug 66990 about this, although that change was introduced in 1.20 Ciencia Al Poder (talk) 19:11, 23 June 2014 (UTC)
[RESOLVED] Error uploading files after upgrading from 1.21.1 to 1.23.0 on Windows Server
MediaWiki 1.23.0; PHP 5.3.24 (cgi-fcgi); MySQL 5.5.33 ;
OS windows web server 2008; Upgraded from Mediawiki 1.21.1
I receive the following error trying to upload a pdf file "Could not store file "C:\Windows\Temp\phpC378.tmp" at "mwstore://local-backend/local-public/8/80/TourismAct.pdf". It appears to create the temp file on the server under $ip\images\temp but does not rename and move the file to the directory. If I rename the temp file to pdf the file displays without any issue. So it appears as if the file is being uploaded correctly to the server. 196.214.70.188 (talk) 12:36, 9 June 2014 (UTC)
- Hi!
- This sems to be the same problem as the one, which has been reported on this very page yesterday. Look for the topic called "image/file upload broken after upgrade from MW 1.19 to MW 1.23". 88.130.91.32 12:41, 9 June 2014 (UTC)
- Thanks for pointing that out.
- Could you possibly tell me on a windows server how to do a chmod?
- Hey :) can you check the permissions for the images/ directory in root of mediawiki installation? Compare with this: https://www.mediawiki.org/wiki/Manual_talk:Configuring_file_uploads#Chmod 196.214.70.188 12:47, 9 June 2014 (UTC)
- In Windows i know the way only using a graphical interface :)
- Open the mediawiki root directory -> right click on images -> Click Properties -> Select tab "Security" or "Permissions". The user which is running the webserver must have the right to read, write and edit/alter files and directories :) Florianschmidtwelzow (talk) 13:17, 9 June 2014 (UTC)
- I assume you are talking about the standard "IUSR" this user has permissions to all the directories.
- What I don't understand is that under images temp it creates the file and folders and under the images folder it creates the sub folders but it does not rename and move/copy the file to the appropriate new directory. 196.214.70.188 13:46, 9 June 2014 (UTC)
- Can you try (really only try!) to give Everyone all rights to images folder and try again the upload? Florianschmidtwelzow (talk) 13:54, 9 June 2014 (UTC)
- Giving everyone full permission has still not helped.
- I am wondering about the "c:\windows\temp" if that is the folder on the server I think that could be the problem as I think that folder is reserved for system/admins and you cant browse it but I do stand corrected here. 196.214.70.188 14:26, 9 June 2014 (UTC)
- Success, I need someone else that runs windows server to test individually but I changed the permissions for c:\windows\temp for the IIS_IUSR and added IUSR the later I think was the problem. There is a mention here http://www.mediawiki.org/wiki/Manual:Configuring_file_uploads#Prerequisites . I saw IIS_IUSR was already there I was not initially aware of the IUSR for IIS7 until I saw that mention.
- Thanks all for the input. 196.214.70.188 06:30, 10 June 2014 (UTC)
- "c:\windows\temp" was the culprit I added IUSR and ensured that IIS_IUSR also had permissions. 196.214.70.188 06:34, 10 June 2014 (UTC)
- Confirmed. Fix worked for me also. 216.206.97.98 19:56, 6 February 2015 (UTC)
- Can you try (really only try!) to give Everyone all rights to images folder and try again the upload? Florianschmidtwelzow (talk) 13:54, 9 June 2014 (UTC)
Upload system differences between 1.22.7 and 1.23.0
I am able to upload images on mw 1.22.7 but not on mw 1.23.0
The error on MW: Could not store file "/tmp/phppTiSPZ" at "mwstore://local-backend/local-public/8/85/16.jpg".
And PHP warnings: Warning: popen() has been disabled for security reasons in /web/htdocs/xxxxxx/mediawiki23/includes/filebackend/FSFileBackend.php on line 702
Warning: stream_get_contents() expects parameter 1 to be resource, null given in /web/htdocs/xxxxxx/mediawiki23/includes/filebackend/FSFileBackend.php on line 709
Warning: fclose() expects parameter 1 to be resource, null given in /web/htdocs/xxxxxx/mediawiki23/includes/filebackend/FSFileBackend.php on line 710
Warning: cp '/tmp/phppTiSPZ' '/web/htdocs/xxxxxx/mediawiki23/images/8/85/16.jpg'
in /web/htdocs/xxxxxx/mediawiki23/includes/filebackend/FSFileBackend.php on line 282
My version page says: MediaWiki 1.23.0 PHP 5.3.28 (cgi-fcgi) MySQL 5.5.37-35.1-log 151.46.131.103 (talk) 15:17, 9 June 2014 (UTC)
- Please remove the popen function from the disable_function string in php.ini (most likely in /etc/php5/apache2/php.ini
- Save the file and restart your webserver. Try again. Florianschmidtwelzow (talk) 15:33, 9 June 2014 (UTC)
- using the includes\filebackend folder from mw 1.22.7 on mw 1.23.0 upload is working. Why?
- I am on a shared server, I will ask about this php.ini edit. Raid (talk) 15:43, 9 June 2014 (UTC)
- My hoster said that I cannot activate popen function for security reason (aruba.it hoster)
- EDIT: I see POPEN function even on mw 1.22.7, so why is it working on 22.7 but 23.0? Raid (talk) 17:20, 9 June 2014 (UTC)
- Tracked in bug 66467 Florianschmidtwelzow (talk) 10:22, 11 June 2014 (UTC)
[RESOLVED] remove '& lt;' and '& gt;' from extension name
I have created a new extension called AddAds. The name of the extension is showing as '<' addads '>' meaning with the &, l, t not < on the special page for that extension. How do I remove the < and >?
I can't figure out where it is coming from.
My /AddAds.php file has 'name' => 'Add Ads',
and the AddAds.body.php file has:
class SpecialAddAds extends SpecialPage { function __construct() { parent::__construct( 'AddAds', 'AddAds' ); }
LTech (talk) 17:59, 9 June 2014 (UTC)
- Hi!
- Looks like an unreplaced language label. When you use a language label (like in your case "addads"), then you also have to define it in your language files so that MediaWiki can substitute the label with the according text. Localisation might have more info on that. 88.130.91.32 18:18, 9 June 2014 (UTC)
- I'm not sure exactly what you mean.
- I have a file $wgExtensionMessagesFiles['AddAds'] = $dir . 'AddAds.i18n.php';
- which contains the code:
$aliases = array();
- /** English */
- $aliases['en'] = array(
- 'AddAds' => array( 'AddAds' )
);
- It looks like it is correctly defined. How should it be written? LTech (talk) 06:37, 10 June 2014 (UTC)
- Not the alias file, the languages ;)
- Look at:
- https://www.mediawiki.org/wiki/Manual:Special_pages#The_Messages.2FInternationalization_File
- The title of the Special Page comes from the message file, in your case from key "AddAds". If the key doesn't exist (like in your case), the message key will be shown with <>. Florianschmidtwelzow (talk) 08:36, 10 June 2014 (UTC)
- Thanks so much. I just needed to change:
$messages[ 'en' ] = array('AddAds' => "AddAds",
to lowercase $messages[ 'en' ] =array('addads' => "AddAds",
LTech (talk) 09:27, 10 June 2014 (UTC)
Database returned error ‘1048: Column 'rc_comment' cannot be null
I have created an extension and it calls Job::batchInsert( $jobs );
I am getting the error:
Database error
A database query syntax error has occurred. This may indicate a bug in the software. The last attempted database query was:
(SQL query hidden)
from within function ‘RecentChange::save.’ Database returned error ‘1048: Column 'rc_comment' cannot be null (localhost).’
I have no clue where this code is being called from. How do I debug this? LTech (talk) 18:04, 9 June 2014 (UTC)
- Hi!
- Start with enabling $wgShowSQLErrors to see the actual query, which tries to insert null into rc_comment. 88.130.91.32 18:20, 9 June 2014 (UTC)
- Like the error message says, the problem appears in RecentChange::save. The column rc_comment can not be empty is correct, too (like the db schema). Now the question is: Have you anything changed in core, which MW Installation you use? Which PHP/MySQL Version, and which extensions are installed? Florianschmidtwelzow (talk) 18:24, 9 June 2014 (UTC)
Sidebar not updating
- I recently updated my wiki to 1.22.6 and since then the sidebar wont update. I have deleted the page and tried to recreate but nothing changes. Information is below, any help would be appreciated.
- http://www.fs-rpg.com/FSwiki/MediaWiki:Sidebar
- MediaWiki 1.22.6
- PHP 5.3.16 (cgi-fcgi)
- MySQL 5.1.73-cll Tregelen (talk) 04:21, 10 June 2014 (UTC)
- As far as I'm able to tell, it seems to be working just fine.
- Are you using memcached/APC/some other similar caching solution?
- Is $wgEnableSidebarCache set to
true
in your wiki's LocalSettings.php?- If it is set to true, what's the value of $wgSidebarCacheExpiry?
- And finally, did you remember to purge your browser's cache? (Although in my experience changes to the sidebar have been relatively instant, so this is unlikely, but it's something to check in any case.) Jack Phoenix (Contact) 15:16, 10 June 2014 (UTC)
- I managed to fix it by turning off memcache although the speed will eventually drop (which is why we went to memcache). I would like to turn on memcache again for the speed benefits unless you have another suggestion.
- I tried $wgEnableSidebarCache true and false and neither worked. $wgSidebarCacheExpiry was not set.
- Yes I purged.
- -- Tregelen (its early and I forgot to log in) 118.210.190.36 20:47, 10 June 2014 (UTC)
- As far as I'm able to tell, it seems to be working just fine.
- ребят помогите разабратся начил писать статьюудалили страно веть персона это личность! пака непонел как отоброзить информацию о себе достоверную ?есть сайты де я явно заметная личность !есть статьи обомне но тут посчитали что я немагу осебе сам расказать? Янис Криевиньш (talk) 10:09, 12 August 2015 (UTC)
- почему?если я не палитик но я и не простолюдивый !свая кампания сваи клиенты сваи сайты и такдалие)) Янис Криевиньш (talk) 10:10, 12 August 2015 (UTC)
[FIXED] Cannot upload files since the update from 1.22.7 to 1.23.
Apparently MediaWiki is using the popen() function PHP. A lot of users are on shared hosting packages. Including me. How is such a thing possible, when popen() is an actual execution command, open to abuse in the wrong hands? (See: http://stackoverflow.com/questions/3115559/exploitable-php-functions)
Maybe MediaWiki is sticking with it, maybe not. What's worse is that there's absolutely no mention of this change anywhere in the change log, which is absurd. Is there a short term solution I can use? Downgrade, force MW to use the old file upload system? Anything?
All help would be appreciated. 87.208.0.68 (talk) 12:07, 10 June 2014 (UTC)
- If there's "absolutely no mention of this change anywhere in the change log" I wonder which ChangeLog(s) you checked, because popen has been in the code for a long time. At least long enough that https://git.wikimedia.org/blame/mediawiki%2Fcore.git/HEAD/includes%2FGlobalFunctions.php and https://git.wikimedia.org/blame/mediawiki%2Fcore.git/HEAD/includes%2Ffilebackend%2FFSFileBackend.php do not list the specific commits when it was introduced, once upon a time. AKlapper (WMF) (talk) 12:19, 10 June 2014 (UTC)
- https://git.wikimedia.org/blob/mediawiki%2Fcore.git/REL1_23/RELEASE-NOTES-1.23 which is referenced in http://www.mediawiki.org/wiki/MediaWiki_1.23. File uploads were working beautifully in 1.22.7. My hosting provider hasn't changed anything, so what could be the problem? 87.208.0.68 13:33, 10 June 2014 (UTC)
- The problem could be that some area of code received another popen call() and that area of code is triggered more often than those areas that already had popen() calls which did not create problems for you. I guess. AKlapper (WMF) (talk) 09:16, 11 June 2014 (UTC)
- https://git.wikimedia.org/blob/mediawiki%2Fcore.git/REL1_23/RELEASE-NOTES-1.23 which is referenced in http://www.mediawiki.org/wiki/MediaWiki_1.23. File uploads were working beautifully in 1.22.7. My hosting provider hasn't changed anything, so what could be the problem? 87.208.0.68 13:33, 10 June 2014 (UTC)
- Hmm, the first use of popen was in REL1_3 in GlobalFunctions.php:
- https://github.com/wikimedia/mediawiki-core/blob/REL1_3/includes/GlobalFunctions.php
- The FSFileBackend (since REL1_20) was created with the use of popen:
- https://github.com/wikimedia/mediawiki-core/blob/REL1_20/includes/filebackend/FSFileBackend.php
- So, if you have an error message, so wen can see, in which file the popen fails, then we can look into it, when this was introduced, but i think it was before 1.22. Florianschmidtwelzow (talk) 13:05, 10 June 2014 (UTC)
- Warning: popen() has been disabled for security reasons in /nfs/home/***/domains/*.com/public_html/includes/filebackend/FSFileBackend.php on line 702
- Warning: stream_get_contents() expects parameter 1 to be resource, null given in /nfs/home/***/domains/*.com/public_html/includes/filebackend/FSFileBackend.php on line 709
- Warning: fclose() expects parameter 1 to be resource, null given in /nfs/home/***/domains/*.com/public_html/includes/filebackend/FSFileBackend.php on line 710
- Warning: cp '/tmp/phpSb0DaE' '/nfs/home/***/domains/*.com/public_html/images/7/7c/Image-e-14124d.png' in /nfs/home/deb31188n3/domains/dmowiki.com/public_html/includes/filebackend/FSFileBackend.php on line 282 87.208.0.68 13:36, 10 June 2014 (UTC)
- http://www.mediawiki.org/wiki/Project:Support_desk#Upload_system_differences_between_1.22.7_and_1.23.0_43943
- I have the same problem. I am able to upload on 1.22.7 but not on 1.23.0
- nothing changed on my hoster (and popen is disabled, but works on 1.22.7)
- EDIT: I restored 1.22.7 backup and I am trying to figure the error/changes out Raid (talk) 15:04, 10 June 2014 (UTC)
- Same. Restored the 1.22.7 backup, works fine. Lost a bit of data, but just a bit. Uploading now works fine: 17:49, 10 June 2014 Thumbnail for version as of 17:49, 10 June 2014 1,920 × 1,080 (791 KB) 87.208.0.68 15:49, 10 June 2014 (UTC)
- Your issue is caused by PHP's
safe_mode
, a broken-by-design setting that does more harm than good. Unfortunately it seems that some people just don't bother reading manuals and enable that setting because "hey, it has 'safe' in its name, so clearly it must be good!". The PHP manual states that safe_mode has been "DEPRECATED as of PHP 5.3.0 and REMOVED as of PHP 5.4.0" (finally!). - I suggest you contact your hosting provider and provide them that PHP.net link and ask to have safe_mode disabled (and/or PHP upgraded to 5.4.0 or newer; either one works). Jack Phoenix (Contact) 15:10, 10 June 2014 (UTC)
- safe_mode is off. 87.208.0.68 15:36, 10 June 2014 (UTC)
- Safe_mode is Off here too
- On my shared host I tried the following php version (I can select on CP):
- 5.5.9
- 5.4.23
- 5.3.28
- and mw 1.23.0 upload system is not working at all.
- mw 1.22.7 is working perfectly Raid (talk) 09:51, 11 June 2014 (UTC)
- What about "disable_functions" in php.ini? Is popen or proc_open listed there? Does the problem still happen after removing it? AKlapper (WMF) (talk) 10:40, 11 June 2014 (UTC)
- You are all on shared hosts, right? You can see disable_functions in phpinfo(), example:
- test.php:
- Florianschmidtwelzow (talk) 10:50, 11 June 2014 (UTC)
<?php echo phpinfo(); ?>
- We have a customer on one of or servers and he runs in the same issue, php version is 5.4.* and safemode flag is off and checked apache vhost file manually for it.
- Regards, 109.38.16.19 11:59, 11 June 2014 (UTC)
- What about disable_functions, as asked before? AKlapper (WMF) (talk) 12:28, 11 June 2014 (UTC)
- disable_functions: system,popen,dl,passthru,proc_open,shell_exec
- I am on a shared linux host (aruba.it), currently I am running PHP 5.4.23.
- Mw 1.22.7 upload system is working well. Mw 1.23.0 isn't
- if a overwrite the mw 1.22.7 includes\filebackend folder mw 1.23.0 is working well.
- I tried a compare but there are a lot of minimal changes on every files Raid (talk) 13:10, 11 June 2014 (UTC)
- disable_functions: popen,...,proc_open
- That is the problem. MediaWiki actually needs these functions. Does it work, when these functions are enabled? 88.130.71.126 13:44, 11 June 2014 (UTC)
- ok, but what about POPEN function is even on MW 1.22.7 on FSFileBackend.php?
- $pipes = array(); foreach ( $fileOpHandles as $index => $fileOpHandle ) { $pipes[$index] = popen( "{$fileOpHandle->cmd} 2>&1", 'r' ); }
- EDIT: tested on WAMP 2.4 php 5.4.12 with disable_functions: popen,proc_open
- mw 1.23.0 upload system isn't working, mw 1.22.7 is working
- popen function is on both versions of mw. Raid (talk) 14:28, 11 June 2014 (UTC)
- I haven't looked into it for now, but i'm sure, that popen in 1.27 isn't used for every function, e.g. in file upload required functions. Maybe you never used the functions which uses popen, so you never had problems before. But with the change to MW 1.23 MW require popen for file upload. I'm not sure, if we want to change this, the standard configuration of php.ini has no disabled functions:
- http://www.php.net//manual/de/ini.core.php Florianschmidtwelzow (talk) 20:44, 11 June 2014 (UTC)
- Thx for your support, I hope to have a legacy way for upload module as for php safe_mode on Raid (talk) 21:44, 11 June 2014 (UTC)
- The solution for safe_mode = On is to set safe_mode to Off. ;-)
- Safe mode was a bad idea, also the PHP developers themselves noticed that and recommend to disable it. Safe mode is deprecated since PHP 5.3 and has finally been removed in 5.4. You should not rely on it. MediaWiki is not made to work with safe_mode = On. If you get it working somehow, be happy, but you should not expect MediaWiki to be changed in a way so that things, which are now broken because of safe_mde being On, will start working in the future. That won't happen. 88.130.87.84 16:54, 12 June 2014 (UTC)
- Thx for your support, I hope to have a legacy way for upload module as for php safe_mode on Raid (talk) 21:44, 11 June 2014 (UTC)
- What about "disable_functions" in php.ini? Is popen or proc_open listed there? Does the problem still happen after removing it? AKlapper (WMF) (talk) 10:40, 11 June 2014 (UTC)
- Tracked in bug 66467 Florianschmidtwelzow (talk) 10:22, 11 June 2014 (UTC)
- This problem is also in Mediawiki 1.24 alpha and Mediawiki 1.24 wmf 5.66.148.109 16:12, 12 June 2014 (UTC)
- Sure, 1.24 based on 1.23 and will be devloped and not restored ;) Florianschmidtwelzow (talk) 05:40, 13 June 2014 (UTC)
- Ok. But could someone fix it so that people can use Mediawiki on a shared host please. 5.66.147.22 16:17, 13 June 2014 (UTC)
- MediaWiki does work on shared hosts so the statement is incorrect. MediaWiki does not work on your shared host because your provider blocks random stuff. AKlapper (WMF) (talk) 16:53, 13 June 2014 (UTC)
- hi but how comes it worked in mediawiki 1.22. 2.220.137.250 18:08, 13 June 2014 (UTC)
- I've setup MediaWiki 1.22.7 with uploads.
- I've done an upload, and it works.
- Then, I've added
system,popen,dl,passthru,proc_open,shell_exec
todisabled_functions
and now I get this error: Error creating thumbnail: Unable to run external programs, passthru() is disabled. - So it didn't work before. If that's not true, please share how did you configured file uploads. Ciencia Al Poder (talk) 18:18, 13 June 2014 (UTC)
- In principle this does not matter :). The developer team for file management decide to use another basic function to handle the file upload. That some shared host provider think, they can do good things with disable_functions, then we can't, in my opinion, do much things. popen() is explained on official php manual (http://www.php.net/manual/de/function.popen.php) without any warning to deactivate or don't use this function. So it is a basic function enabled by default :)
- Please ask your host provider, why they deactivate these functions :) Florianschmidtwelzow (talk) 18:57, 13 June 2014 (UTC)
- > In principle this does not matter
- Agreed. I mean: What should the MediaWiki developers do? Never change the code? That's not possible. With every change comes the "risk" of introducing a usage of a function, which had not been used before. It is just not feasible to try to prohibit this. 88.130.119.157 21:34, 13 June 2014 (UTC)
- but something was change between mediawiki 1.22 and 1.23. 2.220.137.250 21:52, 13 June 2014 (UTC)
- Yeah, that's totally right, look here:
- https://github.com/wikimedia/mediawiki-core/blob/REL1_23/includes/filebackend/FSFileBackend.php#L702
- This line has changed somewhere between release of 1.22.7 and 1.23 and now uses popen :) Florianschmidtwelzow (talk) 22:08, 13 June 2014 (UTC)
- Looking at https://git.wikimedia.org/blame/mediawiki%2Fcore.git/HEAD/includes%2Ffilebackend%2FFSFileBackend.php instead (canonical place) you can see that this line and the call to popen() was added in May 2012 and has not changed since then, so some other code likely has changed which (now?) calls this function. AKlapper (WMF) (talk) 22:12, 13 June 2014 (UTC)
- if we look where mediawiki 1.23 alpha was first release and look between when it was release and now and see what was added. 94.197.122.79 10:34, 14 June 2014 (UTC)
- Which 1.23alpha are you referring to? ☠MarkAHershberger☢(talk)☣ 11:18, 14 June 2014 (UTC)
- I don't know, what you want :) The php fatal error says, where the line we looking for is. I have linked the actual git version of this line and we see, that there is used popen(), in REL1_22 this isn't used. I think we don't need to investigate this more, or? :) Florianschmidtwelzow (talk) 11:53, 14 June 2014 (UTC)
- The popen you talk about was introduced early in 2012 -- over a year before 1.22 was released in late 2013.
- As others have pointed out, there must be something else causing uploads not to work. ☠MarkAHershberger☢(talk)☣ 13:37, 14 June 2014 (UTC)
- Something was added to that file to cause the issue within the year. 86.135.251.100 15:35, 14 June 2014 (UTC)
- 1.23 alpha when it was first released in October but if we look at the 1.23 wmf we may be able to test them and see which one introduced the issue. 86.135.251.100 16:48, 14 June 2014 (UTC)
- Hi I pinpointed when the problem started I tried mediawiki 1.23 wmf 9 and it works with popen disabled and between wmf 10 and 14 is where the problem started. I still need to try the other version but that's when the problem started. 86.135.251.100 19:13, 14 June 2014 (UTC)
- Hi the problem started in mediawiki 1.23 wmf 12. 86.135.251.100 19:23, 14 June 2014 (UTC)
- Thanks for tracking this down ☠MarkAHershberger☢(talk)☣ 21:02, 14 June 2014 (UTC)
- Thanks! With my limited knowledge in File Management i can't find any differences between the function calls in upload process, maybe someone other can better say anything :) -> added backtrace to bug. Florianschmidtwelzow (talk) 22:46, 14 June 2014 (UTC)
- Hi my host says popen is disabled for security reasons. please fix it. 86.135.249.133 16:51, 17 June 2014 (UTC)
- If you used MediaWiki with them before, then disabling popen is probably something they did recently.
- It sounds like if you want to continue to use MediaWiki with uploaded files, you need to find a new host. ☠MarkAHershberger☢(talk)☣ 17:49, 17 June 2014 (UTC)
- This should have been mentioned in Manual:Installation requirements, but it isn't mentioned.
- That's really something to be mentioned, because people may buy a specific hosting plan without being aware that it doesn't just need PHP, but also several PHP functions that hosting services usually consider "restricted" need to be available! Ciencia Al Poder (talk) 09:40, 18 June 2014 (UTC)
- Agreed: added. Florianschmidtwelzow (talk) 11:18, 18 June 2014 (UTC)
- Hi I found the source of the problem and where the error originates the file is called FileOpBatch.php and is in include/filebackend/FileOpBatch.php https://git.wikimedia.org/blob/mediawiki%2Fcore.git/36174b76ea9ff6c2e75361865f21b75f212285fa/includes%2Ffilebackend%2FFileOpBatch.php 86.135.249.133 14:21, 18 June 2014 (UTC)
- Hmm, i don't know enugh about file handling, but for me, the function calls seems to be the same? Can you clarify, what you mean with "and where the error originates", the file has 200 lines ;) Florianschmidtwelzow (talk) 14:27, 18 June 2014 (UTC)
- Hi I found the code causing the error this is the code in 1.23 causing error
foreach ( $performOpsBatch as $i => $fileOp ) { if ( !isset( $status->success[$i] ) ) { // didn't already fail in precheck() $subStatus = $fileOp->attemptAsync(); if ( $subStatus->value instanceof FileBackendStoreOpHandle ) { $opHandles[$i] = $subStatus->value; // deferred } else { $statuses[$i] = $subStatus; // done already } } } // Try to do all the operations concurrently... $statuses = $statuses + $backend->executeOpHandlesInternal( $opHandles ); // Marshall and merge all the responses (blocking)... foreach ( $performOpsBatch as $i => $fileOp ) { if ( !isset( $status->success[$i] ) ) { // didn't already fail in precheck() $subStatus = $statuses[$i]; $status->merge( $subStatus ); if ( $subStatus->isOK() ) { $status->success[$i] = true; ++$status->successCount; } else { $status->success[$i] = false; ++$status->failCount; $aborted = true; // set abort flag; we can't continue } } } } } }
- and this is the code for 1.22 that works correctly
- 86.135.249.133 14:31, 18 June 2014 (UTC)
foreach ( $performOpsBatch as $i => $fileOp ) { if ( !$fileOp->failed() ) { // failed => already has Status // If the batch is just one operation, it's faster to avoid // pipelining as that can involve creating new TCP connections. $subStatus = ( count( $performOpsBatch ) > 1 ) ? $fileOp->attemptAsync() : $fileOp->attempt(); if ( $subStatus->value instanceof FileBackendStoreOpHandle ) { $opHandles[$i] = $subStatus->value; // deferred } else { $statuses[$i] = $subStatus; // done already } } } // Try to do all the operations concurrently... $statuses = $statuses + $backend->executeOpHandlesInternal( $opHandles ); // Marshall and merge all the responses (blocking)... foreach ( $performOpsBatch as $i => $fileOp ) { if ( !$fileOp->failed() ) { // failed => already has Status $subStatus = $statuses[$i]; $status->merge( $subStatus ); if ( $subStatus->isOK() ) { $status->success[$i] = true; ++$status->successCount; } else { $status->success[$i] = false; ++$status->failCount; $aborted = true; // set abort flag; we can't continue } } } } return $status; } }
- I am generally opposed to adding needed PHP functions to Manual:Installation requirements. Such a list is not helpful at all. How many functions do you want to add? Hosters can disable any function - do you want to start with stuff like str_replace? That might be disabled as well. We don't know for which strange "reasons" hosters arbitrarily disable stuff - and who should maintain that list? Basically you would have to go through every Gerrit changeset to see, if there might not be a new function, which now is needed as well. Noone will do that - it does not make sense and is not feasable to ad a list of all the functions MediaWiki uses. 88.130.100.202 15:01, 18 June 2014 (UTC)
- Hi I uploaded a change here https://gerrit.wikimedia.org/r/#/c/140383/ which temporarily fixes it. 86.135.249.133 15:23, 18 June 2014 (UTC)
- I have also added the change to branch REL1_23 https://gerrit.wikimedia.org/r/#/c/140387/ 86.135.249.133 15:34, 18 June 2014 (UTC)
- 88.130: No, there's no need to mention a list of PHP functions, but it will be incredibly helpful to mention that in some circumstances (like file upload) it requires some of them that are usually disabled in the vast majority of free or cheap webhosting plans, basically those that provide the ability to execute external programs. Ciencia Al Poder (talk) 19:15, 18 June 2014 (UTC)
- VipsScaler when they remove the extension issue has been resolved. İncelemeelemani (talk) 12:48, 12 August 2014 (UTC)
- I am generally opposed to adding needed PHP functions to Manual:Installation requirements. Such a list is not helpful at all. How many functions do you want to add? Hosters can disable any function - do you want to start with stuff like str_replace? That might be disabled as well. We don't know for which strange "reasons" hosters arbitrarily disable stuff - and who should maintain that list? Basically you would have to go through every Gerrit changeset to see, if there might not be a new function, which now is needed as well. Noone will do that - it does not make sense and is not feasable to ad a list of all the functions MediaWiki uses. 88.130.100.202 15:01, 18 June 2014 (UTC)
- Hi I found the source of the problem and where the error originates the file is called FileOpBatch.php and is in include/filebackend/FileOpBatch.php https://git.wikimedia.org/blob/mediawiki%2Fcore.git/36174b76ea9ff6c2e75361865f21b75f212285fa/includes%2Ffilebackend%2FFileOpBatch.php 86.135.249.133 14:21, 18 June 2014 (UTC)
- Agreed: added. Florianschmidtwelzow (talk) 11:18, 18 June 2014 (UTC)
- Hi my host says popen is disabled for security reasons. please fix it. 86.135.249.133 16:51, 17 June 2014 (UTC)
- Hi the problem started in mediawiki 1.23 wmf 12. 86.135.251.100 19:23, 14 June 2014 (UTC)
- Hi I pinpointed when the problem started I tried mediawiki 1.23 wmf 9 and it works with popen disabled and between wmf 10 and 14 is where the problem started. I still need to try the other version but that's when the problem started. 86.135.251.100 19:13, 14 June 2014 (UTC)
- 1.23 alpha when it was first released in October but if we look at the 1.23 wmf we may be able to test them and see which one introduced the issue. 86.135.251.100 16:48, 14 June 2014 (UTC)
- Something was added to that file to cause the issue within the year. 86.135.251.100 15:35, 14 June 2014 (UTC)
- if we look where mediawiki 1.23 alpha was first release and look between when it was release and now and see what was added. 94.197.122.79 10:34, 14 June 2014 (UTC)
- Looking at https://git.wikimedia.org/blame/mediawiki%2Fcore.git/HEAD/includes%2Ffilebackend%2FFSFileBackend.php instead (canonical place) you can see that this line and the call to popen() was added in May 2012 and has not changed since then, so some other code likely has changed which (now?) calls this function. AKlapper (WMF) (talk) 22:12, 13 June 2014 (UTC)
- but something was change between mediawiki 1.22 and 1.23. 2.220.137.250 21:52, 13 June 2014 (UTC)
- hi but how comes it worked in mediawiki 1.22. 2.220.137.250 18:08, 13 June 2014 (UTC)
- MediaWiki does work on shared hosts so the statement is incorrect. MediaWiki does not work on your shared host because your provider blocks random stuff. AKlapper (WMF) (talk) 16:53, 13 June 2014 (UTC)
- Ok. But could someone fix it so that people can use Mediawiki on a shared host please. 5.66.147.22 16:17, 13 June 2014 (UTC)
- Sure, 1.24 based on 1.23 and will be devloped and not restored ;) Florianschmidtwelzow (talk) 05:40, 13 June 2014 (UTC)
- This problem is also in Mediawiki 1.24 alpha and Mediawiki 1.24 wmf 5.66.148.109 16:12, 12 June 2014 (UTC)
- This is the fix:
- https://gerrit.wikimedia.org/r/#/c/140406/2/includes/filebackend/FileOpBatch.php
- I just report. Tested, it is working.
- Thx for the fix guys.
- EDIT: testing version
- MediaWiki 1.23.0
- PHP 5.4.12 (apache2handler)
- MySQL 5.6.12-log
- my phpinfo():
- http://pastebin.com/zYedTqa6
- EDIT2:
- mw 1.23.1 upload module is fully working with popen disabled.
- thx for the fix guys Raid (talk) 15:40, 19 June 2014 (UTC)
- Hello all! Like Andre K. (thanks :)) said on bugtracker: all patches are merged into the right places, so the master and REL1_23 are fixed. Can you please update your MediaWiki to the newest REL1_23 GIT Version and try uploads? Thanks :) Florianschmidtwelzow (talk) 13:57, 23 June 2014 (UTC)
- Alternatively, download the point release of 1.23 this Thursday. ☠MarkAHershberger☢(talk)☣ 17:45, 23 June 2014 (UTC)
- Hello all! Like Andre K. (thanks :)) said on bugtracker: all patches are merged into the right places, so the master and REL1_23 are fixed. Can you please update your MediaWiki to the newest REL1_23 GIT Version and try uploads? Thanks :) Florianschmidtwelzow (talk) 13:57, 23 June 2014 (UTC)
How to set specific sections in the left navigation bar expanded by default?
CollapsibleNav function were included in MW since 1.22. I would like to know is it possible to set specific sections in the left navigation bar expanded by default?
For example, I have add an new sections in the left navigation bar and would like everyone could see it by default without click. Deletedaccount4567435 (talk) 17:22, 10 June 2014 (UTC)
- I found a solution provide by Ciencia Al Poder:
- Zoglun (talk) 18:37, 10 June 2014 (UTC)
/* force the display of the contents of the section */ #p-coll-print_export .body { display:block !important; } /* Option 1: hide the header */ #p-coll-print_export h3 { display:none; } /* Option 2: just hide the arrow in the header */ #p-coll-print_export h3 { background:none !important; }
File import : Filename not automatically copied
I seem to face the same problem noticed here. When CopyUploadsFromSpecialUpload is activated, the source filename is no longer copied into the destination filename field. If if upload a local file, this destination field remains empty. If I input a file url, the text "Url" appears in the field. Any idea ? Varlin (talk) 17:58, 10 June 2014 (UTC)
- $wgCopyUploadsFromSpecialUpload should only add an interface to Special:Upload to enable uploading from URLs. If you ask me, I would say that the fact, that now nothing or the word "URL" appears in that field (especially also for cases, where no upload from URL is done at all), is a bug.
- You should file that in bugzilla as a BUGREPORT. 88.130.110.212 21:10, 10 June 2014 (UTC)
Adding custom style for special pages
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.
Hi, I am trying to make a new skin based on Vector named BlackVector. I started by copying all of the "vector" files to a new folder and setting up a new "load point" according to the current documentation. This works fine. My skin is applied as expected on normal pages. However, on special pages like "preferences", it appears to not use my skin. I investigated and found a place in resources.php where I could add a reference to my style for the preferences page like this:
'mediawiki.special.preferences' => array(
'scripts' => 'resources/src/mediawiki.special/mediawiki.special.preferences.js',
'styles' => 'resources/src/mediawiki.special/mediawiki.special.preferences.css',
'position' => 'top',
'skinStyles' => array(
'vector' => 'skins/vector/special.preferences.less',
'blackvector' => 'skins/blackvector/special.preferences.less',
),
'messages' => array(
'prefs-tabs-navigation-hint',
),
'dependencies' => array(
'mediawiki.language',
),
),
This works and with this change my skin is loaded for the preferences page.
But, this seems like a bad way to register this part of my skin. Is there any way to add this information in my load point instead? As in using $wgResourceModules or something in my BlackVector.php file, which is a modified copy of Vector.php.
P.S. In a similar manner I can reference my copy of "special.less" after the standard vector file is referenced. But I would like to register this too from the skin load point.
Software versions: MediaWiki: 1.23.0, PHP: 5.3.10-1ubuntu3.11 (apache2handler), MySQL: 5.5.37-0ubuntu0.12.04.1 85.228.16.141 (talk) 21:53, 10 June 2014 (UTC)
- Hey :) Never, never ever hack the core:) https://www.mediawiki.org/wiki/Do_not_hack_the_core
- Look here:
- https://www.mediawiki.org/wiki/Manual:Skinning#Creating_the_skin
- You can add stylesheets using ResourceLoader instead of adding to resources.php. Florianschmidtwelzow (talk) 07:56, 11 June 2014 (UTC)
- Yes I know that it is bad to edit the resources.php file. That was the entire reason for the post. The ugly hack makes it work as I want it to but the question was how to do it the right way. The page you link to is actually the one I used to add the skin in the first place but I can't extract information about how to register the skin for the special:preferences page from It. Can you please clarify that part? 85.228.16.141 (talk) 21:57, 11 June 2014 (UTC)
- Oh, sorry, then i missunderstand you :) I'm pretty sure, it's not possible to overwrite or extend a modulein resourceloader when it is already registered :/ Maybe an other know more about a possible solution :) Florianschmidtwelzow (talk) 06:08, 12 June 2014 (UTC)
- Hi!
- I had the same problem a few days ago and I also came to the conclusion that it is not possible to change the registration of mediawiki.special.preferences.
- I solved this by adding and adjusting styles for those elements, which I want to look different to the skin's CSS files. They overwrite what is defined in mediawiki.special.preferences. You might have to use "!important" in order to make your CSS overwrite what comes from mediawiki.special.preferences, if your rules would otherwise not be special enough. 88.130.71.126 (talk) 07:51, 12 June 2014 (UTC)
- Oh, sorry, then i missunderstand you :) I'm pretty sure, it's not possible to overwrite or extend a modulein resourceloader when it is already registered :/ Maybe an other know more about a possible solution :) Florianschmidtwelzow (talk) 06:08, 12 June 2014 (UTC)
- Yes I know that it is bad to edit the resources.php file. That was the entire reason for the post. The ugly hack makes it work as I want it to but the question was how to do it the right way. The page you link to is actually the one I used to add the skin in the first place but I can't extract information about how to register the skin for the special:preferences page from It. Can you please clarify that part? 85.228.16.141 (talk) 21:57, 11 June 2014 (UTC)
Notifications/Echo
Hello all,
I wonder if it is possible to use the echo/notifications extension to send messages from user to user. I have installed it but still did not quite figured out how it works.
And: Is it possible for bureaucrats to send messages to all users which were displayed like the welcome message after signing in? Even without the extension?
MediaWiki: 1.22.5 PHP: 5.3.8 MySQL: 5.0.96
Thank you! ParkStreet (talk) 08:16, 11 June 2014 (UTC)
- Hi! Echo is "only" the powerful notification-tool and do not provide a function to send messages to users in generally ;) You can add a topic to a users talk page and he will be informed by Echo, but you can not send a private message to the user through echo. If you want more functions using echo, you can find a list of extensions using echo here:
- https://www.mediawiki.org/wiki/Echo_%28Notifications%29/Developer_guide
- There you find a developer guide, too, to create or extend an extension to use echo :) Florianschmidtwelzow (talk) 10:27, 11 June 2014 (UTC)
- For some reason I've expected that answer. ;-) Thanks anyway! Would have been fantastic to have a notification tool between users. ParkStreet (talk) 10:39, 11 June 2014 (UTC)
- Oh -- Niedersachsen, as i have just read. Hi from Hannover. ;-) ParkStreet (talk) 10:40, 11 June 2014 (UTC)
- You can send emails to other users using Special:Emailuser, too. Although it's not the same, of course, since the other user will see your email address when you send the email Ciencia Al Poder (talk) 19:25, 12 June 2014 (UTC)
- For some reason I've expected that answer. ;-) Thanks anyway! Would have been fantastic to have a notification tool between users. ParkStreet (talk) 10:39, 11 June 2014 (UTC)
Return to a page after Editing another
Hello all,
another question: I have a wiki using templates for every day: for example template "new day/DD/MM/YYYY" which links to other templates like "A/DD/MM/YYYY", "B/DD/MM/YYYY", "C/DD/MM/YYYY" etc. I have to use templates because more than one user is editing every day, possibly even at the same time. Everything is working so far.
I now wondered if it would possible to redirect someone after editing "new day/DD/MMYYY-A/DD/MM/YYYY" (the "A"-Part of the "new day" template) not to the "A"-page which would be normal after editing, but to the "new day"-Template. Just like it happens on the login page: When you look for a specific page in the wiki without logging in you will be redirected to the login page, but afterwards will be sent back to the page you were looking for.
Have tried it with "redirect=" and "returntoquery=", but neither of these works.
Any idea? :-) ParkStreet (talk) 08:25, 11 June 2014 (UTC)
Sidebar moved to bottom
http://www.mediawiki.org/wiki/Browser_issues_with_MediaWiki?veaction=edit describes this as FF 9.
However it happens on my intranet wiki site in chrome and FF now, and also here:
http://kb.linuxvirtualserver.org/wiki/Main_Page
I have not applied any updates recently, so it's a bit odd. 79.30.110.44 (talk) 16:40, 11 June 2014 (UTC)
- Hi!
- For me the page linuxvirtualserver.org displays fine e.g. in the current version of Firefox. Navgation, Search and Toolbox display next to the text as they should. However, the server uses a very old version of MediaWiki (1.11), which may in several ways be incompatible with current browsers. An upgrade can improve that. 88.130.71.126 16:59, 11 June 2014 (UTC)
- I think i see, what you mean, but please upgrade first. MW 1.11 is a very old version from 2008 (!!!), see here to know, which versions actually are supported:
- https://www.mediawiki.org/wiki/Version_lifecycle Florianschmidtwelzow (talk) 20:47, 11 June 2014 (UTC)
403 error when attempting to edit a spicific page
Hello,
http://keystone.mocklogic.com/wiki/Special:Version
Product Version MediaWiki 1.23.0 PHP 5.4.29 (cgi-fcgi) MySQL 5.5.36-cll
I've recently setup a fresh install and database for a mediawiki and then exported/imported a lot of pages from another wiki.
Mostly things are working great, but one single page (I've discovered so far) is giving me a 403 error when I attempt to save an edit on it, and I'm getting confused. I've attempted to edit from the first admin account which has full permissions for editing, and the page is not protected.
This page was imported, but it won't take edits. Hundreds of other pages have taken edits, including the talk page for this one, and new pages have been generated, so I'm confused as to why this one page has a 403 error.
Forbidden You don't have permission to access /w/index.php on this server. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
I've set the CHMOD on index.php to 644 but it didn't help.
I've checked the error logs from my Cpanel, and there are no errors listed.
Any idea what's going on or how I can fix it? 68.61.232.174 (talk) 17:23, 11 June 2014 (UTC)
- Ok, it got a bit stranger.
- Instead of a simple edit, I wiped out all the content of the page, and the edit went through. I attempted to undo the edit, and the page comes back 403. It seems something in the contents of the page is generating the error? 68.61.232.174 17:47, 11 June 2014 (UTC)
- Something about this chunk of wiki text is causing the error. I've tried going through it line by line, and some lines cause an error when combined with others, but not by themselves, and it's confusing the heck out of me. I thought the magnet links might be the issue (the host not like them somehow) but some of them work by themselves. I'm really confused now.
- Wrapping it all in nowiki tags didn't fix it, but stripping out some of the wiki markup did fix it (see: http://keystone.mocklogic.com/wiki/Eclipse_Phase/Test ). I've included the un-edited "troubled" section bellow:
- == Game Files ==
- Rob Boyle, one of the game's designers, has most of the game's books availible as PDFs for free on his website. Anyone that want's access to the materials can get them legally off his website or the torrents he's seeded.
- == Resources and Stuff ==
- There is currently a list of EP Character Questions being worked on by Matt. The goal of these questions is to give people some specific info to put on their character profiles that will assist GMs in designing missions/campaigns.
- RPG.net has a thread for Eclipse Phase inspirational art. Useful for getting setting ideas or character portraits.
- There is a set of Space Math calculators that can be helpful. I have trouble getting them to work in Chrome, but they seem to work in Firefox.
- A fan on the forum has a massive list of setting details (NPCs, places, corp names, etc) from the various books & pdfs Here. 68.61.232.174 18:16, 11 June 2014 (UTC)
- That happens if your server has mod_security installed, usually when the text contains a certain amount of external links or some specific words. Ciencia Al Poder (talk) 19:27, 12 June 2014 (UTC)
- You were right. I tried some disabling tricks via .htaccess, but they didn't work with mod_security2, which is what the server was running. I had to contact tech support and provide them with an example page that always generated an error, and they were able to alter the rules in mod_security to remove the error... at least so far. I don't know how it was set, nor what exceptions they made, so I'm probably not much help to anyone else. 71.90.29.121 00:42, 15 July 2014 (UTC)
User Preference descriptions - Where stored & changed, and where documented? - How to mark the "defaults"?
This post by タチコマ robot was moved on 2015-06-26. You can find it at Manual talk:User preferences#h-User_Preference_descriptions_-_Where_stored_&_changed,_and_where_documented?_-_H-2013-07-10T18:16:00.000Z. Nemo 11:10, 12 June 2014 (UTC)
Templates for rw:
I'm currently working on adding translated medical article to a very small Wikipedia, missing a bunch of templates. I'm not a technical user in this sense, although I've gotten certain aspects to work. The article I've uploaded so far is at:
If anyone would be so kind as to help me import templates properly I would be very grateful. CFCF (talk) 08:20, 13 June 2014 (UTC)
- Hello!
- It is possible to export templates from other wikis running MediaWiki via the Wikipedia:en:Special:Export page. If you check "include templates" all templates, which this templates use, will be exported, too. After this an importer/administrator/transwiki importers can import the pages.
- Ähm, oh: I see there isn't any person in this group in this wiki :/ Then maybe you ask on the talk page of the required templates for help or maybe (thats my idea, i don't know, if this is possible), you ask at en wiki if someone can import (i think unhappily no).
- But this isn't an MediaWiki problem itself. I think you can get better help at the talk pages of the templates you want :)
- Kind regards
- Florian Florianschmidtwelzow (talk) 10:06, 13 June 2014 (UTC)
- Thanks, I will do my best to find help. Do you know any quick way to become administrator at a wiki? The reason I'm asking is because another wiki [1] hasn't seen any recent edits except those I added, and I was unable to import all the templates needed. CFCF (talk) 22:06, 16 June 2014 (UTC)
- For example I can not fix https://ti.wikipedia.org/w/index.php?title=Template:Main_Page_banner&action=edit CFCF (talk) 22:08, 16 June 2014 (UTC)
- Puhh, unhappily i don't know the process on how to become a administrator (or importeur in your case, that would be enough i think). And each Wikimedia Project (and so each Wikipedia, too) has it's own rules how to become an administrator. If you can not find any information in your wikipedia about the process, requirements and so on, maybe someone in wikipedia irc #wikipedia connect can help you, please respect the channel guidelines. Sorry, that i can't help you more, maybe someone other know anything more :) Florianschmidtwelzow (talk) 05:43, 17 June 2014 (UTC)
- Thanks, I will do my best to find help. Do you know any quick way to become administrator at a wiki? The reason I'm asking is because another wiki [1] hasn't seen any recent edits except those I added, and I was unable to import all the templates needed. CFCF (talk) 22:06, 16 June 2014 (UTC)
No such Module Error
Hi,
I'm copying over templates on a new wiki set up at http://ftvworld.net/wiki/.
I'm using; MediaWiki Wersion: 1.23.0 PHP: 5.4.29 (cgi-fcgi) MYSQL: 5.5.36-cll LUA: 5.1.5
And i'm getting the error "Script error: No such module." on templates such as this on: http://ftvworld.net/wiki/index.php?title=Template:Pp-template 88.82.203.14 (talk) 10:13, 13 June 2014 (UTC)
- Hi!
- This problem is related to Scribunto. It happens, when Scribunto tries to invoke a page, which is missing. Look at your #invoke: line. What is the first word after that? You're missing a matching wiki page.
- For example, if you have {{#invoke: Main...}}, you need a page on your wiki named Module:Main that holds the Scribunto code. 88.130.119.157 10:24, 13 June 2014 (UTC)
- Correct, you must import modules, too :)
- See: http://ftvworld.net/wiki/index.php?title=Template:Documentation
- There is included the module Documentation, which not exist in your wiki. Import this module and all is correct :) Florianschmidtwelzow (talk) 10:26, 13 June 2014 (UTC)
- OK, thanks for your replies 88.82.203.14 13:25, 13 June 2014 (UTC)
- Also, how do you copy over the modules? 88.82.203.14 13:30, 13 June 2014 (UTC)
HTML interwiki transclusion truncates article
Example: http://en.lexipedium.org/wiki/American_Revolution
Do you know how I can stop this from happening?
It doesn't happen every time. Lieutenant Aleksandr Reznov 14:11, 13 June 2014 (UTC)
- What is "this" and "it" exactly? AKlapper (WMF) (talk) 17:37, 14 June 2014 (UTC)
- When the article truncates. It isn't aways showing the full article. Lieutenant Aleksandr Reznov 22:28, 14 June 2014 (UTC)
Copying Modules
Hi,
MediaWiki Wersion: 1.23.0
PHP: 5.4.29 (cgi-fcgi)
MYSQL: 5.5.36-cll
LUA: 5.1.5
SITE: ftvworld.net/wiki Is there a way to copy over modules. When I try to copy them I get a blank screen. 88.82.203.14 (talk) 22:45, 13 June 2014 (UTC)
- Wow :D Maybe you can say us, how you try to copy modules from where? :) Florianschmidtwelzow (talk) 23:25, 13 June 2014 (UTC)
- Sorry? 88.82.203.14 08:39, 14 June 2014 (UTC)
- So I Export all the modules from Wikipedia, then when I go to Special:Import and upload the file, all i get is a blank screen... is there another way to import modules? 88.82.203.14 10:06, 14 June 2014 (UTC)
- See the blank page debugging instructions for what to do. ☠MarkAHershberger☢(talk)☣ 11:15, 14 June 2014 (UTC)
- OK, thanks, i've got the modules to import by manually reinstalling the software but Now i'm getting this error code on imported pages.
- Lua error in Module:Unsubst at line 16: attempt to call field 'isSubsting' (a nil value).
- 88.82.203.14 11:58, 14 June 2014 (UTC)
Backtrace: (tail call): ? Module:Unsubst:16: in function "chunk" 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]: ?
- You're in luck! I was about to say you have to find some other help, but then I searched for the error message and saw that I ran into the same problem.
- If you can use patch to apply a diff, then it shouldn't be hard to solve the problem.
- You might try upgrading to the 1.23 version of Scribunto since it looks like you haven't done that. ☠MarkAHershberger☢(talk)☣ 13:32, 14 June 2014 (UTC)
- OK, sorry for been think, but how do I do that? 88.82.203.14 17:10, 14 June 2014 (UTC)
- How do you upgrade to a newer version of Scribunto?
- Get a file from the extension distributor (direct link for 1.23 version of Scribunto) and upload into your extensions directory to replace the current one.
- Does that help? ☠MarkAHershberger☢(talk)☣ 21:19, 14 June 2014 (UTC)
- OK, sorry for been think, but how do I do that? 88.82.203.14 17:10, 14 June 2014 (UTC)
- See the blank page debugging instructions for what to do. ☠MarkAHershberger☢(talk)☣ 11:15, 14 June 2014 (UTC)
- So I Export all the modules from Wikipedia, then when I go to Special:Import and upload the file, all i get is a blank screen... is there another way to import modules? 88.82.203.14 10:06, 14 June 2014 (UTC)
- Sorry? 88.82.203.14 08:39, 14 June 2014 (UTC)
Notice: Undefined index: createaccount in C:\wamp\www\wiki\includes\installer\LocalSettingsGenerator.php on line 225
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.
Hello,
I installed MediaWiki 1.23.0 on a Windows 2003 Server and get the error notice of "Undefined index: createaccount in C:\wamp\www\wiki\includes\installer\LocalSettingsGenerator.php on line 225". The whole message goes like this:
Notice: Undefined index: createaccount in C:\wamp\www\wiki\includes\installer\LocalSettingsGenerator.php on line 225
Call Stack
# Time Memory Function Location
1 0.0000 149248 {main}( ) ..\index.php:0
2 0.0781 4810872 wfInstallerMain( ) ..\index.php:31
3 0.2344 8796128 WebInstaller->execute( ) ..\index.php:63
4 0.2656 9021832 LocalSettingsGenerator->getText( ) ..\WebInstaller.php:178
5 0.2656 9021880 LocalSettingsGenerator->getDefaultText( ) ..\LocalSettingsGenerator.php:137
I've done googling and tried various ways like adding lines of "error_reporting = E_ALL & ~E_NOTICE" and "display_errors = Off" in php.ini but none of them worked whatsoever. My system meets the minimum requirements perfectly: PHP 5.4.16 and MySQL 5.6.12. So I really don't see why this error always pops up, which is so frustrating. Is that a MediaWiki bug and is there a way to fix it? Can someone shed a light, please? Thanks! GnuDoyng (talk) 18:36, 14 June 2014 (UTC)
- It looks like you've discovered a reportable bug. But the notice message looks like it is coming from XDebug, not php itself -- at least that is the error formatting I've seen before from XDebug.
- The configuration documentation for XDebug seems to suggest that you try putting
xdebug.scream = 0
xdebug.force_display_errors = 0
- in your php.ini or xdebug.ini file. ☠MarkAHershberger☢(talk)☣ 20:20, 14 June 2014 (UTC)
- Tried that, and unfortunately, it didn't do the trick, either. That's just so weird and so frustrating...
- I installed MediaWiki 1.23.0 on a Linux server and got the same error. So I presume there must be something wrong with the latest version.
- Thanks for your help, anyway. Will you report the bug to the developing team? GnuDoyng (talk) 22:45, 14 June 2014 (UTC)
- > So I presume there must be something wrong with the latest version.
- No :) Installed it locally to test -> no errors ;)
- One question: Have you anything changed at the mediawiki files? The readon for my question:
- Your backtrace says:
- 2 0.0781 4810872 wfInstallerMain( ) ..\index.php:31
- wfInstallerMain() isn't called everywhere outside mw-config, but in mw-config/index.php (not index.php in mediawiki root).
- From where you downloaded MediaWiki? Can you download again from official source and copy all files (overwrite the old ones) and test again?
- Thanks! Florianschmidtwelzow (talk) 22:59, 14 June 2014 (UTC)
- Hi, I did download it from the official website and never changed anything in it. Now reverted to 1.22.7 (also downloaded from the official website) and the error was gone. GnuDoyng (talk) 23:40, 14 June 2014 (UTC)
- Can you try again to install 1.23? Like i said, i did it one hour before and it worked well :) Florianschmidtwelzow (talk) 23:59, 14 June 2014 (UTC)
- I'm getting the same error with 1.23 fresh install. If I upgrade an existing mediawiki to 1.23 I don't get the error. Brandon CS Sanders (talk) 00:04, 18 June 2014 (UTC)
- It's cropping up for me because the installer dumped the error message at the top of the downloaded LocalSettings.php file. Deleting the spurious output at the top of LocalSettings.php cleared up the problem. Brandon CS Sanders (talk) 03:46, 18 June 2014 (UTC)
- I'm getting the same error with 1.23 fresh install. If I upgrade an existing mediawiki to 1.23 I don't get the error. Brandon CS Sanders (talk) 00:04, 18 June 2014 (UTC)
- Can you try again to install 1.23? Like i said, i did it one hour before and it worked well :) Florianschmidtwelzow (talk) 23:59, 14 June 2014 (UTC)
- The problem is that MediaWiki, when generates the LocalSettings.php file, it's including that error on the generated file! Ciencia Al Poder (talk) 09:22, 20 June 2014 (UTC)
- Hi, I did download it from the official website and never changed anything in it. Now reverted to 1.22.7 (also downloaded from the official website) and the error was gone. GnuDoyng (talk) 23:40, 14 June 2014 (UTC)
- I don't understand how you're getting this message if you already have a LocalSettings.php file installed. ☠MarkAHershberger☢(talk)☣ 20:32, 14 June 2014 (UTC)
- I have exactly the same problem
Notice: Undefined index: createaccount in C:\wamp\www\mediawiki-1.23.0\includes\installer\LocalSettingsGenerator.php on line 225 Call Stack # Time Memory Function Location 1 0.0005 383688 {main}( ) ..\index.php:0 2 0.1012 9316264 wfInstallerMain( ) ..\index.php:31 3 0.2779 16790888 WebInstaller->execute( ) ..\index.php:63 4 0.3220 17245216 LocalSettingsGenerator->getText( ) ..\WebInstaller.php:178 5 0.3220 17245216 LocalSettingsGenerator->getDefaultText( ) ..\LocalSettingsGenerator.php:137
- I perform a fresh install on a Local machine PC with vista
- and a wamp server 2.1
- appache 2.2.17
- PHP 5.3.5
- mySql 5.5.8
- I downloaded the mediawiki 1.23 from here https://tools.wmflabs.org/snapshots/#!/mediawiki-core/REL1_23
- and the end of my localSetting.php is as :
- 78.206.72.23 17:43, 18 June 2014 (UTC)
# The following permissions were set based on your choice in the installer $wgGroupPermissions['*']['edit'] = false; # Enabled Extensions. Most extensions are enabled by including the base extension file here # but check specific extension documentation for more details # The following extensions were automatically enabled: require_once "$IP/extensions/Cite/Cite.php"; require_once "$IP/extensions/ConfirmEdit/ConfirmEdit.php"; require_once "$IP/extensions/Gadgets/Gadgets.php"; require_once "$IP/extensions/Nuke/Nuke.php"; require_once "$IP/extensions/ParserFunctions/ParserFunctions.php"; require_once "$IP/extensions/PdfHandler/PdfHandler.php"; require_once "$IP/extensions/SyntaxHighlight_GeSHi/SyntaxHighlight_GeSHi.php"; require_once "$IP/extensions/WikiEditor/WikiEditor.php";
- Hi, can you check, what is written at the top of localsettings.php? :) Florianschmidtwelzow (talk) 18:11, 18 June 2014 (UTC)
- here is the begin of the localSettings.php
( ! ) Notice: Undefined index: createaccount in C:\wamp2\www\mediawiki-1.23.0\includes\installer\LocalSettingsGenerator.php on line 225 Call Stack # Time Memory Function Location 1 0.0004 380376 {main}( ) ..\index.php:0 2 0.1031 9312480 wfInstallerMain( ) ..\index.php:31 3 0.2895 16786872 WebInstaller->execute( ) ..\index.php:63 4 0.3010 17241072 LocalSettingsGenerator->getText( ) ..\WebInstaller.php:178 5 0.3010 17241072 LocalSettingsGenerator->getDefaultText( ) ..\LocalSettingsGenerator.php:137 - could you remove my following message,
- sorry it destroy the form message that i want send to you to answer to your request :
- (when i have make a copy of the beginning of LocalSettings.php générated and past it into the message)
- In fact it is the generated localSettings.php which creates this bad chart ! 78.206.72.23 09:39, 19 June 2014 (UTC)
- OK
- after removing all the html code which is includes a the beginning of the localSettings.php : all is correct
- it is strange this html code generation... I dont have this probleme when i install the same version 1.23 into a window 8.1 64bits
- I have it only with my window vista 32bits 78.206.72.23 09:47, 19 June 2014 (UTC)
- Hope that GnuDoyng read here :)
- Can you both, GnuDoyng and 78.206.72.23, give us information about your system, such OS, PHP version, webserver version, maybe installed via wamp or xampp or something else? Normally there wouldn't write anything else as the configuration parameters to localsettings.php, so i think it's a problem of such version or installation method. I would try to reproduce but need more information :) Florianschmidtwelzow (talk) 09:58, 19 June 2014 (UTC)
- system Window vista 32 bits Service Pack2
- in the special page version of mediawiki : I see
- MediaWiki 1.23.0
- PHP 5.3.5 (apache2handler)
- MySQL 5.5.8-log
- and I have
- wamp server 2.1
- appache 2.2.17
78.206.72.23 10:17, 19 June 2014 (UTC)- Hello again! I have tested it with wamp 2.1 with apache 2.2.17 and php5.3.5, unhappily windows vista is the only windows OS higher than XP i haven't here, so i tested under Windows 7 32 bit :/
- I had no error in installation process and no overhead in localsettings.php, sorry :( Florianschmidtwelzow (talk) 15:52, 19 June 2014 (UTC)
- Hi,
- Same problem here with a different message that was included in the header of the LocalSettings.php file.
- Notice: Undefined index: read in M:\xampp\htdocs\sword.wiki\includes\installer\LocalSettingsGenerator.php on line 226
- After removing these lines from the header of the LocalSettings.php the errors were gone.
- This was a bit frustrating since I lost a couple of hours to get here and this html error was added to the LocalSettings.php during the installation process.
- Something strange here... Buga! 85.138.195.141 16:05, 19 June 2014 (UTC)
- It would helpful, when you say, what versions you use :D Like Windows-version, apache and php :) Thanks! Florianschmidtwelzow (talk) 16:54, 19 June 2014 (UTC)
- Sure.
Win 7-x64 and XAMPP 1.8.3:
+ Apache 2.4.4
+ MySQL 5.5.32
+ PHP 5.5.9 + PEAR
85.138.195.141 17:51, 19 June 2014 (UTC)
- It would helpful, when you say, what versions you use :D Like Windows-version, apache and php :) Thanks! Florianschmidtwelzow (talk) 16:54, 19 June 2014 (UTC)
- Hi, can you check, what is written at the top of localsettings.php? :) Florianschmidtwelzow (talk) 18:11, 18 June 2014 (UTC)
- Can you resolve these problems
- {main}( ) ...\index.php:0
- JApplicationCms->execute( ) ...\index.php:47
- JApplicationAdministrator->doExecute( ) ...\cms.php:252
- JApplicationAdministrator->dispatch( ) ...\administrator.php:152
- JComponentHelper::renderComponent( ) ...\administrator.php:98
- JComponentHelper::executeComponent( ) ...\helper.php:372
- require_once( 'C:\wamp64\www\GDeero\administrator\components\com_config\config.php' ) ...\helper.php:392
- ConfigControllerDisplay->execute( ) ...\config.php:31
- ConfigViewComponentHtml->render( ) ...\display.php:104
- JViewHtml->render( ) ...\html.php:77
- include( 'C:\wamp64\www\GDeero\administrator\components\com_config\view\component\tmpl\default.php' ) ...\html.php:148
- JFormField->__get( ) ...\html.php:83
- JFormFieldListswitcher->getInput( ) ...\field.php:393 AJGeelle1 (talk) 20:57, 31 December 2017 (UTC)
- Sorry but your problem doesn't seem to be related to MediaWiki, none of the files that appear on the error stack trace are from MediaWiki. Ciencia Al Poder (talk) 19:37, 1 January 2018 (UTC)
Upgrade from 1.15.2 to 1.23.0 with section errors
Hi, at first some facts of my environment: PHP 5.4.28, MySQL 5.1, i have no shell access.
I have upgraded my existing mediawiki 1.15.2 to the current version 1.23.0. I followed the instructions described at the manual. I performed the upgrade url e.g. http://mywiki.com/mw-config As a final step MediaWiki updated the database. Everything looks well. The last messages where: The upgrade is complete. The wiki can be used.
But the most of my wikipages only displayed the headline of the articles. The content is not available. At first I thought that all pages are affected. But occasionally there are pages that are displayed correctly as in the old wiki. When I try to edit a page whose content is not shown and then want to save an error message appears:
[a8b15f6a] 2014-06-14 04:44:51: Fatal exception of type MWException
Pages which are displayed correctly can be edited without errors. Then i tried to clear the cache of some damaged page by using the action=purge parameter. But it did not help.
Then I thought that the upgrade from version 1.15.2 to version 1.23.0 was too much. So i tried an upgrade to version 1.22.7. But it was the same result. At last i tried an upgrade to version 1.19.1. Most pages are still damaged. Only the headline is displayed. But when i edit those pages the error message is more significant:
'Cannot find section: You tried to edit a section that does not exist. It may have been moved or deleted while you were viewing the page.'
Some example URLs of my wiki:
A damaged page: http://barmwiki.datenuhr.de/index.php?title=Am_Markt
A normal page: http://barmwiki.datenuhr.de/index.php?title=Mittelalter_in_S%C3%BCdholstein:_800_-_1500
Does anyone can help to solve the problem. Regards
Jan 89.246.19.206 (talk) 19:46, 14 June 2014 (UTC)
- Did you back up your database before trying to upgrade?
- Did you restore the database each time before trying to upgrade to a lower version? ☠MarkAHershberger☢(talk)☣ 21:25, 14 June 2014 (UTC)
- Side note: I tested in what you have online currently and there it is so that those pages, which do display are really OK (they are not old versions from a cache, but they are generated with MediaWiki 1.19 and they are OK). The damaged page does not only show no text in the normal page view, but when you edit it you see that it really contains no text at all.
- Please answer Mark's questions! :-) 88.130.115.211 21:42, 14 June 2014 (UTC)
- If you have extensions installed you need to update them for Mediawiki 1.23 and remove some that are incompatible with Mediawiki 1.23. 86.135.251.100 21:49, 14 June 2014 (UTC)
- Yes i've backed up my database first. Each time i tried to upgrade from 1.15.2 to one of the other versions i've restored my database first. 89.246.19.206 04:36, 15 June 2014 (UTC)
- One thing I have noticed.The production system of my wiki which runs with mediawiki 1.15.2 has an installed PHP 5.2.17 and everything works well. The server which i used for the upgrade test has an installed PHP 5.4.28.
- Regardless of the upgrade mediawiki 1.15.2 doesn't work too on this server. There are the same errors (damaged and none damaged pages). I unfortunately had not previously tested. Therefore, the error is independent of the upgrade.
- regards
- Jan 89.246.19.206 04:58, 15 June 2014 (UTC)
- Are you sure you have a complete copy of the database imported for your new installation? ☠MarkAHershberger☢(talk)☣ 03:34, 16 June 2014 (UTC)
- Yes i'am sure the database is a complete copy. If i upgrade the php version on the productive system to more than 5.2.17 (e.g. 5.3) i got the same erros. Damaged and non damaged pages. Even if i upgrade all three extensions (ImageMap, UserMerge, ConfirmEdit) to the current versions. If i turn back to php 5.2.17 everything works well.
- Question:
- On the Internet I often read that those who carry out an upgrade do this by using shell commands. Someone wrote: don't use the browser function for upgrade.
- Currently I do not have shell access. But if it actually makes a difference I can try to install the wiki locally, then to upgrade and then restore them to the test server.
- Does anyone know whether an upgrade over the shell runs differently than the browser (without shell access)? 193.159.161.34 07:51, 16 June 2014 (UTC)
- Updating from the browser is not different that from the shell, except that if it takes too long to end the update, the server may interrupt the process, and may leave an inconsistent database. That's specially true on shared hosts that limit the CPU usage and max execution time of PHP scripts.
- Is the same problem as Manual:Errors and symptoms#All pages have no content, but when editing a page the wiki text is there? Ciencia Al Poder (talk) 09:46, 16 June 2014 (UTC)
- So a summary of what we have:
- Your old MediaWiki 1.15 works fine on PHP 5.2.x. It does not matter, if you upgrade MediaWiki to a newer version or not: As soon as you use PHP 5.3 or newer you do no longer have content on some pages.
- Contradict me, if I am wrong: These broken pages always are the same ones and they are still working correctly in PHP 5.2. 88.130.120.80 11:51, 16 June 2014 (UTC)
- yes you 're right the broken pages are still the same. 193.159.161.34 13:33, 16 June 2014 (UTC)
- No, thats not the same problem. In my case i can't edit the pages which only displayed the headline. If i want to edit following message appears: 'Cannot find section: You tried to edit a section that does not exist. It may have been moved or deleted while you were viewing the page.' (with mediawiki 1.19.1). If i try to edit with versions higher than 1.19.1 there appears following error: [a8b15f6a] 2014-06-14 04:44:51: Fatal exception of type MWException 193.159.161.34 13:39, 16 June 2014 (UTC)
- Please add
error_reporting( -1 );
ini_set( 'display_errors', 1 );
$wgShowExceptionDetails = true;
- to the bottom of your LocalSettings.php file and then cause the exception again. What is the exact error message you get when you try to edit?
- Does this message then appear for all pages or only for those, where you also do not see the content? 88.130.120.80 13:44, 16 June 2014 (UTC)
- Are you sure you have a complete copy of the database imported for your new installation? ☠MarkAHershberger☢(talk)☣ 03:34, 16 June 2014 (UTC)
- This error may happen if the latest revision for that page doesn't contain the corresponding text from the text table. If that's true, the problem would be the database and not the PHP version you use.
- That's apparently the cause, since the example page you gave, has a revision history, and the latests revisions can't be accessed, but older ones are still intact [2].
- Apparently, all revisions since oldid=1490 (30th january 2014) are lost.
- If you restore your database to the state prior to the upgrade, does the wiki work? Are those pages accessible? Ciencia Al Poder (talk) 19:48, 16 June 2014 (UTC)
What could trigger MediaWiki:Session_fail_preview?
What could trigger MediaWiki:Session_fail_preview?
My wiki got such notice sooo frequently, almost everyone saw such waring:"Sorry! We could not process your edit due to a loss of session data. Please try again. If it still does not work, try logging out and logging back in." Deletedaccount4567435 (talk) 06:19, 15 June 2014 (UTC)
- This message shows, when some submitted data is empty or does not match with the expected. So, if the submitted edit token while uploading does not match with the saved, the error message will appear:
- https://github.com/wikimedia/mediawiki-core/blob/4ae146bf3753d6c8b4f64e74a2d8ac67b0b0b7fc/includes/specials/SpecialUpload.php#L124
- On edit the error will appear, if the token isn't ok and the text submitted isn't empty:
- https://github.com/wikimedia/mediawiki-core/blob/02e0261b6eb2b1ff23274a26942f471440cea217/includes/EditPage.php#L3457
- Most of the time, this is because of an ended session, maybe because of time between start an edit section and save/end this :) Florianschmidtwelzow (talk) 12:03, 15 June 2014 (UTC)
- Thank you Florianschmidtwelzow. I solved this problem by $wgSessionsInObjectCache = true; and set APC size to 2G. Zoglun (talk) 00:29, 14 July 2014 (UTC)
wfProfileIn( __METHOD__ . '-replace' ); what does it mean?
I have the code wfProfileIn( __METHOD__ . '-replace' );
in an extension (Replace Text). What does it mean?
I'm trying to change the following code
wfProfileIn( __METHOD__ . '-replace' );
if ( $this->params['use_regex'] )
$new_text = preg_replace( '/'.$target_str.'/U', $replacement_str, $article_text, 1, $num_matches );
}
to use preg_replace_callback instead and it won't work. I'm wondering if this is connected to wfProfileIn( __METHOD__ . '-replace' );
even if I set $new_text = "random string"
nothing happens in the code.
Why can I only use preg_replace?
What am I missing here?
The file is extensions/ReplaceText/ReplaceTextJob.php line 95. LTech (talk) 07:20, 15 June 2014 (UTC)
- Hi!
- The line with "wfProfileIn()" is not relevant for how the code actually works. It is used for profiling, which is useful when you debug stuff like a bottleneck or so.
- The if construct, which you have posted, only is true, when the option "use_regex" is set. Maybe you did not check the according checkbox when you gave the command to do these replacements?
- preg_replace_callback() can be used to replace a call to preg_replace() with /e modifier. I am unsure what you want to do, but the code as it is looks fine. 88.130.66.164 11:35, 15 June 2014 (UTC)
Wikipedia dump interwiki reference location
Hi,
I'm using the Wikipedia catalog for a NL research project. As part of that effort I want to link a wikipedia article to wikidata. I've download both enwiki-latest-pages-meta-current.xml.bz2 and enwiki-latest-pages-articles.xml.bz2 but can't seem to find a consistent interwiki markup -- even for pages I know (by UI inspection) have links to other topics.
I suspect that the answer is obvious but it so far eludes me.
I appreciate anyone who can describe where to find a mapping between a wikipedia page id and the wikidata item.
Many thanks, Chris 50.135.235.126 (talk) 20:45, 15 June 2014 (UTC)
- That would probably be in the wikidata dumps - http://dumps.wikimedia.org/wikidatawiki/20140612/ Bawolff (talk) 21:15, 15 June 2014 (UTC)
- Thank you -- yes, I've looked there. I was hoping/expecting that the XML dumps for the two pages I listed would list those links but I have not found them in those schemas. I'll download the *.sql files and perhaps they are there. 50.135.235.126 02:57, 17 June 2014 (UTC)
Mediawiki: 1.23.0 PHP: 5.5.11 (apache2handler) MySQL: 5.6.16
Import failed: Expected <mediawiki> tag, got
I keep receiving this everytime I try and upload a template to my wiki on my computer (thats intranet based). I do need as much information as you can give me. Thank you very much. 86.166.58.46 (talk) 22:20, 15 June 2014 (UTC)
- You haven't given us very much information to help you. Where did you get the template from? What does the start of the file you're trying to import look like? ☠MarkAHershberger☢(talk)☣ 03:30, 16 June 2014 (UTC)
runJobs.php stop working?
I am running MW 1.23.0 on centos with following environment: PHP 5.4.27 (fpm-fcgi) MySQL 5.6.17.
User report the wiki stop from update template. Then I realized that php runJobs.php stop working after I upgrade MW to 1.23.0. Deletedaccount4567435 (talk) 22:32, 15 June 2014 (UTC)
- I "TRUNCATE" the job table then rerun php runJobs.php, everything works fine now. I guess the job table was damaged while upgrading. Zoglun (talk) 23:16, 15 June 2014 (UTC)
- Hi!
- runJobs.php in fact executes tasks, which are stored in the job table. It is no wonder that runJobs.php works correctly, when this table is empty - it then has nothing to do. ;-) 88.130.120.80 11:33, 16 June 2014 (UTC)
- Oh, after "TRUNCATE" I modified some template to create some jobs. And those jobs runs well. So I guess the the job table was damaged during upgrade process. Zoglun (talk) 00:27, 14 July 2014 (UTC)
Webservices in Media Wiki
The Media Wiki is a nice solution and I have combined it with Semantic Wiki. But now I want to insert content through a webservice. All the extensions seem to be dead. Do you still have an extension or do you know where I can find information? I could make some myself, but if it is already there that would be great. BMWMPower (talk) 07:43, 16 June 2014 (UTC)
- What does "through a webservice" mean specifically? AKlapper (WMF) (talk) 08:45, 16 June 2014 (UTC)
- You can use the API to edit pages. Ciencia Al Poder (talk) 09:47, 16 June 2014 (UTC)
Add text into Footer
Hi Support community,
I need help to add a normal text into the footer. I read several methods like this or this. But nothing work.
I hope you can help me.
Yours Suriyaa Kudo (iSC Inc.) (talk) 14:30, 16 June 2014 (UTC)
- Where in footer you would only text? On every available skin or only on the standard skin? Florianschmidtwelzow (talk) 17:56, 16 June 2014 (UTC)
- Only in the footer in all skins. Suriyaa Kudo (talk) 14:07, 18 June 2014 (UTC)
Fatal error: Maximum execution time of 60 seconds exceeded in Database.php
I am attempting to reinstall MediaWiki that is currently running on Windows 2003 to a new host running on Windows 2008 R2. I keep getting the "Fatal error: Maximum execution time of 60 seconds exceeded in Database.php on line 459" error after performing a new install.
I have verified that the MySQL DB is up and running and I can connect to the database that my Wiki site is using.
The versions of the components that I installed on the new Window 2008 R2 (64 bit) server are:
- mediawiki-1.15.1
- apache_2.2.14 (32 bit)
- mysql-5.1.43 (32 bit)
- php-5.3.1 (32 bit)
Will the above configuration run on the 64bit version of Windows 2008 R2? If yes, any suggestions as how I can fix the error?
Any assistance with this will be greatly appreciated.
Thanks. 148.107.1.20 (talk) 17:16, 16 June 2014 (UTC)
- Hi!
- Bitness is downwards compatible, so 32 bit software generally runs fine on a 64 bit OS.
- I have not tested that myself, but it might be that your MediaWiki version is too old to run properly on PHP 5.3. As a workaround for the "Maximum execution time of 60 seconds exceeded" error you can set a higher value for max_execution_time in php.ini. Restart your webserver afterwards for your changes to take effect.
- Is MediaWiki - apart from that the max_execution_time is too low - working correctly? 88.130.120.80 21:22, 16 June 2014 (UTC)
- Hello! You get this error everytime you request a page of MediaWiki? Or only for some pages (have you an example?). You have installed MediaWiki new? Why you choosed 1.15? :P Can you try to use the newest 1.23 or legacy 1.22.7? Florianschmidtwelzow (talk) 05:47, 17 June 2014 (UTC)
- Thanks for helping me with this issue.
- Apart from the max_execution_time error, the MediaWiki is working correctly. I have increased the timeout to 120 seconds and it still comes back with the same error.
- I will try to upgrade to the newest version of the code.
- Thanks for all your help.
- Victor 148.107.1.20 15:44, 17 June 2014 (UTC)
- Yes, in your case I would upgrade MediaWiki as well. Please follow the guide at Upgrade.
- Should the maximum execution time still be too low then, you can try setting it to something ridiculously high (like 30 minutes or so) just to see, if it finishes at all, or if it finishes never. Was your server also slow with MediaWiki 1.15 (so that it might jst be higher requirements of the new software versions, which now make it hit the maximum execution time) or would you - from looking at your hardware - expect the wiki to be really fast? 88.130.70.40 15:53, 17 June 2014 (UTC)
jpg upload issue across all wikis
Product Version MediaWiki 1.16.5 PHP 5.4.4 (apache2handler) MySQL 5.5.25
I have several wikis hosted on this server. They are all internal only. I can upload pdf files just fine. I cannot upload jpg files to any of the wikis, which kind of rules out the LocalSettings.php file as being the issue. I hoped it was that.
Nothing on this server has changed in months. Not sure what it is doing all of a sudden or what is actually stopping the upload.
When attemping this in Chrome, I get the following error after the timeout:
Unable to load the webpage because the server sent no data. Reload this webpage Press the reload button to resubmit the data needed to load the page. Error code: ERR_EMPTY_RESPONSE
Thoughts? What other information do you guys need. Many thanks! 205.158.121.242 (talk) 20:03, 16 June 2014 (UTC)
- What is $wgFileExtensions set to? ☠MarkAHershberger☢(talk)☣ 20:22, 16 June 2014 (UTC)
- PDF don't generate thumbnails (usually), but JPG, PNG and GIF fimages do, and they're handled by MediaWiki. That's most probably the explanation as of why PDF files upload just fine.
- If your image is big, it may be a problem with the thumbnailer, that consumes too much memory while creating the standar thumbnail that's shown on the file description page, or if it takes a lot of time to complete the operation it may be killed by the server.
- If the problem is the particular image, try uploading a smaller one and see if it goes through. If not, the problem may be more general.
- To figure out what's happening, I'd recommend to set up a debug log as explained in Manual:How to debug just before uploading the file. You can then compare it to the debug log of uploading a PDF file. If you can't figure out what's happening, you can post here your debug log (put it between <pre></pre> tags if possible), only for the request that's performing the upload. Ciencia Al Poder (talk) 09:32, 17 June 2014 (UTC)
- .jpg and .jpeg are set to be accepted. This is happening on 5 different wikis on this server, not just one. That's the part that freaked me out.
- The images are less than 200k. That was my first thought too was the file size limit was being hit. Wish that was it.
- I'll turn on debugging and do some testing once I get into the office today. Thanks for your help guys. 74.140.34.51 13:08, 17 June 2014 (UTC)
- Here's an update. So I think it might be just one jpeg, or a combination of Apache needing restarted and a bad jpeg. At first I couldn't upload any jpegs, went and had debug logging to a file enabled and tried the original jpeg and my 2 other test jpegs again. The original jpeg resulted in the same issue, while the other 2 were able to be uploaded successfully.
- For my own curiosity, what would cause a jpeg to not be able to be uploaded? I can open it in picture viewer on my PC. Weird. 205.158.121.242 15:10, 19 June 2014 (UTC)
- Only the debug log may give you the answer :)
- If the file is somewhat big, the thumbnailer may consume a lot of memory and it may cause a problem depending on the amount of memory available on the server. In that case, if the debug log doesn't show something relevant, the apache error_log may give some hint. Ciencia Al Poder (talk) 19:31, 19 June 2014 (UTC)
Creating MediaWiki pages from Applescripts
Hi,
Just started to use MediaWiki, and must say that I have been very impressed. I using it for a private project to store notes on Academic sources.
Currently I am extracting the information for the sources from a bib file using applescripts. But I was wondering if there is any easy way of creating the pages from the applescripts rather than having the information dumped to the clipboard and then pasting it into MediaWiki?
As there seems to be a number of API Access Libraries for other languages, I had thought about writing the code in another language and just calling it from the applescript. Ideally though I would like to keep it as simple as possible, and have everything in the applescript.
If anybody has any ideas or examples that maybe of use, I would be very grateful.
Thank you M
MediaWiki 1.22.6 PHP 5.3.28 MySQL 5.5.34 Mildayan (talk) 08:52, 17 June 2014 (UTC)
- Hi!
- Your Applescripts are scripts, which you are running and they then do the things you want them to? In this case: Yes, if you use PHP, you can create pages and page content automatically. MediaWiki has an API for that purpose.
- See API:Login (for the case that you require being logged in in order to be allowed to edit) and API:Edit for more information! 88.130.70.40 09:27, 17 June 2014 (UTC)
- I'm not familiar with Applescript, but if it has ways that you can call URLs or send forms (and, yes, it looks like you can use Applescript to control Safari) then you can use the API to take care of all of this.
- Or, you could just use AppleScript + Safari to post regular web forms for logging in and editing the page. ☠MarkAHershberger☢(talk)☣ 14:01, 17 June 2014 (UTC)
- Thank you for your replies, very helpful and informative. It has given me a lot to think about. Mildayan (talk) 09:25, 19 June 2014 (UTC)
- If it can send web requests then it can likely be used to create bots. Lieutenant Aleksandr Reznov 12:06, 19 June 2014 (UTC)
down loads
Trying to download a baseball theme and my basic antivirus won't let it down load 68.188.161.74 (talk) 08:56, 17 June 2014 (UTC)
- Hi!
- I don't know where you have this theme from, who made and who hosted it. However, themes contain PHP code, images and so on and, yes, such files can contain dangerous stuff.
- Maybe you want to use virustotal.com to check the file or the URL by a number of scanners to see, if it is a false-positive or if it's really malicious. 88.130.70.40 09:18, 17 June 2014 (UTC)
mixed wiki-Site
HI,
i search a extension (or the code)
I like to creat a "company-intern" Wiki-Site example "costumer info or FAQ" Than i like some pages in 2 frames. The 1. Frame / part with the info from company-wiki.extern.com and the second frame with own text.
The idea is that the information from company-extern.wiki.com are automaticly updateted. in the comapany-intern.wiki.com
have anyone a idea ? 88.79.122.250 (talk) 13:15, 17 June 2014 (UTC)
- It sounds like you should look for a consultant (I'm one, but not available).
- That said, it isn't clear what you need. It sounds like you want your internal wiki site to display pages from the external wiki site with added information. For this, I would suggest loading the external site via Javascript and displaying it along side the internal wiki.
- Or, you could add JS so that when someone inside the company network who has access to the internal wiki is looking at the external wiki, they'll see a section of the page or a frame that contains the notes from the internal wiki. ☠MarkAHershberger☢(talk)☣ 14:10, 17 June 2014 (UTC)
Page formatting on interwiki transclusion is messed up
It's from Wikipedia, but not all pages do this. Common and Vector CSS pages have been copied and attributed.
http://en.lexipedium.org/wiki/George_Washington
Does anyone know what is causing this? Lieutenant Aleksandr Reznov 14:08, 17 June 2014 (UTC)
- It only happens on some of the pages. Lieutenant Aleksandr Reznov 00:03, 19 June 2014 (UTC)
[Question] Block Edit Unit Auto Confirmed?
Hey All,
What is the correct group permission to block EDIT until auto conformation after X days? And them Block personal pages and other perusal page stuff until they confirm there e-mail?
Thanks, -Bill 69.198.41.161 (talk) 21:45, 17 June 2014 (UTC)
- $wgEmailConfirmToEdit Ciencia Al Poder (talk) 09:45, 18 June 2014 (UTC)
- Hey Ciencia,
- Thank You, I have added that, but I was hoping to have institute some more finite control. For instance I only want autoconfirmed users to be able to edit but have no personal pages or other features they can use. But if they confirm there email I wanted them auto promoted to an "Email Confirmed" Group that would open that up.
- -Bill 69.198.41.161 15:11, 18 June 2014 (UTC)
Unused Users?
Is there a way to Auto remove users who have no content/contributions for over X Days? Or is need be can I Auto Merge them into a single UnUsed user?
Thank, -Bill 69.198.41.161 (talk) 21:53, 17 June 2014 (UTC)
- Hi Bill!
- Yes, use the maintenance script removeUnusedAccounts.php to remove unused accounts older than x days. Note that it will not touch accounts, which do have edits, but where the edits are older than x days. This would result in edits/revisions, which would no longer be associated to any user, which would break data integrity. If you also want to remove old users, which have edits, have a look at Extension:UserMerge. Edits of removed users are then all attributed to user "Anonymous". 88.130.100.202 22:47, 17 June 2014 (UTC)
- Thanks!! 69.198.41.161 15:19, 18 June 2014 (UTC)
Why is there no Edit Log?
Other logs keep certain kinds of activity in perpetuity but RecentChanges and WikiActivity purge after $wgRCMaxAge. So there is no way to see all of the edits for a historical date range or see the first edits on a wiki or wikia. Lysdexia (talk) 21:55, 17 June 2014 (UTC)
- Hi!
- I guess it's some kind of space/duplication issue: The recentchanges table basically contains a row for each revision, which duplicates those info already found in the revision table. Apart from that really old changes are no longer recent and so don't really fit into the recent changes page. Note that you are still able to view edits per page or per user - usually back to h very first edit in your wiki.
- On your own wiki you can additionally set $wgRCMaxAge accordingly so that stuff is kept more or less forever. 88.130.100.202 22:43, 17 June 2014 (UTC)
- You could see all edits for any date range by directly querying the database, look at the revision table Ciencia Al Poder (talk) 09:46, 18 June 2014 (UTC)
Blocking Link?
Hey All,
Is there a way to block adding Links for a period of time for new users?
Thanks, -Bill 69.198.41.161 (talk) 22:04, 17 June 2014 (UTC)
- With Extension:Abuse filter you can control with a rule the account age (since account creation) and the number of links added to an edit. Ciencia Al Poder (talk) 09:43, 18 June 2014 (UTC)
- What's the usecase? AKlapper (WMF) (talk) 09:55, 18 June 2014 (UTC)
- Hey Ciencia & AKlapper,
- That Extension seems crazy powerful! It looks like it can do a lot. Here is the usecase: A new user, autoconfirmed or Not, Email Confirmed or not, shall be prohibited from placing external links anywhere for 14 day. I would like new users to be aware of this so perhaps a note on any edit or creation panel that says your are a new suer and cannot do these things OR a pop up after submitting thats says hey your new and cannot place external links for 14 days.
- If there is any simpler method I would be willing to hear about it.
- Thanks,
- -Bill 69.198.41.161 15:29, 18 June 2014 (UTC)
[RESOLVED] Properties overview page
Hi,
After adding several new properties I checked the proporties overview page and could not see the new properties displayed there. Some of them appear when setting the list length to 20, changing the list to 500 they are disappearing. Then I tried a search to find the new properties but they are not found.
I am using version 1.22.7 of Mediawiki.
Could this be a bug in Mediawiki or the Semantic Mediawiki plugin? Januitgever (talk) 10:10, 18 June 2014 (UTC)
- It seems to work now! Januitgever (talk) 11:34, 18 June 2014 (UTC)
- It was probably a cache issue Ciencia Al Poder (talk) 09:37, 19 June 2014 (UTC)
System Messages not showing in AllMessages
Have recently exported MediaWiki namespace from one instance of MediaWiki and imported into two others (one for user testing) the other for production. The changed messages all moved OK and functionally they are there and work howevee we cannot see them under Special:AllMessages. Neither it original message nor the changed message show up. If you search for one e.g. Avatarupload-removesuccess It comes back not found. However you can still access it via the URL: e.g. MediaWiki:Avatarupload-removesuccess then you see the correct text. Also the revision history is correct on all three systems.
(cur | prev) 10:52, 14 March 2014 Emango-ea (Talk) . . (39 bytes) (+39) . . (Created page with "The photo has been successfully removed")
Is something needed to rebuild the AllMessage table?
The target systems are :
MediaWiki 1.22.7 (fda04d0) 19:27, 29 May 2014 PHP 5.3.10-1ubuntu3.11 (apache2handler) MySQL 5.5.31-0ubuntu0.12.04.1
The source of the messages:
MediaWiki 1.22.2 PHP 5.3.10-1ubuntu3.11 (apache2handler) MySQL 5.5.31-0ubuntu0.12.04.1 Tim A Harris (talk) 11:53, 18 June 2014 (UTC)
- Is that message actually being used? If the message is provided by an extension that's not installed on the target wiki, it won't show up there even if you create the page. Ciencia Al Poder (talk) 09:39, 19 June 2014 (UTC)
- Yes, that and many other - probably about 50 in total are being used. The extension is installed and is being used. They all work as expected. They just do not show up - either the original or the changed messages Tim A Harris (talk) 19:40, 25 June 2014 (UTC)
- What extension is that? Ciencia Al Poder (talk) 19:51, 25 June 2014 (UTC)
- https://www.mediawiki.org/wiki/Extension:SocialProfile
- It may be that it is limited just to this one extension. Is it helpful is we check that one one extension is impacted by this? Tim A Harris (talk) 06:04, 27 June 2014 (UTC)
- Seems to be a problem with that extension. Normally, extensions have their messages loaded from a single file (a single file for each language) but this one has language files dispersed on each submodule. Ciencia Al Poder (talk) 17:32, 27 June 2014 (UTC)
- What extension is that? Ciencia Al Poder (talk) 19:51, 25 June 2014 (UTC)
- Yes, that and many other - probably about 50 in total are being used. The extension is installed and is being used. They all work as expected. They just do not show up - either the original or the changed messages Tim A Harris (talk) 19:40, 25 June 2014 (UTC)
Second instance of mediawiki not loading
I have mediawiki on an internal server for one of my groups and it is running fine. I wanted to setup another wiki for a different internal group and I followed the instruction on how to do so on the following link http://sharkysoft.com/wiki/how_to_configure_multiple_MediaWiki_instances_on_a_single_host. The original install is on 192.168.10.25/mediawiki I am trying to add 192.168.10.25/mediawiki/itwiki, but when I point to that url I get redirected to 192.168.10.25/mediawiki.
Thanks in advance for your help. Itbladehq (talk) 17:25, 18 June 2014 (UTC)
- There is probably an .htaccess file in your top mediawiki directory that is causing this problem.
- You should move the /mediawiki/itwiki wiki to /itwiki instead of below the main one. ☠MarkAHershberger☢(talk)☣ 17:56, 18 June 2014 (UTC)
- Should I just install mediawiki again in a new directory? Itbladehq (talk) 21:24, 18 June 2014 (UTC)
- That would do it, yes. ☠MarkAHershberger☢(talk)☣ 22:12, 18 June 2014 (UTC)
- Should I just install mediawiki again in a new directory? Itbladehq (talk) 21:24, 18 June 2014 (UTC)
[Question] Batch Promote?
Is there a way from either the Site, CLI, or MySQL to batch promote users? Here is my Goal: I want to take all users who have confirmed there e-mail and "LITERALLY" promote them to a group. I have already read that the autopromote's Caveat is that id does not literally promote the user and thus when you search for users in said group, they will not actually appear.
-Bill 69.198.41.161 (talk) 17:55, 18 June 2014 (UTC)
- Hi :) Maybe you can use:
- https://www.mediawiki.org/wiki/Manual:$wgAutopromote
- ??? Florianschmidtwelzow (talk) 18:09, 18 June 2014 (UTC)
- Hey Florianschmidtwelzow,
- I had read that that does not Literally promote the user in the DB but rather treats them as the promoted user on the fly. I am looking for something that actually promotes the users.
- -Bill 69.198.41.161 15:18, 23 June 2014 (UTC)
- Hi Bill!
- I don't know of a solution for this currently. The maintenance script createAndPromote.php has the parameter --force, which adds groups to existing users. If you have a list of the users, to which you want to add the group, you can write a small script, which runs createAndPromote.php for each of them.
- Another option would be to do this directly via MySQL: SELECT the ID of all those users from the user table, who have user_email_authenticated unequal to NULL. Then add a row with the according user ID and the group name into the user_groups table. 88.130.93.156 15:50, 23 June 2014 (UTC)
[RESOLVED] Not able to press the "Save Page" button
Dear all,
I developed my website with Mediawiki. I don't think it's important to mention which version of it I have (or I might be wrong), but my problem is this: I modify the Mediawiki:Common.css in order to change the size of the upper-left logo; I put these commands:
- p-logo {z-index: 3; position: absolute; /*needed to use z-index */ top: 0; left: 0; height: 1000px; width: 1000px; overflow: visible; }
just to do some testing, and after saving the page, now I'm not able to press anymore the "Save Page" since the size of the picture/logo (it's not the picture the real problem, but it's position in the entire wiki page) overlaps the "Save Page" button (as you can note from the sketch of code, the dimension now is 1000x1000 pixels). Indeed, I cannot edit (and save) any other page, and most import the "Common.css" to restor the old size and so being able to edit the other pages. I think my situation is ridiculous, but I tried to solve this problem for half a day. Thank you in advance for your attenction,
Giovanni 145.120.14.49 (talk) 18:46, 18 June 2014 (UTC)
- You can edit that page by using the shortcut key
CTRL
+SHIFT
+E
, manually changing the URL to put theaction=edit
parameter there, or by just hitting thetab
key until you get to the link. You can also go to the history page with the same method and undo that edit. - To save the page, the shortcut is
CTRL
+SHIFT
+S
Ciencia Al Poder (talk) 19:29, 18 June 2014 (UTC)- Thank you very much Ciencia, you have been so efficient! Now I know something more, and the problem is solved!
- Have a great night (or day, whenever you are),
- Giovanni 145.120.14.214 22:51, 18 June 2014 (UTC)
Redirecting categories
I have searched without success for a definitive answer. Is it possible to merge two categories by using a redirect?
For example, I have articles in Category:March 10 and some in Category:10 March. I thought that redirecting Category:March 10 to Category:10 March would make the articles appear under 10 March. My attempts have so far failed. Is there a method or is it a case of fixing all the incorrect articles? Periglio (talk) 22:26, 18 June 2014 (UTC)
- No, this isn't possible. The articles are still in the "old" category, which, if you click on it in an article for example, will be redirected to the new.
- Look here:
- https://www.mediawiki.org/wiki/Help:Categories#Creating_a_category_page
- Last sentence :) Florianschmidtwelzow (talk) 05:45, 19 June 2014 (UTC)
LoginAuthenticateAudit hook return from invalid user
I have implemented the Fail2ban extension which uses the hook LoginAuthenticateAudit In its base function it works like a champ however I am looking to augment the function by including output from the hook when a user is entered that is not present in the database.
As of now:
- When logging into the wiki using a known user you get the expected return
- When logging into the wiki using an unknown user you do not get any return
My Question:
- Is there a way so determine a bad login attempt using an unknown user through the hook LoginAuthenticateAudit? 64.111.16.10 (talk) 00:01, 19 June 2014 (UTC)
- It looks like a better choice would be the AbortLogin hook. This hook is called just before the password is checked.
- But now that I've looked at the code, it looks like both hooks are called after the user's existance has been check and (if allowed) it has been auto-created.
- I think you would need a new hook called after attemptAutoCreate() returned. Let me know if you'd like to do this and we can try to get it added to core. ☠MarkAHershberger☢(talk)☣ 04:07, 23 June 2014 (UTC)
- A bit late to the party, did this get followed up? I am currently trying to log user authentication events too, having visibility on failed usernames would be a bonus when trying to detect brute force attempts. Nathan Catlow (talk) 14:58, 14 November 2016 (UTC)
Problem export -> import page with picture having a naming with accent character
I have a mediawiki on one server and now I want to import all the content to a new server so I export the database and the images directory to import them into the new installation in the new server
I have a problem with all the images files that have a naming with french caracter like "é" "è"....
When i look at the import from the database page Image:xxxx the image is not displayed because in the image directory it has a name with another character which replace the "é"
here is an exemple of my page visualisation
and when I clic on the link I have the following message
and here is the image directory aspect
How to solve this problem ? to replace all charactere into the image directory ? It is a long job ? 78.206.72.23 (talk) 11:29, 19 June 2014 (UTC)
- That seems to be an charset problem :) How you import/export the files? Simply copied? Florianschmidtwelzow (talk) 12:03, 19 June 2014 (UTC)
- with filezilla, I download the images directory from the cible mediawiki to my new mediawiki
- but in the images directory on the server (planet hoster) I see with filezilla that the image filename is already create with the special Latin character à + inside a cercle "c" instead of "é" expected
- So I think it is a problem when mediawiki writes into the image directory ?
- for the database I make a simple export of all tables with phpMyAdmin
- and the table description have been performed by installation of mediawiki in my new mediawiki
- the export sql file is a following :
- CREATE TABLE IF NOT EXISTS `wmat_image` (
`img_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT ,
- and the insert record is as following :
- INSERT INTO `wmat_image` (`img_name`, `img_size`, `img_width`, `img_height`, `img_metadata`,.........
- ('Intégration_Asterix_1_GEstibal.jpg', 122272, 706, 597, 0x613a313a7b733a32323a224d4544494157494b4.......
- Perhaps it is neceesary to set a specific $wg..... setting into the localSettings.php ?
- Could you explain me how database and image filename could be compatible ?
- Thank for the waiting answer 78.206.72.23 15:03, 19 June 2014 (UTC)
- It doesn't seem to be a problem with the database, but a problem with the server's filesystem capability to handle special characters.
- Have you tried to upload a new file with accents on the name, on the new server? Ciencia Al Poder (talk) 09:18, 20 June 2014 (UTC)
- yes, I try to upload a file including "é" into its filename and my new local server apache (wamp2.5) doesn't accept filename with this special character (the mediawiki displays one red error and doesn't accept the import)
- But I solved my problem by using the free software "Ant Renamer" which allow to rename by substitution of one string by another string all the filenames belonging to the image directory (directory that I downloaded from my remote mediawiki to my local mediawiki)
- But for correct fonctionning of the local mediawiki, my local directory image had to include the two types of filename (one with special character filename and one with no special character filename) Chantoune (talk) 10:45, 7 July 2014 (UTC)
- Yes, renaming files won't work because MediaWiki won't be aware of that change and all files will remain broken. You would also need to rename those files using the MediaWiki interface. Ciencia Al Poder (talk) 20:31, 7 July 2014 (UTC)
CollapsibleNav doesn't work when logged in
Site: http://www.pidgi.net/wiki/Main_Page MediaWiki 1.23.0 (though I've had this issue since at least 1.17) PHP 5.3.10-1ubuntu3.7 (apache2handler) MySQL 5.5.32-0ubuntu0.12.04.1 Skin is Metrolook, modified from Vector, and uses Extension:Vector for CollapsibleNav (it's deprecated now, I know, but since CollapsibleNav isn't in Vector skin anymore either, I'm still using it)
So, short and simple, CollapsibleNav doesn't work when the user is logged in, except on certain pages (it'll work on Special:Preferences, for example). When the user is browsing as a guest, it works no problem. Checking the source code of the pages, collapsibleNav is set as enabled, but none of the CSS classes are inserted later on. However, when inspecting the pages using Firefox's Element Inspector, there are two lines in the header that don't appear on the non-collapsing pages:
<script async="" src="src="/wiki/load.php?debug=false&lang=en&modules=jquery.checkboxShiftClick%2Chidpi%2ChighlightText%2CmakeCollapsible%2Cmw-jump%2Cplaceholder%2Csuggestions%2CtabIndex%7Cmediawiki.api%2Chidpi%2Chtmlform%2CsearchSuggest%2Cuser%7Cmediawiki.api.watch%7Cmediawiki.page.ready%7Cmediawiki.page.watch.ajax&skin=metrolook&version=20140619T142302Z&*"></script>
<script async="" src="/wiki/load.php?debug=false&lang=en&modules=ext.vector.collapsibleNav%2CeditWarning&skin=metrolook&version=20140619T142302Z&*"></script>
Any ideas on how to solve this issue? I'm thinking of recoding the skin to use mw-collapsible, but if there's a simple fix for this, that'd be nice. Immewnity (talk) 16:03, 19 June 2014 (UTC)
- Hi Extension:Vector has been merged into mediawiki so you know longer need the extension you just need to uninstall the extension and keep the settings that you have. 5.66.145.160 18:23, 19 June 2014 (UTC)
- and you need to upad all your extension for mediawiki 1.23 5.66.145.160 18:25, 19 June 2014 (UTC)
- I'm well aware of this. However, this has been an issue for quite a while (before Extension:Vector was merged), and just recently, CollapsibleNav was removed from core MediaWiki. Immewnity (talk) 20:28, 19 June 2014 (UTC)
- Hi CollapseNav was only removed from the side bars it still works. 90.208.129.60 09:07, 20 June 2014 (UTC)
- Try checking the code seeing if it is only enabled for IP only. 90.208.129.60 09:10, 20 June 2014 (UTC)
- I'm dealing with the sidebar here, so being that it was removed causes issues.
- What do you mean by "enabled for IP"? 99.181.164.173 14:52, 20 June 2014 (UTC)
- I'm dealing with the sidebar here, so being that it was removed causes issues.
- What do you mean by "enabled for IP"? Immewnity (talk) 16:07, 20 June 2014 (UTC)
- Because your saying that when loged in the CollapsibleNav does not work. But when your not loged in it does. So there has to be a code prevent loged in iser using CollaspibleNav. 90.208.128.219 00:30, 21 June 2014 (UTC)
- Except it does work on Special:Preferences, so that couldn't be the case. Immewnity (talk) 16:41, 21 June 2014 (UTC)
- You could try backing up your wiki and upload a new fresh copy of Mediawiki and add the bits from your backup. If LocalSettings.php was last updated in 1.17 do a fresh copy of LocalSettings.php and put the original data from your LocalSettings.php 90.208.128.219 00:32, 21 June 2014 (UTC)
- Hi how can I get the metrolook skin like your wiki because it looks really nice. 90.208.128.219 10:20, 21 June 2014 (UTC)
- It's currently a custom skin, I may spruce it up and release it at some point. However, it's really not coded very well in the backend, so I'd rather not release it right now. Feel free to email me if you'd like for me to send you what I've got. Immewnity (talk) 16:46, 21 June 2014 (UTC)
- I fear that I may have to do this... :/ Immewnity (talk) 16:42, 21 June 2014 (UTC)
- Hi how can I get the metrolook skin like your wiki because it looks really nice. 90.208.128.219 10:20, 21 June 2014 (UTC)
- Because your saying that when loged in the CollapsibleNav does not work. But when your not loged in it does. So there has to be a code prevent loged in iser using CollaspibleNav. 90.208.128.219 00:30, 21 June 2014 (UTC)
- Try checking the code seeing if it is only enabled for IP only. 90.208.129.60 09:10, 20 June 2014 (UTC)
- Hi CollapseNav was only removed from the side bars it still works. 90.208.129.60 09:07, 20 June 2014 (UTC)
- I'm well aware of this. However, this has been an issue for quite a while (before Extension:Vector was merged), and just recently, CollapsibleNav was removed from core MediaWiki. Immewnity (talk) 20:28, 19 June 2014 (UTC)
- and you need to upad all your extension for mediawiki 1.23 5.66.145.160 18:25, 19 June 2014 (UTC)
[RESOLVED] Broken Icons
Hello,
the icons of my wiki are disappear (e. g. the Log in-Icon). Version 1.23.0. 2003:5F:271F:C501:85F1:C8A9:9978:F31D (talk) 18:09, 19 June 2014 (UTC)
- Hello!
- Something went wrong there :) Can you check, what the value of #pt-login->background-image is? See skins/vector/components/personalMenu.less line 39 for vector skin (or your skinname, if you use a custom skin):
- https://github.com/wikimedia/mediawiki-core/blob/master/skins/vector/components/personalMenu.less#L39
- The data type is text/plain for the image in your case, correct is image/svg+xml, if i'm right :) Florianschmidtwelzow (talk) 07:47, 20 June 2014 (UTC)
- It works now! Danke! Vin 12:25, 20 June 2014 (UTC)
make impressum visible in closed wiki
hi there, I created a closed wiki but by keeping my wiki closed, "impressum" is also invisible? how can I make this page accessible for anyone and only this page? thx 92.225.7.167 (talk) 19:31, 19 June 2014 (UTC)
- Hi, for this you can use:
- https://www.mediawiki.org/wiki/Manual:$wgWhitelistRead
- Kind regards, Florian Florianschmidtwelzow (talk) 07:40, 20 June 2014 (UTC)
Re-sending Messages.
Having opened the Bit Message Program, it opens on the IN-Box. I then go to SENT Messages to see what I have previously sent/said and when I do it begins sending all the Previously sent messages again; despite them having already been acknowledged as received. 90.245.50.233 (talk) 09:57, 20 June 2014 (UTC)
- You may want to ask in a support forum for the "Bit Message Program" (whatever that is). This support desk on mediawiki.org is for the "MediaWiki" software. AKlapper (WMF) (talk) 12:09, 20 June 2014 (UTC)
Adding a drop down box to select items for entry into a record
Hi, I am building a knowledge-base which has categories such as "host country for the project". As some country names can be spelled differently (e.g Viet Nam and Vietnam) - I would like users to select country names from a pre-defined list and not enter these in just by text... otherwise they could type in a wrong name which won't show on the search.
Is something like data validation in excel available in an extension maybe?
Thanks! 193.240.11.211 (talk) 13:56, 20 June 2014 (UTC)
- You should look into the Extension:SemanticFormsSelect and Extension:SemanticForms. It seems like they'll do exactly what you need. ☠MarkAHershberger☢(talk)☣ 03:38, 23 June 2014 (UTC)
Media Viewer - Reasons for Very Unfavorable Opinion
I am a very frequent user of Wikipedia. Suddenly, without warning or explanation, pictures started to be displayed very differently than what I was accustomed to seeing. The following are the reasons for my very unfavorable response to your product.
-I originally thought the change was the result of maleware because there was no warning of the change. The animosity I felt and still feel from this perceived attack, especially after I extended so much unsuccessful effort looking for the associated malware, is forever attached to Media Viewer.
-My perception of malware was reinforced because "Wikimedia" & "Wikipedia" are almost identical. I was convinced "Wikimedia" was selected to intentionally be mistaken for the very well known "Wikipedia" making people feel it was a trusted Wikipedia product.
-There does not appear to be any gain from Media Viewer because the original long time display of pictures works very well and is about as simple and intuitive as it gets.
-The original Wikipedia picture viewer provides a very clean display and does not fill the screen with more unnecessary text, buttons, and black borders.
I other words, the manner in which Wikipedia previously displayed pictures worked very well and was not at all broken. I used it frequently for many years and resent a sudden unannounced change that does nothing positive. Somehow, you changed it without warning or explanation to something that does not have an equally clean uncluttered appearance without giving me any choice. I still do not know who Wikimedia is other than some entity that closely copies the Wikipedia appearance. Did Wikipedia intentionally decide to use your product?
Since both Malwarebytes and ESET in depth scans did not find any software installed without my knowledge, I have come to the conclusion the Media Viewer display is sent with a picture each time a picture is viewed. Nevertheless the malware scare and associated effort to find and remove it, left a very bad taste in my mouth for Media Viewer even though I do not like its cluttered appearance.
Thank you.
barryng@bellsouth.net 68.172.45.31 (talk) 06:28, 21 June 2014 (UTC)
- Hello!
- First: Wikimedia isn't malware or something, it's a non-profit organisation hosting many wikis, e.g. Wikipedia :)
- https://en.wikipedia.org/wiki/Wikimedia
- To Media Viewer (maybe i will use the shortcut MMV for MultiMediaViewer :)): There was an announcement, you can navigate from Wikipedia:News (https://en.wikipedia.org/wiki/Wikipedia:News) to Tech news and will see that section:
- https://meta.wikimedia.org/wiki/Tech/News/Latest
- "Media Viewer will be enabled by default on all wikis on June 19. Feedback is welcome." linking to the Mailing list wikitech with this message:
- http://lists.wikimedia.org/pipermail/wikitech-ambassadors/2014-June/000740.html
- So, feel free to say your opinion to Multimedia Team:
- https://www.mediawiki.org/wiki/Talk:Multimedia/About_Media_Viewer
- To the point, if MMV is useful: Thats a totally personally decision, i know, so it's ok, and it's super, that you share your opinion about MMV, but Wikipedia is a big project with much users, editors and contributors. So wikitech and Wikipedia administrators, users and all people must try to find a consens what is to do and what not. In case of MMV there was a long time, this feature was in beta tools available for users interested in testing new features. Of this users, the Multimedia team collects tons of opinions, the result you can find here:
- https://www.mediawiki.org/wiki/Multimedia/Media_Viewer/Survey
- So, most people find MMV really helpful, so the decision was to enable it as standard. But this isn't fixed, i think. If the opinions go to the other way, that most of people think, mmv isn't helpful, then it will be disabled or the critic points will be removed :) Please share your opinion on the discussion page i linked to show what you think.
- The old image page is still available from MMV, so you can use it :) But the main advantage of MMV, in my personal opinion, is, that i don't need to open the image page for each image i want to show big in any article. So no need anymore to click back to go to article, or click back and the next image to show a gallery in big or something else. Florianschmidtwelzow (talk) 15:22, 21 June 2014 (UTC)
extract the link-tree of one topic
I want to analyse some (mathematical) topics. For this purpose, I want to extract the link-tree of the topic, to get an overview over the depending subjects. These linked subjects I want to display in a graph. So I get a clearly representation, what I have to understand yet. Tools like wget and webspider do not work. Wget does only load the top-page, may be it is excluded as a robot. Webspider gets too much. Is there any other way, to extract the link-tree of only one topic, that works with wikipedia? Friedrich from Hamburg 92.227.6.235 (talk) 12:56, 21 June 2014 (UTC)
- Hello! Sorry, but i don't know, what you want to do :) Generally Wikipedia (or other wiki) articles are linked togehther. That means, that one article is linked to n-articles, mostly more than 2. That means, that a link tree will be extremly big, if you haven't any other conditions (thats why a webspider is too much ;)). But without more information, what you want to do, i see no other way as a webspider :) Florianschmidtwelzow (talk) 05:13, 23 June 2014 (UTC)
- Hello Florian,
- yes you are right. Now I made some investigations with webspider and Xenu, and got several 10000 links for only depth=3. To deal with that, I have to use constraints very early. With the useful data, I intend to build a graph semi-automatically which contains Terms, URL's and some explaining text. At the moment, I try yEd and GraphML, I do not use a database, what seems to me to be oversized yet.
- Friedich 78.49.58.49 21:31, 24 June 2014 (UTC)
best option for multilingual full text search engine with easy to integrate.
We are planning to build a mediawiki based private multilingual wiki (need user name and password to login)site for our researching team members, with about 15k pages, it is very dynamic (content is constantly updated), we are looking for a better way to improve the search function in our private wiki. We would like the full text search function and can return a more accurate and relevant result.
what is the best option for a full text search engine (multilingual), and easy to integrate with mediawiki. Condense100 (talk) 00:10, 23 June 2014 (UTC)
- Wikipedia uses Cirrus and (in the past) Lucene. Those would probably work. ☠MarkAHershberger☢(talk)☣ 03:34, 23 June 2014 (UTC)
- hi, thanks for the info,
- just went through the cirrus installation guide, the guide is quite vague, i tried to install elasticsearch a few times, but all failed.
- is there a detailed tutorial to guide user integrate elasticsearch with mediawiki?
- thanks! Condense100 (talk) 18:51, 25 June 2014 (UTC)
- I really don't know of one. Maybe we could create one together -- I haven't done it before, but I have enough hubris to think that I could help. ☠MarkAHershberger☢(talk)☣ 19:32, 25 June 2014 (UTC)
- i would love to if i can make it up and running. i have been trying to integrate with elasticsearch and mediawiki for a while, never get succeeded. that is what i am looking for help here. Condense100 (talk) 22:57, 25 June 2014 (UTC)
- Please email me and I'll see if I can help. Be warned, though, that I'm going to be learning the set up at the same time as you. As far as I know, there are only a handful of people who've set up ElasticSearch with MediaWiki. ☠MarkAHershberger☢(talk)☣ 13:39, 26 June 2014 (UTC)
- thanks, i may give solr a shot, see if it works. Condense100 (talk) 18:41, 6 July 2014 (UTC)
- Please email me and I'll see if I can help. Be warned, though, that I'm going to be learning the set up at the same time as you. As far as I know, there are only a handful of people who've set up ElasticSearch with MediaWiki. ☠MarkAHershberger☢(talk)☣ 13:39, 26 June 2014 (UTC)
- i would love to if i can make it up and running. i have been trying to integrate with elasticsearch and mediawiki for a while, never get succeeded. that is what i am looking for help here. Condense100 (talk) 22:57, 25 June 2014 (UTC)
- I really don't know of one. Maybe we could create one together -- I haven't done it before, but I have enough hubris to think that I could help. ☠MarkAHershberger☢(talk)☣ 19:32, 25 June 2014 (UTC)
Creating a skin based on monobook.
Hi, I've been following the guide at:
http://www.mediawiki.org/wiki/Manual:Skins/Meta#Creating_a_Skin_based_on_MonoBook_.281.6.x.29
Unfortunately, I cant tell which version of Monobook is current, I've noticed that MediaWiki has been evolving a lot lately so a skin I make on a new version wont work on a slightly older one.
I've finally got a skin together which looks and feels like the monobook skin, it's using the tutorial above, but it's just missing a few styles and I cant seem to figure out where those styles come from.
E.g. this line that manages the tabs at the top of the page ('page', 'discussion', 'edit', etc)
ul {
line-height: 1.5em;
list-style-type: square;
margin: .3em 0 0 1.5em;
padding: 0;
/* @embed */
list-style-image: url(bullet.gif);
}
Is there a way to turn a debug mode on that will allow me to seperate the way mediawiki calls its scripts? right now it's using load.php to pull is masses of files, this makes it difficult for me to debug my skinning issues.
I look forward to hearing from you. It would also be great if somebody upgraded the Skinning guides so that they'll work with the latest version of mediawiki.
My mediawiki verion: 1.23 Staging: http://thinkstaging.com/showcase/actwiki/index.php?title=Guide_to_Risk_Management Vmodha (talk) 14:05, 23 June 2014 (UTC)
- Hi!
- The content on Manual:Skins/Meta is as old as MediaWiki 1.6 - it is completely outdated nowadays.
- Instead, Manual:Skinning/Tutorial has more current information. If I were you, I would start with a copy of the skin (monobook, vector, the one you want) and give it a name (directoy name in skins/, name of the PHP file (MySkin.php or however you call the skin). Then in this PHP file, in the upper part of the file, change the name of the skin to what you have chosen (the are some variables) and change the name of the classes inside that file. Also adjust the argument inside the addModuleStyles() call. In LocalSettings.php add RessourceLoader information, basically copying the lines from resources/Resources.php, which are there for Monobook/Vector. 88.130.93.156 16:05, 23 June 2014 (UTC)
$wgResponsiveImages causing issues for SVG thumbnailing
MediaWiki: 1.23.0
PHP: 5.3.10-1ubuntu3.11 (apache2handler)
MySQL: 5.5.32-0ubuntu0.12.04.1
Example of error: http://www.pidgi.net/wiki/File_talk:Mario_Kart_TV_logo_(alt)_-_Mario_Kart_8.svg
The code speaks for itself. srcset=" 1.5x, 2x"
Nothing is being generated for these, leaving the image as a broken link in browsers that support the property and fit the criteria. Immewnity (talk) 03:57, 24 June 2014 (UTC)
- Reported here: https://bugzilla.wikimedia.org/67081 ☠MarkAHershberger☢(talk)☣ 14:25, 25 June 2014 (UTC)
- Could you respond to Brion's question here?
- What does the debug log say during rendering? ☠MarkAHershberger☢(talk)☣ 00:38, 26 June 2014 (UTC)
- I'm honestly a bit confused on how to set up a debug log (do I just add the line to LocalSettings? How does it get permissions then?), but I posted all that I could in there. Immewnity (talk) 02:51, 26 June 2014 (UTC)
- First, add
- I'm honestly a bit confused on how to set up a debug log (do I just add the line to LocalSettings? How does it get permissions then?), but I posted all that I could in there. Immewnity (talk) 02:51, 26 June 2014 (UTC)
error_reporting( -1 ); ini_set( 'display_errors', 1 );
to your LocalSettings.php file and see if any errors are displayed. If none are, try enabling debugging and see if the file shows you anything. ☠MarkAHershberger☢(talk)☣ 13:33, 26 June 2014 (UTC)
- Only error was about skin autodiscovery, which I'm going to fix soon.
- For enabling debugging, do I have to create the file myself, or does MediaWiki create it when it logs errors? Immewnity (talk) 19:39, 26 June 2014 (UTC)
- MediaWiki will create the debug log itself if it has permissions to create the file in the directory you give it. ☠MarkAHershberger☢(talk)☣ 03:02, 27 June 2014 (UTC)
[RESOLVED] Error: 1054 Unknown column 'user_password_expires' in 'field list'
I recently updated a series of wikis from 1.22 something to 1.23, which includes running the update scripts. Aside from the fact that there are skin problems, I've encountered an error while logging in.
Function: User::loadFromDatabase Error: 1054 Unknown column 'user_password_expires' in 'field list'
I've checked the database and there is no such column in the user database - there's none in all of the wikis.
According to Manual:User_table, this is a new feature. So why wasn't it generated in the update script? Fereal (talk) 09:27, 24 June 2014 (UTC)
- Is your user table shared between databases? This may apply to you: Manual:Shared database#Upgrading Ciencia Al Poder (talk) 11:22, 24 June 2014 (UTC)
- Disregard this question, I managed to fix it.
- Yep, I was using shared database. I just disabled it then re-run the update script. Fereal (talk) 11:31, 24 June 2014 (UTC)
watchlist page mysql_data_seek warnings
If Special:Watchlist has nothing to show to user, some warnings appear.
#0 DatabaseMysql->mysqlDataSeek() called at […/mediawiki-1.23.0/includes/db/DatabaseMysqlBase.php:377] #1 DatabaseMysqlBase->dataSeek() called at […/mediawiki-1.23.0/includes/specials/SpecialWatchlist.php:320] #2 SpecialWatchlist->outputChangesList() called at […/mediawiki-1.23.0/includes/specialpage/ChangesListSpecialPage.php:332] #3 ChangesListSpecialPage->webOutput() called at […/mediawiki-1.23.0/includes/specialpage/ChangesListSpecialPage.php:70] #4 ChangesListSpecialPage->execute() called at […/mediawiki-1.23.0/includes/specials/SpecialWatchlist.php:79] #5 SpecialWatchlist->execute() called at […/mediawiki-1.23.0/includes/specialpage/SpecialPage.php:379] #6 SpecialPage->run() called at […/mediawiki-1.23.0/includes/specialpage/SpecialPageFactory.php:503] #7 SpecialPageFactory::executePath() called at […/mediawiki-1.23.0/includes/Wiki.php:285] #8 MediaWiki->performRequest() called at […/mediawiki-1.23.0/includes/Wiki.php:588] #9 MediaWiki->main() called at […/mediawiki-1.23.0/includes/Wiki.php:447] #10 MediaWiki->run() called at […/mediawiki-1.23.0/index.php:46] <br /> <b>Warning</b>: mysql_data_seek() [<a href='function.mysql-data-seek'>function.mysql-data-seek</a>]: Offset 0 is invalid for MySQL result index 135 (or the query data is unbuffered) in <b>…/mediawiki-1.23.0/includes/db/DatabaseMysql.php</b> on line <b>186</b><br /> #0 DatabaseMysql->mysqlDataSeek() called at […/mediawiki-1.23.0/includes/db/DatabaseMysqlBase.php:377] #1 DatabaseMysqlBase->dataSeek() called at […/mediawiki-1.23.0/includes/specials/SpecialWatchlist.php:325] #2 SpecialWatchlist->outputChangesList() called at […/mediawiki-1.23.0/includes/specialpage/ChangesListSpecialPage.php:332] #3 ChangesListSpecialPage->webOutput() called at […/mediawiki-1.23.0/includes/specialpage/ChangesListSpecialPage.php:70] #4 ChangesListSpecialPage->execute() called at […/mediawiki-1.23.0/includes/specials/SpecialWatchlist.php:79] #5 SpecialWatchlist->execute() called at […/mediawiki-1.23.0/includes/specialpage/SpecialPage.php:379] #6 SpecialPage->run() called at […/mediawiki-1.23.0/includes/specialpage/SpecialPageFactory.php:503] #7 SpecialPageFactory::executePath() called at […/mediawiki-1.23.0/includes/Wiki.php:285] #8 MediaWiki->performRequest() called at […/mediawiki-1.23.0/includes/Wiki.php:588] #9 MediaWiki->main() called at […/mediawiki-1.23.0/includes/Wiki.php:447] #10 MediaWiki->run() called at […/mediawiki-1.23.0/index.php:46] <br /> <b>Warning</b>: mysql_data_seek() [<a href='function.mysql-data-seek'>function.mysql-data-seek</a>]: Offset 0 is invalid for MySQL result index 135 (or the query data is unbuffered) in <b>…/mediawiki-1.23.0/includes/db/DatabaseMysql.php</b> on line <b>186</b><br />
91.192.150.18 (talk) 10:34, 24 June 2014 (UTC)
- Confirmed and filed as bug 67025.
- If you install the mysqli driver PHP extension instead of using the normal mysql driver (which is now obsolete), this error doesn't happen. Ciencia Al Poder (talk) 11:49, 24 June 2014 (UTC)
- The bug has been fixed. It should be fixed in MediaWiki 1.23.1 to be released this Thursday. Ciencia Al Poder (talk) 09:46, 25 June 2014 (UTC)
Which maintenance script can re-save every article?
The extension Extension:PageImages works by tagging pages in the page_props table after saving them. Which means that existing pages prior to the extension's activation are not tagged.
Which maintenance script can 're-save' all articles to trigger the extension's hooks?
Thanks. Fereal (talk) 15:45, 24 June 2014 (UTC)
- You can use one of the rebuild*.php scripts if i remember correctly. I don't know which script i used after installing PageImages, but i think it was rebuildall.php :/ Florianschmidtwelzow (talk) 15:58, 24 June 2014 (UTC)
- Thanks, rebuildall works. Fereal (talk) 16:13, 24 June 2014 (UTC)
Sending attachments via contact form (emailForm)
Hi,
I've successfully got a contact form working in my company's Wiki, which emails support directly. But now we've got a request to attach files to the email via the contact form. Any clue how to get attachments working in MediaWiki's email form? The only button I can get it to create is "submit"...
Thanks for any ideas out there. 216.75.199.248 (talk) 18:47, 24 June 2014 (UTC)
- Hi, which extension you use? I haven't understand for now, what you want to do with the uploaded pictures. Copy to a shared folder? Send via E-Mail? Upload to wiki in category Uploads maybe? Florianschmidtwelzow (talk) 10:44, 25 June 2014 (UTC)
- First, you would need to upload the file. See includes/specials/SpecialUpload.php for code that you will have to copy and adapt for that.
- Next, you'll have to fetch the file that someone has uploaded. See WebRequest::getFileTempname() and other functions in includes/WebRequest.php for that.
- Finally, you'll have to attach the file to your email. As far as I know, there isn't a core function of MediaWiki that does this. After poking around on packagist to find something you could use, it looks like this mime-mailer would be something you could use. ☠MarkAHershberger☢(talk)☣ 13:55, 25 June 2014 (UTC)
Preventing Multiple User Accounts
I have a website that allows users to create an account to access certain functions within the website.
I also want to have a wiki setup on my website that uses these accounts, which records for which exist on my own custom user mysql table, instead of the normal mediawiki user account tables.
How would I go about setting that up? Is it even possible?
Thanks. 158.82.202.5 (talk) 20:22, 24 June 2014 (UTC)
- Yes, it is possible. You may have to write your own code, but it is possible. I suggest looking at the code for Auth_remoteuser to see what is needed. ☠MarkAHershberger☢(talk)☣ 21:39, 24 June 2014 (UTC)
Display Searchmatches bold
Hey everybody, I use the Vectorskin and want if i'm searching something that the searchmatches are displayed bold. I found the css code .searchmatch { font-weight: bold; } but my Wiki doesn't use this code. If i use firebug the words which are searchmatches, are not marked as searchmatches. What did i miss? Thx for your help! 46.140.22.222 (talk) 09:11, 25 June 2014 (UTC)
- Hello! Can you provide the link to your wiki? Which version you have and which extensions you have installed? Have you tried the search without any extension? Florianschmidtwelzow (talk) 10:42, 25 June 2014 (UTC)
- Hi, no i can't. The wiki is unfortunately not reachable from outside ;) my Version: Mediawiki 1.22.6 PHP 5.5.11. I'm not using any search extention. 46.140.22.222 14:42, 25 June 2014 (UTC)
- Hi, sorry for the long time :) I have installed MW 1.22.6 locally and the searchmatches are bold there :) Have you changed anything in Vector or use some extensions, that maybe changed the stylesheet? Are you sure, that .searchmatches does not have bold as font-weight? Florianschmidtwelzow (talk) 14:18, 28 June 2014 (UTC)
- Hey, no problem ;) i have allways problems that noone else has... i use the following extentions: WYSIWYG extension ,Validator, Preloader , FancyBoxThumbs ,SearchBox,Recently Created Page List,ParserFunctions ,MsUpload,Arrays,Template Edit,Semantic Result Formats,Semantic MediaWiki ,Semantic Image Input ,Semantic Forms Inputs,Semantic Forms ,Semantic Extra Special Properties,Semantic Bundle.
- It is set .searchmatches {font-weight: bold}.. 46.140.22.222 15:24, 1 July 2014 (UTC)
- Hey, i found the settings which prevented the searchmatches from being displayed bold. And i found out that the serach engine only searches in page titles when i'm logged in as admin. Can i set a permission that the users see too the results of the search in page titles?
- Thx alot for your help! 46.140.22.222 10:16, 2 July 2014 (UTC)
- What configuration setting handles this (what you changed?)? :o
- The second question i don't understand, sorry :/ Florianschmidtwelzow (talk) 11:40, 2 July 2014 (UTC)
- I set $wgAdvancedSearchHighlighting from true to false. And now the searchmatches are displayed bold :)
- When i'm logged in as administrator - the searchengine shows page title matches and page text matches. When i'm logged in as a user that i created with the Administrator, i see only page text matches. What could be the cause for that? 46.140.22.222 12:24, 2 July 2014 (UTC)
- Puhh :D I don't know this config, thanks for that!
- Normally every user can see the matches in title and body bold, sorry, i don't know any configuration that handles this, but maybe anyone other :) Florianschmidtwelzow (talk) 13:04, 2 July 2014 (UTC)
- Hi, sorry for the long time :) I have installed MW 1.22.6 locally and the searchmatches are bold there :) Have you changed anything in Vector or use some extensions, that maybe changed the stylesheet? Are you sure, that .searchmatches does not have bold as font-weight? Florianschmidtwelzow (talk) 14:18, 28 June 2014 (UTC)
- Hi, no i can't. The wiki is unfortunately not reachable from outside ;) my Version: Mediawiki 1.22.6 PHP 5.5.11. I'm not using any search extention. 46.140.22.222 14:42, 25 June 2014 (UTC)
how to design the 'Search result page' of a MediaWiki Skin?
Hi, I am trying to develop a simple MediaWiki skin based on Bootstrap 3. The skin is available at https://github.com/nasirkhan/mediawiki-bootstrap. For me it is important to have the responsive feature, and i tried to add this in the content pages. But the problem search result pages are using the core mediawiki style and it do not the responsive feature.
Can you tell me how can i design the 'Search result page' of my skin. Nasir Khan Saikat • talk • 09:52, 25 June 2014 (UTC)
- The content of the pages (like the search result page) is statically and can't skinned so easy. You can:
- change the template for search result page (needs core changes) -> not good
- change the css classes and ids with !important -> ugly
- But more options i can't see to do this :) Florianschmidtwelzow (talk) 10:40, 25 June 2014 (UTC)
- Thanks for the repoly Florianschmidtwelzow.
- There are ways to use the other several properties of the page so is there any way to load the view in my skin page and override the format?
- Am i the first person who is facing this issue? this options shohuld be supported be the code :( Nasir Khan Saikat • talk • 10:57, 25 June 2014 (UTC)
- Hello, nope :) The Specialpage search adds his contents directly to OutputPage, which's content is directly added as bodycontent in $data. So, without rewrite core functions and files you can only rewrite bodycontent (preg_replace, e.g.) if the search result page (Title class) is called or you use !important in css to overwrite the standard settings.
- You can try to fill a bug in bugzilla.wikimedia.org, maybe it's planned to enable skinning of special pages or it goes to the plan after the bug :) Florianschmidtwelzow (talk) 15:17, 25 June 2014 (UTC)
- Thanks for the suggestion. Will try to use some regular expressions to get a clean set of content. And I submitted a bug https://bugzilla.wikimedia.org/show_bug.cgi?id=67090 Nasir Khan Saikat • talk • 17:47, 25 June 2014 (UTC)
[RESOLVED for Git] Wiki revisions history --> SVN/Git/Hg repository?
Is it possible to export MediaWiki history into Subversion (Git, Hg, whatever) so later all newer MediaWiki-based wiki revisions could be updated (pulled) into that copy? I would expect that copy to be read-only without committing and pushing back to the wiki, that does not really matter. But is it possible? Thanks! 194.44.30.245 (talk) 21:28, 25 June 2014 (UTC)
- You mean the MediaWiki files, yes? Then yes, you can clone MW from git:
- https://www.mediawiki.org/wiki/Download_from_Git
- and pull the newest files again, if changed. BUT: This is the master, which isn't for production use, so i would say, that's better to download the latest stable snapshoot of MediaWiki. It's possible to checkout REL branches, but what you do when the branch changes (maybe from REL1_23 to REL1_24)?
- Another possible solution is to checkout the branch to a temporary location (e.g. /var/wiki/template) and copy the files to your production (e.g. /var/www/wiki) after a new version. Florianschmidtwelzow (talk) 05:31, 26 June 2014 (UTC)
- Thanks for the answer, but sorry I seem to have asked a confusing question. Let me try to explain the subject better. I would like to checkout not the source code of MediaWiki, but the "source" of a wiki content.
- For example, if my local wiki has two articles, let's say Foo and Bar, and just two edits at these two, then something like the following steps would be great (I prefer Mercurial, but the idea would be clear for SVN and Git):
hg clone %MY_LOCAL_WIKI_CONTENT_URL%
- to make a local dump of the wikihg up 1
- to update to the very first edit in the wiki, so my local dump working copy snapshot at this revision could have just file, let's say,articles/Foo
hg up 2
- to update the working copy so a newer edit could appear at the working copy,articles/Bar
- ... some time passes ... and then
hg pull / hg up
to sync with the latest wiki changes
- So, it's more about the wiki content dump to be able to navigate through revisions and particular content snapshots (it may be one of possible usages), not the wiki engine source code. 195.234.75.155 07:02, 26 June 2014 (UTC)
- Ok, then my first thought was right :D But:
- MediaWiki saves the articles and revisions not in files, the content is saved in a database, e.g. MySQL. So you need to export the database first. Alternative you can export the articles as XML and import them (with revisions if selected) in a new wiki (see Special:Export and Special:Import or using commandline). For further information to that, see:
- https://www.mediawiki.org/wiki/Manual:Importing_XML_dumps
- With git/svn or something else it would be simply impossible i think :) Florianschmidtwelzow (talk) 07:38, 26 June 2014 (UTC)
- Thanks! That matches what I want much closer. I've just played with the export feature and it looks very similar, yes, but very limited and not that configurable. However, it looks like the incremental changes could be exported only by writing a custom PHP script (MediaWiki stores revision diffs only, right?). If I could write such an extension, I guess I would write an SVN storage driver (or whatever it's called) so it could emulate a storage file system just querying the MediaWiki database, I think or something like that. Thank you again! 195.234.75.155 09:45, 26 June 2014 (UTC)
- MediaWiki stores the entire revision of a page in the revision table.
- Still, I've seen git frontends for MediaWiki before so I went looking. I came across Leviation which isn't the thing I remember, but maybe it will help you. ☠MarkAHershberger☢(talk)☣ 13:14, 26 June 2014 (UTC)
- >> MediaWiki stores the entire revision of a page in the revision table.
- Oops, I was not aware of this. I believed that it stores diffs only, and probably snapshots every N revisions to accelerate the history diffs computing.
- I've just took a little look at the Levitation project page at GitHub. Not sure how it works yet, and the project seems to be no longer maintained. However this stills makes some interest to me. Thank you! 195.234.75.155 07:55, 27 June 2014 (UTC)
- Hi. If you're interested in a particular working solution, please see my comment below. Thanks! 194.44.30.5 23:45, 18 July 2014 (UTC)
- I managed to do exactly what I want. To be honest, I thought that mirroring a wiki into a Git repository is the most advanced thing I could ever want for such a scenario, but this following method even allows to push wiki changes back to the wiki. It's all built around a Git built-in concept of remote helpers that can be treated as a sort of bridges between heterogenous systems. Nevertheless, I don't know how to fetch talk pages and categories, but I hope it won't be an issue in the future. So I came across this page and noticed a very similar thing. Here is the manual describing this remote helper also saying that it's a Git built-in. True, this extension is a part of the Git source code repository at Github. Since I couldn't manage to make it work under Cygwin, I had to install a virtual machine with Linux Mint (just a tiny personal preference) where all of necessary operations might be easier. And yes, this here are the commands that work for me:
$ sudo apt-get install libmediawiki-api-perl $ sudo apt-get install libdatetime-format-iso8601-perl $ sudo apt-get install git $ sudo apt-get install git-mediawiki $ git clone mediawiki::http://localhost:8080/wiki $ cd wiki
- The current known to me, after a short test, issues are:
- I have no idea how to fetch categories and the talk pages (didn't check templates, though)
- If you just commit, your local changes are signed with your Git identity information, but once you push back to the wiki, the changes are recorded by anonymous user. This seems to work well if you configure the MediaWiki remote helper.
- Didn't check what happens if you push changes to protected pages.
- Files seem to be not cloned/pulled as well, unfortunately.
- I hope to find how to deal with those issues, but I'm not sure :) 194.44.30.5 23:44, 18 July 2014 (UTC)
- Thanks! That matches what I want much closer. I've just played with the export feature and it looks very similar, yes, but very limited and not that configurable. However, it looks like the incremental changes could be exported only by writing a custom PHP script (MediaWiki stores revision diffs only, right?). If I could write such an extension, I guess I would write an SVN storage driver (or whatever it's called) so it could emulate a storage file system just querying the MediaWiki database, I think or something like that. Thank you again! 195.234.75.155 09:45, 26 June 2014 (UTC)
create account notification email is not been sent
I didn't receive a email after creating a new account. do i have to make any email configuration or does this mediawiki automatically? I guess, I need to set the smtp, imap or pop3 settings within my mediawiki but I don't know where to do this. Wdfgea (talk) 22:06, 25 June 2014 (UTC)
- Usually MediaWiki sends mail without further configuration.
- Since the area lot of mail spam those days, some hosts block outgoing connections to an SMTP port, so it may be a problem (MediaWiki can't connect to target mailserver).
- You may also need to configure $wgSMTP.
- Enabling a debug log may give you the error message (if any) when sending mail. Ciencia Al Poder (talk) 09:26, 26 June 2014 (UTC)
- there was nothing wrong with mediawiki. it had to do with my provider... thx 92.229.58.244 10:50, 26 June 2014 (UTC)
- Can you enable debugging and try to send a password reminder to yourself? So you can see, if there are any errors while try to send the E-Mail :)
- What E-Mail-Settings you have in LocalSettings.php? Refer to: https://www.mediawiki.org/wiki/Manual:Configuration_settings#Email_settings Florianschmidtwelzow (talk) 20:02, 26 June 2014 (UTC)
- there was nothing wrong with mediawiki. it had to do with my provider... thx 92.229.58.244 10:50, 26 June 2014 (UTC)
problems with uploading images
I tried to upload a file. this error appears: Could not store file "/home/webpages/tmp/php7qiVT9" at "mwstore://local-backend/local-public/a/a0/Buerochaos.jpg".
the image is in the list of files but i get a 404 error when trying to open it. 92.229.58.244 (talk) 10:54, 26 June 2014 (UTC)
- What are the permissions on your images directory? ☠MarkAHershberger☢(talk)☣ 11:50, 26 June 2014 (UTC)
- 777 92.229.58.244 13:11, 26 June 2014 (UTC)
- First, add
- 777 92.229.58.244 13:11, 26 June 2014 (UTC)
error_reporting( -1 ); ini_set( 'display_errors', 1 );
to your LocalSettings.php file and see if any errors are displayed. If none are, try enabling debugging and see if the file shows you anything.
- If your wiki is public, could you share the URL? ☠MarkAHershberger☢(talk)☣ 13:29, 26 June 2014 (UTC)
- php errors when trying to uplad.
- Notice: Undefined index: file-mime in /home/webpages/lima-city/creativeofficewiki/html/includes/upload/UploadBase.php on line 463
- Warning: fopen(): Filename cannot be empty in /home/webpages/lima-city/creativeofficewiki/html/includes/upload/UploadBase.php on line 379
- Warning: fread() expects parameter 1 to be resource, boolean given in /home/webpages/lima-city/creativeofficewiki/html/includes/upload/UploadBase.php on line 380
- Warning: fclose() expects parameter 1 to be resource, boolean given in /home/webpages/lima-city/creativeofficewiki/html/includes/upload/UploadBase.php on line 381
- Warning: fopen(): Filename cannot be empty in /home/webpages/lima-city/creativeofficewiki/html/includes/upload/UploadBase.php on line 997
- Warning: fread() expects parameter 1 to be resource, boolean given in /home/webpages/lima-city/creativeofficewiki/html/includes/upload/UploadBase.php on line 998
- Warning: fclose() expects parameter 1 to be resource, boolean given in /home/webpages/lima-city/creativeofficewiki/html/includes/upload/UploadBase.php on line 999
- Warning: fopen(): Filename cannot be empty in /home/webpages/lima-city/creativeofficewiki/html/includes/utils/ZipDirectoryReader.php on line 148
- Warning: ignore_user_abort() has been disabled for security reasons in /home/webpages/lima-city/creativeofficewiki/html/includes/Wiki.php on line 592 78.52.195.157 21:59, 26 June 2014 (UTC)
- Thanks for the errors.
- From looking at the errors, it looks like /home/webpages/tmp may not be writable by the webserver. Does it exist? What are the permissions?
- At least, that is the only scenario that I can see where the message "Notice: Undefined index: file-mime" would be generated -- the temporary upload file looks like it isn't being generated. ☠MarkAHershberger☢(talk)☣ 03:32, 27 June 2014 (UTC)
- i created the directory "tmp" manually and set it "777" but still the error: "An error was encountered when opening the file for ZIP checks."
- Upload permission have been set: "$wgGroupPermissions['user']['upload'] = true;" in Localsettings.php! 78.52.195.157 16:01, 27 June 2014 (UTC)
- At least this is a different error, right? Do you still have
error_reporting( -1 );
ini_set( 'display_errors', 1 );
- in your LocalSettings.php? What errors are displayed? ☠MarkAHershberger☢(talk)☣ 19:33, 28 June 2014 (UTC)
- Was there a resolution for this issue? I seem to be encountering the exact same circumstances on a private wiki which I just upgraded to the latest version of MediaWiki (1.23.2).
- Thanks! Davidgjohnson (talk) 16:34, 24 August 2014 (UTC)
- If your wiki is public, could you share the URL? ☠MarkAHershberger☢(talk)☣ 13:29, 26 June 2014 (UTC)
- I have the same problem
- and I suppose it is linked to the bug 66467 popen() in release 1.23 because i have the warning also
- http://i39.servimg.com/u/f39/11/21/54/71/import10.jpg
- Could you please explain clearly how to install the patch of bug correction and from where to dowload the patch code ? (sorry but i am not expert into mediawiki php) 78.206.72.23 13:09, 26 June 2014 (UTC)
- I give you a screen copy more completed:
- http://i39.servimg.com/u/f39/11/21/54/71/import11.jpg
- Could you please explain clearly how to install the patch of bug correction and from where to dowload the patch code ? (sorry but i am not expert into mediawiki php) 78.206.72.23 13:21, 26 June 2014 (UTC)
- You should be able to download 1.23.1 which was released last night and install it. It includes a fix for the popen() issue as well as other issues. ☠MarkAHershberger☢(talk)☣ 13:32, 26 June 2014 (UTC)
- > It includes a fix for the popen() issue as well as other issues.
- That is not entirely right. You should better say: "It includes a fix for the popen() issue as well as [a fix] for other issues." Having other issues in it would not be so great. ;-) 88.130.65.148 20:47, 26 June 2014 (UTC)
[RESOLVED]1.23.0 version : preference forms : no input available ?
I update the mediawiki from 1.22.5 to 1.23.0
in the all preferences displays : no input are possible : the radio buttons cannot be changed.... checkboxes cannot be check/uncheck signature cannot be enter .........all is static
I try on my server planet hoster PHP 5.3.28 Mysql 5.5.35.33.0 apache 2.2.27 : architecture x86-64 linux
The problem is the same on my local machine AMP 2.5 PHP 5.6.17 Mysql 5.5.12 apache 2.4.9 : platform vista 32 bits pack2 78.206.72.23 (talk) 12:02, 26 June 2014 (UTC)
- I suspect the problem can be resolved by switching skins. Try adding ?useskin=vector to the url for your wiki. Could you provide a link to your wiki? ☠MarkAHershberger☢(talk)☣ 13:35, 26 June 2014 (UTC)
- my remote mediawiki is installed into a private directory,
- I send you a private email
- I try your request : to put skin vector into my local mediawiki and also on my remote mediawiki by updating monobook by vector into the localSettings.php
but nothing changes -> no input into preferences are availble neither into my local or remote mediawiki
78.206.72.23 14:33, 26 June 2014 (UTC)- Please don't post passwords here.
- But thankfully, you didn't post the URL for your wiki. Instead of posting it, could you send me an email with it? ☠MarkAHershberger☢(talk)☣ 14:40, 26 June 2014 (UTC)
- This appears to be caused by the editmyoptions, but that permission was added in 1.22.
- Also found a bug with the interaction between editmyoptions and confirming my email address. ☠MarkAHershberger☢(talk)☣ 17:31, 26 June 2014 (UTC)
Resource Module ignoring @font-face in IE9
I'm using a skin with custom fonts, using MediaWiki's resource module system to load the stylesheet.
When testing in IE9 however, the font-face properties seem to be ignored by MediaWiki. By "ignored", I mean that IE9 doesn't even report CSS3117 when attempting to load cross-origin fonts from restricted hosts.
My current workaround is to flat out avoid the module (addModuleStyles()) and instead use the old addStyle() function to explicitly load the stylesheet.
I've tested other browsers and they work, it only fails on IE9 (possibly other IEs as well). Only tested on a skin, but since it uses the resource module, may affect extensions as well.
Anyone have a clue on how to fix? Fereal (talk) 16:32, 26 June 2014 (UTC)
0 doesnt work (allways)
{{PAGESINCATEGORY:{{PAGENAME}}}} doesnt work if the category name contains ' (it will display 0) - I have tested it here too (preview) at the Category:Chris G's botclasses Is there a solution? (Its {{PAGENAME}} which is the problem, because it works if you change it with the title in clear text). Christian75 (talk) 16:32, 26 June 2014 (UTC)
- I think there's a bug filed about {{PAGENAME}} outputting encoded entities for non-ASCII characters when used inside Parser functions. Will try to find it. Ciencia Al Poder (talk) 09:45, 27 June 2014 (UTC)
- There was a similar one. I've created bug 67196 Ciencia Al Poder (talk) 15:24, 27 June 2014 (UTC)
- A little late, but thanks :-) The bug is pretty old... Christian75 (talk) 08:08, 11 July 2014 (UTC)
- Well you know, when you write about it here, you never know who might see it and become interested in fixing it :) Bawolff (talk) 23:59, 11 July 2014 (UTC)
- A little late, but thanks :-) The bug is pretty old... Christian75 (talk) 08:08, 11 July 2014 (UTC)
- There was a similar one. I've created bug 67196 Ciencia Al Poder (talk) 15:24, 27 June 2014 (UTC)
Template protection on mediawiki
Hi could someone remove protection from this https://www.mediawiki.org/wiki/Template:Fmbox or lower it to semi protection because no longer high visable. 2.218.227.89 (talk) 19:37, 26 June 2014 (UTC)
- This still is one of the more important templates here. It is still transcluded in more than 200 pages. 88.130.99.191 22:51, 26 June 2014 (UTC)
- Ok then could someone change the rptotection to semi-protected please. 2.218.227.89 07:51, 27 June 2014 (UTC)
edit page not showing content
When trying to edit a page, or one of the sections of the same page, it doesn't display the content of the page, it just hangs or gets unresponsive. Any idea why is this happening? I have version 1.21. Thank you 131.94.133.87 (talk) 20:21, 26 June 2014 (UTC)
- Hi! Have you updated your MW version? Editing worked before, yes? Florianschmidtwelzow (talk) 20:47, 26 June 2014 (UTC)
- Hi! No, I have not updated my version. It just happened, and I have pages that are much larger and they load fine. Not sure what is causing it. Thanks!! 131.94.133.87 22:27, 26 June 2014 (UTC)
- I created a new page, and copy everything from the other one, and the new page works fine. 131.94.133.87 22:28, 26 June 2014 (UTC)
How to enable Extension:WikiEditor for mobile user by default?
I have noticed that by convert user agent in safari & chrome on iPhone could enable Extension:WikiEditor in editing interface. I would like to enable Extension:WikiEditor for mobile phone by default. How can I achive that? Deletedaccount4567435 (talk) 01:01, 27 June 2014 (UTC)
- Hello! There is no possibility to change the behavior with a configuration variable or something else. The deactivation of WikiEditor in some Browsers has a reason :)
- For iPhone in left-to-right languages the reason is "jQuery minimums", so i think older versions does not support all required jQuery functions, so error can occur, that's bad for the user experience :) The minimums you can see here (with some short explanation comments):
- https://github.com/wikimedia/mediawiki-extensions-WikiEditor/blob/388482c0b88163cd13fca76675808c75fd142218/modules/jquery.wikiEditor.js#L47
- Kind regards,
- Florian Florianschmidtwelzow (talk) 05:28, 27 June 2014 (UTC)
- I think he can change a setting so that a certain version or upwards can have it enabled. 2.218.227.89 07:49, 27 June 2014 (UTC)
- Hello :) And what configuration? Florianschmidtwelzow (talk) 09:55, 27 June 2014 (UTC)
- I think he can change a setting so that a certain version or upwards can have it enabled. 2.218.227.89 07:49, 27 June 2014 (UTC)
[RESOLVED] Add mime type for visio
Hallo, what else can be done in a media-wiki Vers. 1.21.1 installation with following problem. Wenn trying to load up a visio file of 262KB the process is quitted by :
- Upload warning
- File extension ".vsd" does not match the detected MIME type of the file (application/msword).
- Source file
- Source filename:
- Maximum file size: 64 MB (a file on your computer)
- Permitted file types: png, gif, jpg, jpeg, db, doc, docx, x
ls, xlsx, mpp, pdf, ppt, pptx, png, jpg, tiff, odt, odg, ods, odp, vcf, vsd, zip.
Tried in vain to add the extension .vsd as a mime type by adding :
1. following lines to /includes/mime.info image/x-vsd [BITMAP] application/visio application/x-visio application/vnd.visio application/visio.drawing application/vsd application/x-vsd image/x-vsd zz-application/zz-winassoc-vsd [GRAFIK]
2. following lines to /includes/mime.types application/visio vsd application/x-visio vsd application/vnd.visio vsd application/visio.drawing vsd application/vsd vsd application/x-vsd vsd image/x-vsd vsd
2b. only 'vsd' in line application/x-opc+zip docx dotx docm dotm potx ppsx pptx ppam pptm potm ppsm xlsx xltx xlsm xltm xlam xlsb dwfx xps vsd
3. following lines to /LocalSettings.php image/x-vsd [BITMAP]
application/visio application/x-visio application/vnd.visio application/visio.drawing application/vsd application/x-vsd image/x-vsd zz-application/zz-winassoc-vsd [GRAFIK]
4. following lines to .htaccess AddType application/vnd.ms-visio.viewer .vdx AddType application/visio .vsd AddType application/x-visio .vsd AddType application/vnd.visio .vsd AddType application/visio.drawing .vsd AddType application/vsd .vsd AddType application/x-vsd .vsd AddType image/x-vsd .vsd 153.96.220.2 (talk) 07:27, 27 June 2014 (UTC)
- in the .htaccess file the lines were replaced according to selfhtml
- http://de.selfhtml.org/servercgi/server/htaccess.htm
- hence
AddType application/vnd.ms-visio.viewer .vdx
- AddType application/visio .vsd
- AddType application/x-visio .vsd
- AddType application/vnd.visio .vsd
- AddType application/visio.drawing .vsd
- AddType application/vsd .vsd
- AddType application/x-vsd .vsd
- AddType image/x-vsd .vsd
- was replaced by
- AddHandler visio vsd
- AddHandler vnd.visio vsd
- AddHandler visio.drawing vsd
- AddHandler vsd vsd
153.96.220.2 09:31, 27 June 2014 (UTC)- Forgot to include the site:
- http://wiki.twistplusplus.de/index.php
- you need an account please registrate for the purpose 153.96.220.2 09:47, 27 June 2014 (UTC)
- If uploading to your wiki is controlled and you trust the people who have that privilege, you can use $wgVerifyMimeType to disable the mime checks.
- If this is a Unix server, try logging in and seeing what "file --mime-type VISIO-FILE" gives you. On my system, I get "application/vnd.ms-office".
- If you want MW to be able to differentiate between Visio files and MSWord files, try filing a bug. ☠MarkAHershberger☢(talk)☣ 12:15, 27 June 2014 (UTC)
- Thank you for the hint. Since it is an internal wiki, your suggestion could be implemented successfully.
- M. Linden 153.96.220.2 11:45, 30 June 2014 (UTC)
Common images feature request.
Feature request:
Hi could you update mediawiki to allow us to use common images without having to save them on our websites servers please. 94.197.122.80 (talk) 09:04, 27 June 2014 (UTC)
- Hello, can you clarify, what you want? :) Florianschmidtwelzow (talk) 09:52, 27 June 2014 (UTC)
- You can do this already using $wgAllowExternalImages. ☠MarkAHershberger☢(talk)☣ 11:40, 27 June 2014 (UTC)
mediawiki-1.23.1.tar.gz is broken
When i download "mediawiki-1.23.1.tar.gz" and try to extract it using 7-Zip, it gives error "unexpected end of archive" and that "the file is broken". What to do? Gaasha.naadia (talk) 11:01, 27 June 2014 (UTC)
- Works for me, from where you download MW? Can you retry to download the latest? :) Florianschmidtwelzow (talk) 11:09, 27 June 2014 (UTC)
- Is your problem solved? 101.62.2.208 12:04, 27 June 2014 (UTC)
- Still broken for me (haven't posted yet) 2001:558:6017:55:1BF:6428:ABF5:C823 20:34, 30 June 2014 (UTC)
- I don't know what is happening for you. However, the file http://releases.wikimedia.org/mediawiki/1.23/mediawiki-1.23.1.tar.gz is fine. 88.130.82.197 21:54, 30 June 2014 (UTC)
- I get that error it is to do with the README.mediawiki file 86.155.238.230 08:19, 1 July 2014 (UTC)
- Just ignor the error it still extracts the rest of the file it just has a problem with README.mediawiki because it is redirected to README. 86.155.238.230 08:20, 1 July 2014 (UTC)
- This file is a symlink. Don't ask me why they decided to add one - to me it seems useless. 88.130.82.197 08:50, 1 July 2014 (UTC)
- > to me it seems useless
- -> https://gerrit.wikimedia.org/r/#/c/27117/ ;) Florianschmidtwelzow (talk) 09:57, 1 July 2014 (UTC)
- So it has only been added for Github? Reads to me like a joke - for running MediaWiki it is really useless. 88.130.82.197 10:19, 1 July 2014 (UTC)
- This file is a symlink. Don't ask me why they decided to add one - to me it seems useless. 88.130.82.197 08:50, 1 July 2014 (UTC)
- Just ignor the error it still extracts the rest of the file it just has a problem with README.mediawiki because it is redirected to README. 86.155.238.230 08:20, 1 July 2014 (UTC)
- I get that error it is to do with the README.mediawiki file 86.155.238.230 08:19, 1 July 2014 (UTC)
- I don't know what is happening for you. However, the file http://releases.wikimedia.org/mediawiki/1.23/mediawiki-1.23.1.tar.gz is fine. 88.130.82.197 21:54, 30 June 2014 (UTC)
- Still broken for me (haven't posted yet) 2001:558:6017:55:1BF:6428:ABF5:C823 20:34, 30 June 2014 (UTC)
- Is your problem solved? 101.62.2.208 12:04, 27 June 2014 (UTC)
Florianschmidtwelzow (talk) 10:37, 1 July 2014 (UTC)
- Maybe we should remove the file because it is pointless having it if there is already a README file. 86.155.238.230 10:19, 1 July 2014 (UTC)
- But normal unzip programms can handle such symlinks, so in my opinion, it's ok to have one :) Much people maybe look at github for MediaWiki and found an unparsed Readme? :) For me, i had never problems with the symlink in zip, not in Windows 7, not in 8 or 8.1 and not on Ubuntu :) Florianschmidtwelzow (talk) 10:38, 1 July 2014 (UTC)
- Maybe we should remove the file because it is pointless having it if there is already a README file. 86.155.238.230 10:19, 1 July 2014 (UTC)
[RESOLVED] Sidebar menu does not update after upgrade to 1.23
Hi.
Wiki url: http://veiskillewiki.laiv.org/
Version: 1.23.0
I've recently upgraded the wiki from 1.20 to 1.23. Everything went pretty much as expected, but the Sidebar now show the default set of choices, and it does not seem to react to changes to MediaWiki:Sidebar
http://veiskillewiki.laiv.org/MediaWiki:Sidebar
I've tried purging pages, touching LocalSettings.php, truncating the objectcache table and set $wgUseDatabaseMessages to true as described on Manual:Interface/Sidebar#Changes_not_showing_up, to no avail.
Any assistance on this would be greatly appreciated. KristianS (talk) 13:03, 27 June 2014 (UTC)
- Hello! Have you enabled SidebarCache in LocalSettings? https://www.mediawiki.org/wiki/Manual:$wgEnableSidebarCache Florianschmidtwelzow (talk) 13:08, 27 June 2014 (UTC)
- Hi! $wgEnableSidebarCache is not defined in LocalSettings, so I assume that it uses the default settings of "false". KristianS (talk) 13:19, 27 June 2014 (UTC)
- Hello!
- Sorry for the late reply :) I have tested your Sidebar on MW 1.24 (newest git version) and it work :/
- In your wiki the message isn't updated too (http://veiskillewiki.laiv.org/index.php?title=Spesial%3AAlle+systembeskjeder&prefix=Sidebar&filter=all&lang=nb&limit=50). Now i have no idea, maybe you can update to 1.23.1 to fix some issues, maybe it help :( Florianschmidtwelzow (talk) 01:44, 29 June 2014 (UTC)
- Hi again.
- Thanks for the answer, you led me on to the right track. :)
- It turns out that I had to change the language-spesific Sidebar-page, in this instance http://veiskillewiki.laiv.org/MediaWiki:Sidebar/nb in order for the changes to take effect.
- I don't know why changes to the default page was not enough, but I assume that it might work on a wiki with english as default language.
- Again, thanks for the help. KristianS (talk) 07:27, 29 June 2014 (UTC)
- I have just added a few links on Manual:$wgEnableSidebarCache and Manual:$wgSidebarCacheExpiry and I have reworked Manual:Interface/Sidebar#Translations to include the hint in which case which Sidebar page will be used. 88.130.94.75 12:02, 29 June 2014 (UTC)
- Ähm, i'm confused, that is new, if i'm right. In my german wiki i have edited MediaWiki:Sidebar and the sidebar has updated. Again learned :) Thanks for your reply! Florianschmidtwelzow (talk) 12:32, 29 June 2014 (UTC)
- Hi! $wgEnableSidebarCache is not defined in LocalSettings, so I assume that it uses the default settings of "false". KristianS (talk) 13:19, 27 June 2014 (UTC)
$wgVectorUseSimpleSearch = false; Does not result in two (Go and Search) buttons after upgrading to 1.23.1
It looks like two buttons appear momentarily, but then just the "Go" option is left. Mike46V (talk) 18:29, 27 June 2014 (UTC)
- That is an intended change in behaviour: When JavaScript is enabled in the browser, then you are presented with one button just as you describe it. If JavaScript is not enabled, then you should see both buttons, between which the user can then choose. This should also be documented on Manual:$wgVectorUseSimpleSearch. Btw.: You already have the same behaviour in MW 1.23.0 as well. 88.130.99.191 20:46, 27 June 2014 (UTC)
- Thanks. Unfortunately, Manual:$wgVectorUseSimpleSearch has not been updated. I don't understand the purpose of the intended change in behavior. How would one force the two buttons, or as an alternative, disable the "Go" button in favor of just the "Search" button? In our environment, "Go" is undesirable. Mike46V (talk) 03:43, 28 June 2014 (UTC)
- I currently don't know of an option to do so. Technically the "Search" button is removed from output by some jQuery JavaScript. I think the class or ID, based on which this happens was called "searchPlaceholder" or something like that. You will be able to see it in the file skins/Vector.php where the searchbox is defined; that is rather at the bottom of that file. You might be able to change this behaviour by adding according code to the page MediaWiki:Common.js in your wiki. 88.130.78.225 07:18, 28 June 2014 (UTC)
- Meanwhile I have updated Manual:$wgVectorUseSimpleSearch to not only reflect the state of MediaWiki 1.16 - 1.22, but to also reflect the current state as of MediaWiki 1.23. 88.130.78.225 10:54, 28 June 2014 (UTC)
- Thanks. Unfortunately, Manual:$wgVectorUseSimpleSearch has not been updated. I don't understand the purpose of the intended change in behavior. How would one force the two buttons, or as an alternative, disable the "Go" button in favor of just the "Search" button? In our environment, "Go" is undesirable. Mike46V (talk) 03:43, 28 June 2014 (UTC)
NewSignupPage 5.0.5 (MW 1.23.1) no display of abort message shoutwiki-must-accept-tos
I install the new version of this extension (without the user_register_track table)
and never the abort message (in a fancy red
I input only
the convenient "Chapka"
the username, the password, and the confirmed password (no email input....)
when I submit: the form is refresh (keeping username and pass ) but without error message
I perform one test in adding to force : $wgGroupPermissions['*']['bypasstoscheck'] = false; in my local setting but amways no error message on submit Chantoune (talk) 12:39, 28 June 2014 (UTC)
- It is OK (the error message is displayed) on my remote machine on planet hoster PHP 5.3.28 (litespeed)
- but not OK on my local machine with wamp server 2.5 PHP 5.5.12 (apache2handler) Chantoune (talk) 12:56, 28 June 2014 (UTC)
[RESOLVED] Remove support for internet explorer 6 and 7
Hi can we remove support for internet explorer 6 and 7 because not a lot of people use it now and internet explorer 8 is supported on windows xp. and windows xp is not supported by Microsoft any more. and jquery ui has remove support for these two browser because there is not a lot of people using these browser and internet explorer 8 is supported on windows xp. Paladox (talk) 19:09, 28 June 2014 (UTC)
- The right place to ask this is wikitech-l. ☠MarkAHershberger☢(talk)☣ 19:25, 28 June 2014 (UTC)
- I don't understand why you created both a posting here and in Bugzilla. Just to make more people spend time pointing you again to wikitech-l? AKlapper (WMF) (talk) 21:51, 28 June 2014 (UTC)
Navbox not working 100%
I am working on a Wiki and trying to get the Navbox operating. I am very close example navbox
Most of the navbox displays correctly (show/hide, odd/even striping, table heading colors), except my lists are vertical. Also my groups headings are not picking up the table heading background color like it does in the Wikipedia navbox.
- MediaWiki: 1.22.2
- PHP: 5.3.10-1ubuntu3.12 (cgi-fcgi)
- MySQL: 5.5.37-0ubuntu0.12.04.1-log
- ParserFunctions: 1.5.1
Parser function hooks: anchorencode, babel, basepagename, basepagenamee, canonicalurl, canonicalurle, count, defaultsort, displaytitle, ev, evp, explode, expr, filepath, formatdate, formatnum, fullpagename, fullpagenamee, fullurl, fullurle, gender, grammar, if, ifeq, iferror, ifexist, ifexpr, int, language, lc, lcfirst, len, localurl, localurle, namespace, namespacee, namespacenumber, ns, nse, numberingroup, numberofactiveusers, numberofadmins, numberofarticles, numberofedits, numberoffiles, numberofpages, numberofusers, numberofviews, padleft, padright, pagename, pagenamee, pagesincategory, pagesize, plural, pos, protectionlevel, rel2abs, replace, rootpagename, rootpagenamee, rpos, special, speciale, sub, subjectpagename, subjectpagenamee, subjectspace, subjectspacee, subpagename, subpagenamee, switch, tag, talkpagename, talkpagenamee, talkspace, talkspacee, time, timel, titleparts, uc, ucfirst, urldecode and urlencode
We don't have Lua or Tidy installed, so I used the version recommended at http://en.wikipedia.org/wiki/Wikipedia:WikiProject_Transwiki/Template:Navbox (and the {navbar} over there as well). I don't have server side access, but I did copy the CSS (MediaWiki:Common.css) and script (MediaWiki:Common.js). I tried the ones from MediaWiki first then Wikipedia (not sure if they were the same), but both had the same result. I copied the navbox/doc subpage, so I know the formatting is correct. I copied {Flatlist} to our Wiki just in case it was required, and it is working fine, but the {navbox} is still vertical. I can see the .navbar and .hlist entries in the Common.css files I copied, so I am not sure what else I missed.
I am going to start creating some custom templates using the .hlist styles to see if I can determine what is not working from the CSS.
Any pointers or suggestions would be greatly appreciated. Kentsmith9 (talk) 16:51, 29 June 2014 (UTC)
- Here is a screenshot of a navbox on one of my wikis using the rules from your wiki I changed the border to red (the only change) just to verify that it's your wikis code being used, so it's apparent is not the .css rules. Mlpearc (open channel) 18:05, 29 June 2014 (UTC)
- The problem is your template is coded to be vertical. If you create a template like this then redo you template code thus
- Mlpearc (open channel) 18:26, 29 June 2014 (UTC)
{{Navbox | name = Navbox/doc | state = uncollapsed | title = [[USA]] | listclass = hlist | group1 = [[USA/Northwest|Northwest]] | list1 =[[Alaska]]{{•}}[[Idaho]]{{•}}[[Montana]]{{•}}[[Oregon]]{{•}}[[Washington]]{{•}}[[Wyoming]] | group2 = [[USA/Southwest|Southwest]] | list2 =[[Arizona]]{{•}}[[California]]{{•}}[[Colorado]]{{•}}[[Hawaii]]{{•}}[[Nevada]]{{•}}[[New Mexico]]{{•}}[[Utah]] }}
- You also need to copy the css codes from wikipedia for navbox and navbar. 86.155.238.230 22:01, 29 June 2014 (UTC)
- Hi please also upgrade to Mediawiki 1.23.1 please. And update your extensions. 86.155.238.230 22:03, 29 June 2014 (UTC)
- I did copy the css from wikipedia for both of those as noted above. Was this a "make sure" statement or did you see something missing? Kentsmith9 (talk) 22:40, 29 June 2014 (UTC)
- I'm confused. The Wikipedia entry for navbox/doc uses the same bullet list that I am using and said the {*} template was deprecated in favor of the hlist class. Is it not working for my wiki because Wikipedia is using the Lua version and I am using the older script? Kentsmith9 (talk) 22:39, 29 June 2014 (UTC)
- Since the Wikipedia template suggests prior use of the {flatlist} was replaced with hlist, I plugged the flatlist template around my current list and it is operating in a horizontal fashion. It must be that the older script has differences never solved with hlist that is used in the Lua version of the template.
- That also likely explains why my group headings are white (or transparent) and not colored like the Wiki navbox template shows with the same code example. Kentsmith9 (talk) 22:55, 29 June 2014 (UTC)
- And I forgot to say thanks! This definitely gives me a solution either way. Kentsmith9 (talk) 22:41, 29 June 2014 (UTC)
- I had some schooling also, I wasn't aware of {{Flatlist }}, we all got something :) thank you. Mlpearc (open channel) 04:17, 30 June 2014 (UTC)
- After more playing around I found the solution to the other problem. Because I was using the older non-Lua script, I think there may have been changes to the (Common.css) page. I found that my implementation of the navbox was not displaying the typical background color for the first level groups. It was staying transparent. Somehow the css was missing the ".navbox-group" entry for the color. It only had ".navbox-abovebelow, th.navbox-group, .navbox-subgroup .navbox-title". Once I added the ".navbox-group" to that entry, all was good in my Wiki. I expect once I add Lua and use that template this problem will likely disappear. Also I expect the hlist to begin working without the {flatlist}. Thanks again to Mlpearc! Kentsmith9 (talk) 06:52, 30 June 2014 (UTC)
- I had some schooling also, I wasn't aware of {{Flatlist }}, we all got something :) thank you. Mlpearc (open channel) 04:17, 30 June 2014 (UTC)
- You also need to copy the css codes from wikipedia for navbox and navbar. 86.155.238.230 22:01, 29 June 2014 (UTC)
Feature request: Support for <nav>-Elements
Hello,
Currently there is a support to directly type HTML elements like <div>
or <ul>
tags in mediawiki text. Are there plans to also add new HTML5 elements like <nav>
? This would be useful to mark navigation boxes (for example in the Wikibook project).
Greetings, Stephan Kulla (talk) 17:21, 29 June 2014 (UTC)
- Tracked in: bug 23932
- See also: bug 19719 and bug 64477 Florianschmidtwelzow (talk) 06:30, 30 June 2014 (UTC)
- @Florianschmidtwelzow: Thank you for the information! Stephan Kulla (talk) 14:48, 30 June 2014 (UTC)
Points of discussion before going on-line
Dear Sir,
I installed and configured MediaWiki.
Before going on-line I like to discuss next points.
I am creating New York Wiki for New York City organisations.
Sysop, users and guests are the groups.
The MainPage is blocked.
From DefaultSettings.php I copied line 4141 (@ name user rights) to line 4811 (end of user rights settings)
Permission ['*'] all True Permission ['user'] all True Permission ['bot'] all False Permission ['sysop'] all True Permission ['bureaucrat'] all True
Do you have any comment on this?
Thank you in advance.
hansie Hansie (talk) 17:52, 29 June 2014 (UTC)
- If you do not configure group permissions yourself, the default from DefaultSettings.php will be applied automatically - you do not have to copy it. Apart from that, information on how to configure user groups properly are available on page Manual:$wgGroupPermissions.
- You will e.g. find that the permissions of multiple groups are cumulative: If a user is member of different groups, then the user will get a right if it is granted to at least one of these groups - even if it is not granted to his other groups. That means you do not have to grant all available rights (like the "block" or the "delete" right) to all users - in fact I think that you might not want to give ordinary users special rights like these.
- Only grant special rights to the special groups. 88.130.94.75 21:13, 29 June 2014 (UTC)
- Thank you for your response.
- Which rights should I give ordinary users?
- hansie Hansie (talk) 06:55, 22 July 2014 (UTC)
- Supplementary question:
- Which rights should I give to "*"? Hansie (talk) 09:38, 22 July 2014 (UTC)
- The group "*" is automatically given to all users. Users, who are not logged in, are in this group (and in this group only). The group "user" is automatically assigned to all users, who are logged in. Since user group permissions are cumulative, these users will then have all permissions of group "*" and additionally those, which are assigned to group "user".
- Manual:User_rights#List_of_permissions is a list of all possible rights, which a user group can have. Which of them you want to give to e.g. the group "user", depends on what ordinary users should be able to do. See Manual:$wgGroupPermissions for details on how to assign permissions.
- Which rights which group currently has can be seen in your wiki on the page Special:ListGroupRights. The rights, which are assigned by default (meaning without you assigning anything special yourself), already are more or less fine for most wikis.
- As an example, if your wiki is publicly accessible and you then assign the group "*" the right to edit pages and to upload files, this will be a guarantee that you get spam en masse: In form of spammy pages and in form of trash uploads. You should better not do that. ;-) 88.130.118.211 12:19, 22 July 2014 (UTC)
- Please do not edit DefaultSettings.php. This configuration file includes, like the name say, default settings, so, if you update your MediaWiki version, this file will be override normally (and your changes are away). To define user rights and/or user groups, please use the LocalSettings.php and $wgGroupPermissions, like 88.130.94.75 explained. Additionally, you can use Manual:$wgRevokePermissions to revoke a permission for a special group (also, if this right is given by another group the user is a member of). Florianschmidtwelzow (talk) 06:16, 30 June 2014 (UTC)
- Hello Florian,
- What do you mean by "88.130.94.75"? It's a German IP address!
- Thank you,
- hansie Hansie (talk) 06:58, 22 July 2014 (UTC)
- I mean the user :) The IP adress has no user account, so his ip address is shown as username (that's the only possibility for me to refer to) :) I mean this post: https://www.mediawiki.org/wiki/Project%3ASupport%20desk/Flow/2014/06#c-88.130.94.75-2014-06-29T21%3A13%3A00.000Z-Hansie-2014-06-29T17%3A52%3A00.000Z Florianschmidtwelzow (talk) 07:41, 22 July 2014 (UTC)
I need html forms and Javascript in MediaWiki - Extension:CalcII doesn't work on newer MediaWiki Versions
Hello,
I need a tag extension for calculating in MediaWiki. I need an input field and an output (result) field. For calculating JavaScript should be ok. I found the extension calcII but it is for older MediaWiki-Versions. Can someone show me how to write a simple tag extension similar to calcII? I already read a lot about extensions but did't find out how to get JavaScript work to manipulate a form.
MediaWiki 1.19.3 PHP 5.3.3-7 MySQL 5.1.73-1
Thanks in advance!
Karsten 85.158.138.21 (talk) 07:07, 30 June 2014 (UTC)
- Hello,
- i think this is the right site for you:
- https://www.mediawiki.org/wiki/Manual:Developing_extensions
- I think, if i understand you right, you want to create a parser Extension? Then look, too, here: https://www.mediawiki.org/wiki/Manual:Parser_functions
- To create a form you can use Html Class or HtmlForm class. To add a JavaScript file to the head, you can use addScriptFile in class OutputPage (https://doc.wikimedia.org/mediawiki-core/master/php/html/classOutputPage.html#a5ecdfe5c2253e36c580e0187c46d8c43). And the other is: read, read, read, learn, learn, learn :)
- Hope that helps. Florianschmidtwelzow (talk) 07:41, 30 June 2014 (UTC)
- Hello Florian,
- thank you for the links and the hint with the classes. I now have the following code (where calculator.js has a function "delete_all()) but get an error "delete_all" is null:
<?php if ( !defined( 'MEDIAWIKI' ) ) { die( "This is not a valid entry point.\n" ); } $dir = __DIR__ . '/'; $wgExtensionMessagesFiles['Calculator'] = $dir . 'calculator.i18n.php'; $wgHooks['ParserFirstCallInit'][] = 'wfCalculator'; function wfCalculator(Parser $parser) { $parser->setHook( 'calc', 'renderCalculator'); return true; } function renderCalculator( $input, array $args, Parser $parser, PPFrame $frame) { global $wgOut; $wgOut->addScriptFile(__DIR__ . '/calculator.js', $wgStyleVersion); $wgOut->AddHTML('<form name="data";">'); $wgOut->AddHTML('<table bgcolor="#FFFFFF"><tr><td>'); $wgOut->AddHTML('<textarea name="tarea" cols="30" rows="10" wrap="off"/>'); $wgOut->AddHTML($input); $wgOut->AddHTML('</textarea></td><td><textarea name="result" cols="20" rows="10" value=""/></textarea></td></tr>'); $wgOut->AddHTML('<tr><td><input type="button" value="calculate" onclick="calculate()"/></td>'); $wgOut->AddHTML('<td><input type="button" value="delete" onclick="delete_all()"/></td>'); $wgOut->AddHTML('</tr></table>'); $wgOut->AddHTML('</form>'); $wgOut->AddHTML('</center>'); }
- When using mediawiki classes, do I have to import them with "$wgAutoloadLocalClasses"? I already studied a lot of other extensions but didn't find out how to get it work. 85.158.138.21 14:09, 30 June 2014 (UTC)
- Hello :)
- That what you do, is to add Text to the page, for this you don't need to use ParserFirstCallInit. I thought you want to create a tag, maybe <calculator> or something else :) Where you want to add the form to make clear to me, what you want :)
- P.S.: To add JavaScript Files to the page header, please use Manual:Hooks/BeforePageDisplay, there you get as first param the OutputPage class and you don't have to use the "ugly" global $wgOut :P Where you have saved the calculator.js and is it visible in source code of your page? :)
- > When using mediawiki classes, do I have to import them with "$wgAutoloadLocalClasses"?
- If you want to load a PHP class, then: yes :) Florianschmidtwelzow (talk) 15:44, 30 June 2014 (UTC)
- Hello,
- I have a an extension-folder "calculator" where I stored my php and my js-File. The calculator.js is not visible in source code of my page. I need a tag "calc" i.e. <calc>x^2+5</calc>. On the page the user should have an input-field where he can define x and a result field that contains the result of the formula after pushing a button. That's why I think a tag extension would be the right thing. So <calc>... in the source code should be replaced in the page by a form. 85.158.138.21 07:39, 1 July 2014 (UTC)
- Ah, sorry, i overlooked wfCalculator function, which is not correct, i think, please use:
function wfCalculator(Parser $parser) { $parser->setFunctionHook( 'calc', 'renderCalculator' ); return true; }
- And then add a function to the hook BeforePageDisplay to add your javascript file:
$wgHooks['BeforePageDisplay'][] = 'onBeforePageDisplay'; function onBeforePageDisplay( &$out, &$skin ) { $out->addScriptFile(__DIR__ . '/calculator.js', $wgStyleVersion); }
- After this you can implement your ParserHook:
function renderCalculator( $parser, $arg ) { $output = ''; $output .= '<form name="data";">'; $output .= '<table bgcolor="#FFFFFF"><tr><td>'; $output .= '<textarea name="tarea" cols="30" rows="10" wrap="off"/>'; $output .= $arg; $output .= '</textarea></td><td><textarea name="result" cols="20" rows="10" value=""/></textarea></td></tr>'; $output .= '<tr><td><input type="button" value="calculate" onclick="calculate()"/></td>'; $output .= '<td><input type="button" value="delete" onclick="delete_all()"/></td>'; $output .= '</tr></table>'; $output .= '</form>'; $output .= '</center>'; // Output for a parser hook isn't set via OutputPage, you just return the content (the tag will be replaced with this return) return $output; }
- Something like this. Hope you can work with this :) Florianschmidtwelzow (talk) 08:31, 1 July 2014 (UTC)
- Hi Florian,
- I was not able to import the calculator.js-File. Don't ask me why.
- I now tried:
$output .= '<script type="text/javascript" src="http://-servername-/vm/extensions/Calculator/calculator.js">';
- and it worked.
- With
function wfCalculator(Parser $parser) { $parser->setFunctionHook( 'calc', 'renderCalculator' ); return true; }
- replacing the tag didn't work. It has to be
"$parser->setHook".
- Thanks for your support! 85.158.139.100 09:49, 2 July 2014 (UTC)
- Yeah, setFunctionHook is for functions like {{calc:x|2|5}}, was my fault :) setHook is the right for you.
- Is calculator.js not added in source code? Florianschmidtwelzow (talk) 10:07, 2 July 2014 (UTC)
- What do you mean "added in source code"? 85.158.139.100 10:47, 2 July 2014 (UTC)
- If you use the hook BeforePageDisplay and use $out->addScriptFile( __DIR__ . '/calculator.js' ); it doesn't work you said? Can you check (after you use the hook) if you can find calculator.js in the source code of the HTML page (in Browser)?
- Background:
$output .= '<script type="text/javascript" src="http://-servername-/vm/extensions/Calculator/calculator.js">';
- isn't very beautiful ;) Florianschmidtwelzow (talk) 11:16, 2 July 2014 (UTC)
- At the end of the html source code I find:
- 85.158.139.100 12:53, 2 July 2014 (UTC)
<script src="/usr/share/mediawiki/vm/extensions/Calculator/calculator.js?303"></script>
- For me that seems false ;) But, i'm really silly :) To load a JavaScript Module for your extension you better use ResourceLoader (since MW1.17):
- https://www.mediawiki.org/wiki/ResourceLoader/Developing_with_ResourceLoader
- And then use: $out->addModules( array( 'ext.Calculator' /* or the equivalent name you give the resourceloader module */ ) );
- Sorry for confusion :/ Florianschmidtwelzow (talk) 13:01, 2 July 2014 (UTC)
- Now I have the following that doesn't work:
... $wgResourceModules ['ext.Calculator']= array( 'scripts' => __DIR__ . '/calculator.js', 'localBasePath' => __DIR__, 'remoteExtPath' => 'Calculator' ); $wgHooks['BeforePageDisplay'][] = 'onBeforePageDisplay'; function onBeforePageDisplay( &$out, &$skin ) { $out->addModules(array('ext.Calculator')); return true; } ...
- and in html source:
- 85.158.139.100 13:37, 2 July 2014 (UTC)
<script>if(window.mw){ mw.loader.load(["mediawiki.user","mediawiki.page.ready","mediawiki.action.watch.ajax","ext.Drafts","ext.vector.collapsibleNav","ext.vector.collapsibleTabs","ext.vector.simpleSearch","ext.Calculator"], null, true); }</script>
- Hello!
- that's probably because you try to read the script file like this (this is, what ReqourceLoader want to include:
- __DIR__ . __DIR__ . '/calculator.js'
- ) That can not work, please use:
$wgResourceModules ['ext.Calculator']= array( 'scripts' => 'calculator.js', 'localBasePath' => __DIR__, 'remoteExtPath' => 'Calculator' );
- P.S.: You can use the developer tools of your browser (e.g. with Ctrl + J in Chrome) and click on network. There is a load.php with where your ext.Calculator is in modules parameter. If you click on this you can see errors of resource loader in comments at the top of response :) That sometimes helps to find some errors, i think in this too (i'm unsure, if RL adds this error message). Florianschmidtwelzow (talk) 17:08, 2 July 2014 (UTC)
- Hello,
- in the response I see
... mw.loader.implement("ext.Calculator",function($){function rechnen(){var m1eingabe_w=window.document.felder.formel.value; ...
- So he did load the js-File but with pushing a button I still get the error: "delete_all" is undefined.
- In html-source I see
- 85.158.138.26 07:25, 3 July 2014 (UTC)
<script src="/vm/load.php?debug=false&lang=de&modules=ext.Calculator%2CDrafts%7Cjquery.autoEllipsis%2CcheckboxShiftClick%2CcollapsibleTabs%2CdelayedBind%2ChighlightText%2CmakeCollapsible%2Cmw-jump%2Cplaceholder%2Csuggestions%2CtabIndex%7Cmediawiki.action.watch.ajax%7Cmediawiki.api%2Cuser%7Cmediawiki.api.watch%7Cmediawiki.legacy.mwsuggest%7Cmediawiki.page.ready&skin=vector&version=20140702T091942Z&*" type="text/javascript"></script>
- Hello! :)
- Maybe it's better to use jQuery, instead of "plain" JavaScript only. You can remove onclick="delete_all()" from the button and set an unique id, e.g. id="calculator_delete_all" and then use jQuery to run a function:
( function ( $ ) { $( '#calculator_delete_all' ).on( 'click', function() { // do your stuff after button is clicked } ); }( jQuery ) );
- (like ever: untested :P) Florianschmidtwelzow (talk) 07:51, 3 July 2014 (UTC)
- Hi,
- that works! Thanks a lot!! 85.158.138.26 09:50, 7 July 2014 (UTC)
- What do you mean "added in source code"? 85.158.139.100 10:47, 2 July 2014 (UTC)
[RESOLVED] Pokemon errors
more errors in pokemon episode: season 1, episode 65 holiday hi jynx... charmander has already evolved into charizard and misty has given starmie away (to her sisters) 83.131.79.35 (talk) 15:55, 30 June 2014 (UTC)
- Ähm, yeah :D Can you clarify, what you want? For now, that sounds like spam for me ;) Florianschmidtwelzow (talk) 16:23, 30 June 2014 (UTC)
- Sounds like wrong page content in a wiki about Pokemon - the owner of that wiki might then be able to help with that. However, this Support Desk is not the right place to ask for a fix. 88.130.100.16 16:48, 30 June 2014 (UTC)