Skip to content
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

Entity Picker used in Konstrukt editor has validation issues #61

Closed
drpeck opened this issue Jul 11, 2023 · 3 comments
Closed

Entity Picker used in Konstrukt editor has validation issues #61

drpeck opened this issue Jul 11, 2023 · 3 comments

Comments

@drpeck
Copy link

drpeck commented Jul 11, 2023

Describe the bug
My IKonstruktConfigurator sets a Field for my Editor, that uses an Entity Picker. Field is required. If you trigger validation such that validation fails, because an entity has not been picker, it is not possible to clear the validation error by subsequently picking an editor.

Worse still, the issue appears to persist when you load another entity in to the Editor that has the property in question populated. The page must be refreshed (F5) to clear the validation errors. Even changes Sections doesn't clear the issue

Steps To Reproduce
Steps to reproduce the behavior:

        treeConfig.AddCollection<ResourceModel>(x => x.Id, "Resource", "Resources", "A resource entity", "icon-book", "icon-books", collectionConfig => collectionConfig
            .SetRepositoryType<ResourcesRepository>()
                .SetNameProperty(p => p.Name)

                .Editor(editorConfig => editorConfig
                    .AddTab("Meta data", tabConfig => tabConfig
                        .AddFieldset("Discover", fieldsetConfig => fieldsetConfig
                            .AddField(p => p.Topics)
                                .SetDataType(Constants.DataTypeNames.TopicsPicker)
                                .SetValueMapper<TopicValueMapper>()
                                .MakeRequired()
                        )
                    )
                )
        )
  1. Create an entity with an Entity Picker field that is required
  2. Try to add a new entity by only entering a name (Entity Picker field is empty)
  3. Receive validation error
  4. Populate the Entity Picker field, and click Save

Expected behavior
Entity should Save

Screenshots

image

Environment (please complete the following information):

  • Server OS: Win 11
  • Browser: Edge
  • Umbraco Version: 11.3.1
  • Product Version: 1.6.5**-beta007**

Additional context
NB: I'm using the beta version still.


This item has been added to our backlog AB#34768

@drpeck drpeck added the bug Something isn't working label Jul 11, 2023
@drpeck
Copy link
Author

drpeck commented Aug 1, 2023

I'm now using 1.6.5 with no change

@jemayn
Copy link

jemayn commented Nov 3, 2023

I experienced the same with a property that had MakeRequired() as validation, then I filled in the value and tried to save again, and the save button was unresponsive. Had to refresh the page to get it to work.

@acoumb
Copy link

acoumb commented Dec 1, 2023

Hi @drpeck ,

I have released version 12.0.2 of Umbraco.UIBuilder with a fix to this issue.

Thank you,
Adrian

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

No branches or pull requests

3 participants