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

File upload unreliably marked as invalid #3508

Closed
ebruchez opened this Issue Mar 10, 2018 · 5 comments

Comments

Projects
1 participant
@ebruchez
Collaborator

ebruchez commented Mar 10, 2018

New bug as it's confusing to reopen closed bugs. #3142 regressed.

+1 from customer

@ebruchez ebruchez self-assigned this Mar 10, 2018

@ebruchez ebruchez added this to To do in Orbeon Forms 2017.2.1 via automation Mar 10, 2018

@ebruchez

This comment has been minimized.

Collaborator

ebruchez commented Mar 10, 2018

The nested xf:upload is still marked as visited upon value change, so this is fine. But the fr:attachment component is not. And that information is used by fr:error-summary.

We mark controls visited upon DOMFocusOut and xxforms-blur, but this doesn't seem to happen for xf:upload. So the XBL component is not marked as visited.

If we mark the control as visited upon xforms-value-changed, then this would fix the problem as fr:attachment is a value control. This might cause more controls to be marked as visited, but is this a problem?

@ebruchez

This comment has been minimized.

Collaborator

ebruchez commented Mar 12, 2018

We also mark xf:upload as visited upon xxforms-upload-done. But of course that doesn't apply to the enclosing XBL component.

@ebruchez

This comment has been minimized.

Collaborator

ebruchez commented Mar 12, 2018

Other solution instead of using xforms-value-changed: mark all ancestor of a visited control as visited too.

@ebruchez

This comment has been minimized.

Collaborator

ebruchez commented Mar 12, 2018

Actually, mark ancestor XFormsValueComponentControl only.

@ebruchez ebruchez closed this in b77d755 Mar 12, 2018

@ebruchez ebruchez added this to Done in Orbeon Forms 2018.1 via automation Mar 12, 2018

Orbeon Forms 2017.2.1 automation moved this from To do to Done Mar 12, 2018

@ebruchez

This comment has been minimized.

Collaborator

ebruchez commented Jun 12, 2018

So this causes #3611. In the commit above, we call visitWithAncestors() upon xxforms-upload-done, but also upon DOMFocusOut and xxforms-blur. The DOMFocusOut causes the issue with fr:autocomplete. Wouldn't it be enough to do it upon xxforms-upload-done?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment