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

How to Read SetChangedOnPublish Property Value on Inherit Pages

$
0
0

Hi,

We have a case where we are creating Master Child Page Type References.

I see when I try to update modify page date by clicking on Update Modification Date in Master Page Properties, it updates Master Page Modification Date but fails to update referenced child pages.

I tried referring to other page properties it refers to correct value, but when referring to Update Modification Date CheckBox Value it always is referred as False. 

I want when user selects Master Modification Date Update CheckBox to True only then Child should update its Modification Date.

How can I do this ?

Any help would be appreciated.

I am looking for something like this:

if (master.SetChangedOnPublish == true)
{

inheritpage.SetChangedOnPublish = true;
}
else
{
inheritpage.SetChangedOnPublish = false;
}

Regards,

Rajesh K


Run Episerver in Docker with microsoft/dotnet

$
0
0
We are running Episerver CMS on Windows Server, but would like it to run in a Linux container instead.
We have several dotnet core applications running on the Docker image microsoft/dotnet already and see both performance and cost benefits already, as well as much better operability.
Is there any chance that Episerver CMS will run on i.e. microsoft/dotnet container in Linux? 

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>

Custom URL Rewriter Error in Episerver 8

$
0
0

Hi there, 

I'm trying to upgrade an episerver 7.5 site to 8, and I've run into an issue where the custom URL rewriter that we have no longer works. 

We have some ghost tabs on a site, that list the team working on a business line, and this "Our-Team tab does not have any physical representation in the tree. It just gets rendered by the template that the tab is rendered on. 

This was still working in Episerver 7, but having changed the UrlRewriteModule to EPiServer.Web.RoutingUrlRewriteModule. Here's the relevant lines from the Episerver.config:

<urlRewrite defaultProvider="CustomUrlRewriter">
<providers>
<clear />

<add description="True custom url rewriting" name="CustomUrlRewriter" type="True.Aspen.Enterprise.Classes.Extensions.CustomUrlRewriter,True.Aspen.Enterprise" />
</providers>
</urlRewrite>

So it looks like the ConvertToInternal method of the Custom URL rewriter does not get called any longer. Can I keep it somehow? If not, is there any way for me to route to it? How? 

Any help would be appreciated.

Custom Visitor group based campaign

$
0
0

Hi Team,

I am using a custom cookie-based visitor group for promotion. For a situation like below how to handle that?

1.visitor a group G- campaign gold

2.visitor a group S- campaign silver

3.visitor a group P- campaign platinum

If using below method I will check cookie contains valid data or not. how the campaign is for a specific visitor group?

 public class CookieExistsCriterion : CriterionBase<CookieExistsCriterionSettings>
    {
        public override bool IsMatch(IPrincipal principal, HttpContextBase httpContext)
        {
       return IsValidcookievalue() ;
        }
}

Note: I am not able to add a user in visitor group.

Please help me out.

Show Unpublished/Scheduled items in admin navigation panel (page tree) first

$
0
0

I noticed, that the standard Epi behaviour while copying some item from/to page tree is that the copy of item being pasted just below it's original.

Implemented this thing - https://world.episerver.com/forum/developer-forum/-Episerver-75-CMS/Thread-Container/2018/5/copy-and-pasted-pages-always-have-published-status/ - copies are not published yet and in this case being pasted on bottom of the item list (page tree) no matter what kind of sorting is set for their parent page.

So I would like to know if it's even possible to keep copies as unpublished and still paste them just below their originals or at least to paste them on a very top of the item list (page tree), not bottom of it.

Thank you, cheers

Impossible obsolete suggestion in EntryPromotionProcessorBase in Commerce 12?

$
0
0

Hi,

I would probably report this as a bug, but I'm locked out of that system for whatever reason (will look into that later) and we might have missed something.

My colleage updated a project to Commerce 12.latest from 11 and this introduced the following warning

[Obsolete("This method is no longer used. Use the RedemptionLimits.GetRemainingRedemptions(PromotionData) instead. This method will remain at least until October 2019.")]
    EntryPromotionProcessorBase<TEntryPromotion>.GetMaxRedemptions(RedemptionLimitsData redemptions)

We got this warning because we have built a custom gift promotion that has a custom logic for getting redemptions.

However, I don't see how it is possible to do, I can't follow the suggestions from the Obsolete warning and I can't find any other way other than reflection or fetching things from the database again to achieve this: I want to know how many redemptions that I maximum can redeem in the promotion processor.

The RedemptionLimits is a data class, so I can't inject this to access the method "GetRemianingRedemptions". The method is not static either, because again it is a data class, with calculated data. I can't access the already calculated RedemptionLimits class, even though it exists on PromotionProcessorContext, because on PromotionProcessorContext it is internal.

I can't see anything else I can use instead, I can probably inject an IRedemptionLimitService to calculate and create a new RedemptionLimits object, but the promotion engine has already created one and put it on the context, but again that is internal. I don't want to do the same calculation and possibly database fetch twice.

Am I missing something or is this a bug? :D 

Epi Find Filter question

$
0
0

Hi Guys,

So i just can't get my filter expression to work with my query to filter on a boolean.

So i've simplified the query for now. I have a q term which returns 9 results. 

My SitePageData (which is my basepage in my Site which is a Pagedata) has a NoIndex (boolean) property. 

Now i want to filter the pages which that has NoIndex set to true on the page, but with the below filterexpression i cannot get this to work. 

var results = SearchClient.Instance.UnifiedSearchFor(q)               
                .Filter(x => ((SitePageData)x).NoIndexFilters())                
                .GetResult();
 public static FilterExpression<SitePageData> NoIndexFilters(this SitePageData sitePageData)
        {
            return new FilterExpression<SitePageData>(x =>
                x.NoIndex.Match(true));
        }

If i set the Match to true i just get all 9 results back.. if i set it to false, i get 0 results, which is just weird. Am i not using this correctly. 

Just to check if stuff is working i changed the filter to just return pages of type ContentPages. And that seems to be working. Because out of my 9 pages, i get 3 back which are all of ContentPages. So this works, but my filter on the NoIndex Boolean doesnt. 

  public static FilterExpression<SitePageData> NoIndexFilters(this SitePageData sitePageData)
        {
            return new FilterExpression<SitePageData>(x =>
                x.MatchTypeHierarchy(typeof(ContentPage)));
        }

Any insight would be helpful..

regards,


Issue adding meta fields to meta classes grammatically

$
0
0

We’ve created a cms scheduled job that processes a queue of operations on meta classes and meta fields.  In this job we Create and Delete meta classes and meta fields.  We also relate meta fields to meta classes.  During the job execution we have an issue where the sql server cpu is getting slammed due to thousands of calls to the following stored procedure per second:  mdpsp_sys_LoadMetaFieldListByMetaClassId.  The stored proc alone is pretty simple and fast, but what is making this SP execute so often?

We're using the MetaClass and MetaField classes in the Mediachase.MetaDataPlus.Configurator namespace.

Through some debugging we've narrowed it to the following method in the MetaClass class:

private void AddFields(IEnumerable<MetaField> metaFields, int weight)

In this method the following line is responsible for the call to the stored proc mentioned above, because the MetaFields property calls LoadMetaFields().

this.MetaFields.Add(metaField);

Here is our code that is called maybe 300 times during the life of the job

public string CreateMetaFieldRelation(MetaClass metaClass, MetaField metaField)
        {
            if (metaClass == null)
                return "ERROR: Meta class does not exist";
            metaClass.AddField(metaField);
            return _successMessage;
        }

EPiImageProperty and EPiImageGallery not working in EPiServer 7.5 with dojo framework

$
0
0

I am following below article http://world.episerver.com/Blogs/Tuan--Truong/Dates/2014/6/EPiImage--EPiImage-Gallery-dojo-based-custom-property-for-EPiServer-75-and-above/

EPiImageProperty and EPiImageGallery property rendering properly in on page edit mode but not able to update image title, description and LinkUrl of EPiImagePropery when clicking on “Edit Info” when we edit existing EPiImage Property.


Also in EPiImageGallery Property , able to add first image, but later unable to add second image or so.

Below are the EPiImage integration steps followed on sample site.


1) I have created a sample site solution and in which I added EPiImage Project So that I can reference it and use debugging function if required. As per instructions, I have added Client Resources and module.config in my web project.

Step 1

2) As per instruction of article, I have added other required resources in side project like ClientResources and module.config.

Step 2.1

Step 2.2

3) Now I have create a page type with name of ‘StartPage’ in side Models of web project and then I have added EPiImageProperty and EPiImageGalleryProperty within that page type as per instructions given in article . After adding these properties I built project with success.

Step 3

4) I run project and logged in CMS Panel then found both properties to edit or add.

Step 4

5) I was able to add new image and relevant info like title, description and link.

Step 5

6) Now issue was aroused that I cannot edit any image info like title/description/link. Popup will open every time and but it will not trigger for published/AutoSaved and finally I cannot save changes to the server.

Step 6

I have checked that No error is occurred in side firebug of Mozilla at time of pressing ok button.

7) In case of ImageGalleryProperty, I can add only one image in collection. I cannot add more than one image in collection.

Step 7

So, let us know if any one facing same issue with EPiImage on EPiServer 7.5 (7.16.0.0) using WebForms. Your help will be highly appriciated.

Thank you.

Regards, Yagnik Jadav

CreatedContent Event firing twice

$
0
0

Having this code:

private void CreatedContent(object sender, ContentEventArgs e)
{
    var a = e.Content is ArticlePage;
    if (a) {

        ...

    }

}

While debugging it goes twice returning "a = true" at first and "a = false" at second.

Why could possibly it be happening?

Eventually, code under "if" never gets executed.

Unique Product Content Types under an instance of Node Content

$
0
0

Hi,

My catalog contains a collection of node content pages and under any node could be a number of different implementations of a product content type.

When loading my category node, I'd like to run a query to return the unique product content types which are children of that node. For example when loading a page, if there are 100 of one product and only 2 of another type, i'd like my query to return the 2 unique types.

My site is using Find so maybe there's a clever option using that.

Has anyone had to do this before?

Thanks in advance!

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?

Deleting assets

$
0
0

Hi

We have aproblem when we delete an asset on a product/variant it is not deleted it just stays where it is.

can some one tell me what is the propper way to delete all assets on a product? (codewise c#)

Security Exception (Index Site Content)

$
0
0

While trying to access the "Index Site Content" - /EPiServer/EPiServer.Search.Cms/IndexContent.aspx (in cms 11)
Im met with a Security Exception :

Description: The application attempted to perform an operation not allowed by the security policy.  To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file. 

Exception Details: System.Security.SecurityException: Request for principal permission failed.

[SecurityException: Request for principal permission failed.]
   System.Security.Permissions.PrincipalPermission.ThrowSecurityException() +257
   System.Security.Permissions.PrincipalPermission.Demand() +496
   System.Security.PermissionSet.DemandNonCAS() +146
   EPiServer.UI.Admin.IndexContent..ctor() +35
   ASP.episerver_episerver_search_cms_indexcontent_aspx..ctor() +58
   __ASP.FastObjectFactory_app_web_gmuadrnl.Create_ASP_episerver_episerver_search_cms_indexcontent_aspx() +63
   System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp) +132
   System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) +44
   System.Web.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +377
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +134



The problem is that it works fine on my local machine, and this only happens on the production enviroment. I cant seem to figure out whats wrong. Accessing other tools such as export, import
Manage Content, Change log etc all works. I noticed this issue when it seemed like the search had stopped working after the update from cms 10 -> 11.


Not Found at EPiServer.Web.Routing.Internal.MultiplexingRouteHandler.GetPageRouteHandler(Object routedData, String path, String language, Boolean retu

$
0
0


Hi we get a lot of these exceptions after an upgrade from 11.7.1.0 to 11.11.0.0.
One interesting thing is that we didnt notice this exception on our staging server. Only on the production server.

Does anyone have a clue?

Exception:

Not Found
at EPiServer.Web.Routing.Internal.MultiplexingRouteHandler.GetPageRouteHandler(Object routedData, String path, String language, Boolean return404)
at EPiServer.Web.Routing.Internal.MultiplexingRouteHandler.GetRouteHandlerOrRedirect(RequestContext requestContext, Object routedData, Boolean throw404IfNotFound)
at EPiServer.Web.Routing.Internal.MultiplexingRouteHandler.GetHttpHandler(RequestContext requestContext)
at System.Web.Routing.UrlRoutingModule.PostResolveRequestCache(HttpContextBase context)
at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

Versions we use:
EPiServer Episerver Web Content Management System 11.11.0.0 Episerver AB
EPiServer.Cms.Shell.UI OnLine Center support for EPiServer CMS 11.15.0.0 Episerver AB
EPiServer.UI Supporting logic for the built-in web forms and user controls 11.15.0.0 Episerver AB
EPiServer.Cms.AspNet Episerver Web Content Management System 11.11.0.0 Episerver AB

Link validation on content references referenced in an IList (or collection) property

$
0
0

Hi.

I would like to file a feature request.

We are really fond of using the Property Value List (https://world.episerver.com/documentation/developer-guides/CMS/Content/Properties/property-value-list/).

We have experienced a problem when using this with LinkItemCollection- or simple ContentReference properties in a Property Value List. When deleting a page which has a reference to it through a Property Value List, the GUI doesn't report the page as having references to it. I know this isn't one of the supported properties in the Property Value List. However, it would be really nice if that was possible. Using lists is very handy, and is a much better solution than to reference pages which has properties on them which is used in certain scenarios.

We had a support request regarding this (https://support.episerver.com/hc/en-us/requests/263589), as we thought it was a bug, but looking at the documentation, we can see that other properties than String, Int, DateTime, and Double isn't supported.

Thanks!

Make LinkItem a valid property type

$
0
0

LinkItemCollection is great but if you only want one link it would be nice to be able to create a LinkItem property.

Default For this page in media selector

$
0
0

Hi,

is there any way that you can make the media selector (UIHint.Image) as default mark For this page instead of For all sites?

Fuzzy Matches and Stemming

$
0
0

Hi!

I use Find v13.0.1 and Find.Commerce v10.2.0

Let's say I want to search though Variations:

var variationSearchResult = Search().For(searchQuery)
.InField(variation => variation.DisplayName)
.AndInField(variation => variation.Description.AsViewedByAnonymous())

I want to have the exact matches for the DisplayName on the top. Afterwards I want to have the exact matches for the Description. And in the end there should be some results with not exact matches for Display name - so it is ok to have there misprints, stemming, etc.

So basically I thought that something like this can solve this problem:

 .BoostMatching(variation => variation.DisplayName.Match(searchQuery), 13)
 .BoostMatching(variation => variation.DisplayName.MatchFuzzy(searchQuery), 0.1)

But I don't like the results I am getting. For example, some stemming items may appear quite high in the list. The worst thing here is that stemming can work quite badly for Dutch language suggesting completely different words...

Viewing all 6894 articles
Browse latest View live