-
Notifications
You must be signed in to change notification settings - Fork 38
[RTM] Initialize attributes with empty values. #1247
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
[RTM] Initialize attributes with empty values. #1247
Conversation
|
@baumannsven has had the same idea. |
|
na dann... ;-) |
|
@richardhj Please add author |
|
@richardhj If this pull request merged can I remove the step 2 by the create handler from DCG. Can you test it, and give me information about this? |
|
The problem I see with this is, now it is implicitly mandatory for all attributes to accept I wonder if this might cause problems. For your addition of |
Wow, didn't know there is something more null than But I get your point. Because they now get triggered to process
Just now, e.g. the
Yes, we should discuss the desired interfaces somewhen. |
|
On the other hand, using |
|
@baumannsven I reverted the two-step save and applied these changes. The alias/combinedvalues are working. |
Fixes cases in which you create an item and the alias or combined values attribute does not get notified due `isAttributeSet()` returning false.
be1d3ad to
bb20586
Compare
Issue
When creating a new item and finally saving the item, neither the alias attributes nor the combined values attributes get generated.
Description
The item gets initialized with
$arrData = []meaning we have to initialize all attributes so that they are present in the data array. This is related to #894 and 588eddf respectively.When
$arrDatais empty,isAttributeSet()returnsfalsewhich results in no attributes get notified about a model change.Reproduction
Using the Frontend Editing.
Neither alias nor combined values are generated on creation.
MetaModels 2.0 as well 2.1 are affected.
To be discussed
getEmptyValue()to theIAttribute.getEmptyModel().Checklist
@authorsin touched PHP files