Quantcast
Channel: Optimizely Search & Navigation
Viewing all 6894 articles
Browse latest View live

Episerver Self-Optimizing Block 404 (CMS 10.9.1.0)

$
0
0

We have installed version 2.3.0 of EPiServer.Cms.AddOns.Blocks the latest version compatible with CMS 10.9.1.0 but when trying to use in the On-Page Editing view is throwing the following error. 

I've seen one other pots about a similar issue but no replies


episerver failed to copy page exception: content with guid "00000000-0000-0000-0000-000000000000" was not found - using 7.5

$
0
0

Hi,

When I copy and paste a page in the CMS (version 7.5) I get the following error pop up:

episerver failed to copy page exception: XXXX {page name} content with guid "00000000-0000-0000-0000-000000000000" was not found

Does anyone have any ideas on how I can fix this?

Thanks

Jon

GroupName Ignored after MigrationStep Property Rename

$
0
0

Hi Guys

I recently renamed a property to a new name. I created a MigrationStep (https://world.episerver.com/documentation/developer-guides/CMS/Content/Refactoring-content-type-classes/) to manage the name change.

The migration went ok, the property is renamed, the data is in there, BUT the GroupName is ignored - the property is now in Content.

It looks exactly the same issue as this: https://world.episerver.com/forum/legacy-forums/Episerver-7-CMS/Thread-Container/2013/7/GroupName-not-getting-updated-from-code/ but it seems it still hasn't been fixed as I am on EPiServer.CMS v11.13.2 and that was about EPiServer 7.

I found the reason is that in tblPropertyDefinition, the MigrationStep set the Advanced property from NULL to 0.

If I change the property to NULL manually (on my local copy of the db) then the content is in the correct tab, the same one the original property was in. 

Is there a way to set that Advanced field to null in code without actually going via the DB? Is there something I did wrong? 

Small icons for custom form-elements

$
0
0

Hi,

I created some custom form-elements and I whant to set the small icon shown in the form-element listings in Edit-mode. According to the documentation the icons are sett using the css class ".epi-forms-icon.epi-forms-icon--small.epi-forms-*****__icon", where ***** is the name of the element.

Link to documentation: https://world.episerver.com/documentation/developer-guides/forms/creating-form-element-with-validator/

Now to the problem, where do I put the CSS file? I now use module.config in root using "epi-cms.widgets.base" to locate my css file, but this feels like a hack. Is this the way to go or is there another solution to this problem?

Another thing: ".epi-forms-icon.epi-forms-icon--small.epi-forms-mycustomelementblock__icon" only sets style for the small icon in the selection menu not the small icon in the row of elements in selected form elements. See Image below

EPiServer.Find.LambdaExpressionExtensions._cache keeps growing indefinately

$
0
0

The private static field EPiServer.Find.LambdaExpressionExtensions._cache keeps growing indefinately even when executing the same query and receiving the same result over and over. This will eventually lead to the worker process running out of memory (in our case, quite frequently).

Below is a code snippet that re-creates the behavior.

// The simplest possible query returning the same result every time will still
// increase the number of entries in the cache.

var cacheField = typeof(LambdaExpressionExtensions)
    .GetField("_cache", BindingFlags.NonPublic | BindingFlags.Static);

var cache = cacheField.GetValue(null) as ConcurrentDictionary<Expression, Delegate>;

cache.Clear();

Debug.Assert(cache.Count == 0);

var findClient = ServiceLocator.Current.GetInstance<IClient>();

// Make the simplest possible query to return one hit.

var firstHits = findClient.UnifiedSearch().Take(1).GetResult().Hits.ToList();

Debug.Assert(firstHits.Count == 1);

var firstHitID = firstHits[0].Id;

var firstHitCacheCount = cache.Count;

// The initial query should of course add entries to the cache. About 25 in my case.
Debug.Assert(firstHitCacheCount > 0);

// Make the same query in a loop.
for (var i = 0; i < 10; i++)
{
    var loopedHits = findClient.UnifiedSearch().Take(1).GetResult().Hits.ToList();

    Debug.Assert(loopedHits.Count == 1);

    var loopedHitID = loopedHits[0].Id;

    Debug.Assert(loopedHitID == firstHitID);

    var loopedHitCacheCount = cache.Count;

    // Given the same search query and the same result, the cache should not grow.
    // It grows with each iteration.
    Debug.Assert(loopedHitCacheCount <= firstHitCacheCount);
}

Make LinkItem a valid property type

$
0
0

LinkItemCollection is great but if you only want one link it would be nice to be able to create a LinkItem property.

Error Connecting to Find

$
0
0

Hello,

I'm in the process of trying to set up Episerver Find to work with the Content Delivery API service.

Currently I'm on the part 2 of Getting Started: Creating Your Project  and one thing I immediately noticed is that the UI Episerver's backend has changed. It's now blue and the menu has been slightly altered. Why is that?

Also, When I follow the directions at the bottom that state "Log in to the CMS edit view, go to Find, select Overview, and Explore to view the index." When I do this I receieve a message on the page that "The Find user interface is currently not available, please try again later". I'm not sure why this is happening and the documentation doesn't seem to reference this at all even though I've followed it very closely.

Any help would be greatly appreciated.

When will the block enhancements update be available?

$
0
0

Was hoping for just a general estimate on when this update will be release. Q1 2020?


Content Delivery API Search: Internal Server Error

$
0
0

Hello,

I'm running a clean install of Alloy with Episerver.ContentDeliveryApi.CMS, .Core, .OAuth, .Search installed with contentapiread user group setup and created an Initialization module that sets the default minimum role to Empty. 

For some reason when I try to run a GET Request like http://localhost:{number}/api/episerver/v2.0/search/content/?filter=ContentType/any(t:t eq 'StartPage')

in Postman I get {"error":{"code":"InternalServerError","message":"Unable to retrieve search response"}}.

Screenshot: https://drive.google.com/file/d/1qOtI6PoQ1Bk3CWUZRnFkp3RIzgssRWB7/view?usp=sharing

Why is this occuring? 

Have Episerver Find use the "SynchronizedObjectInstanceCache" when using "StaticallyCacheFor"

$
0
0

"StaticallyCacheFor" in Episerver Find uses the "HttpRuntime.Cache". Using the "SynchronizedObjectInstanceCache" instead would reduce the amount of requests to Episerver Find when running a lot of instances.

Pages and interface inheritance

$
0
0

I have pages that implements interfaces with inheritance. When I pass a page to a view that expects the interface, the inherited properties are missing.

public class StandardPage : PageData, IMainBody
{
        [CultureSpecific]
        [Display(Name = "Main intro")]
        public virtual XhtmlString MainIntro { get; set; }
        [CultureSpecific]
        [Display(Name = "Main body")]
        public virtual XhtmlString MainBody { get; set; }
}
public interface IMainBody : IBody
{
}
public interface IBody
{
        XhtmlString MainBody { get; set; }
}

I can add the property to both interfaces and then it works fine.

public class StandardPage : PageData, IMainBody
{
        [CultureSpecific]
        [Display(Name = "Main intro")]
        public virtual XhtmlString MainIntro { get; set; }
        [CultureSpecific]
        [Display(Name = "Main body")]
        public virtual XhtmlString MainBody { get; set; }
}
public interface IMainBody : IBody
{
        XhtmlString MainBody { get; set; }
}
public interface IBody
{
        XhtmlString MainBody { get; set; }
}

Am I misunderstanding how this should work, and this is expected?

Error when changing password in Admin mode after migrating to asp Identity

$
0
0

I have migrated an existing Episerver site to ASP.Identity, pretty much following K Khans blogpost. The site is running newest version of Episerver. At first I was struggeling to get Episervers Identity implementation (using UIUserProvider, UIRoleProvider and UISignInManager) to work with Structure map. After explicit adding interfaces and abstract classes to Structure map config, I've got everything to work except validating a users password when creating or updating users in admin mode: 

Unable to cast object of type 'Microsoft.AspNet.Identity.MinimumLengthValidator' to type 'Microsoft.AspNet.Identity.PasswordValidator'.

Stack trace:
at EPiServer.Cms.UI.AspNetIdentity.ApplicationUserProvider`1.get_MinRequiredPasswordLength() at EPiServer.UI.Edit.UserMembership.ValidatePassword() at EPiServer.UI.Edit.UserMembership.SaveMembershipUser(IEnumerable`1& errors)

at EPiServer.UI.Edit.UserMembership.SaveButton_Click(Object sender, EventArgs e)

I guess there is a simple solution to this, but I've already spent way too much time trying to make it work. Any help or suggestions are greatly appreciated.

Thanks in advance,
Tore.

From Structure map config:

x.For<ApplicationUserManager<ApplicationUser>>().Use<ApplicationUserManager<ApplicationUser>>().SetLifecycleTo<HybridLifecycle>();
x.For<ServiceAccessor<ApplicationUserManager<ApplicationUser>>>().Use(co => new ServiceAccessor<ApplicationUserManager<ApplicationUser>>(() => co.GetInstance<ApplicationUserManager<ApplicationUser>>()));
x.For<UIUserProvider>().Use<ApplicationUserProvider<ApplicationUser>>().SetLifecycleTo<HybridLifecycle>();
x.For<ServiceAccessor<UIUserProvider>>().Use(co => new ServiceAccessor<ApplicationUserProvider<ApplicationUser>>(() => co.GetInstance<ApplicationUserProvider<ApplicationUser>>()));
x.For<UIUserManager>().Use<ApplicationUIUserManager<ApplicationUser>>().SetLifecycleTo<HybridLifecycle>();
x.For<ServiceAccessor<UIUserManager>>().Use(co => new ServiceAccessor<ApplicationUIUserManager<ApplicationUser>>(() => co.GetInstance<ApplicationUIUserManager<ApplicationUser>>()));
x.For<UIRoleProvider>().Use<ApplicationRoleProvider<ApplicationUser>>().SetLifecycleTo<HybridLifecycle>();
x.For<ServiceAccessor<UIRoleProvider>>().Use(co => new ServiceAccessor<ApplicationRoleProvider<ApplicationUser>>(() => co.GetInstance<ApplicationRoleProvider<ApplicationUser>>()));
x.For<ApplicationRoleManager<ApplicationUser>>().Use<ApplicationRoleManager<ApplicationUser>>().SetLifecycleTo<HybridLifecycle>();
x.For<ServiceAccessor<ApplicationRoleManager<ApplicationUser>>>().Use(co => new ServiceAccessor<ApplicationRoleManager<ApplicationUser>>(() => co.GetInstance<ApplicationRoleManager<ApplicationUser>>()));
x.For<ApplicationRoleProvider<ApplicationUser>>().Use<ApplicationRoleProvider<ApplicationUser>>().SetLifecycleTo<HybridLifecycle>();
x.For<ServiceAccessor<ApplicationRoleProvider<ApplicationUser>>>().Use(co => new ServiceAccessor<ApplicationRoleProvider<ApplicationUser>>(() => co.GetInstance<ApplicationRoleProvider<ApplicationUser>>()));
x.For<IUserStore<ApplicationUser>>().Use<UserStore<ApplicationUser>>();
x.For<DbContext>().Use(() => new ApplicationDbContext<ApplicationUser>());
x.For<IAuthenticationManager>().Use(() => HttpContext.Current.GetOwinContext().Authentication);

episerver failed to copy page exception: content with guid "00000000-0000-0000-0000-000000000000" was not found - using 7.5

$
0
0

Hi,

When I copy and paste a page in the CMS (version 7.5) I get the following error pop up:

episerver failed to copy page exception: XXXX {page name} content with guid "00000000-0000-0000-0000-000000000000" was not found

Does anyone have any ideas on how I can fix this?

Thanks

Jon

TinyMce button only for a specific role

$
0
0

I would like to add a toolbar button to TinyMce (EPiServer.CMS.TinyMce 2.8.0) that is only visible for editors with a specific role. I have solved this by adding this simplified code to an initialize module:

config
.Default()

.Toolbar($"bold italic-only-for-super-editors")
...

In my editor descriptor for XhtmlStrings I simply replace all icon names with the suffix '-only-for-super-editors' with the prefix if the user has the specific role, otherwise I just remove this icon. This will solve my problem.

But, this solution feels ugly. Is there a more beutiful solution?

How to create google invisible ReCaptcha on episerver form

$
0
0

Hi,

Currently, we are using Episerver forms google ReCaptcha element on Episerver form. Now we have to make it invisible captcha, so how could we make it? 

When we add ReCaptcha property 'data-size' to 'invisible', it does not go to the validators.

Br,

Suresh


Content Delivery API: Why Can't I Use Search?

$
0
0

Hello,

I've installed the Alloy Demo Kit, installed CDN, Find, and everything's been configured to work together thanks to the documentation. I'm now able to make GET requests with Postman and my browser to see content.

What I want to do now is make calls which search for multiple pages but whenever I use search in my URL(ex: "http://localhost:xxxxx/api/episerver/v2.0/search/content?top=5") string I always get 404-Not Found.

Are there additional steps I need to complete in order to make this type of call work?

new cms ui navigation - what namespace is @Html.ApplyFullscreenPlatformNavigation in?

$
0
0

I have a custom page I'm adding to the Episerver UI, and I'm following the guides for implementing the new "blue" UI / navigation:

But I'm getting an error when I reference this extension method: @Html.Raw(Html.ApplyPlatformNavigation()). What using statement should I have in my view (or in web.config) for this?

Questions about TermsFacetFor and AllTerms

$
0
0

Does TermsFacetFor return the facet count as in an un-filtered search although a filter is applied?

On my site, I have two facets: PropertyA and PropertyB. Say, that I have two pages on my site. The first page has the following values:

PropertyA = 1

PropertyB = 2

The second page has

PropertyA = 4

PropertyB = 5

If I filter my results on PropertyA==1, like:

search.Filter(x => x.PropertyA.In([1]))

and I apply TermsFacetFor() for both PropertyA and PropertyB during my search, one should think that my facets in the search result would hold only TermCounts for the values of PropertyB that are among the search results, that is, 2. But when I run the tests, TermsCounts are returned for both 2 and 5 in the facet for PropertyB.

Is that correct behaviour?

Will AllTerms=true always return facets for all languages?

I have a site that is available in Danish and English. When I set AllTerms=true inside TermsFacetFor, it seems that the list of TermsFacet objects holds TermCounts for all facet values in both Danish and English, although I have specified the search to be within one language, fx. I set

search.FilterForVisitor("en")

Say, that I invoke TermsFacetFor to get facets for my property PropertyC. This is a culture-specific property, so the value of PropertyC can be "XXX" in English and "YYY" in Danish on the same page. When I apply TermsFacetFor with AllTerms = true in my search, I get a TermCount object for both "XXX" and "YYY".

Is that correct behaviour or am I missing something?

Thanks!

Localization with CDN Page Caching

$
0
0

Hi,

We have a Episerver 11 website hosted in Azure DXC. We have our own Akamai CDN on top of in built Cloudflare offered by DXC.

We are caching the entire page along with Html etc in Akamai cache.

We were using Episerver default xml localization strucuture to show the localized text for the properties, but now we are planning to move to Database architecture instead of XML files in the solution, So that editors can make changes dynamically on live site. I am using https://blog.tech-fellow.net/2016/03/01/episerver-database-localization-provider-released/ for achieving this.

My question is, as we are caching the entire page, there can be some properties which multiple pages must in used in. So, a single change will impact multiple pages which are cached, those needs to be refreshed with changed content. Does anyone know how can we solve this issue considering the solution I am going to use mentioned in the link above.

Please let me know if anyone have encountered this kind of issue, or need more clarification.

Best Regards,

Sanket Mahimkar

Add filtersBuilders together

$
0
0

as per this answer: 

https://world.episerver.com/forum/developer-forum/EPiServer-Search/Thread-Container/2016/11/multiple-filter-group/#172178

it appears that filters can be added together when filtering like so... 

.For(query).Filter(filterBuilder | HashfilterBuilder)

but when I try to add them together myself the compiler complains...

myFilterBuilder = myFilterBuilder | (MethodThatReturnsAFilterBuilder());

but the list of filters are going to be dynamic, a user could select any grouping of filters, and we've a central re-usable method that is expecting a single filterBuilder for filtering

How do i add filterBuilders together? Or achieve something that does the same thing?

Viewing all 6894 articles
Browse latest View live