Hello. For one of my wikis, I have been planning on creating a point-based extension for a feature that can be used to access certain parts of a wiki (i.e. full versions of games that have demos). However, I am not sure whether I should use a parser function or some other type of extension. Any advice? Thank you for reading.
Project:Support desk
Maybe you want custom Autopromote group using Manual:Hooks/AutopromoteCondition
Nice, but how can I implement that hook into a currency-like feature?
KING ALI Aljanabi MONUIY txt im taking my MONUIY back from Allersommen 1000,000*1000,000+
How can I remove the footer links?: Disclaimer and Privacy
I want to remove them using PHP (not CSS), and I'd like to keep the About link.
Apologies! My Mediawiki v1.42.1
Access ess
This is what I did:
1. Create a new MySQL database 'blah_mw' and a user 'blah_user' with all possible privileges on the former.
2. Install MediaWiki, providing the following information to the installation script:
$wgDBtype = 'mysql'; $wgDBserver = 'localhost'; $wgDBname = 'blah_mw'; $wgDBuser = 'blah_user'; $wgDBpassword = 'mynicepassword';
as summed up in LocalSettings.php.
3. Go to http://mywiki.org/, where I obtain the error:
MediaWiki internal error. Original exception: [ZqEs3UQYlJ7QKxMlbf02vgAAAIA] / Wikimedia\Rdbms\DBConnectionError: Cannot access the database: Access denied for user 'blah_user'@'localhost' (using password: YES) (localhost) Backtrace: from /home/blah/public_html/includes/libs/rdbms/loadbalancer/LoadBalancer.php(1138) #0 /home/v/public_html/includes/libs/rdbms/loadbalancer/LoadBalancer.php(794): Wikimedia\Rdbms\LoadBalancer->reportConnectionError() #1 /home/blah/public_html/includes/libs/rdbms/loadbalancer/LoadBalancer.php(782): Wikimedia\Rdbms\LoadBalancer->getServerConnection() #2 /home/blah/public_html/includes/libs/rdbms/database/DBConnRef.php(99): Wikimedia\Rdbms\LoadBalancer->getConnectionInternal() #3 /home/blah/public_html/includes/libs/rdbms/database/DBConnRef.php(117): Wikimedia\Rdbms\DBConnRef->ensureConnection() #4 /home/blah/public_html/includes/libs/rdbms/database/DBConnRef.php(338): Wikimedia\Rdbms\DBConnRef->__call() #5 /home/blah/public_html/includes/libs/rdbms/querybuilder/SelectQueryBuilder.php(747): Wikimedia\Rdbms\DBConnRef->selectField()
It seems that MediaWiki cannot connect to the database. However, when I open it with PHPmyadmin, I can see that the installation script has been able to edit it, so the problem is not related to the credentials I gave.
Does anybody have any clue what the problem can be related to?
When you say install script do you mean install.php commandline script or do you mean web installer?
I mean the web installer.
I should also mention that I use a shared hosting, so I don't have root privileges on the server. The creation of the database and MySQL user were done through the administration panel of the host, and then I downloaded MediaWiki by SSH.
That's weird. If it works in one it should work in both.
Try using wgDBServer of 127.0.0.1 instead of localhost, just in case (controls whether to use tcp or unix socket)
Finally it worked by creating a second user. Apparently my host blocked the first one, probably the web installer had it make too many inserts into the database... Sorry for bothering, thanks a lot for your answers.
I tried to put the displaytitle on a page of a wiki I'm in, but all I got was this: "Display title "United Kingdomball" was ignored since it is not equivalent to the page's actual title."
This was the context of how I want to add it:
The title of the page is called "UKball", but I placed the code {{DISPLAYTITLE:United Kingdomball}}
. The DISPLAYTITLE code ended up failing as a result, and I want to ask: How can I overcome this problem (which is changing the page's display title to something that isn't "related" to the actual title)?
Ypu need to set $wgRestrictDisplayTitle = false; in LocalSettings.php
I want to use MediaWiki's Stub template on my own installation. When I try to edit the template file I get the error message "Lua error in package.lua at line 80: module 'Module:Message box' not found." How can I fix this?
Thanks.
Hi, I noticed that if a user with "bot" permission pinging in the edit summary, the ping is not sent. what can be done? Thanks in advance!
Bots are often excluded from pings yes. Which bot and which wiki are we talking about ?
@TheDJ This is a wiki site that does not belong to the Wikimedia Foundation. Manual edits are made through the bot account, so it is necessary for pings to be sent.
I've already posted about this error but now I've this detailed error while installing the GlobalBlocking extension and I've followed everything mentioned in Extension:GlobalBlocking but facing this problem can anyone help
Database error
A database query error has occurred. This may indicate a bug in the software.
[ZqL81IaLlLGPQ01JYt0l7QAAAAk] /index.php?title=Special:UserLogin&returnto=Special%3AGlobalBlockList Wikimedia\Rdbms\DBQueryError: A database query error has occurred. Did you forget to run your application's database schema updater after upgrading or after adding a new extension?
Please see https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Upgrading and https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:How_to_debug for more information.
Error 1044: Access denied for user '36900384_a'@'192.168.0.%' to database 'globalblocking'
Function: Wikimedia\Rdbms\DatabaseMySQL::doSelectDomain
Query: USE `globalblocking`
Backtrace:
from /home/vol15_5/infinityfree.com/if0_36900384/nepalpedia.great-site.net/htdocs/includes/libs/rdbms/database/Database.php(1236)
#0 /home/vol15_5/infinityfree.com/if0_36900384/nepalpedia.great-site.net/htdocs/includes/libs/rdbms/database/Database.php(1220): Wikimedia\Rdbms\Database->getQueryException(string, integer, string, string)
#1 /home/vol15_5/infinityfree.com/if0_36900384/nepalpedia.great-site.net/htdocs/includes/libs/rdbms/database/Database.php(1194): Wikimedia\Rdbms\Database->getQueryExceptionAndLog(string, integer, string, string)
#2 /home/vol15_5/infinityfree.com/if0_36900384/nepalpedia.great-site.net/htdocs/includes/libs/rdbms/database/DatabaseMySQL.php(202): Wikimedia\Rdbms\Database->reportQueryError(string, integer, string, string)
#3 /home/vol15_5/infinityfree.com/if0_36900384/nepalpedia.great-site.net/htdocs/includes/libs/rdbms/database/Database.php(1543): Wikimedia\Rdbms\DatabaseMySQL->doSelectDomain(Wikimedia\Rdbms\DatabaseDomain)
#4 /home/vol15_5/infinityfree.com/if0_36900384/nepalpedia.great-site.net/htdocs/includes/libs/rdbms/loadbalancer/LoadBalancer.php(922): Wikimedia\Rdbms\Database->selectDomain(Wikimedia\Rdbms\DatabaseDomain)
#5 /home/vol15_5/infinityfree.com/if0_36900384/nepalpedia.great-site.net/htdocs/includes/libs/rdbms/loadbalancer/LoadBalancer.php(801): Wikimedia\Rdbms\LoadBalancer->reuseOrOpenConnectionForNewRef(integer, Wikimedia\Rdbms\DatabaseDomain, integer)
#6 /home/vol15_5/infinityfree.com/if0_36900384/nepalpedia.great-site.net/htdocs/includes/libs/rdbms/loadbalancer/LoadBalancer.php(793): Wikimedia\Rdbms\LoadBalancer->getServerConnection(integer, string, integer)
#7 /home/vol15_5/infinityfree.com/if0_36900384/nepalpedia.great-site.net/htdocs/includes/libs/rdbms/database/DBConnRef.php(99): Wikimedia\Rdbms\LoadBalancer->getConnectionInternal(integer, string, string, integer)
#8 /home/vol15_5/infinityfree.com/if0_36900384/nepalpedia.great-site.net/htdocs/includes/libs/rdbms/database/DBConnRef.php(117): Wikimedia\Rdbms\DBConnRef->ensureConnection()
#9 /home/vol15_5/infinityfree.com/if0_36900384/nepalpedia.great-site.net/htdocs/includes/libs/rdbms/database/DBConnRef.php(538): Wikimedia\Rdbms\DBConnRef->__call(string, array)
#10 /home/vol15_5/infinityfree.com/if0_36900384/nepalpedia.great-site.net/htdocs/extensions/GlobalBlocking/includes/GlobalBlocking.php(313): Wikimedia\Rdbms\DBConnRef->anyString()
#11 /home/vol15_5/infinityfree.com/if0_36900384/nepalpedia.great-site.net/htdocs/extensions/GlobalBlocking/includes/GlobalBlocking.php(287): MediaWiki\Extension\GlobalBlocking\GlobalBlocking::getRangeCondition(string)
#12 /home/vol15_5/infinityfree.com/if0_36900384/nepalpedia.great-site.net/htdocs/extensions/GlobalBlocking/includes/GlobalBlocking.php(121): MediaWiki\Extension\GlobalBlocking\GlobalBlocking::getGlobalBlockingBlock(string, boolean)
#13 /home/vol15_5/infinityfree.com/if0_36900384/nepalpedia.great-site.net/htdocs/extensions/GlobalBlocking/includes/GlobalBlocking.php(38): MediaWiki\Extension\GlobalBlocking\GlobalBlocking::getUserBlockDetails(MediaWiki\User\User, string)
#14 /home/vol15_5/infinityfree.com/if0_36900384/nepalpedia.great-site.net/htdocs/extensions/GlobalBlocking/includes/GlobalBlockingHooks.php(102): MediaWiki\Extension\GlobalBlocking\GlobalBlocking::getUserBlock(MediaWiki\User\User, string)
#15 /home/vol15_5/infinityfree.com/if0_36900384/nepalpedia.great-site.net/htdocs/includes/HookContainer/HookContainer.php(161): MediaWiki\Extension\GlobalBlocking\GlobalBlockingHooks->onGetUserBlock(MediaWiki\User\User, string, NULL)
#16 /home/vol15_5/infinityfree.com/if0_36900384/nepalpedia.great-site.net/htdocs/includes/HookContainer/HookRunner.php(1962): MediaWiki\HookContainer\HookContainer->run(string, array)
#17 /home/vol15_5/infinityfree.com/if0_36900384/nepalpedia.great-site.net/htdocs/includes/block/BlockManager.php(186): MediaWiki\HookContainer\HookRunner->onGetUserBlock(MediaWiki\User\User, string, NULL)
#18 /home/vol15_5/infinityfree.com/if0_36900384/nepalpedia.great-site.net/htdocs/includes/user/User.php(1406): MediaWiki\Block\BlockManager->getUserBlock(MediaWiki\User\User, MediaWiki\Request\WebRequest, boolean, boolean)
#19 /home/vol15_5/infinityfree.com/if0_36900384/nepalpedia.great-site.net/htdocs/includes/user/User.php(1507): MediaWiki\User\User->getBlockedStatus(boolean, boolean)
#20 /home/vol15_5/infinityfree.com/if0_36900384/nepalpedia.great-site.net/htdocs/includes/user/PasswordReset.php(349): MediaWiki\User\User->getBlock()
#21 /home/vol15_5/infinityfree.com/if0_36900384/nepalpedia.great-site.net/htdocs/includes/user/PasswordReset.php(154): MediaWiki\User\PasswordReset->isBlocked(MediaWiki\User\User)
#22 /home/vol15_5/infinityfree.com/if0_36900384/nepalpedia.great-site.net/htdocs/includes/user/PasswordReset.php(124): MediaWiki\User\PasswordReset->computeIsAllowed(MediaWiki\User\User)
#23 /home/vol15_5/infinityfree.com/if0_36900384/nepalpedia.great-site.net/htdocs/includes/libs/MapCacheLRU.php(271): MediaWiki\User\PasswordReset->MediaWiki\User\{closure}()
#24 /home/vol15_5/infinityfree.com/if0_36900384/nepalpedia.great-site.net/htdocs/includes/user/PasswordReset.php(121): MapCacheLRU->getWithSetCallback(string, Closure)
#25 /home/vol15_5/infinityfree.com/if0_36900384/nepalpedia.great-site.net/htdocs/includes/specialpage/LoginSignupSpecialPage.php(1082): MediaWiki\User\PasswordReset->isAllowed(MediaWiki\User\User)
#26 /home/vol15_5/infinityfree.com/if0_36900384/nepalpedia.great-site.net/htdocs/includes/specialpage/LoginSignupSpecialPage.php(757): MediaWiki\SpecialPage\LoginSignupSpecialPage->getFieldDefinitions(array)
#27 /home/vol15_5/infinityfree.com/if0_36900384/nepalpedia.great-site.net/htdocs/includes/specialpage/AuthManagerSpecialPage.php(695): MediaWiki\SpecialPage\LoginSignupSpecialPage->onAuthChangeFormFields(array, array, array, string)
#28 /home/vol15_5/infinityfree.com/if0_36900384/nepalpedia.great-site.net/htdocs/includes/specialpage/LoginSignupSpecialPage.php(708): MediaWiki\SpecialPage\AuthManagerSpecialPage->fieldInfoToFormDescriptor(array, array, string)
#29 /home/vol15_5/infinityfree.com/if0_36900384/nepalpedia.great-site.net/htdocs/includes/specialpage/AuthManagerSpecialPage.php(434): MediaWiki\SpecialPage\LoginSignupSpecialPage->getAuthForm(array, string)
#30 /home/vol15_5/infinityfree.com/if0_36900384/nepalpedia.great-site.net/htdocs/includes/specialpage/LoginSignupSpecialPage.php(337): MediaWiki\SpecialPage\AuthManagerSpecialPage->trySubmit()
#31 /home/vol15_5/infinityfree.com/if0_36900384/nepalpedia.great-site.net/htdocs/includes/specialpage/SpecialPage.php(727): MediaWiki\SpecialPage\LoginSignupSpecialPage->execute(NULL)
#32 /home/vol15_5/infinityfree.com/if0_36900384/nepalpedia.great-site.net/htdocs/includes/specialpage/SpecialPageFactory.php(1621): MediaWiki\SpecialPage\SpecialPage->run(NULL)
#33 /home/vol15_5/infinityfree.com/if0_36900384/nepalpedia.great-site.net/htdocs/includes/MediaWiki.php(357): MediaWiki\SpecialPage\SpecialPageFactory->executePath(string, RequestContext)
#34 /home/vol15_5/infinityfree.com/if0_36900384/nepalpedia.great-site.net/htdocs/includes/MediaWiki.php(960): MediaWiki->performRequest()
#35 /home/vol15_5/infinityfree.com/if0_36900384/nepalpedia.great-site.net/htdocs/includes/MediaWiki.php(613): MediaWiki->main()
#36 /home/vol15_5/infinityfree.com/if0_36900384/nepalpedia.great-site.net/htdocs/index.php(50): MediaWiki->run()
#37 /home/vol15_5/infinityfree.com/if0_36900384/nepalpedia.great-site.net/htdocs/index.php(46): wfIndexMain()
#38 {main}
When you login/register, it is running a check by the user against the global blocking table.
Access denied for user '36900384_a'@'192.168.0.%' to database 'globalblocking'
User 36900384_an accessing via '192.168.0.%' cannot read or write to the globalblocking table. You'll have to fix that, it is a database configuration problem.
Ok it's a database configuration problem but how can I fix this can you give me little bit idea.
It's not really a MediaWiki issue and very much depends on how your server is setup. I'm assuming that access to other tables works ?
https://www.google.com/search?q=mysql+granting+permissions+to+a+table
Stack overflow should have lots of answers as well.
It should be noted, that access denied might literally mean access denied, but in many setups you will get the same error if you simply forgot to create the database.
This was solved by making some changes in database but now another problem has been shown to me.
This problem has gone but now I've another problem like this MediaWiki internal error.
Original exception: [ZqODYk6fQHQg5OQmWuIAhQAAAAs] / Wikimedia\Rdbms\DBQueryError: A database query error has occurred. Did you forget to run your application's database schema updater after upgrading or after adding a new extension?
Please see https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Upgrading and https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:How_to_debug for more information.
Error 1146: Table 'if0_36900384_globalblocking.mwfm_l10n_cache' doesn't exist Function: LCStoreDB::get Query: SELECT lc_value FROM `mwfm_l10n_cache` WHERE lc_lang = 'en' AND lc_key = 'deps' LIMIT 1
Hello everyone. I am trying to make a post request to the mediawiki api with the following url
https://test.domain.de/w/api.php?action=clientlogin&format=json
with my body looking like this
{"logintoken":"e55e353a054628b573a515a6580fa4ed66a235a4%2B%5C","username":"test","password":"test"}
I got the login-token via the get-request https://test.domain.de/w/api.php?action=query&meta=tokens&type=login&format=json
Content-Type is application/json in both instances
and I am getting the following error with the latter post request
{"error":{"code":"missingparam","info":"The \"logintoken\" parameter must be set.","*":"See https://testwiki.sevengamer.de/w/api.php for API usage. Subscribe to the mediawiki-api-announce mailing list at <https://lists.wikimedia.org/postorius/lists/mediawiki-api-announce.lists.wikimedia.org/> for notice of API deprecations and breaking changes."}}
This does not make sense to me given as i am providing the parameter that the response is telling me is missing. Please help :(
Application/json is not a supported content type by the api. Use either multipart/form-data or application/x-www-form-urlencoded for post bodies (and make them in that format)
Is there a way to limit a search to only pages inside a category?
Example: Search "scandal" inside Category:Presidents_of_the_United_States
I can't find an extension. Is there a hook that can be used without hardcoding into SpecialSearch.php?
If using extension:CirrusSearch you can use the incategory: operator. See help:Extension:CirrusSearch
Hello
I'm creating a private wiki. My goal is to have the user immediately redirected to the login page from any page when they're not logged in. But I cannot get it to work without changing the mediawiki sources. I do not want to change the sources for security reasons.
My versions are:
MediaWiki | 1.39.4 |
PHP | 8.2.4 (apache2handler) |
MariaDB | 10.4.28-MariaDB |
ICU | 71.1 |
I tried to use a hook but since the not logged in page is a permissionErrorPage the redirect is not executed. The hooks I tried were BeforeInitialize and BeforePageDisplay.
Below my hook handle which i wrote into LocalSettings.php:
$wgHooks['BeforeInitialize'][] = function ( $title, $unused, $output, $user, $request, $mediaWiki ) { # Check if the user is not logged in and not login Page if ( $user->isAnon() && strcmp($title, SpecialPage::getTitleFor( 'Userlogin' ))) { # Get URL $title = SpecialPage::getTitleFor( 'Userlogin' ); $url = $title->getFullURL(); # Redirect to login page $output->redirect( $url ); return; } return true; };
Is there a way to implement my request without changing the mediawiki sources? Or a different handle that suits my needs? I already searched through Manual:Hooks.
Thanks in advance
How did you set up the 'private wiki'? If set up correctly you don't need to do anything. That should be the default, and in fact, only behavior; i.e "user [is] redirected to the login page from any page when they're not logged in."