Closed ajalovec closed 6 years ago
We are experiencing a similar issue while running the following simple migration:
-
mode: create
type: content
content_type: folder
parent_location: 2
attributes:
name: iol
We get the following error:
Migration aborted! Reason: Error in execution of step 1: User does not have access to 'create' 'content' with: parentLocationId '2', sectionId '1'' in file /var/www/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/Repository/ContentService.php line 492
We are on the v2.1.1 tag of the ezplatform-ee and using kaliop/ezmigrationbundle 5.2.0
This test failure is also new, and seems to relate to a fresh problem with permissions and the latest version of eZPlatform: https://travis-ci.org/kaliop-uk/ezmigrationbundle/jobs/403934482
interesting. why it fails only for php 7.2 job?
Because of test matrix, it is the only version of php used with the latest ezplatform
i'm doing some tests locally. it looks to me that when phpunit is executed, at some point it reachs this line in the ez kernel. https://github.com/ezsystems/ezpublish-kernel/blob/master/eZ/Publish/Core/Repository/Permission/PermissionResolver.php#L113
and that returns that we're executing it as anon users, not as the admin user... makes sense?
Ok, so the last PR from @crevillo ( https://github.com/kaliop-uk/ezmigrationbundle/pull/168 ) seems to have identified what could be the root cause of this: SF 3.4.12 breaks lazy services, making them unshared. Bug report: https://github.com/symfony/symfony/issues/27756
@ajalovec @fabian-markaban would you be able to check the version of Sf that you use, and if it is 3.4.12 test if downgrading to 3.4.11 fixes the problem ?
@gggeek I can confirm that we are on Symfony 3.4.12 but can test it with 3.4.11 only at the end of the week when I am back from my vacation.
@gggeek I can verify that SF 3.4.12 is causing this and switching back to SF 3.4.11 resolves the problem. Thanks!
Closing. Incompatibility with sf 3.4.12 has been declared in mig bundle 5.3
After updating eZ from 2.1 to 2.2 we are getting the following error on migration execution: On eZ 2.1 we had version 4.7.0 installed and then I updated eZ to 2.2 and got this error. I then tried to update migrations bundle to 5.2.0 but got same error.
We have our own command which collects all yml files and creates definitions which could potentially cause the problem but I think the issue is somewhere else.
Our custom code:
I also tried to run our command with option
--siteaccess=admin
but I get same error.