- ๐บ๐ฆUkraine osab Germany, Baden-Wรผrttemberg; Ukraine, Kharkiv
#12 works fine for me also, D10.1.5 php8.1. It fixed the error 'User %user not allowed to go from state %sid1 to %sid2' from workflow module, as it made migrate as anonymous.
- ๐ฌ๐งUnited Kingdom joachim
> @Wim Leers, it is on text filters/formats. Full HTML is secured to only admin users. But drush runs everything as anonymous. And my content has a very common thing called a body field and entity validation running as anonymous fails validation. It isn't an issue running from migrate_drupal_ui, as it requires you to run the upgrade as user=1.
Furthermore, with entity types that don't have an owner such as block_content, EntityContentBase::validateEntity() won't do any account switching.
- Status changed to Needs work
3 months ago 4:05pm 24 December 2024 - heddn Nicaragua
Instead of defaulting to user=1, let's make this a configurable for _which_ user we want to execute as. Similar to how drush used to work .i.e.
drush mim --uid=33 my_migration
. My logic being that user=1 is no longer always a full admin user since https://www.drupal.org/node/2910500 โ - First commit to issue fork.
- ๐ท๐ดRomania vasike Ramnicu Valcea
vasike โ changed the visibility of the branch 3134245-run-drush-imports-uid-option to hidden.
- Merge request !83Issue #3134245 by heddn: Run drush imports as provided user. โ (Open) created by vasike
- ๐ท๐ดRomania vasike Ramnicu Valcea
Created a MR with new uid option for import only using the account_switcher service.
I tested within a project doing Migrate Source CSV dependant migration imports, using ECA Models to control different entities data.
And it worked as expected.
Needs review ... for now ... to get some feedback.
Do we need also for other "commands"?Note: For ECA models "alteration" this could also achieved, but currently the option is to have the user set for all models ...
Also it seems the issue was previously for an older version, so initially I created a "bad" branch
which seems I can't delete it
https://git.drupalcode.org/issue/migrate_tools-3134245/-/tree/3134245-ru...