geta / geta-optimizely-categories Goto Github PK
View Code? Open in Web Editor NEWAn alternative to Optimizely's default category functionality, where categories are instead stored as localizable IContent.
An alternative to Optimizely's default category functionality, where categories are instead stored as localizable IContent.
When Geta.Optimizely.Categories.Find is installed it can modify the behavior of searches on trash in the CMS which causes missing or no results.
When that package is installed the JSON sent to search has the parent folder set to 59266, which is "For all sites". When the package is uninstalled the parent folder is set to ID 2, which is the trash folder.
See the searches which work and fail here.
How to Reproduce:
Expected Behaviour: "For this..." shows as "For this category" (or equivalent)
Actual Behaviour: "For this..." shows as "For this {0}"
Hello,
Will there be support provided for Optimizely CMS 12 targetting .net 6.0 as .net 5.0 reached end of support already. As it lists only .net 5.0 under dependencies.
Thanks,
Deepa
Categories attribute is not working properly when the item that uses it is added in a list property (https://world.optimizely.com/blogs/Per-Magne-Skuseth/Dates/2015/11/trying-out-propertylistt/)
Multiple categories can be selected, but after closing and reopening an item, only one category is selected.
Below is the example that uses Alloy site.
Geta.Optimizely.Categories
nuget package (version 1.1.1
) and define some categories[ContentType]
public class BasicCategory : CategoryData
{
}
[ContentType]
public class ExtendedCategory : BasicCategory
{
[CultureSpecific]
public virtual XhtmlString MainBody { get; set; }
}
StadardPage
to include property of type IList<T>
where T
is a new class with a list of categories as a property (in my example ItemWithCategories
:[SiteContentType(GUID = "9CCC8A41-5C8C-4BE0-8E73-520FF3DE8267")]
[SiteImageUrl(Globals.StaticGraphicsFolderPath + "page-type-thumbnail-standard.png")]
public class StandardPage : SitePageData
{
[Display(
GroupName = SystemTabNames.Content,
Order = 310)]
[CultureSpecific]
public virtual XhtmlString MainBody { get; set; }
[Display(
GroupName = SystemTabNames.Content,
Order = 320)]
public virtual ContentArea MainContentArea { get; set; }
[EditorDescriptor(EditorDescriptorType = typeof(CollectionEditorDescriptor<ItemWithCategories>))]
public virtual IList<ItemWithCategories> ItemsWithCategories { get; set; }
}
public class ItemWithCategories
{
[Display(
Name = "Name",
GroupName = SystemTabNames.Content,
Order = 10)]
public string Name { get; set; }
[Display(
Name = "Test categories",
GroupName = SystemTabNames.Content,
Order = 20)]
[AllowedTypes(typeof(ExtendedCategory))]
[Categories]
public virtual IList<ContentReference> Categories { get; set; }
}
[PropertyDefinitionTypePlugIn]
public class ItemWithCategoriesListProperty : PropertyList<ItemWithCategories>
{
}
When list item is edited it should display all categories.
Similar situation is happening when list property for inline block is used: https://world.optimizely.com/blogs/bartosz-sekula/dates/2023/1/official-list-property-support/
I've found that code in EPiServer/Shell/12.25.1/ClientResources/epi/shell/widgets.js
for epi/patch/dijit/form/_FormMixin
inovke set
method on descendant widgets, but it checks multiple
flag. If it is set to true
it passes the whole array, but if not, then, in this case, it only passes the first element from the array.
Adding a line like this:
additionalValue.EditorConfiguration["multiple"] = (object)true;
In the CreateDicplayMetadata
method in CategoriesAttribute
solves this issue and all categories are properly shown.
We upgraded our projects to .NET 8 but needed to go back to .NET 6 because the geta category selector is not compatible and we get errors in the console wherever we use it in the cms:
Edit: It seems that geta categoeries 1.1.1 even has issues with .NET 6, so we rolled back to 1.0.0. So maybe .NET 8 is not the problem but 1.1.1
Hi,
If there is a large number of categories with multiple levels, performance is seriously affected when loading the category tree.
Could you look into this?
Regards,
Torunn
When I'm trying to remove the category from the gadget I'm getting "No other content uses this item. It can be safely moved to trash" despite tha fact that the category actually is in use.
So I guess it's better not to show this message at all or actually fix the tracking of usages of a given category.
Greetings:
I'm new to Geta.Optimizely.Categories and to Optimizely CMS and I have built a Categories prototype with using the Alloy demo site. Everything seems to be working well and I can control my categories in the way that's needed except for one case...
In my 'Select Categories' tree, I need to only display the parent-child category types for a given category and only child types should be selectable(allowed). I've tried the following combinations of appsettings and AllowedType attribution but, at best, have only been able to meet 2 of my 3 goals.
I'm hoping that you can provide some guidance about whether all 3 goals can be achieved and, if so, how to go about achieving it -or- if this is a new capability that should be added to the App?
Regards,
Matt
Goals:
In Select Categories tree:
Try 1:
Config:
Result: In Select Categories tree
Try 2:
Config:
Result: In Select Categories tree -
Try 3:
Config:
Result: In Select Categories tree -
Is there a way to add sort order for the categories so that we can have it in the order we need instead of alphabetic order which is default?
Hi @valdisiljuconoks @brianweet @marisks
I removed the Geta-Optimizely-Categories package after I decided it wasn't the right package due to a change in user requirements..
When I try to remove the CategoryRoot file. I am getting the below error
Is it possible if you could advise/help with this please?
Greetings:
I'm new to Optimizely CMS and Geta Optimizely Categories. So, not sure if this issue is due to the app or if I have just not figured out the way it can or should be done...
I've added the Geta Optimizely Categories package to my Optimizely Alloy demo project and created a couple of Category content types (ProductCategory & NewsCategory) in the code.
When going to Settings->Content Types in the Optimizely CMS UI, I can see the Category content types that were added via the code:
However, when clicking on the 'Create New...' button, the drop-down list displays selectable Page and Block content types but there is no selectable item for creating a new Category content type.
Is there a way to add a Geta Category content type from the Optimizely CMS UI? If so, how? / What is the procedure – do we need to register the Category content type somehow so that it appears in the ‘Create New…’ drop-down list? -or- do all Geta Category content types need to be added via the code? If all Geta Category types need to be added via code today, then should this issue be a request for a future enhancement?
Regards,
Matt
Greetings:
I’ve added ProductCategory and NewsCategory properties to our ProductPageData class(inherits from EPiServer PageData) in the code. These properties are visible from the Optimizely CMS UI by going to Settings->Content Types->ProductPage:
Additionally, I have added a Search Category to ProductPage using the Optimizely CMS Admin UI(rather than code) by selecting Settings->Content Types->Product->Add Property:
When adding a Category via code, the Allowed and Restricted content types are specified in the [AllowedTypes] attribute:
A notable difference when adding a Category content type via the UI is that the Allowed Content Types and Restricted Content Types appear as settings in the UI under Configure Properties.
The issue that I'm seeing is that the drop-down list of content values for Allowed Content Types and Restricted Content Types do not have any Category Types in the select list. Instead, Page, Block and Media content types appear in the select list:
Just reaching out to see if it is possible to 'register' the Category content types so that they appear in the Allowed & Restricted Content Type drop-down select lists when creating a new Category property for a Page via the UI? If Allowed and Restricted Types cannot be specified via the UI today, then is this possibly a future enhancement that should be added to the Geta Category App in the future?
Regards,
Matt
Similar to the issue for EpiCategories this happens also for the optimizely categories.
EpiCategories issue (closed as completed, but how?)
EpiCategories forum post
Optimizely.Categories forum post
So the error is:
2023-11-10 18:56:49.517 +01:00 [ERR] 10.5.3 Export/import error: Exception: Failed to load content type with name 'CategoryData'
EPiServer.DataAbstraction.DataAbstractionException: Failed to load content type with name 'CategoryData'
at EPiServer.DataAbstraction.RuntimeModel.Internal.ContentTypeMappingAnalyzer.GetContentType(String contentTypeName)
at EPiServer.DataAbstraction.RuntimeModel.Internal.ContentTypeMappingAnalyzer.Analyze(ContentType contentType, AvailableSetting settings, IContentTypeAvailableModelSetting modelsetting)
at EPiServer.DataAbstraction.Internal.AvailableSettingsRepository.RegisterSetting(ContentType contentType, AvailableSetting setting)
at EPiServer.Enterprise.Transfer.Internal.AllowedContentTypesTransfer.ImportInternal(IEnumerable`1 transferObjects)
at EPiServer.Enterprise.Transfer.Internal.AllowedContentTypesTransfer.Import(XmlTextReader input)
at EPiServer.Enterprise.Internal.DefaultDataImporter.ImportStream(ZipPackage package, XmlTextReader reader, String partName, ImportOptions options)
at EPiServer.Enterprise.Internal.DefaultDataImporter.ImportPartOfPackage(ZipPackage package, String partName, ImportOptions options)
at EPiServer.Enterprise.Internal.DefaultDataImporter.ImportRaw(ZipPackage package, ImportOptions options)
at EPiServer.Enterprise.Internal.DefaultDataImporter.Import(ImportOptions options)
As IEnumerableExtensions using internal access modifier, as its been removed access from this package. If we want to utilize these how to access these methods? Is it no longer needed?
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:
If I implement the single category property, it displays fine:
[UIHint(CategoryUIHint.Category)]
[AllowedTypes(typeof(TopicCategory))]
public virtual ContentReference TopicCategory{ get; set; }
Hello Geta,
Do you know when this package will be ready for CMS12 .NET 5/6? Is assistance required to get this closer toward release?
Regards,
Mark
Hi
The releases show v 1 was released today, but i can't see it in nuget repo. Thoughts?
We are experiencing issues as well when trying to create Categories.
Is works locally but not in DXP.
It breaks when using New Item under For All Sites (CategoryRoot).
"Unable to load /EPiServer/cms/Stores/contenttype/?query=getsuggestedcontenttypes&localAsset=false&parentReference=451&requestedTypes=geta.optimizely.categories.categorydata status: 500"
ID 451 would be For All Sites (CategoryRoot) node.
Using version 1.1.1
And CMS 12.25.1
We are building an enterprise application with multiple levels of abstraction and we want to have one NuGet containing base content types and interfaces and one with the content editor plugins, UI components and modules/protected.
Can this be achieved using your solution and if not do you know any other more suitable solution, because we are still considering what to use?
We have found an issue opening the Geta Categories picker where the page already has multiple selected categories. This issue affects smaller brower windows and normal desktop windows were scaling is in use such that the effective or scaled viewport is 620 pixels or less.
Browser: Chrome, HD Desktop, Zoom at 150% or Larger
Browser: FireFox, HD Desktop, Zoom at 160% or larger
Browser: Chrome, View Height <620 pixels
Browser: FireFox, View Height <620 pixels
Category Tree:
Steps to Reproduce Based on Chrome and 150% zoom, On FireFox this happens at 160%:
Steps to Reproduce based on limited View Height
We have the following block that we use for building up filters:
[ContentType(DisplayName = "Category Filter Block", GUID = "CDAC6F24-2175-4BEA-AC34-D6CA17E45884", GroupName = GroupNames.Content)]
[ContentTypeIcon(FontAwesome.Filter)]
public class CategoryFilterBlock : BlockData
{
[Display(Name = "Label", GroupName = GroupNames.Content, Order = 10)]
[CultureSpecific]
[Required]
public virtual string? Label { get; set; }
[Display(Name = "Filter Categories", GroupName = GroupNames.Content, Order = 20)]
[Categories]
[CultureSpecific]
[Required]
public virtual IList<ContentReference>? FilterCategories { get; set; }
}
When creating this as a shared block (e.g. created under For This Site, For This Page) then the category picker works as intended and results in changes to the category picker being retained.
When creating this as an inline block directly in the content area, then only the categories set at the point of creation are applied. Any further updates to these on the block are not retained.
Steps to Reproduce:
I have also noted the same issue if I try and use the same block in a new block property list, e.g.
public virtual IList<CategoryFilterBlock>? FilterCategories { get; set; }
The current implementation of ContentCategoriesFacet()
is nice in that it wraps up the facets for categories really nicely. However the default facet size is 10 and since this method does not take any other arguments, you cannot override the facet limit while using this method.
In order to facilitate my client's needs, I've have to look at what the ContentCategoriesFacet()
method is doing in order to supply my own limit.
Work around:
var results = query.FilterForVisitor()
.Skip(request.From)
.Take(request.Take)
.OrderByDescending(x => x.StartPublish)
//.ContentCategoriesFacet()
.TermsFacetFor(x => x.Categories(), y => y.Size = 100 )
.GetContentResult();
Potential overloads options:
public static ITypeSearch<T> ContentCategoriesFacet<TSource>(this ITypeSearch<T> search, Action<TermsFacetRequest> facetRequestAction)
public static ITypeSearch<T> ContentCategoriesFacet<TSource>(this ITypeSearch<T> search, int size = 10)
Hello,
We have a complaint from a CMS editor who I think has a slower internet connection.
When they are assigning categories for a CategoryList property, using the editor modal, every time they expand a node (or parent category) it makes an API call for each individual child. I assume this is to determine if the category is selectable or not because the children are visible immediately but the checkboxes are not.
While we could maybe solve this by organizing our categories differently so that there are not too many children under a given parent, are there any settings we could use to control this?
Love the add-on and thank you for your time.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.