Page MenuHomePhabricator

Database error after installing OAuth extension on wikismadebythepins.ml/community
Closed, DeclinedPublicBUG REPORT

Description

Steps to Reproduce:

Actual Results:

A database query error has occurred. This may indicate a bug in the software.

[XY80QUpBs8jclL0-@6oROwAAAB4] 2019-09-28 10:21:54: Fatal exception of type "Wikimedia\Rdbms\DBQueryError"
A database query error has occurred. This may indicate a bug in the software.

[XY81dZDyYCjmtuvEGDCxUAAAACc] 2019-09-28 10:27:02: Fatal exception of type "Wikimedia\Rdbms\DBQueryError"
  • Other special pages for this extension are working as usual.

Expected Results:

  • Must see and create OAuth consumers
  • Must approve or reject pending requests
  • ...etc.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Aklapper changed the task status from Open to Stalled.Sep 28 2019, 11:27 AM

Hi @AndreiJirohOnDevsCentral, thanks for taking the time to report this!

Please provide a stacktrace: https://www.mediawiki.org/wiki/Manual:How_to_debug

Please also provide exact version and branch information for both MediaWiki itself and the OAuth extension.

Removing Wikimedia-database-error as this is not a "problems with storage/retrieval of values from a database in WMF-production" (see project description).

Hi @AndreiJirohOnDevsCentral, thanks for taking the time to report this!

Please provide a stacktrace: https://www.mediawiki.org/wiki/Manual:How_to_debug

Please also provide exact version and branch information for both MediaWiki itself and the OAuth extension.

Removing Wikimedia-database-error as this is not a "problems with storage/retrieval of values from a database in WMF-production" (see project description).

My version of MediaWiki is 1.33.0 (stable) and the extension version was REL1_33. I am currently configuring and testing the things again to make sure it working after configuration.

Hi @AndreiJirohOnDevsCentral, thanks for taking the time to report this!

Please provide a stacktrace: https://www.mediawiki.org/wiki/Manual:How_to_debug

Please also provide exact version and branch information for both MediaWiki itself and the OAuth extension.

Removing Wikimedia-database-error as this is not a "problems with storage/retrieval of values from a database in WMF-production" (see project description).

My version of MediaWiki is 1.33.0 (stable) and the extension version was REL1_33. I am currently configuring and testing the things again to make sure it working after configuration.

Meanwhile, while I'm visiting the Special:Preferences page, the wiki is currently experiencing techinical bugs.

image.png (768×1 px, 151 KB)

For full details, you can analyise my code in P9215 LocalSettings_community-en.php Sample or read the full embedded code below.

1<?php
2# This file was automatically generated by the MediaWiki 1.33.0
3# installer. If you make manual changes, please keep track in case you
4# need to recreate them later.
5#
6# See includes/DefaultSettings.php for all configurable settings
7# and their default values, but don't forget to make changes in _this_
8# file, not there.
9#
10# Further documentation for configuration settings may be found at:
11# https://www.mediawiki.org/wiki/Manual:Configuration_settings
12
13# Protect against web entry
14if ( !defined( 'MEDIAWIKI' ) ) {
15 exit;
16}
17
18# Some content is currently censored, such as database passwords, SMTP login credentials and more
19# due to security and privacy reasons.
20
21## Uncomment this to disable output compression
22# $wgDisableOutputCompression = true;
23
24$wgSitename = "Community Discussions Wiki";
25$wgMetaNamespace = "discussions-meta";
26
27## The URL base path to the directory containing the wiki;
28## defaults for all runtime URL paths are based off of this.
29## For more information on customizing the URLs
30## (like /w/index.php/Page_title to /wiki/Page_title) please see:
31## https://www.mediawiki.org/wiki/Manual:Short_URL
32$wgScriptPath = "/community";
33
34## The protocol and server name to use in fully-qualified URLs
35$wgServer = "https://wikismadebythepins.ml";
36
37## The URL path to static resources (images, scripts, etc.)
38$wgResourceBasePath = $wgScriptPath;
39
40## The URL path to the logo. Make sure you change this from the default,
41## or else you'll overwrite your logo when you upgrade!
42$wgLogo = "$wgResourceBasePath/resources/assets/wiki.png";
43
44## UPO means: this is also a user preference option
45
46$wgEnableEmail = true;
47$wgEnableUserEmail = true; # UPO
48
49$wgEmergencyContact = "wikiadmin-support@madebythepins.x10host.com";
50$wgPasswordSender = "password-reset@madebythepins.x10host.com";
51
52$wgEnotifUserTalk = true; # UPO
53$wgEnotifWatchlist = true; # UPO
54$wgEmailAuthentication = true;
55
56## Database settings
57$wgDBtype = "mysql";
58$wgDBserver = "sql206.byetcluster.com";
59$wgDBname = CENSORED;
60$wgDBuser = CENSORED;
61$wgDBpassword = CENSORED;
62
63# MySQL specific settings
64$wgDBprefix = "mwbv_";
65
66# MySQL table options to use during installation or update
67$wgDBTableOptions = "ENGINE=InnoDB, DEFAULT CHARSET=binary";
68
69## Shared memory settings
70$wgMainCacheType = CACHE_NONE;
71$wgMemCachedServers = [];
72
73## To enable image uploads, make sure the 'images' directory
74## is writable, then set this to true:
75$wgEnableUploads = true;
76#$wgUseImageMagick = true;
77#$wgImageMagickConvertCommand = "/usr/bin/convert";
78
79# InstantCommons allows wiki to use images from https://commons.wikimedia.org
80$wgUseInstantCommons = true;
81
82# Periodically send a pingback to https://www.mediawiki.org/ with basic data
83# about this MediaWiki instance. The Wikimedia Foundation shares this data
84# with MediaWiki developers to help guide future development efforts.
85$wgPingback = true;
86
87## If you use ImageMagick (or any other shell command) on a
88## Linux server, this will need to be set to the name of an
89## available UTF-8 locale
90$wgShellLocale = "en_US.utf8";
91
92## Set $wgCacheDirectory to a writable directory on the web server
93## to make your wiki go slightly faster. The directory should not
94## be publicly accessible from the web.
95#$wgCacheDirectory = "$IP/cache";
96
97# Site language code, should be one of the list in ./languages/data/Names.php
98$wgLanguageCode = "en";
99
100$wgSecretKey = CENSORED;
101
102# Changing this will log out all existing sessions.
103$wgAuthenticationTokenVersion = "1";
104
105# Site upgrade key. Must be set to a string (default provided) to turn on the
106# web installer while LocalSettings.php is in place
107$wgUpgradeKey = CENSORED;
108
109## For attaching licensing metadata to pages, and displaying an
110## appropriate copyright notice / icon. GNU Free Documentation
111## License and Creative Commons licenses are supported so far.
112$wgRightsPage = "Help:Copyright Center";
113$wgRightsUrl = "https://creativecommons.org/licenses/by-sa/4.0";
114$wgRightsText = "a Creative Commons Attribution-ShareAlike 4.0 Unported License";
115$wgRightsIcon = "https://i.creativecommons.org/l/by-sa/4.0/88x31.png";
116$wgEnableCreativeCommonsRdf = true;
117$wgEnableDublinCoreRdf = true;
118
119# Path to the GNU diff3 utility. Used for conflict resolution.
120$wgDiff3 = "/usr/bin/diff3";
121
122## Default skin: you can change the default skin. Use the internal symbolic
123## names, ie 'vector', 'monobook':
124$wgDefaultSkin = "vector";
125
126# Enabled skins.
127# The following skins were automatically enabled:
128wfLoadSkin( 'MonoBook' );
129wfLoadSkin( 'Timeless' );
130wfLoadSkin( 'Vector' );
131
132
133# End of automatically generated settings.
134# Add more configuration options below.
135
136$wgTmpDirectory = "/home/vol2_6/epizy.com/epiz_24535196/tmp_n1wni9";
137
138# Namespaces settings should be here.
139
140# Subpages option | Use 1 or true to allow. Otherwise, use 0 or false.
141$wgNamespacesWithSubpages[NS_MAIN] = 1;
142$wgNamespacesWithSubpages[NS_TEMPLATE] = true;
143
144# Autoconfirmed accounts config
145$wgAutoConfirmAge = 86400*7; // a week is required to get 'autoconfirmed' permission
146$wgAutoConfirmCount = 10;
147
148# Hooks should be placed here.
149function efLoginFormMessage( &$template ) {
150 $template->set( 'header', "(In order to create an account, please contact the staff handling account requests at )");
151 return true;
152}
153$wgHooks['UserLoginForm'][]='efLoginFormMessage';
154
155## For our ConfrimAccount extension, I configured this one for creating an RequestAccount special page.
156$wgHooks['PersonalUrls'][] = 'onPersonalUrls';
157
158function onPersonalUrls( array &$personal_urls, Title $title, SkinTemplate $skin ) {
159 // Add a link to Special:RequestAccount if a link exists for login
160 if ( isset( $personal_urls['login'] ) || isset( $personal_urls['anonlogin'] ) ) {
161 $personal_urls['createaccount'] = array(
162 'text' => wfMessage( 'requestaccount' )->text(),
163 'href' => SpecialPage::getTitleFor( 'RequestAccount' )->getFullURL()
164 );
165 }
166 return true;
167}
168
169# Install the extensions here, and place its configuration
170# Mostly extensions support the new way of installing it after 1.27 release.
171wfLoadExtension( 'CategoryTree' );
172wfLoadExtension( 'Cite' );
173wfLoadExtension( 'CiteThisPage' );
174
175# Speaking of CodeEditor, some sort of configuration will be added. Please accept apologies.
176wfLoadExtension( 'CodeEditor' );
177$wgDefaultUserOptions['usebetatoolbar'] = 1; // user option provided by WikiEditor extension
178
179wfLoadExtensions([ 'ConfirmEdit', 'ConfirmEdit/ReCaptchaNoCaptcha' ]);
180$wgCaptchaClass = 'ReCaptchaNoCaptcha';
181$wgReCaptchaSiteKey = '6LegtLoUAAAAAAFtqiwKKegQBLg3gsAhs0or2MDo';
182$wgReCaptchaSecretKey = '6LegtLoUAAAAAOLbJJxjBZY5VLT3I_qbVBu9zGeq';
183
184# Let's continue the messy workarounds on extensions.
185wfLoadExtension( 'WikiEditor' );
186wfLoadExtension( 'OATHAuth' );
187wfLoadExtension( 'Gadgets' );
188wfLoadExtension( 'ImageMap' );
189wfLoadExtension( 'InputBox' );
190wfLoadExtension( 'Interwiki' );
191wfLoadExtension( 'LocalisationUpdate' );
192wfLoadExtension( 'MultimediaViewer' );
193wfLoadExtension( 'Nuke' );
194wfLoadExtension( 'ParserFunctions' );
195wfLoadExtension( 'PdfHandler' );
196wfLoadExtension( 'OAuth' );
197
198# IF the extension isn't yet supporting the new way of installating,
199# use require_once "$IP/extensions/YourExtensionToBeInstalled/ExtensionScript.php";
200require_once "$IP/extensions/ConfirmAccount/ConfirmAccount.php";
201 $wgConfirmAccountContact = 'account-requests@wikismadebythepins.ml';
202 $wgMakeUserPageFromBio = false;
203 $wgAutoWelcomeNewUsers = true;
204 $wgConfirmAccountRequestFormItems = array(
205 'UserName' => array( 'enabled' => true ),
206 'RealName' => array( 'enabled' => true ),
207 'Biography' => array( 'enabled' => false, 'minWords' => 50 ),
208 'AreasOfInterest' => array( 'enabled' => false ),
209 'CV' => array( 'enabled' => false ),
210 'Notes' => array( 'enabled' => true ),
211 'Links' => array( 'enabled' => false ),
212 'TermsOfService' => array( 'enabled' => true ),
213 );
214
215# Some extensions are 'backward-compatible" when installing them.
216
217
218# The following file extensions below are only allowed in this wiki.
219# See MediaWiki documentation for details by clicking the link above in
220$wgFileExtensions = array( 'png', 'gif', 'jpg', 'jpeg', 'doc',
221 'xls', 'mpp', 'pdf', 'ppt', 'tiff', 'bmp', 'docx', 'xlsx',
222 'pptx', 'ps', 'odt', 'ods', 'odp', 'odg'
223);
224
225# Configurtion for Extension:OAuth
226$wgMWOAuthCentralWiki = "mwbv_";
227
228# User permissions should be changed at this part, please start from anonynous people
229# up to the admins and blah blah blah.
230# Anonynous Users
231$wgGroupPermissions['*']['createaccount'] = false;
232# Registered users' permissions
233$wgGroupPermissions['user']['createaccount'] = false;
234$wgGroupPermissions['user']['oathauth-enable'] = true;
235$wgGroupPermissions['user']['mwoauthmanagemygrants'] = true;
236# Bureaucrats' permissions
237$wgGroupPermissions['sysop']['mwoauthproposeconsumer'] = true;
238$wgGroupPermissions['sysop']['mwoauthmanageconsumer '] = true;
239$wgGroupPermissions['sysop']['mwoauthupdateownconsumer'] = true;
240$wgGroupPermissions['sysop']['mwoauthsuppress'] = true;
241$wgGroupPermissions['sysop']['mwoauthviewsuppressed '] = true;
242$wgGroupPermissions['sysop']['mwoauthviewprivate'] = false;
243# Custom user roles and permissions
244
245$wgSMTP = array(
246 'host'=> "xo7.x10hosting.com",
247 'IDHost' => "madebythepins.x10host.com",
248 'port' => 465,
249 'auth' => true,
250 'username' => "wikiadmin-support@madebythepins.x10host.com",
251 'password' => CENSORED
252);

Unfortunately closing this Phabricator task as no further information has been provided.

After you have provided the information asked for and if this still happens, feel free to set the status of this task back to "Open" via the Add Action...Change Status dropdown. However given the other problems (database connection problems), I don't think that this is a bug in the code base but instead a support request.