Page MenuHomePhabricator

implicit template resolution fails with AccessControl 4.1 on MediaWiki 1.36
Open, Needs TriagePublicBUG REPORT

Description

List of steps to reproduce (step by step, including full links if applicable):

  1. Install MediaWiki 1.36 and AccessControl 4.1.
  2. Create Template:Stub.
  3. Create a page that transcludes this template but refers to it in short form as {{Stub}}.
  4. Open the page.

What happens?:

The page is completely inaccessible: to view, but also to edit or search.

InvalidArgumentException: The given PageIdentity does not represent a proper page

Backtrace:

from /app/includes/page/WikiPageFactory.php(59)
#0 /app/includes/page/WikiPage.php(211): MediaWiki\Page\WikiPageFactory->newFromTitle()
#1 /app/extensions/AccessControl/AccessControl.hooks.php(946): WikiPage::factory()
#2 /app/extensions/AccessControl/AccessControl.hooks.php(408): AccessControlHooks::getContentPage()
#3 /app/extensions/AccessControl/AccessControl.hooks.php(281): AccessControlHooks::allRightTags()
#4 /app/includes/HookContainer/HookContainer.php(338): AccessControlHooks::onuserCan()
[...]

What should have happened instead?:

If the page instead transcludes the template by its full form {{Template:Stub}}, it will be displayed correctly.

Software version (if not a Wikimedia wiki), browser information, screenshots, other information, etc:

ProductVersion
MediaWiki1.36.1
PHP7.4.22 (fpm-fcgi)
MySQL8.0.23
ICU66.1
Lua5.1.5
ExtensionVersion
AccessControl4.1

Event Timeline

Unfortunately, I have not been able to simulate your problem. In my opinion, the template page was not created correctly. What was its content? It's important. Isn't this template generated through Scribunto?