Не могу создать страницу на MediaWiki.Php

Кемеровские программисты php общаются здесь
Anonymous
Не могу создать страницу на MediaWiki.

Сообщение Anonymous »

Когда я отправляю новую страницу, я всегда получаю эту ошибку:
Изображение
< /p>

Извините! Нам не удалось обработать ваше изменение из-за потери данных сеанса.
Возможно, вы вышли из системы. Пожалуйста, убедитесь, что вы все еще вошли
в систему, и повторите попытку. Если это по-прежнему не помогает, попробуйте выйти из системы и
зайти снова и убедиться, что ваш браузер разрешает использование файлов cookie с этого
сайта.

Я вошел в свою медиавики через поставщика сеансов AuthWP, поэтому я вошел в систему как пользователь Wordpress.
Я установил медиавики в подпапку /wiki моей установки WP, а также у меня есть расширение AccessControl. .
Мое имя пользователя всегда отображается в правом верхнем углу, даже если я перемещаюсь по медиавики сразу после получения этой ошибки. Похоже, мой сеанс все еще активен.
Можете ли вы помочь мне устранить эту неполадку? Дайте мне знать, если мне нужно добавить несколько var_dumps в код, чтобы вы могли его проверить, или предоставить файл журнала отладки.
Вот мой LocalSettings.php
# This file was automatically generated by the MediaWiki 1.41.1
# installer. If you make manual changes, please keep track in case you
# need to recreate them later.
#
# See includes/MainConfigSchema.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:C ... n_settings

# Protect against web entry
if ( !defined( 'MEDIAWIKI' ) ) {
exit;
}

## Uncomment this to disable output compression
# $wgDisableOutputCompression = true;

$wgSitename = "GR Wiki";
$wgMetaNamespace = "GR_Wiki";

## 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 = "/wiki";
$wgArticlePath = "/wiki/$1";
$wgUsePathInfo = true;
$wgScriptExtension = ".php";

$wgShowExceptionDetails = true;
$wgShowSQLErrors = true;
$wgDebugDumpSql = true;
$wgDebugLogFile = __DIR__ . "/debug_log";
// Define a log group
$wgDebugLogGroups = [
'exception' => [
'class' => 'FileLog',
'logfile' => __DIR__ . '/debug_log', // Ensure this matches $wgDebugLogFile
'format' => '{date} {time} {level} {message}',
'dateFormat' => 'Y-m-d',
'timeFormat' => 'H:i:s',
],
'runJobs' => [
'class' => 'FileLog',
'logfile' => __DIR__ . '/debug_log', // Ensure this matches $wgDebugLogFile
'format' => '{date} {time} {level} {message}',
'dateFormat' => 'Y-m-d',
'timeFormat' => 'H:i:s',
],
'resourceloader' => [
'class' => 'FileLog',
'logfile' => __DIR__ . '/debug_log', // Ensure this matches $wgDebugLogFile
'format' => '{date} {time} {level} {message}',
'dateFormat' => 'Y-m-d',
'timeFormat' => 'H:i:s',
],
'authentication' => [
'class' => 'FileLog',
'logfile' => __DIR__ . '/debug_log', // Ensure this matches $wgDebugLogFile
'format' => '{date} {time} {level} {message}',
'dateFormat' => 'Y-m-d',
'timeFormat' => 'H:i:s',
],
'error' => [
'class' => 'FileLog',
'logfile' => __DIR__ . '/debug_log', // Ensure this matches $wgDebugLogFile
'format' => '{date} {time} {level} {message}',
'dateFormat' => 'Y-m-d',
'timeFormat' => 'H:i:s',
],
];

## The protocol and server name to use in fully-qualified URLs
$domain = "";
$wgServer = "https://$domain";

## The URL path to static resources (images, scripts, etc.)
$wgResourceBasePath = $wgScriptPath;

## The URL paths to the logo. Make sure you change this from the default,
## or else you'll overwrite your logo when you upgrade!
$wgLogos = [
'1x' => "",
'icon' => "",
];

## UPO means: this is also a user preference option

$wgEnableEmail = true;
$wgEnableUserEmail = true; # UPO

$wgEmergencyContact = "";
$wgPasswordSender = "";

$wgEnotifUserTalk = false; # UPO
$wgEnotifWatchlist = false; # UPO
$wgEmailAuthentication = true;

## mediawiki Database settings
$wgDBtype = "mysql";
$wgDBserver = "localhost";
$wgDBname = "";
$wgDBuser = "";
$wgDBpassword = "";

# MySQL specific settings
$wgDBprefix = "mw_";
$wgDBssl = false;

# MySQL table options to use during installation or update
$wgDBTableOptions = "ENGINE=InnoDB, DEFAULT CHARSET=binary";

# Shared database table
# This has no effect unless $wgSharedDB is also set.
$wgSharedTables[] = "actor";

## Shared memory settings
$wgMainCacheType = CACHE_NONE;
$wgMemCachedServers = [];

## To enable image uploads, make sure the 'images' directory
## is writable, then set this to true:
$wgEnableUploads = true;
#$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;

# Site language code, should be one of the list in ./includes/languages/data/Names.php
$wgLanguageCode = "en";

# Time zone
$wgLocaltimezone = "Asia/Jerusalem";

## Set $wgCacheDirectory to a writable directory on the web server
## to make your wiki go slightly faster. The directory should not
## be publicly accessible from the web.
#$wgCacheDirectory = "$IP/cache";

$wgSecretKey = "";

# 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 = "";

## 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 = "";

# Path to the GNU diff3 utility. Used for conflict resolution.
$wgDiff3 = "/usr/bin/diff3";

## Default skin: you can change the default skin. Use the internal symbolic
## names, e.g. 'vector' or 'monobook':
$wgDefaultSkin = 'monobook';

# Enabled skins.
# The following skins were automatically enabled:
wfLoadSkin( 'MinervaNeue' );
wfLoadSkin( 'MonoBook' );
wfLoadSkin( 'Timeless' );

#wfLoadExtension ( 'VisualEditor' );
# End of automatically generated settings.
# Add more configuration options below.

$wgTmpDirectory = "";

$wgGroupPermissions['*']['read'] = true;
$wgGroupPermissions['*']['createaccount'] = false;
$wgGroupPermissions['*']['edit'] = false;
$wgGroupPermissions['*']['writeapi'] = false;
$wgGroupPermissions['*']['createpage'] = false;
$wgGroupPermissions['*']['createtalk'] = false;
# Grant permissions to logged-in users
$wgGroupPermissions['user']['read'] = true;
$wgGroupPermissions['user']['edit'] = true;
$wgGroupPermissions['user']['createpage'] = true;
$wgGroupPermissions['user']['createtalk'] = true;
$wgGroupPermissions['user']['writeapi'] = true;

# Grant additional permissions if needed
$wgGroupPermissions['user']['upload'] = true;
$wgGroupPermissions['user']['move'] = true;
$wgGroupPermissions['user']['delete'] = true;

wfLoadExtension( 'AccessControl' );

$wgCookieDomain = ".$domain"; // Leave empty for root domain
$wgCookiePath = '/wiki';
$wgSessionCacheType = CACHE_DB;
$wgSessionHandler = 'db';
$wgUseCookieDomainForLogin = true;

wfLoadExtension( 'AuthWP' );

require_once( __DIR__ . '/../wp-config.php' );
$wgAuthWPSettings = [
'wordpress_db_host' => DB_HOST, // The host of the WordPress database
'wordpress_db_name' => DB_NAME, // The name of the WordPress database
'wordpress_db_user' => DB_USER, // The username for the WordPress database
'wordpress_db_password' => DB_PASSWORD, // The password for the WordPress database
'wordpress_table_prefix' => 'wp_', // The table prefix used in the WordPress database
'wordpress_authentication' => true, // Enable authentication against the WordPress database
'wordpress_registration' => false, // Disable registration from MediaWiki (handled by WordPress)
'wordpress_auto_create' => true
];

Я также удалил своего пользователя Wordpress, из которого с помощью AuthWP был создан сеанс mediawiki, на случай, если это актуально. Вот куда я поместил инструкцию по дампу:
Изображение

А вот дамп:
WP_User Object
(
[data] => stdClass Object
(...

...),
...,
[caps] => Array
(
[webdev_admin] => 1
[translator] => 1
)

[cap_key] => wp_capabilities
[roles] => Array
(
[0] => webdev_admin
[1] => translator
)

[allcaps] => Array
(
[edit_posts] => 1
[edit_others_posts] => 1
[edit_published_posts] => 1
[edit_private_posts] => 1
[edit_pages] => 1
[edit_others_pages] => 1
[publish_pages] => 1
[edit_published_pages] => 1
[edit_private_pages] => 1
[upload_files] => 1
[activate_plugins] => 1
[edit_files] => 1
[edit_plugins] => 1
[install_plugins] => 1
[manage_options] => 1
[read] => 1
[unfiltered_html] => 1
[loco_admin] => 1
[level_0] => 1
[manage_pys] => 1
[delete_themes] => 1
[edit_theme_options] => 1
[edit_themes] => 1
[install_themes] => 1
[switch_themes] => 1
[update_themes] => 1
[webdev_admin] => 1
[translator] => 1
)

[filter] =>
[site_id:WP_User:private] => 1

Также я сбросил информацию о пользователе:
[img]https://i.sstatic .net/0bJhvxlC.png[/img]

MediaWiki\Session\UserInfo Object
(
[verified:MediaWiki\Session\UserInfo:private] => 1
[user:MediaWiki\Session\UserInfo:private] => MediaWiki\User\User Object
(
[mId] => 4
[mName] =>
[mActorId] => 4
[mRealName] =>
[mEmail] =>
[mTouched] => 20240516152718
[mQuickTouched:protected] =>
[mToken:protected] =>
[mEmailAuthenticated] =>
[mEmailToken:protected] =>
[mEmailTokenExpires:protected] =>
[mRegistration:protected] => 20240516152716
[mLoadedItems:protected] => 1
[mFrom] => id
[mDatePreference:protected] =>
[mBlockedby:MediaWiki\User\User:private] => -1
[mHash:protected] =>
[mBlockreason:protected] =>
[mGlobalBlock:protected] =>
[mLocked:protected] =>
[mHideName:MediaWiki\User\User:private] =>
[mRequest:MediaWiki\User\User:private] =>
[mBlock:MediaWiki\User\User:private] =>
[mBlockedFromCreateAccount:MediaWiki\User\User:private] =>
[queryFlagsUsed:protected] => 1
[mThisAsAuthority:MediaWiki\User\User:private] =>
[isTemp:MediaWiki\User\User:private] =>
)

)
, forceUse=1, persisted=, id:


Подробнее здесь: https://stackoverflow.com/questions/785 ... -mediawiki

Вернуться в «Php»