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

Loading edit mode very slowly every once in a while

$
0
0

Hi!

Sometimes when trying to enter edit mode, it takes several minutes to load it even though no restart of the application has happened or anything. From what I have been able to find out so far, the longest time is spent in the database. Where some GET requests to Home/Index that is /episerver/cms takes as long as 2,5 minutes (where nearly 100% of it is spent in the database). Where it makes 1600 sql queries.

SELECT Id, ItemType FROM [dbo].[VW_EPiServer.Shell.Profile.ProfileData] WHERE [UserName] = @UserName

SELECT Id, ItemType,[UserName] FROM [dbo].[VW_EPiServer.Shell.Profile.ProfileData] WHERE [StoreId] = @StoreId

SELECT tblBigTableReference.ElementType, tblBigTableReference.ElementStoreName, tblBigTableReference.PropertyName, tblBigTableReference.RefIdValue, tblBigTableIdentity.Guid, tblBigTableReference.LongValue, tblBigTableReference.Type, tblBigTableReference.StringValue, tblBigTableReference.ExternalIdValue, tblBigTableReference.DecimalValue FROM [dbo].[tblBigTableReference] LEFT OUTER JOIN [dbo].[tblBigTableIdentity] ON tblBigTableReference.RefIdValue = tblBigTableIdentity.pkId WHERE tblBigTableReference.pkId= @Id AND (tblBigTableReference.Type = @Reference OR tblBigTableReference.Type = @Provider)

SELECT c.name AS column_name,t.name AS type_name,c.max_length,c.precision,c.scale, CAST(CASE WHEN EXISTS(SELECT * FROM sys.index_columns AS i WHERE i.object_id=c.object_id AND i.column_id=c.column_id) THEN 1 ELSE 0 END AS BIT) AS column_indexed FROM sys.columns AS c JOIN sys.types AS t ON c.user_type_id=t.user_type_id WHERE c.object_id = OBJECT_ID('tblBigTableReference') ORDER BY c.column_id;

SELECT CollectionType, ElementType, ElementStoreName, IsKey, [Index] Indexvalue, [BooleanValue], [IntegerValue], [LongValue], [DateTimeValue], [GuidValue], [FloatValue], [StringValue], [BinaryValue], [RefIdValue], [ExternalIdValue], [DecimalValue], tblBigTableIdentity.Guid FROM [dbo].[tblBigTableReference] LEFT OUTER JOIN [dbo].[tblBigTableIdentity] ON tblBigTableReference.RefIdValue = tblBigTableIdentity.pkId WHERE tblBigTableReference.pkId = @pkId AND PropertyName=@PropertyName ORDER BY [Index] ASC, IsKey DESC

SELECT TOP(1) "EPiServer.Shell.Storage.PersonalizedViewSettingsStorage".Id, "EPiServer.Shell.Storage.PersonalizedViewSettingsStorage".ItemType, "EPiServer.Shell.Storage.PersonalizedViewSettingsStorage"."UserName", "EPiServer.Shell.Storage.PersonalizedViewSettingsStorage"."ViewName" FROM [dbo].[VW_EPiServer.Shell.Storage.PersonalizedViewSettingsStorage] as "EPiServer.Shell.Storage.PersonalizedViewSettingsStorage" WHERE ("EPiServer.Shell.Storage.PersonalizedViewSettingsStorage".[UserName] = @Param0 AND "EPiServer.Shell.Storage.PersonalizedViewSettingsStorage".[ViewName] = @Param1)

netNotificationSubscriptionListByKey

SELECT [Limit1].[UserId] AS [UserId], [Limit1].[PropertyNames] AS [PropertyNames], [Limit1].[PropertyValueStrings] AS [PropertyValueStrings], [Limit1].[PropertyValueBinary] AS [PropertyValueBinary], [Limit1].[LastUpdatedDate] AS [LastUpdatedDate] FROM ( SELECT TOP (1) [Extent1].[UserId] AS [UserId], [Extent1].[PropertyNames] AS [PropertyNames], [Extent1].[PropertyValueStrings] AS [PropertyValueStrings], [Extent1].[PropertyValueBinary] AS [PropertyValueBinary], [Extent1].[LastUpdatedDate] AS [LastUpdatedDate] FROM [dbo].[Profiles] AS [Extent1] INNER JOIN [dbo].[Users] AS [Extent2] ON [Extent1].[UserId] = [Extent2].[UserId] INNER JOIN [dbo].[Applications] AS [Extent3] ON [Extent2].[ApplicationId] = [Extent3].[ApplicationId] WHERE (((LOWER([Extent3].[ApplicationName])) = (LOWER(@p__linq__0))) OR ((LOWER([Extent3].[ApplicationName]) IS NULL) AND (LOWER(@p__linq__0) IS NULL))) AND (((LOWER([Extent2].[UserName])) = (LOWER(@p__linq__1))) OR ((LOWER([Extent2].[UserName]) IS NULL) AND (LOWER(@p__linq__1) IS NULL))) ) AS [Limit1]

netSynchedUserList

Where it keeps re-iterating between the last two for the remaining 1580 queries, i'm assuming by iterating through all users or something. Does anyone recognize this problem? It is currently not a very good way for the editors to work if the site takes 2+ minutes to load sometimes.

Br,

Erik


Trouble sorting pages for user friendly sitemap

$
0
0

Hello,

In addition to our XML sitemap, I'm trying to create a sitemap that list all our pages inside an unordered list. The recursive function I've written (see below) works getting all the pages, but the order isn't correct despite using the OrderBy() method.

I need to output all the pages in the same order they appear in Edit mode, so my initial thought was to arrange my results based on their sort index. I went through my content tree and made sure each parent node had it's Sort subpages field set to According to sort index and adjusted all the values. Everything looks and acts correctly within the Edit view, but when I print out my results in the View file I'm not sure how it's determining it's order.

Is there something I missing?

Here's the function I wrote to get all the pages:

protected void DescendContentTree (IContent page, Hashtable tree)
{
  var contentRepository = ServiceLocator.Current.GetInstance<IContentRepository>();
  var check = contentRepository.GetChildren<PageData>(page.ContentLink)
    ?.Where(x => !(x.StopPublish < DateTime.Now))
    ?.OrderBy(x => x.SortIndex);
  Hashtable children;
  if (check.Any())
  {
    children = new Hashtable();
    foreach (PageData item in check)
    {
      DescendContentTree(item, children);
    }
  }
  else
  {
    children = null;
  }
  tree.Add(page, children);
}

And here's a sample of my output: (Showing the sort index value of the page)

  • 0
    • 100
    • 170
    • 290
    • 230
    • 200
    • 140
    • 120
    • 30
      • 550
        • 100
        • 100

EPiServer.Forms.Helpers.Internal.FormsExtensions: cannot get all types from assembly MySql.Web

A/B Testing - StickySiteKpi.AddSessionOnLoadedContent throws NullReferenceException when examining referer header under specific conditions

$
0
0

Hello (Episerver) World!

I believe I have found a rather interesting little bug within the EPiServer.Marketing.KPI.2.4.1 package. I have searched through the release notes to see if a similar bug had been reported and fixed, but I did not find anything. I want to report what I found to see if there is a known solution for this issue and to raise awareness in case there is not a known solution. The site in question is currently running CMS 10.10.x. 

To give some context, an editor recently started an A/B test on the Start Page with a "Time on Page" KPI and a "Site Stickiness" KPI. After this was set up, we started to see an increase in NullReferenceException being reported in Application Insights for a small set of global assets, including one in particular that was going to be included in a wide-ranging marketing email. Here is the stack trace for the error in question:

System.NullReferenceException:
at EPiServer.Marketing.KPI.Common.StickySiteKpi.AddSessionOnLoadedContent (EPiServer.Marketing.KPI, Version=2.4.1.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7) 
at System.EventHandler`1.Invoke (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089) 
at EPiServer.Core.Internal.DefaultContentEvents.RaiseContentEvent (EPiServer, Version=10.10.0.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7) 
at EPiServer.Core.Internal.DefaultContentLoader.TryGet (EPiServer, Version=10.10.0.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7) 
at EPiServer.Core.Internal.DefaultContentLoader.Get (EPiServer, Version=10.10.0.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7) 
at EPiServer.Web.Routing.Segments.Internal.NodeSegment.RouteDataMatch (EPiServer, Version=10.10.0.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7) 
at System.Linq.Enumerable.All (System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089) 
at EPiServer.Web.Routing.Internal.DefaultContentRoute.RouteSegmentContext (EPiServer, Version=10.10.0.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7) 
at EPiServer.Web.Routing.Internal.DefaultContentRoute.GetRouteData (EPiServer, Version=10.10.0.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7) 
at System.Web.Routing.RouteCollection.GetRouteData (System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a) 
at System.Web.Routing.UrlRoutingModule.PostResolveRequestCache (System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a) 
at System.Web.HttpApplication+SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute (System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a) 
at System.Web.HttpApplication.ExecuteStepImpl (System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a) 
at System.Web.HttpApplication.ExecuteStep (System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a)

After a bit of decompiling and debugging, I determined that the error seems to reliably occur when given the following:

  • The request url is for an asset under /globalassets that does not exist (eventually triggering a 404 response)
    • This is case sensitive - /GlobalAssets does not cause this issue because of the string comparison being done in EPiServer.Marketing.KPI.Common.StickySiteKpi.IsSupportingContent
  • The request url is being entered directly in the browser's address bar, as opposed to following a link.
  • httpErrors is configured as such in the web.config:
    <httpErrors errorMode="Custom" existingResponse="Replace"><remove statusCode="500" subStatusCode="-1" /><remove statusCode="404" subStatusCode="-1" /><error statusCode="404" prefixLanguageFilePath="" path="/404/" responseMode="ExecuteURL" /><error statusCode="500" prefixLanguageFilePath="" path="/error.html" responseMode="ExecuteURL" /></httpErrors>
    • We have a dedicated content type for handling 404s that requires us to load the Start Page (ContentReference.StartPage) in order to render navigation, footer, and the like as part of a multi-site setup.
  • The visitor in question has not yet visited the corresponding Start Page since the A/B test had started.
    • This means that the request will not include the SSK_ cookie that is used to track Sticky Site KPI conversions.
    • The decompiler shows that when the cookie does not exist and we are loading the content under test (the Start Page in this case), it checks the current request url to determine if the url points to either: a png file, a css file, a global asset (/globalassets), or a content asset (/contentassets).
    • Since we did not redirect to /404/, the current url is still /globalassets/remainingpath.pdf

Given the above conditions, the Start Page will be loaded from the content repository as part of rendering the Not Found page and EPiServer.Marketing.KPI.Common.StickySiteKpi.AddSessionOnLoadedContent will subsequently be called. Because the Start Page is the content under test, and because the current url contains "/globalassets", and because the SSK_ cookie is not included in the request, EPiServer.Marketing.KPI.Common.StickySiteKpi.IsSupportingContent will return "true" and the KPI will unsuccessfully attempt to dereference HttpContext.Current.Request.UrlReferrer.AbsolutePath.

Even though this bug mainly occurs when the url will cause a 404 response, if the server error response gets cached by the CDN for an asset that will eventually be published (which happened here), this can quickly become a large issue if the PDF/asset is highly important for some business reason. I don't have a question here per se but I am interested in any comments or critiques of my analysis as well as finding out if others have run into this problem :)

Thanks,

Christian

CMS new (11.21) menu with sliding option

$
0
0

Hi,

Have many menu items (Episerver.DeveloperTools) under single global item. On FullHD screen not everything fits in. Is there any way to create sliding menu?

Episerver.CommonFramework vs Episerver.Logging

$
0
0

Trying to upgrade to Epi 11 and got a conflict between the CommonFramework, which uses an old NHibernate and is stuck on log4net 1.2 and the Episerver.Logging.Log4net which uses log4net > 2.

The advice in the previous topic (https://world.episerver.com/forum/developer-forum/Problems-and-bugs/Thread-Container/2016/1/could-not-load-file-or-assembly-39log4net-version1-2-10-0/), to downgrade the logging doesn't work because that version is only valid for Epi 10. Can't ditch the CommonFramework because the site is using Community.

Batch loading of content area items

$
0
0

Working on a site with content areas with many content area items, I was profiling the site and database to improve the first load performance of the site.

I attempted to batch load all items when rendering each content area (in a CustomContentAreaRenderer, using IContentLoader.GetItems). But before even reaching my batch loading code, it turns out Episerver had already loaded each block individually and sequentially. Actually, for most of of the blocks it even called two stored procedures per content area item: netFindContentCoreDataByContentGuid and netContentDataLoad.

It would be really nice if Episerver could batch load all the blocks, when enumerating ContentArea.Items, instead of loading individually?

Or Episerver could just batch preload ContentAreaItem (calling netFindContentCoreDataByContentGuid) when calling ContentArea.Items. Then the actual content could be batch loaded in a CustomContentAreaRenderer.

error The model item passed into the dictionary is of type 'Castle.Proxies.MyBlockProxy'

$
0
0

Episerver version v11.12

I have created some very simple blocks that get added to a page in a standard ContentArea.  Some of the blocks work, others give the error message below.  I am NOT using eCommerce.  I've tried recreating the blocks with different code names and GUIDs and versioned the site in the AssemblyInfo.cs file.  Nothing seems to work.  Any ideas?

Exception message:

The model item passed into the dictionary is of type 'Castle.Proxies.TwoColumnBlockProxy', but this dictionary requires a model item of type 'MTA_Episerver.Models.ViewModels.IPageViewModel`1[MTA_Episerver.Models.Pages.SitePageData]'.

Exception stack trace:

at System.Web.Mvc.ViewDataDictionary`1.SetModel(Object value) at System.Web.Mvc.ViewDataDictionary..ctor(ViewDataDictionary dictionary) at System.Web.Mvc.WebViewPage`1.SetViewData(ViewDataDictionary viewData) at System.Web.Mvc.WebViewPage.ConfigurePage(WebPageBase parentPage) at System.Web.WebPages.WebPageBase.


Eliminate startup items during development

$
0
0

My goal is to get our feedback cycle reduced from the time we make a code change to the time that the application renders in the browser. Currently the first request is taking around 1.1 minute.

Below is the output of the "Startup Performance" feature from Episerver developer tools (https://github.com/episerver/DeveloperTools)

My question is, how can we eliminate these from startup? We may want to toggle them off during development cycles. Is that possible?

CMS new (11.21) menu with sliding option

$
0
0

Hi,

Have many menu items (Episerver.DeveloperTools) under single global item. On FullHD screen not everything fits in. Is there any way to create sliding menu?

Change email on Episerver world account

$
0
0

Hi,

Is it possible to change email on the Epi World account? I cant find how..

/Philip

Publishing sometimes requires two publish action

$
0
0

Might it have to do with the speed the page is edited / published? 

https://graaf-roompot.tinytake.com/tt/Mzg1NzM5MF8xMTgwMTczMQ

Custom redirect in Bvn.404Handler not working

$
0
0

Hi!

I am trying to get the custom redirect gadget in the BVN.404Handler, but I can't get it to work. It simply wont do the redirects I add.

I have installed the latest version (11.2.3).

The 404 redirect is working.

The redirects are set up like this: <oldurl> - <newurl>

If the old url is valid, it will stay there. If the old url doesn't exist anymore, it will show the 404 page.

Replacement for OrderContext.GetTaxes within ITaxCalculator?

$
0
0

Hi,

After upgrade I am getting this warning:

'OrderContext.GetTaxes(Guid, string, string, IOrderAddress)' is obsolete: 'This method is no longer used. Use ITaxCalculator instead. Will remain at least until December 2019.'


ITaxCalculator exposes only two methods that aren't tagged as obsolete, GetSalesTax and GetShippingTax. None of them is doing what OrderContext.Current.GetTaxes did.

Anyone has idea how to use ITaxCalculator instead of old GetTaxes? Thanx

OrderValidationService does not remove lineitem? [12.16]

$
0
0

Hi!

I have a strange, or maybe not, behaviour in the OrderValidationService.

For a variant I set in stock to 1, tracked inventory to true, backorder to 0, preorder to 0.

I then try to add 2 in my cart. Validation kicks in and lowers my quantity to 1. Perfect!

I then update then inventory item in stock to 0. Meaning there are no items available and it cannot be backordered or preordered.
I then add 1 to the cart and the validation does not remove it? Shouldn't the item be removed?

By the way, what is the differce between UpdateInventoryOrRemoveLineItem and AdjustInventoryOrRemoveLineItems?

Thanks!

/Kristoffer

UPDATE

AdjustInventoryOrRemoveLineItems removes the item from the cart but I doesn't reduce to 1 if I have 1 in stock and adds 2. I get validation error like AdjustedQuantityByAvailableQuantity, but quantity is still 2 in the cart. I'm getting confused. Should you run both?


Export Bilingual xliff File

$
0
0

I am trying to update our translated web pages as our English website has some updates. These updates are minor (i.e. adding a sentence or deleting some words), so obviously, it won't make sense to send out the whole page to the translator again. The goal is to sift out the content that has been changed in the CMS and send that to our translators. What I need for the sifting process is a bilingual xliff that contains "not yet updated English content" which corresponds to the "translated content" in the CMS. This way, I can compare the bilingual xliff to the updated English xliff and get the content that has changed. At the same time, leveraging the old translation we have done before.

The existing features in Ektron do not support my need, and I believe this is a very common issue every localization specialist will run into. 

The bilingual xliff will make the translated content more scalable and more convenient for people to manage their translated website. 

Strategy Block Styling

$
0
0

I am using the Strategy Block that comes with EPiServer.PErsonalization.CMS.UI. I want to override the styling/markup. With EPiServer Forms, I can just create new user controls in my solution with the same name/path as the EPiServer forms controls. This does not seem to work with the Strategy Block. I would prefer not to rebuild the entire thing from scratch as it just works from a content perspective. Is there a way to override the markup its using?

Cant use best bet with dashe

$
0
0

Hi,

We can no longer use best bets with dashe in the name, like "e-mail". Is this by design or is it a bug?

/Jesper

 

Get all content with status "Awaiting your review"

$
0
0

I am looking for a solution to get all content with a status "Awaiting Your Review" when Content approval is enabled. I know its available in Task Pane but I want to access this through code.

Importing xliff with the language add-on does nothing

$
0
0

I've followed the steps from http://webhelp.episerver.com/latest/addons/languages.htm by adding a page to a project, export it, changed it and tried to import it back and running the scheduled task but all that happens is that the draft date changes but nothing else.

This blog suggests creating the language first and adding that one to the project https://getadigital.com/blog/episerver-languages-and-xliff-support/

None of these things work, the last step should create a new version with the content from the xml or at least update the existing page. I would have assumed that it would create the language variant by itself but since the other blogg suggested that it might not i tried both.

Have anyone gotten these steps to work and can give me a few pointers?

Thanks

/Tommy

Viewing all 6894 articles
Browse latest View live