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

Fix ContentPartFIeldDefinition Settings.ToObject Deserialization #16774

Merged
merged 11 commits into from
Sep 20, 2024

Conversation

davidpuplava
Copy link
Contributor

Fixes #16764

  • added tests for all of the field drivers that were changed.
  • updated 2.0.0 doc to use .GetSettings instead of Settings.ToObject
  • did NOT change all places with Settings.ToObject is used because I didn't know how to write tests for things like the Migrations to know if there is a problem that needs to be fixed.

It looks like Settings.ToObject only fails when the Settings object is a child JNode of Settings; when the settings object is rooted at Settings then I think the call works as expected.

I didn't want to hold up this PR while I figure out how to test all the other places where Settings.ToObject is used. I'll work on that next.

@hishamco
Copy link
Member

Seems I will nominate you @MikeAlhayek for Formatting Award :)

Mike implements IFormattable :)

@MikeAlhayek MikeAlhayek merged commit fc65471 into OrchardCMS:main Sep 20, 2024
6 checks passed
@gvkries
Copy link
Contributor

gvkries commented Sep 21, 2024

Nice work, thanks @davidpuplava

@MikeAlhayek MikeAlhayek mentioned this pull request Sep 24, 2024
29 tasks
@MikeAlhayek
Copy link
Member

/backport to release/2.0

Copy link
Contributor

Started backporting to release/2.0: https://github.com/OrchardCMS/OrchardCore/actions/runs/11021209008

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

Successfully merging this pull request may close these issues.

ContentPartFieldDefinition Settings.ToObject deserializes to empty object
4 participants