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

Multiple category selector issue #16

Open
adayinthelifeofapro opened this issue Oct 4, 2022 · 1 comment
Open

Multiple category selector issue #16

adayinthelifeofapro opened this issue Oct 4, 2022 · 1 comment

Comments

@adayinthelifeofapro
Copy link

So following this part of the documentation:

If you prefer to use the native content reference list editor for your categories you can skip the CategoriesAttribute:

[AllowedTypes(typeof(TopicCategory))]
public virtual IList<ContentReference> TopicCategories{ get; set; }

If I implement the above, then it never shows any categories, it just displays the root node:

757b0314-78d2-42e8-817a-92575985ed12

If I implement the single category property, it displays fine:

[UIHint(CategoryUIHint.Category)]
[AllowedTypes(typeof(TopicCategory))]
public virtual ContentReference TopicCategory{ get; set; }

image

@epi-pouellette
Copy link

Hello,

We are seeing the same issue with not using the Categories Attribute on the IList<>. The only way we can get the dialog to work is by using StandardContentBase as the allowed type, which is not optimal.

I've checked the browser console, and I'm not seeing any console errors. I am seeing that the request (see below) to the store is not returning any objects when using a type that extends from CategoryData.

EPiServer/cms/Stores/contentstructure/?referenceId=1&query=getchildren&typeIdentifiers=projectname.models.categories.shareclasscategory&typeIdentifiers=geta.optimizely.categories.categorydata&allLanguages=true&sort()

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

2 participants