Steps to replicate the issue (include links if applicable):
- Create a wish
- Delete it
- Attempt to undelete the page (i.e. Special:Undelete/Community Wishlist/W123)
What happens?:
There's no "Undelete revisions" form.
What should have happened instead?:
You should be able to undelete revisions just like any other page.
Other information (browser name/version, screenshots, etc.):
This is because of CommunityRequestsHooks::onGetUserPermissionsErrorsExpensive(). If the page is deleted, the $title->exists() check fails and we disallow the action, even for admins. The intent was to make everyone use the form to create new entities, but we accidentally also prevented admins from undeleting entities.
The easiest solution is probably to use one of the undelete hooks and set CommuntiyRequestsHooks::allowManualEditing = true.
Here is the updated version with a separate AC2 test case for non-admin users:
Derived Requirement
Ensure that administrators can undelete Community Wishlist wish pages using Special\:Undelete, consistent with standard MediaWiki behavior.
- Deleted wishlist pages must display the "Undelete revisions" form to administrators.
- Administrators must be able to restore deleted revisions of wishlist entities.
- The undelete capability must not be blocked by custom permission checks.
- Non-admin users must not gain undelete permissions.
Test Steps
Preconditions:
- A Community Wishlist wish page exists (e.g., Community_Wishlist/W123).
- The page has been deleted.
- One administrator account and one non-admin account are available.
Test Case 1: Ensure administrators can undelete wishlist entities
- Log in as an administrator.
- Navigate to Special\:Undelete/Community_Wishlist/W123.
- Observe whether the "Undelete revisions" form is displayed.
- Restore the deleted revision.
- Verify the wish page is accessible again.
- Delete the page again to reset state (if needed).
- ✅❓❌⬜ AC1: The administrator can see and use the "Undelete revisions" form to restore the page.
Test Case 2: Ensure non-admin users cannot undelete wishlist entities
- Log in as a non-admin user.
- Navigate to Special\:Undelete/Community_Wishlist/W123.
- Observe the page behavior.
- ✅❓❌⬜ AC2: The "Undelete revisions" form is not available and the non-admin user cannot restore the deleted page.
QA Results - Meta Beta
| AC | Status | Details |
|---|---|---|
| 1 | ✅ | T406668#11676067 |
| 2 | ✅ | T406668#11676067 |
| Side | ✅ | T406668#11679747 |