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

Getting url to content outside of startpage

$
0
0

We have a single site but to keep the structure clean we put some content outside of the regular startpage structure, we call it Global Content. The content is mostly just settings and "data pages" containing data that is used enrich the regular content on the page, like Tag Pages concept that Allan is talking about here: https://www.codeart.dk/blog/2018/10/design-pattern-tag-pages-instead-of-categories/

In some cases we would like to load a partial view of some of content laying here. We can navigate to that just as usual content, eg. /content/outside/startpage, but when programmatically trying to get the url for that content with either Geta EpiExtensions GetFriendlyUrl or using the UrlResolver directly just gives us null.

Is there something special needed to be able to get the url programmatically?  


Orange "Episerver" button adding namespace to path - causing broken link

$
0
0

This is something funky I just noticed in my development enviorment, and I'd like to fix before I push my code out to production.

It seems like my project just started adding the namespace to the defuault workarea URL. I really have no clue why.  

So instead of

<a href="localhost:port/EPiServer/Cms/?...  

it is now

<a href="localhost:port/<namespace>/EPiServer/CMS/?...

It is also adding the namespace to the links to the thumbnails for blocks and pages. 

I've looked up and down the web config in my dev enviorment and can't seem to find where the namesapce to these links are coming from.  

Any ideas on how I can get these links working again before I make a push to our production?

Strange behavior when editing links in TinyMCE

$
0
0

We have encountered some strange behavior when editing links in the TinyMCE editor. When creating a link using the "Page" radio button and entering "Remaining url" the information is not preserved correctly. The behavior is only reproducible inside a TinyMCE editor, not on Url properties.

It occurs on a freshly installed Alloy site with all the latest updates, namely:

Episerver 11.11, TinyMCE 2.7.1

How to reproduce:
1. In Cms Edit: open a page with a XhtmlString property (such as About us on Alloy)
2. Enter some text and select Insert link
3. Choose Page and select a page
4. Enter a value in Remaining Url
5. Publish

At this point the link works correctly

6. Reload Cms Edit window
7. Click Insert/edit

At this point the link is changed to External

8. Edit any part of the XhtmlString to trigger a Save then Publish


The link no longer works and instead looks something like on the public site: /EPiServer/CMS/Content/en/alloy-plan,,6/test?epieditmode=False&amp;epsremainingpath=test

Is this a known bug? Is there a workaround?

Issue whith TinyMCE 2 and inline blocks

$
0
0

We have problem with Tinymce : when you drop a block in a XHTML it has div tags around it even if the block in view mode is only showing a value.

Tinymce adds p tag around witch results in wrong html for the property.

I managed to add a setting to tinymce but it's only working when the editor drops the block.

When editing a xhmtl with a block in it, Tinymce changes the html despite the setting:  .AddSetting("valid_children", "+p[div]") .

Has someone managed to solve the problem with block div in p tags in xthml properties?

PromotionEngine - Custom Promotion not properly excluded

$
0
0

Hi,

I'm experiencing a problem with promotion exclusions. A custom promotion i created is not excluded from other promotions affecting the same lineitem when i run the promotion-engine or use the extension ApplyDiscounts. If i evaluate the lineItem using Evaluate(), only the one promotion that product should be eligible for is returned.

In my case i have one standard 10% off promotion and one 15% off for a specific brand promotion (which is my custom promotion), in my case the lineitem receives both discounts.

I am passing exclusion-level as a parameter, like this:

 var rewardDescriptions = cart.ApplyDiscounts(promotionService, new PromotionEngineSettings(){ ExclusionLevel = ExclusionLevel.Unit });

But it still returns both promotions, even though they both should exclude all other promotions.

GetFulfillmentStatus() in my processor returns Fulfilled with 1 exclusion. 

Does anyone recognize this?

How to remove Commerce ContentTypes from CMS database

$
0
0

Hello

I have a solution where Commerce were installed but never used and now we have removed it.

The problem is that now in the set access rights page in Admin we get this message:

Could not create instance of content type "SalesCampaignFolder" since it has an invalid .NET class associated: EPiServer.Commerce.Marketing.SalesCampaignFolder, EPiServer.Business.Commerce, Version=12.17.0.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7

And if I try to delete that type in admin I get this message

The content type could not be deleted since it is in use.
SysCampaignRoot

Are there any way to fix this without doing it directly in the database?

Able to zoom in on all (product) pictures in CMS (especially those on the "Media" tab)

$
0
0

Please provide the possibility to zoom in / open a pop-up window for all (product) pictures in CMS and especially those on the "Media" tab

Programmatically updating linked content

$
0
0

Hi,

does anyone know if the following is possible?

Page A is linked to Page B (either via a property, editor etc). Is it possible to programmatically change the link from A->B to A->C ?

I've tried using IContentSoftLinkRepository but found that it doesn't always contain the linked content references.

Thanks


Specified view 'PurchaseOrder-ObjectView' can not be located in 'Order' app in Commerce Manager - Purchare Order (Edit)

$
0
0

Hi,

Is anyone here experience an error when clicking the Edit and/or View Purchase Order? The message returned is "Specified view 'PurchaseOrder-ObjectView' can not be located in 'Order' app"

I've checked the Apps folder and the PurchaseOrder-ObjectView.xml is existing in the folder. Any ideas on how to resolve this issue?

FYI. Restarting the App Service Commerce can resolve this issue but since we can't find yet the root cause of it, the issue always recur.

Regards,

SJ

Commerce: 10.5

Issues when upgrading EPiServer with EPiServer.Forms.EditView.InitializationModule

$
0
0

Hi everybody,

We're having issues when trying to upgrade EPiServer, the EPiServer.Forms.EditView.InitializationModule is trying to MigrationService.UpdateMissingValueOfRetentionPolicy() that loops through all the forms in the site to update the default value for form PartialSubmissionRetentionPeriod and FinalizedSubmissionRetentionPeriod. But whenever the web app startup - that cause the site to hang out due to we have many EPiServer forms in the system.

Is anyone having this problem as well or knows how to disable this behavior/ workaround for that ( that kind of MigrationService loop through all the forms should not be put in an Initialization Module I guess )

Thanks a lot,

Hiep To

Issues with PropertyList and content reference properties

$
0
0

PropertyList<T> of a simple POCO class that I want to use a ContentReference or IList<ContentReference> to other content items. The PropertyList works just fine, but when using the dialog to select content for that property, it is not filtering the content tree to just the allowed types specified. Any idea how to get this to work?

Display(Name = "Category", Order = 10)]
[AllowedTypes(typeof(AreaMapCategory.AreaMapCategory))]
public virtual ContentReference Category { get; set; }

And here is the PropertyList definition on my page class:

[Display(
    Name = "Area Map Columns",
    GroupName = Global.TabNames.AreaMap,
    Order = 20)]
[EditorDescriptor(EditorDescriptorType = typeof(CollectionEditorDescriptor<AreaMapColumn>))]
public virtual IList<AreaMapColumn> AreaMapColumns { get; set; }

The second issue comes up when you use a IList<ContentReference> property. When using a IList the same filtering issue happens, but the editor box is wider than the popup editor for the PropertyList item, and there is no way to resize the popup. Also, it mentions that you can drag items onto here, but the background is blocked by the modal popup. The only way to add references is to click the link to add them at the bottom. Any way to improve this experience?

The third issue is how the PropertyList grid displays ContentReference properties. It simply outputs the ID of the content (or comma-delimited list of IDs when using IList) which makes it hard to tell what is selected. I found a forum post on how to get around this by loading the content reference name using a separate property, but it only works when the list first loads. Changing or adding items do not show the name, it leaves the column blank. Is there a better way to do this? 

private Injected<IContentLoader> _contentLoader;
[Display(Name = "Category Name", Order = 20)]
[ScaffoldColumn(false)]
public string CategoryNames => Category == null ? "" : _contentLoader.Service.Get<IContent>(Category).Name;

Asynchronous step submit

$
0
0

Hi, 

For performance and styling purposes we're required to post the steps of a form asynchronously. I haven't been able to find any information regarding this. Does anyone know if this is possible?

Kind regards

Hide blocktype from editmode but available when combined with AllowedTypes

$
0
0

Is it possible to hide a block from the list of avaliable types but still have it available when combined with the AllowedTypes attribute for a contentArea? Has anyone done a solution for that?

Issue with razor views while developing custom add-on

$
0
0

I've come across an issue while creating a custom MVC add-on. I have managed to find work-arounds to get it working but it would be useful to know if I'm doing anything wrong or missing anything.

I have created an MVC GuiPlugin but I seem to have issues with Episerver recognising referenced namespaces in the razor views. As far as I can tell, the issue seems to be that Episerver is ignoring the web.config in the root of my view folder.

  • If I use @model syntax, I get the error "the name 'model' does not exist in the current context". Workaround is to use @inherits System.Web.Mvc.WebViewPage instead
  • Using html helpers such as @Html.HiddenFor gives throws an error too, unless I explicitly reference the library at the top of the view e.g. @using System.Web.Mvc.Html

This is the web config for my Views folder https://github.com/zone/Zone.Episerver.PropertyViewer/blob/develop/src/Zone.Episerver.PropertyViewer/Views/web.config

Is there anyway to get Epi to recognise the referenced namespaces so I can write razor views in a more standard way?

Role x Has Permissions for Functions

$
0
0

Was wondering if there is a gadget, or existing view in the admin console that shows Role x has the following permissions.

I know I can navigate to the "Permissions for Fucntions" view, but this shows a giant containing all of the permissions available. 

I am looking for something that can show: The role Customer_Support_Analyst has the following permissions

started looking into implementing a gadget and discovered the table tblUserPermission which contains most of the information I am looking for, but does not contain the friednly description of the role.

For Instance, in the Permissions for functions screen you can see "Allows access to create catalog meta classes - (catalog:admin:meta:cls:mng:create)" but the tblUserPermission table only contains catalog:admin:meta:cls:mng:create.


Need to get Promotions (Gifts) for relevant product item

$
0
0

Hi All,

I have requirement to dispaly a message in cart if gift item quantity is 0 for relevant promotion item. We are using Epi Promoengine  to calculate gift promotions and if gift item quantity is 0, promoengine will remove it from the cart.

So in this case we dont know what is the relevant gift item attached to selected promo product item, hence we cant decide to show the message (eg: You cant have the gift item due to the insufficient stock)

We would like to know is tehre a way to get applied promotions for a particular product item, if so how are could we do that?

Please help me to solve this issue?

Thank you.

Need to get Promotions (Gifts) for relevant product item

$
0
0

Hi All,

I have requirement to dispaly a message in cart if gift item quantity is 0 for relevant promotion item. We are using Epi Promoengine  to calculate gift promotions and if gift item quantity is 0, promoengine will remove it from the cart.

So in this case we dont know what is the relevant gift item attached to selected promo product item, hence we cant decide to show the message (eg: You cant have the gift item due to the insufficient stock)

We would like to know is tehre a way to get applied promotions for a particular product item, if so how are could we do that?

Please help me to solve this issue?

Thank you.

Null reference error when running the EPiServer Find Content Indexing Job scheduled job

$
0
0

Hello

When I run the EPiServer Find Content Indexing Job scheduled job I get the following error for all content: 
2019-05-07 09:30:02,195 [10] ERROR EPiServer.Find.Cms.ContentIndexer: MACHINE-NAME: An exception occurred while indexing content [Link 52] [GUID a2f77167-b085-4f15-b11a-72157c28bf3a] [Type FrontPage] [Name Start]: Object reference not set to an instance of an object. 
System.NullReferenceException: Object reference not set to an instance of an object. 
at EPiServer.DataFactory.GetAncestors(ContentReference contentLink) 
at EPiServer.Find.Cms.ContentExtensions.Ancestors(IContent content) 
at EPiServer.Find.DelegateValueProvider`2.GetValue(Object target) 
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.CalculatePropertyValues(JsonWriter writer, Object value, JsonContainerContract contract, JsonProperty member, JsonProperty property, JsonContract& memberContract, Object& memberValue) 
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty) 
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.Serialize(JsonWriter jsonWriter, Object value, Type objectType) 
at EPiServer.Find.Api.BulkActionConverter.WriteJson(JsonWriter writer, Object value, JsonSerializer serializer) 
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeConvertable(JsonWriter writer, JsonConverter converter, Object value, JsonContract contract, JsonContainerContract collectionContract, JsonProperty containerProperty) 
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.Serialize(JsonWriter jsonWriter, Object value, Type objectType) 
at Newtonsoft.Json.JsonSerializer.SerializeInternal(JsonWriter jsonWriter, Object value, Type objectType) 
at EPiServer.Find.Json.Serializer.SerializeToTextWriter(JsonSerializer serializer, Object value, TextWriter textWriter) 
at EPiServer.Find.Json.Serializer.SerializeObjectsToJsonRequest(JsonSerializer serializer, IJsonRequest jsonRequest, IEnumerable values) 
at EPiServer.Find.Api.BulkCommand.Execute(List`1& serializationFailures) 
at EPiServer.Find.Api.BulkCommand.Execute() 
at EPiServer.Find.Cms.ContentIndexer.IndexWithRetry(IContent[] contents, Int32 maxRetries, Boolean deleteLanguageRoutingDuplicatesOnIndex) 
at EPiServer.Find.Cms.ContentIndexer.Index(IEnumerable`1 content, IndexOptions options) 
at EPiServer.Find.Cms.ContentIndexer.IndexBatch(IEnumerable`1 content, Action`1 statusAction, Int32& numberOfContentErrors, Int32& indexingCount, Boolean deleteLanguageRoutingDuplicatesOnIndex)

Rendering multiple templates for blocks without controller

$
0
0

Hi All,

 I have requirement to render multiple templates for block with having only partial views(no controller).Currently we are using a common page for rendering some blocks.As template descriptors won't work I used IViewTemplateModelRegistrator to register multiple templates for my block.Now the problem is I can't use tag for template resolving as I'm using common page for rendering blocks.Is there any other way for template resolving.

Can someone help me in solving this issue.Please refer to the code below.

Common page to render multiple blocks:

public class OneColumnPage : HeaderBannerBase
{
/// <summary>
/// Gets or sets the main body
/// </summary>
[CultureSpecific]
[Display(
Name = "Main body",
GroupName = SystemTabNames.Content,
Order = 1)]
[AllowedTypes(new Type[]
{
typeof(TextBlock), typeof(ProductBlock), typeof(ProductTrainingBlock), typeof(PlaceBlock), typeof(TeamInfoBlock), typeof(AboutUsKeynoteBlock), typeof(AboutUsBannerBlock), typeof(AboutUsBlock), typeof(ImageGalleryBlock), typeof(GridBlock), typeof(ClaimsFormsDownloadBlock),
typeof(DocumentBlock)
})]
public virtual ContentArea MainBody { get; set; }

cshtml

@model PageViewModel<OneColumnPage>

@Html.PropertyFor(p => p.CurrentPage.MainBody, new { Tag = "_CustomContentArea" })

Code in Template Coordinator:

viewTemplateModelRegistrator.Add(
typeof(DocumentBlock),
new TemplateModel() { Name = "claimForms", Description = "Displays as claimForms.", Path = "~/Views/Shared/Blocks/DocumentBlock2.cshtml", Tags = new string[] { "claimForms" }});

Orange "Episerver" button adding namespace to path - causing broken link

$
0
0

This is something funky I just noticed in my development enviorment, and I'd like to fix before I push my code out to production.

It seems like my project just started adding the namespace to the defuault workarea URL. I really have no clue why.  

So instead of

<a href="localhost:port/EPiServer/Cms/?...  

it is now

<a href="localhost:port/<namespace>/EPiServer/CMS/?...

It is also adding the namespace to the links to the thumbnails for blocks and pages. 

I've looked up and down the web config in my dev enviorment and can't seem to find where the namesapce to these links are coming from.  

Any ideas on how I can get these links working again before I make a push to our production?

Viewing all 6894 articles
Browse latest View live