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

PropertyList not working - can not be mapped to a MetaDataType

$
0
0

I'm on EPiServer CMS 9.6.1 and have been following Per Magne Skuseth's blog post "Trying out PropertyList". I can see plenty of others commenting on that post who have gotten much further so it must be possible.. But for me when I have the property like this:

public virtual IList CustomerSkus { get; set; }

I keep getting the NotSupportedException with "The property data type IList can not be mapped to a MetaDataType".

And I've tried putting [BackingType(typeof(CustomerSkuListProperty))] and I then get NotSupportedException "The property data type Json can not be mapped to a MetaDataType".

I have definitely included the:

[PropertyDefinitionTypePlugIn]
public class CustomerSkuListProperty : PropertyListBase
{ }

And have copied the PropertyListBase exactly as in his post so cannot figure why I get those exceptions..

Oh and the CustomerSku class is pretty simple like this:

public CustomerSku
{
    public string AccountNumer { get; set; }
    public string Sku { get; set; }
}

Anything I might have missed?


Episerver Find Typed search and fallback languages

$
0
0

We have a customer that has limited content available in English. If content is not available in English then they want to fallback to Dutch. So far so good, and in the CMS itself this works fine. However, when using Find to get a list of all pages of a specific type we can only get pages back in the current language without fallback. According to this page on Episerver World we can get results from a different language by calling InLanguageBranch, but here we can only specify a single language branch. We need GetContentResult to get the content in English if available, otherwise use the CMS setting for language fallback to get the Dutch version.

Is this possible at all? If so, how?

How to use ModifyMetadata attributes parameter

$
0
0

Hi! Can somebody explain to me how exactly to use the second parameter from the ModifyMetadata method?

In the documentation the description states: "The custom attributes attached to the model class."

What is the model class?

I have a propertylike this:

[EditorDescriptor(EditorDescriptorType = typeof(LinkItemLiteEditor))]
public virtual LinkItemCollection Links{ get; set; }

And I would like to add some parameters to be used in the ModifyMetadata method. Is it possible?

The goal is to use different linkItem editors for different LinkItemCollection properties.

Using a console app, how can I log in to Episerver

$
0
0

Using a console app, how can I log in to Episerver CMS so I can access an API that I need to be logged in for.

I then want to be able to use HttpRequest's to bring back data from the API that needs CMSAdmin credentials for example.

The version we are using is Episerver 7.5 and the authentication is Forms Authentication

Deploy using Powershell

$
0
0

I am trying to upload a package to a staging area but got this error when I use the command Get-EpiDeploymentPackageLocation:

API call failed! The error was: The remote server returned an error: (500) Internal Server Error.
{"success":false,"errors":["The destination resource group to upload package is missing for project:

What could have been missing?

After installing Vro.FindExportImport package getting assembly reference error

$
0
0

Hey Guys,

I am getting the following error when I try to install the Vro.FindExportImport package into my running project and also try in the Alloy sample project but getting the same error.

The framework version which already exists in my project:

  • EPiServer.Framework: 11.16.0.0
  • EPiServer.Find: 13.2.7.0
  • EPiServer.Find.Framework: 13.2.7.0
  • EPiServer.Find.Optimizations: 13.2.7.0

Any Idea how we can fix it?

Thanks

Forms in iframes... or not?

$
0
0

Hi All,

Hope you are staying safe.

I'll provide some background to what I'm trying to do, just incase I'm focusing on solving the wrong problem!

Background:

We recently implemented a caching strategy with the help of EPiServer's own Johan Antila. It's a full page cache based on David Knipe's caching with Visitor Groups, in which Johan modified the solution to also work with A/B testing. And it's awesome, we saw our TTFB drop from around 1 - 2s down to 200 - 500ms when the cached version of a page is requested. We are super happy, but then we discovered we had overlooked Forms! (how could we!?!) Antiforgery tokens and caching don't mix :/

I quickly modified the implementation to not cache a page if there was a form present, but a significant portion of our pages have a form on and it's ruining the good vibes. On top of that, we know that this is only a temporary solution until we can work out how to handle forms. Maybe some kind of donut hole caching mixed in with what we have? Or forms in an iframe?

My journey so far:

Given how close we are with the caching implementation, I've shied away from any donuts and I guess I fear that I'll end up going down that road eventually. But not before I've exhausted the iframe possibility.

And I feel like I've got quite far with an iframe solution. I've created an iframe block type. I've created a new form container page type to only hold a single form, and restricted the iframeblock to only reference a single one of these new formcontainerpages. The formcontainpage has it's own layout so I'm able to strip out any calls to the main site's javascript files and redundant meta tags etc and the result is a page containing just a form being loaded inside an iframe. The parent page is cached nicely and the iframed form container page is not, the antiforgerytoken stuff is all happy and forms are basically working.

Gotchas:

We like a thank you page! When users complete a form they are generally taken to a thank you page and we use that hit for conversion tracking etc. But no one wants to see the thank you page loaded just inside the iframe... I can of course write some js to use the MutationObserver api to detect when the iframe changes url and use that to redirect the parent page of the iframe, but this of course results in two hits to the thank you page and that just won't do.

For seemingly obvious security reasons, you can't use a window's onbeforeload event to grab the intended destination page and stop the iframe from requesting the thank you page before redirecting the parent page.

I thought perhaps I could hook into FormSubmissionFinalized event from Forms and somehow see the final destination url there, but I can't even see that firing even though the submission data in the CMS shows as finalized. But given the data submission stuff is all handled on the server, that was probablly a silly idea in the first place.

So I began wondering about custom actors. Could I write a custom actor which would optionally overwrite the redirecturl functionality of the forms and somehow hook that into the iframe to post a message to the parent and force the parent page to redirect instead?

My question(s):

So finally to my questions. Is that possible? How would that even work?

I've been looking at the decompiled code from Forms and from Forms.Demo and I can't quite see yet how that is implemented. I'm guessing that there'll be some code doing something like RedirectToAction(RedirectUrl? + FormSessionData) and I'd need an actor to overwrite that method. But then what? a custom action method which passes the data to a script I can then use in the iframe to assign window.top.location.href ?? I'm not really sure.

Am I barking up the completely wrong tree? Is the approach I am trying to take just not possible?

If anyone can help, I would be so so so grateful!

All the best,
Alex

EPiServer.Commerce 13.22.0 Requires EPiServer.CMS 11.17.0

$
0
0

Currently your most recent available feed is EPiServer.CMS 11.15.1


ReactJS error after installing Content Manager

$
0
0

Hi all,

I've recently installed the EPiServer.Labs.ContentManager NuGet package against our EPiServer solution. However, when I view the Content Manager page I am receiving the following JS errors:

Here is the line causing the error:

useEffect(() => {
onReload();
communicator.onSetContentLanguage(defaultLanguage.name); <------------------ Breaking here, defaultLanguage is undefined.
}, []);

I had a look at the CMS settings and seems there should be a default language:

I am wondering if anyone has any ideas how I would go about fixing this?

Note: EPiServer version installed is 11.15.1

Globalization setting in web.config is:

<globalization culture="en-AU" uiCulture="en-GB" requestEncoding="utf-8" responseEncoding="utf-8" resourceProviderFactoryType="EPiServer.Framework.Localization.LocalizationServiceResourceProviderFactory, EPiServer.Framework.AspNet" />

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.

Lucene Index on S3

$
0
0

Hi,

We have a load balanced Episerver 9 Commerce solution on Amazon, hosted on individual EC2 servers, 2 frontend instances and 1 authoring instance. Authoring instance is generating the full text indexes and save it to the file system which is shared between the 2 frontend instances.

Would it be possible to save the full text indexes to an S3 bucket and the frontend instances read from there instead on relying on a shared folder on the filesystem?

Is there any example I could use to implement this behaviour? Is it advisable to do it this way?

Autocomplete cache clear

$
0
0

It looks like when adding autocomplete results manually in Episerver Find 13, or when searching for a term and clicking a result, the autocomplete results returned from the search client are caching the list and we aren't seeing the new autocomplete items get returned by the search client until hours later. 

My 2 questions are:

1) What is the default duration on the autocomplete cache? 

2) Is there any way we can trigger a clear of the cache for autocomplete, or control the cache duration?

Thanks

Create multiple fields at the same time?

$
0
0

My customer wants two radio buttons, if a certain one of them is picked two text boxes should appear.

They want to be able to create this easily many times (building several huge forms where most of the questions are like this). The two text boxes and the radio buttons always have the same labels, it's only the question for the radio buttons that change. I'm looking for a way to only have them pick one forms element and write the question, and the three fields they want with the correct dependencies are auto created. What is the best approach to do this?

Forms - edit submitted form data

$
0
0

For Forms, I would like the option to edit submitted data (field-by-field). 

This can be handy in cases where someone made a typo before posting the form, and the typo is forever stuck in the data whenever you export it to a static format (xlsx, csv, etc).

Typical use case:

Using Episerver Forms for signup forms for an event. John Smith misspells his name "John Sith". The submitted data is exported as-is and circulated internally to the sales dept, or fed into a nametag print service, or another similar use case. It would be beneficial to fix the original data once and for all, instead of having to fix the typo in all copies of the data. (I know I'm sick of doing that, at least.)

Side-request: The option to set a form-wide setting to determine if the submitted form data should be editable. This would be handy for Forms instances where the submitted data should NOT be tampered with (e.g. for GDPR audit reasons).

OK, thxbye

Programatically select check box in EpiServer forms

$
0
0

I have a form residing on a page. I am doing some custom processing on submit event of the form. I have a need to do autofill some data elements and select or deselect check boxes based on some criteria.

Can't see anything in documentation for this. Can some one point me to a resource or help me achieve this.


Make form submission editable?

$
0
0

Is there any way of making a submission editable for the user after first submission, providing they have all identifiable information (form submission id etc)?

Use case:

User fills out a form about how they are working with sustainability in a project, by answering yes and no questions.

A month passes and the project has worked on their sustainability. The user wants to update a few questions with "yes" instead of "no", without having to fill out the entire form again (it's many questions).

System.NullReferenceException: Object reference not set to an instance of an object.

$
0
0

Hi, I'm following excerise for setting up EPiserver webpage and I've followed every steps and there no red lines errors on the code editor, but when I'm testing the web page it shows error.  

Line 3:  @model PageViewModel<AlloyTraining.Models.Pages.StartPage>
Line 4:  <h1 @Html.EditAttributes(m => m.CurrentPage.Heading)>Line 5:     @(Model.CurrentPage.Heading ?? Model.CurrentPage.Name)
Line 6:  </h1>
Line 7:  <div>

Source File: c:\Episerver\CMSTraining\AlloyTraining\Views\StartPage\index.cshtml    Line: 5

Stacktrace:

[NullReferenceException: Object reference not set to an instance of an object.]
   ASP._Page_Views_StartPage_index_cshtml.Execute() in c:\Episerver\CMSTraining\AlloyTraining\Views\StartPage\index.cshtml:5
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +197
   System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +105
   System.Web.WebPages.StartPage.RunPage() +17
   System.Web.WebPages.StartPage.ExecutePageHierarchy() +64
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +78
   System.Web.Mvc.RazorView.RenderView(ViewContext viewContext, TextWriter writer, Object instance) +235
   System.Web.Mvc.BuildManagerCompiledView.Render(ViewContext viewContext, TextWriter writer) +107
   System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) +291
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResult(ControllerContext controllerContext, ActionResult actionResult) +13
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +56
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +420
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +420
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +420
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +420
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +420
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +420
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult) +52
   System.Web.Mvc.Async.<>c__DisplayClass2b.<BeginInvokeAction>b__1c() +173
   System.Web.Mvc.Async.<>c__DisplayClass21.<BeginInvokeAction>b__1e(IAsyncResult asyncResult) +100
   System.Web.Mvc.Async.WrappedAsyncResult`1.CallEndDelegate(IAsyncResult asyncResult) +10
   System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +49
   System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) +27
   System.Web.Mvc.Controller.<BeginExecuteCore>b__1d(IAsyncResult asyncResult, ExecuteCoreState innerState) +13
   System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +29
   System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +49
   System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +36
   System.Web.Mvc.Controller.<BeginExecute>b__15(IAsyncResult asyncResult, Controller controller) +12
   System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +22
   System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +49
   System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +26
   System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.EndExecute(IAsyncResult asyncResult) +10
   System.Web.Mvc.MvcHandler.<BeginProcessRequest>b__5(IAsyncResult asyncResult, ProcessRequestState innerState) +21
   System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +29
   System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +49
   System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +28
   System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +9
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +9836613
   System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +50
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +163

Color Picker property in Episerver

$
0
0

Hi,

I want to add a Colorpicker property in CMS which shows all the colors.

I have used dijit/ColorPalatte but it only shows limited colors.

For example .. [Display(Name = "Background Color", GroupName = PropertyGroupNames.Content, Order = 20)]
[ClientEditor(ClientEditingClass = "dijit/ColorPalette")]
public virtual string BackgroundColor { get; set; }

Please suggest.

Find v13.2.6.0 - Unified Search - Storing Lists as part of SearchMetadata

$
0
0

Hi All, 

I've ran into a problem that I'm hoping someone can help me with.

I've written a unified search solution, but need a way of storing additional metadata to items I'm surfacing in search, that will be used to filter against, and build facets from. 

The information I need to store against the unified search items are originally entered via properties decorated with SelectMany attribute (essentially a collection of checkboxes in the CMS UI, stored as a comma separated string)

[SelectMany(SelectionFactoryType = typeof(EnumSelectionFactory<T>))]
        [Display(
            Name = "Document Type",
            Order = 50)]
        [Required]
        public virtual string DocumentType { get; set; }

I then want to ideally store this information as a List<string> but there is nowhere on an ISearchContent type where I can assign the value - there is only one property on this type thats of type IEnumerable ("Categories" - ref: https://world.episerver.com/documentation/developer-guides/search-navigation/NET-Client-API/searching/Unified-search/), but I will need to store many lists of strings - not just the one example above, but up to 6-7 lists potentially. 

I then need to create a FilterBuilder and match on any of the values in the stored string - by conventional means there is no DelegateFilterBuilder I can see that would allow me to do this - there are obviously ones that work on collections, but I can't get the content into the Find index as part of the SearchMetadata as a collection! 

https://world.episerver.com/documentation/developer-guides/search-navigation/NET-Client-API/searching/Filtering/Strings/ 

It looks like my options are limited with ISearchContent - can anyone advise where to go from here? 

Is it possible to create my own DelegateFilterBuilder that splits the stored value and then filters based on that? 

Thanks!

Paul 

Change episerver user language programmatically

$
0
0

Hi

Is it possible to change a episerver uses language programmatically?

We have many (>10000) users and i need to set all language to danish. I tried to change it directly in the database in the Profiles table of the membership database, and that does change the "Personal Language" setting on the Display Options tab but it does not change the language anyware else. I tried resetting IIS and use inconito browser but the issue persists. So i must do something wrong maybe i can use an API instead of direct manipulation in the database?

I am on a 2 month old version of Episerver

Viewing all 6894 articles
Browse latest View live