[MGNLUI-4368] readOnly property is not working for LinkFields, PasswordFields Created: 15/Feb/18  Updated: 26/Jul/18  Resolved: 04/May/18

Status: Closed
Project: Magnolia UI
Component/s: dialogs
Affects Version/s: 5.4.15, 5.5.9, 5.6.1
Fix Version/s: 5.4.15, 5.5.10, 5.6.5

Type: Bug Priority: Neutral
Reporter: Mercedes Iruela Assignee: Saimir Gasa
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: XML File config.modules.groovy.apps.pastry.subApps.detail.editor.form.xml     File standardPersonalizationWorkflow.flv.mp4    
Issue Links:
Problem/Incident
causes MGNLUI-4444 LinkFieldFactory NPE when removing an... Closed
causes MGNLUI-4447 LinkField can be saved empty even whe... Closed
causality
caused by MGNLUI-4081 readOnly checkbox doesn't appear in J... Closed
is causing MGNLDAM-751 Adapt DAM to work with UI 5.6.5 Closed
is causing GAEXP-1 PageVariantsLinkFieldFactory not work... Closed
is causing MGNLDAM-760 Wrong baseline magnolia version on da... Closed
is causing MGNLUI-4462 Restore binary compatibility of LinkF... Closed
relation
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Release notes required:
Yes
Documentation update required:
Yes
Date of First Response:
Sprint: Saigon 136, Saigon 137, Saigon 138, Basel 139, Basel 141, Basel 143, Basel 145
Story Points: 5

 Description   

In magnolia 5.4.12 there were some changes and refactoring done related to readOnly and checkbox field (MGNLUI-4081 and MGNLUI-4181). Since that release, readOnly property is not working (for example, in LinkField).

How to reproduce issue in LinkField:

  1. Execute createAppScript to create a content app
  2. Delete form node and import the attached file.

Workaround:
override see setReadOnly() method in info.magnolia.ui.form.field.LinkField.

NOTE: also happening with with Password Field, most likely related to fields that extends CustomFields



 Comments   
Comment by Mikaël Geljić [ 16/Feb/18 ]

Here's a non-comprehensive list of CustomFields from UI or content-editor to check for similar behavior. Ideally should be done for all modules.
Some are obsolete (should be deprecated) and we may also ignore those not related to any Magnolia FieldFactory.

  • JCropField (info.magnolia.ui.vaadin.editor)
  • Switcher (info.magnolia.ui.vaadin.switcher)
  • CheckBoxField (info.magnolia.ui.form.field)
  • CompositeField (info.magnolia.ui.form.field)
  • LinkField (info.magnolia.ui.form.field)
  • MultiField (info.magnolia.ui.form.field)
  • PasswordFields (info.magnolia.ui.form.field)
  • StaticField (info.magnolia.ui.form.field)
  • SwitchableField (info.magnolia.ui.form.field)
  • ThumbnailField (info.magnolia.ui.form.field)
  • BasicUploadField (info.magnolia.ui.form.field.upload.basic)
  • ViewImageField (info.magnolia.ui.mediaeditor.field.image)
  • CropField (info.magnolia.ui.mediaeditor.field.image)
  • WorkbenchField (info.magnolia.ui.contentapp.field)
  • MoveDialogWorkbenchField (info.magnolia.ui.contentapp.movedialog)
  • TextAndContentViewField (info.magnolia.ui.contentapp.field)
  • AccessControlField (info.magnolia.security.app.dialog.field)
  • AccessControlListField (info.magnolia.security.app.dialog.field)
  • BlockPickerField (info.magnolia.editor.blockpicker)
  • PeekField (info.magnolia.unfurl.ui)
Comment by Saimir Gasa [ 08/Mar/18 ]

 - change implemented

 - works

 - more info needed

  • CheckBoxField (info.magnolia.ui.form.field)
  • CompositeField (info.magnolia.ui.form.field)
  • LinkField (info.magnolia.ui.form.field)
  • MultiField (info.magnolia.ui.form.field)
  • PasswordFields (info.magnolia.ui.form.field)
  • SwitchableField (info.magnolia.ui.form.field)
  • BasicUploadField (info.magnolia.ui.form.field.upload.basic)
  • TextAndContentViewField (info.magnolia.ui.contentapp.field)
  •  JCropField (info.magnolia.ui.vaadin.editor)
  •  ThumbnailField (info.magnolia.ui.form.field)
  •  ViewImageField (info.magnolia.ui.mediaeditor.field.image)
  •  CropField (info.magnolia.ui.mediaeditor.field.image)                              - Defined as an action
  •  WorkbenchField (info.magnolia.ui.contentapp.field)                                - Uses factory
  •  MoveDialogWorkbenchField (info.magnolia.ui.contentapp.movedialog) - Defined as an action
  •  AccessControlField (info.magnolia.security.app.dialog.field)
  •  AccessControlListField (info.magnolia.security.app.dialog.field)
Comment by Matjaz Trcek [ 22/Mar/18 ]

Looks good, checked majority of the green fields, and they are as expected. 

Comment by Saimir Gasa [ 03/Apr/18 ]

As provided by the recording, the LinkField does not seem to be working in the EE bundle in a very specific case. The changes were made to the LinkFiled in the magnolia-ui-form module regarding the readOnly value. 

The application is failing with a ReadOnlyException because the text field value is being changed after the readOnly property is set to true. 

Here is the failing Selenium test: standardPersonalizationWorkflow.flv.mp4

Comment by Federico Grilli [ 02/May/18 ]

QA passed on 5.6.x, 5.5.x and 5.4.x - checked EE pro demo webapp.

Comment by Saimir Gasa [ 04/May/18 ]

NPE in the readOnly method in the PasswordFields

Generated at Mon Feb 12 09:15:57 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.