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

Episerver local environment setup

$
0
0

Hi,

I am trying to configure our client website in my local environment. I have completed code and Episerver database. I am able to connect to the database using SQL.

Am Trying to load the application using Visual Studio IIS Express in my localhost, it is throwing 404 resource can not found error.

I tried URL -- localhost:portnumber/episerver and it gives me below error.

Exception Details: System.SystemException: The trust relationship between the primary domain and the trusted domain failed.

Please help me in setting up my local environment up and running with CMS for my local development and code debugging.

your help much appreciated.


Remove "browse" link from Property

$
0
0

Hi

Is it possible to remove "or Browse..." link from this property?

[Display(Name = "Category nodes", Description = "Soem description")]
[AllowedTypes(new[] { typeof(CatalogNode) })]
[BackingType(typeof(PropertyContentReferenceList))]
[UIHint(UIHint.CatalogNode)]
public virtual IList<ContentReference> SelectedCategories { get; set; }              

Select page tree view should filter pages according to selected language branch

$
0
0

Current situation:

TinyMce allows you to create a link providing language branch as an additional parameter. The page tree that is shown after clicking on ... button includes all pages, regardless the available languages. It's a little bit confusing for content managers to see all pages instead of those which have translation to selected language. It can be a source of various issues as well (I recorded a short video to demonstrate a possible problem https://1drv.ms/v/s!AmXvlc8rEQW7g4EffgoKMJU-eLR6IQ?e=zXw1Ne ).

How to improve:

What I would like to see when I click on the ... button (when the language branch field (1 on the image) has a value):

  • Three view (block 2 on the image) should not contain pages that do not have translation to the selected language. Now the tree view shows all pages.
  • Page names should be in the selected language. It would be easy for content managers to see title in selected language (block 1 on the image)

Thanks in advance!

Guidance on headless mode and preview needed

$
0
0

We currently have a SPA written in Angular with some system components that we would like to re-use on Epi Server side.

I have some pros and cons and some doubts for each option:

Enable headless mode in Epi and re-use/extend SPA application to consume data from episerver

  • PROS:
    • Reuse existing components/limits the effort
    • No need for CSS
    • Seamless experience for users
  • CONS:
    • Possibly effort needed to get OPE working properly (in case editors need it)
  • DOUBTS:
    • Existing SPA app would server as preview (even without OPE) but it sits on different server/URL - can preview work that way?

Bring in the required components into Epi (duplicate) and embed them in pages

  • PROS
    • Easier to put together /leverage OPE
  • CONS
    • some duplication of code
    • might need to adjust some services for components

Rebuild the components in the episerver instance

  • PROS
    • full control over the components
    • full OPE support
  • CONS
    • duplicating the effort
  • new components/features might not align in Epi and rest of the system

I'm personally thinking that option 1. might be the best, because it would allow to take full advantage of the components and effort already invested. However OPE support might be challenging (but probably we can convince user to use preview instead of OPE).

My biggest concern is - can headless mode in EPI work with the actual front-end and preview being hosted from a different website/domain. Disregard license limitations - it's DXC.

Version gadget shows wrong author (cms 10)

$
0
0

episerver.ui 10.12.8.0

 

The version gadget looks like this.

The "By" value is wrong; I've never edited this page.

 

The "Publish"-button, however, has the right author.

Note the same date and timestamp as the latest version in the image above.

 

Looking at the api call to /login/cms/stores/contentversion?contentLink=[pageid], the json response for some of the versions of this page has the wrong "savedBy" value, but correct "statusChangedBy" value.

 

Others have also seen this bug:

https://world.episerver.com/forum/developer-forum/-Episerver-75-CMS/Thread-Container/2019/4/versions-gadget-shows-different-person/

sort search result with different property for different page type.

$
0
0

Hi,

Could some help me?

I have a below requirement from client

PageType Article

{

DateTime Created;

DateTieme Update;

}

PageType Product

{

DateTime Created;

DateTieme Update;

}

We have requirement to sort the search result in following way.

when sorting is by latest, it would sort by page's updated date,

Except: Product pages, those should show in created date order.

Thanks,

Mahesh Kulkarni

Error when saving an EPiServer forms element

$
0
0

Hi, I'm trying to save/publish a selection element block, but I get a 500 error from EPiServer when im trying to publish it. This happens after I have added an element to the selection list. Have anyone else encountered this?

This also happens for the Choice element block.

EPiServer.Forms version 1.1.4.9000

Logged error message:

System.ArgumentNullException: Value cannot be null.
Parameter name: value
at System.ComponentModel.DataAnnotations.ValidationContext.set_DisplayName(String value)
at EPiServer.Validation.DataAnnotationsValidator`1.ValidateInstance(Object instance, List`1 validationResult, ValidationContext validationContext)
at EPiServer.Validation.DataAnnotationsValidator`1.ValidateInstance(Object instance, List`1 validationResult, ValidationContext validationContext)
at EPiServer.Validation.DataAnnotationsValidator`1.Validate(T instance)
at EPiServer.Validation.ValidationService.ValidateRecursively(Object instance, HashSet`1 visitedInstances)
at EPiServer.Cms.Shell.UI.Rest.ContentChangeManager.UpdateContentProperties(ContentReference contentReference, IDictionary`2 properties, SaveAction saveAction)
at EPiServer.Cms.Shell.UI.Rest.ContentDataStore.Patch(PatchContentDataModel entity)
at lambda_method(Closure , ControllerBase , Object[] )
at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.b__39(IAsyncResult asyncResult, ActionInvocation innerInvokeState)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`2.CallEndDelegate(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.b__3d()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass46.b__3f()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass46.b__3f()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass21.<>c__DisplayClass2b.b__1c()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass21.b__1e(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult)
at EPiServer.Shell.Services.Rest.RestControllerBase.EndExecute(IAsyncResult asyncResult)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
>
>>
>
>

Convert Blocks

$
0
0

Please could we have a 'Convert Blocks' feature, that does exactly the same as 'Convert Pages' but for Blocks.

Currently, if you refactor a block type in code and rename it to something else, the existing blocks are effectively lost and will need to be recreated using the new block type.

This could probably be done directly in the DB but as there is already a feature that does this for pages it makes sense to extend this functionality to blocks.


Whitelist for autocomplete

$
0
0

Hi. In an EPiserver project I working on, we use EPiserver.Find as search provider. We also use the autocomplete api as described under statistics ( https://world.episerver.com/documentation/developer-guides/find/search-statistics/).

We find that the users are searching for stranges things and we need to limit the results in the autocomplete list.

It is possible to get only the phrases added in the autocomplete panel in Episerver.find as a whitelist  without searching in the statistics data?

Import large export files

$
0
0

Hi!

When I try to import an export file that is 103Mb, the page says "The page was not displayed because the request entity is too large."

What Is the limit and how can I change it?

Best regards

Kristian

Content selelection dialog hanging when using AllowedTypes that does not implement IContent

$
0
0

Hi,

I have a content area that uses an interface to restrict that content can be added to it. The restriction is to a marker interface that's defined on both a page type and a block type. There no documentation that describes any restrictions to what the interface has to implement in the documentation as far as I can tell:

https://world.episerver.com/documentation/developer-guides/CMS/Content/Properties/built-in-property-types/Restricting-content-types-in-properties/

However, whe I search for the error I'm getting I found a thread where Casper Rasmussen say that the interface has to implement IContent. If that's the case, it should be mentioned in the documentation (the page above). However - a quite common case is that you want to allow either a page or a block that implements a given interface. Since the code for blocks don't implement IContent (this is implemented in the wrapping instance in Episerver) I don't know if this is possible.

I should mention that the content area works in general - you can always drag and drop content into it - but since I got a test report of this error I thought that I should investigate it. 

Failed Password Attempt Count on Login

$
0
0

Hi!

I would like to display the failed login attempts when user enter incorrect password.

Is there any possibilty is there using EpiServer extensions? or do we need to write any extra code to get this happen.

we using System.Web.Security.MembershipUser.

Help me on this to do

Thank you All!!

Varying (non-deterministic) result order with unified search

$
0
0

When I search repeatedly, my results are ordered differently. Not every consecutive search changes the order, but when I recorded the top ten results of five searches, there were three different orders (with two repeated twice).

I've reduced my code to just 

var search = SearchClient.Instance
                .UnifiedSearchFor(query)
                .Take(10)
                .GetResult();

Any tips on how I might go about debugging this? I have tried manually running the indexing job.

Edit: Grammar.

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.

How to write DRY code with filter facets

$
0
0

I'm working on a search solution using unified search that has a few category filters.

When making the filterfacets to display the number of results to be expected in each category, the code looks like

search = search.FilterFacet(Articles, content =>
    content.MatchTypeHierarchy(typeof(ArticlePage))
    | content.MatchTypeHierarchy(typeof(SpecialReport))
    | content.MatchTypeHierarchy(typeof(SomeOtherPublication)));

then, when actually filtering the results, the code looks like

if (filter == Articles)
{
    search = search.FilterHits(content =>
        content.MatchTypeHierarchy(typeof(ArticlePage))
        | content.MatchTypeHierarchy(typeof(SpecialReport))
        | content.MatchTypeHierarchy(typeof(SomeOtherPublication)));
}

So it seems like this should be the same thing, because it's the exact same code, but I'm having a bit of trouble separating it.

If I make it an extension method like this, for instance

public static EPiServer.Find.Api.Querying.Filter FilterArticles(this ISearchContent content)
{
    return content.MatchTypeHierarchy(typeof(ArticlePage))
        | content.MatchTypeHierarchy(typeof(SpecialReport))
        | content.MatchTypeHierarchy(typeof(SomeOtherPublication)));              
}

Then there's no repetition

search = search.FilterFacet(Articles, content =>
    content.FilterArticles());
if (filter == Articles)
{
    search = search.FilterHits(content =>
        content.FilterArticles());
}

But I get a runtime exception

variable 'content' of type 'EPiServer.Find.UnifiedSearch.ISearchContent' referenced from scope '', but it is not defined

I've tried various permutations on this. Anyone know the right way to do it?

By the way, I think the code is built this way instead of using the unified search features because the categories aren't well represented in the code. For instance, the "Article" category displayed to the user consists of multiple page types that don't share a common class in the code. At least not a common class that distinguishes them from other categories.


Code first migration not working when deploying on DXP/DXC

$
0
0

Hi,

I am using foundation for a new project we have, I am facing an issue where the table is not getting created via EF Code first approach. It works when I do the update-database via the NuGet console on local. But after deploying to Integration on DXC it did not work. There was a similar issue earlier on this forum, I am doing all that was suggested on that topic, but the issue still persists. Below is all the code related to it:

using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Foundation.DataLayer.Entities
{
    [Table("Retailers")]
    public class Retailer
    {
        [Key]
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int Id { get; set; }
        public string Name { get; set; }
        public string ImageName { get; set; }
        public string Url { get; set; }
    }
}
using Foundation.DataLayer.Entities;
using System.Data.Entity;
namespace Foundation.DataLayer
{
    internal class TestDataContext : DbContext
    {
        public TestDataContext() : base("EcfSqlConnection")
        {
        }
        public DbSet<Retailer> RetailerEntities { get; set; }
    }
}

I then ran the Enable-Migrations commad, and then Add-Migration TestTable. This then creates a Migration folder along with the 2 classes below:

namespace Foundation.Migrations
{
    using Foundation.DataLayer;
    using Foundation.DataLayer.Entities;
    using System;
    using System.Data.Entity;
    using System.Data.Entity.Migrations;
    using System.Linq;
    internal sealed class Configuration : DbMigrationsConfiguration<TestDataContext>
    {
        public Configuration()
        {
            AutomaticMigrationsEnabled = false;
        }
        protected override void Seed(TestDataContext context)
        {
            var obj = new Retailer()
            {
                ImageName = "Test.jpg",
                Name = "Test Name",
                Url = "http://www.google.com"
            };
            context.RetailerEntities.AddOrUpdate(obj);
            context.SaveChanges();
        }
    }
}
namespace Foundation.Migrations
{
    using System;
    using System.Data.Entity.Migrations;
    public partial class TestTable : DbMigration
    {
        public override void Up()
        {
            CreateTable("dbo.Retailers",
                c => new
                    {
                        Id = c.Int(nullable: false, identity: true),
                        Name = c.String(),
                        ImageName = c.String(),
                        Url = c.String(),
                    })
                .PrimaryKey(t => t.Id);
        }
        public override void Down()
        {
            DropTable("dbo.Retailers");
        }
    }
}

I then added a new Initialization for this:

using System.Data.Entity;
using EPiServer.Framework;
using EPiServer.Framework.Initialization;
using Foundation.DataLayer;
namespace Foundation.Infrastructure
{
    [ModuleDependency(typeof(EPiServer.Web.InitializationModule))]
    public class MigrationInitialization : IInitializableModule
    {
        public void Initialize(InitializationEngine context)
        {
            Database.SetInitializer(new MigrateDatabaseToLatestVersion<TestDataContext, Migrations.Configuration>());
        }
        public void Uninitialize(InitializationEngine context)
        {
            //Add uninitialization logic
        }
    }
}

I also get an error that Entity Framework 6.4 does not have the migration files, upon looking into the package I did not find any migration files under the tools folder in the EntityFramework.6.4.0 nuget package  and hence went down to 6.2.

Also, while I was debugging on Inte; I see that the seed method is not being triggered. On local the moment I we enter the update-database on the Nuget Console, it triggers the seed method.

The update schema app settings config is set to true, the connection string name is correct amd the custom initialization module has a dependency on EPiServer.Web.InitializationModule. Since I am using foundation and have not made any changes to the configurations, my expectation was this should be a smooth sail. But it doesnt seem to be the case, is there any configuration I need to turn on/off. 

Unit testing a class with a dependency on FilterAccess

$
0
0

Hi

I am trying to write some unit tests for our solution, and honestly I am finding it a bit like pulling teeth.

But I have managed to get as far as making/finding/altering a FakeContentRepository, such that I can CRUD pages and blocks.

however, I have a service that I am trying to write tests for, which gets pages from the repo, and then does the following:

var filterAccess = new FilterAccess(AccessLevel.Publish);
var filteredPages = repoPageList.Where(x=> !filterAccess.ShouldFilter(x)).ToArray();

I cannot see a way to change this up so that it is testable, certainly without changing up the code above. 

Could anyone offer some suggestions please. 

FilterAccess class seems to new up stuff in the ShouldFilter method, so I cant even inject any supporting Interfaces into the serviceLocator.

return new DefaultContentAccessEvaluator((IPublishedStateAssessor) new SimplifiedPublishedStateAssessor(args), (IPrincipalAccessor) new HttpPrincipalAccessor()).HasAccess(content, principal, requestedLevel)

thanks

Linked dropdown does not display value

$
0
0

Having used this setup on o website since it ran 7.5 (http://world.episerver.com/blogs/Duong-Nguyen/Dates/2014/1/Country-Region-drop-down-lists-in-All-properties-mode/) and it has worked great. Now the site is updated to 10.0.1 and now we see a bug in this behaviour. When selecting the first dropdown the values is correctly filtered in the second. But when selecting a value in the second and publishing the page/block, the value in the second dropdown is reset to just show the empty value text. Loading the page/block and looking at the properties shows that the correct value is saved but it's not represented in the all properties view. Is there any changes in the upgrade that affects this and how to figuure that out?

How can I remove «Reports» from the global menu?

$
0
0

I would like «Reports» in the global menu to be visible for members of a specific user group.

Other users should not see «Reports».

How can that be done?

Using the self optimizing block with content delivery API (Episerver.Cms.AddOns.Blocks v2.4.1)

$
0
0

Hi all. My team has a backend service that is utilizing the content delivery API to get block and page information from Episerver to our React app. Our client is interested in using the self optimizing block but I am having trouble getting it to work. I was able to properly render the block using the GetSelectedVariation call on the OptimizingBlock class like this 

var targetContent = optimizingBlock.GetSelectedVariation();

I am having trouble getting Episerver to properly track conversions though. I have configured the goal page for the self optimizing block in the back office. How exactly does Epi track a conversion for this block? Or can anyone offer any more insight that would help me solve this? Note: A/B testing worked out of the box for our site using content delivery API.

Viewing all 6894 articles
Browse latest View live