Quantcast
Channel: Customized Commerce 13 and earlier versions
Viewing all 9642 articles
Browse latest View live

A/B Testing Performance Issue

$
0
0

Hi, 

We are currently investigating some performance issues for a client, and it seems like the issues only appears once one or more A/B tests are running on the site.

When we set up A/B tests we get a lot of the following exceptions in the log files:

System.InvalidOperationException: ValueFactory attempted to access the Value property of this instance.
   at System.Lazy`1.CreateValue()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Lazy`1.get_Value()
   at EPiServer.Marketing.Testing.Web.TestHandler.EvaluateKpis(Object sender, EventArgs e)

This is happning even though we are using EPI server 11.

In sum this leads me to believe that there are some performance challenges with the EPiServer A/B testing module. 

Has anyone else seen this?


OrderContext.FindPurchaseOrdersByStatus gives SQL Error

$
0
0

Yesterday we installed the latest version of Episerver Commerce. It seems that the way how FindPurchaseOrdersByStatus method in OrderContext works has been changed. Already dived into the decompiled code and found out that there is a bug in the query which is executed. The single quotes are missing in the IN operator in the Where Clause, which causes SQL to return the error "Invalid column name 'InProgress'" when filtering on all orders which are InProgress. Can this be logged as bug?

How can i see mapped roles in virtual roles

404 behaviour inconsistent

$
0
0

Why is it that 404 behaviour is inconsistent:

These bad urls produce different outcomes:

These urls go to our custom 404

https://www.gknpm.com/en/our-businesses/gkn-sinter-metalss/
https://www.gknpm.com/en/our-businesses/gkn-sinter-metalss


This URL goes to a server 404

https://www.gknpm.com/en/our-businesses/gkn-sinter-metals/s


Can anyone tell me what is going on here?

Regards,
Marshall

Officially supported .NET versions

$
0
0

Hello, everyone!

On the EPiServer System Requirements page I see the line with the concrete versions "Microsoft .NET Framework 4.6.1 or 4.7".

Could anybody know are 4.6.2 / 4.7.1 supported? What about other versions 4.6+?

Happy coding!

How can I return all published pages with their page types in an EPiServer 8.0 site?

$
0
0

We'd like to return a list of all pages with their page types from an EPiServer 8.0 site.  Preferably I'd like to do this within a navigation structure via a list of ContentAreaItem objects. But I found an example that suggests the FindAllPagesWithCriteria method.  But I'm having difficulty creating the criteria object.

What we would like to see is everything that is published.  Below is what I have.  But it's unclear to me how to define the criteria as give us all the pages that are published.

var criteria = // What do I put here?
var queryService = ServiceLocator.Current.GetInstance<IPageCriteriaQueryService>();
var pages = queryService.FindAllPagesWithCriteria(PageReference.StartPage, criteria, "en", new LanguageSelector("en"));

The other (preferred) alternative is this: can I get the page type from a ContentAreaItem object?  I've got some navigation tree code that has an IList<ContentAreaItem> list of items.  If I can get the Page Type from a ContentAreaItem, it would be even better.

Thanks for your help.

Test Automation for EPI-CMS

$
0
0

Hi everyone, 

I'm new to EPI server. Looking for an advice to kick start my test automation on EPI-CMS.

Has anyone done it before using any software automation tools? if so, I would love to you know your experience working on the project.

I know the UI automation is going to be quite brittle due to the nature of ecommerce sites.

Kindly, let me know you thoughts and approach towards my test strategy.

Many Thanks,

Raj

Add Epi Forms Dependencies functionality to Rich text (with placeholders) form element.

$
0
0

It would be nice if in Epi Forms we could set dependencies on Rich text (with placeholders) form elements so pieces of content could be shown to users if for example they select a particular topic in a dropdpwn. 

(Would also be nice to have a content area form element to add blocks of content into the form e.g. show a list of FAQs)


UrlResolver instance is null

$
0
0

Hi,

I am trying to get a friendly-url for a page of type ContentReference (property in site settings) in another page's controller.

In site settings:

public virtual ContentReference NewsletterSuccessPageRef { get; set; }

In the base controller I am populating the "Model" in override method OnActionExecuting():

protected override void OnActionExecuting(ActionExecutingContext filterContext)
		{
			base.OnActionExecuting(filterContext);
			var currentPage = filterContext.ActionParameters.First(ap => ap.Value is TPage).Value as TPage;
			var currentContent = filterContext.ActionParameters.First(ap => ap.Value is TContent).Value as TContent;
			Model = filterContext.ActionParameters.FirstOrDefault(ap => ap.Value is TViewModel).Value as TViewModel;
			InitializeModel(currentPage, currentContent);
		}

Other page's controller:

var urlResolver = ServiceLocator.Current.GetInstance<UrlResolver>();
var url = urlResolver.GetUrl(Model.SiteSettings.NewsletterSuccessPageRef);

But I get a NullReference exception on line 21:

Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error: 
Line 19: 
Line 20: 			var urlResolver = ServiceLocator.Current.GetInstance<IUrlResolver>();
Line 21: 			var url = urlResolver.GetUrl(Model.SiteSettings.NewsletterSuccessPageRef);
Line 22: 

Debugging shows that neither the "urlResolver" nor the "SiteSettings.NewsletterSuccessPageRef" are null.

Any ideas why?

Regards,

Micha

Create new ShippingProvider programmatically

$
0
0

Is there any way to create ShippingProvider programmatically? I need a shipping provider, not a shipping method. I can't find nothing about that.

Thanks!

What ElasticSearch version used with demo index?

Episerver Forms auto trigger Recaptcha

$
0
0

Hello

Has anyone coded Forms to automatically trigger recaptcha instead of having to rely on the editors to add it?

//Patrik

'504 - Gateway Timeout' when Indexing the items

$
0
0

When Indexing the items, it fails sometimes and it gives,

The remote server returned an error: (504) Gateway Timeout. [The remote server returned an error: (504) Gateway Timeout.]

The Indexing logic is here as below, 

    var client = EPiServer.Find.Framework.SearchClient.Instance;
    List<ItemModel> items = getItems(); // Get more than 1000 items
    List<ItemModel> tempItems = new List<ItemModel>();
    //Index 50 items at a time
    foreach(var item in items)
    {
        tempItems.Add(item);
        if (tempItems.Count == 50)
        {
            client.Index(tempItems);
            tempItems.Clear();
        }
    }


What causes this to happen ?

Additional info:

EPiServer.Find.Framework version 13.0.1
EPiServer.CMS.Core version 11.9.2

Custom MetaFields and Database Indexes

$
0
0

In our Commerce Setup we have some custom fields defined on Organization and Address Objects. We also need to perform queries on those specific columns as they contain unique id's of external systems. We use FiltersElements for that in combination with BusinessManager.List method. However this is causing serious expensive queries on the database (causing high loads and time-outs) as those custom fields are not indexed. When we manually put indexes on those fields in the database the performance increases significantly. I'm wondering if it is possible to let Commerce set indexes on those custom columns by code when we create those custom metadata fields or that we have to custom code ourselves to create indexes?

Epi Forms nuget package 4.18 has broken our epi CMS Edit page.

$
0
0

We've loaded epi Forms nuget package in our epi 11 domain and now when we go to to the epi CMS nothing displays. The Edit tab contents are blank.

The only error we see in dev tools is this. "widgets.js:2 OBSOLETE: epi/shell/_StatefulGetterSetterMixin Use dojo/Stateful custom setters/getters instead". Reading another thread, this can't be our issue.

This has left our episerver unuable. Our only solution we can think is is to uninstall the Forms Add-On.


Name in URL throws 404

$
0
0

I have a strange problem that i cannot figure out why this is happening?

On my CMS side i have a Page Type called Segment
It has a property that points to a Catalog Category
The "name in the URL" property is set to Enduro on the Segment page

The Category in the Commerce has also the same "name in URL".

I have multiple of this segment/Catalog pages. I have only problem with this one, called Enduro.

For Czech language i have altered the Web address prefix to cz.

The Czech language has a fallback to English.

Now, if i clone the Enduro Segment page, it will get "name in Url" = enduro2

If i go to domain/cz/enduro2, everything work tip top.
if i go to domain/cz/enduro, i get 404???

if i go to domain/cs/endoro, Works
if i go to domain/cs-CZ/endoro, Works

Futhermore, when looking/debuging in the code (Episerver.dll)

in public virtual IRouteHandler GetRouteHandler(RequestContext requestContext)

the language past in is [en] for cs and cs-cz
but for cz language i get cs-CZ.
It seems like somewhere in the code there is a error. It seems like the fallback does not work for what ever reason?
And so far i know i only have the problem with "name in URL" Enduro

Any suggestions on how to debug this and get some more info why this is happening?


Indexcontent.aspx throwing permissions error on latest version

$
0
0

While setting up Search on a v11 instance, I noticed that clicking "Index content" in the admin section throws a permissions error. There was one other forum post which hinted at the admin role being the cause of the issue, but I'm not really doing anything crazy for mapped roles. Just one named AD group and thats it.

Has anyone else ran across this before? Below is the detailed error

The assembly or AppDomain that failed was:
mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
System.Security.SecurityException: Request for principal permission failed.
   at System.Security.Permissions.PrincipalPermission.ThrowSecurityException()
   at System.Security.Permissions.PrincipalPermission.Demand()
   at System.Security.PermissionSet.DemandNonCAS()
   at EPiServer.UI.Admin.IndexContent..ctor()
   at ASP.episerver_episerver_search_cms_indexcontent_aspx..ctor() in c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\61a7374b\1e1d9993\App_Web_nea3ffuq.0.cs:line 0
   at __ASP.FastObjectFactory_app_web_nea3ffuq.Create_ASP_episerver_episerver_search_cms_indexcontent_aspx() in c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\61a7374b\1e1d9993\App_Web_nea3ffuq.1.cs:line 0
   at System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp)
   at System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath)
   at System.Web.HttpApplication.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
The action that failed was:
Demand
The type of the first permission that failed was:
System.Security.Permissions.PrincipalPermission
The first permission that failed was:<IPermission class="System.Security.Permissions.PrincipalPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
version="1"><Identity Authenticated="true"
Role="WebAdmins"/><Identity Authenticated="true"
Role="Administrators"/></IPermission>
The demand was for:<IPermission class="System.Security.Permissions.PrincipalPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
version="1"><Identity Authenticated="true"
Role="WebAdmins"/><Identity Authenticated="true"
Role="Administrators"/></IPermission>

EPiServer - GetChildren from Nested File Structure by Name

$
0
0

I am new to EPiServer so please let me know if there is a such library
dedicated for this specific use.

This is my problem:

Based on a given referencePath and Image name , I need to **getChildren()** of each given
folder so I can find the next folder by its name and GetChildren() and so an until I hit the last folder to get Image by its name to return its **contentLink**.

Referencepath : MomDirectory > Children1a > SubChildren > Images > Bad
Images > Img1.jpg

In EpiServer , I have contentFolderstructure like this

Family Directory

- MomDirectory 1

- Children 1a
- SubChildren
- img.jpg
- img1.jpg
- imgN.jpg
....
- Children 1b
- img.jpg
- img1.jpg
- imgN.jpg
....
- Children 1c
- SubChildren
- Images
- Bad Images
- img.jpg
- img1.jpg
- imgN.jpg
- Good Images
- img.jpg
- img1.jpg
- imgN.jpg
....
- - FatherDirectory 2
- Children 2a
- SubChildren
- img.jpg
- img1.jpg
- imgN.jpg
....
- Children 1b
- SubChildren
- img.jpg
- img1.jpg
- imgN.jpg
....
- Children 1c
- SubChildren
- img.jpg
- img1.jpg
- imgN.jpg
....


As I mentioned the very last folder contains the images where I get the final result I need which the contentReference of the image.
The below code is a manual way based on the sample referencePath. As you can see I get the first folder and gets its children to find the next folder and again get its children to find the next and so on.

// opening the family directory
var list = this._contentLoader.GetChildren<IContent>
(familyDirectory).ToList();
// finding the momDirectory by Name
var imageFolder = list.FirstOrDefault(x => x.Name.ToLower() ==
MomDirectoryName.ToLower());
// Get its Children
var list1 = this._contentLoader.GetChildren<IContent>
(imageFolder.ContentLink).ToList();
// find the Children Direcoctory by its Name from the MomChildren List
var imageFolder2 = list1.FirstOrDefault(x => x.Name.ToLower() ==
testName2.ToLower());
var list3 = this._contentLoader.GetChildren<IContent>
(imageFolder2.ContentLink).ToList();
var imageFolder3 = list3.FirstOrDefault(x => x.Name.ToLower() ==
"vintage collection");
var list4 = this._contentLoader.GetChildren<IContent>
(imageFolder3.ContentLink).ToList();
foreach (var l in list4)
{
if (l.Name.ToLower() == "subChildren")
{
var list5 = this._contentLoader.GetChildren<IContent>
(l.ContentLink).ToList();
var imageFolder5 = list5.FirstOrDefault(x =>
x.Name.ToLower() == "GoodImage");
var list6 = this._contentLoader.GetChildren<IContent>
(imageFolder5.ContentLink).ToList();
var imgk = list6.FirstOrDefault(x => x.Name.ToLower() == "img1.jpg");
contentReference = imgk.ContentLink;
}
}

This is my attempt to make it dynamic:

I tried to make a loop to go through each children but I hit a wall. How to create nested loop based on number of folders ?

private ContentReference GetImageReference(string imageTitle, string
referencePath)
{
ContentReference imageReference = new ContentReference();
var familyDirectory = ExternalImagesContentProvider.GetEntryPoint();
List<string> foldersList = referencePath.Split('>').ToList();
var parentLink =
var children = this._contentLoader.GetChildren<IContent>
(familyDirectory);

var lastItem = foldersList.Last().ToLower();
foreach (var folder in foldersList)
{
foreach (var child in children.Where(x => x.Name.ToLower()
== folder.ToLower()))
{
if (child.Name.ToLower() == lastItem)
{
child.ContentLink = imageReference;
}
}
}

return imageReference;
}

How can I return all published pages with their page types in an EPiServer 8.0 site?

$
0
0

We'd like to return a list of all pages with their page types from an EPiServer 8.0 site.  Preferably I'd like to do this within a navigation structure via a list of ContentAreaItem objects. But I found an example that suggests the FindAllPagesWithCriteria method.  But I'm having difficulty creating the criteria object.

What we would like to see is everything that is published.  Below is what I have.  But it's unclear to me how to define the criteria as give us all the pages that are published.

var criteria = // What do I put here?
var queryService = ServiceLocator.Current.GetInstance<IPageCriteriaQueryService>();
var pages = queryService.FindAllPagesWithCriteria(PageReference.StartPage, criteria, "en", new LanguageSelector("en"));

The other (preferred) alternative is this: can I get the page type from a ContentAreaItem object?  I've got some navigation tree code that has an IList<ContentAreaItem> list of items.  If I can get the Page Type from a ContentAreaItem, it would be even better.

Thanks for your help.

How can I convert a ContentData object to a ContentReference so that I can get the children of the ContentData object?

$
0
0

So I'm trying to build a recursive tree of ContentData objects starting from the ContentReference.RootPage.  It looks like the IContentLoader method GetChildren would do the trick, but it's only allowing me to send a ContentReference to the GetChildren argument.

If I knew how to convert a ContentData object to a ContentReference object, I could probably make this work.  But I don't know if that's possible.  Here is my latest attempt.

// These 3 lines do what I expect.
IContentLoader contentLoader = ServiceLocator.Current.GetInstance<IContentLoader>();
List<ContentData> contentDataList = contentLoader.GetChildren<ContentData>(ContentReference.RootPage).ToList();
ContentData rootContentData = (ContentData)ServiceLocator.Current.GetInstance<IContentRepository>().Get<IContent>(ContentReference.RootPage);
foreach (ContentData child in contentDataList)
{
    // This next line fails with the error:  Cannot convert from 'EPiServer.Core.ContentData' to 'EPiServer.Core.ContentReference'
    List<ContentData> children = contentLoader.GetChildren<ContentData>(child);
    //ContentReference childRef = (ContentReference)child; // Nope
    //ContentReference childRef = child as ContentReference; // Nope
}

How can I get the children of a ContentData object?  Thank you.

Viewing all 9642 articles
Browse latest View live