-- Originally posted by 79.104.211.130 --
I should apologize because the only reason my problem appeared resolved after I installed REL1_27 was that I had Lockdown extension commented out in LocalSettings.
So, today I tested it again and preview did not work. Namely, request to /w/api.php with this POST data:
action:parse
format:json
formatversion:2
title:<Title here>
text:<Content here>
pst:
prop:text|modules|jsconfigvars
preview:true
disableeditsection:true
uselang:ru
fails with the following response: {"error":{"code":"readapidenied","info":"You need read permission to use this module","docref":"See http://doc.ifcg.ru/w/api.php for API usage"}}
Non-default part of my LocalSettings follows:
Extended content |
---|
$wgGroupPermissions['*']['createaccount'] = false; $wgGroupPermissions['*']['edit'] = false; $wgGroupPermissions['*']['read'] = false; # Enabled Extensions. Most extensions are enabled by including the base extension file here # but check specific extension documentation for more details # The following extensions were automatically enabled: wfLoadExtension( "Cite" ); wfLoadExtension( "Interwiki" ); wfLoadExtension( "SyntaxHighlight_GeSHi" ); wfLoadExtension( "WikiEditor" ); wfLoadExtension( "ParserFunctions" ); require_once( "$IP/extensions/Lockdown/Lockdown.php" ); require_once( "$IP/extensions/Scribunto/Scribunto.php" ); $wgScribuntoDefaultEngine = 'luasandbox'; # File upload $wgFileExtensions[] = 'docx'; $wgFileExtensions[] = 'doc'; $wgFileExtensions[] = 'xlsx'; $wgFileExtensions[] = 'xls'; $wgFileExtensions[] = 'pptx'; $wgFileExtensions[] = 'ppt'; $wgFileExtensions[] = 'pdf'; $wgFileExtensions[] = 'mpp'; $wgFileExtensions[] = 'odt'; $wgFileExtensions[] = 'ods'; $wgFileExtensions[] = 'odg'; $wgFileExtensions[] = 'odp'; $wgFileExtensions[] = 'djvu'; $wgFileExtensions[] = 'svg'; # Hide Powered icon $wgFooterIcons = ['copyright' => ['copyright' => false]]; # Hide About/Privacy etc footer links $wgHooks['SkinTemplateOutputPageBeforeExec'][] = 'hookFooterLinks'; function hookFooterLinks( $sk, &$tpl ) { $tpl->data['footerlinks']['places'] = array(); return true; } ## WikiEditor # Enables use of WikiEditor by default but still allows users to disable it in preferences $wgDefaultUserOptions['usebetatoolbar'] = 1; # Enables link and table wizards by default but still allows users to disable them in preferences $wgDefaultUserOptions['usebetatoolbar-cgd'] = 1; # Displays the Preview and Changes tabs $wgDefaultUserOptions['wikieditor-preview'] = 1; # Displays the Publish and Cancel buttons on the top right side $wgDefaultUserOptions['wikieditor-publish'] = 1; define("NS_RD", 3000); define("NS_RD_TALK", 3001); define("NS_TO", 3002); define("NS_TO_TALK", 3003); define("NS_CERT", 3004); define("NS_CERT_TALK", 3005); $wgExtraNamespaces[NS_RD] = "РД"; $wgExtraNamespaces[NS_RD_TALK] = "РД_Обсуждение"; $wgExtraNamespaces[NS_TO] = "ТО"; $wgExtraNamespaces[NS_TO_TALK] = "ТО_Обсуждение"; $wgExtraNamespaces[NS_CERT] = "С"; $wgExtraNamespaces[NS_CERT_TALK] = "С_Обсуждение"; $wgGroupPermissions['rd']['edit'] = true; $wgGroupPermissions['to']['edit'] = true; $wgGroupPermissions['cert']['edit'] = true; $wgNamespacePermissionLockdown[NS_RD]['edit'] = array('sysop', 'rd'); $wgNamespacePermissionLockdown[NS_TO]['edit'] = array('sysop', 'to'); $wgNamespacePermissionLockdown[NS_CERT]['edit'] = array('sysop', 'cert'); |
Hope this will help.