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

About indexing CustomUserSettings #15921

Closed
hyzx86 opened this issue Apr 30, 2024 · 2 comments
Closed

About indexing CustomUserSettings #15921

hyzx86 opened this issue Apr 30, 2024 · 2 comments

Comments

@hyzx86
Copy link
Contributor

hyzx86 commented Apr 30, 2024

I'm trying by modifying CustomUserSettingsDisplayDriver class ,
for each CustomUserSettings Sterotype on save

Call the IContentManager.CreateOrUpdateAndPublishAsync in UpdateAsync function
This saves the CustomUserSettings type to the content item, that will triggers the default indexing, 'TitlePartHandler', etc

After that, the ContentItem.Id property will be assigned.

But JObject.FromObject(ContentItem) or ToObject() will always remove the contentitem.id property

I was wondering, would it cause any problems if we kept the Id attribute?

[JsonConverter(typeof(ContentItemConverter))]
public class ContentItem : ContentElement
{
public ContentItem() : base()
{
ContentItem = this;
}

Thanks!

@hyzx86
Copy link
Contributor Author

hyzx86 commented Apr 30, 2024

@hyzx86
Copy link
Contributor Author

hyzx86 commented Apr 30, 2024

Has been solved by covering CustomUserSettingsDisplayDriver

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

No branches or pull requests

1 participant