[DataObjectController] getSelectOptions
method is not taking into account the current draft
#630
Labels
getSelectOptions
method is not taking into account the current draft
#630
Situation
The getSelectOptions-mechanism fails with error message "Call to undefined method getLocalizedfields".
The data is send correctly to the
DataObjectController
from the Steps to reproduce. The methodgetSelectOptions
gets the object from the database which does not contain the changes from the draft, by this the indexes are wrong and it tries to get the localizedFields for theBulletPointElements
from theBulletPointCustomProperty
, which doesn't contain localizedFields.In addition to this, we figured out in another place (when using FieldSet and a Select field) that we have the same issue. Again the method
getSelectOptions
gets the object from the database which does not contain the changes from the draft but now by this the OptionProvider is not called anymore and all the select options are empty. A different place and configuration but both use thegetSelectOptions
method and have the same behaviour not containing the changes from the draft.Steps to reproduce
A similar issue was already reported in pimcore/pimcore#9645
BulletPointElements
before aBulletPointCustomProperty
which already existsBulletPointElements
Call to undefined method getLocalizedfields
is thrownEnvironment
Pimcore: 11.3.1
Indirectly due to Pimcore version: admin-ui-classic-bundle: ^1.5.0
Structure
We have two field collection set once the bulletPointElements and second the bulletPointCustomProperty. The bulletPointElements are set up with a localized field.
BulletPointElements Structure:
BulletPointCustomProperty Structure:
Solution which was working for us
Add the same two code lines which are already used in the saveAction (L1317 & L1324), inside of the getSelectOptions in line 558:
We assume this part is just missing there.
The text was updated successfully, but these errors were encountered: