- Issue created by @quietone
- First commit to issue fork.
- Merge request !11619Resolve #3515189 "Migratecontrollertest requires root" → (Closed) created by vensires
- 🇬🇷Greece vensires
I closed the MR so that anyone willing to tackle this issue may start the process from the very beginning.
To be honest though, I did try to find the comment described in the issue summary but couldn't find it at all in the code. Maybe something is off here or was it just me? - 🇺🇸United States alison
Working on this at Mentored Contribution at Atlanta 2025
- 🇺🇸United States artis
Reviewed at DrupalCon Atlanta 2025. This looks like it's ready to go.
- 🇺🇸United States mradcliffe USA
I am a little confused. The @todo comment mentions to remove the usage of the super user, but it looks like this is still being used in the test. Does the variable also need to be removed?
For those working on this issue, can you explain why this wasn't removed too?
- 🇨🇦Canada jodavidson
@mradclffe. As I read the issue is was to remove the todo comment from the test as the test required superuser access.
- 🇺🇸United States smustgrave
So what needs to be removed is that variable. Which will break the test
What needs to happen is in the setUp() the user needs to be created with necessary permissions
You can use https://www.drupal.org/project/drupal/issues/3437620 📌 [Meta] Fix all tests that rely on UID1's super user behavior Active as good references
- 🇨🇦Canada jodavidson
Per the issue: "migrations through the UI must be run as the root user." Has that changed? Nothing in this issue mentioned changing the test. The issue was the presence of the todo, not the test itself.
I could have a go at that, but if the test __has__ to be run as superuser I think a change to another user would break the test.
- 🇺🇸United States smustgrave
Compromise lets add a small comment as to why are keeping
If you are another contributor eager to jump in, please allow the previous poster(s) at least 48 hours to respond to feedback first, so they have the opportunity to finish what they started!
- 🇳🇿New Zealand quietone
There is an existing comment in the test explaining that migrations run through the UI must must as user #1, See https://git.drupalcode.org/project/drupal/-/blob/11.x/core/modules/migra....
Migrate UI tests were also discussed in 📌 Fix Migrate Drupal UI tests that rely on UID1's super user behavior Closed: won't fix , but this one was missed.
- 🇳🇿New Zealand quietone
I didn't mean to set to RTBC.
I see the problem. When I created the issue I didn't include all that lines that are to be remove. I have updated the issue summary. Sorry about that.
- 🇮🇳India koustav_mondal Kolkata
Hello @quietone, I have the required changes. Please have a look and let me know if we require any other changes.
- 🇺🇸United States mradcliffe USA
Thanks for making the change @koustav_mondal. The MigrateControllerTest is now failing. Running that test in isolation to debug it would be the next step here to resolving.
As part of the meta issue, 📌 [Meta] Fix all tests that rely on UID1's super user behavior Active , we need to “Assign the right permissions to make the test go green without the super user access policy.”
- 🇳🇿New Zealand quietone
This test does need to run as the root user. Migration from the UI must be run as the root user..
- 🇺🇸United States mradcliffe USA
The test is failing with an access denied error accessing /admin/reports/upgrade.
Honestly, I am not sure why that report uses the MigrateAccessCheck rather than a permission as the controller does not run migrations, it redirects to watchdog with the query parameter "type" set to "migrate_drupal_ui". The only permission that is needed is "access site reports", which is not restricted to user 1.
Maybe fixing migrate_drupal_ui.log route to use that permission instead would make sense because an administrative user with "access site reports" already has access to it?