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

DDS Delete property in nested type error

$
0
0

Hi!

I have a model within a model wich is working fine until I delete public property from the nested model. This generates server error when saving it to the store. 

Shouldn't the class attribute handle cases like that?

Is there a way of manually mapping a nested model like that?

[EPiServerDataStore(AutomaticallyCreateStore = true, AutomaticallyRemapStore = true)]
public class ConfigurationItemDataModel
{
    [EPiServerDataIndex] public Identity Id { get; set; }
    public ConfigDataModel BasicConfig { get; set; }
}

The nested model:

[EPiServerDataStore(AutomaticallyCreateStore = true, AutomaticallyRemapStore = true)]
public class ConfigDataModel
{
    [JsonIgnore] [EPiServerDataIndex] public Identity Id { get; set; }
    [JsonProperty ( "title" )] public string Title { get; set; }
    [JsonProperty ( "baseUrl" )] public string BaseUrl { get; set; }
    [JsonProperty ( "imageUrl" )] public string BackgroundImageUrl { get; set; } // <-- the deleted property
}

And the saving:

public ConfigurationItemViewModel SaveConfiguration ( ConfigurationItemDataModel data ) 
{
    using ( var store = DynamicDataStoreFactory.Instance.GetOrCreateStore ( typeof ( ConfigurationItemDataModel ) ) )
    {
    var existingItem = store.Items<ConfigurationItemDataModel> ()
        .FirstOrDefault ( m => m.Id.StoreId == data.Id );
    if ( existingItem != null )
    {
        data.Id = existingItem.Id;
        data.BasicConfig.Id = existingItem.BasicConfig.Id;
    }
    //Here be errors:
    store.Save ( data );
    return data;
    }
}

And it all works great, but when I delete property from the nested model(ConfigDataModel), then Episerver does not know what to do at Save() and throws this error:

Server Error in '/' Application.
Method 'Models.DataModels.ConfigDataModel.BackgroundImageUrl' not found.
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.MissingMethodException: Method 'Models.DataModels.ConfigDataModel.BackgroundImageUrl' not found.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[MissingMethodException: Method 'DataModels.ConfigDataModel.BackgroundImageUrl' not found.]
   System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams) +12977553
   EPiServer.Data.Dynamic.PropertyBagObjectsExtensions.ToPropertyBag(Object value, IEnumerable`1 propertyNames) +202
   EPiServer.Data.Dynamic.DynamicDataStore.InternalSave(Identity id, Object value, TypeToStoreMapper typeToStoreMapper, ProviderCallContext parentContext) +60
   EPiServer.Data.Dynamic.Providers.Internal.DbDataStoreProvider.SaveSubObject(String propertyName, Object value, ProviderCallContext context, String& storeName) +488
   EPiServer.Data.Dynamic.Providers.Internal.<>c__DisplayClass50_0.<Save>b__0() +870
   EPiServer.Data.Providers.Internal.<>c__DisplayClass32_0.<ExecuteTransaction>b__0() +10
   EPiServer.Data.Providers.Internal.<>c__DisplayClass33_0`1.<ExecuteTransaction>b__0() +55
   EPiServer.Data.Providers.SqlTransientErrorsRetryPolicy.Execute(Func`1 method) +45
   EPiServer.Data.Providers.Internal.SqlDatabaseExecutor.ExecuteTransaction(Func`1 action) +125
   EPiServer.Data.Providers.Internal.SqlDatabaseExecutor.ExecuteTransaction(Action action) +90
   EPiServer.Data.Dynamic.Providers.Internal.DbDataStoreProvider.Save(ProviderCallContext context) +113
   EPiServer.Data.Dynamic.DynamicDataStore.InternalSave(Identity id, Object value, TypeToStoreMapper typeToStoreMapper, ProviderCallContext parentContext) +343
   EPiServer.Data.Dynamic.Internal.EPiServerDynamicDataStore.Save(Object value) +12
   Helpers.Services.DataDdsService.SaveConfiguration(ConfigurationItemViewModel userInput) +610
   Controllers.EditConfigurationController.SaveConfiguration(ConfigurationItemViewModel input) +144
   lambda_method(Closure , ControllerBase , Object[] ) +104
   System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters) +14
   System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) +157
   System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +27
   System.Web.Mvc.Async.AsyncControllerActionInvoker.<BeginInvokeSynchronousActionMethod>b__39(IAsyncResult asyncResult, ActionInvocation innerInvokeState) +22
   System.Web.Mvc.Async.WrappedAsyncResult`2.CallEndDelegate(IAsyncResult asyncResult) +29
   System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +49
   System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult) +32
   System.Web.Mvc.Async.AsyncInvocationWithFilters.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3d() +50
   System.Web.Mvc.Async.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f() +228
   System.Web.Mvc.Async.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f() +228
   System.Web.Mvc.Async.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f() +228
   System.Web.Mvc.Async.<>c__DisplayClass33.<BeginInvokeActionMethodWithFilters>b__32(IAsyncResult asyncResult) +10
   System.Web.Mvc.Async.WrappedAsyncResult`1.CallEndDelegate(IAsyncResult asyncResult) +10
   System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +49
   System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult) +34
   System.Web.Mvc.Async.<>c__DisplayClass2b.<BeginInvokeAction>b__1c() +26
   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() +576
   System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +132
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +163


Cannot resolve dependencies for the following module(s)

$
0
0

HI

After updating to commerce 13.5 we have this problem.

Does anyone have an idea to what could be the problem or a solution ( we cleaned the bin and _prodct folders) 

Server Error in '/' Application.

Cannot resolve dependencies for the following module(s) 
EPiServer.Commerce.Azure.InitializationModule
EPiServer.Commerce.Internal.Migration.MigrationInitializationModule
EPiServer.Commerce.Reporting.Initialization.ReportingInitializationModule
EPiServer.Commerce.Shell.Initialization.InitializationModule
Frucon.Integration.OMS.EventHandlers.OrderEventInitialization
Frucon.Shared.Infrastructure.MetaClassInitialization
Frucon.Shared.Infrastructure.MetaDataPlusInitialization
Frucon.Shared.Markets.CustomMarketModule
Frucon.Shared.ShippingProvider.ShippingInitialization
Frucon.Site.Business.Initialization.FindConventionInitialization
Frucon.Site.Discounts.NewDiscountsInitialization
Frucon.Site.Ioc.DependencyResolverInitialization
Frucon.Site.Ioc.EPiServerCommerceInitializationModule
Mediachase.Search.Extensions.Azure.AzureInitialization
Mediachase.Search.SearchInitialization
EPiServer.Commerce.Initialization.CartModeInitializationModule
EPiServer.Commerce.UI.Initialization.InitializationModule
Frucon.Shared.PaymentProvider.PaymentInitialization
Frucon.Site.Business.Initialization.AdditionalCouponServiceInitialization
Frucon.Site.CMS_Services.Initialization
EPiServer.Find.Commerce.FindCommerceInitializationModule
EPiServer.Commerce.Initialization.InitializationModule

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: EPiServer.Framework.Initialization.InitializationException: Cannot resolve dependencies for the following module(s) 
EPiServer.Commerce.Azure.InitializationModule
EPiServer.Commerce.Internal.Migration.MigrationInitializationModule
EPiServer.Commerce.Reporting.Initialization.ReportingInitializationModule
EPiServer.Commerce.Shell.Initialization.InitializationModule
Frucon.Integration.OMS.EventHandlers.OrderEventInitialization
Frucon.Shared.Infrastructure.MetaClassInitialization
Frucon.Shared.Infrastructure.MetaDataPlusInitialization
Frucon.Shared.Markets.CustomMarketModule
Frucon.Shared.ShippingProvider.ShippingInitialization
Frucon.Site.Business.Initialization.FindConventionInitialization
Frucon.Site.Discounts.NewDiscountsInitialization
Frucon.Site.Ioc.DependencyResolverInitialization
Frucon.Site.Ioc.EPiServerCommerceInitializationModule
Mediachase.Search.Extensions.Azure.AzureInitialization
Mediachase.Search.SearchInitialization
EPiServer.Commerce.Initialization.CartModeInitializationModule
EPiServer.Commerce.UI.Initialization.InitializationModule
Frucon.Shared.PaymentProvider.PaymentInitialization
Frucon.Site.Business.Initialization.AdditionalCouponServiceInitialization
Frucon.Site.CMS_Services.Initialization
EPiServer.Find.Commerce.FindCommerceInitializationModule
EPiServer.Commerce.Initialization.InitializationModule

Source Error: 

[No relevant source lines]


Source File: c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\vs\bc1ba2c7\d3be2174\App_global.asax.0.cs    Line: 0 

Stack Trace: 

[InitializationException: Cannot resolve dependencies for the following module(s) 
EPiServer.Commerce.Azure.InitializationModule
EPiServer.Commerce.Internal.Migration.MigrationInitializationModule
EPiServer.Commerce.Reporting.Initialization.ReportingInitializationModule
EPiServer.Commerce.Shell.Initialization.InitializationModule
Frucon.Integration.OMS.EventHandlers.OrderEventInitialization
Frucon.Shared.Infrastructure.MetaClassInitialization
Frucon.Shared.Infrastructure.MetaDataPlusInitialization
Frucon.Shared.Markets.CustomMarketModule
Frucon.Shared.ShippingProvider.ShippingInitialization
Frucon.Site.Business.Initialization.FindConventionInitialization
Frucon.Site.Discounts.NewDiscountsInitialization
Frucon.Site.Ioc.DependencyResolverInitialization
Frucon.Site.Ioc.EPiServerCommerceInitializationModule
Mediachase.Search.Extensions.Azure.AzureInitialization
Mediachase.Search.SearchInitialization
EPiServer.Commerce.Initialization.CartModeInitializationModule
EPiServer.Commerce.UI.Initialization.InitializationModule
Frucon.Shared.PaymentProvider.PaymentInitialization
Frucon.Site.Business.Initialization.AdditionalCouponServiceInitialization
Frucon.Site.CMS_Services.Initialization
EPiServer.Find.Commerce.FindCommerceInitializationModule
EPiServer.Commerce.Initialization.InitializationModule]
   EPiServer.Framework.Initialization.InitializationEngine.CreateDependencySortedModules(IList`1 existingList, IEnumerable`1 modules) +737
   EPiServer.Framework.Initialization.InitializationEngine.ExecuteTransition(Boolean continueTransitions) +94
   EPiServer.Framework.Initialization.InitializationEngine.Initialize() +40
   EPiServer.Framework.Initialization.<>c.<FrameworkInitialization>b__7_0(InitializationEngine e) +9
   EPiServer.Framework.Initialization.InitializationModule.EngineExecute(HostType hostType, Action`1 engineAction) +460
   EPiServer.Framework.Initialization.InitializationModule.FrameworkInitialization(HostType hostType) +170
   EPiServer.Global..ctor() +43
   Frucon.Site.EPiServerCmsApplication..ctor() +42
   ASP.global_asax..ctor() in c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\vs\bc1ba2c7\d3be2174\App_global.asax.0.cs:0
[TargetInvocationException: Het doel van een aanroep heeft een uitzondering veroorzaakt.]
   System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck) +0
   System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark) +119
   System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark) +232
   System.Activator.CreateInstance(Type type, Boolean nonPublic) +83
   System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark) +1088
   System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) +124
   System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture) +20
   System.Web.HttpRuntime.CreateNonPublicInstance(Type type, Object[] args) +59
   System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +148
   System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +303
[HttpException (0x80004005): Het doel van een aanroep heeft een uitzondering veroorzaakt.]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +659
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +89
   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +189


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.3429.0

If user is signed in with Owin, Commerce's _customerContext.CurrentContactId changes constantly for user. Why is that?

$
0
0

Hi

I have this method which checks if a cart already exists:

protected ICart GetExistingCart(string name) => _orderRepository.LoadCart<ICart>(_customerContext.CurrentContactId, name, _currentMarket.GetCurrentMarket().MarketId);

If the method returns null, I create a new cart:

cart = _orderRepository.Create<ICart>(_customerContext.CurrentContactId, name);
SaveCart(cart);

This is used in the start of, and during the checkout flow.

Now, the thing is that our site generally allows for a user to signin to access some non-public areas of the site (pages that are not related to the checkout flow). Signin is with Owin (in Azure).

If the user is logged in, and afterwards decides to go to the checkout flow, Commerce's _customerContext.CurrentContactId changes constantly, and thus every time I call GetExistingCart for the same user, it won't find any cart. If I debug the code in Visual Studio, I can see that for every line I step over, _customerContext.CurrentContactId changes.

If however, user is not signed in already, _customerContext.CurrentContactId stays the same, and cart can be created and retrieved as expected during checkout.

Anyone knows what the problem can be with this _customerContext.CurrentContactId and its constant change of value when signed in with Owin?

Commerce version is 11.8.3.

Issue with webapi attribute routing.

$
0
0

Hi Team,

Recently I have upgraded to the GlobalLink 11.4.3 version. But after upgrade we are facing object not initialized issue in our application.

We have web api attribute routine defined in WebApiConfig.cs initialize model. See below code for reference,

[InitializableModule]
[ModuleDependency(typeof(FrameworkInitialization))]
public class WebApiConfig : IInitializableModule
{
public void Initialize(InitializationEngine context)
{
// Enable Web API routing
GlobalConfiguration.Configure(config =>
{
config.MapHttpAttributeRoutes();

config.Routes.MapHttpRoute(
name: "DefaultApi",
routeTemplate: "api/{controller}/{id}",
defaults: new { id = RouteParameter.Optional });
});
}
/// <inheritdoc />
public void Uninitialize(InitializationEngine context)
{
}
}

config.MapHttpAttributeRoutes(); is creating problem with GlobalLink 11.4.3.

when I comment this line application works but the web api's not working. I tried to add this in register method and injected dependency in Application_Start methos as well but still its not working.

Please suggest something so that I can use GlobalLink latest version and attribute routine seemlessly in my application.

Thanks,

Rahul Dikkar

Contact search breaks after upgrading to Commerce 12.17.2

$
0
0

I upgraded a website to 12.17.2, when I tried to search the contacts via the Customer Management portal I get a JavaScript error. It bascially mentions that the field is not present in the cls_contact table. I think this has got something to do with the way the contacts are being fetched for search, it is only referring to the cls_contact table and all other extension table properties are having the same issue. I had the same exact issue for an earlier project as well, but since it was a new project I was able to create fields and not select the option to show these fields in the contact search page.

Screen shot for reference

Also, I was able to replicate this error on Quicksilver 12.17.2 as well. I created many new metafields on the contact class and I started to get the same error for Test25 metafield since it is present in the cls_contact_Ex0 table.

Here is a screen cast

Extreme poor performance of "Form Submissions Cleanup" Schedule Job

$
0
0

EPiServer Forms: 4.25.0
EPiserver CMS: 11.12.0

For us, 'Form Submissions Cleanup' job takes 45 mins and more 

Consumes 45% of DTU. Wondering is it same for any of you also? 

(Investigations are in progress)

Best Regards
Khurram

What is purpose of "Clear Thumbnail Properties", What issue we can expect in result if we stop?

Error converting local assets to Azure blob storage

$
0
0

Using Episerver 11 on Episerver Azure host

On a new site, I created many media images that are currently stored in the App_Data blob folder.  I've installed the EpiCode.BlobConverter package to migrate these to Azure blob storage.  I've confirmed that my Azure blob provider has been added to the web.config file.  

<episerver.framework><blob defaultProvider="azureblobs" xdt:Transform="Insert"><providers><add name="azureblobs" type="EPiServer.Azure.Blobs.AzureBlobProvider,EPiServer.Azure" connectionStringName="EPiServerAzureBlobs" container="mysitemedia"/></providers></blob></episerver.framework>


However, when I run the "Convert File Blobs" job, I get the following error for all images.  

System.IO.IOException: The process cannot access the file 'D:\home\site\wwwroot\App_Data\blobs\fff13e7fcf584be3869b7ba1113d3e74\42922beab0db42aeb9889606ebdec309_Thumbnail.png' because it is being used by another process.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share) at EPiServer.Framework.Blobs.FileBlob.OpenWrite() at EPiServer.Framework.Blobs.FileBlob.Write(Stream data) at EPiCode.BlobConverter.BlobJob.ProcessFile(String path, String directory)

Any idea on how to convert these images to blob storage?


DOJO: add content area items to the empty content area

$
0
0

Hi All,

I made a function for copying content area items from one content area to another. Everything work great except for the one case: when the target content area is empty. The items are copied but the editor view is not updated as usual. If there are any items in the target content area thene the editor view is updated. In this case when the target content area is empty, I have to switch views or reload/refresh the whole page and than the chages are visible.

Here is the function:

_copyContentAreaItems: function (sourceContentArea, targetContentArea) {
                targetContentArea.focus();
                var emptyCa = false;
                if (!targetContentArea.model.count) {
                    //targetContentArea.model.count = 0;
                    emptyCa = true;
                }
                for (let c14 = 0; c14 < sourceContentArea.model.count; c14++) {
                    dojo.when(sourceContentArea.model.getChildByIndex(c14), lang.hitch(this, function (contentData) {
                        targetContentArea.model.modify(lang.hitch(this, function () {                            
                            targetContentArea.model.addChild(contentData);
                        }));
                        console.log("ContentArea copy from " + sourceContentArea.name + " to " + targetContentArea.name, contentData);
                    }));
                }
                console.log("ContentArea copy target[" + targetContentArea.name + "] count: " + targetContentArea.model.count);
                this.focus();
            },

Just to point out that this function is in the custom editor for the property that is not a content area.

Does anybody knows how to initialize that empty content area before adding items? 

Any ideas are welcome :)

Extreme poor performance of "Clear Thumbnail Properties" Schedule Job

$
0
0

Any Help, how this can improve? Does anyone else have the same issue?

It might be just coincidence but a few months back we upgraded from

CMS 11.8.0 to CMS 11.11.2,
Forms 4.1.20 to 4.23.0
DBLocalizationProvider 4.3.3 to 5.3.0

When Editors started having an issue On Loading EPiServer Editor Area after the upgrade. Editor Area was inaccessible after a week or more of Application Recycle/Release and was not accessible until we recycle application again, this was a recurring issue from a couple of months now.

I have investigated this issue from the last few days and collected the following figures

Queries mentioned here was taking 45% and more DTU
I run SQL Profiler and saw following SP is called editDeletePageCheck, during this job run and that SP calls internally another SP 'editDeletePageCheckInternal'
CPU Usage on DB was more than 80% with the current DB Plan
Sometimes CPU Usages was not coming down even after a few hours when the job is finished

This behaviour and figures can be reproduced all the time by running this job.

What time this job is taking for us on Production is as below

DateDurationStatusServerMessage

7/24/2019 2:00:10 AM300m:35sSucceededRD0003FF55A5FACleared 63039 thumbnail properties
7/23/2019 2:00:11 AM268m:58sSucceededRD0003FF5598ABCleared 62995 thumbnail properties
7/22/2019 2:00:00 AM263m:19sSucceededRD0003FF557B8DCleared 62992 thumbnail properties
7/21/2019 2:00:01 AM268m:13sSucceededRD0003FF5598ABCleared 62980 thumbnail properties
7/20/2019 2:00:10 AM276m:26sSucceededRD0003FF557B8DCleared 62963 thumbnail properties
7/19/2019 2:00:10 AM293m:6sSucceededRD0003FF557B8DCleared 62943 thumbnail properties
7/18/2019 2:00:10 AM238m:16sSucceededRD0003FF4A1B2ACleared 53964 thumbnail properties
7/17/2019 2:00:10 AM187m:40sSucceededRD0003FF4A1B2ACleared 41402 thumbnail properties
7/16/2019 2:00:10 AM199m:40sSucceededRD0003FF597EBBCleared 41389 thumbnail properties
7/15/2019 2:00:10 AM128m:53sSucceededRD0003FF59889BCleared 24654 thumbnail properties
7/14/2019 2:00:10 AM132m:21sSucceededRD0003FF597EBBCleared 24068 thumbnail properties
7/13/2019 2:00:10 AM127m:54sSucceededRD0003FF59AD51Cleared 24054 thumbnail properties
7/12/2019 2:00:10 AM134m:59sSucceededRD0003FF59AD51Cleared 24022 thumbnail properties
7/11/2019 2:00:00 AM119m:26sSucceededRD0003FF59889BCleared 24004 thumbnail properties
7/10/2019 2:00:10 AM175m:12sSucceededRD0003FF55DE3ACleared 23995 thumbnail properties
7/9/2019 2:00:10 AM164m:42sSucceededRD0003FF55DE3ACleared 23973 thumbnail properties
7/8/2019 2:00:10 AM161m:1sSucceededRD0003FF55DE3ACleared 23936 thumbnail properties
7/7/2019 2:00:10 AM153m:0sSucceededRD0003FF5590D7Cleared 23919 thumbnail properties
7/6/2019 2:00:10 AM155m:34sSucceededRD0003FF55DE3ACleared 23901 thumbnail properties
7/5/2019 2:00:10 AM152m:10sSucceededRD0003FF55C920Cleared 23892 thumbnail properties

Focal point based image cropping for EPiServer using ImageResizing.NET

$
0
0

https://world.episerver.com/blogs/stephan-lonntorp/dates/2016/9/focal-point-based-image-cropping-for-episerver-using-imageresizing-net/

Does anyone have information how to use this plugin. Simply installing it and creating a ImageFile media type does not seem to do anything.

[ContentType(DisplayName = "ImageFile", GUID = "nquid", Description = "")]
[MediaDescriptor(ExtensionString = "jpg,jpeg,jpe,ico,gif,bmp,png,svg")]
public class ImageFile : FocalPointImageData
{
        /// <summary>
        /// Gets or sets the copyright.
        /// </summary>
        /// <value>
        /// The copyright.
        /// </value>
        public virtual string Copyright { get; set; }
        [Editable(false)]
        public virtual string FileSizeKb { get; set; }
}

When implementing I've tried:

[Display(GroupName = SystemTabNames.Content, Order = 10)]
[UIHint(UIHint.Image)]
[CultureSpecific]
public virtual ContentReference MainImage { get; set; }
//
[UIHint(UIHint.Image)]
[Display(GroupName = SystemTabNames.Content, Order = 10)]
public virtual Url SiteLogotypeUrl { get; set; }

If you read this: https://github.com/defsteph/EPiFocalPoint

It's just supposed to work...

How to OrderBy with XhtmlString?

$
0
0

Is there any way to supply an OrderBy to XhtmlString type value?

In general, For a string value i.e. 

Contrary to popular belief, Lorem Ipsum... and There are many variations of passages..., It would sort the Contrary.. first based on alphabetical order. 

But for XhtmlString type value in Episerver which comes with HTML tags included with it, It is not easy to work with LinQ OrderBy.

I'm just wonering if is there any easy way to use OrderBy for following code snippet, Where the Title is type of XhtmlString - 

result = filters
.OrderBy(c => c.Title)
.Skip(skip).Take(take)
.GetContentResult<CorporateGuestReportingBlock>();

How could I order those type of strings in Episerver?

Thanks for your time.

Object reference errors on Episerver.Find.Content Indexing Job

$
0
0

Hi

When I run The Content Indexing Job, i get below error for every single page and block type in my site :

ERROR EPiServer.Find.Cms.ContentIndexer: An exception occurred while indexing content [Link 11] [GUID 96ee8a65-5bc8-444e-a650-129d601828e4] [Type WholesaleCreateAccountPage] [Name B2B Registration Page]: Object reference not set to an instance of an object.
System.NullReferenceException: Object reference not set to an instance of an object.
at EPiServer.Find.ClientConventions.CompositeLanguageRoutingConvention.GetLanguageRouting(Object instance)
at EPiServer.Find.Client.Index(IEnumerable objectsToIndex, Boolean deleteLanguageRoutingDuplicatesOnIndex)
at EPiServer.Find.Cms.ContentIndexer.IndexWithRetry(IContent[] contents, Int32 maxRetries, Boolean deleteLanguageRoutingDuplicatesOnIndex)
at EPiServer.Find.Cms.ContentIndexer.Index(IEnumerable`1 contents, IndexOptions options)
at EPiServer.Find.Cms.ContentIndexer.IndexBatch(IEnumerable`1 contents, Action`1 statusAction, Int32& numberOfContentErrors, Int32& indexingCount, Boolean deleteLanguageRoutingDuplicatesOnIndex)
System.NullReferenceException: Object reference not set to an instance of an object.
at EPiServer.Find.ClientConventions.CompositeLanguageRoutingConvention.GetLanguageRouting(Object instance)
at EPiServer.Find.Client.Index(IEnumerable objectsToIndex, Boolean deleteLanguageRoutingDuplicatesOnIndex)
at EPiServer.Find.Cms.ContentIndexer.IndexWithRetry(IContent[] contents, Int32 maxRetries, Boolean deleteLanguageRoutingDuplicatesOnIndex)
at EPiServer.Find.Cms.ContentIndexer.Index(IEnumerable`1 contents, IndexOptions options)
at EPiServer.Find.Cms.ContentIndexer.IndexBatch(IEnumerable`1 contents, Action`1 statusAction, Int32& numberOfContentErrors, Int32& indexingCount, Boolean deleteLanguageRoutingDuplicatesOnIndex)

We are using Episerver.Find v 13.2.1.

I can't quite debug any of the Epi methods mentioned in stack trace, so not sure how to troubleshoot this and find the root cause. Please advise.

Regards

Ritu

Which Visitor Groups Have Been Most Effective

$
0
0

We are looking to start using visitor groups on our commerce site after having been live a few months I'm curious for those who have been on Episerver longer, which Visitor Groups have been the best performing in terms of your goals. We're looking to drive more sales from customers and want to leverage the learnings of the community if at all possible.

Thank you!

Serialized payment issue

$
0
0

I am trying to implement a custom payment type for Serialized carts, it is failing when we convert the cart to a purchase order. Below are the different ways I tried out but I am still having the same issue.

Attempt 1: Inheriting from Payment (I opened the reflector and I see payment types like CashCardPayment, CreditCardPayment etc are doing the same) 

using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;
using EPiServer.Commerce.Order;
using Mediachase.Commerce.Orders;
using Mediachase.MetaDataPlus.Configurator;
namespace Whereoware.Commerce.Payments
{
    [Serializable]
    public class TermsPayment : Payment
    {
        private static MetaClass _MetaClass;
        /// <summary>
        /// Gets the credit card payment meta class.
        /// </summary>
        /// <value>The credit card payment meta class.</value>
        public static MetaClass TermsPaymentMetaClass => _MetaClass ?? (_MetaClass = MetaClass.Load(OrderContext.MetaDataContext, "TermsPayment"));
        public TermsPayment() : base(TermsPayment.TermsPaymentMetaClass)
        {
            this.PaymentType = PaymentType.Other;
            this.ImplementationClass = GetType().AssemblyQualifiedName;
        }
        public TermsPayment(MetaClass metaClass) : base(metaClass)
        {
            this.PaymentType = PaymentType.Other;
            this.ImplementationClass = GetType().AssemblyQualifiedName;
        }
        protected TermsPayment(SerializationInfo info, StreamingContext context) : base(info, context)
        {
            this.PaymentType = PaymentType.Other;
            this.ImplementationClass = GetType().AssemblyQualifiedName;
        }
        public string TermsOption
        {
            get
            {
                return this.GetString("TermsOption");
            }
            set
            {
                this["TermsOption"] = (object)value;
            }
        }
        public string PurchaseOrderNumber
        {
            get
            {
                return this.GetString("PurchaseOrderNumber");
            }
            set
            {
                this["PurchaseOrderNumber"] = (object)value;
            }
        }
    }
}

I also have a TermsPaymentMethod class that implements PaymentMethodBase which is an abstract class.

using System;
using EPiServer.Commerce.Order;
using EPiServer.ServiceLocation;
using Mediachase.Commerce.Orders.Managers;
namespace CustomPayment.Commerce.PaymentMethods
{
    [ServiceConfiguration(typeof(IPaymentMethod))]
    public class TermsPaymentMethod : PaymentMethodBase
    {
        public override string SystemKeyword => "Manual";
        protected readonly Guid _paymentMethodId;
        public TermsPaymentMethod(Guid paymentMethodId) : this(ServiceLocator.Current.GetInstance<IOrderGroupFactory>(), paymentMethodId)
        {
            _paymentMethodId = paymentMethodId;
        }
        public TermsPaymentMethod(IOrderGroupFactory orderGroupFactory, Guid paymentMethodId) : base(orderGroupFactory, paymentMethodId)
        {
        }
        public override IPayment CreatePayment(decimal amount, IOrderGroup orderGroup)
        {
            string implementationClassName = PaymentManager.GetPaymentMethod(base.PaymentMethodId, false).PaymentMethod[0].PaymentImplementationClassName;
            var type = Type.GetType(implementationClassName);
            var payment = type == null ? orderGroup.CreatePayment(OrderGroupFactory) : orderGroup.CreatePayment(OrderGroupFactory, type);
            payment.PaymentMethodId = PaymentMethodId;
            payment.PaymentMethodName = Name;
            payment.Amount = amount;
            payment.PaymentType = Mediachase.Commerce.Orders.PaymentType.Other;
            return payment;
        }
        public override bool ValidateData()
        {
            return true;
        }
    }
}

I then create a Payment type inside my checkout controller and use the CreatePayment(decimal amount, IOrderGroup orderGroup) of IPaymentMethod which in my case triggers TermsPaymentMethod implementation.

I can see that my implementation class is now TermsPayment as well in the payment object. But it fails when I convert the cart to a purchase order.

https://www.screencast.com/t/y0czxqCnP5m

Below is the stack trace:

Activation error occurred while trying to get instance of type, key "TermsPayment"

at EPiServer.ServiceLocation.ServiceLocatorImplBase.GetInstance(Type serviceType, String key)
at EPiServer.Commerce.Order.Internal.OrderGroupBuilder.CreatePayment(Type paymentType)
at EPiServer.Commerce.Order.IOrderGroupExtensions.CopyPayments(IOrderForm sourceForm, IOrderForm destinationForm, IOrderGroup destinationOrderGroup, IOrderGroupFactory orderGroupFactory)
at EPiServer.Commerce.Order.IOrderGroupExtensions.CopyOrderForm(IOrderGroup orderGroup, IOrderGroup sourceOrderGroup, IOrderGroupFactory orderGroupFactory)
at EPiServer.Commerce.Order.IOrderGroupExtensions.CopyFrom(IOrderGroup orderGroup, IOrderGroup sourceOrderGroup, IOrderGroupFactory orderGroupFactory)
at EPiServer.Commerce.Order.Internal.SerializableCartProvider.SaveAsPurchaseOrder(ICart cart)
at EPiServer.Commerce.Order.Internal.DefaultOrderRepository.SaveAsPurchaseOrder(IOrderGroup cart)

Upon checking the reflector I see that Epi tries to create a payment type :

public IPayment CreatePayment(Type paymentType)
{
   return ServiceLocator.Current.GetInstance(paymentType) as IPayment;
}

It is unable to convert it to IPayment  and gives a null exception.

Attempt 2:

Everything is the same as the previous attempt other than the payment type implementation

using System.Collections;
using EPiServer.Commerce.Order;
using EPiServer.Commerce.Order.Internal;
using EPiServer.Commerce.Storage;
using Mediachase.Commerce.Orders;
using Newtonsoft.Json;
namespace Whereoware.Commerce.Payments
{
    [JsonConverter(typeof(PaymentConverter))]
    public class TermsPayment : SerializablePayment, IPayment, IExtendedProperties
    {
        public TermsPayment()
        {
            this.Properties = new Hashtable();
            this.BillingAddress = (IOrderAddress)new SerializableOrderAddress();
            this.PaymentType = PaymentType.Other;
            this.ImplementationClass = GetType().AssemblyQualifiedName;
        }
    }
}

I refferd to the article below for the second attempt:

https://world.episerver.com/forum/developer-forum/Episerver-Commerce/Thread-Container/2017/10/how-to-make-serializable-carts-to-work-with-icreditcardpayment-authorize-net/

But still have the same issue when it converts it to a purchase order:

"Value cannot be null"

   at Mediachase.Commerce.Storage.MetaStorageObservableCollection`2.OnListChanged(Object sender, NotifyCollectionChangedEventArgs e)
   at System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
   at System.Collections.ObjectModel.ObservableCollection`1.InsertItem(Int32 index, T item)
   at EPiServer.Commerce.Order.IOrderGroupExtensions.CopyPayments(IOrderForm sourceForm, IOrderForm destinationForm, IOrderGroup destinationOrderGroup, IOrderGroupFactory orderGroupFactory)
   at EPiServer.Commerce.Order.IOrderGroupExtensions.CopyOrderForm(IOrderGroup orderGroup, IOrderGroup sourceOrderGroup, IOrderGroupFactory orderGroupFactory)
   at EPiServer.Commerce.Order.IOrderGroupExtensions.CopyFrom(IOrderGroup orderGroup, IOrderGroup sourceOrderGroup, IOrderGroupFactory orderGroupFactory)
   at EPiServer.Commerce.Order.Internal.SerializableCartProvider.SaveAsPurchaseOrder(ICart cart)
   at EPiServer.Commerce.Order.Internal.DefaultOrderRepository.SaveAsPurchaseOrder(IOrderGroup cart)

I am also attaching a screen shot of the PaymentMethod table:

https://www.screencast.com/t/tRdQ5xs4

I have been struggling on this since 2 days now, any help or leads on this is highly appreciated.


DXC deployment times

$
0
0

Hi all,

I want to share our experience with DXC deployment times in an attempt to confirm if what we are experiencing is "slow" or just "normal".

We are in APAC, and I suspect Azure Resources in the Region might make a big difference. If you reply, I'd love to know what Region you are in.

In our experience, a typical code only DXC Deployment from Integration to Pre-Prod in APAC takes between 40mins and 1.5hrs. The time of day seems to make a difference, out of business hours deployments are often faster than the middle of the day.

Internally, we joke that a typical DXC Deployment from Integration to Pre-Prod is like this;

  • 0-80% = 25% of total duration.
  • 80-81% = 70% of total duration. Warming up the deployment slot.
  • 81-100% = 5% of the total duration.
  • Plus an additional 5-10mins for the completion (slot swap) step

We have raised this with Episerver Support, and are doing some additional logging etc to determine if there is anything unusual occurring.

But more generally, I would be interested to know how the wider Episerver community is finding DXC deployment times.

Connect for Microsoft Dynamics CRM - Error Authenticating

$
0
0

Hi,

We have the latest version 4.2 of the following package installed on a project which sits within DXC EPiServer.MarketingAutomationIntegration.MSDynamics

However our client is unable to connect to their CRM instance using the admin tool

I am assured that the credentials inputted are correct.

Is there any other configuration our client should be aware of? Such as for example permissions neccessary for the CRM user they are using to connect.

The EPiServer user guide linked from this page is no longer online: https://world.episerver.com/documentation/developer-guides/marketing-automation-connectors/connect-for-ms-dynamics-crm/

Thanks in advance!

 

EpiServer Versions - how to export data

$
0
0

Hi all, 

I am currently trying to learn more about the platform and would be grateful for any help. At the minute, I am interested in the versions gadget, and whether data can be exported to show 'previous versions' of the text on a page? I want to know whether it is possible to export the previous versions in the format of a CSV file or similar? 

Thanks in advance.

Pete. 

Is it "safe" to use the generic PropertyList?

$
0
0

Hi!

Would you say it's "safe" to use the generic PropertyList?

In the developer documentation it says the following:

This topic describes unsupported functionality in Episerver CMS. Episerver recommends using ContentArea and Blocks for lists of complex objects. Using PropertyList<T> together with complex types requires additional custom functionality to fully ensure data consistency, portability and functionality.

I'm not so keen on investing a lot of time in using the generic PropertyList if it's to be deprecated.

However, it seems like it would be easier to work with the property list - for editors - rather than blocks.

Upgrade 6 R2 6.1.379.841 - to EPiServer CMS 6.1.379.1001

$
0
0

Is there a way I can upgrade Upgrade 6 R2 6.1.379.841 - to EPiServer CMS 6.1.379.1001 without having to do  a full upgrade - can I just simply replace the DLLs?

If so where can I get the dlls from?

Thanks

Viewing all 6894 articles
Browse latest View live