-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ORMInvalidArgumentException after installation #1704
Comments
if possible please provide the full trace. Also can you say exactly when this happens? |
It happens during the install process. It seems to be that the problem is in the categories module. |
It happens when the system tries to insert initial categories data. Here is the stack trace:
|
I tried to find the problem, but without success. Would be nice if someone could solve this problem, because I this a blocker for my activities.. |
I'll take a look as soon as I can. |
Here what I already found out: The error happens in :
|
the trace indicates it is trying to process the |
there are several flaws with the installation of the category structure. I will see what I can do. I think I have found the first major problem which is causing the error though |
This is a problem with the Gedmo/Blameable extension. It is not firing correctly on the installation. probably because nobody is logged in yet... not sure why this used to work and now does not. Maybe because I switched it from the old StandardFields to Blameable. @cmfcmf do you have any ideas for a fix? |
@Guite can you look into this also? |
What was the reason for switching from StandardFields to Blameable? |
2 reasons: first, I couldn't get standard fields to work. second, using third-party code means not having to maintain our code. but I'm not sure that even switching back would be the solution here. The problem is that the CategoryEntity requires a UserEntity in two places (https://github.com/zikula/core/blob/1.4/src/system/Zikula/Module/CategoriesModule/Entity/CategoryEntity.php#L151-L167) On installation, the user entity isn't available so the install fails. I suppose one easy solution is to remove those two properties. |
I guess the difference is that Blameable actually tries to join a user. StandardFields just uses |
|
yes, I already tried a few ideas in the listener and couldn't create a user, so I am still looking for ideas. |
Maybe doctrine-extensions/DoctrineExtensions#1048 is related here? |
@Guite that seems likely - how do we fix? |
accommodate blameable user value when installing. fixes #1704
I think the doctrine extension problem is related to this. doctrine-extensions/DoctrineExtensions#1191 |
I got the following error after a fresh installation
ORMInvalidArgumentException: EntityManager#persist() expects parameter 1 to be an entity object, NULL given.
in Zikula/src/vendor/doctrine/orm/lib/Doctrine/ORM/ORMInvalidArgumentException.php line 169
The text was updated successfully, but these errors were encountered: