**Steps to replicate the issue** (include links if applicable):
* Create a wish or focus area with a vote-able status
* Add a vote, verify it is visible
* Make note of the entity page ID (can be found at i.e. `Community Wishlist/W1?action=info`)
* Verify the entity is in the `communityrequests_entities` table, ala `SELECT * FROM communityrequests_entities WHERE cr_page = :pageid`
* Delete the page
**What happens?**:
- The row is still in the `communityrequests_entities` table, and the `/Votes` subpage still exists.
- When an entity of focus area type is deleted, wishes in that focus area should nullify `cr_focus_area`
**What should have happened instead?**:
The corresponding rows in our tables should be deleted, as should the /Votes page.
**Other information** (browser name/version, screenshots, etc.):
We are supposedly deleting the data with the `PageDeleteComplete` hook – the code is [[ https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/extensions/CommunityRequests/+/5935ace8be6bc59507a210832f52fe05c26e0ce9/includes/HookHandler/CommunityRequestsHooks.php#249 | there ]] – it just doesn't appear to work. In my testing, the hook handler is not called at all. Regardless, the code does no queue a job to delete the Votes page, as it should.
In case it effects the implementation, note we also need to ensure deletion of data happens when deleting pages via Extension:Translate, which is done via job queue (`DeleteTranslatableBundleJob`).
---
**Derived Requirement**
Ensure that when a CommunityRequests entity page (wish or focus area) is deleted, all related CommunityRequests data is fully and reliably cleaned up. This includes removing corresponding database records, deleting associated `/Votes` subpages, maintaining referential integrity for related wishes, and ensuring consistent behavior regardless of whether the deletion occurs via standard page deletion or through Extension:Translate job-based deletion.
====Test Steps
**Test Case 1: Delete Wish Entity Page and Remove All Associated Data**
**Preconditions**
* A wish entity page exists with a vote-able status.
* At least one vote has been added and is visible.
* The wish has an associated `/Votes` subpage.
* A corresponding row exists in the `communityrequests_entities` table for the wish page ID.
1. Navigate to the existing wish entity page.
2. Verify that votes are visible on the wish page.
3. Confirm the wish page ID via the page information view.
4. Delete the wish entity page using standard page deletion.
5. Check whether the `/Votes` subpage still exists.
6. ✅❓❌⬜ **AC1:** Confirm that deleting a wish entity page removes its database record and deletes the associated `/Votes` subpage.
**Test Case 2: Delete Focus Area Entity and Nullify Related Wishes**
**Preconditions**
* A focus area entity page exists with a vote-able status.
* One or more wishes are associated with this focus area.
* Votes and a `/Votes` subpage exist for the focus area.
1. Navigate to the focus area entity page.
2. Verify that associated wishes reference the focus area in `cr_focus_area`.
3. Delete the focus area entity page.
4. Check whether the focus area `/Votes` subpage still exists.
5. ✅❓❌⬜ **AC2:** Confirm that deleting a focus area removes its database record and `/Votes` subpage
== QA Results - Meta Beta
| **AC** | **Status** | **Details** |
| ----- | ----- | ----- |
| 1 | ❌|T406059#11494375
| 1 | ⬜|T406059#11494375