Giter Club home page Giter Club logo

geta-optimizely-extensions's People

Contributors

brianweet avatar dnasir avatar frederikvig avatar gatisb avatar hkvalvik avatar imgbotapp avatar jakke-korpelainen avatar kaspars-ozols avatar lukadevic avatar marisks avatar mattisolsson avatar valdisiljuconoks avatar yungis avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

geta-optimizely-extensions's Issues

GetFriendlyUrl returns null when indexing Search and Navigation for commerce content

add extensions method to be indexed, something like this:

ContentIndexer.Instance.Conventions.ForInstancesOf<Product>().ShouldIndex(_ => true);
clientConventions.ForInstancesOf<Product>().IncludeField(x => x.MyMethodThatCallsGetFriendlyUrl());

have site configuration as follows:
image

Commerce content(products and also categories)
product.ContentLink.GetFriendlyUrl() returns null
product.ContentLink.GetFriendlyUrl(product.Language?.TwoLetterISOLanguageName) returns null
for all products/all languages when indexed using Search and Navigation indexing job

In other scheduled jobs this product.ContentLink.GetFriendlyUrl(product.Language?.TwoLetterISOLanguageName) does return correct Url.

While CMS content:
articlePage.ContentLink.GetFriendlyUrl(articlePage.Language?.TwoLetterISOLanguageName) returns correct Url in ALL scheduled jobs

Also maybe it would be good to have:
product.GetFriendlyUrl() so that no language is needed to be passed in when you have content already

Exception ContentNotFound on GetFriendlyUrl in situation when content was deleted

We have cases when content was deleted in Optimizely, but not reindexed in find and we trying to get the URL of the removed content.
Is it possible to return an empty string for that case? So we won't need to handle the error at our level.

How to reproduce:

  • remove content and try to call GetFriendlyUrl with content reference of the removed content
  • exception ContentNotFound raised

Feature Request: Add Null Helper Attributes to IsNullOrEmpty or similar methods.

Feature Request:
Add Null Helper Attributes to IsNullOrEmpty or similar methods.

With CMS 12 and .NET 6 we are able to build projects that are defined as using nullable reference types. This is also the default for any new .NET 6.0 project. With this in mind, we can decorate input and output parameters on methods that allow the code analysis engine to understand if something is potentially null and encouraging null checking/handling within custom code.

e.g.

public static bool IsNullOrEmpty(this ContentReference contentReference)
{
    return ContentReference.IsNullOrEmpty(contentReference);
}

Could be declared as

public static bool IsNullOrEmpty([NotNullWhen(false)] this ContentReference? contentReference)
{
	return ContentReference.IsNullOrEmpty(contentReference);
}

GetChildren in ContentReferenceExtensions missing LoaderOptions

options is not used in call:
public static IEnumerable GetChildren(this ContentReference contentReference, LoaderOptions options) where T : IContentData
{
if (contentReference.IsNullOrEmpty())
{
return Enumerable.Empty();
}

        var repository = ServiceLocator.Current.GetInstance<IContentLoader>();
        return repository.GetChildren<T>(contentReference);
    }

Exception on startup

after i installed this package i got this error on startup:

System.TypeLoadException
HResult=0x80131522
Message=Could not load type 'EPiServer.Shell.Navigation.Internal.NavigationOptions' from assembly 'EPiServer.Shell, Version=12.0.1.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7'.
Source=EPiServer.Cms.AspNetCore.Migration
StackTrace:
at EPiServer.Shell.ShellConfigurationInitialization.ConfigureContainer(ServiceConfigurationContext context)
at EPiServer.Framework.Initialization.Internal.ModuleNode.<>c__DisplayClass4_0.b__0()
at EPiServer.Framework.Initialization.Internal.ModuleNode.Execute(Action a, String key)
at EPiServer.Framework.Initialization.Internal.ModuleNode.ConfigureContainer(ServiceConfigurationContext context)
at EPiServer.Framework.Initialization.InitializationEngine.ConfigureCurrentModules(Boolean final)
at EPiServer.Framework.Initialization.InitializationEngine.ConfigureModules(IEnumerable`1 modules)
at Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions.AddCmsHost(IServiceCollection services)
at Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions.AddCms(IServiceCollection services)
at Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions.AddCommerce(IServiceCollection services)
at Valtech.Kb.Cms.Startup.ConfigureServices(IServiceCollection services) in C:\Projects\KB\Webprogram\Valtech.Kb.Cms\Startup.cs:line 80

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.