-
Notifications
You must be signed in to change notification settings - Fork 48
Conversation
ok this is a phpcr-odm bug about translations. i am cleaning this stuff up but there is a couple of surprises in there. will need to wrap this up tomorrow, sorry. |
any clue when we broke this? |
seems like it works fine on cmf.liip.ch .. so it must have been introduced since the last tagging session. |
So this is the current state:
This is the sandbox beta1 state:
So there is no regression, the issue is simply that we are now using a multilingual document in all cases. As such yes it seems making the field |
This is the exception I am talking about: Now the question if the field is not nullable and we did not store it as a nullable field, why do we not just continue rather than setting the default values? Is this to be more graceful when a new property is added? If that is show we might need to do 2 passes, one were we do not set a default |
In other words things work fine if I do
|
with this change, the sandbox menu behaves correct again. i notice that somewhere we use the phpcr node name as fallback if the label is not defined. but i think it makes more sense to have the label required.
the underlying issue is that a while ago, we broke the attribute translation strategy for nullable fields when a translation locale does not exist at all, as all fields then become null:
https://github.com/doctrine/phpcr-odm/blob/master/lib/Doctrine/ODM/PHPCR/Translation/TranslationStrategy/AttributeTranslationStrategy.php#L94
i will try to find a solution for phpcr-odm, but its a very tricky problem.