Project:Support desk/Flow/2018/08
| This page used the Structured Discussions 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. |
| This page is an archive. |
| Please ask questions on the current support desk. |
Using HTML
The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
I'm trying to use pure HTML in mediawiki, but mediawiki does not allow tags like <button> or <a href>. What should I do to use HTML in mediawiki? 79brue (talk) 08:31, 1 August 2018 (UTC)
- See Manual:$wgRawHtml, but be warned that any account can be hijacked if untrusted editors can edit your wiki with that setting enabled. Ciencia Al Poder (talk) 09:17, 1 August 2018 (UTC)
- For more limited allowance of HTML tags, see Extension:HTML Tags. AhmadF.Cheema (talk) 09:18, 1 August 2018 (UTC)
How can I become a sponsor of LIMSWiki?
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.
How can I become a sponsor of LIMSWiki? 82.15.39.52 (talk) 10:58, 1 August 2018 (UTC)
- Welcome to the help desk for the MediaWiki software. Whatever "LIMSWiki" is, you probably have to ask "LIMSWiki" how to become a "sponsor" (whatever that means). Which makes me wonder how you managed to end up on the MediaWiki Support desk. :) Malyacko (talk) 13:36, 1 August 2018 (UTC)
Octave 4.4.0: Installation in Windows 10 says not tested in Win 10
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 package Octave 4.4.0 for our enterprise platform for Windows 10. When I am running the executable it says this is not tested in Windows 10. Do we have Windows 10 compatible version? 204.212.175.30 (talk) 15:55, 1 August 2018 (UTC)
- Incorrect support forum. For help with Octave, see Octave Support/Help. AhmadF.Cheema (talk) 16:07, 1 August 2018 (UTC)
New Wiki version, what edits and plugins will make it work again?
We've migrated an old version of a wiki (1.24) over to a new site running a modern Mediawiki and of course it's broken everything. I want to install plugins to get things running again but presumably most of the old ones we were using are no longer updated and I have no idea where to even start so that things become functional again.
Any help or advice would be appreciated. I'll link to the front page and version pages for both the old version and the new import:
Old Website running old version:
https://www.gawler.nowandthen.net.au/Main_Page
https://www.gawler.nowandthen.net.au/Special:Version
New website running new version:
http://www.gawlerhistory.com.au/Main_Page
http://www.gawlerhistory.com.au/Special:Version 2001:44B8:2CF:4F04:CDAE:B7C9:1378:B21E (talk) 05:57, 2 August 2018 (UTC)
- For missing styles, first take a look at Manual:Errors and symptoms#The wiki appears without styles applied and images are missing. AhmadF.Cheema (talk) 07:34, 2 August 2018 (UTC)
- The main problem with appearance is the NowAndThen skin. If you change the skin to Vector, styles load properly.
- You should look at all the skins and extensions of the old wiki and install them on the new one, if they're still compatible, or find a replacement. Ciencia Al Poder (talk) 09:18, 2 August 2018 (UTC)
file link point to incorrect URL
The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
I have installed mediawiki on redhat 7. I can upload file and delete it now. However, I can't download the file which is uploaded.
I have installed the mediawiki on /var/www/html/mediawiki . when I try to retrieve the file by click the link "(file)" next to the filename. It will go to 404 page not fund error. the link actually point to "/0/b/myfile" instead of "/mediawiki/images/0/b/myfile"
I guess I missed some configuration. Please help.
I have added below to Localsetting.php to avoid the fike "Lock" issue
Regard
David
$wgScriptExtension = ".php" ;
$wgGenerateThumbnailOnParse = true ;
$wgHashedUploadDirectory = true ;
$wgFileBackends[] = array(
'name' => 'local-backend',
'class' => 'FSFileBackend',
'lockManager' => 'nullLockManager',
'containerPaths' => array(
'local-public' => "{$wgUploadDirectory}",
'local-thumb' => "{$wgUploadDirectory}/thumb",
'local-transcoded' => "{$wgUploadDirectory}/transcoded",
'local-deleted' => $wgDeletedDirectory,
'local-temp' => "{$wgUploadDirectory}/temp",
),
'fileMode' => 0644,
);
#### local file system repository
$wgLocalFileRepo = array (
'class' => 'LocalRepo',
'name' => 'local',
'directory' => $wgUploadDirectory,
'scriptDirUrl' => $wgScriptPath,
'scriptExtension' => $wgScriptExtension,
'url' => $wgUploadBaseUrl ? $wgUploadBaseUrl . $wgUploadPath : $wgUploadPath,
'hashLevels' => $wgHashedUploadDirectory ? 2 : 0,
'thumbScriptUrl' => $wgThumbnailScriptPath,
'transformVia404' => !$wgGenerateThumbnailOnParse,
'deletedDir' => $wgDeletedDirectory,
'deletedHashLevels' => $wgHashedUploadDirectory ? 3 : 0,
'backend' => 'local-backend',
); 1.152.111.188 (talk) 07:59, 2 August 2018 (UTC)
- On a simple wiki setup, it isn't usually necessary to change $wgFileBackends or $wgLocalFileRepo. Is there a reason you've done this?
- What is $wgUploadPath set to? ☠MarkAHershberger☢(talk)☣ 13:44, 2 August 2018 (UTC)
- Hi MarkAhershberger
- Thanks a lot for reply. I had missed this $wgUploadPath setting. It works now.
- The reason for using $wgFileBackends or $wgLocalFileRepo is I failed to get rid of selinux setting then I followed the instruction from mediawiki page. Frankly say. I have not understood the principle behind.
- Many thanks
- David 202.81.18.30 (talk) 00:35, 3 August 2018 (UTC)
Search Bar stuck on "Search 3 pages"
The search bar on the main page of my Mediawiki says "Search 3 pages" when there are many more than 3 pages on the Wiki. It appears to be hard coded to say that, and I cannot find the correct file to change it. Does anyone know which file needs to be edited so that I can put "Search X pages" or "Search the Wiki" or something like that?
Thank you. GarstFromDuke (talk) 13:40, 2 August 2018 (UTC)
- Visit the page with the message you want to change and add uselang=qqx to the url. You can then override the message. ☠MarkAHershberger☢(talk)☣ 13:49, 2 August 2018 (UTC)
Removing blog
I would like to remove the blog from my wiki (visible globally in the top navigation), but don't seem to find a way of doing it. Any ideas?
Thanks in advance,
Sascha Sfzeller (talk) 17:56, 2 August 2018 (UTC)
- Can you point to your wiki? ☠MarkAHershberger☢(talk)☣ 21:33, 2 August 2018 (UTC)
- http://www.dynomotion.com/wiki/index.php?title=Main_Page
- As you can see, I deleted the article that was in there ("5 reasons for...") because it was spam/vandalism, but I'd be interested in 1) how to create a new start page for the blog and 2) how to remove the blog option altogether.
- Thanks, Mark Sfzeller (talk) 21:55, 2 August 2018 (UTC)
- First, upgrade your wiki. You're on 1.23, an old LTS. The latest LTS is 1.31. (If you would like to continue using BlueSpice, I think they're up to 3.0 now.)
- That said, it looks like the blog piece comes from BlueSpice. I would guess (but don't know) that going into the administrative interface will give you a way to do that. ☠MarkAHershberger☢(talk)☣ 23:38, 2 August 2018 (UTC)
Preventing that?
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.
How to prevent this?
test
Because whenever I do something like {{ and }} next to a ( it will automatically do what test did and that prevents me doing that what's on https://en.wikiversity.org/wiki/Help:Mouse-over this issue is not on this wiki but since it has to do with wiki can someone tell me how to fix that??? Karl-police (talk) 18:17, 2 August 2018 (UTC)
- Fixed it, it was because of a space in the template. Karl-police (talk) 19:17, 2 August 2018 (UTC)
mbstring is missing
The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
I'm running the latest version of Ubuntu and the mbstring package seems to no longer be available. How can I install MediaWiki without mbstring? Thank you! 12.0.231.82 (talk) 18:35, 2 August 2018 (UTC)
- According to Manual:Running_MediaWiki_on_Debian_or_Ubuntu#Install_LAMP_Stack a mbstring package should be available... 2001:16B8:1069:5600:65F5:613F:196:D335 (talk) 20:34, 2 August 2018 (UTC)
- According to packages.ubuntu.com you should run
sudo apt install php-mbstring. ☠MarkAHershberger☢(talk)☣ 21:41, 2 August 2018 (UTC)
Change the Upload file location
The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
I want to change the upload file location other than /var/www/mediawiki/images, like that one: /home/webpages/wiki-images.
I try change some variables to point to /home/webpages/wiki-images, like below in LocalSettings.php.
$wgUploadDirectory = "/home/webpages/wiki-images";
$wgUploadPath = "/home/webpages/wiki-images";
The uploaded files goes to the correct directory, but I cannot play or use the uploaded file in the pages. The link and a empty thumb to file appears but no real image or video is show.
I'm new to MediaWiki and I already looked at google and FAQ to try to solve my problem with no solution.
Have this a solution ? Thank you! 187.32.64.135 (talk) 19:25, 2 August 2018 (UTC)
- The value you provide in $wgUploadPath should be the URL path that the uploads are available at. If you want to serve images from
/home/webpages/wiki-images, then you need to tell your webserver to point a url (sayhttp://yoursite.com/wikimages) to that directory. - Often this will involve something like adding
Alias /wikimages /home/webpages/wiki-images- to the
/etc/apache2/apache2.conffile. ☠MarkAHershberger☢(talk)☣ 21:48, 2 August 2018 (UTC) - Thanks, with your help now its working. 187.32.64.135 (talk) 13:29, 4 August 2018 (UTC)
How to reduce the load time of MediaWiki after a period of idle time?
The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
I use XAMPP 3.2.2, Windows 10 and mediawiki 1.31.0. My wiki is only used by me. Sometimes I would not ues my wiki several hours, And after that it takes it 10 to 30 seconds to load the page. And after that fist visit of my wiki, load time of other page is less than 1 second. Are there any simple method like changing some configuration files to improve it? Shendaowu (talk) 02:05, 3 August 2018 (UTC)
- What is likely to be happening is that Windows sees you aren't using Apache, etc. and moves i to slower memory (e.g. disk). It is loading quicker after the initial load because it is in faster memory (e.g. RAM).
- One thing you could do is set up a background task to keep Apache in faster memory. This article on App lifecycle talks about how to do that.
- A simpler thing to do may to create a scheduled process that wakes up every minute and grabs the front page of the wiki. ☠MarkAHershberger☢(talk)☣ 19:04, 4 August 2018 (UTC)
- I wonder if maybe things are being forced out of cache or something. You could maybe look into adjusting the main cache type ($wgMainCacheType) or the settings for apc if you have that installed. (Just a guess, I don't know much about windows, may be totally wrong) Bawolff (talk) 20:50, 8 August 2018 (UTC)
- The problem seems to have been solved after I upgrade my RAM from 4 GB to 8 GB. Now it is less then 4 seconds. But I am not sure. I also reset my windows. https://github.com/microsoft/WSL/issues/3941. Shendaowu (talk) 08:44, 18 July 2019 (UTC)
Is there a way to get contents of deleted pages automatically?
Hello.
I am an admin on a wiki and I would like a tool/script to automatically get the content of deleted pages, like listpages.py. Is there a way to do that?
Thanks. MrDupin (talk) 12:08, 3 August 2018 (UTC)
- I would start to look for information on API:Undelete. ☠MarkAHershberger☢(talk)☣ 18:51, 4 August 2018 (UTC)
- Thanks for the tip. MrDupin (talk) 21:39, 5 August 2018 (UTC)
wanted pages - /testcases, /sandbox, /Print
Looking at the "wanted pages" special page, nearly all of them are the /testcases, /sandbox, and /Print pages for various templates.
Is there any want to have wanted pages not include those subpages? 73.122.146.135 (talk) 15:53, 3 August 2018 (UTC)
- Haven't tested this, but in theory something like the following in LocalSettings.php:
- Bawolff (talk) 20:48, 8 August 2018 (UTC)
$wgHooks['WantedPages::getQueryInfo'][] = function ( $p, &$query ) { $query['conds'][] = 'pl_title not like "%/testcases"'; $query['conds'][] = 'pl_title not like "%/sandbox"'; $query['conds'][] = 'pl_title not like "%/Print"'; }; - That solution worked perfectly. Thanks! 73.122.146.135 (talk) 00:59, 10 August 2018 (UTC)
Trouble logging in
I cannot log in with new user name and password as I constantly get this message "There seems to be a problem with your login session; this action has been canceled as a precaution against session hijacking. Please resubmit the form." 2605:E000:B041:7F00:5B1:D8C:F39D:351E (talk) 19:56, 4 August 2018 (UTC)
- Try deleting all your cookies and verifying you have cookies enabled.
- If this is your own wiki, the wiki might have issues with session storage. You can try setting $wgSessionCacheType = CACHE_DB; Bawolff (talk) 20:43, 8 August 2018 (UTC)
- Even, I am facing the same issue with my own wiki but after one day, a day before this issue everything was working fine. 49.206.255.138 (talk) 12:02, 19 April 2019 (UTC)
- tried the @Bawolff inputs...but still not luck 49.206.255.138 (talk) 12:03, 19 April 2019 (UTC)
Can't create an account.
Hi,
For the Super Wiki (also known as supernatural wiki) which is powered by mediawiki, I cannot create an account, because I can not find a create an account page. I also cannot find a way to contact an administrator on the Super wiki. Does anyone know what I should do? Thetwindler (talk) 20:05, 4 August 2018 (UTC)
- If you refer to http://supernatural.wikia.com/wiki/Supernatural_Wiki then there is a "Register account" in the upper corner. Malyacko (talk) 13:27, 6 August 2018 (UTC)
I just logged into wikiversity using my wikpedia account and it blocks me from creating new pages
I tried adding a link from my wikiversity user page [it won't let me create one now] to my wikipedia user page and it barred me since I'm a "new user" on wikiversity and it thinks I'm spamming. I tried adding a new Thermal Resistance page to Wikiversity too, and that also failed. I'd like some help please. I'm a legitimate user, not a spammer.
Here's my wikipedia user page to see who I am: https://en.wikipedia.org/wiki/User:ERCaGuy ERCaGuy (talk) 20:27, 4 August 2018 (UTC)
- Wikiversity settings and policies are up to each Wikiversity community. Feel free to ask on the discussion page of the Wikiversity that you refer to. Malyacko (talk) 13:25, 6 August 2018 (UTC)
How to use wiki farm after MW 1.31 upgrade?
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 girls & guys,
I am running a wiki farm with multiple wikis. The farm was archived by putting MW source code under /mediawiki folder. Then all other wikis have their own LocalSettings.php under their own folder, with linux soft link to point files/folders (such as index.php,includes,extensions, etc...) back to /mediawiki folder.
(We don't have space to copy MW source code hundreds of times.)
/www/mediawiki (all MW code, no config file, no web access)
/www/a
/www/b
/www/c
/www/d
...
Such settings work well since MW 1.25. However, after I upgrade the test wikis in test server from 1.30 to 1.31 today. None of these wiki's LocalSettings.php took effect.
They all show "LocalSettings.php not found." if no setting file under /mediawiki folder. If I do add a functional LocalSettings.php to /mediawiki folder, then all the other wikis now showing one same wiki.
What's wrong with MW 1.31? What can I do to get wiki farm running?
Thank you! Deletedaccount4567435 (talk) 22:46, 4 August 2018 (UTC)
- Just in case anyone have same or similar problem like I mentioned above. I got a temporary fix here: https://phabricator.wikimedia.org/T203061 for your convenient.
- It's not merged into Mediawiki core when I type this comment, and it's not resolved as well. Deletedaccount4567435 (talk) 06:52, 29 August 2018 (UTC)
Extension:Html2Wiki Internal error during upload
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.
Dear all,
I am trying to import a variety of HTML files into a new Installation of MediaWiki using the TurnKey MediaWiki image for VirtualBox. Currently I am running following setup:
| MediaWiki | 1.31.0 |
| PHP | 7.2.8-1+0~20180725124257.2+stretch~1.gbp571e56 (apache2handler) |
| MariaDB | 10.1.26-MariaDB-0+deb9u1 |
| ICU | 57.1 |
| Extension | Version | License | Description | Authors |
|---|---|---|---|---|
| Html2Wiki | 2017.07 (816b6eb) 20:30, 8 April 2018 | GPL-2.0-or-later | Import HTML content into your wiki | Greg Rundlett |
I followed the description for installing the extension as provided here: Extension:Html2Wiki
When I try to upload either a Zip file containing HTML file, or single HTML files I am met with following errors:
For Zip files:
[6cba77a0bcf0886c9b5d5352] /index.php?title=Special:Html2Wiki&action=submit Error from line 711 of /var/www/mediawiki/extensions/Html2Wiki/specials/SpecialHtml2Wiki.php: Call to undefined function zip_open()
Backtrace:
#0 /var/www/mediawiki/extensions/Html2Wiki/specials/SpecialHtml2Wiki.php(650): SpecialHtml2Wiki->unwrapZipFile()
#1 /var/www/mediawiki/extensions/Html2Wiki/specials/SpecialHtml2Wiki.php(519): SpecialHtml2Wiki->doUpload()
#2 /var/www/mediawiki/extensions/Html2Wiki/specials/SpecialHtml2Wiki.php(220): SpecialHtml2Wiki->doImport()
#3 /var/www/mediawiki/includes/specialpage/SpecialPage.php(522): SpecialHtml2Wiki->execute(NULL)
#4 /var/www/mediawiki/includes/specialpage/SpecialPageFactory.php(568): SpecialPage->run(NULL)
#5 /var/www/mediawiki/includes/MediaWiki.php(288): SpecialPageFactory::executePath(Title, RequestContext)
#6 /var/www/mediawiki/includes/MediaWiki.php(861): MediaWiki->performRequest()
#7 /var/www/mediawiki/includes/MediaWiki.php(524): MediaWiki->main()
#8 /var/www/mediawiki/index.php(42): MediaWiki->run()
#9 {main}
For HTML files:
[1df88fba928db599003715c5] /index.php?title=Special:Html2Wiki&action=submit Error from line 4829 of /var/www/mediawiki/languages/Language.php: Using $this when not in object context
Backtrace:
#0 /var/www/mediawiki/extensions/Html2Wiki/specials/SpecialHtml2Wiki.php(814): Language::formatSize(integer)
#1 /var/www/mediawiki/extensions/Html2Wiki/specials/SpecialHtml2Wiki.php(857): SpecialHtml2Wiki->formatValue(integer)
#2 /var/www/mediawiki/extensions/Html2Wiki/specials/SpecialHtml2Wiki.php(964): SpecialHtml2Wiki->addFileToResults()
#3 /var/www/mediawiki/extensions/Html2Wiki/specials/SpecialHtml2Wiki.php(655): SpecialHtml2Wiki->processFile()
#4 /var/www/mediawiki/extensions/Html2Wiki/specials/SpecialHtml2Wiki.php(519): SpecialHtml2Wiki->doUpload()
#5 /var/www/mediawiki/extensions/Html2Wiki/specials/SpecialHtml2Wiki.php(220): SpecialHtml2Wiki->doImport()
#6 /var/www/mediawiki/includes/specialpage/SpecialPage.php(522): SpecialHtml2Wiki->execute(NULL)
#7 /var/www/mediawiki/includes/specialpage/SpecialPageFactory.php(568): SpecialPage->run(NULL)
#8 /var/www/mediawiki/includes/MediaWiki.php(288): SpecialPageFactory::executePath(Title, RequestContext)
#9 /var/www/mediawiki/includes/MediaWiki.php(861): MediaWiki->performRequest()
#10 /var/www/mediawiki/includes/MediaWiki.php(524): MediaWiki->main()
#11 /var/www/mediawiki/index.php(42): MediaWiki->run()
#12 {main}
I tried updating PHP from 7.0 (as provided in the TurnKey image) to 7.2, but without any success - the errors are the same for both PHP7.0 and PHP7.2.
Does anybody have an idea what could be causing the errors, and further - what could be done to resolve them.
Any help would be appreciated. Thank you.
Best Regards,
jmt Lostjedi666 (talk) 17:25, 5 August 2018 (UTC)
- Hello all,
- after quite a struggle I was able to resolve the 2nd errors (when importing plain HTML files):
- [1df88fba928db599003715c5] /index.php?title=Special:Html2Wiki&action=submit Error from line 4829 of /var/www/mediawiki/languages/Language.php: Using $this when not in object context
- In the file Html2Wiki\specials\SpecialHtml2Wiki.php I edited on line number 813:
- function formatValue( $value ) {
- return htmlspecialchars( $this->getLanguage()->formatSize( Language::formatSize( $value ) ) );
- }
- to be the same as in SpecialHtml2Wiki.php from Html2Wiki-REL1_29-12bf1cc release, namely into:
- function formatValue($value) {
- return htmlspecialchars($this->getLanguage()->formatSize($value));
- }
- As I am not a developer, I don't understand why this function from version 1.31 is not working, maybe it should be addressed in a feature release.
- As for the 1st error I reported (when opening zip files):
- [6cba77a0bcf0886c9b5d5352] /index.php?title=Special:Html2Wiki&action=submit Error from line 711 of /var/www/mediawiki/extensions/Html2Wiki/specials/SpecialHtml2Wiki.php: Call to undefined function zip_open()
- I do not have an update there, but again any help would be appreciated.
- Greetings,
- jmt Lostjedi666 (talk) 09:42, 6 August 2018 (UTC)
- > Call to undefined function zip_open()
- Your PHP installation doesn't have the zip extension installed.
- The other problem in an error in v1.31 of the Html2Wiki extensions. It is tracked here. —TheDJ (Not WMF) (talk • contribs) 14:20, 6 August 2018 (UTC)
- Hello TheDJ,
- thank you for your reply. I was able to resolve the "> Call to undefined function zip_open()" by installing the zip extension as you suggested.
- Have a nice weekend. Lostjedi666 (talk) 08:24, 12 August 2018 (UTC)
timeless.css bug reporting
I have noticed that the indentation of the article lead-in on w:en is only if their is no banner or disambiguation, ect...
I have searched for and failed to find a better forum to address this issue and also to request that some other improvements of documentation for "timeless.css" [https://upload.wikimedia.org/wikipedia/mediawiki/9/99/Screenshot_20180806-114558.png] Mkouklis(2) (talk) 05:06, 6 August 2018 (UTC)
- Hi, see https://mediawiki.org/wiki/How_to_report_a_bug how to report a bug (by setting the project tag in Phabricator to "Timeless". Thanks! AKlapper (WMF) (talk) 13:22, 6 August 2018 (UTC)
- It's because you messed with the margins:
- https://en.wikipedia.org/wiki/User:Mkouklis(2)/timeless.css
- margin: -36px;
- Please next time, first verify if your own modifications are not at fault. —TheDJ (Not WMF) (talk • contribs) 14:12, 6 August 2018 (UTC)
WikiFarm not rendering correctly after total site restore
MediaWiki FARM version 1.25.1
PHP (tried multiple versions but currently 7.0)
Issue - Site info showing - seems to be functional but css not being applied
Hi Everyone.
I was asked to help repair a restored version of MediaWiki. This is a free resource for Veterinarians across the world - and sadly since our host deleted the site (expired credit card) it would not correctly restore from a backup.
You can search the wikis, you can login to the wiki but the site does not render correctly. I am not sure what type of config it is - i dont have much wiki experience unfortunately.
Site Structure.
Under vetbook.org/wiki there are several wiki installations on one host under one URL - vetbook.org - one for bird, one for dog etc. And the database is shared between all sites with prefixes for each wiki site. Also it appears the following directories are being shared by each wiki installation because these directories are missing from the sub wiki folders (ie wiki\bird) but they appear in the main wiki directory (wiki). So the structure is:
Under the wiki directory (vetbook.org\wiki) i find these folders along with each sub wiki directory (eg bird, dog, cat)
Vendor, Includes, Images, Skins, Tests, serialized.
The Directories Extensions AND Includes do not appear in any of the sub wikis (eg bird/includes, dog/includes).
So can these directories be shared between wikifarms? If so how do i tell the webserver (through .htaccess i assume) to use these shared folders?
Any assistance will be appreciate Raybees (talk) 07:47, 7 August 2018 (UTC)
- If the site is working, but css/js is not being applied, it is likely something wrong with one of the paths in LocalSettings.php ( e.g. $wgScriptPath, $wgResourceBasePath, etc ) or something else wrong with accessing load.php. It could also be a problem with how redirects are handled since it sounds like you have a complex setup with different directories and .htaccess. Bawolff (talk) 20:39, 8 August 2018 (UTC)
Access Control mechansim
Hi,
Is there a way we can restrict certain users to not have a view to some documents uploaded in Media Wiki. I have gone through some extensions like Access Control panel, Lockdown etc , however they are currently not part of Stable extensions and hence not sure if they should be used. Can you pls guide as to how can I achieve this objective?
Thanks in advance Beta11 (talk) 11:25, 7 August 2018 (UTC)
- This is not really what MediaWiki was designed for, as indicated in the huge header above Extension:Lockdown.
- The core team has no interest in providing this functionality, and the parties that do (mostly enterprises) do not really seem to be interested in providing others with high quality maintained extensions providing this functionality it seems.;) —TheDJ (Not WMF) (talk • contribs) 10:10, 8 August 2018 (UTC)
Got this Error Message after MediaWiki update on Synology Nas
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.
Warning: mysqli::query(): MySQL server has gone away in /volume1/web/mediawiki/includes/libs/rdbms/database/DatabaseMysqli.php on line 47 Warning: mysqli::query(): Error reading result set's header in /volume1/web/mediawiki/includes/libs/rdbms/database/DatabaseMysqli.php on line 47 Fatal error: Call to a member function getCode() on null in /volume1/web/mediawiki/includes/user/User.php on line 1594
Thank you! 85.158.137.195 (talk) 12:16, 7 August 2018 (UTC)
- This "Call to a member function getCode() on nul" happens when the maintenance/update.php which does the database migrations had a problem after update. Often because it cannot reach the mysql database, or doesn't have the appropriate rights to do so. The other messages also indicate that the database is not reachable.
- However we do not support this specific packaging of MediaWiki, so I advise you to contact the package's maintainer (not sure who that is in this case). —TheDJ (Not WMF) (talk • contribs) 10:04, 8 August 2018 (UTC)
- just wondering if you got anywhere with this, mine started doing it out the blue about a week ago too, I tried to install mediawiki on another synology box and it installed ok but soon as i tried to connect i got that 'call to a member function getCode() on nul' message. also tried to run one of the maintenance scripts and they all (so far) fail on fileinfo.so not being installed. will check db connections but am puzzled by the maintenance stuff (which i haven't really looked at before)
- thanks
- David Zendob (talk) 00:30, 16 August 2018 (UTC)
- Check your mysql logs. Maybe new versions are hitting the database more heavily, causing MySql to reject new connections. You may try setting up a file cache for localisation to avoid hitting the database more frequently: Localisation#Caching Ciencia Al Poder (talk) 09:17, 16 August 2018 (UTC)
plex doesnt find a server
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,
after installing plex with this guide https://classicforum.manjaro.org/index.php?topic=14252.0
and entering plex with http://localhost:32400/web
on the top left plex is this looking for a server, what am i doing wrong ?
thx in advance 2A02:A450:857C:1:AFB5:B884:B80:D5E2 (talk) 15:58, 7 August 2018 (UTC)
systemctl list-unit-files | grep enabled && systemctl --user list-unit-files | grep enabled- plexmediaserver.service enabled 2A02:A450:857C:1:AFB5:B884:B80:D5E2 (talk) 16:06, 7 August 2018 (UTC)
- Wrong support forum. This place is for queries related to the MediaWiki software. AhmadF.Cheema (talk) 17:12, 7 August 2018 (UTC)
MediaWiki v1.31.0 and PHP v7.1.20 or v7.2.8
Hello,
I am running MediaWiki version 1.31.0. The server hosting it is Windows Server 2016, utilizing IIS, with a local MySQL server. I've been running this version for several weeks on PHP v7.1.17 with no issues. Today, I decided to update PHP to v7.1.20. After performing the update, the MediaWiki homepage states:
Sorry! This site is experiencing technical difficulties.
Try waiting a few minutes and reloading.
(Cannot access the database)
The PHP error log (using error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT) returns no errors.
I then installed PHP 7.1.19 and MediaWiki loaded with no problems. I've tried this on PHP 7.2.8, and it exhibited the same behavior (with 7.2.7 working properly). I think something has changed in the newest PHP builds that has somehow broken database connectivity for MediaWiki. Any help moving forward would be appreciated; especially if you can pinpoint the exact problem, as I have other web servers which utilize PHP and MySQL server connections that I haven't upgraded to PHP 7.1 yet. 129.118.6.37 (talk) 18:23, 7 August 2018 (UTC)
- Try Setting:
$wgShowSQLErrors = true;$wgShowHostnames = true;$wgShowExceptionDetails = true;- to see if that gives you a better error message. Bawolff (talk) 20:35, 8 August 2018 (UTC)
- Hello,
- Thank you for the suggestion. Doing this changed the error to:
- Cannot access the database: MySQL server has gone away (localhost))
- However, it works just fine on 7.1.19 (and 7.2.7) with the same MediaWiki settings and same php.ini file. 129.118.6.37 (talk) 21:13, 9 August 2018 (UTC)
- This sounds more like a php issue than a mediawiki issue.
- Check various configs like mysql.connect_timeout and default_socket_timeout . Check also various log files, especially mysql log files Bawolff (talk) 19:24, 11 August 2018 (UTC)
VisualEditor and Parsoid installation problem
Hi,
I installed the VisualEditor extension. It works front-end side but it doesn't work backend side. It gives me that error when i click edit button:
apierror-visualeditor-docserver-http-error: (curl error: 7) Couldn't connect to server
Here is my configuration for linking Parsoid to Visual Editor:
LocalSettings.php
wfLoadExtension( 'VisualEditor' ); // Enable by default for everybody $wgDefaultUserOptions['visualeditor-enable'] = 1; // Optional: Set VisualEditor as the default for anonymous users // otherwise they will have to switch to VE // $wgDefaultUserOptions['visualeditor-editor'] = "visualeditor"; // Don't allow users to disable it $wgHiddenPrefs[] = 'visualeditor-enable'; $wgVirtualRestConfig['modules']['parsoid'] = array( // URL to the Parsoid instance // Use port 8142 if you use the Debian package 'url' => 'https://viki.gameofthronestr.com:8142', // Parsoid "domain", see below (optional) 'domain' => 'viki.gameofthronestr.com', // Parsoid "prefix", see below (optional) 'prefix' => 'mediawiki' );
etc/mediawiki/parsoid/settings.js
parsoidConfig.setMwApi({ uri: 'https://viki.gameofthronestr.com/api.php', domain: 'viki.gameofthronestr.com', prefix: 'mediawiki' });
There is no config.yaml file in /etc/mediawiki/parsoid/ directory. Just settings.js file exists. Could it be related to that?
Mediawiki version: 1.31
VPS Features: Digital Ocean + Serverpilot Ubuntu 14.04
How can i fix that problem? Any ideas? Bekircem (talk) 11:36, 8 August 2018 (UTC)
- Check for firewalls or SELinux rules that might prevent your server from connecting to viki.gameofthronestr.com:8142 Bawolff (talk) 20:32, 8 August 2018 (UTC)
- How i can check it? I am using Serverpilot. Bekircem (talk) 06:15, 9 August 2018 (UTC)
- Do
sudo netstat -tuplnto check if parsoid is running on that port. If that checks out, then make sure to check the firewall like @Bawolff said. - Checking the firewall depends on your setup. I'm not sure how it works in Serverpilot, but search it's documentation. In my case my firewall is
ufwand I checked it's rules to see if that port was allowed. Daegontaven (talk) 06:39, 9 August 2018 (UTC) - I check it with that command: sudo netstat -tupln
- There is no seems any adress with 8142 port.
- I can disable firewall, basically. It's not problem. I disabled firewall and try it, it not works when firewall disabled too. Bekircem (talk) 13:37, 9 August 2018 (UTC)
- Yeah check error message for parsoid as to why it's not running then.
sudo systemctl status parsoidDaegontaven (talk) 18:33, 9 August 2018 (UTC)sudo systemctl status parsoid- output:
sudo: systemctl: command not found- I use Ubuntu 14.04. So i tried that command:
sudo service parsoid status- Here is the output:
/etc/init.d/parsoid: invalid arguments* could not access PID file for parsoid- I tried that that command too:
sudo service parsoid restart- Output:
* Restarting Parsoid HTTP service parsoid Started Parsoidserver on port 8142[ OK ]Bekircem (talk) 20:13, 9 August 2018 (UTC)
Unable to create a page
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 create the following page: Extension:GoogleDocCreator but the title is blacklisted. Can someone help? Nischayn22 (talk) 13:36, 8 August 2018 (UTC)
- Try again. I've whitelisted it Ciencia Al Poder (talk) 18:17, 8 August 2018 (UTC)
- Thanks, it worked :) Nischayn22 (talk) 06:35, 9 August 2018 (UTC)
Automate Page Edits
Is it possible to automate text updates on a page without using the web browser?
I have a perl script that gathers info I want added to a page section whenever it is run.
I am not able to post a URL to the wiki.
Thanks for the help!
Product Version
MediaWiki 1.14.0
PHP 5.3.3 (apache2handler)
MySQL 5.1.73 199.46.188.19 (talk) 18:44, 8 August 2018 (UTC)
- See API:Main_page.
- If your script is running on the server, manual:Edit.php is also an option, but using the api is probably the better option. Bawolff (talk) 20:30, 8 August 2018 (UTC)
I have never been here before but your system will not let me create an account because it claims I already have an account under this same email.
- I heard of your website by watching Alex Jones a few minutes ago and have never been here before but it will not let me set up an account because an incorrect message saying I have an account already under this same email (gmail account). So I am blocked out no matter what I try to do so screw you. It is too bad because I was looking forward to an alternative to wikipedia. 173.206.163.98 (talk) 23:13, 8 August 2018 (UTC)
- What does "an alternative to wikipedia" mean, in your understanding? mediawiki.org is not an encyclopedia. Malyacko (talk) 07:56, 9 August 2018 (UTC)
- An email address can only be attached to one account [regarding projects that are part of WMF] at a time. Either you, or the person that attached the identical email, will need to remove it from the account it's currently attached before you use it under a new account. Tropicalkitty (talk) 07:07, 9 August 2018 (UTC)
No OCSP Resonse
I'm trying to get VisualEditor working for Parsoid and RESTBase and I've succeeded in getting to the stunnel stage. However i'm having trouble with Mozilla FIrefox giving me an error related to OCSP stapling MOZILLA_PKIX_ERROR_REQUIRED_TLS_FEATURE_MISSING that blocks access to the website. This can't be reproduced on Chrome because it doesn't check for OCSP stapling at all.
How do I get OCSP stapling for RESTBase and Parsoid? It's working for apache2 by default. Results of OCSP response for each port ([HTTPS: 443], [RESTBase+Stunnel: 7232], [Parsoid+Stunnel: 8143]) can be viewed in this paste.
Thanks in advance :) Daegontaven (talk) 06:27, 9 August 2018 (UTC)
Link Colors and Skins
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 just installed a new skin on my wiki which overrode the default link colors (which is fine), but it also changed the color of broken links. Despite looking through the help and support sections, I've not found any guide on rewriting link colors (especially broken link colors). Is it possible to reset the default color for broken links? If so, how? KMjolnir (talk) 07:19, 9 August 2018 (UTC)
- If "broken" means "non-existing wiki page", check the CSS of any such broken link: Its CSS class is defined as "a.new" and its fallback defaults seem to be defined in /resources/src/mediawiki.skinning/elements.css Malyacko (talk) 07:55, 9 August 2018 (UTC)
- Alright, without uninstalling the skin, how can I force it back onto that default for that non-existing wiki link? KMjolnir (talk) 08:05, 9 August 2018 (UTC)
- Probably by including an overriding CSS rule in MediaWiki:Common.css. AhmadF.Cheema (talk) 08:32, 9 August 2018 (UTC)
- Alright, and how would I do that? KMjolnir (talk) 01:01, 10 August 2018 (UTC)
- In your Wiki, go to the MediaWiki:Common.css page and add the following code:AhmadF.Cheema (talk) 04:16, 10 August 2018 (UTC)
a.new:link, #ca-talk > span > a { color: #cc2200 !important; } a.new:visited, #ca-talk > span > a { color: #a55858 !important; }
- Thank you. KMjolnir (talk) 19:14, 10 August 2018 (UTC)
trying to install mediawiki 1.31 on Centos 7 - missing component mbstring
I am trying to install mediawiki 1.31 on a centos 7 machine.
I get the following error when I access the wiki:
MediaWiki 1.31 internal error
Installing some PHP extensions is required.
Required components
You are missing a required extension to PHP that MediaWiki requires to run. Please install:
- mbstring (more information)
- xml (more information)
When I try and install the extension using
sudo yum install php72-php-xml
I get a message saying
Package php72-php-xml-7.2.8-1.el7.remi.x86_64 already installed and latest version
and similar for mbstring.
Has anyone got a suggestion as to what to try, I have had a look on the internet and found similar questions with earlier mediawiki versions but nothing makes sense to me.
I am totally new to PHP, HTML etc.
thanks
Steve Windy54 (talk) 11:59, 9 August 2018 (UTC)
- Use
php -mto check loaded extensions. 星耀晨曦 (talk) 13:12, 9 August 2018 (UTC) - Ok, so that is telling me it is not loaded which agrees with the mediawiki error message.
- But it is installed according to the yum output so I guess I need to find out how to load it.
- I can see a google search coming on!
- Thanks
- Steve Windy54 (talk) 13:27, 9 August 2018 (UTC)
- Check your php.ini file. Usually you need a line like
extension=extensionName - Sometimes package managers might have their own ways to disable/enable extensions (e.g. if a certain file is in an extensions-enabled subfolder of /etc/php, or other triggering mechanisms) Bawolff (talk) 19:21, 11 August 2018 (UTC)
- php.ini
- [mbstring]
- mbstring.language = all
- mbstring.internal_encoding = UTF-8
- mbstring.http_input = auto
- mbstring.http_output = UTF-8
- mbstring.encoding_translation = On
- mbstring.detect_order = UTF-8
- mbstring.substitute_character = none;
- mbstring.func_overload = 0
- mbstring.strict_encoding = Off 213.141.34.100 (talk) 18:42, 23 July 2019 (UTC)
Weird Log-in Issues
I registered on this website, clicked the 'Activation Link' in the email (which was sent by this website), and logged-in successfully -- that was yesterday.
But today I am unable to log-in with the same very user name and password, and there is no response from the JatLand Wiki, plz.
Kindly look into it urgently -- I'm on the IT-Team of BJP Jugpreet Bajwa (talk) 13:34, 9 August 2018 (UTC)
- This website is not related to JatLand Wiki, try on JatLand's own forum. AhmadF.Cheema (talk) 14:43, 9 August 2018 (UTC)
Clickable button works on with TemplateBox
The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
I want to use a clickable button on my mediawiki. But when I put it on the page Instead of an actual button I see only the link to where the button is supposed to lead.
If I put a {{TemplateBox}} on the page (regardless of the position) the button appears. But also the following text comes from the template
No description yet available.
Usage
The template takes no parameters.
Additional information
The template is intended to be used in the following namespaces: no namespace specified
The template is intended to be used by the following user groups: no user group specified
which I obviously don't want on the page. It seems like a bug. What could I do in order to have Clickable button properly working? Please advise.
Thank you. 142.157.25.184 (talk) 16:19, 9 August 2018 (UTC)
- Update: if I make {{TemplateBox}} invisible using 142.157.25.184 (talk) 16:21, 9 August 2018 (UTC)
- ...using <code><nowiki><!-- Comment --></nowiki></code> the buttons stop appearing. 142.157.25.184 (talk) 16:22, 9 August 2018 (UTC)
- Any ideas? 142.157.25.184 (talk) 12:05, 11 August 2018 (UTC)
- As noted in your previously opened topic, for some unknown reason Template:TemplateBox is required to make the Template:Clickable button work correctly.
- The additional text due to TemplateBox are designed into the template, you will have to edit its source code to be able to get rid of them.
- Inserting TemplateBox inside comment tags makes the template as if it doesn't exist on the page, so this will not work.
- I would suggest maybe trying with some other button template, such as Wikipedia's Template:Clickable button 2. No green coloured buttons with this one, though. Or maybe Wikidata's Template:Clickable button 2 will work. AhmadF.Cheema (talk) 15:15, 11 August 2018 (UTC)
- The same story with Wikidata's Template:Clickable button 2. It works only with a TemplateBox. Could it be something related to the Lua settings? This is the only thing I haven't checked yet. 142.157.25.184 (talk) 20:27, 19 August 2018 (UTC)
Show "What Links Here" output on File: 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.
Hello. Any clues on how might I incorporate subject feature? Our users some times misinterpret the "File Usage" section on a file page as showing what links to that file, not just where it is 'used' (which I expect is a perhaps a useful distinction for images, but this is for a non-image file).
I found maybe a related answer here, but it works by using templates whereas I'm trying to apply it to all articles in the File: namespace.
Any nudge in the right direction would be appreciated! Lbillett (talk) 17:40, 9 August 2018 (UTC)
- I haven't tested this, but you can maybe try adding something like to LocalSettings.php:
- Bawolff (talk) 19:18, 11 August 2018 (UTC)
$wgHooks['ImagePageAfterImageLinks'][] = function ( $imgPage, &$html ) { $out = $imgPage->getContext()->getOutput(); $out->addWikiText( "==File links==\n{{Special:WhatLinksHere/{{FULLPAGENAME}}}}" ); };
- Ah, very interesting! This sounds like an elegant solution. I have some similar code for making the sidebar menu persistent in MW 1.23.2 (without it the sidebar is collapsed by default). This is very helpful, will try working this kind of angle.
- Thank you! Lbillett (talk) 17:40, 23 August 2018 (UTC)
Azure Postgres support
I've been tasked to migrate a MediaWiki (1.30.0) setup, from a self-hosted Postgres database to some service offered by Azure.
In practice, the main changes from most Postgres services are that:
- we would need to login using an username that includes a domain part (eg: myuser@mypostgresdomain), and have installer working with such database username
- we would need to enable postgres' SSL option, and have installer allow for switching it on
As of right now, I managed to get it working, although my patch isn't PR material, my customer won't leave me more time on that matter/fixed as far as he's concerned, ...
https://gist.github.com/faust64/c5f8e73aefe442d100f229fa4f62c9ae
Still going through How to contribute, although I'm not interested in becoming a contributor, ...
Is there anyone that could take over?
Thanks! Acksyn (talk) 17:43, 9 August 2018 (UTC)
- Thanks for the patch! It would be awesome to get you to become a contributor....
- Is there a reason to use the envvar PGSSL instead of setting $wgDBssl? That seems like a local modification and not something that should be incorrporated. ☠MarkAHershberger☢(talk)☣ 18:54, 9 August 2018 (UTC)
- AFAIU, the wgDBssl can't be toggled from installer, or I didn't see an option that would allow me to do so. Adding an env vars was a quick way to do it, but definitely not the best. Acksyn (talk) 06:38, 10 August 2018 (UTC)
- Hmm... and the manual says
CREATE USERis now an alias for CREATE ROLE. The only difference is that when the command is spelledCREATE USER,LOGINis assumed by default, whereasNOLOGINis assumed when the command is spelledCREATE ROLE. ☠MarkAHershberger☢(talk)☣ 19:10, 9 August 2018 (UTC)
- From what I've seen, although Azure provides us with a username formatted such as `username@domain`, postgres roles listing doesn't mention that domain part - looks like it's only used during login. Acksyn (talk) 06:49, 10 August 2018 (UTC)
- I'm tried setting up an Azure PostgreSQL account yesterday and didn't get a username with an @. Which PG service did you use? ☠MarkAHershberger☢(talk)☣ 14:21, 10 August 2018 (UTC)
- I have no idea, I'm only given access to virtual machines.
- From the trello cards, I can make up they went through forms documented over there: https://docs.microsoft.com/en-us/azure/postgresql/quickstart-create-server-database-portal
- The "Connect to PostgreSQL" section does mention a "myadmin@mydemoserver" username.
- Note that using psql from a shell, I also need passing sslmode to require (https://docs.microsoft.com/en-us/azure/postgresql/concepts-ssl-connection-security) Acksyn (talk) 18:59, 12 August 2018 (UTC)
- Maybe its using something like kerberos? Bawolff (talk) 19:37, 12 August 2018 (UTC)
- Unclear, could be. Being Microsoft, AD integration's probably not far away.
- . Acksyn (talk) 07:15, 15 August 2018 (UTC)
- Cool. Thanks for the patch.
- To get it merged into mediawiki we would probably have to:
- Drop the environment variable. If it needs to be triggered from installer, installer should add a checkbox
- We'd need a link to the docs explaining exactly what the @ sign means to postgres. Given its stripped out in most places, maybe it should be set in a different variable instead of the username or something.
- (Also ping User:Anomie as someone familiar with postgres) Bawolff (talk) 19:00, 11 August 2018 (UTC)
- Hello, is there any solution for 2023? We are in a similar situation, where we want to use Postgresq in for Mediawiki in a secure Azure environment. Thanks! Vid (talk) 16:33, 13 March 2023 (UTC)
password reset
I have forgotten my user name and password. 2600:1700:42C0:8AC0:ED7C:DD6B:31E6:290B (talk) 17:49, 9 August 2018 (UTC)
- Do you have your email? Try this: Special:PasswordReset ☠MarkAHershberger☢(talk)☣ 18:19, 9 August 2018 (UTC)
Api Edit Action
The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
I am not able to figure out how to make an appropriate POST call with the API Edit action. There is very little information on the docs about this as well.
API Call: /w/api.php?action=edit&format=xml&title=Project%3ASandbox§ion=new&text=Test%20edit%20api%20call.&token=%2B%5C
Error: <error code="mustpostparams" info="The following parameter was found in the query string, but must be in the POST body: token." xml:space="preserve">
Could someone explain how to make a POST call with edit?? 199.46.188.10 (talk) 19:07, 9 August 2018 (UTC)
- Have you tried using the API Sandbox? It looks like youneed to get a token first. ☠MarkAHershberger☢(talk)☣ 19:17, 9 August 2018 (UTC)
- Yes I have used the API Sandbox. If you run the following query you get a token.
- https://www.mediawiki.org/w/api.php?action=query&prop=info%7Crevisions&meta=tokens&rvprop=timestamp&titles=Project%3ASandbox
- Then I add that token to the end of my original query above but I get the same "must be POST" error.
- Any thoughts on this? Does this have something to do with the URL not be encoded properly? 199.46.188.10 (talk) 20:17, 9 August 2018 (UTC)
- Yes, you used API sandbox for getting token, but did you try to edit using sandbox? API sandbox has option to automatically include token when required. wargo (talk) 11:12, 16 August 2018 (UTC)
- Just to clarify, I am looking at this info from the API:Edit page:
- "Action=edit requires POST requests; GET requests will cause an error. Do not forget to set the
Content-Typeheader of your request toapplication/x-www-form-urlencoded. The token that you received is terminated with+\, this needs to be urlencoded (so it will end with%2B%5C) before it is passed back." - Is there a reason you can't just manually add "%2B%5C" to the end of your token if you are typing the API call into the URL bar?
- If setting the Content-Type header is mandatory, could someone explain how to do it and why?
- Thanks for the help! 199.46.188.10 (talk) 21:19, 9 August 2018 (UTC)
- > If setting the Content-Type header is mandatory, could someone explain how to do it and why?
- Like @TheDJ said, you need to read more and gain a better understanding of how the web works if you want answers to the questions you're asking. You might also look at how to create a bot. ☠MarkAHershberger☢(talk)☣ 14:19, 10 August 2018 (UTC)
- How do you send your request and what you want to do? wargo (talk) 11:13, 16 August 2018 (UTC)
- > Is there a reason you can't just manually add "%2B%5C" to the end of your token if you are typing the API call into the URL bar?
- A browsers url bar can ONLY make GET requests. POST requests are made with HTML forms or javascript. POST requests also use a body and NOT url query parameters in general.
- The edit page POST request is vastly different than the api calls and is not meant for use by 3rd parties rly.
- It sounds like u lack some knowledge about basic HTTP behavior. Knowledge of HTTP traffic is indeed a requirement for understanding the documentation, but there are many other websites that deal with explaining this. —TheDJ (Not WMF) (talk • contribs) 12:14, 10 August 2018 (UTC)
delete account
i created a page by accident- please delete joshualsteiner Joshualsteiner (talk) 19:43, 9 August 2018 (UTC)
- Projects under the Wikimedia Foundation line, accounts are not deleted. Tropicalkitty (talk) 19:49, 9 August 2018 (UTC)
Visual Editor problem. Error message at ve start.
When I start the visual editor in mediawiki, I always get this error message:
Fehler beim Laden der Daten vom Server: no_vrs: The VirtualRESTService for the document server is not defined; see https://www.mediawiki.org/wiki/Extension:VisualEditor. Soll der Vorgang erneut durchgeführt werden?
English:
Error loading data from server: no_vrs: The VirtualRESTService for the document server is not defined; see https://www.mediawiki.org/wiki/Extension:VisualEditor. Would you like to retry?
I downloaded the visual editor and copied it to the extention directory. Then I wrote that into the LocalSettings.php file:
wfLoadExtension( 'VisualEditor' );
// Enable by default for everybody
$wgDefaultUserOptions['visualeditor-enable'] = 1;
// Optional: Set VisualEditor as the default for anonymous users
// otherwise they will have to switch to VE
// $wgDefaultUserOptions['visualeditor-editor'] = "visualeditor";
// Don't allow users to disable it
$wgHiddenPrefs[] = 'visualeditor-enable';
// OPTIONAL: Enable VisualEditor's experimental code features
#$wgDefaultUserOptions['visualeditor-enable-experimental'] = 1;
Ps: I have not installed Node.js. Do I need that? And if so which version?
that's all I did. Thank you! 85.158.138.19 (talk) 08:17, 10 August 2018 (UTC)
- Yes, you need parsoid (which means nodejs). ☠MarkAHershberger☢(talk)☣ 14:28, 10 August 2018 (UTC)
- Thanks! And which nodejs version do i need? 46.226.50.231 (talk) 06:47, 13 August 2018 (UTC)
- Apparently nodejs >= v4.x, from Parsoid/Setup for Ubuntu / Debian Ciencia Al Poder (talk) 09:20, 13 August 2018 (UTC)
- ¿como se instala parsoid? 189.217.121.126 (talk) 18:05, 30 December 2018 (UTC)
- Hay un manual en Parsoid/Setup Ciencia Al Poder (talk) 19:40, 30 December 2018 (UTC)
- @MarkAHershberger
- I'm also facing this error. Can you Help me with the coding
- I don't know about the coding of this mediawiki Hardly4you (talk) 11:40, 5 May 2019 (UTC)
- @Hardly4you, I don't understand your question. ☠MarkAHershberger☢(talk)☣ 22:26, 6 May 2019 (UTC)
- @MarkAHershberger
- I installed parasoid and followed all instructions, but this error is still showing up. Parsoid/Troubleshooting#SELINUX ERROR "Error loading data from server: no vrs: The VirtualRESTService" This didn't help either(Mine runs on Ubuntu) Misterms735 (talk) 21:32, 4 September 2019 (UTC)
- This is your answer. ☠MarkAHershberger☢(talk)☣ 22:06, 4 September 2019 (UTC)
Changing language settings in the LocalSettings.php file
- Hello.
- We are using MediaWiki version 1.31.0 and the language is "de". Although these are the standard quotation marks in the German language -> „...“ , when I create or edit a page and type quotation marks using my keyboard, the quotation marks both automatically look like this: "..."
- Can I change the language settings in the localsettings file so that these quotation marks „...“ will always be inserted when I type them on my keyboard or do I always have to select them from the "special characters" menu?
- Thanks in advance! S.J.Baecker (talk) 11:50, 10 August 2018 (UTC)
- You can type them on your keyboard, but it isn't easy. You're looking for smart quotes. You probably want the Czech translation since it has the inverted quotes you want. ☠MarkAHershberger☢(talk)☣ 14:40, 10 August 2018 (UTC)
- Mediawiki has no knowledge of this I think. If you see this, it probably has to do with either the font used/installed, the browser configuration or the operating system ‘s autocorrect during entry. —TheDJ (Not WMF) (talk • contribs) 12:05, 10 August 2018 (UTC)
Adding a different part of speech to a definition
I have apparently been using the wrong technique when attempting to add a new part of speech, primarily adjective and/or noun. to a given page where only a verb is recognized. When I have done so, I have unsuspectingly edited out the original part of speech, hence all my suggestions appear to have been rejected. Can anyone offer a simple and concise approach to avoiding this error. I have read through the general information on the subject and have not come across a specific suggestion for doing so. HELP! Scott MacStravic (scottmacstra) 2601:601:A100:4B70:2CC8:4B19:7344:CEE4 (talk) 15:27, 10 August 2018 (UTC)
- What is "a new part of speech" and what is the relation to the MediaWiki software? More context needed. :) Malyacko (talk) 19:25, 10 August 2018 (UTC)
Prevent direct access to uploaded files
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.
When a file is uploaded (PNG, PDF, etc), anyone can access the file by getting the direct link - bypassing any login requirement. Is there a way to prevent this, and only have Wiki members access it? 189.85.84.98 (talk) 18:22, 10 August 2018 (UTC)
- Manual:Preventing access#Restrict access to uploaded files AKlapper (WMF) (talk) 19:24, 10 August 2018 (UTC)
- Thank you! 189.85.84.98 (talk) 19:50, 10 August 2018 (UTC)
How to read homepage in htdocs?
The domain name can only set to the files in htdocs. While my wiki is in htdocs/mediawiki/. How to fix this? 124.236.240.118 (talk) 01:35, 11 August 2018 (UTC)
- Change the domain name to a different folder.
- Move MediaWiki into the folder where the domain is pointing.
- Or if both is not possible currently: Change to a host, where one of the above is possible. 2001:16B8:10BC:4300:E15E:8A5E:8D48:A34E (talk) 08:25, 11 August 2018 (UTC)
Unable to login: <error code="badtoken" info="Invalid CSRF token."...>
I'm trying to login using LUA and HTTPS post requests and I encounter a badtoken error. I did url-encode it like all my parameters and this shows in the request body. The error message doesn't seem very specific. Below is the info I send and receive:
Fetching login token
- Path
- https://commons.wikimedia.org/w/api.php
- Request body
action=query&type=login&meta=tokens&format=xml
- Result body
<?xml version="1.0"?><api batchcomplete=""><query><tokens logintoken="3c0a2f674cc579aec5cd276eb997b1205b6f0ca9+\" /></query></api>
Logging in with token
- Path
- https://commons.wikimedia.org/w/api.php
- Request body
logintoken=3c0a2f674cc579aec5cd276eb997b1205b6f0ca9%2B%5C&format=xml&action=clientlogin&username=trougnouf&loginreturnurl=https%3A%2F%2Fwww.mediawiki.org&password=moo
- Result status
- 200
- Result body
<?xml version="1.0"?><api servedby="mw1346"><error code="badtoken" info="Invalid CSRF token." xml:space="preserve">See <nowiki>https://commons.wikimedia.org/w/api.php</nowiki> for API usage. Subscribe to the mediawiki-api-announce mailing list at <nowiki>&</nowiki>amp;lt;<nowiki>https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce&amp;gt</nowiki>; for notice of API deprecations and breaking changes.</error></api>
The current (early) source code to my program (based on LrMediaWiki) is shown on https://github.com/trougnouf/lua-scripts/blob/dtMediaWiki/contrib/dtMediaWiki.lua Trougnouf (talk) 16:31, 11 August 2018 (UTC)
- Make sure you're using a fresh token for every new login.
- Here is what I get from the API sandbox for your first request:
<?xml version="1.0"?> <api batchcomplete=""> <query> <tokens logintoken="5d47e04ca227d77e92be8aa442a30bb25b6f23bd+\" /> </query> </api>
- When I tried clientlogin I get:
<?xml version="1.0"?> <api> <clientlogin status="PASS" username="Hexmode" /> </api>
- If I re-use the token, I get the error you got. ☠MarkAHershberger☢(talk)☣ 18:04, 11 August 2018 (UTC)
- Looking at the LuaSec docs, its unclear if LuaSec automatically handles cookies for you. I'm guessing it does not, so you probably have to set the cookie headers yourself. Bawolff (talk) 18:49, 11 August 2018 (UTC)
- Thank you! That's what I just tried and it worked (setting the server's "set-cookie" header as the outgoing "cookie" header) Trougnouf (talk) 18:50, 11 August 2018 (UTC)
Link problems
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.
My wiki doesn't show any links in Special:WhatLinksHere.
Also, cascading protection doesn't work. PlavorSeol (talk) 08:59, 13 August 2018 (UTC)
- Most likely a Job queue problem. try running the runJobs.php maintenance script to run pending jobs. If it does nothing, that would mean jobs are simply failing.
- Set temporarily $wgJobRunRate to 0 and enable PHP error reporting and the display of exception details (as explained in Manual:How to debug), edit a page containing links, and then run runJobs.php again. If there's an error somewhere it should be displayed in the output of the script. Ciencia Al Poder (talk) 09:19, 13 August 2018 (UTC)
- I tried it, but Special:WhatLinksHere does not show any links and runJobs.php just show this:
- PlavorSeol (talk) 11:42, 16 September 2018 (UTC)
C:\NGINX\html\plavorexitbeta>"C:\PHP\php.exe" "maintenance\runJobs.php" PHP Notice: Undefined index: rcdays in C:\NGINX\html\plavorexitbeta\includes\Setup.php on line 378 Notice: Undefined index: rcdays in C:\NGINX\html\plavorexitbeta\includes\Setup.php on line 378 PHP Notice: Undefined index: watchlistdays in C:\NGINX\html\plavorexitbeta\includes\Setup.php on line 382 Notice: Undefined index: watchlistdays in C:\NGINX\html\plavorexitbeta\includes\Setup.php on line 382 2018-09-16 11:39:42 htmlCacheUpdate File:PlavorSeol_-_2_-_프로필.png table=imagelinks recursive=1 rootJobIsSelf=1 rootJobSignature=8ba5db41ecb39fd81cca204bfce86c6bc7dcf544 rootJobTimestamp=20180809074356 causeAction=file-upload causeAgent=unknown requestId=aeba0a71738c0e82c97fcc40 (id=250,timestamp=20180809074356) STARTING C:\NGINX\html\plavorexitbeta>
- Enable error reporting as described in Manual:How to debug. Every "STARTING" job must end with a "good". This is not your case, so something is causing a PHP fatal but the error is not printed (however, it's strange to see PHP Notices and not fatals) Ciencia Al Poder (talk) 16:12, 16 September 2018 (UTC)
add page to side bar
how can i add my page to the contentsof the side bar? for example here there is a section called Support and under that we have User help, FAQ etc. In the similar manner, i have to insert a page called 2019workshop. please help 14.139.243.10 (talk) 10:04, 13 August 2018 (UTC)
- See Manual:Interface/Sidebar! 2001:16B8:1098:3E00:1DF:94F1:A87F:1B7C (talk) 10:55, 13 August 2018 (UTC)
Login problem(Media wiki)
Hi,
I created the account and retried to log-in, but pending and time-out occurred. Could you check my account?(echmchn) Echmchn (talk) 10:15, 13 August 2018 (UTC)
- You obviously managed to log in because you filed this under your user account. So this posting does not make sense? :) Malyacko (talk) 13:48, 13 August 2018 (UTC)
Save edit not now, but later (for example tomorrow)
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.
Is it somehow possible to make edits, that are not visible to the public right away, but only later, for example tomorrow?
If you can plan edits this might be useful for SEO. Stefahn (talk) 14:51, 14 August 2018 (UTC)
- You mean like it is in some CMS systems? *hint*... ;-)
- For MediaWiki, two things come to my mind:
- Use a script to make the edit via the API and run it with a cron job at the desired time.
- Use an extension like approved revisions and use a script to approve the according page at the time wanted. 2001:16B8:10CB:E300:DC3F:B514:FF6E:93C (talk) 15:37, 14 August 2018 (UTC)
- Yes, similar to WordPress (actually I only know of a "publish later" there, not a "save edit later").
- Thanks for the 2 ideas - maybe someone comes up with an easier solution... Stefahn (talk) 15:31, 15 August 2018 (UTC)
URL Decoding issue
I think this issue is the encoding? feel free to educate me...
The URL is showing up as: http://mysite/wiki/Category%3AMyGames
When it should be: http://mysite/wiki/Category:MyGames
How can I fix this?
I am running mediawiki 1.31.0 Quinnj09 (talk) 19:31, 14 August 2018 (UTC)
- This wiki (mediawiki.org) doesn't have URLS like that, so, yeah, probably something with encoding.
- It looks like you are using "pretty" URLs. What webserver are you using and how is it set up? ☠MarkAHershberger☢(talk)☣ 23:33, 14 August 2018 (UTC)
- Using:
- Windows Server 2008
- IIS 6.1
- LocalSettings.php:
$wgScriptPath = "/wiki"; $wgArticlePath = "/wiki/$1"; # tells MediaWiki how IIS will be rewriting URLs $wgUsePathInfo = true;
- IIS > Rewrite Rule (in web.config):
- Quinnj09 (talk) 07:55, 16 August 2018 (UTC)
<?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <rewrite> <rules> <rule name="RedirectUserFriendlyURL1" stopProcessing="true"> <match url="^index\.php$" /> <conditions> <add input="{REQUEST_METHOD}" pattern="^POST$" /> <add input="{QUERY_STRING}" pattern="^title=(<nowiki>[^=&amp;]</nowiki>+)$" /> </conditions> <action type="Redirect" url="{C:1}" appendQueryString="false" /> </rule> <rule name="RewriteUserFriendlyURL1" stopProcessing="true"> <match url="^([^/]+)/?$" /> <conditions> <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /> </conditions> <action type="Rewrite" url="index.php?title={R:1}" /> </rule> </rules> </rewrite> </system.webServer> </configuration>
- This is a problem with IIS, which requires colons in URL to be encoded, because of how Windows generally handle colons in paths (C: means C is the drive letter, for example). If you dont't want this, you'll need to use a different webserver like Apache, or even use a Linux server. Ciencia Al Poder (talk) 09:12, 16 August 2018 (UTC)
- I was about to update my post to note that this problem exists even without ShortURL being used.
- So there's no way at all to 'fix' this whilst still using IIS?
- Unfortunately changing to a different web server is not an option for us (this decision is outside of my control) Quinnj09 (talk) 09:40, 16 August 2018 (UTC)
- Solution that someone else found for the problem: Just above
<system.webServer>put: - ☠MarkAHershberger☢(talk)☣ 15:38, 16 August 2018 (UTC)
... <system.web> <!-- Default <,>,*,%,&,:,,? or %u003c,%u003e,%u002a,%u0025,%u0026,%u003a,%u005c,%u003f --> <httpRuntime requestPathInvalidCharacters="%u003c,%u003e,%u002a,%u0025,%u0026,%u005c,%u003f" /> </system.web> ...
- Tried this but doesnt seem to be working. Quinnj09 (talk) 15:54, 16 August 2018 (UTC)
- did you try restarting IIS? or rebooting? (I'm not at all familiar with IIS, so that is the end of my helpfulness.... sorry.) ☠MarkAHershberger☢(talk)☣ 15:56, 16 August 2018 (UTC)
- Yeh I did :(
- Thats for trying though, I might do some more searching on the internet next week, I think your onto something. Quinnj09 (talk) 10:08, 17 August 2018 (UTC)
Extension to Copy Code Block
The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
I use Code Blocks on my wiki, one thing I like on microsoft pages (eg: https://docs.microsoft.com/en-us/powershell/module/azurerm.compute/get-azurermvm?view=azurermps-6.7.0), is that the code blocks they use has a copy button on the top right, is there a way of doing this kind of thing in mediawiki? Quinnj09 (talk) 19:38, 14 August 2018 (UTC)
- Extension:PreToClip appears to work for <pre></pre> tags, maybe just a few changes will make it work for <syntaxhighlight></syntaxhighlight> tags too.
- However, it uses Flash, which might be a deal breaker for a lot of people. AhmadF.Cheema (talk) 21:30, 14 August 2018 (UTC)
- What's wrong with flash? I might try it but would prefer something I don't need to edit to make work. Quinnj09 (talk) 22:41, 14 August 2018 (UTC)
- Everything is wrong with Flash. Malyacko (talk) 05:16, 15 August 2018 (UTC)
- Here is a pure js solution, but you'll have to do some coding: clipboard.js
- Flash is horrible and you should avoid it. ☠MarkAHershberger☢(talk)☣ 23:42, 14 August 2018 (UTC)
- Unfortunately I wouldn't have a clue how to implement it, but thanks for the suggestion. Quinnj09 (talk) 09:53, 16 August 2018 (UTC)
pygmentize not working
The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
I cannot get pygmentize for Extension:SyntaxHighlight to work, in mediawiki debug log I get:
[exec] Error running "c:\Python27\Scripts\pygmentize.exe" "-l" "sql" "-f" "html" "-O" "cssclass=mw-highlight,encoding=utf-8": 'c:\Python27\Scripts\pygmentize.exe" "-l" "sql" "-f" "html" "-O" "cssclass' is not recognized as an internal or external command, operable program or batch file.
Has anyone got any suggestions for next steps? Quinnj09 (talk) 20:20, 14 August 2018 (UTC)
- Does running the command from your command prompt work?
- In other words, what happens when you copy and paste the the following to a prompt?
- ☠MarkAHershberger☢(talk)☣ 23:45, 14 August 2018 (UTC)
c:\Python27\Scripts\pygmentize.exe -l sql -f html -O cssclass=mw-highlight,encoding=utf-8
- I have tried running that and it looks to just hang, cmd is not 'not responding', but it never finished and outputs anything.
- Im wondering if the cause of my problem is the same as these two:
- https://phabricator.wikimedia.org/T199989
- https://phabricator.wikimedia.org/T199789 Quinnj09 (talk) 07:57, 16 August 2018 (UTC)
- What happens if you use
c:\Python27\Scripts\pygmentize.exe -l sql -f html -O cssclass=mw-highlight,encoding=utf-8 < NUL
- or just press Ctrl-Z after the command hangs? ☠MarkAHershberger☢(talk)☣ 15:06, 16 August 2018 (UTC)
- If the command returns, that indicates that it is waiting for input on STDIN. ☠MarkAHershberger☢(talk)☣ 15:15, 16 August 2018 (UTC)
- Ctrl-Z isn't a suitable command, think you mean Ctrl-C, which returns:
Traceback (most recent call last):File "C:\Python27\Lib\runpy.py", line 174, in _run_module_as_main"__main__", fname, loader, pkg_name)File "C:\Python27\Lib\runpy.py", line 72, in _run_codeexec code in run_globalsFile "c:\Python27\Scripts\pygmentize.exe\__main__.py", line 9, in <module>File "C:\Python27\lib\site-packages\pygments\cmdline.py", line 543, in mainreturn main_inner(popts, args, usage)File "C:\Python27\lib\site-packages\pygments\cmdline.py", line 402, in main_innercode = sys.stdin.read()- Running the second command with < Nul gives me:
<div class="mw-highlight"><syntaxhighlight lang='text'><span></span>
</syntaxhighlight></div> Quinnj09 (talk) 16:00, 16 August 2018 (UTC)
- No, I mean Ctrl-Z which in MS OS is like Ctrl-D on Unix. But it looks like you need Ctrl-Z and then return, not just Ctrl-Z by itself.
- Anyway, this shows that it is set up to read from STDIN and MediaWiki isn't set up to send the input in the MS world in the correct way. I think the bug you found is the right place to put this information. ☠MarkAHershberger☢(talk)☣ 16:38, 16 August 2018 (UTC)
- Yeh it is that bug, and I've tried the 'workaround', but like @Daimona Eaytoy found, isn't a complete solution, as another problem pops out: the process starts running, but never stops Quinnj09 (talk) 10:09, 17 August 2018 (UTC)
Malicious slander & wrongful information within Wiki 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 Wiki team,
I've reviewed a few pages dealing with some natural health sites and political groups. There appear to be issues with content created by opposing interest groups which aim to slander, defame and subvert such sites and groups. One can find stories and information which are slanderous contained on sites and in articles which oppose natural health sites and political groups. For instance, Monsanto and Bayer have created a budget of approximately one billion dollars to defame and subvert those who expose the toxic nature of some of their chemicals and the serious negative effects of agricultural and other chemicals and GMOs, studies which were suppressed or buried in scientific literature and which show growth of tumours in rats and fertility issues in second and third generation, yet those products were approved by the EPA and by the FDA and released on the market and currently in circulation within most parts of the world, causing illness and fertility issues. People must know what they're eating, labeling of products is a must. Further, soil which has been used for growth of GMOs and doused with some chemicals undergoes fundamental changes and the biodiversity mutates and changes. Such practices harm not only the people who eat such crops but soil biology, water and future fertility of the soil. In any case, such companies attempt to discredit those who simply bring studies and information to the public which such companies attempt to suppress or have previously deleted. Their actions are criminal. Though, you have a choice. Don't let these awful people slander and harm sites which promote wholesome living. Natural News site isn't fake news. Whoever has written that content is slandering the site & would have links to Corporations or political groups which aim to harm that site. The content of that web page is inaccurate and defamatory. Please ensure that people who write content aren't doing so to harm others. In the case of whoever wrote the web page for Natural News, the author is causing harm. It's not pseudoscience on NaturalNews, articles reference scientific journals of various disciplines, which public peer reviewed papers. Same journals which are used by tertiary students and researchers in those fields. Some articles are opinion, though opinion articles shouldn't be described as fake news, then you would need to describe most of USA's media as fake news, incl CNN, MSNBC, Disney and others. Can you please check who is writing information and prevent such cases of malicious slander and wrongful defamation?
Thank you & Regards
Concerned Reader PhD 2001:8003:6A61:8100:ACF0:B98C:A6DE:A3CF (talk) 04:01, 15 August 2018 (UTC)
- Which website is this about?
- mediawiki.org does not host pages about natural health sites and political groups (if mediawiki.org does then these pages are out of scope. It is up to each website which information they host or not. Feel free to contact the website that you refer to. Malyacko (talk) 05:15, 15 August 2018 (UTC)
Problem with Sessions
The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
I have just upgraded to MediaWiki 1.31 (from version 1.14). My site is password protected with Google's PHP API which saves login information in the php session. When I now log into the wiki I get the following warning: "There seems to be a problem with your login session; this action has been canceled as a precaution against session hijacking. Please resubmit the form." I know what the "hijacking" is because Google is saving things there. Is there anything I can comment out so that the login will continue even so? Since my site is already behind a password, I am not that concerned about maintaining mediawiki's security. Naterudd (talk) 06:59, 15 August 2018 (UTC)
- The error might be unrelated to your customized setup, there have been more than a few changes since MediaWiki 1.14 (almost a decade ago). See Project:Support desk/Flow/2016/07#h-Login_error_(session_hijacking_protection)-2016-07-11T08:56:00.000Z. AhmadF.Cheema (talk) 07:25, 15 August 2018 (UTC)
- Unfortunately, I have already read that post and played with the $wgMainCacheType and $wgSessionCacheType variables. I have tried the permutations they have suggested and I still get the error. Is there something else I can try? Naterudd (talk) 10:45, 15 August 2018 (UTC)
- I have found where the condition is catching, but I don't know what to do to fix the error. In AuthManagerSpecialPage.php, line 411, there is a check to make sure the requested token matches the session token. This condition is proving false when I don't want it to. Here are the values that those variables have:
$sessionToken = object(MediaWiki\Session\Token)#300 (3) {["secret":"MediaWiki\Session\Token":private]=>string(32) "b626c7ef5ecfb59367b8d20e7aaca39c"["salt":"MediaWiki\Session\Token":private]=>string(0) ""["new":"MediaWiki\Session\Token":private]=>bool(false)}$requestTokenValue = string(43) "d5ddecb14be41c13f0e85a8aa35b51f55b7e3e57+\\"- I have tried to comment out lines 411 and 412, and while I do get redirected to my last visited page, my user isn't logged in.
- Please let me know if anything can be done. Naterudd (talk) 05:06, 23 August 2018 (UTC)
- I have traced the problem to the fact that I was escaping POST variables coming in. I have disabled that. But now, the login page goes through, but I don't end up being logged in. What would be causing that? Naterudd (talk) 06:12, 24 August 2018 (UTC)
Wikitext to Scrubinto
The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
I have copied a scribunto module as it is from English to Malayalam Wikipedia. Unfortunately it is currently being displayed as a plain wikitext. Is there any method through which I can convert the plain text into a scrubinto module? The page I am talking to you about is Module:UserLinks/shared. Adithyak1997 (talk) 07:41, 15 August 2018 (UTC)
- Seems to be a scribunto module now. ☠MarkAHershberger☢(talk)☣ 17:54, 15 August 2018 (UTC)
- Malayalam Wikipedia is prefixed with "ml." not "ms.". AhmadF.Cheema (talk) 18:29, 15 August 2018 (UTC)
- I am sorry to inform you that with the help of an administrator, I was able to delete the existing module and create a new module. Adithyak1997 (talk) 18:37, 15 August 2018 (UTC)
Help with entry David Patrikarakos
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.
Needing help with the entry https://en.wikipedia.org/wiki/Draft:David_Patrikarakos
Can someone assist - seems stuck in long limbo. And need help in uploading a photo - I can't quite figure that out Le Bijoux (talk) 08:00, 16 August 2018 (UTC)
- Welcome to mediawiki.org. For workflow issues on other websites like en.wikipedia.org, feel free to discuss on en.wikipedia.org.
- See e.g. https://en.wikipedia.org/wiki/Wikipedia:Uploading_images or https://en.wikipedia.org/wiki/Help:Adding_image Malyacko (talk) 09:25, 16 August 2018 (UTC)
Category links not updating automatically, not solved by job queue
The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
I installed MediaWiki from the docker official container (https://hub.docker.com/_/mediawiki/) in a Google Cloud VM running Debian. All appears to be working fine, except that the category links are not updating (i.e., when I add or change categories or some pages' categories, these changes are not recognized by the indexes of pages within categories). If I run refreshLinks.php, all is updated fine.
I read in other posts that a possible reason could be the job queue (StackOverflow Q, on mw.o here, Special:Whatlinkshere and file usage aren't being updated). So I changed $wgJobRunRate to 10, set $wgRunJobsAsync to false, and ran runJobs.php, but it did not change the behaviour. If I make changes to the pages' categories, the showJobs.php will say that I have 0 jobs in queue, but the categories would be wrong. I run refreshLinks.php, and the categories are fixed.
Used versions are: Mediawiki 1.31.0; PHP 7.2.8; SQLite 3.20.1; ICU 57.1.
I appreciate your help to get the usual behavior of links are automatically updating, so I don't have to keep running refreshLinks.php. WikipedianJota (talk) 12:36, 16 August 2018 (UTC)
- $wgJobRunRate is meant to be set to a number between 0 and 1, inclusive. Try setting it to 1. ☠MarkAHershberger☢(talk)☣ 15:47, 16 August 2018 (UTC)
- Set $wgJobRunRate to 1. Still not updating. I tried in a new VM and the issue reproduces. WikipedianJota (talk) 17:03, 16 August 2018 (UTC)
- A faulty extension might be breaking when you save the page, saving the page but not inserting the necessary jobs to update the links. Set up logs and php error reporting and try saving the page again, and see if there's some error popping up. (check Manual:How to debug) Ciencia Al Poder (talk) 09:19, 17 August 2018 (UTC)
- Did a fresh install (from docker image, using SQLite) without extensions. Issue still present. Also tested on a localhost, and the issue is present. I asked this in StackOverflow and someone said that they also have this issue (https://stackoverflow.com/questions/51876717/mediawiki-links-not-updating-automatically-not-solved-by-job-queue).
- Used logs (which I do not understand), but the mentions of error were:
#19 {main}
- [runJobs] recentChangesUpdate Special:RecentChanges type=purge requestId=3ee8daeac7c45827ca48b1a5 (id=5,timestamp=20180818012150) STARTING
[exception] [3ee8daeac7c45827ca48b1a5] /index.php/TestPage1 Wikimedia\Rdbms\DBUnexpectedError from line 3879 of /var/www/html/includes/libs/rdbms/database/Database.php: RecentChangesUpdateJob::run: Cannot flush snapshot because writes are pending (JobQueueDB::claimRandom).#19 {main}
- [DBQuery] my_wiki ROLLBACK /* MWExceptionHandler::rollbackMasterChangesAndLog IP */
[exception] [3ee8daeac7c45827ca48b1a5] /index.php/TestPage1 Wikimedia\Rdbms\DBExpectedError from line 1340 of /var/www/html/includes/libs/rdbms/loadbalancer/LoadBalancer.php: RecentChangesUpdateJob::run: Flush failed on server(s) : RecentChangesUpdateJob::run: Cannot flush snapshot because writes are pending (JobQueueDB::claimRandom).#19 {main}
- [DBQuery] my_wiki SELECT /* JobQueueDB::recycleAndDeleteStaleJobs IP */ job_id FROM job WHERE job_cmd = 'userGroupExpiry' AND (job_token != ) AND (job_token_timestamp < '20180818003653') AND (job_attempts < '3')
- [DBQuery] my_wiki SELECT /* JobQueueDB::recycleAndDeleteStaleJobs IP */ job_id FROM job WHERE job_cmd = 'userGroupExpiry' AND (job_token != ) AND (job_token_timestamp < '20180811013653') AND (job_attempts >= '3')
- [runJobs] userGroupExpiry Main_Page requestId=aa41c39d4727eb5422905189 (id=1,timestamp=20180818011857) STARTING
- [exception] [aa41c39d4727eb5422905189] /index.php/Category:TestCat2 Wikimedia\Rdbms\DBUnexpectedError from line 3879 of /var/www/html/includes/libs/rdbms/database/Database.php: UserGroupExpiryJob::run: Cannot flush snapshot because writes are pending (JobQueueDB::claimRandom).
- Should I report as bug? WikipedianJota (talk) 11:11, 18 August 2018 (UTC)
- Another update. I did another install using the same mediawiki docker image, but now with a MariaDB container as database, and the categories and links are properly updating. So I think this is an issue when using SQLite. WikipedianJota (talk) 12:53, 18 August 2018 (UTC)
- MariaDB/MySQL is our recommended relational database softwares. 星耀晨曦 (talk) 15:14, 18 August 2018 (UTC)
- "SQLite support for MediaWiki is of production quality as of MediaWiki 1.17." according to Manual:SQLite .. Lianxiangru (talk) 18:42, 18 August 2018 (UTC)
- Those error lines are missing most of the stack traces. Tgr (talk) 19:49, 18 August 2018 (UTC)
BlueSpice (Help Section, how to edit, change, remove)
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 everyone, I inherited a wiki with the free version of bluespice, there is a HELP, section where there are links to bluespice wiki, etc, does anyone know how to remove or edit the links?
Thanks The.oneguyaz (talk) 13:05, 16 August 2018 (UTC)
- ping @Osnard ☠MarkAHershberger☢(talk)☣ 15:53, 16 August 2018 (UTC)
- To remove the link to BlueSpice project page you may just disable Extension:AboutBlueSpice, which can be done by removing the
wfLoadExtension('AboutBlueSpice')in the appropriate settings file (probably insettings.d/sub-directory). If you want to edit the "Help" section in general, have a look at the pageMediaWiki:Sidebarin your wiki (see Sidebar for details) Osnard (talk) 12:02, 18 August 2018 (UTC)
AbuseFilter
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. Is it possible to create an AbuseFilter that can flag external links added by new users, but ignore external links that are embedded in templates? Currently, an issue on Wikiversity is that two things are flagged that shouldn't be:
- citations that include URLs
- Article_Info template (used in WikiJournals)
!('autoconfirmed' in user_groups) & /* new user */
length(added_links) > 0 & /* ext links added */
old_size != 0 & /* was empty */
rcount("\{\{Cite",added_lines) = 0 & /* didn't add a citation template */
rcount("\{\{Article info",added_lines) = 0 /* didn't add Article info template */
Does that look like it'd function as I'm expecting? T.Shafee(Evo﹠Evo)talk 13:33, 16 August 2018 (UTC)
Set object to Thumbnail Size Preference
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.
Can I set a DIV's width to the user's "Thumbnail size" preference?
Something like:
<div style="width:{{thumbsize}}"></div> Jer Hughes (talk) 05:54, 17 August 2018 (UTC)
- From what I've found, you would have to use JS for this.
thumbsize = mw.user.options.get( 'thumbsize' );
thumbsizewould then be index into the PHP variable$wgThumbLimits. ☠MarkAHershberger☢(talk)☣ 23:47, 17 August 2018 (UTC)
Feature or bug?
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.
Greetings! I'm an admin at enwiki and I just encountered an unusual situation. A user who was editing from a globally blocked range (188.29.164.0/23) with global IP block exemption forgot their password and tried to reset it. The software gave them a message that "You cannot reset user's passwords because you are blocked globally". Again, this is an editor with global IPBE trying to use the "forgot password" function. The user was able to figure it out and report it at a noticeboard only because they were already logged in on their mobile device. If that had not been the case, they would have been prohibited from regaining access by the software, despite the lack of a block actually affecting their account, with no technical information on the block, no information on a means of recourse, and no capability to report the situation to any noticeboard globally while logged out. I eventually took a shot in the dark and disabled the global block on enwiki, which resolved the issue, but did not seem like a reasonable way of going about letting a user reset their password, and the user is understandably frustrated and shaken about the experience. I'm not sure if this is a bug or a simple oversight within the security features, but it does not seem like a situation that ever would have been intended. The mediawiki software should surely not lock out editors with IPBE who need to reset their passwords, and it should probably provide all users some sort of specific information on why they're being locked out and what to do to regain access to their accounts! You can see how the situation played out here. Swarm (talk) 16:17, 19 August 2018 (UTC)
Character-Counting Feature
Hi. I was wondering if there was a MediaWiki feature that could count the amount of times a certain character occurs in text. For example, in "AABABABBA", if asked to search for A, it would return "5" (because there are 5 As). This feature would be very helpful for a project I'm working on here. 172.76.110.16 (talk) 05:56, 20 August 2018 (UTC)
- I think your best bet would be to use a bit of JS and a gadget for this. I don't know of anything that you could use off the shelf. ☠MarkAHershberger☢(talk)☣ 14:07, 20 August 2018 (UTC)
Auth recommendation
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.
What way of authentication would you recommend for the following scenario:
The users log in to my web application (based on JSF) and only after a successful login they should be allowed to access the wiki via a link on the pages.
I don't need to differentiate between the all the different users. And all users just need to have read-only access to the wiki.
-- Heiko Tdtappe (talk) 06:49, 20 August 2018 (UTC)
- If you are just protecting a read-only wiki, then you don't really need an authentication mechanism. All you need to do is make sure the wiki is not accessible to users who haven't logged into your application. You could do this by proxying all requests through your authentication app. ☠MarkAHershberger☢(talk)☣ 14:01, 20 August 2018 (UTC)
- What exactly do you have in mind when you say "proxying through app"?
- When my users log into my app they for example get a link on each page which leads to some helpful information in the wiki concerning that page. If someone enters the url of that link into the browser without being logged into my app he/she shouldn't be allowed to access that information in the wiki. Of course I could offer a url to the wiki that is checked by a servlet filter in my app. But as the wiki uses cross references without using urls going through my servlet filter...
- Probably I don't understand what you are proposing!? Tdtappe (talk) 10:15, 21 August 2018 (UTC)
- No, I think you understood what I was saying. Your proxy would have to rewrite links that it got from MediaWiki to go through the proxy instead of around it.
- A simpler solution, though, would be to write some authentication method that just checks for the cookies that are set by your app. See auth manager or, probably better, use @Cindy.cicalese's PluggableAuth. ☠MarkAHershberger☢(talk)☣ 15:01, 23 August 2018 (UTC)
forgot to supply FDNA kit # at upload
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.
In the registration profile, I forgot to fill in my FTDNA kit # before uploading the file to you. Where can I send my FTDNA Kit # & Gedmatch File # & userid for the upload session? 67.161.169.226 (talk) 14:38, 20 August 2018 (UTC)
- Whatever an "FTDNA kit" is, you seem to ask your question in the wrong place... what made you come to this support desk, and which other website do you refer to? :) Malyacko (talk) 18:26, 20 August 2018 (UTC)
New problem: failed to open stream: No such file or directory in...
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.
This is the warnings I got instead of the page:
Warning: require(/home4/id8tionist/public_html/specialprojects/wiki/extensions/EmbedVideo/classes/VideoService.php): failed to open stream: No such file or directory in /home4/id8tionist/public_html/specialprojects/wiki/includes/AutoLoader.php on line 109
Warning: require(/home4/id8tionist/public_html/specialprojects/wiki/extensions/EmbedVideo/classes/VideoService.php): failed to open stream: No such file or directory in /home4/id8tionist/public_html/specialprojects/wiki/includes/AutoLoader.php on line 109
Fatal error: require(): Failed opening required '/home4/id8tionist/public_html/specialprojects/wiki/extensions/EmbedVideo/classes/VideoService.php' (include_path='/home4/id8tionist/public_html/specialprojects/wiki/vendor/pear/console_getopt:/home4/id8tionist/public_html/specialprojects/wiki/vendor/pear/mail:/home4/id8tionist/public_html/specialprojects/wiki/vendor/pear/mail_mime:/home4/id8tionist/public_html/specialprojects/wiki/vendor/pear/mail_mime-decode:/home4/id8tionist/public_html/specialprojects/wiki/vendor/pear/net_smtp:/home4/id8tionist/public_html/specialprojects/wiki/vendor/pear/net_socket:/home4/id8tionist/public_html/specialprojects/wiki/vendor/pear/pear-core-minimal/src:/home4/id8tionist/public_html/specialprojects/wiki/vendor/pear/pear_exception:.:/opt/php71/lib/php') in /home4/id8tionist/public_html/specialprojects/wiki/includes/AutoLoader.php on line 109 Id8tionist (talk) 01:40, 21 August 2018 (UTC)
- Looks like the file "/home4/id8tionist/public_html/specialprojects/wiki/extensions/EmbedVideo/classes/VideoService.php" does not exist. Are you trying to enable an extension without downloading and placing it in the extensions directory first? Ciencia Al Poder (talk) 08:20, 21 August 2018 (UTC)
cambio de url de mediawiki
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.
como puedo cambiar la url de mi wiki que instale usando software mediawiki ya edite $swserver y no puedo acceder ¿que puedo hacer? 189.217.120.254 (talk) 22:44, 21 August 2018 (UTC)
- See Manual:LocalSettings.php. No idea what "$swserver" is - that does not sound like a MediaWiki setting? Malyacko (talk) 07:56, 22 August 2018 (UTC)
- Supongo que quieres decir $wgServer. Deberías proporcionar más información acerda de "no puedo acceder". Ciencia Al Poder (talk) 13:13, 22 August 2018 (UTC)
Problem with the PDF render/download
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'll do have a mediawiki (1.31.0) in a Virtual centos 7 , With host-only network with my Linux mint.
Everything seems to work fine within the mediawiki aswell the access (Through apache) from my LM. (Yaikes!) but i do have a problem at the time to render and download some of the articles in a pdf format , the render server seems to work just fine but somehow seems the service is not allowed to collect what its been rendered to present it to download so it shows this error (https://imgur.com/a/GBeX9T8)
I've tried to watch , check and change couple things but it seems i cant find the issue. (check that most of my packages are up to date , the all path within the diferent .py are correct , checking the ips...etc even check that the apache server owns most of the folders involved in the) I've run out of ideas or thing to check on my own so here i'am asking for help , good think that since its in a VM i can try yolo things that i would be able to use one of the safe backup VM that i have.
I did not find many solid options arround this problem as seems to be something not too common. I appreciate any help you might provide! Thanks and have a good day. McFeRRyz (talk) 00:19, 22 August 2018 (UTC)
- There should be logs from your pdf daemon. Do they say anything interesting? ☠MarkAHershberger☢(talk)☣ 16:08, 23 August 2018 (UTC)
problem to define iframe by IframePage
The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
i have the problem to use iframes and install the Extension IframePage.
my config looks like
require_once "$IP/extensions/IframePage/IframePage.php";
#$wgIframePageSrc= array( /* REQUIRED! */ );
$wgIframePageSrc = array('moni_ap013_tileupdater' => 'http://ma22-ap-013/EBL_Monitoring/tileupdater.html',
'praxis_paket_liz' => 'http://ma22-wiki-001/software_inventar/examples/mum_praxis_wiki.php',
'iframes' => 'http://ma22-wiki-001/eblwiki/iframes/muster.html' );
$wgIframePageAllowPath = true;
#Freigabe der IFrame-Sperre
$wgEditPageFrameOptions = false;
in page i integrate: {{Special:IframePage|praxis_paket_liz}}
but it will only show the text of 'http://ma22-ap-013/EBL_Monitoring/tileupdater.html'!!!!
if i look to Spezial:IframePage there will show the same.
could someone help how to show 'http://ma22-wiki-001/software_inventar/examples/mum_praxis_wiki.php'?
additional: is it possible to define the iframe-size?
reagards Jan JanTappenbeck (talk) 08:18, 22 August 2018 (UTC)
- Looking at the instructions on Extension:IframePage it looks correct. However, inspecting the code, apparently it attempts to replace underscores with spaces on the special page parameters.
- Try defining the $wgIframePageSrc array without underscores (if you want to separate words, use dashes instead, for example). For example,
praxis-paket-lizinstead ofpraxis_paket_lizCiencia Al Poder (talk) 13:11, 22 August 2018 (UTC)
Problem for moving a Wiki with Blue Spice extension
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.
Old Wiki : MediaWiki 1.27 / BlueSpice 2.23.2 / PHP 5.4.45 / MySQL 5.5.48
New Wiki : MediaWiki 1.31 / PHP 7.0.30 / MariaDB 5.5.56
I try to move a Wiki from a server to another server. The new wiki is upgrading. The old wiki is backing up and restoring in the new wiki.
The problem is with BS extension : how to move from a wiki WITH BS to a wiki WITHOUT BS ?
Anyone has done that before ?
Thx. Panade 2018 (talk) 09:27, 22 August 2018 (UTC)
- Are you try Manual:Extensions#Uninstalling an extension? 星耀晨曦 (talk) 09:49, 22 August 2018 (UTC)
- Thank you. The problem lies within the DB dump from the old Wiki and the import in the new Wiki without BS. Panade 2018 (talk) 12:45, 22 August 2018 (UTC)
- What problem are you seeing? I don't know enough about BS to tell you that it absolutely should not be a problem, but it doesn't seem like it should be a problem.
- (Pinging @Osnard in case he can shed some light.) ☠MarkAHershberger☢(talk)☣ 16:03, 23 August 2018 (UTC)
- I can't upload the database in the new wiki. The DB contains BS tables. I guess these tables are a problem for moving the wiki. Panade 2018 (talk) 08:49, 24 August 2018 (UTC)
- Why you want to upload the database? The new wiki only needs to link to the old database and run update.php script. 星耀晨曦 (talk) 12:23, 24 August 2018 (UTC)
- To keep the old wiki data in the new wiki. I don't know how to link. Do you have steps maybe to help me ? Thx:) Panade 2018 (talk) 14:13, 24 August 2018 (UTC)
- If the old wiki and the new wiki in the same host, just copy LocalSettings.php in the old wiki to the new wiki directory. 星耀晨曦 (talk) 14:25, 24 August 2018 (UTC)
- Most information see Manual:Upgrading. 星耀晨曦 (talk) 14:27, 24 August 2018 (UTC)
- BlueSpice can be disabled at any time just like other extensions by removing the
require_onceorwfLoadExtensionstatements from yourLocalSettings.php. In case of BlueSpice 2.23.2 you should have at least three lines in yourLocalSettings.phpfile require_once( "$IP/extensions/BlueSpiceFoundation/BlueSpiceFoundation.php" );require_once( "$IP/extensions/BlueSpiceExtensions/BlueSpiceExtensions.php" );require_once( "$IP/skin/BlueSpiceSkin/BlueSpiceSkin.php" );- Just remove them and BlueSpice will be disabled. Be aware that some functionality (e.g. tags within the pages WikiText) will not work anymore. Osnard (talk) 12:46, 28 August 2018 (UTC)
- BlueSpice Version 3, which is compatible with MediaWiki 1.31 will be released soon. Consider upgrading BlueSpice instead of disabling it. Osnard (talk) 12:48, 28 August 2018 (UTC)
1.31.0 Fails on SQL Server
The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
I get the following error when installing:
[66d756614475630354e4591a] /mw-config/?page=Install Wikimedia\Rdbms\DBQueryError from line 1457 of C:\inetpub\wwwroot\includes\libs\rdbms\database\Database.php: A database query error has occurred. Did you forget to run your application's database schema updater after upgrading?
Query: CREATE TABLE [mediawiki].[actor] (
actor_id bigint unsigned NOT NULL CONSTRAINT PK_actor PRIMARY KEY IDENTITY(0,1),
actor_user int unsigned,
actor_name nvarchar(255) NOT NULL
)
Function: Wikimedia\Rdbms\Database::sourceFile( C:\inetpub\wwwroot/maintenance/mssql/tables.sql )
Error: 102 [SQLSTATE 42000][Error Code 102][Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Incorrect syntax near 'unsigned'.
Backtrace:
#0 C:\inetpub\wwwroot\includes\libs\rdbms\database\Database.php(1427): Wikimedia\Rdbms\Database->makeQueryException(string, integer, string, string)
#1 C:\inetpub\wwwroot\includes\libs\rdbms\database\Database.php(1200): Wikimedia\Rdbms\Database->reportQueryError(string, integer, string, string, boolean)
#2 C:\inetpub\wwwroot\includes\libs\rdbms\database\Database.php(4194): Wikimedia\Rdbms\Database->query(string, string)
#3 C:\inetpub\wwwroot\includes\libs\rdbms\database\Database.php(4129): Wikimedia\Rdbms\Database->sourceStream(resource (closed), NULL, NULL, string, NULL)
#4 C:\inetpub\wwwroot\includes\installer\DatabaseInstaller.php(225): Wikimedia\Rdbms\Database->sourceFile(string)
#5 C:\inetpub\wwwroot\includes\installer\DatabaseInstaller.php(248): DatabaseInstaller->stepApplySourceFile(string, string, boolean)
#6 C:\inetpub\wwwroot\includes\installer\MssqlInstaller.php(635): DatabaseInstaller->createTables()
#7 C:\inetpub\wwwroot\includes\installer\Installer.php(1575): MssqlInstaller->createTables(MssqlInstaller)
#8 C:\inetpub\wwwroot\includes\installer\WebInstallerInstall.php(44): Installer->performInstallation(array, array)
#9 C:\inetpub\wwwroot\includes\installer\WebInstaller.php(281): WebInstallerInstall->execute()
#10 C:\inetpub\wwwroot\mw-config\index.php(79): WebInstaller->execute(array)
#11 C:\inetpub\wwwroot\mw-config\index.php(38): wfInstallerMain()
#12 {main}
2A00:23C5:6E3A:7100:E153:6A52:D860:12BC (talk) 15:40, 22 August 2018 (UTC)
How to override Special:RecentChanges page ?
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 everyone,
I have to redesign and change HTML structure of the Special:RecentChanges page of my wiki so I started a new extension and tried to override the current one by creating another Special page with the same alias but it didn't worked. Is it possible to override the Special:RecentChanges page ? How should I proceed ? TheBigMiike (talk) 15:55, 22 August 2018 (UTC)
- From SpecialPage.php:
- To add a core special page, use the similar static list in SpecialPageFactory::$coreList.
- To remove a core static special page at runtime, use a SpecialPage_initList hook.
- I would subclass SpecialRecentChanges.php, remove the core special static page in the SpecialPage_initList hook and add my subclass in SpecialPageFactory::$coreList. ☠MarkAHershberger☢(talk)☣ 15:32, 23 August 2018 (UTC)
Intranet Build Reference issue with Kerberos and sAMAccountName
The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
I'm following the guide at Intranet/Intranet Reference Build Ubuntu but am having troubles when doing the group membership check in the configuration at the Apache level. Using the base configuration for local.config in the section titled "vhost with LDAP and Kerberos" I look at the error.log for Apache and my server is not changing my username down to a simple name, it's prefacing it with my short name for my Windows domain. Here's what the logs look like where I seem to see the trouble:
Wed Aug 22 15:05:24.327289 2018] [auth_kerb:debug] [pid 23170] src/mod_auth_kerb.c(1871): [client 192.168.1.158:64619] kerb_authenticate_a_name_to_local_name suser@MYDOMAIN.TLD.COM -> MYDOMAIN\\suser [Wed Aug 22 15:05:24.327424 2018] [authz_core:debug] [pid 23170] mod_authz_core.c(809): [client 192.168.1.158:64619] AH01626: authorization result of Require ip 127.0.0.1 ::1: denied [Wed Aug 22 15:05:24.327514 2018] [authz_core:debug] [pid 23170] mod_authz_core.c(809): [client 192.168.1.158:64619] AH01626: authorization result of <RequireAll>: denied [Wed Aug 22 15:05:24.327600 2018] [authz_core:debug] [pid 23170] mod_authz_core.c(809): [client 192.168.1.158:64619] AH01626: authorization result of Require ssl : granted [Wed Aug 22 15:05:24.327685 2018] [authz_core:debug] [pid 23170] mod_authz_core.c(809): [client 192.168.1.158:64619] AH01626: authorization result of Require valid-user : granted [Wed Aug 22 15:05:24.327837 2018] [authnz_ldap:debug] [pid 23170] mod_authnz_ldap.c(1306): [client 192.168.1.158:64619] AH01740: ldap authorize: Creating LDAP req structure [Wed Aug 22 15:05:24.334147 2018] [authnz_ldap:debug] [pid 23170] mod_authnz_ldap.c(1320): [client 192.168.1.158:64619] AH01741: auth_ldap authorise: User DN not found with filter (&(objectclass=*)(sAMAAccountName=MYDOMAIN\\\\suser)): User not found [Wed Aug 22 15:05:24.334284 2018] [authz_core:debug] [pid 23170] mod_authz_core.c(809): [client 192.168.1.158:64619] AH01626: authorization result of Require ldap-filter memberof:1.2.840.113556.1.4.1941:=CN=WikiUsers,OU=Users,DC=mydomain,DC=tld,DC=com: denied
I would think that the first line where kerb_authenticate_a_name_to_local_name runs should make my name to just "suser" instead of MYDOMAIN\\suser. So the second to the last log line indicates it's trying to match a sAMAccountname against my LDAP/AD directory prefaced with the domain name, which is incorrect, not? So I don't get a found user and it fails. Am I missing some config somewhere that would strip that MYDOMAIN out?
MediaWiki version is 1.31.0, using PHP 7.2.7, MariaDB 10.1.34. Any insight is greatly appreciated!
- Steve Sfksg (talk) 20:26, 22 August 2018 (UTC)
- pinging @gerdesj since he is the one working on the guide you're following. ☠MarkAHershberger☢(talk)☣ 15:07, 23 August 2018 (UTC)
- I think I figured this out. I'm using Ubuntu 18.04.1 LTS, and with the Kerberos configuration an /etc/krb5.conf that has auth_to_local remappings that don't work with the guide. So in /etc/krb5.conf, I commented out the [realms] section with references to my domain and then the mappings occur properly above.
- I don't have any other bad impact from commenting those lines out, that I can tell, but I'm hardly a Kerberos genius. So maybe when @Gerdesj updates the guide to the current LTS version of Ubuntu more detail is provided?
- - Steve Sfksg (talk) 20:10, 27 August 2018 (UTC)
- Sorry for the delay in response (I have been on hols for a week but I also seem to have missed quite a few pings as well - soz).
- I will be updating my guides for 18.04 as soon as I can sit down and spend some quality time with it but for now I have to say that I state quite clearly what is tested and demonstrated as working - I even put in a testing matrix with datestamps at the top of each of my pages.
- I do appreciate that I am a bit behind on the Ubuntu LTS series. I have rather a lot of custom Linux VMs to look after at work and I have safely migrated many of them to Bionic. On the bright side, if you stick with Xenial for now and MW 1.31 then you are supported by Canonical on the OS front and will know that at least someone has a fairly complicated MW running OK on that platform.
- Now as to Steve's snag with respect to naming conventions:
- In the Apache config for the Kerb module, KrbLocalUserMapping = On, removes the realm from the username (Kerberos "realm" == AD "domain"). To see what is going on, create a file with this on your web server with .php on the end and point your browser at it:
- <?php
- echo $_SERVER['REMOTE_USER'];
- phpinfo();
- ?>
- Incidentally, It is nice to know that someone has actually seen my guides - comments are always welcome on the discussion pages. Also if you think they can be improved then please dive in and mercilessly edit them but please bear in mind that the emphasis is on "demonstrably working" 8) Gerdesj (talk) 00:38, 12 September 2018 (UTC)
MYSQL issues after upgrade
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.
We are running Red Hat 6.9 and have upgraded to Apache 2.4 and PHP 7. We have also upgraded our MediaWiki from version 1.25.3 to version 1.27.4 but when we try to access the MediaWiki we see the following error:-
Database.php: DatabaseBase::factory no viable extension found for type 'mysql.
I have checked the other support questions regarding the above issue and have confirmed that MySQL is installed and running, the php7-mysqlnd package is installed and that both the mysqlnd.ini and mysqli.ini files show that the extensions are enabled.
Can you advise on what could be still causing this issue. Kirky9449 (talk) 15:32, 23 August 2018 (UTC)
- I encourage you to upgrade to 1.31 instead of 1.27. 1.27 is an LTS but support will stop next spring.
- Could you verify that phpinfo() shows that MySQLnd is available?
- What do the lines containing "$wgDB..." in your LocalSettings.php file say (except the password)? ☠MarkAHershberger☢(talk)☣ 15:59, 23 August 2018 (UTC)
Anyone help with getting extension working
The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
I have a linking extension what works very good but since update to latest mediawiki it stopped working.
Does anyone know how to make this extension mediawiki 1.31 compatible
Someone made it couple of year ago but cant get in touch with the guy.
Here is the extension files:
| AddLinksCBE.php |
|---|
<?php
/*
error_reporting(E_ALL);
ini_set('display_errors', TRUE);
ini_set('display_startup_errors', TRUE);
*/
if ( !defined( 'MEDIAWIKI' ) ) {
echo "This is an extension to the MediaWiki software and cannot be used standalone";
die( 1 );
}
require_once("$IP/extensions/AddLinksCBE/AddLinksCBEDoAddLinks.php");
$wgHooks['EditPageBeforeEditButtons'][] = 'efAddLinksCBEButton';
$wgHooks['ArticleSave'][] = 'efAddLinksCBESave';
function efAddLinksCBEButton( &$editpage, &$buttons ) {
$attr = array(
'id' => 'wpAddLinksCBE',
'name' => 'wpAddLinksCBE',
'type' => 'submit',
'value' => 'Add links and save',
'title' => 'Automatically add links to page and save the page',
);
$buttons['addlinksCBE'] = Xml::element( 'input', $attr, '' );''
return true;
}
function efAddLinksCBESave($article, $user, &$text, $summary, $minor, $watch, $sectionanchor, $flags) {
global $wgRequest;
if ($wgRequest->getCheck('wpAddLinksCBE')) {
addLinksCBE($text);
}
return true;
}
|
| AddLinksCBEDoAddLinks.php |
|---|
<?php
set_time_limit(871);
#######
$wgAddLinksCBECacheFileName1 = "$IP/extensions/AddLinksCBE/AddLinksCache1.bin";
$wgAddLinksCBECacheFileName2 = "$IP/extensions/AddLinksCBE/AddLinksCache2.bin";
#######
$wgAddLinksCBELinks = array();
$wgAddLinksCBECont = array();
function reallyEmpty($str){
return empty($str) && $str !== '0';
}
function getNextWord($content, &$offset){
$subContent = substr($content, $offset);
if (preg_match('/^([\s]*)([^\s\[\]\{\}<>]+)/u', $subContent, $match)) {
$offset += strlen($match[0]);
return $match[2];
}
else {
return false;
}
}
function getWhitespace($content, &$offset){
$subContent = substr($content, $offset);
if (preg_match('/^[\s]+/u', $subContent, $match)) {
$offset += strlen($match[0]);
return $match[0];
}
else {
return false;
}
}
function getRest($content, &$offset){
$subcont = substr($content, $offset);
if (preg_match('/^[^\[\{<\p{L}\p{M}\p{N}]+/u', $subcont, $match)){
$offset += strlen($match[0]);
return $match[0];
}
else {
return false;
}
}
#used to skip markup in text
#$startMarkup is the marker to start the markup, e.g., [[ # $endMarkup is the marker to end the markup, e.g., ]]
#if markup text is found, it is put in $markText, $offset is the offset after the markup text
#and the function returns 1
#if the start markup marker is found but not the end markup marker, the function returns -1, the start marker
#is put in $markText and $offset is the offset after start markup
#if the start markup marker is not found, the function returns 0
function skipMarkup($startMarkup, $endMarkup, $content, &$offset, &$markText) {
if (preg_match($startMarkup, substr($content, $offset), $matches)) {
$newoffset = strpos($content, $endMarkup, $offset);
if ($newoffset) {
$newoffset += strlen($endMarkup);
$markText = substr($content, $offset, $newoffset-$offset);
$offset = $newoffset;
return 1;
}
else {
$markText = $matches[0];
$offset += strlen($matches[0]);
return -1;
}
}
else
return 0;
}
// add template to increase font size of Tibetan script
// taking links into account
function amplifyTibetan($text) {
$matchTibetan = '/\p{Tibetan}+/u';
$replTibetan = '{{BigTibetan|$0}}';
if (preg_match('/^(\[\[\X*\|)(\X+)/u', $text, $matches)) {
$newText = $matches[1] . preg_replace($matchTibetan, $replTibetan, $matches[2]);
} elseif (preg_match('/^\[\[(\p{Tibetan}+)\]\]/u', $text)) {
$newText = '{{BigTibetan|' . $text . '}}';
} elseif (preg_match('/^(\[http\:\/\/[^\s]+[\s]+)(\X+)/u', $text, $matches)) {
$newText = $matches[1] . preg_replace($matchTibetan, $replTibetan, $matches[2]);
} elseif (preg_match('/^\{\{Wiki\s*\|\s*\p{Tibetan}+\}\}/u', $text)) {
$newText = '{{BigTibetan|' . $text . '}}';
} else {
$newText = preg_replace($matchTibetan, $replTibetan, $text);
}
return $newText;
}
function addLinksCBE(&$text){
global $wgAddLinksCBELinks, $wgAddLinksCBECont, $wgAddLinksCBECacheFileName1, $wgAddLinksCBECacheFileName2;
if (!file_exists($wgAddLinksCBECacheFileName1)) {
echo "Error: data file $wgAddLinksCBECacheFileName1 does not exist!";
return 1;
}
if (!file_exists($wgAddLinksCBECacheFileName2)) {
echo "Error: data file $wgAddLinksCBECacheFileName2 does not exist!";
return 1;
}
$wgAddLinksCBELinks = unserialize(file_get_contents($wgAddLinksCBECacheFileName1));
$wgAddLinksCBECont = unserialize(file_get_contents($wgAddLinksCBECacheFileName2));
$content = $text;
$newText = '';''
$offset = 0;
$tempText = '';''
while ($offset < strlen($content)) {
$loopOffset = $offset; # used to check for infinite loop
$retVal = skipMarkup('/^\[\[/u', ']]', $content, $offset, $tempText);
if ($retVal > 0) {
$newText .= amplifyTibetan($tempText);
continue;
}
if ($retVal < 0) {
$newText .= $tempText;
continue;
}
<nowiki> $retVal = skipMarkup('/^\{\{/u', '}}', $content, $offset, $tempText);
if ($retVal != 0) {
$newText .= $tempText;
continue;
} </nowiki>
# if there's a [http://, then skip to next] since it's a link
$retVal = skipMarkup('/^\[http\:\/\//u', ']', $content, $offset, $tempText);
if ($retVal > 0) {
$newText .= amplifyTibetan($tempText);
continue;
}
if ($retVal < 0) {
$newText .= $tempText;
continue;
}
$retVal = skipMarkup('/^</u', '>', $content, $offset, $tempText);
if ($retVal != 0) {
$newText .= $tempText;
continue;
}
# special case so we can skip over [[ but not [ (bec. it is used as a bracket in the text)
if (preg_match('/^(\[|\])/u', substr($content, $offset), $match)) {
$newText .= $match[0];
$offset++;
}
<nowiki> # special case so we can skip over {{ but not { (bec. it is used in the text)
if (preg_match('/^(\{|\})/u', substr($content, $offset), $match)) {
$newText .= $match[0];
$offset++;
}</nowiki>
# special case for tables
if (preg_match('/^((\{\|)|(\|\}))/u', substr($content, $offset), $match)) {
$newText .= $match[0];
$offset += strlen($match[0]);
}
$phrase = '';''
$newoffset = $offset;
if (getWhitespace($content, $newoffset) !== false) {
$whiteSize = $newoffset - $offset;
$newText .= substr($content, $offset, $whiteSize);
$offset += $whiteSize;
}
$word = getNextWord($content, $newoffset);
$offsetArr = array();
if ($word !== false) {
$offsetArr[] = $newoffset;
}
while ($word !== false) {
if (reallyEmpty($phrase))
$phrase = $word;
else
$phrase .= ' ' . $word;
if (!isset($wgAddLinksCBECont[$phrase])) {
break;
}
$word = getNextWord($content, $newoffset);
if ($word !== false) {
$offsetArr[] = $newoffset;
}
}
if (!reallyEmpty($phrase))
if (isset($wgAddLinksCBELinks[$phrase])) {
$newText .= amplifyTibetan($wgAddLinksCBELinks[$phrase]);
$offset = $newoffset;
continue;
}
else {
if (preg_match("/[\p{P}\p{S}]+$/u", $phrase, $match) && isset($wgAddLinksCBELinks[substr($phrase, 0, -strlen($match[0]))])) {
$phrase = substr($phrase, 0, -strlen($match[0]));
$newText .= amplifyTibetan($wgAddLinksCBELinks[$phrase]);
$offset = $newoffset - strlen($match[0]);
continue;
}
$phraseArr = explode(' ', $phrase);
array_pop($phraseArr);
array_pop($offsetArr);
while (!reallyEmpty($phraseArr)) {
$phrase = implode(' ', $phraseArr);
if (isset($wgAddLinksCBELinks[$phrase])) {
$newText .= amplifyTibetan($wgAddLinksCBELinks[$phrase]);
$offset = array_pop($offsetArr);
continue(2);
}
if (preg_match("/[\p{P}\p{S}]+$/u", $phrase, $match) && isset($wgAddLinksCBELinks[substr($phrase, 0, -strlen($match[0]))])) {
$phrase = substr($phrase, 0, -strlen($match[0]));
$newText .= amplifyTibetan($wgAddLinksCBELinks[$phrase]);
$offset = array_pop($offsetArr) - strlen($match[0]);
continue(2);
}
array_pop($phraseArr);
$newoffset = array_pop($offsetArr);
}
$firstWord = substr($content, $offset, $newoffset-$offset);
# if there's initial punctuation, remove it and start again
if (preg_match("/^[\p{P}\p{S}]+/u", $firstWord, $match) && strlen($firstWord) > strlen($match[0])) {
$punct = $match[0];
$punctlen = strlen($punct);
$newText .= $punct;
$offset += $punctlen;
continue;
}
$newText .= amplifyTibetan($firstWord);
$offset = $newoffset;
continue;
}
$newText .= getRest($content, $offset);
# check for infinite loop
if ($loopOffset >= $offset) {
echo "Something went wrong ... exiting. <br>";
return 1;
}
}
$text = $newText;
}
?>
|
- ==AddLinksCBE.php==
- 124.169.110.81 (talk) 15:44, 23 August 2018 (UTC)
<?php /* error_reporting(E_ALL); ini_set('display_errors', TRUE); ini_set('display_startup_errors', TRUE); */ if ( !defined( 'MEDIAWIKI' ) ) { echo "This is an extension to the MediaWiki software and cannot be used standalone"; die( 1 ); } require_once("$IP/extensions/AddLinksCBE/AddLinksCBEDoAddLinks.php"); $wgHooks['EditPageBeforeEditButtons'][] = 'efAddLinksCBEButton'; $wgHooks['ArticleSave'][] = 'efAddLinksCBESave'; function efAddLinksCBEButton( &$editpage, &$buttons ) { $attr = array( 'id' => 'wpAddLinksCBE', 'name' => 'wpAddLinksCBE', 'type' => 'submit', 'value' => 'Add links and save', 'title' => 'Automatically add links to page and save the page', ); $buttons['addlinksCBE'] = Xml::element( 'input', $attr, '' ); return true; } function efAddLinksCBESave($article, $user, &$text, $summary, $minor, $watch, $sectionanchor, $flags) { global $wgRequest; if ($wgRequest->getCheck('wpAddLinksCBE')) { addLinksCBE($text); } return true; }
- ==AddLinksCBEDoAddLinks.php==
- 124.169.110.81 (talk) 15:47, 23 August 2018 (UTC)
<?php set_time_limit(871); ####### $wgAddLinksCBECacheFileName1 = "$IP/extensions/AddLinksCBE/AddLinksCache1.bin"; $wgAddLinksCBECacheFileName2 = "$IP/extensions/AddLinksCBE/AddLinksCache2.bin"; ####### $wgAddLinksCBELinks = array(); $wgAddLinksCBECont = array(); function reallyEmpty($str){ return empty($str) && $str !== '0'; } function getNextWord($content, &$offset){ $subContent = substr($content, $offset); if (preg_match('/^([\s]*)([^\s\[\]\{\}<>]+)/u', $subContent, $match)) { $offset += strlen($match[0]); return $match[2]; } else { return false; } } function getWhitespace($content, &$offset){ $subContent = substr($content, $offset); if (preg_match('/^[\s]+/u', $subContent, $match)) { $offset += strlen($match[0]); return $match[0]; } else { return false; } } function getRest($content, &$offset){ $subcont = substr($content, $offset); if (preg_match('/^[^\[\{<\p{L}\p{M}\p{N}]+/u', $subcont, $match)){ $offset += strlen($match[0]); return $match[0]; } else { return false; } } # used to skip markup in text # $startMarkup is the marker to start the markup, e.g., [[ # $endMarkup is the marker to end the markup, e.g., ]] # if markup text is found, it is put in $markText, $offset is the offset after the markup text # and the function returns 1 # if the start markup marker is found but not the end markup marker, the function returns -1, the start marker # is put in $markText and $offset is the offset after start markup # if the start markup marker is not found, the function returns 0 function skipMarkup($startMarkup, $endMarkup, $content, &$offset, &$markText) { if (preg_match($startMarkup, substr($content, $offset), $matches)) { $newoffset = strpos($content, $endMarkup, $offset); if ($newoffset) { $newoffset += strlen($endMarkup); $markText = substr($content, $offset, $newoffset-$offset); $offset = $newoffset; return 1; } else { $markText = $matches[0]; $offset += strlen($matches[0]); return -1; } } else return 0; } // add template to increase font size of Tibetan script // taking links into account function amplifyTibetan($text) { $matchTibetan = '/\p{Tibetan}+/u'; $replTibetan = '{{BigTibetan|$0}}'; if (preg_match('/^(\[\[\X*\|)(\X+)/u', $text, $matches)) { $newText = $matches[1] . preg_replace($matchTibetan, $replTibetan, $matches[2]); } elseif (preg_match('/^\[\[(\p{Tibetan}+)\]\]/u', $text)) { $newText = '{{BigTibetan|' . $text . '}}'; } elseif (preg_match('/^(\[http\:\/\/[^\s]+[\s]+)(\X+)/u', $text, $matches)) { $newText = $matches[1] . preg_replace($matchTibetan, $replTibetan, $matches[2]); } elseif (preg_match('/^\{\{Wiki\s*\|\s*\p{Tibetan}+\}\}/u', $text)) { $newText = '{{BigTibetan|' . $text . '}}'; } else { $newText = preg_replace($matchTibetan, $replTibetan, $text); } return $newText; } function addLinksCBE(&$text){ global $wgAddLinksCBELinks, $wgAddLinksCBECont, $wgAddLinksCBECacheFileName1, $wgAddLinksCBECacheFileName2; if (!file_exists($wgAddLinksCBECacheFileName1)) { echo "Error: data file $wgAddLinksCBECacheFileName1 does not exist!"; return 1; } if (!file_exists($wgAddLinksCBECacheFileName2)) { echo "Error: data file $wgAddLinksCBECacheFileName2 does not exist!"; return 1; } $wgAddLinksCBELinks = unserialize(file_get_contents($wgAddLinksCBECacheFileName1)); $wgAddLinksCBECont = unserialize(file_get_contents($wgAddLinksCBECacheFileName2)); $content = $text; $newText = ''; $offset = 0; $tempText = ''; while ($offset < strlen($content)) { $loopOffset = $offset; # used to check for infinite loop $retVal = skipMarkup('/^\[\[/u', ']]', $content, $offset, $tempText); if ($retVal > 0) { $newText .= amplifyTibetan($tempText); continue; } if ($retVal < 0) { $newText .= $tempText; continue; } $retVal = skipMarkup('/^\{\{/u', '}}', $content, $offset, $tempText); if ($retVal != 0) { $newText .= $tempText; continue; } # if there's a [http://, then skip to next ] since it's a link $retVal = skipMarkup('/^\[http\:\/\//u', ']', $content, $offset, $tempText); if ($retVal > 0) { $newText .= amplifyTibetan($tempText); continue; } if ($retVal < 0) { $newText .= $tempText; continue; } $retVal = skipMarkup('/^</u', '>', $content, $offset, $tempText); if ($retVal != 0) { $newText .= $tempText; continue; } # special case so we can skip over [[ but not [ (bec. it is used as a bracket in the text) if (preg_match('/^(\[|\])/u', substr($content, $offset), $match)) { $newText .= $match[0]; $offset++; } # special case so we can skip over {{ but not { (bec. it is used in the text) if (preg_match('/^(\{|\})/u', substr($content, $offset), $match)) { $newText .= $match[0]; $offset++; } # special case for tables if (preg_match('/^((\{\|)|(\|\}))/u', substr($content, $offset), $match)) { $newText .= $match[0]; $offset += strlen($match[0]); } $phrase = ''; $newoffset = $offset; if (getWhitespace($content, $newoffset) !== false) { $whiteSize = $newoffset - $offset; $newText .= substr($content, $offset, $whiteSize); $offset += $whiteSize; } $word = getNextWord($content, $newoffset); $offsetArr = array(); if ($word !== false) { $offsetArr[] = $newoffset; } while ($word !== false) { if (reallyEmpty($phrase)) $phrase = $word; else $phrase .= ' ' . $word; if (!isset($wgAddLinksCBECont[$phrase])) { break; } $word = getNextWord($content, $newoffset); if ($word !== false) { $offsetArr[] = $newoffset; } } if (!reallyEmpty($phrase)) if (isset($wgAddLinksCBELinks[$phrase])) { $newText .= amplifyTibetan($wgAddLinksCBELinks[$phrase]); $offset = $newoffset; continue; } else { if (preg_match("/[\p{P}\p{S}]+$/u", $phrase, $match) && isset($wgAddLinksCBELinks[substr($phrase, 0, -strlen($match[0]))])) { $phrase = substr($phrase, 0, -strlen($match[0])); $newText .= amplifyTibetan($wgAddLinksCBELinks[$phrase]); $offset = $newoffset - strlen($match[0]); continue; } $phraseArr = explode(' ', $phrase); array_pop($phraseArr); array_pop($offsetArr); while (!reallyEmpty($phraseArr)) { $phrase = implode(' ', $phraseArr); if (isset($wgAddLinksCBELinks[$phrase])) { $newText .= amplifyTibetan($wgAddLinksCBELinks[$phrase]); $offset = array_pop($offsetArr); continue(2); } if (preg_match("/[\p{P}\p{S}]+$/u", $phrase, $match) && isset($wgAddLinksCBELinks[substr($phrase, 0, -strlen($match[0]))])) { $phrase = substr($phrase, 0, -strlen($match[0])); $newText .= amplifyTibetan($wgAddLinksCBELinks[$phrase]); $offset = array_pop($offsetArr) - strlen($match[0]); continue(2); } array_pop($phraseArr); $newoffset = array_pop($offsetArr); } $firstWord = substr($content, $offset, $newoffset-$offset); # if there's initial punctuation, remove it and start again if (preg_match("/^[\p{P}\p{S}]+/u", $firstWord, $match) && strlen($firstWord) > strlen($match[0])) { $punct = $match[0]; $punctlen = strlen($punct); $newText .= $punct; $offset += $punctlen; continue; } $newText .= amplifyTibetan($firstWord); $offset = $newoffset; continue; } $newText .= getRest($content, $offset); # check for infinite loop if ($loopOffset >= $offset) { echo "Something went wrong ... exiting. <br>"; return 1; } } $text = $newText; } ?>
- What problems are you seeing? ☠MarkAHershberger☢(talk)☣ 15:51, 23 August 2018 (UTC)
- It does not work at all. There is "Add links and save button" on edit page. And after you click that it should analyze the text and then there is files AddLinksCache1.bin and AddLinksCache2.bin where the words are. And it should link all the words in the text according to that. Like Buddha = [[Buddha]] or Buddha Shakyamuni = [[Buddha Shakyamuni]] etc. and there are thousands of words and phrases.
- But at the moment if you click nothing happens. I read with my own head and figured that it uses ArticleSave hook what is now in new mediawiki replaced with PageContentSave hook and this is probably causing troubles, but i dont know nothing about programming and i dont know how to fix it and maybe there is something else as well needed to be touched up.
- The extension is used in http://www.chinabuddhismencyclopedia.com/en/index.php/Chinese_Buddhist_Encyclopedia
- If you could help me with getting in working I can give you access to the mediawiki for testing if you need.
- But help in anycase would be much appreciated
- Thank you
- Benny 124.169.110.81 (talk) 01:52, 24 August 2018 (UTC)
- (Sorry for disappearing for a couple of days... work, you know?)
- Anyway, I looked at your site and I can probably help you out, but I will need an account. You can use contact me to send private info. ☠MarkAHershberger☢(talk)☣ 00:59, 26 August 2018 (UTC)
Old Theme Issues... Argh!
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.
We have an old (I mean OLD) theme being used and this code snippet is causing some serious issues since we upgraded to MediaWiki 1.30:
$this->outputPortlet( array(
'id' => 'p-footertools-all',
'content' => $pileOfTools['general'],
Basically anythiung to do with the outputPortlet function causes the following error:
MediaWiki internal error.
Original exception: [W37Z7K8l6@LeCKlDGiBvMgAAAAE] /wiki/index.php?title=User:Wiki_Sysop MWException from line 539 of /home/username/public_html/wiki/includes/Html.php: HTML attribute tooltip-params can not contain a list of values
Backtrace:
#0 /home/username/public_html/wiki/includes/Html.php(299): Html::expandAttributes(array)
#1 /home/username/public_html/wiki/includes/Html.php(210): Html::openElement(string, array)
#2 /home/username/public_html/wiki/skins/Leliry/LeliryTemplate.php(339): Html::rawElement(string, array, string)
#3 /home/username/public_html/wiki/includes/skins/BaseTemplate.php(499): LeliryTemplate->makeLink(string, array, array)
#4 /home/username/public_html/wiki/skins/Leliry/LeliryTemplate.php(276): BaseTemplate->makeListItem(string, array)
#5 /home/username/public_html/wiki/skins/Leliry/LeliryTemplate.php(213): LeliryTemplate->outputPortlet(array)
#6 /home/username/public_html/wiki/includes/skins/SkinTemplate.php(251): LeliryTemplate->execute()
#7 /home/username/public_html/wiki/includes/OutputPage.php(2442): SkinTemplate->outputPage()
#8 /home/username/public_html/wiki/includes/MediaWiki.php(858): OutputPage->output(boolean)
#9 /home/username/public_html/wiki/includes/MediaWiki.php(870): MediaWiki->{closure}()
#10 /home/username/public_html/wiki/includes/MediaWiki.php(523): MediaWiki->main()
#11 /home/username/public_html/wiki/index.php(43): MediaWiki->run()
#12 {main}
Exception caught inside exception handler: [W37Z7K8l6@LeCKlDGiBvMgAAAAE] /wiki/index.php?title=User:Wiki_Sysop MWException from line 539 of /home/username/public_html/wiki/includes/Html.php: HTML attribute tooltip-params can not contain a list of values
Backtrace:
#0 /home/username/public_html/wiki/includes/Html.php(299): Html::expandAttributes(array)
#1 /home/username/public_html/wiki/includes/Html.php(210): Html::openElement(string, array)
#2 /home/username/public_html/wiki/skins/Leliry/LeliryTemplate.php(339): Html::rawElement(string, array, string)
#3 /home/username/public_html/wiki/includes/skins/BaseTemplate.php(499): LeliryTemplate->makeLink(string, array, array)
#4 /home/username/public_html/wiki/skins/Leliry/LeliryTemplate.php(276): BaseTemplate->makeListItem(string, array)
#5 /home/username/public_html/wiki/skins/Leliry/LeliryTemplate.php(213): LeliryTemplate->outputPortlet(array)
#6 /home/username/public_html/wiki/includes/skins/SkinTemplate.php(251): LeliryTemplate->execute()
#7 /home/username/public_html/wiki/includes/OutputPage.php(2442): SkinTemplate->outputPage()
#8 /home/username/public_html/wiki/includes/exception/MWException.php(160): OutputPage->output()
#9 /home/username/public_html/wiki/includes/exception/MWException.php(201): MWException->reportHTML()
#10 /home/username/public_html/wiki/includes/exception/MWExceptionHandler.php(73): MWException->report()
#11 /home/username/public_html/wiki/includes/exception/MWExceptionHandler.php(130): MWExceptionHandler::report(MWException)
#12 /home/username/public_html/wiki/includes/MediaWiki.php(550): MWExceptionHandler::handleException(MWException)
#13 /home/username/public_html/wiki/index.php(43): MediaWiki->run()
#14 {main}
Any ideas on what to do? I've had a look at the outputPortlet function and it does work as this error only happens on certain pages... Pulling my hair out over here :)
Thanks! DigitalEdmonton (talk) 16:05, 23 August 2018 (UTC)
- It looks like you need to stop passing in an array and pass in a space-separated list of values. ☠MarkAHershberger☢(talk)☣ 16:27, 23 August 2018 (UTC)
- The contents of the
outputPortlet()function would help, too. ☠MarkAHershberger☢(talk)☣ 16:31, 23 August 2018 (UTC)
Using template to build a template
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.
So, for reasons, the wiki site I'm using does not have the css extension installed, so I can't just call {{#css:}} and call it a day. I've effectively reinvented the wheel, establishing all of my various css classes as parameters in a template, and then sending them ALL down the road to each child template that comes out of that template, etc.
This is a colossal pain in the ass, not to mention it uses up an obscene amount of space in the wikitext every time I need to pass it along. I'd like to be able to take the parameters I've established in the parent template, and just call them when needed by using another template, like {{Blah_CSS}} adding the following to the wikitext of the calling template:
|blah=color:#ffffff|blah2=color:#000000
So, in the parent wiki, I would type:
{{child{{Blah_CSS}}|whatever|yaddayadda|}}
and I would get:
{{child|blah=color:#ffffff|blah2=color:#000000|whatever|yaddayadda|}}
However, when I try and do this, the wiki just turns the entire wikitext code itself into printed text on the final page.
This is maddening. Can anyone please help me? Caerulian (talk) 16:23, 23 August 2018 (UTC)
- If you can modify MediaWiki:Common.css you can use the page selectors to add CSS. For example, we could add the following CSS here to make the background of Extension:CSS red:
- ☠MarkAHershberger☢(talk)☣ 16:44, 23 August 2018 (UTC)
.page-Extension_CSS { background: red; }
- I can't do that, as I am not a site admin. Caerulian (talk) 17:12, 23 August 2018 (UTC)
[SOLVED] Webpage is down and showing full text of localsettings.php
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 my mediawiki page is down and showing full text of localsettings.php :
http://utahofficeforvictimsofcrime.com/
I assume that it is because I put some text in the localsettings.php file that is incorrect, any suggestions please?
Thank you so much in advance! Moscowdreams (talk) 17:39, 23 August 2018 (UTC)
- And can you tell "which text" you added in file before this stopped working? Thanks! Kizule (talk) 17:44, 23 August 2018 (UTC)
- Too, LocalSettings.php must not to be publicly viewable. At http://utahofficeforvictimsofcrime.com/LocalSettings.php I opened file LocalSettings.php.
- Does first line start with ?php or <?php Kizule (talk) 17:54, 23 August 2018 (UTC)
- awe! that maybe the problem!
- I did that to temporarily shut down site because of spam bots. IT is back UP! Moscowdreams (talk) 18:04, 23 August 2018 (UTC)
Deleting Sess files from TMP?
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 inherited the hosting for a wiki a couple years ago, and we're slowly but surely running out of space. I'm just looking at the files here, and it seems that the TMP folder has wiki session data saved all the way back from 2016. Is it safe to delete these files, which seem to just be clogging up my wikipipes? I'll keep the ones from 3 months on, but is there any harm in deleting the old ones? Dorourkie (talk) 18:49, 23 August 2018 (UTC)
- Yes, you can probably set up a cron job to do that. ☠MarkAHershberger☢(talk)☣ 01:14, 26 August 2018 (UTC)
- Thanks, I appreciate it! Dorourkie (talk) 20:20, 29 August 2018 (UTC)
Unable to connect to remote Centos7 DB Server
The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
I currently have a MediaWiki installation that has both the website and MariaDB on the same VM. I would like to separate the two (wiki on one machine and the DB on the other). So far, I have been unable to connect to the database receiving "permission denied" error when attempting the mw-config script from the wiki server. Using the same credentials, I am able to connect to the DB server from the wiki server via the following script: mysql -h 192.168.2.161 -u root -p. The firewall is disabled on both machines and the relevant accounts appear to be created. Any idea what's going on here? Interestingly, if I change the $wgDBServer parameter in the localsettings.php file to the IP rather than the word localhost, I get the same error, which leads me believe it has something to do with the way I'm defining the credentials in the localsettings.php file. Any help would be appreciated. EntregaUser (talk) 18:54, 23 August 2018 (UTC)
- Run
setenforce 0in your shell. If the problem is solved, it is a config problem with SELinux. 星耀晨曦 (talk) 12:29, 24 August 2018 (UTC)
No longer know my password nor which email account I was using when I joined librarything
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.
Earlier this year, I had computer problems which ended up with my no longer remembering either my password and not having access to my original email via which I enrolled. (I'm not knowledgeable about this but it appears that the account doesn't exist anymore.)So that when I try to change my password, I'm instructed to provide my email, but I would need to have it sent to my current email provider. Is that doable?
Diane-bpcb or Diane Stephens sorry i'm not an expert at this technology 2604:2000:E942:2200:3116:842A:60D0:5E56 (talk) 21:33, 23 August 2018 (UTC)
- Feel free to contact "librarything" (whatever that is) if you have or had an account there and if you have an idea how you could prove to them that your old address is your old address. Malyacko (talk) 09:14, 24 August 2018 (UTC)
How can I remove the existing sysop and add myself and 2 others
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.
The person who ported our wiki from Wikispaces to MediaWiki is no longer with us and she is the only one with any privileges. I need to capture administrative privileges for myself and two other people. Is there a way to do this with completely reinstalling the wiki? We have MediaWiki version 1.30.1. The url is loopcntr.net/wiki.
Thanks,
Anna 2601:649:1:7988:DCB5:CAF4:7579:4FFB (talk) 22:55, 23 August 2018 (UTC)
- See Manual:Resetting passwords and Manual:CreateAndPromote.php Malyacko (talk) 09:11, 24 August 2018 (UTC)
Update 1.25 to 1.31
The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
I need to update my MW from 1.25 to the latest version because my hosting provider
is going to PHP7. I have no experience with this.
The update manuals I found are to comprehensive for a newby like myself.
Is there a simple step by step guide to update , i would appreciate some help
Thanks! Fredmrnoname (talk) 13:13, 24 August 2018 (UTC)
- Download MediaWiki tarball
- Extract to a new folder
- Copy the old LocalSettings.php to the new folder.
- Copy images/* and custom logo (if present) in old wiki to new folder.
- Download (must be match your MediaWiki version) and extract extensions and skins installed in the old wiki to the new folder.
- Run runJobs.php in the old wiki.
- (optional) Set $wgReadOnly in old wiki to make it readonly.
- Backup your database.
- Run update.php in the new wiki.
- Modify the web server configuration to route requests to the new wiki instead of the old wiki.
- This is a simple steps. 星耀晨曦 (talk) 14:42, 24 August 2018 (UTC)
- Thanks for your respond, it seems I dont have access to a command line on te host server.
- So, looks like this method is not working. Hope there are more ways to get this done? Fredmrnoname (talk) 13:34, 29 August 2018 (UTC)
- Download MediaWiki tarball
- Extract it on your local PC
- Upload the extracted contents to a new folder on the server.
- Copy the old LocalSettings.php to the new folder.
- Copy images/* and custom logo (if present) in old wiki to new folder.
- Download (must be match your MediaWiki version) and extract extensions and skins installed in the old wiki to the new folder.
- (optional) Set $wgReadOnly in old wiki to make it readonly.
- Backup your database.
- Run the web-updater by opening <your-wiki.com>/mw-config/ in your webbrowser.
- Modify the web server configuration to route requests to the new wiki instead of the old wiki. 2001:16B8:1098:3E00:8424:975:EAB8:1B4 (talk) 17:05, 29 August 2018 (UTC)
How can I change page title(h1) and h2's font?
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.
Which selector should I use to change them with CSS? PlavorSeol (talk) 14:59, 24 August 2018 (UTC)
- AhmadF.Cheema (talk) 16:14, 24 August 2018 (UTC)
#firstHeading{ font:bold 30px Georgia, serif; } .mw-body-content h2 { font:italic bold 12px/30px Georgia, serif; }
- How can I apply specific font to all headings (h1, h2, h3, ...)? PlavorSeol (talk) 05:37, 25 August 2018 (UTC)
- Use the selector:Note that the
.mw-body-content h2, .mw-body-content h3, .mw-body-content h4, .mw-body-content h5
h1in the title, comes under#firstHeading. AhmadF.Cheema (talk) 09:52, 25 August 2018 (UTC) - Does that means I need to specify all headings manually?
- Isn't there something like 'universal selector' or 'wildcard (*)' for them? PlavorSeol (talk) 10:14, 25 August 2018 (UTC)
- Really don't think a pure CSS wildcard solution can be used in this context.
- In any case, how many sub-headings do you expect there to be? The straightforward comma-separated selectors should be fine. AhmadF.Cheema (talk) 12:41, 25 August 2018 (UTC)
Share images across different languages sub-domains
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'm trying to upload the image once and share across language sub-domains i.e. zh.mywiki.com, mywiki.com, ko.mywiki.com, etc. I have tried for a long time but couldn't get the results using the tutorial on:
Manual:Wiki family#Use shared files
i.e.
$wgUseSharedUploads = true;
$wgSharedUploadPath = 'http://pool.yourwiki.org/images'; // i tried around using i.e. http://mywiki.com/w/images but couldn't work)
$wgSharedUploadDirectory = '/(LOCALPATH)/POOL-FOLDER/images/';
$wgHashedSharedUploadDirectory = true;
When I uploaded an image i.e. test.png to mywiki.com, i couldn't use [[file:test.png]] on zh.mywiki.com (and vice versa), only mywiki.com where i uploaded image the image file tag can be used. Hopefully someone can help me on this, thanks a lot.
FYI, the wiki family system i used is simply all sub-domains directory path pointing to the root of mywiki.com, and use the localsettings.php to detect server name and fetch corresponding databases. Ljianyih (talk) 18:20, 24 August 2018 (UTC)
- What is
$wgSharedUploadDirectoryset to? What is$wgUploadDirectoryset to? - Could you share the URL of your wikis so we can see it? ☠MarkAHershberger☢(talk)☣ 01:12, 26 August 2018 (UTC)
MediaWiki 1.31 internal error Required components You are missing a required extension to PHP Install fileinfo
The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
I'm sorry. I had this thing working on Cpanel for a year and it's bugged out on me. I've attempted to install this extension but nothing happens.
To install this extension move FileInfo dir to extensions dir. Add the following to LocalSettings.php:
require_once("$IP/extensions/FileInfo/FileInfo.php");
I don't know what to do. I've been tooling around for a few hours. The manual reads like gibberish to me and I feel I need a college remedial course to understand the first 10 pages.
I"ve seen this topic create before but I'm locked from commenting and I didn't see a solution. WTHAIA2 (talk) 02:01, 25 August 2018 (UTC)
- Do you mean to install the MediaWiki extension Extension:FileInfo or the PHP extension Fileinfo? AhmadF.Cheema (talk) 04:33, 25 August 2018 (UTC)
- MW 1.31 needs a new require -- PHP Fileinfo extension. 星耀晨曦 (talk) 07:35, 25 August 2018 (UTC)
- I walked away, thought about it, and figured out it wasn't the media wiki code but my hosting site. Thanks for the help. I now have to fix everything I broke trying to fix it now that I fixed the first problem. WTHAIA2 (talk) 07:39, 25 August 2018 (UTC)
Internal Error at Login after Upgrade to 1.31
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.
Upon clicking Login, users get:
Internal error
[W4AoLRXvoNRYsMs7@OA1sQAAAAs] 2018-08-24 15:45:49: Fatal exception of type "Error"
https://www.dropbox.com/s/x4t7otobmb0lgey/Screenshot%202018-08-25%2009.23.49.png?dl=0
I was signed in as admin already and was able to edit fine, but when I logged out and click Login, the above error happens. I recently upgraded to 1.31 from 1.23 and also upgraded the server PHP to 7.1. What can I do to troubleshoot the issue above?
Here is a copy of the the LocalSettings.php here:
Any suggestions are appreciated. Thanks! 2405:9800:BA12:15D5:AC58:D7EC:9E6:534 (talk) 02:29, 25 August 2018 (UTC)
- Set the following in your LocalSettings.php file to get more detailed error information.See Manual:How to debug. AhmadF.Cheema (talk) 04:28, 25 August 2018 (UTC)
$wgShowExceptionDetails = true; $wgDevelopmentWarnings = true; error_reporting( -1 ); ini_set( 'display_errors', 1); error_reporting(E_ALL);
- Problem solved, was an issue with the ConfirmEdit plugin. Commented it out and the problem solved.
- However, a new issue is happening now. I'm trying to setup this extension, among others:
- https://www.mediawiki.org/wiki/Extension:Nuke
- On line 257 of LocalSettings.php, I added wfLoadExtension( 'Nuke' ); at the end on line 257, but then I get this error on the wiki:
- www.domain.com is currently unable to handle this request.
- When I comment out 257, the wiki works again. Why is this issue happening and how can I fix it to get this and other extensions working?
- Thanks 2405:9800:BA12:15D5:FDB6:4005:73D4:CC80 (talk) 02:28, 26 August 2018 (UTC)
- Are the Extension:Nuke files present in your Wiki's
extensionsdirectory? - Have you added the above mentioned code lines for debugging in your LocalSettings.php file? AhmadF.Cheema (talk) 08:17, 26 August 2018 (UTC)
Remove user groups defined by extensions
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.
How can I remove user groups from Special:ListGroupRights which defined by some extensions?
I already add this to LocalSettings.php but doesn't work:
//bureaucrat unset($wgGroupPermissions["bureaucrat"]); unset($wgRevokePermissions["bureaucrat"]); unset($wgAddGroups["bureaucrat"]); unset($wgRemoveGroups["bureaucrat"]); unset($wgGroupsAddToSelf["bureaucrat"]); unset($wgGroupsRemoveFromSelf["bureaucrat"]); //sysop unset($wgGroupPermissions["sysop"]); unset($wgRevokePermissions["sysop"]); unset($wgAddGroups["sysop"]); unset($wgRemoveGroups["sysop"]); unset($wgGroupsAddToSelf["sysop"]); unset($wgGroupsRemoveFromSelf["sysop"]);PlavorSeol (talk) 04:52, 25 August 2018 (UTC)
- Try using
$wgExtensionFunctions[] = function() { unset( $wgGroupPermissions['<right>'] ); }
- 星耀晨曦 (talk) 07:33, 25 August 2018 (UTC)
- Following PHP error occured after adding that:
Parse error: syntax error, unexpected end of file in C:\NGINX\html\plavorexitbeta\LocalSettings.php on line 432PlavorSeol (talk) 08:01, 25 August 2018 (UTC)- My fault.
- 星耀晨曦 (talk) 08:06, 25 August 2018 (UTC)
$wgExtensionFunctions[] = function() { unset( $wgGroupPermissions['<right>'] ); }; - But why 'Administrators (sysop)' and 'Bureaucrats (bureaucrat)' groups are remaining in Special:ListGroupRights, even I added following:
- PlavorSeol (talk) 08:12, 25 August 2018 (UTC)
$wgExtensionFunctions[]=function() {unset($wgGroupPermissions["sysop"]); unset($wgGroupPermissions["bureaucrat"]); }; - "sysop" and "bureaucrat" user group is build-in. No defined by extension. 星耀晨曦 (talk) 08:20, 25 August 2018 (UTC)
- I already removed MediaWiki core default permissions of 'sysop' and 'bureaucrat' groups by adding
$wgGroupPermissions=array();, but permissions added by extensions (e.g. nuke, abusefilter-modify, skipcaptcha, etc.) still remains. Because of that, Special:ListGroupRights still shows those groups even I don't want to use them. PlavorSeol (talk) 06:06, 26 August 2018 (UTC) - Also 'checkuser' group is not removable, although it's not defined by MediaWiki core but CheckUser extension. PlavorSeol (talk) 06:09, 26 August 2018 (UTC)
- For my test, I also can't remove the group defined by an extension :) I see
Notice: Undefined variable: wgGroupPermissions in LocalSettings.php. 星耀晨曦 (talk) 14:49, 27 August 2018 (UTC) - I know what happened. Please use:
- 星耀晨曦 (talk) 15:10, 27 August 2018 (UTC)
$wgExtensionFunctions[] = function() use ( &$wgGroupPermissions ) { unset( $wgGroupPermissions['<right>'] ); }; - It worked very well. Thanks! PlavorSeol (talk) 11:25, 1 September 2018 (UTC)
"Add pages from category" in Special:Export broken
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 guys,
I'm not sure if this is the right place to ask:
The selection of wiki categories in https://en.wikipedia.org/wiki/Special:Export seems to be working incorrectly.
On entering a category in the "Add pages from category" field, only numbers are listed in the field below, and not the pages that are listed in this category.
For example, entering "19th-century_American_politicians" leads to several thousand values of "0" and "14"
Up until a few weeks ago, this feature worked normally.
Thanks in advance for any help! Rj14gu (talk) 15:50, 25 August 2018 (UTC)
- That is a recent bug. ☠MarkAHershberger☢(talk)☣ 01:04, 26 August 2018 (UTC)
"BadMethodCallException"
The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
I installed MediaWiki on the computer and when I go to authenticate it shows me that gave internal error showing the following message above, how do I resolve this?
This is the message [6d544a73f3b5822a538fcc3b] 2018-08-26 00:18:19: Fatal exception of type "BadMethodCallException " 1219nv (talk) 00:23, 26 August 2018 (UTC)
- How did you install? What version did you use? Have you installed any extensions? ☠MarkAHershberger☢(talk)☣ 01:01, 26 August 2018 (UTC)
- MW 1.31.0 on LAMP OpenSuSE Tumbleweed, just the extensions that come in the package. 1219nv (talk) 01:57, 26 August 2018 (UTC)
- See Manual:How to debug. You'll need to provide a stack trace of the exception Ciencia Al Poder (talk) 15:00, 26 August 2018 (UTC)
Admin account not created during new install - Username or password not found
The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
I've tried a few times now, but the Admin account doesn't get added during a fresh install. Version 1.31
If I install as an open site, I can complete the install, register users and they can log in with no issues. I can even create a user account with the same name i chose for Admin.
When I list users Special:ListUsers , no admin accounts are shown.
If I install as a private wiki site, I have no way to access the site since the Admin name and password entered during setup, never get added to the user list.
Using IIS on Win 10 and MySQL.
Anyone seen this issue before?
Thanks in advance. 2601:245:4480:5652:C038:7687:7FC9:31D3 (talk) 05:23, 26 August 2018 (UTC)
- Is the public wiki the same OS (Win 10) and webserver (IIS)? It sounds like neither install is actually creating the administrative user.
- I haven't seen this before, but I think a bug should be filed if you can reproduce this behavior consistently. ☠MarkAHershberger☢(talk)☣ 14:33, 27 August 2018 (UTC)
Thumbnail failed on mail
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.
Start request GET /thumb.php?f=Axel_Kruse.jpg&width=800
[FileOperation] FileBackendStore::getFileStat: File mwstore://local-backend/local-thumb/2/29/Axel_Kruse.jpg/800px-Axel_Kruse.jpg does not exist.
File::transform: Doing stat for mwstore://local-backend/local-thumb/2/29/Axel_Kruse.jpg/800px-Axel_Kruse.jpg
TransformationalImageHandler::doTransform: creating 800x445 thumbnail at /var/www/mediawiki-1.31.0/images/temp/transform_f55310a6f47b.jpg using scaler im
[thumbnail] Thumbnail failed on mail: could not get local copy of "Axel_Kruse.jpg"
[thumb] Fehler beim Erstellen des Vorschaubildes: Datei fehlt
What does Thumbnail failed on mail mean? 2003:C3:FF14:8A02:FCFF:9B6A:7D66:CB6A (talk) 12:51, 26 August 2018 (UTC)
sprintf( 'Thumbnail failed on %s: could not get local copy of "%s"', wfHostname(), $image->getName() ) );
- "mail" is your hostname. Ciencia Al Poder (talk) 14:59, 26 August 2018 (UTC)
- I thought understanding what that error means, would help me understand the problem. It didnt. But thanks anyway.
- Since it looks like a path problem I went thorugh all Path-Variables (Manual:LocalSettings.php) and set them as mentioned. Now Thumbnails are working again.
- Thanks for pointing me to the right direction (osi layer 8).
- Especially since you helped me like 2 weeks ago with img-srcset problem. Thank you @Ciencia Al Poder , Thank you very much. 2003:C3:FF14:8A02:2012:FEA1:C1DF:E881 (talk) 15:36, 26 August 2018 (UTC)
You are missing a required extension to PHP that MediaWiki requires to run.
The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
I get the following error message:
You are missing a required extension to PHP that MediaWiki requires to run. Please install:
mbstring (more information)
fileinfo (more information)s
Both extensions are enabled in my php ini, the extension directory is correct and the dll's are there.
Any sugestions? FriFraCologne (talk) 21:29, 26 August 2018 (UTC)
- Which PHP version? Which MediaWiki version? Malyacko (talk) 07:45, 27 August 2018 (UTC)
- Maybe you need to restart apache/IIS after enabling them in php.ini Ciencia Al Poder (talk) 09:30, 27 August 2018 (UTC)
- Did this ever get resolved? I just kicked up a new MW 1.32 server running PHP 7.3.1 ... I've tested PHP and Apache to make sure they are configured to run tests ... the MW Index.PHP runs and I get the same two extensions listed above as required. In my php.ini file I have the following two lines ...
- extension=php_fileinfo.dll
- extension=php_mbstring.dll
- and I have checked the variable for the 'ext' folder where the DLLs are located.
- I've setup two othe WIKI servers using MW but these two extensions weren't required then but they are now.
- Any suggestions? Kellyincuse (talk) 21:56, 24 January 2019 (UTC)
- Create a php file with a phpinfo call to see what extensions are really enabled, as explained in Manual:Php.ini Ciencia Al Poder (talk) 10:44, 25 January 2019 (UTC)
- I've had the same issue since upgrading to 1.32. (running php 7.3.2-1). When I run the update.php script i get the following:
- Error: Missing one or more required components of PHP.
- You are missing a required extension to PHP that MediaWiki needs.
- Please install:
- * mbstring <https://secure.php.net/mbstring>
- I have mbstring installed and enabled in php.ini. Any suggestions?
71.92.71.34 (talk) 02:34, 6 February 2019 (UTC)- Hi,
- I had the similar issue (requires extention --> mbstring) when running on EC2 - AMI Linux..
- Running this resolved my error:
sudo yum install php70-mbstring.x86_64 php70-zip.x86_64 -y- Remember to restart your apache after that Manishkaujalgi (talk) 23:29, 15 September 2019 (UTC)
- Are you sure the phpinfo php script displays mbstring as being enabled? Ciencia Al Poder (talk) 10:13, 6 February 2019 (UTC)
- I have the same message. mbstring is definitely enabled in php.ini but it's not showing up in the phpinfo.php. I have restarted all already several times. I have installed
- - Apache 2.4.39 (win64 VS16)
- - PHP 7.3.8
- - MySQL Server 8.0.17
- Pyton 3.7.4
- - MediaWiki 1.27
- Any idea what I am doing wrong?
- Thank you
31.53.123.107 (talk) 13:22, 7 August 2019 (UTC)- The php.ini you're editing is not the php.ini being used by the server
- The ouptupt of phpinfo tells you what php.ini files are being loaded. Ciencia Al Poder (talk) 09:20, 8 August 2019 (UTC)
- I get the same problem, only with iconv rather than mbstring. When I navigate to /localhost/mediawiki/index.php, I see the following:
- You are missing a required extension to PHP that MediaWiki requires to run. Please install: iconv
- I uncommented the iconv module in /usr/share/php/modules and it still says it's not installed.
- Here's my setup:
- PHP 7.3.8
- Apache2 2.4.39
- Linux 4.19.66 (Manjaro; problem also on Arch Linux)
- MariaDB 10.4.7
- Mediawiki any version > 1.31.1
- (i.e., 1.31.1 was the last time it worked; i've been downgrading to it for the last few months to keep it running)
- Any suggestions ? 173.197.77.91 (talk) 01:17, 21 August 2019 (UTC)
- Did you restart apache after enabling the module? 121.219.241.130 (talk) 03:58, 21 August 2019 (UTC)
- Yes. And to clarify the above: i uncommented iconv and mbstring in the main php config file, /etc/php/php.ini. Then I checked /usr/share/php/modules and found that iconv is there, with the correct permissions. No idea why wiki can't find it. 108.185.208.51 (talk) 05:41, 21 August 2019 (UTC)
- Please check the output of phpinfo (information in Manual:php.ini) to see if PHP knows about that php extension installed. This is not MediaWiki not knowing about the extension, but php Ciencia Al Poder (talk) 09:07, 21 August 2019 (UTC)
Your IP address is in a range which has been blocked on all wikis.
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.
When i try to access the support desk from a machine located in the HostEurope network, i get the following error message:
Your IP address is in a range which has been blocked on all wikis. The block was made by Vituzzu (meta.wikimedia.org). The reason given is leaky colo + open proxy at 2A01:488:42:1000:50ED:8413:0:0/64. * Start of block: 16:00, 31 October 2015 * Expiration of block: 16:00, 31 October 2020 You can contact Vituzzu to discuss the block. You cannot use the "Email this user" feature unless a valid email address is specified in your account preferences and you have not been blocked from using it. Your current IP address is 2a01:488:66:1000:b24d:45a0:0:1, and the blocked range is 2A01:488:0:0:0:0:0:0/32. Please include all above details in any queries you make.
This is ridicoulous, because you lockout a very large number of people because of one incident 3 years ago! FriFraCologne (talk) 21:32, 26 August 2018 (UTC)
- Have you contacted Vituzzu, as recommended in your quoted text? Malyacko (talk) 07:44, 27 August 2018 (UTC)
- HostEurope network is a known source of spam, and is still ongoing. Do not use HostEurope proxies to edit WMF sites. Period. Ciencia Al Poder (talk) 09:32, 27 August 2018 (UTC)
A lot of source website about "Miss Grand International" but can't create in wikipedia page
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.
A lot of source website about "Miss Grand International" but can't create in wikipedia page (always was report by filipino)
I can guarantee you that MissGrandInternational is its recognition of actual and legal beauty pageant system runs by the organization of MissGrandInternational based in Thailand and broadcast on CH7HD.
- https://www.globalbeauties.com/news/2018/5/24/miss-grand-international-official-press-conference-to-take-place-this-friday-in-myanmar
- http://news.abs-cbn.com/list/tag/miss-grand-international
- https://thegreatpageantcommunity.com/2018/07/21/miss-grand-international-2018-contestants/
- https://www.thairath.co.th/tags/miss%20grand%20international
- http://www.thejakartapost.com/life/2018/01/30/indonesia-to-hold-first-miss-grand-indonesia-pageant.html
- https://www.rappler.com/life-and-style/specials/185963-miss-grand-international-primer-2017-elizabeth-clenci-stop-the-war-advocacy
- https://cmmb.org/a-surprise-visit-from-miss-grand-international-2017/
- https://www.icenews.is/2016/10/26/miss-grand-international-pageant-owner-responds-to-beauty-leaving-the-pageant/
- https://www.philstar.com/entertainment/2017/10/26/1752679/filipina-2nd-runner-miss-grand-international-2017
- https://www.pep.ph/news/68593/peru-crowned-miss-grand-international-2017-ph-bet-elizabeth-clenci-is-2nd-runner-up
- https://indianexpress.com/article/lifestyle/fashion/miss-grand-international-indias-pankhuri-gidwanis-national-costume-will-leave-you-spellbound-3091496/
- https://www.cnnindonesia.com/gaya-hidup/20171026152354-277-251313/mengenal-maria-jose-lora-miss-grand-international-2017 Amazingth (talk) 05:00, 27 August 2018 (UTC)
- Welcome to mediawiki.org. mediawiki.org is not wikipedia.org. Feel free to discuss Wikipedia issues on Wikipedia. Thanks! Malyacko (talk) 07:40, 27 August 2018 (UTC)
MonoBook mobile as in the official demo
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.
First of all I want to thank you for the creation of this software and to keep perhaps the most important project of the whole internet network, Wikipedia. You are extraordinary people.
I'm creating a new Wiki for now offline and I chose the Monobook skin (I'm very found to this skin). In the official demo I noticed that there is a mobile version that hides the sidebar (by tightening the desktop browser or viewing from the smartphone) but I did not find the skin in the MobileFrontend extension. How do I get this function for my wiki? Gfrancescoa (talk) 07:33, 27 August 2018 (UTC)
- I guess it has nothing to do with Mobile FrontEnd at all, so you should try to open the "desktop version" of your wiki (by clicking on the link to switch to desktop skin in the footer), and using Monobook as your personal/default skin. Ciencia Al Poder (talk) 09:34, 27 August 2018 (UTC)
- The default version of MonoBook (MediaWiki 1.31.0) does not remove the sidebar. It is the first time that I see this mobile version of MonoBook as it is shown in the demo. Gfrancescoa (talk) 10:05, 27 August 2018 (UTC)
- Just checked. The sidebar removal for narrow screens (and other enhancements), is available in the master branch of the Monobook skin. AhmadF.Cheema (talk) 14:40, 27 August 2018 (UTC)
- Yes, it works. Thank you both for the help! Gfrancescoa (talk) 19:24, 27 August 2018 (UTC)
help for 'slot' translation
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.
please see https://www.mediawiki.org/wiki/Manual%20talk%3ASlots%20table#h-help_to_translate_%27slot%27_for_translators-2018-08-27T07%3A44%3A00.000Z Christian 🇫🇷 FR 🚨 (talk) 11:48, 27 August 2018 (UTC)
- Why my request has been hidden please ? Christian 🇫🇷 FR 🚨 (talk) 17:02, 27 August 2018 (UTC)
- Sorry, my browser only displayed a useless comment by another user which I hid. No idea why your original comment got also hidden. Malyacko (talk) 07:35, 28 August 2018 (UTC)
- The original comment was hidden by anonymous user 2A03:2880:2131:8FC6:FACE:B00C:0:8000. AhmadF.Cheema (talk) 07:47, 28 August 2018 (UTC)
- Unhidden now. Was probably hid by a vandal. AhmadF.Cheema (talk) 17:20, 27 August 2018 (UTC)
How to uninstall BlueSpice and keep the content ?
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 1.23 / BlueSpice 2.23.2 / PHP 5.4.45 / MySQL 5.5.48
Hi everybody
I am trying to remove the BlueSpice extension. Once I remove the BS lines in w/LocalSettings, and run maintenance/update.php, a large part of the content has become unavailable. The content was inside namespaces.
How to remove BS and keep this kind of content please ?
Thx:) Panade 2018 (talk) 08:16, 28 August 2018 (UTC)
- You can copy the contents from
extensions/BlueSpiceFoundation/config/nm-settings.phpto yourLocalSettings.phpfile. Osnard (talk) 12:50, 28 August 2018 (UTC) - Thx Osnard:)
- I got the content back, but without the images. How to restore the images after removing BS ? Panade 2018 (talk) 14:23, 28 August 2018 (UTC)
- The images should all be in your images directory, I believe. (Of course, @Osnard may correct me.) ☠MarkAHershberger☢(talk)☣ 18:44, 28 August 2018 (UTC)
- Thx. Since the BS remove, the wiki contains pages with broken links files (image files). Do you know a method to restore those links ? Panade 2018 (talk) 08:13, 29 August 2018 (UTC)
- These are images you uploaded to the wiki, right? Did you check in your old installation under the images directory under your wiki? There should be several layers of directories there containing the images you uploaded. You can copy them over and the import them using importImages.php ☠MarkAHershberger☢(talk)☣ 21:11, 30 August 2018 (UTC)
- Thx. These are images in the wiki. There is no old wiki, it is just a BS remove. After the remove, it appears some images are unavailable. 84.14.195.138 (talk) 07:46, 31 August 2018 (UTC)
- If the images are still on disk then try
php maintenance/importImages.php --search-recursively images. - Remember to back up your DB first in case there are problems. ☠MarkAHershberger☢(talk)☣ 15:32, 31 August 2018 (UTC)
- This is probably due to a default configuration of BlueSpice. It sets $wgCapitalLinkOverrides:
$wgCapitalLinkOverrides[ NS_FILE ] = false;- When you disable BlueSpice Wikitext links like [[File:myimage.png]] won't work anymore as MediaWiki will look for "Myimage.png" instead. Yust add the line from above to your
LocalSettings.phpOsnard (talk) 06:05, 3 September 2018 (UTC) - Thanks a lot :-) it works 84.14.195.138 (talk) 09:13, 3 September 2018 (UTC)
Image annotation
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.
What are my options if I want to add image annotation to my Wikimedia website?
I tried Semantic Image Annotator however, it requires the user to click on the "Annotate Image" tab before the annotations are displayed.
Thanks Amirfaour (talk) 12:04, 28 August 2018 (UTC)
- You could file a request against Semantic Image Annotator so that the developer provides an option to display the annotations without clicking.
- If SIA otherwise suites your purposes, that seems like the way to go. ☠MarkAHershberger☢(talk)☣ 18:49, 28 August 2018 (UTC)
- I managed to fork Semantic Image Annotator and modify modules/ex.annotator.js. [1]
- It now always shows annotations, for those interested. Amirfaour (talk) 12:49, 29 August 2018 (UTC)
Thanks extension doesn't work!
The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
I installed Thanks and Echo and ran the DB update, but when I try to thank someone I get the error:
Thank action failed (error code: http). Please try again.I wasn't able to find anything online on this error, /var/log/httpd/error_log doesn't have anything relevant, anyone know how I might be able to troubleshoot? My site is using SSL with Let's Encrypt.
Thanks! Djkcel (talk) 13:31, 28 August 2018 (UTC)
- It sounds like this may be a configuration problem. To diagnose, see what web requests are being sent on the web console of your browser. ☠MarkAHershberger☢(talk)☣ 18:43, 28 August 2018 (UTC)
- Thanks for the suggestion. It says
- load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=1u4i3l2:131 POST mywiki.com/wiki/api.php 500 (Internal Server Error)
- I will see if there is maybe more info in a different log. Djkcel (talk) 19:01, 28 August 2018 (UTC)
Tabs in HTMLForm
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.
We have an extension, that has a special page that uses HTMLForm. Because we have so many different things on that page, we would like to put things in tabbed sections. We are wondering how we can accomplish this with HTMLForm. Perhaps something similar to Special:Preferences? MacFan4000 (talk) 15:23, 28 August 2018 (UTC)
- Yes.
- Special preferences loads javascript (
$out->addModules( 'mediawiki.special.preferences' );) and CSS ($out->addModuleStyles( 'mediawiki.special.preferences.styles' );) to handle this. - It also sets up the tabs to work with the provided CSS/JS.
- Good luck! ☠MarkAHershberger☢(talk)☣ 18:37, 28 August 2018 (UTC)
New Page
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.
On esportspedia.com it brings you to MediaWiki pages for different game titles.
I would like to create a new page called Community that I can add to navbar of each esportspedia game title MediaWiki page.
In order to create a new one I have to go to one of our MediaWiki game title pages and create it there, however, when I create it in one of the game title pages it shows up as part of the game title page for example:
Esportspedia > LoL (click blue 'L' icon) > Community (search in search bar) > Create Page.
The outcome of this is "https://lol.esportspedia.com/index.php?title=Community&action=edit&redlink=1" but I don't want the 'lol' at the front of the URL.
I want this: "https://esportspedia.com/Community" or https://community.esportspedia.com"
Can someone please help me with this?
Thank you!!!! 65.200.54.234 (talk) 18:21, 28 August 2018 (UTC)
- You will have to talk to someone at eSportspedia and ask them to set up a wiki at the top-level if that is what you want to do. Each of the game titles (LoL, Smite, etc) is a different wiki.
- But this is not a question that we can answer. ☠MarkAHershberger☢(talk)☣ 18:40, 28 August 2018 (UTC)
how do i change my user name?
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.
how do i change my user name 63.117.211.42 (talk) 18:57, 28 August 2018 (UTC)
- Project:Support desk/Flow/2012/12#h-change_a_user's_username-2012-12-24T23:33:00.000Z , Project:Support desk/Flow/2018/01#h-How_do_you_change_your_username_on_Wikipedia?-2018-01-04T02:06:00.000Z Malyacko (talk) 20:45, 28 August 2018 (UTC)
How Localsettings.php loaded?
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 guys,
I am trying to upgrade my wiki farm from MW 1.30 to 1.31.
However, after upgrade, all the sub wiki created by symbolic link can't find Localsettings.php in their own folder. It seems that since 1.31 Localsettings.php is loaded only relevant to the absolute path.
My I know how Mediawiki load Localsettings.php? so I can solve this bug.
Thank you Deletedaccount4567435 (talk) 00:14, 29 August 2018 (UTC)
- LocalSettings.php loaded by there lines in Setup.php in MW 1.31. In 1.30, the file loaded by WebStart.php. 星耀晨曦 (talk) 07:02, 29 August 2018 (UTC)
I need to remove "Forgot your password?" link within mediawiki 1.27
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.
Please help to remove "Forgot your password?" link from Special:UserLogin page and disable access to page Special:PasswordReset. I looked online and on the media wiki forum but couldn't find the right answer.
Thanks, Masabaghce (talk) 13:31, 29 August 2018 (UTC)
- See Manual:$wgPasswordResetRoutes. Setting all to false disables password reset. Ciencia Al Poder (talk) 08:58, 30 August 2018 (UTC)
- Thanks you, I have tried that and it worked but we like to hide the "forgot my password?" link completely from the sign in page "Special:UserLogin".
- Please advise if you have any suggestion that could help. Masabaghce (talk) 21:26, 31 August 2018 (UTC)
- Probably by turning on $wgAllowSiteCSSOnRestrictedPages and applying
{ display: none }to the link. For example,#userloginForm > form > div > div:nth-child(6) > div { display: none }might work. AhmadF.Cheema (talk) 07:13, 1 September 2018 (UTC)
Multilanguage
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.
We have a multilanguage website, but Link library does not seem to be compatible with any multilanguage plugin. We use Polylang. 72.50.101.73 (talk) 13:56, 29 August 2018 (UTC)
- What is "Link library"? Which multilanguage plugins did you try (links please)? What is "Polylang"? Which MediaWiki version are you running? Malyacko (talk) 14:07, 29 August 2018 (UTC)
- I apologize. This is the wrong place to ask that question. 72.50.101.73 (talk) 14:13, 29 August 2018 (UTC)
Class 'XMPReader' not found
The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
I was testing MediaWiki's file upload on my site and i got this error 105.154.235.184 (talk) 16:52, 29 August 2018 (UTC)
- You could provide steps to reproduce and exact MediaWiki version information. Malyacko (talk) 08:42, 30 August 2018 (UTC)
- There's no steps to reproduce, I installed MediaWiki 1.31.0 and this happended 41.251.100.40 (talk) 14:33, 30 August 2018 (UTC)
- Which PHP version is this about? Which environment?
- (You have not explained where you see this at which step after which actions.) Malyacko (talk) 15:22, 30 August 2018 (UTC)
- PHP 7.1 41.251.100.40 (talk) 15:45, 30 August 2018 (UTC)
- Do you see this error when you visit any page on your site now? ☠MarkAHershberger☢(talk)☣ 21:26, 30 August 2018 (UTC)
- Class 'XMPReader' in includes/compat/XMPReader.php, does this file exist? 星耀晨曦 (talk) 23:46, 30 August 2018 (UTC)
- No 41.141.175.133 (talk) 14:12, 31 August 2018 (UTC)
- Please make sure your MW tarball is downloaded from this site. 星耀晨曦 (talk) 14:53, 31 August 2018 (UTC)
- It was downloaded from this site, Should i reinstall MW 105.154.81.185 (talk) 22:43, 31 August 2018 (UTC)
- yes, reinstall and make sure that file is in place. If it isn't in place after you extract the downloaded file again, make sure it is in the downloaded zipfile or tarball itself. ☠MarkAHershberger☢(talk)☣ 16:23, 1 September 2018 (UTC)
- I think the tarball download link is missing the file, I tried redownloading and the file still does not exist in the archive even the last snapshot 41.141.13.51 (talk) 19:35, 1 September 2018 (UTC)
- So, the path is different in 1.31.0 than the one that @星耀晨曦 gave above.
- In 1.31.0:
$ git grep XMPReader autoload.php autoload.php: 'XMPReader' => __DIR__ . '/includes/libs/xmp/XMP.php', $ git grep XMPReader includes/libs/xmp/XMP.php includes/libs/xmp/XMP.php:class XMPReader implements LoggerAwareInterface { - I found similar matches in the tarball I downloaded. I think you probably have the same. ☠MarkAHershberger☢(talk)☣ 22:05, 1 September 2018 (UTC)
- But it still does not work 41.141.13.51 (talk) 22:49, 1 September 2018 (UTC)
ive been blocked but i never had an account before? Graham87 WTH?
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.
im a student and i m taking an online writing class never an account. and suddenly I'm blocked, I've seen your reasons for blocking, and there flimsy , since my IP adress has only ever been use to read wikipedia never edit or create. will you please unblock my IP adress, i have tried some work arounds that i 've seen you give others but eventually I keep getting to you've been blocked for abuse by this user. just undo it. 204.154.87.209 (talk) 18:39, 29 August 2018 (UTC)
- You need to provide references and links for statements and we don't know which IP address you refer to as you can obviously write here and are not blocked. Also note that this is mediawiki.org, not some other website with other rules. Malyacko (talk) 08:50, 30 August 2018 (UTC)
Timeless Skin adjustments
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.
The Timeless theme is great. However, on mobile, Google Mobile check is giving issues. On mobile some of the pages look like:
https://www.dropbox.com/s/v9t6ye9gz875rxz/Screenshot_20180829-224737.png?dl=0
How can I have that box shrink so the left text isn't super crunched?
Also, on some pages, such at this page:
https://www.speedsolving.com/wiki/index.php/OLL
It looks excellent on desktop, but on mobile the images, such as here:
https://www.speedsolving.com/wiki/index.php/OLL#All_edges_flipped_correctly
The images get super tiny so it's hard to see. What's the best way to make those images bigger on mobile but keep desktop the same?
Thanks. 209.160.119.181 (talk) 07:18, 30 August 2018 (UTC)
- Ping @Isarra since she may be able to help. ☠MarkAHershberger☢(talk)☣ 21:21, 30 August 2018 (UTC)
- Thanks. What's the best way to ping her? 209.160.115.88 (talk) 03:52, 31 August 2018 (UTC)
- What I did should have messaged her, but she may not have her notifications turned on. You could try sending her an email. ☠MarkAHershberger☢(talk)☣ 15:29, 31 August 2018 (UTC)
- Thanks, will do. 2405:9800:BA12:15D5:62:6921:6F59:AB01 (talk) 01:41, 1 September 2018 (UTC)
- She replied and said:
- "For the infoxboxes (to avoid squished text around then), you'll probably
- want to use an extension such as TemplateStyles or CSS, or just put some
- rules in the wiki common.css or timeless.css in order to set the styles
- for the template itself, probably width: 100% when the screen is under a
- certain size. Just pushes all the text below it at that point. (This is
- what thumbnail images also do in the skin.)"
- - My CSS knowledge is quite limited. Can anyone here let me know exactly what to put there to resolve this?
- Thanks.
- Pjkcar (talk) 04:50, 6 September 2018 (UTC)
- I don't know much of anything about CSS media queries, but I was able to get it to work on screens less than 10000 pixels wide using the following:
/* On screens that are 10000px or less, make infoboxess full-width */ @media screen and (max-width: 10000px) { .infobox { width:100% !important; } }
- You'll probably want something less than 10000px. ☠MarkAHershberger☢(talk)☣ 17:29, 8 September 2018 (UTC)
LocalSettings.php call extension in 1.31?
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,
In MW 1.23: one of our custom extensions used this in Localsettings.php:
if(!$wgCommandLineMode){ require_once "$IP/extensions/algdb/MediawikiAlgDB.php";}
But now when I go to that extension after upgrading to 1.31, I get:
[W4eZ9oeVI1mZvrqLDFP9CAAAACM] 2018-08-30 07:17:10: Fatal exception of type "Error"
What's the best way to solve this? Do I need to call it differently in LocalSettings.php or make other changes?
Thanks. 209.160.119.181 (talk) 07:23, 30 August 2018 (UTC)
- What is the stacktrace of that exception? See Manual:How to debug Malyacko (talk) 08:39, 30 August 2018 (UTC)
- It shows:
- [W4iyGhIiQJFrl62xBgeyUAAAACE] /wiki/index.php/Special:MediawikiAlgDB Error from line 92 of /home/patjk/public_html/test/wiki/extensions/algdb/algdb.php: Call to undefined function mysql_connect()
- Backtrace:
- #0 /home/patjk/public_html/test/wiki/extensions/algdb/SpecialMediawikiAlgDB.php(18): require()
- #1 /home/patjk/public_html/test/wiki/includes/specialpage/SpecialPage.php(522): SpecialMediawikiAlgDB->execute(NULL)
- #2 /home/patjk/public_html/test/wiki/includes/specialpage/SpecialPageFactory.php(568): SpecialPage->run(NULL)
- #3 /home/patjk/public_html/test/wiki/includes/MediaWiki.php(288): SpecialPageFactory::executePath(Title, RequestContext)
- #4 /home/patjk/public_html/test/wiki/includes/MediaWiki.php(861): MediaWiki->performRequest()
- #5 /home/patjk/public_html/test/wiki/includes/MediaWiki.php(524): MediaWiki->main()
- #6 /home/patjk/public_html/test/wiki/index.php(42): MediaWiki->run()
- #7 {main}
- ----It says on line 92 of algdb.php:
- // Connect to db
- mysql_connect("localhost", $DB_USERNAME, $DB_PASSWORD) or die("Unable to connect to database. USER:$DB_USERNAME");
- @mysql_select_db($DB_NAME) or die("Unable to select database");
- ----Not sure why this would be throwing issues as the db info has not changed, and I've verified the db info in the config file. Could it be how it is being called in LocalSettings.php? I noticed other extensions are called like:
- wfLoadExtension( 'Nuke' );
- If that could be the case, how do I call this with the new notation?
- if(!$wgCommandLineMode){ require_once "$IP/extensions/algdb/MediawikiAlgDB.php";}
- Thanks. 209.160.115.88 (talk) 03:18, 31 August 2018 (UTC)
- mysql_connect() function build in PHP MySQL extension. But the extension was deprecated in PHP 5.5.0, and it was removed in PHP 7.0.0. I guess your MediaWiki extension is not compatible with the new version of PHP. 星耀晨曦 (talk) 05:11, 31 August 2018 (UTC)
- Ah. What's the best way to make it compatible? Thanks. Pjkcar (talk) 13:57, 1 September 2018 (UTC)
- If you have the ability to rewrite the extension, that's a solution. Otherwise, you may have to notify the extension developer to fix this issue. 星耀晨曦 (talk) 13:19, 4 September 2018 (UTC)
Chaning the wiki's URL
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 there!
I've got a problem. I bought me a Web Host and installed Media Wiki without problems. But now I don't know how to change the Wiki's URL. It's the URL of my domain but I don't want it to stay like that. I already googled it and tried everything I read about it but it doesen't work. I tried to change the $wgServer in the Lacal Settings, but no. When I do this this webside doesn't exist as well as my former URL. Can someone help me please? Thank you in advance. Blivery (talk) 12:02, 30 August 2018 (UTC)
- Please elaborate as this too abstract.
- You might be able to change a subdomain (like the xyz in xyz.example.com) if you manage the host example.com, or the path (like the xyz in example.com/xyz). MediaWiki itself has no control of the actual name of the host (example.com).
- See https://www.mediawiki.org/wiki/Manual:LocalSettings.php#Server_name for information about wgServer and what it is not. Malyacko (talk) 15:19, 30 August 2018 (UTC)
¿Por qué han eliminado mi contenido?
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.
Hola, hice una publicación sobre una compañía en Colombia y ha se ha borrado. ¿Cómo puedo saber el por qué se ha borrado? Caro.echeverri (talk) 21:19, 30 August 2018 (UTC)
- You should ask about this on the wiki that you made the change on. This support desk is for the software behind MediaWiki.
- (from Google Translate):
- Deberías preguntar sobre esto en la wiki sobre la cual hiciste el cambio. Este escritorio de soporte es para el software detrás de MediaWiki. ☠MarkAHershberger☢(talk)☣ 21:24, 30 August 2018 (UTC)
- ... pero el contenido ha desaparecido ¿qué puedo hacer?
- (from GTrans): ... but the content has disappeared, what can I do? Caro.echeverri (talk) 21:26, 30 August 2018 (UTC)
- If you don't have a copy of the content somewhere, there isn't much you can do to get it back. (Although, I would try the back button on the off chance that it might still be there.)
- (from GTrans): Si no tiene una copia del contenido en algún lugar, no hay mucho que pueda hacer para recuperarlo. (Aunque, probaría el botón Atrás en caso de que todavía esté allí). ☠MarkAHershberger☢(talk)☣ 21:32, 30 August 2018 (UTC)
Policing abandoned extensions
The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
I noticed an extension that is still available for download, but the talk page is congested with complaints that the extension has been non-functional for a very long time due to the use of deprecated functions that have since been removed from MediaWiki. I'll probably make my own entry to try to warn people, but it never occurred to me that the people whom maintain this site would allow abandonware to remain, especially if it has potentially been non-functional for several years.
Has anybody on the website team considered it a priority to weed out junk extensions? From a user perspective, it discredits the MediaWiki project and it's organization as being sloppy and disorganized. Timothylegg (talk) 21:50, 30 August 2018 (UTC)
- It would help if you would point to the specific extension that you're talking about.
- We're volunteers, so while everything you say may be true, we have a limited amount of time to address your concerns without specific extensions to look at. ☠MarkAHershberger☢(talk)☣ 22:14, 30 August 2018 (UTC)
- Timothylegg: You are very welcome to help identifying and proposing such extensions. There is a process athttps://phabricator.wikimedia.org/tag/cleanup/. "People who maintain this site" are you, me, and everyone else here. Malyacko (talk) 08:51, 31 August 2018 (UTC)
Category page stays empty
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.
Category page stays empty. All off the pages have [[Category:Index]] in the code but don't appear on the
category:index page? It worked perfect in mw1.25.
I rebuild this site now in mw1.31 and the index doesn't work.
Anyone knows what I do wrong? Thanks! Mrnoname1 (talk) 13:00, 31 August 2018 (UTC)
- See Project:Support desk/Flow/2016/07#h-Upgrading_from_1.26_to_1.27_breaks_putting_pages_in_a_category-2016-07-27T19:13:00.000Z and Project:Support desk/Flow/2016/08#h-Categories_not_updating-Internal_error-2016-08-22T01:32:00.000Z. AhmadF.Cheema (talk) 13:43, 31 August 2018 (UTC)
- I have no access to the Comand line at the Hosting server .
- Any webbased or other solutions?
- Thanks! Mrnoname1 (talk) 04:08, 1 September 2018 (UTC)
- Can you setup cron jobs? Otherwise, see Extension:Maintenance. AhmadF.Cheema (talk) 07:18, 1 September 2018 (UTC)
- I think so, but dont know how to do this Mrnoname1 (talk) 14:40, 1 September 2018 (UTC)
- Depends on your hosting service, which one is it? Don't they have some hep section or do they provide a control panel? AhmadF.Cheema (talk) 17:15, 1 September 2018 (UTC)
- I also have a same problem. PlavorSeol (talk) 19:01, 1 September 2018 (UTC)
- Here is the help page from my provider, maybe this is what i can use for Cron Jobs?
- https://helpdesk.mijndomein.nl/hc/nl/articles/115005855165-Geplande-taken Mrnoname1 (talk) 22:25, 1 September 2018 (UTC)
- ^Yes, that appears to be correct. AhmadF.Cheema (talk) 07:26, 2 September 2018 (UTC)
- I tried many things, the index now contains 10 entry's but must be arround 100.
- Yesterday I saw 4 entries in the Index and today it were 10.
- Any more ideas what I can do. Mrnoname1 (talk) 10:51, 12 September 2018 (UTC)
- Did you try Extension:Maintenance? Also, can you share the cron job code you are using?
- After the cron job which runs the maintenance script, do the number of remaining jobs decrease to 0 or does it remain stuck at some number? If the runJobs.php script does not complete all jobs, it could mean there is some error on the Wiki. Try running the script again after disabling all extensions. AhmadF.Cheema (talk) 14:05, 12 September 2018 (UTC)
A database query error has occurred
The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
I'm installing a fresh copy of MediaWiki 1.30 on a Windows 2012 Server running MAMP Pro but using SQL Server instead of MySQL. The setup starts out very straightforward and looks like it shouldn't have any issues until disaster strikes.
I'm able to upload the files, start the install, configure the SQL Server settings, choose options etc. Eventually i get to a page that has this line:
By pressing "Continue →", you will begin the installation of MediaWiki. If you still want to make changes, press "← Back".
After clicking continue I'm met with the following wall of red text.
[W4lTcMCoAAoAACQwHOAAAAA-] /pdmu/mw-config/index.php?page=Install Wikimedia\Rdbms\DBQueryError from line 1149 of E:\PioneerData\IT\MAMP\htdocs\PDMU\includes\libs\rdbms\database\Database.php: A database query error has occurred. Did you forget to run your application's database schema updater after upgrading?
Query: CREATE TABLE [mediawiki].[externallinks] (
el_id int NOT NULL PRIMARY KEY IDENTITY,
el_from int NOT NULL REFERENCES [mediawiki].[page](page_id) ON DELETE CASCADE,
el_to nvarchar(max) NOT NULL,
el_index nvarchar(450) NOT NULL,
el_index_60 varbinary(60) NOT NULL default ''
)
Function: Wikimedia\Rdbms\Database::sourceFile( E:\PioneerData\IT\MAMP\htdocs\PDMU/maintenance/mssql/tables.sql )
Error: 257 [SQLSTATE 42000][Error Code 257][Microsoft][ODBC Driver 13 for SQL Server][SQL Server]Implicit conversion from data type varchar to varbinary is not allowed. Use the CONVERT function to run this query.
Backtrace:
#0 E:\PioneerData\IT\MAMP\htdocs\PDMU\includes\libs\rdbms\database\Database.php(979): Wikimedia\Rdbms\Database->reportQueryError(string, integer, string, string, boolean)
#1 E:\PioneerData\IT\MAMP\htdocs\PDMU\includes\libs\rdbms\database\Database.php(3325): Wikimedia\Rdbms\Database->query(string, string)
#2 E:\PioneerData\IT\MAMP\htdocs\PDMU\includes\libs\rdbms\database\Database.php(3274): Wikimedia\Rdbms\Database->sourceStream(unknown type, NULL, NULL, string, NULL)
#3 E:\PioneerData\IT\MAMP\htdocs\PDMU\includes\installer\DatabaseInstaller.php(225): Wikimedia\Rdbms\Database->sourceFile(string)
#4 E:\PioneerData\IT\MAMP\htdocs\PDMU\includes\installer\DatabaseInstaller.php(248): DatabaseInstaller->stepApplySourceFile(string, string, boolean)
#5 E:\PioneerData\IT\MAMP\htdocs\PDMU\includes\installer\MssqlInstaller.php(635): DatabaseInstaller->createTables()
#6 E:\PioneerData\IT\MAMP\htdocs\PDMU\includes\installer\Installer.php(1554): MssqlInstaller->createTables(MssqlInstaller)
#7 E:\PioneerData\IT\MAMP\htdocs\PDMU\includes\installer\WebInstallerInstall.php(44): Installer->performInstallation(array, array)
#8 E:\PioneerData\IT\MAMP\htdocs\PDMU\includes\installer\WebInstaller.php(277): WebInstallerInstall->execute()
#9 E:\PioneerData\IT\MAMP\htdocs\PDMU\mw-config\index.php(80): WebInstaller->execute(array)
#10 E:\PioneerData\IT\MAMP\htdocs\PDMU\mw-config\index.php(39): wfInstallerMain()
#11 {main}
This particular error is pretty straight forward and by going into the tables.sql script I can fix it. After it's fixed I receive errors about the Unsigned Constraints. After fixing that I receive errors about missing tables. These errors are caused by tables being created with foreign keys pointing to tables that haven't been created yet. Again, I can fix that. I can go through the tables.sql and make that particular file work.
Once it's done I receive an error that MediaWiki Could not create a new page. It already exists.
I'm really struggling. I'm thinking that I should be able to get this installed without making changes to the tables.sql script. I'm hopeful that getting past that will take care of the remaining issues as well.
Any help would be hugely appreciated.
Thanks
Dennis Edmondson Dennis2130 (talk) 14:47, 31 August 2018 (UTC)
- There have been quite some changes to the MediaWiki database layout recently, including MSSQL. However, since 1.30.0 is an outdated version of MediaWiki, these changes aren't available in the version you're using. Instead, download the latest version of MediaWiki (1.31.0). —Mainframe98 talk 15:36, 31 August 2018 (UTC)
- I just noticed Phab:T202637 from Project:Support desk/Flow/2018/08#h-1.31.0_Fails_on_SQL_Server-2018-08-22T15:40:00.000Z, which means the installation will fail on 1.31.0 as well. Presumably 1.32.0 will address these issues, but that version will not be released before November 2018. —Mainframe98 talk 15:38, 31 August 2018 (UTC)
- You're right, this should work without you modifying the files.
- However, we don't really have anyone dedicated to maintaining SQL Server support. I've thought of setting up an instance on Azure so I could test this, but that would add to my already big workload.
- If you can share the modifications you've made, I can help you get those incorporated into MediaWiki so that we can improve the support for MediaWiki. Please file a task on Phabricator with your changes and point me to it. ☠MarkAHershberger☢(talk)☣ 15:40, 31 August 2018 (UTC)
- @mainframe98
- You're right in that this does happen in 1.31.0 I actually tried that one first and rolled back to 1.30 in the hopes that it would work. How far back do I need to go?
- @MarkAHershberger
- The problem is that taking care of the tables.sql script isn't enough to make it so that I can install the wiki. I'm still having the error pop up that the page already exists and I never get my LocalSettings.php file. Dennis2130 (talk) 20:00, 31 August 2018 (UTC)
- @Dennis2130, tables.sql won't solve everything, right. But it is a necessary prerequisite to solving the problem.
- As far as how far back you need to go, try 1.27. Anything before that is completely un-supported. ☠MarkAHershberger☢(talk)☣ 20:52, 31 August 2018 (UTC)
Upload Error
The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
I am getting this error when I try to upload a file I just recently created my wiki and can't seem to figure out what to do to fix this error
Could not create directory "mwstore://local-backend/local-public/b/b5".
I have made sure that the images folder in my wiki permissions are 777.
Wiki is version 1.30.
OS is Ubuntu 16.04.
I am honestly stuck please any help would be appreciated. Ajmejico (talk) 16:50, 31 August 2018 (UTC)
- Could you paste the output of the following commands:
ls -ld WIKIDIR WIKIDIR/images WIKIDIR/images/b WIKIDIR/images/b/b5; ls -l WIKIDIR/images- Replace WIKIDIR with the path to your wiki, of course. ☠MarkAHershberger☢(talk)☣ 20:56, 31 August 2018 (UTC)
- ls -ld /var/www/html/wiki /var/www/html/wiki/images /var/www/html/wiki/images/b /var/www/html/wiki/images/b/b5
- ls: cannot access '/var/www/html/wiki/images/b': No such file or directory
- ls: cannot access '/var/www/html/wiki/images/b/b5': No such file or directory
- lrwxrwxrwx 1 root root 13 May 18 11:39 /var/www/html/wiki -> /var/lib/wiki
- drwxrwxrwx 2 www-data asgard 4096 Dec 8 2017 /var/www/html/wiki/images
- ls -l /var/www/html/wiki/images
- total 4
- -rwxrwxrwx 1 www-data asgard 84 Dec 8 2017 README
- Sorry for the delay but this is what I got when trying those commands. Ajmejico (talk) 15:51, 6 September 2018 (UTC)
- Are you install SELiunx in your system? 星耀晨曦 (talk) 14:01, 7 September 2018 (UTC)
- I don't believe so? Or remember installing anything by that name. Ajmejico (talk) 14:29, 7 September 2018 (UTC)
- What is $wgUploadDirectory set to? ☠MarkAHershberger☢(talk)☣ 16:59, 8 September 2018 (UTC)
- // Define a standard file repository that uses the local backend defined before
- $wgLocalFileRepo = array (
- 'class' => 'LocalRepo',
- 'name' => 'local',
- 'directory' => $wgUploadDirectory,
- 'scriptDirUrl' => $wgScriptPath,
- 'scriptExtension' => $wgScriptExtension,
- 'url' => $wgUploadBaseUrl ? $wgUploadBaseUrl . $wgUploadPath : $wgUploadPath,
- 'hashLevels' => $wgHashedUploadDirectory ? 2 : 0,
- 'thumbScriptUrl' => $wgThumbnailScriptPath,
- 'transformVia404' => !$wgGenerateThumbnailOnParse,
- 'deletedDir' => $wgDeletedDirectory,
- 'deletedHashLevels' => $wgHashedUploadDirectory ? 3 : 0,
- 'backend' => 'local-backend',
- );
- I just took this from the instruction page and didn't make any changes as the one time I made changes it crashed the wiki. Ajmejico (talk) 20:49, 8 September 2018 (UTC)
- Do I need to add the $wgUploadDirectory to the bottom of the local settings page and if so are there any others I need to do as well? If so can someone please give me some pointers on how to code that, so I don't crash the wiki again? Would really appreciate it and thank you for everyone's time who has tried to help me. Ajmejico (talk) 18:55, 11 September 2018 (UTC)
- General, you don't need to customize $wgLocalFileRepo. Just configure $wgUploadDirectory. Also you can refer Manual:Configuring file uploads. 星耀晨曦 (talk) 15:57, 12 September 2018 (UTC)
Unable to upload a file using the API and lua ("badupload_file")
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 all,
I'm trying to make a plugin to upload pictures directly from darktable to Wikimedia Commons (like LrMediaWiki for Lightroom). I have been running into issues trying to upload images.
I get the following error when I try to upload a file using the API:
"error": {
"code": "badupload_file",
"info": "File upload parameter \"file\" is not a file upload; be sure to use \"multipart/form-data\" for your POST and include a filename in the \"Content-Disposition\" header.",
"*": "See <nowiki>https://commons.wikimedia.org/w/api.php</nowiki> for API usage. Subscribe to the mediawiki-api-announce mailing list at <nowiki>&</nowiki>lt;<nowiki>https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce&gt</nowiki>; for notice of API deprecations and breaking changes."
},
I got the raw request and am pasting it below. Any information on what the request should look like / what the issue might be would be very helpful! I am using the lua ssl.https (LuaSec) library which is rather barebone and multipart-post.lua.
Request Start ----->
Request path: / Content Length: 26787 Request headers: TE: trailers Host: localhost:8080 Content-Type: multipart/form-data; boundary=BOUNDARY-QSDPAGDUEKDCZFNV-BOUNDARY Connection: close, TE Content-Length: 26787 Cookie: (MediaWikiApi.cookie) User-Agent: LuaSocket 3.0-rc1
Request payload:
--BOUNDARY-QSDPAGDUEKDCZFNV-BOUNDARY content-disposition: form-data; name="filename" trougnoufsandbox.png --BOUNDARY-QSDPAGDUEKDCZFNV-BOUNDARY content-disposition: form-data; name="text" pagetext --BOUNDARY-QSDPAGDUEKDCZFNV-BOUNDARY content-disposition: form-data; name="file" \x89PNG \x1a\n\x00\x00\x00\rIHDR\x00\x00\x00\x80\x00\x00\x00W\x08\x06\x00\x00\x00\xcc\x05M\\\x00\x00\x1aozTXtRaw profile type exif\x00\x00x\xda\xad\x9agr[...] --BOUNDARY-QSDPAGDUEKDCZFNV-BOUNDARY content-disposition: form-data; name="action" upload --BOUNDARY-QSDPAGDUEKDCZFNV-BOUNDARY content-disposition: form-data; name="token" +\\ --BOUNDARY-QSDPAGDUEKDCZFNV-BOUNDARY--
<----- Request End -----
The relevant code in MediaWiki might be in ApiBase.php,
$value = $this->getMain()->getUpload( $encParamName );
if ( !$value->exists() ) {
// This will get the value without trying to normalize it
// (because trying to normalize a large binary file
// accidentally uploaded as a field fails spectacularly)
$value = $this->getMain()->getRequest()->unsetVal( $encParamName );
if ( $value !== null ) {
$this->dieWithError(
[ 'apierror-badupload', $encParamName ],
"badupload_{$encParamName}"
);
}
}
Thank you for your time! Trougnouf (talk) 20:00, 31 August 2018 (UTC)
- I've changed the formatting of your post. Does it still reflect the posted data?
- If so, you are missing a CRLF after the headers of each section of your posted data. It should look like this:
- ☠MarkAHershberger☢(talk)☣ 21:12, 31 August 2018 (UTC)
--BOUNDARY-QSDPAGDUEKDCZFNV-BOUNDARY content-disposition: form-data; name="filename" trougnoufsandbox.png --BOUNDARY-QSDPAGDUEKDCZFNV-BOUNDARY content-disposition: form-data; name="text" pagetext --BOUNDARY-QSDPAGDUEKDCZFNV-BOUNDARY content-disposition: form-data; name="file" \x89PNG \x1a\n\x00\x00\x00\rIHDR\x00\x00\x00\x80\x00\x00\x00W\x08\x06\x00\x00\x00\xcc\x05M\\\x00\x00\x1aozTXtRaw profile type exif\x00\x00x\xda\xad\x9agr[...] --BOUNDARY-QSDPAGDUEKDCZFNV-BOUNDARY content-disposition: form-data; name="action" upload --BOUNDARY-QSDPAGDUEKDCZFNV-BOUNDARY content-disposition: form-data; name="token" +\\ --BOUNDARY-QSDPAGDUEKDCZFNV-BOUNDARY--
- This is the line that should be adding the extra CRLF. ☠MarkAHershberger☢(talk)☣ 21:16, 31 August 2018 (UTC)
- Thank you for your response and for formatting my post. The request payload does look like the one you posted, that is with the CRLF (shown in my dump as "\r\n\r\n") correctly added after each section by lua-multipart-post, so that doesn't seem to be the cause. Trougnouf (talk) 21:28, 31 August 2018 (UTC)
- Would it be possible for you to post the code you're using? Right now, I don't know why you would be getting that error. ☠MarkAHershberger☢(talk)☣ 16:20, 1 September 2018 (UTC)
- Yes! I just posted it on https://github.com/trougnouf/dtMediaWiki under mediawikiapi.lua . Sorry it's an unclean work in progress, though most of the http code is not used/irrelevant in the current uploadfile function . Steps to reproduce are
require 'mediawikiapi'MediaWikiApi.login("username","password")code,resheaders,res = MediaWikiApi.uploadfile("/home/trougnouf/trougnoufsandbox.png", "testpagecontent")- Thank you for looking into this! :) Trougnouf (talk) 17:29, 1 September 2018 (UTC)
- I may have gotten this issue by creating an additional table file={filename=whatever, file=actualfilecontent} within the content table and changing the data field of lua-multipart-post to "file", because I now get a new error about needing to be logged in. I will fix that and report back.
- I don't know if this is new but my cookie becomes
commonswikiSession=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/; secure; httponly, WMF-Last-Access=01-Sep-2018;Path=/;HttpOnly;secure;Expires=Wed, 03 Oct 2018 12:00:00 GMT, GeoIP=BE:BRU:Brussels:50.85:4.35:v4; Path=/; secure; Domain=.wikimedia.orgTrougnouf (talk) 19:01, 1 September 2018 (UTC)- I haven't been able to solve this issue (can't remain logged in). I posted the content (incoming / outgoing - headers/body) of a simple userinfo, login, userinfo sequence on https://www.mediawiki.org/wiki/User:Trougnouf/sandbox
- I feel like it may have something to do with cookies, I was unable to login at all before I set the incoming set-cookie header as my outgoing cookie header, I don't see what it could be though. I tried removing the part of the cookie that says commonswikiSession=deleted from the outgoing cookie to no effect. Trougnouf (talk) 21:25, 1 September 2018 (UTC)
- You are not using cookies properly. Have a look at RFC 6265 for the technical details, but basically
- you only provide the name=value pairs, the cookie parameters are not sent by the client
- multiple cookies are sent in the Cookie header separated by ; (you are using a ,) Platonides (talk) 22:53, 1 September 2018 (UTC)
- That worked, thank you so much!!!
- I parsed the cookie and saved it in a table with the first variable after each "," followed by what's between "=" and ";", I save cookies by adding any new or updated value to the table, and send it all out as one cookie that's a string of all the var=val; entries. Trougnouf (talk) 02:38, 2 September 2018 (UTC)
Finding an auto welcome bot
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.
In sd.wikipedia.org we welcome new users manually, we are finding a bot for auto welcome like others wikis... please guide if anyone know. Arslanali (talk) 23:17, 31 August 2018 (UTC)
- Could you post your solution in case others have the same problem? ☠MarkAHershberger☢(talk)☣ 16:30, 1 September 2018 (UTC)
- Yes Solution is in Phabricator - https://phabricator.wikimedia.org/T203292 Arslanali (talk) 16:51, 1 September 2018 (UTC)