Hi Cindy ,
I am able to create user using email.
But after logging out and then logging in its giving error because it want to recreate an user(duplicate entry).
Below is error log.
Database error
A database query error has occurred. This may indicate a bug in the software.
[48be48f30122c3a6feba9619] 2017-11-17 07:13:37: Fatal exception of type "Wikimedia\Rdbms\DBQueryError"
Debug data:
-
IP: ::1
-
Start request GET /testWiki/index.php/Special:UserLogin
HTTP HEADERS:
HOST: localhost
CONNECTION: keep-alive
CACHE-CONTROL: max-age=0
UPGRADE-INSECURE-REQUESTS: 1
USER-AGENT: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36
ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
REFERER: http://localhost:5000/account/login?returnUrl=%2Fconnect%2Fauthorize%2Flogin%3Fresponse_type%3Dcode%26redirect_uri%3Dhttp%253A%252F%252Flocalhost%252FtestWiki%252Findex.php%252FSpecial%253APluggableAuthLogin%26client_id%3Dwiki%26nonce%3D83450dfca095fbc0edf3af838d42bc3a%26state%3Dd30f9e77e3d7dc2da70d71a5df0a7c73%26scope%3Dopenid%2520profile%2520email
ACCEPT-ENCODING: gzip, deflate, br
ACCEPT-LANGUAGE: en-US,en;q=0.9
COOKIE: wikidb_session=a0dj7m97o9og8vskoigrh5eh1uoke5jm; .AspNetCore.Antiforgery.X5ipDmWKkaA=CfDJ8MkgNPQ2l_9PhDLWMcDNWGxPO1BUq42yeh2LDvJk3Tq-Al2JvQUVr9_0GJrcbOo9GYmBzMYEjytaPd6q8ub-mFMVZOW4PAf59xWCkvB2hSSlyK2LDpUV8kQK0ynaIUAiXrJhebYlVDskC0G4r9e43Xk; Identity.Application.session=3e0e5ad34c3107d01ce191592611a87a; .AspNetCore.Identity.Application=CfDJ8MkgNPQ2l_9PhDLWMcDNWGzIynzdRD50QldhDG9gsK9RcmVcZVs8ItAtzzF3T__SB3O7zXpb3ej7CgVXhyF11-VDLnZd9kfI3j0fW2vncu6H7t8JhkJVMRli7tNYGcTc8bzkFQIAyuNUsWgb0IMrg5skZHzrEmvcyaaRM_thcGzGmYmZFDbiqgVqfK2ZWcm6kmP7k7hVLKplCa_akabMHUU7rRsnVCYs_NPqfOX_RpyOiRAyBmKEZblSY8q8kXnOmIosN219bg2ZMStvvUxEBwYVz4MDQlK-Kr9wv5zJcE6NP-CE99BgH8kGCuQWmDqCR64SiGldazhqu6MVTg2rO5FHqnnoA15Lr_fCJ2s0mvtnh8kkgmxWBQlfdLnI8lQSzXNZ_vQke2KgecIGMGD4qq7M2ztTBVOlQgZ3dQ52MMWrjCBslcO9ngydmoNHZ4d25p8fGu4XP-Vaah5IkXEASCRqJnY8-L9na2-mGv7PqQNeJQ4UA-6uijcPoGK8H_lPXlSImUwKHQEOUBXprzYrnBP1zSqfGRQD_jXGL5sCmTqfW6dPrl19vYu5C-sdVG7hhyO6vPtTvV-hbJSKuyTPTUUxxN0ErJGjMbRdCPr_kEZ7Py9o10OpF17xkjSV8Acar1Wk1IxSTC7OvlikFsPpt40NAlETGukGOsZOA2AE905G_YJoqmCR-_5LPdJeHe2AY5tngEr_g2l303UmqyqBoWBN2dylrVmC5LPU_n08xNep04rtBfK7PlXUgMJON4HL1GDofbw-9i_rnIwEjL4go1CWABbm50G8mJhHeTNszrju7fzRl7GuSAxUnCDhaEkcWOgp5tr4_GIQFo-5AQYqzmq44JPspcs9ySoVszbOEKx3
-
[caches] cluster: EmptyBagOStuff, WAN: mediawiki-main-default, stash: db-replicated, message: SqlBagOStuff, parser: SqlBagOStuff, session: SqlBagOStuff
-
[caches] LocalisationCache: using store LCStoreDB
-
[session] Session "a0dj7m97o9og8vskoigrh5eh1uoke5jm" requested without UserID cookie
-
[DBReplication] Wikimedia\Rdbms\LBFactory::getChronologyProtector: using request info {
"IPAddress": "::1",
"UserAgent": "Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/62.0.3202.94 Safari\/537.36",
"ChronologyProtection": false
}
-
[DBConnection] Wikimedia\Rdbms\LoadBalancer::openConnection: calling initLB() before first connection.
-
[DBConnection] Connected to database 0 at 'localhost'.
-
[SQLBagOStuff] Connection 158 will be used for SqlBagOStuff
-
[DBConnection] Wikimedia\Rdbms\LoadBalancer::openConnection: calling initLB() before first connection.
-
[DBConnection] Connected to database 0 at 'localhost'.
-
[CryptRand] 0 bytes of randomness leftover in the buffer.
-
[session] SessionBackend "a0dj7m97o9og8vskoigrh5eh1uoke5jm" data dirty due to dirty(): AuthManagerSpecialPage->handleReturnBeforeExecute/MediaWiki\Auth\AuthManager->removeAuthenticationSessionData/MediaWiki\Session\Session->setSecret/MediaWiki\Session\Session->set/MediaWiki\Session\SessionBackend->dirty
-
[session] SessionBackend "a0dj7m97o9og8vskoigrh5eh1uoke5jm" save: dataDirty=1 metaDirty=0 forcePersist=0
-
[DBPerformance] Expectation (writes <= 0) by MediaWiki::main not met:
query-m: REPLACE INTO `objectcache` (keyname,value,exptime) VALUES ('X')
#0 C:\xampp\htdocs\testWiki\includes\libs\rdbms\TransactionProfiler.php(218): Wikimedia\Rdbms\TransactionProfiler->reportExpectationViolated('writes', 'query-m: REPLAC...')
#1 C:\xampp\htdocs\testWiki\includes\libs\rdbms\database\Database.php(979): Wikimedia\Rdbms\TransactionProfiler->recordQueryCompletion('query-m: REPLAC...', 1510902816.6094, true, 2)
#2 C:\xampp\htdocs\testWiki\includes\libs\rdbms\database\Database.php(891): Wikimedia\Rdbms\Database->doProfiledQuery('REPLACE INTO `o...', 'REPLACE /* SqlB...', true, 'SqlBagOStuff::s...')
#3 C:\xampp\htdocs\testWiki\includes\libs\rdbms\database\Database.php(2173): Wikimedia\Rdbms\Database->query('REPLACE INTO `o...', 'SqlBagOStuff::s...')
#4 C:\xampp\htdocs\testWiki\includes\libs\rdbms\database\DatabaseMysqlBase.php(494): Wikimedia\Rdbms\Database->nativeReplace('`objectcache`', Array, 'SqlBagOStuff::s...')
#5 C:\xampp\htdocs\testWiki\includes\objectcache\SqlBagOStuff.php(372): Wikimedia\Rdbms\DatabaseMysqlBase->replace('objectcache', Array, Array, 'SqlBagOStuff::s...')
#6 C:\xampp\htdocs\testWiki\includes\objectcache\SqlBagOStuff.php(387): SqlBagOStuff->setMulti(Array, 1510906416)
#7 C:\xampp\htdocs\testWiki\includes\libs\objectcache\CachedBagOStuff.php(65): SqlBagOStuff->set('wikidb:MWSessio...', Array, 1510906416, 1)
#8 C:\xampp\htdocs\testWiki\includes\session\SessionBackend.php(738): CachedBagOStuff->set('wikidb:MWSessio...', Array, 1510906416, 1)
#9 C:\xampp\htdocs\testWiki\includes\session\SessionBackend.php(607): MediaWiki\Session\SessionBackend->save()
#10 C:\xampp\htdocs\testWiki\includes\session\SessionBackend.php(581): MediaWiki\Session\SessionBackend->autosave()
#11 C:\xampp\htdocs\testWiki\includes\session\SessionBackend.php(293): MediaWiki\Session\SessionBackend->renew()
#12 C:\xampp\htdocs\testWiki\includes\session\Session.php(127): MediaWiki\Session\SessionBackend->persist()
#13 C:\xampp\htdocs\testWiki\includes\specialpage\LoginSignupSpecialPage.php(220): MediaWiki\Session\Session->persist()
#14 C:\xampp\htdocs\testWiki\includes\specialpage\SpecialPage.php(522): LoginSignupSpecialPage->execute(NULL)
#15 C:\xampp\htdocs\testWiki\includes\specialpage\SpecialPageFactory.php(578): SpecialPage->run(NULL)
#16 C:\xampp\htdocs\testWiki\includes\MediaWiki.php(287): SpecialPageFactory::executePath(Object(Title), Object(RequestContext))
#17 C:\xampp\htdocs\testWiki\includes\MediaWiki.php(862): MediaWiki->performRequest()
#18 C:\xampp\htdocs\testWiki\includes\MediaWiki.php(523): MediaWiki->main()
#19 C:\xampp\htdocs\testWiki\index.php(43): MediaWiki->run()
#20 {main}
-
[MessageCache] MessageCache::load: Loading en... local cache is empty, global cache is expired/volatile, loading from database
-
Unstubbing $wgParser on call of $wgParser::firstCallInit from MessageCache->transform
-
Parser: using preprocessor: Preprocessor_DOM
-
Unstubbing $wgLang on call of $wgLang::_unstub from ParserOptions->__construct
-
QuickTemplate::__construct was called with no Config instance passed to it
-
[CryptRand] 0 bytes of randomness leftover in the buffer.
-
[session] SessionBackend "a0dj7m97o9og8vskoigrh5eh1uoke5jm" data dirty due to dirty(): PluggableAuthContinueAuthenticationRequest->loadFromSubmission/MediaWiki\Auth\AuthManager->removeAuthenticationSessionData/MediaWiki\Session\Session->setSecret/MediaWiki\Session\Session->set/MediaWiki\Session\SessionBackend->dirty
-
[session] SessionBackend "a0dj7m97o9og8vskoigrh5eh1uoke5jm" save: dataDirty=1 metaDirty=0 forcePersist=0
-
[authentication] Primary login with PluggableAuthPrimaryAuthenticationProvider succeeded
-
[authentication] Auto-creating Kunal@fieldassist.in on login
-
User::getBlockedStatus: checking...
-
[authentication] MediaWiki\Auth\AuthManager::autoCreateUser: creating new user (Kunal@fieldassist.in) - from: /testWiki/index.php/Special:UserLogin
-
[CryptRand] 0 bytes of randomness leftover in the buffer.
-
User: loading options for user 16 from database.
-
[CryptRand] 0 bytes of randomness leftover in the buffer.
-
[CryptRand] 0 bytes of randomness leftover in the buffer.
-
[session] SessionBackend "a0dj7m97o9og8vskoigrh5eh1uoke5jm" data dirty due to dirty(): PluggableAuthPrimaryAuthenticationProvider->updateUserRealNameAndEmail/MediaWiki\Auth\AuthManager->removeAuthenticationSessionData/MediaWiki\Session\Session->setSecret/MediaWiki\Session\Session->set/MediaWiki\Session\SessionBackend->dirty
-
[session] SessionBackend "a0dj7m97o9og8vskoigrh5eh1uoke5jm" save: dataDirty=1 metaDirty=0 forcePersist=0
-
[CryptRand] 0 bytes of randomness leftover in the buffer.
-
[session] SessionBackend "a0dj7m97o9og8vskoigrh5eh1uoke5jm" data dirty due to dirty(): PluggableAuthPrimaryAuthenticationProvider->updateUserRealNameAndEmail/MediaWiki\Auth\AuthManager->removeAuthenticationSessionData/MediaWiki\Session\Session->setSecret/MediaWiki\Session\Session->set/MediaWiki\Session\SessionBackend->dirty
-
[session] SessionBackend "a0dj7m97o9og8vskoigrh5eh1uoke5jm" save: dataDirty=1 metaDirty=0 forcePersist=0
-
User does not have editmyprivateinfo right or has just been created.
-
[DBQuery] User::saveSettings localhost 1062 Duplicate entry 'kunal@fieldassist.in' for key 'user_name' (localhost) UPDATE `user` SET user_name = 'kunal@fieldassist.in',user_real_name = 'kunal@fieldassist.in',user_email = 'kunal@fieldassist.in',user_email_authenticated = NULL,user_touched = '20171117071343',user_token = 'a8c7661d7802d86571b8d7d491068bbf',user_email_token = '',user_email_token_expires = NULL WHERE user_id = '16' AND user_touched = '20171117071342'
-
[DBQuery] SQL ERROR: Duplicate entry 'kunal@fieldassist.in' for key 'user_name' (localhost)
-
[session] SessionBackend "a0dj7m97o9og8vskoigrh5eh1uoke5jm" data dirty due to dirty(): AuthManagerSpecialPage->handleFormSubmit/AuthManagerSpecialPage->performAuthenticationStep/MediaWiki\Auth\AuthManager->continueAuthentication/MediaWiki\Session\Session->remove/MediaWiki\Session\SessionBackend->dirty
-
[exception] [48be48f30122c3a6feba9619] /testWiki/index.php/Special:UserLogin Wikimedia\Rdbms\DBQueryError from line 1075 of C:\xampp\htdocs\testWiki\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: UPDATE `user` SET user_name = 'kunal@fieldassist.in',user_real_name = 'kunal@fieldassist.in',user_email = 'kunal@fieldassist.in',user_email_authenticated = NULL,user_touched = '20171117071343',user_token = 'a8c7661d7802d86571b8d7d491068bbf',user_email_token = '',user_email_token_expires = NULL WHERE user_id = '16' AND user_touched = '20171117071342'
Function: User::saveSettings
Error: 1062 Duplicate entry 'kunal@fieldassist.in' for key 'user_name' (localhost)
-
[session] SessionBackend "a0dj7m97o9og8vskoigrh5eh1uoke5jm" save: dataDirty=1 metaDirty=0 forcePersist=0
below is local setting
<?php
# This file was automatically generated by the MediaWiki 1.29.1
# installer. If you make manual changes, please keep track in case you
# need to recreate them later.
#
# See includes/DefaultSettings.php for all configurable settings
# and their default values, but don't forget to make changes in _this_
# file, not there.
#
# Further documentation for configuration settings may be found at:
# https://www.mediawiki.org/wiki/Manual:Configuration_settings
# Protect against web entry
if ( !defined( 'MEDIAWIKI' ) ) {
exit;
}
## Uncomment this to disable output compression
# $wgDisableOutputCompression = true;
$wgSitename = "MyWiki";
## The URL base path to the directory containing the wiki;
## defaults for all runtime URL paths are based off of this.
## For more information on customizing the URLs
## (like /w/index.php/Page_title to /wiki/Page_title) please see:
## https://www.mediawiki.org/wiki/Manual:Short_URL
$wgScriptPath = "/testWiki";
## The protocol and server name to use in fully-qualified URLs
$wgServer = "http://localhost";
## The URL path to static resources (images, scripts, etc.)
$wgResourceBasePath = $wgScriptPath;
## The URL path to the logo. Make sure you change this from the default,
## or else you'll overwrite your logo when you upgrade!
$wgLogo = "$wgResourceBasePath/resources/assets/wiki.png";
## UPO means: this is also a user preference option
$wgEnableEmail = true;
$wgEnableUserEmail = true; # UPO
$wgEmergencyContact = "apache@localhost";
$wgPasswordSender = "apache@localhost";
$wgEnotifUserTalk = false; # UPO
$wgEnotifWatchlist = false; # UPO
$wgEmailAuthentication = true;
## Database settings
$wgDBtype = "mysql";
$wgDBserver = "localhost";
$wgDBname = "wikidb";
$wgDBuser = "wikiuser";
$wgDBpassword = "wikiuser";
# MySQL specific settings
$wgDBprefix = "";
# MySQL table options to use during installation or update
$wgDBTableOptions = "ENGINE=InnoDB, DEFAULT CHARSET=binary";
# Experimental charset support for MySQL 5.0.
$wgDBmysql5 = false;
## Shared memory settings
$wgMainCacheType = CACHE_NONE;
$wgMemCachedServers = [];
## To enable image uploads, make sure the 'images' directory
## is writable, then set this to true:
$wgEnableUploads = false;
#$wgUseImageMagick = true;
#$wgImageMagickConvertCommand = "/usr/bin/convert";
# InstantCommons allows wiki to use images from https://commons.wikimedia.org
$wgUseInstantCommons = false;
# Periodically send a pingback to https://www.mediawiki.org/ with basic data
# about this MediaWiki instance. The Wikimedia Foundation shares this data
# with MediaWiki developers to help guide future development efforts.
$wgPingback = true;
## If you use ImageMagick (or any other shell command) on a
## Linux server, this will need to be set to the name of an
## available UTF-8 locale
$wgShellLocale = "en_US.utf8";
## Set $wgCacheDirectory to a writable directory on the web server
## to make your wiki go slightly faster. The directory should not
## be publically accessible from the web.
#$wgCacheDirectory = "$IP/cache";
# Site language code, should be one of the list in ./languages/data/Names.php
$wgLanguageCode = "en";
$wgSecretKey = "21f55efcdf8b031dc5ddc799843598ee6288da2da75eb82a3859b127d47a397f";
# Changing this will log out all existing sessions.
$wgAuthenticationTokenVersion = "1";
# Site upgrade key. Must be set to a string (default provided) to turn on the
# web installer while LocalSettings.php is in place
$wgUpgradeKey = "de834f7db78a13d6";
## For attaching licensing metadata to pages, and displaying an
## appropriate copyright notice / icon. GNU Free Documentation
## License and Creative Commons licenses are supported so far.
$wgRightsPage = ""; # Set to the title of a wiki page that describes your license/copyright
$wgRightsUrl = "";
$wgRightsText = "";
$wgRightsIcon = "";
$wgInvalidUsernameCharacters = "%:";
$wgUserrightsInterwikiDelimiter = "%";
# Path to the GNU diff3 utility. Used for conflict resolution.
$wgDiff3 = "";
$wgGroupPermissions['*']['createaccount'] = true;
$wgGroupPermissions['*']['edit'] = false;
$wgGroupPermissions['*']['read'] = false;
$wgGroupPermissions['*']['autocreateaccount'] = true;
## Default skin: you can change the default skin. Use the internal symbolic
## names, ie 'vector', 'monobook':
$wgDefaultSkin = "vector";
# Enabled skins.
# The following skins were automatically enabled:
wfLoadSkin( 'CologneBlue' );
wfLoadSkin( 'Modern' );
wfLoadSkin( 'MonoBook' );
wfLoadSkin( 'Vector' );
# End of automatically generated settings.
# Add more configuration options below.
# End of automatically generated settings.
# Add more configuration options below.
wfLoadExtension( 'PluggableAuth' );
$wgPluggableAuth_EnableAutoLogin = false;
$wgPluggableAuth_EnableLocalLogin = false;
$wgPluggableAuth_Class = "OpenIDConnect";
wfLoadExtension( 'OpenIDConnect' );
$wgOpenIDConnect_Config['http://localhost:5000'] = [
'clientID' => 'wiki',
'clientsecret' => 'wikisecret',
'scope' => [ 'openid', 'profile', 'email' ]
];
$wgOpenIDConnect_UseEmailNameAsUserName = true;
$wgOpenIDConnect_UseRealNameAsUserName = false;
error_reporting( -1 );
ini_set( 'display_errors', 1 );
$wgShowExceptionDetails = true;
$wgDebugToolbar = true;
$wgShowDebug = true;
$wgDevelopmentWarnings = true;
Please help me in solving this.