Extension talk:AccessControl/2022
This page used the Structured Discussions extension to give structured discussions. It has since been converted to wikitext, so the content and history here are only an approximation of what was actually displayed at the time these comments were made. |
57 previous topics.
![]() Archives
|
---|
|
Previous discussion was archived at Extension talk:AccessControl/Archive 1 on 24 October 2016.
Internal error when saving page with macro
Running mw 1.37 with AccessControl causing trouble when saving pages with templates or transclusions (maybe related to 'Cannot access Special: namespace with AccessControl enabled')
When saving pages with templates or when transcluding pages the result is a blocked page (see stacktrace):
[0882890903e78d1467b35638] /index.php/Test InvalidArgumentException: The given PageIdentity does not represent a proper page
Backtrace:
from /var/www/html/includes/page/WikiPageFactory.php(60)
#0 /var/www/html/includes/page/WikiPage.php(201): MediaWiki\Page\WikiPageFactory->newFromTitle(Title)
#1 /var/www/html/extensions/AccessControl/AccessControl.hooks.php(946): WikiPage::factory(Title)
#2 /var/www/html/extensions/AccessControl/AccessControl.hooks.php(408): AccessControlHooks::getContentPage(integer, string)
#3 /var/www/html/extensions/AccessControl/AccessControl.hooks.php(281): AccessControlHooks::allRightTags(string)
#4 /var/www/html/includes/HookContainer/HookContainer.php(338): AccessControlHooks::onuserCan(Title, User, string, string)
#5 /var/www/html/includes/HookContainer/HookContainer.php(137): MediaWiki\HookContainer\HookContainer->callLegacyHook(string, array, array, array)
#6 /var/www/html/includes/HookContainer/HookRunner.php(4067): MediaWiki\HookContainer\HookContainer->run(string, array)
#7 /var/www/html/includes/Permissions/PermissionManager.php(504): MediaWiki\HookContainer\HookRunner->onUserCan(Title, User, string, string)
#8 /var/www/html/includes/Permissions/PermissionManager.php(464): MediaWiki\Permissions\PermissionManager->checkPermissionHooks(string, User, array, string, boolean, Title)
#9 /var/www/html/includes/Permissions/PermissionManager.php(311): MediaWiki\Permissions\PermissionManager->getPermissionErrorsInternal(string, User, Title, string)
#10 /var/www/html/includes/Permissions/UserAuthority.php(259): MediaWiki\Permissions\PermissionManager->getPermissionErrors(string, User, Title, string)
#11 /var/www/html/includes/Permissions/UserAuthority.php(205): MediaWiki\Permissions\UserAuthority->internalCan(string, string, Title, MediaWiki\Permissions\PermissionStatus)
#12 /var/www/html/includes/user/User.php(4319): MediaWiki\Permissions\UserAuthority->authorizeRead(string, Title, MediaWiki\Permissions\PermissionStatus)
#13 /var/www/html/includes/MediaWiki.php(225): User->authorizeRead(string, Title, MediaWiki\Permissions\PermissionStatus)
#14 /var/www/html/includes/MediaWiki.php(925): MediaWiki->performRequest()
#15 /var/www/html/includes/MediaWiki.php(559): MediaWiki->main()
#16 /var/www/html/index.php(53): MediaWiki->run()
#17 /var/www/html/index.php(46): wfIndexMain()
#18 {main}
Here is the template Code which I am using:
91.8.107.112 (talk) 19:38, 5 January 2022 (UTC)
- I don't know configuration your wiki. You may try use as accesslist incorrect page. Accesslist by old syntax use semicolon in title of page, and part before can't be same as the namespace name. – Want (talk) 09:16, 6 January 2022 (UTC)
- Hello,
- unfortunately I am not quite sure what 'accesslist' means.
- Here is the configuration of the wiki:
- Product Version
- MediaWiki: 1.37.0-rc.2
- PHP: 8.0.13 (apache2handler)
- MariaDB: 10.6.5-MariaDB-1:10.6.5+maria~focal
- ICU: 67.1
- LuaSandbox: 4.0.2
- Lua: 5.1.5
- Pygments: 2.10.0
- Entry point URL
- Article path: /index.php/$1
- Script path: /
- index.php: /index.php
- api.php: /api.php
- rest.php: /rest.php 91.8.107.112 (talk) 12:23, 6 January 2022 (UTC)
- Extension Version Licence Description Authors
- AccessControl 4.1 (045d4fe) 16:22, 13 May 2021 GPL-2.0-or-later Enables group access restriction on a page by user basis Aleš Kapica 91.8.107.112 (talk) 13:02, 6 January 2022 (UTC)
- Yes. It's version of my provenience. Unfortunately for you is, when I don't use last, but actually stable version of MediaWiki 1.35
- But it not main problem. Your error is on every template page? Accesscontrol check only pages (templates) what use any strings of rights. What is in code edited page? Your error message is: Cannot access Special: namespace with AccessControl enabled. It signalize invalid accesslist. Accesslist is wiki page, where is set allowed user for editation. If is not set, may be is problem. Goto manual on my pages. Is not english, by you can use google translator.
- – Want (talk) 13:17, 6 January 2022 (UTC)
- Thank you for your answer.
- When transcluding from the User-Namespace { { User:SomeUser }} it is possible to save a page without problems.
- When transcluding from the Main-Namespace { {:SomeSiteFromMainNamespace}} saving of the page results in an error.
- Not all templates lead to errors but this one does:
- [ [Media:{ { {1}}}|{ {#if: { { {2|XLS-File}}} | { { {2|{ { {1}}}}}} | { { {1}}} }}]]
- Preview is always possible but after saving the site becomes corrupted. 91.8.107.112 (talk) 16:55, 6 January 2022 (UTC)
- Yes.
- It is protection before cycle. And not all transclusions can be realized. MediaWiki has limit as protect before cycle of transclude pages. But after saving, and it may be corrupt wiki, if is code any error. For it
- AccessControl do control before and deny save invalid code. Because this error in template can do fail for all pages wiki, where is included! Want (talk) 17:16, 6 January 2022 (UTC)
- One final question:
- Currently my Access Control Group resides in a custom namespace.
- It is not obvious to me whether this is appropriate for the current version or does it has to be moved to the main Namespace? 91.8.107.112 (talk) 21:44, 6 January 2022 (UTC)
- AccessControl was created for normal users. For it use main namespace. However, there were wiki where admins wanted to be able to use a dedicated namespace. They put their changes in the main branch. Therefore, the form-support branch was created. Want (talk) 22:00, 6 January 2022 (UTC)
- I found a solution how to use transclusion and templates without error.
- When using
- { {
- :AnArbritaryPage
- } }
- instead of
- { { :AnArbitrarypage } }
- anything works as expected. The same counts for using templates when distributing them over several lines. 91.8.107.112 (talk) 22:40, 7 January 2022 (UTC)
- Hm. Interesting. Parsing wikitext during transclusion is handled by the mediawiki core. I can't control that. But thanks you for the workaround. – Want (talk) 12:59, 12 January 2022 (UTC)
Search screen bug
Hi, when I use $wgAccessControlRedirect = false the search list occupies 100% of the width, pushing the side menu to the bottom of the page. Is there any way around this behavior? 167.249.92.142 (talk) 16:45, 25 November 2022 (UTC)
Is there a way to block access to category listings?
I.e. pages listed in each category Pages in category "[category name]". This should apply to non-logged in users as for example with the disableSomeSpecialPages function. Spiros71 (talk) 14:20, 20 December 2022 (UTC)
- No. The purpose of this extension is to protect access to the content of the page. Not to the page itself. Want (talk) 15:31, 23 December 2022 (UTC)
- Thanks, how can one protect access to the content of the category listings pages? Spiros71 (talk) 11:55, 24 December 2022 (UTC)
- It's simple. Include any protectioned page. Want (talk) 17:13, 11 January 2023 (UTC)