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

Auto increment value to PropertyList class

$
0
0

Hi Team,

I have a requirement to auto increment PropertyList class value. Can you please provide suggestions to acheive this? Below are the classes which i have created.

public class QuestionOption
{
private int _id;

[Required]
[Editable(false)]
public virtual int Id
{
get
{
return _id;
}

set
{
_id = value;
}
}

[Required]
public virtual string Name { get; set; }
}

/// <summary>
/// Selection base page
/// </summary>
public class SelectionBase : QuestionBasePage
{
/// <summary>
/// Gets or sets the options
/// </summary>
[Display(
GroupName = SystemTabNames.Content,
Name = "Options",
Order = 100)]
[EditorDescriptor(EditorDescriptorType = typeof(CollectionEditorDescriptor<QuestionOption>))]
public virtual IList<QuestionOption> Options { get; set; }
}


Add a CSS class to Collection Editor

$
0
0

We are using 'IList<propertyTypeInHere>' for page properties in a few places, and one of those instances we wish to extend the size of the 'UiWrapperType.Floating' window. We've managed to change the size with some simple css :

.Sleek .epi-dialog-landscape .dijitDialogPaneContentArea {
    height: 450px !important;
}
.Sleek .epi-dialog-landscape, .Sleek .epi-dialog-portrait, .Sleek .epi-dialog--auto-height {
    width: 700px !important;
}
.dijitDialogPaneContentArea .epi-collection-editor {
    min-width: 960px;
    height: 800px;
}
.Sleek .epi-collection-editor .epi-plain-grid {
    min-height: 800px !important;
    width: 960px !important;
}

but unfortunately this applies the css to ALL IList<> properties. We'd like to us an CollectionEditorDescriptor or Dojo Javascript to add a class to the HTML so that the above CSS can be targetted to only that instance. Anyone done anything similar? 

Our current basic collection editor definition:

[EditorDescriptorRegistration(TargetType = typeof(IList<ourPropertyType>))]
    public class OnPageCollectionEditorDescriptor : CollectionEditorDescriptor<ourPropertyType>
    {
        public override void ModifyMetadata(ExtendedMetadata metadata, IEnumerable<Attribute> attributes)
        {
            base.ModifyMetadata(metadata, attributes);
            metadata.CustomEditorSettings["uiType"] = metadata.ClientEditingClass;
            metadata.CustomEditorSettings["uiWrapperType"] = UiWrapperType.Floating;
        }
    }

Argument null exception for LinkItemCollection occuring randomly in edit mode for CMS 7

$
0
0

Hi,

I randomly get an error in edit mode for a LinkItemCollection in my solution that is running CMS 7.

When clicking on the edit button for a LinkItemCollection the following error is shown in the modal:

----------------

Detailed error information (authorized by permissions to functions)
Error occured 06.02.2019 11:06:40
User IP ....
User Agent ...
Url https://...../../CMS/edit/EditProperty.aspx?moduleArea=LegacyCMS&epslanguage=null&propertyname=LinkList.Links&id=215_24671
Referer https://..../.../Cms/


Value cannot be null.
Parameter name: str

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.ArgumentNullException: Value cannot be null.
Parameter name: str

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:


[ArgumentNullException: Value cannot be null.
Parameter name: str]
System.String.Copy(String str) +14342734
EPiServer.SpecializedProperties.LinkItem.Clone() +355
EPiServer.SpecializedProperties.LinkItemCollection.Clone() +250
EPiServer.SpecializedProperties.PropertyLinkCollection.CreateWritableClone() +191
EPiServer.Core.PropertyDataCollection.CreateWritableClone() +125
EPiServer.Core.ContentData.CreateWriteableCloneImplementation() +102
Castle.Proxies.Invocations.ContentData_CreateWriteableCloneImplementation_2.InvokeMethodOnTarget() +37
Castle.DynamicProxy.AbstractInvocation.Proceed() +116
EPiServer.DataAbstraction.RuntimeModel.ContentDataInterceptor.Intercept(IInvocation invocation) +376
Castle.DynamicProxy.AbstractInvocation.Proceed() +595
Castle.Proxies.LinkListBlockProxy.CreateWriteableCloneImplementation() +154
EPiServer.Core.BlockData.CreateWritableClone() +14
Castle.Proxies.Invocations.BlockData_CreateWritableClone_2.InvokeMethodOnTarget() +37
Castle.DynamicProxy.AbstractInvocation.Proceed() +116
EPiServer.DataAbstraction.RuntimeModel.ContentDataInterceptor.Intercept(IInvocation invocation) +376
Castle.DynamicProxy.AbstractInvocation.Proceed() +595
Castle.Proxies.LinkListBlockProxy.CreateWritableClone() +154
EPiServer.SpecializedProperties.PropertyBlock`1.CreateWritableClone() +160
EPiServer.Core.PropertyDataCollection.CreateWritableClone() +125
EPiServer.Core.PageData.CreateWriteableCloneImplementation() +102
Castle.Proxies.Invocations.PageData_CreateWriteableCloneImplementation_1.InvokeMethodOnTarget() +40
Castle.DynamicProxy.AbstractInvocation.Proceed() +116
EPiServer.DataAbstraction.RuntimeModel.ContentDataInterceptor.Intercept(IInvocation invocation) +376
Castle.DynamicProxy.AbstractInvocation.Proceed() +595
Castle.Proxies.ArticlePageProxy.CreateWriteableCloneImplementation() +157
EPiServer.UI.Edit.EditProperty.Page_Init(Object sender, EventArgs e) +137
System.Web.UI.Page.OnInit(EventArgs e) +102
EPiServer.UI.ContentBaseWebForm.OnInit(EventArgs e) +16
System.Web.UI.Control.InitRecursive(Control namingContainer) +186
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2098

------------

For me it seems that this is related to Episerver and not our implementation. Does anyone have an idea about what can be the reason?

Thank you in advance.

Cathinka

Labels in EPI server forms

$
0
0

Hi,

I wonder how to place a label without a text area in EPI server forms, just a text label, any idea? Also I wonder why my captcha is letters not a check box?

Error removing the IUser - SqlException: Execution Timeout

$
0
0

I have used,

CommunitySystem.CurrentContext.DefaultSecurity.RemoveUser(IUser user);

To remove user.

However, this was working fine. But suddenly it has given an error. And it keeps happening forever. The exception throws from the RemoveUser(IUser user).

The exception details are here as below,

System.Data.SqlClient.SqlException (0x80131904): Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the server is not responding. ---> System.ComponentModel.Win32Exception (0x80004005): The wait operation timed out
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
at System.Data.SqlClient.SqlDataReader.get_MetaData()
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
at EPiServer.Community.Forum.Data.ForumFactory.<>c__DisplayClass33_0.<UserRemovedCleanUp>b__0()
at EPiServer.Data.Providers.Internal.SqlDatabaseExecutor.<>c__DisplayClass32_0.<ExecuteTransaction>b__0()
at EPiServer.Data.Providers.Internal.SqlDatabaseExecutor.<>c__DisplayClass33_0`1.<ExecuteTransaction>b__0()
at EPiServer.Community.Forum.ForumModule.DefaultSecurity_RemovedUser(ISecurityHandler sender, IRemoveUserEventArgs args)
at EPiServer.Common.Security.RemoveUserEventHandler.Invoke(ISecurityHandler sender, IRemoveUserEventArgs args)
at EPiServer.Common.Security.SecurityHandler.OnRemoveUser(IRemoveUserEventArgs args)
at EPiServer.Common.Security.Data.SecurityFactory.<>c__DisplayClass57_0.<RemoveUser>b__0()
at EPiServer.Data.Providers.Internal.SqlDatabaseExecutor.<>c__DisplayClass32_0.<ExecuteTransaction>b__0()
at EPiServer.Data.Providers.Internal.SqlDatabaseExecutor.<>c__DisplayClass33_0`1.<ExecuteTransaction>b__0()
at EPiServer.Data.Providers.SqlTransientErrorsRetryPolicy.Execute[TResult](Func`1 method)
at EPiServer.Common.Security.SecurityHandler.RemoveUser(IUser user)

As per above error, it seems like it is happening due to a DB issue. But what DB? How Can I diagnose? What could cause this? Any help appreciated. Thank you.

Additional info:

EPiServer.CommonFramework version=9.0.1
EPiServer.CMS.Core version=11.11.0
EPiServer.Community version=9.0.0

looking for developer(s)

$
0
0

I work for a creative agency and we are looking for developers who can do website redesigns from our pdf designs.

Episerver Find Convention Include Setter Ignore

$
0
0

Hi,

I have no issues in adding fields so that they get indexed properly in Find and usable for filtering/sorting etc...

Now for performance reasons (The example bellow is a simple example) I would like that returned search results be directly hydrated from the Find Search result.

The conventions:

protected void ApplyNodeContentConventions(EPiServer.Find.ClientConventions.TypeConventionBuilder<FoodNode> conventionBuilder)
        {
            //Add custom field to search index            
            conventionBuilder.IncludeField(x => x.DefaultImageUrl(), (x, value) => x.SetDefaultImage(value)); 
        } 

The Search Query:

            var resultsN = _findClient.Search<FoodNode>().PublishedInCurrentLanguage()
                                                        .Filter(i => i.DefaultImageUrl().Exists())
                                                        .Take(1000)
                                                        .GetResult<FoodNode>()
                                                        ?.ToList();

The Setter is never called when the results return. (I tried with GetContentResult without success)
This gives performance issue because for each results I now have to call the asset loader... I think it could be avoided since the DefaultImageUrl is part of the Find result payload.

I followed the documentation from here: https://world.episerver.com/documentation/Items/Developers-Guide/EPiServer-Find/9/DotNET-Client-API/Customizing-serialization/Including-fields/ 

Exception when adding/updating cart or listing cart items, problem with workflow

$
0
0

Hi!

We are running Commerce 11.2.2 and are still using workflows. We just found out that exceptions are caught when we run the CartValidate workflow.

Our code:

public bool AddToCart(string code, decimal quantity, out string warningMessage)
        {
            var entry = CatalogContext.Current.GetCatalogEntry(code);
            if (SiteContext.Current.Currency != _cartHelper.Cart.BillingCurrency)
            {
                SiteContext.Current.Currency = _cartHelper.Cart.BillingCurrency;
            }
            var lineItem = _cartHelper.AddEntry(entry, quantity, false);
            // If this is not set explicitly, 
            // place price does not get updated by workflow
            _cartHelper.Cart.ProviderId = "frontend";
            ValidateCart(out warningMessage);
            return _cartHelper.LineItems.Select(x => x.Code).Contains(code);
        }

Running this code gives us this exception:

Mediachase.BusinessFoundation.Data.Meta.ObjectNotFoundException: Object Contact.PrimaryKeyId = 'c0105be4-02c0-4bb5-a257-0b9c76dfa12e' not found
  at Mediachase.BusinessFoundation.Data.Meta.MetaObject.GetRowSource
  at Mediachase.BusinessFoundation.Data.Meta.MetaObject.Load
  at Mediachase.BusinessFoundation.Data.Meta.MetaObject..ctor
  at Mediachase.BusinessFoundation.Data.Meta.MetaObject..ctor
  at Mediachase.BusinessFoundation.Data.Meta.MetaObjectActivator.CreateInstance
  at Mediachase.BusinessFoundation.Data.Meta.MetaObjectActivator.CreateInstance
  at Mediachase.BusinessFoundation.Data.Meta.MetaObjectActivator.CreateInstance
  at Mediachase.BusinessFoundation.Data.Business.EntityObjectDefaultRequestHandler.Load
  at Mediachase.BusinessFoundation.Data.Business.EntityObjectDefaultRequestHandler.Execute
  at Mediachase.BusinessFoundation.Data.Business.BaseRequestHandler.Mediachase.BusinessFoundation.Data.Business.IRequestHandler.Execute
  at Mediachase.BusinessFoundation.Data.Business.BusinessManager.ExecutePipeline
  at Mediachase.BusinessFoundation.Data.Business.BusinessManager.ExecutePipelineInTransaction
  at Mediachase.BusinessFoundation.Data.Business.BusinessManager.Execute
  at Mediachase.BusinessFoundation.Data.Business.BusinessManager.Load
  at Mediachase.BusinessFoundation.Data.Meta.MetaObject.GetRowSource
  at Mediachase.BusinessFoundation.Data.Meta.MetaObject.Load
  at Mediachase.BusinessFoundation.Data.Meta.MetaObject..ctor
  at Mediachase.BusinessFoundation.Data.Meta.MetaObject..ctor
  at Mediachase.BusinessFoundation.Data.Meta.MetaObjectActivator.CreateInstance
  at Mediachase.BusinessFoundation.Data.Meta.MetaObjectActivator.CreateInstance
  at Mediachase.BusinessFoundation.Data.Meta.MetaObjectActivator.CreateInstance
  at Mediachase.BusinessFoundation.Data.Business.EntityObjectDefaultRequestHandler.Load
  at Mediachase.BusinessFoundation.Data.Business.EntityObjectDefaultRequestHandler.Execute
  at Mediachase.BusinessFoundation.Data.Business.BaseRequestHandler.Mediachase.BusinessFoundation.Data.Business.IRequestHandler.Execute
  at Mediachase.BusinessFoundation.Data.Business.BusinessManager.ExecutePipeline
  at Mediachase.BusinessFoundation.Data.Business.BusinessManager.ExecutePipelineInTransaction
  at Mediachase.BusinessFoundation.Data.Business.BusinessManager.Execute
  at Mediachase.BusinessFoundation.Data.Business.BusinessManager.Load

Removing this line of code:

 ValidateCart(out warningMessage);

Which runs the CartValidate workflow, and the exception goes away so I guess there is something in the workflow.

The web works just fine, but I'm nort sure if this affects the perfrormance in any way?

/Kristoffer


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.

Edit --> I should add that Im currently using ADFS for authentication, dont know if that matters. 

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>

Content Expired Event

$
0
0

Hello,

There is already a post for this question but it seems to be archived for new posts. Please refer to https://world.episerver.com/forum/developer-forum/-Episerver-75-CMS/Thread-Container/2017/8/content-expired-event/

Is there an event that runs when the content is expired or is expiring? I tested SavingContent but it does not get fired in this case. I am also not interested in scheduling/scheduled content since they run at the time when the page is marked with an expiration date, not at the time of the expiration date.

AltText is not displayed in Image (Web forms)

$
0
0

Here is my ImageMedia.cs file which inherits ImageData

public class ImageMedia : ImageData
{
public virtual string AltText { get; set; }
public virtual string TitleText { get; set; }
}

And it is displaying in the editmode as follows,

I have made a ContentReference as like below in the block

[CultureSpecific]
        [Required]
        [UIHint(UIHint.Image)]
        [Display(
            Name = "Image",
            GroupName = SystemTabNames.Content,
            Order = 40)]
        public virtual ContentReference Image { get; set; }

However, when I used to show that in the view (Web Forms), it is just displaying the image. Without having any Alt text or Title.

I have accessed that image like below in the view,

<EPiServer:Property runat="server" PropertyName="Image" CssClass="imageCls"></EPiServer:Property>

When it is rendered in view, the code looks like this,

<img title="true" class="imageCls" src="/globalassets/elephant.jpg" style="border-width:0px;">

How can I show the AltText and the TitleText as "alt" and "title" in the finally rendered view?

Thanks in advance :)

I am having,
EPiServer.CMS.Core version=11.11.0
EPiServer.CMS.UI version=11.14.0
EPiServer.CMS.UI.Core version=11.14.0

Episerver.Marketing.Testing makes our WebApi routes return 500 errors

$
0
0

Hi,

We installed the latest version of Episerver.Marketing.Testing, 2.5.5 in our solution and now our webapi routes don't work anymore. We get the following error on all our webapi routes: 

ExceptionMessage"The object has not yet been initialized. Ensure that HttpConfiguration.EnsureInitialized() is called in the application's startup code after all other initialization code."

Before installing the package everything worked fine. I think it has to do with how the plugin initializes its own routes and does it in a way that we can't add our own.

Any thoughts?

Static Helper Class vs Dependency Injection

$
0
0

Hi guys, 

very simple question, 

I had a static helper class that provides for me the Content References for some of the most used pages in the solution. 

Then other developer said, let' not use it but create an interface and class implementation with ServiceConfiguration  attrubute. And later on use it as a constructor injection to get the instance.

As far as I understand there is nothing wrong in the static helper class when i am not referencing none of the shared variables.. which in my case should not as I only get the references to the instances of the pages.. 

Where the approach with the dependency injection seems to me an overkill..  

In any way, just would like to hear the opinions of fellow EpiServer developers on this subject. Thank you

By the way, why Injected<T> is anti-pattern?

Exception when adding/updating cart or listing cart items, problem with workflow

$
0
0

Hi!

We are running Commerce 11.2.2 and are still using workflows. We just found out that exceptions are caught when we run the CartValidate workflow.

Our code:

public bool AddToCart(string code, decimal quantity, out string warningMessage)
        {
            var entry = CatalogContext.Current.GetCatalogEntry(code);
            if (SiteContext.Current.Currency != _cartHelper.Cart.BillingCurrency)
            {
                SiteContext.Current.Currency = _cartHelper.Cart.BillingCurrency;
            }
            var lineItem = _cartHelper.AddEntry(entry, quantity, false);
            // If this is not set explicitly, 
            // place price does not get updated by workflow
            _cartHelper.Cart.ProviderId = "frontend";
            ValidateCart(out warningMessage);
            return _cartHelper.LineItems.Select(x => x.Code).Contains(code);
        }

Running this code gives us this exception:

Mediachase.BusinessFoundation.Data.Meta.ObjectNotFoundException: Object Contact.PrimaryKeyId = 'c0105be4-02c0-4bb5-a257-0b9c76dfa12e' not found
  at Mediachase.BusinessFoundation.Data.Meta.MetaObject.GetRowSource
  at Mediachase.BusinessFoundation.Data.Meta.MetaObject.Load
  at Mediachase.BusinessFoundation.Data.Meta.MetaObject..ctor
  at Mediachase.BusinessFoundation.Data.Meta.MetaObject..ctor
  at Mediachase.BusinessFoundation.Data.Meta.MetaObjectActivator.CreateInstance
  at Mediachase.BusinessFoundation.Data.Meta.MetaObjectActivator.CreateInstance
  at Mediachase.BusinessFoundation.Data.Meta.MetaObjectActivator.CreateInstance
  at Mediachase.BusinessFoundation.Data.Business.EntityObjectDefaultRequestHandler.Load
  at Mediachase.BusinessFoundation.Data.Business.EntityObjectDefaultRequestHandler.Execute
  at Mediachase.BusinessFoundation.Data.Business.BaseRequestHandler.Mediachase.BusinessFoundation.Data.Business.IRequestHandler.Execute
  at Mediachase.BusinessFoundation.Data.Business.BusinessManager.ExecutePipeline
  at Mediachase.BusinessFoundation.Data.Business.BusinessManager.ExecutePipelineInTransaction
  at Mediachase.BusinessFoundation.Data.Business.BusinessManager.Execute
  at Mediachase.BusinessFoundation.Data.Business.BusinessManager.Load
  at Mediachase.BusinessFoundation.Data.Meta.MetaObject.GetRowSource
  at Mediachase.BusinessFoundation.Data.Meta.MetaObject.Load
  at Mediachase.BusinessFoundation.Data.Meta.MetaObject..ctor
  at Mediachase.BusinessFoundation.Data.Meta.MetaObject..ctor
  at Mediachase.BusinessFoundation.Data.Meta.MetaObjectActivator.CreateInstance
  at Mediachase.BusinessFoundation.Data.Meta.MetaObjectActivator.CreateInstance
  at Mediachase.BusinessFoundation.Data.Meta.MetaObjectActivator.CreateInstance
  at Mediachase.BusinessFoundation.Data.Business.EntityObjectDefaultRequestHandler.Load
  at Mediachase.BusinessFoundation.Data.Business.EntityObjectDefaultRequestHandler.Execute
  at Mediachase.BusinessFoundation.Data.Business.BaseRequestHandler.Mediachase.BusinessFoundation.Data.Business.IRequestHandler.Execute
  at Mediachase.BusinessFoundation.Data.Business.BusinessManager.ExecutePipeline
  at Mediachase.BusinessFoundation.Data.Business.BusinessManager.ExecutePipelineInTransaction
  at Mediachase.BusinessFoundation.Data.Business.BusinessManager.Execute
  at Mediachase.BusinessFoundation.Data.Business.BusinessManager.Load

Removing this line of code:

 ValidateCart(out warningMessage);

Which runs the CartValidate workflow, and the exception goes away so I guess there is something in the workflow.

The web works just fine, but I'm nort sure if this affects the perfrormance in any way?

/Kristoffer

[12.15.0] Double tax added?

$
0
0

Hi,

I'm experiencing a very odd behavior in EPiServer Commerce...

Sometimes, very infrequently, an extra tax value is added to the cart. An example is a subscription for a publication for 149kr, which includes 6% sales tax. An additional 6% sales tax is added, for a total of 157,94kr. I haven't been able to reproduce this, neither on the production site, nor in the development environment.

In the code, I leave all tax handling to EPiServer Commerce (and the prices in the (single) market includes tax). I have, however, overriden DefaultTaxCalculator.CalculateShippingTax(ILineItem, IMarket, IOrderAddress, Mone) to always return 0. Since we never add shipping cost for a line item, this shouldn't cause any problems.

I haven't been able to find anything consistent about the (very few) problematic orders. None of the orders contain the same variations (though all of the orders only contain 1 variation), they used different payment methods, they all live in the same country (Sweden), no additional shipping fees have been added.

Has anyone else experienced this?

Any tips on how to try to track this down?


How to group by content to IList property in CMS

$
0
0

Hi,

I have a requirement of grouping the content in IList propery in CMS. Below is my property example.

[Display(
Name = "General questions",
GroupName = SystemTabNames.Content,
Order = 130)]
[CultureSpecific]
public virtual IList<ContentReference> GeneralQuestions { get; set; }

So here, Editor can drag and drop all the content references but i need to have one more option of grouping content references with name.

It's kind of Visitor group format. But i dont want to use this as it's only text group format.

Favicon in Edit & Admin mode

$
0
0

Hi!

Is there any way to change the favicon inside edit and admin mode in EPiServer?

We changed the image and logo on the Log-in page as Jon Jones describes here.

Is there a similar path that can be replaced for the favicon?

Browser tab 1: Edit mode (epi icon)
Browser tab 2: Site (custom icon)

/Magnus

How do i update values in Blocks programmatically?

$
0
0

Hi I have another specific feature i have to make:

I want to have a 'checkbox' in a block, that can be used to reset other properties of the same blocktype. I use a  page events InitializableModule that checks if a certain blocktype is updated:

 

var repo = ServiceLocator.Current.GetInstance();
            var content = repo.Get(e.ContentLink);
            try {
                if (content.ContentTypeID == Hint.Constants.PollBlockTypeID)
                {
                    PollBlock myPoll = content as PollBlock;
                    var clonePoll = (IContent) myPoll.CreateWritableClone();
                    bool resetValues = false;
                    Boolean.TryParse(clonePoll.Property["ResetVotes"].Value.ToString(), out resetValues);
                    if (resetValues)
                    {
                        clonePoll.Property["CountAnswer1"].Value = 0;
                        clonePoll.Property["CountAnswer2"].Value = 0;
                        clonePoll.Property["CountAnswer3"].Value = 0;
                        clonePoll.Property["CountAnswer4"].Value = 0;
                        clonePoll.Property["CountAnswer5"].Value = 0;
                        clonePoll.Property["CountAnswerTotal"].Value = 0;
                        clonePoll.Property["VotedBy"].Value = string.Empty;
                        clonePoll.Property["ResetVotes"].Value = false;
                        repo.Save(clonePoll, SaveAction.Publish,AccessLevel.Publish);
                        e.CancelAction = false; //??
                    }
                }
            }
            catch (Exception exc)
            {
            }

It all seems to work, however, because i change the block whilst it was active, it keeps asking me to publish the page. How can i properly update the Block and go back to previewing the block?

Thanks in advance

Episerver Forms SDK

$
0
0

I was wondering if there was an online SDK reference for Episerver Forms?

Thanks

Cannot read property 'contentData' of null -- Publish (when EPiServer.Marketing.Testing installed)

$
0
0

Hello All,

I am starting out my journey into EpiServer and trying to spin up the AlloyDemo application. I am playing around with Users and associated permissions (more specifically Publishing a page). I ran into an issue where the Publish "popup" is not showing up. When I see the console I get the following error. This error goes away and the Publish popup comes up correctly when I uninstall the EPiServer.Marketing.Testing (I am not sure about the dependency between the Marketing.Testing and popups)

Uncaught TypeError: Cannot read property 'contentData' of null
at Object._isOpenSetter (widgets.js:2)
at Object.set (epi.js:2)
at Object.onOpen (widgets.js:2)
at Object.open (widgets.js:2)
at Object.advice (dojo.js:15)
at Object._264 [as open] (dojo.js:15)
at Object.openDropDown (widgets.js:2)
at Object.<anonymous> (widgets.js:2)
at dojo.js:15
at Object.loadAndOpenDropDown (widgets.js:2)

Would really appreciate any pointers.

Sincerely

Viewing all 6894 articles
Browse latest View live