Input Field as localized in a Custom Layout raise error

Hi
I think I should report this as a bug:
If I define regular input field (non localized) on a Custom Layout in a localized field group, while saving an object it raises error:

Call to a member function getDataFromEditmode() on null
Server threw exception - could not perform action. Please reload the admin interface and try again.

Timestamp: Sun Oct 27 2019 11:01:57 GMT+0200 (Israel Standard Time)
Status: 500 | Internal Server Error
URL: /admin/object/save?task=publish
Method: PUT
Message: Call to a member function getDataFromEditmode() on null

Steps to reproduce the error:

  1. Data Object->Classes
  2. Define an input field (not localized)
  3. Configure Custom Layout
  4. Create Custom layout-> Layout -> Add Data Component-> Localizes Field ->
  5. Drag the input field defined in the base class into the localized Field group
  6. Save the Custom Layout
  7. Create an object
  8. Write something in the input field.
  9. Try saving
  10. Raise Error:
    Call to a member function getDataFromEditmode() on null
    Server threw exception - could not perform action. Please reload the admin interface and try again.

If there is something that I don’t understand in this procedure I would appreciate to hear other explanation.

Best Regards,
Eli Shklovsky

Hi,
you cannot make a non-localized field localized in a custom layout.

BR
Christian

Hi Christian,
You are right.
But the Admin GUI allows it, as described above, that’s why I think it is a bug.
Best Regards,
Eli

Hi,
it is really very complicated to avoid this in Admin GUI, so we count on competence of DEVs who setup the custom layouts :wink: .
But PRs to improve that are as always welcome…

BR
Christian