Try our conversational search powered by Generative AI!

Geta categories disappear when used on page

Vote:
 

I am using the Geta Categories in a page like this:

[CultureSpecific]
[Display(
  Name = "Categories",
  Description = "",
  GroupName = TabNames.Category,
  Order = 10)]
[AllowedTypes(typeof(Categories.Category))]
public virtual IList<ContentReference> Categories { get; set; }

When working locally:

I have dragged a category to the page property Categories and published the page.

When I rebuild the solution and look att the property Categories in edit mode, the category has disappeared.

I have also added:

<add key="GetaEpiCategories:ShowDefaultCategoryProperty" value="true" />

But the categories added disappear when rebuilding the solution.

Has anyone seen this behaviour before?

I am using Geta.EpiCategories 1.2.11 

and EPiServer.CMS 11.14.0


#234850
Dec 03, 2020 12:02
Vote:
 

Hi,

Please decorate the property with [Categories]

Like -

public class MyPageType : PageData, ICategorizableContent
{
	[Categories]
	public virtual IList<ContentReference> Categories { get; set; }
}

More info - https://github.com/Geta/EpiCategories

#234851
Edited, Dec 03, 2020 12:26
Vote:
 

I added the [Categories] attribute and they still disappear after rebuilding the solution.

Also, I do not want to use the [Categories] attribute since I want to be able to drag categories to the property. 

It says in the text that the [Categories] attribute is optional: "If you prefer to use the native content reference list editor for your categories you can skip the CategoriesAttribute:"

Also I can see in the database that the categories are still there: ["1b18f203-3a00-48f0-ae5a-8fcd814c763b","17ed2a34-2d6f-4344-a021-bce73170c3cd","14aab268-e36e-457d-a5ac-a9ee46dfb614"], but they only disappear from the edit mode property view and are also not avaliable in page model.

#234852
Dec 03, 2020 13:02
Vote:
 

Can you please confirm on below questions-

  1. Are you using the Geta category items when dragging/dropping them?
  2. Which property you are using? Newly added one or the Episerver default category?
#234855
Dec 03, 2020 14:08
Vote:
 
  1. Yes I am using the Geta categories which are from CategoryData. They are dragged from the gadget Categories where I have created them.
  2. Same as above.
#234856
Dec 03, 2020 14:21
Vote:
 

Hi, Hannes,

Can you please add a GitHub issue to the repo?

#234948
Dec 05, 2020 23:26
Vote:
 

I did not have MultipleActiveResultSets=true in the connectionstring and that was the problem. After looking in the epi error log where it said: "System.InvalidOperationException: There is already an open DataReader associated with this Command which must be closed first." it was solved quickly.

#241013
Dec 09, 2020 16:34
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.