[MGNLUI-2712] info.magnolia.ui.form.field.definition.SwitchableFieldDefinition does not respect mandatory value Created: 26/Feb/14  Updated: 21/Oct/15  Resolved: 20/Mar/15

Status: Closed
Project: Magnolia UI
Component/s: None
Affects Version/s: 5.2.2
Fix Version/s: None

Type: Bug Priority: Neutral
Reporter: Tom Wespi Assignee: Mikaël Geljić
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File Config.png     PNG File Fieldtype.png     Text File SwitchableField.java     XML File config.modules.internet-module.dialogs.pages.homePKIntro.form.tabs.tab1x1.fields.link.xml    
Issue Links:
Relates
relates to MGNLUI-2683 SwitchableField saving behaves errati... Closed
relation
is related to MGNLUI-2871 Enhance the behavior of complex fields Closed
supersession
is superseded by MGNLUI-3625 SwitchableField should only validate ... Closed
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
Date of First Response:

 Comments   
Comment by Mikaël Geljić [ 26/Feb/14 ]

Hi Tom!

Not sure whether you plan to elaborate a bit on this issue, nevertheless I think it may well be the same as MGNLUI-2683 which is due in 5.2.3. (I know the ticket mentions hidden fields but it actually affected any field).

Can you take a look and confirm that this is indeed the same? (so that I can close this one as duplicate), or shout if it's yet a different problem?

Cheers!

Comment by Nexus for Visana Services AG Development Center ECM (Contact: Casper Biever at Visana Services AG) [ 09/Feb/15 ]

We have a switchable with mandatory fields. The problem arrises when one tries to save the dialog: also the non visible fields are validated. The result is that the dialog cannot be closed.

Comment by Nexus for Visana Services AG Development Center ECM (Contact: Casper Biever at Visana Services AG) [ 09/Feb/15 ]

Example configuration.

Comment by Mikaël Geljić [ 20/Mar/15 ]

Hi Stephan,

This ticket here was an old behavior where validation could be ignored in some cases.
The behavior you describe on the other hand is precisely MGNLUI-3312. This was caused by a fix in 5.3.6 — which we reverted in 5.3.7, so it should no longer be an issue currently (more details in this comment). Do file a new ticket if you face it on a newer version as well.

Cheers,
Mika

Comment by Nexus for Visana Services AG Development Center ECM (Contact: Casper Biever at Visana Services AG) [ 24/Mar/15 ]

Hello Mika,

We have 5.3.7 and the Error is definitely still there. I have attached some screenshots of our workaround and some code.

The key is in the isValid method where there is an extra check if a field is visible. If not, it isn't validated.

Regards,

Casper (on behalf of Stephan)

Comment by Magnolia International [ 24/Mar/15 ]

Hey Casper, Stephan,

It looks like you're accidentally using an account that should be used solely for the purpose of mirroring our Nexus repo into yours. It also looks like this account was accidentally given permissions for commenting here, which is a mistake on our end.

Stephan, you do have a personal account with us (stephan.schoell), could you please use that one in future ?

Thanks,

-greg

Comment by Casper Biever [ 25/Mar/15 ]

Hi Grégory,

I have my own account now and will use that in the future.

Regards,

Casper

Generated at Mon Feb 12 08:59:24 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.