Quantcast
Channel: Customized Commerce 13 and earlier versions
Viewing all 9642 articles
Browse latest View live

Inline Editing of Block in Content Area of the Page!!!

$
0
0

Hello Episerver Devs,

In Episerver we are not able to inline Edit the Blocks which are under Content Area. To Edit this we have to edit the block and it redirects us to Block Preview Page where we edit the Block Content.

So is there any hacks which can be used for Inline editing of Block directly on the page.

Regards,


Create new promotion campaign in initialization module. SalesCampaignFolder.CampaignRoot is null.

$
0
0

I am trying to create a new campaign for a new promotion in a initialization module, but every time I try to run it, SalesCampaignFolder.CampaignRoot is null. Below is my current code.

_contentRepository = ServiceLocator.Current.GetInstance<IContentRepository>();
_campaign = _contentRepository.GetDefault<SalesCampaign>(SalesCampaignFolder.CampaignRoot);

Thanks for any help.

Saving of content as SaveAction.CheckIn skips Approval Process

$
0
0

Hi Episerver Community, my first post here.

Im programatically saving Content Images (ImageData) with the code:

_contentRepository.Save(media, SaveAction.CheckIn);

This saves the Image content sucessfully to a folder where I have setup an Approval Process.

When I save I catch the CheckedInContent event in a InitializableModule and I send an email to a user to Approve this image (this all works fine)

//In   [InitializableModule]
events.CheckedInContent += OnEventCheckedInContent;

However when I go into the CMS, click on the image  to approve it I do not get the Approval Process. The status is Ready to Publish and the Publish? button displays Publish Changes when what I want is to go through the Approval Process for this checked in content.

If I call save with Content Images (ImageData) with Default SaveAction as below then I get the correct approval process. 

However I have to catch the SavedContent event which kicks of every time content is saved - and I only want 1 approval email sent out. Yes I know I could work around this but Im intersted in the process.

_contentRepository.Save(media, SaveAction.Default);

Why is the CheckedInContent save not allowing me to go throug the Approval Process. Is this a bug or a 'featue' of the process?

Set an organization address as customer PreferredBillingAddress/PreferredShippingAddress not working

$
0
0

Hi

I am working with Commerce 12.15, I am trying to set the PreferredBillingAddress/PreferredShippingAddress for a customer. The problem I am facing is that when I try and set an organization address as a PreferredBillingAddress/PreferredShippingAddress, it gives me null. For example: 

The code below:

if (ddlMakeThisPrimary == "billing")
{
contact.PreferredBillingAddress = address;
contact.PreferredBillingAddressId = address.AddressId;
}
else if (ddlMakeThisPrimary == "shipping")
{
contact.PreferredShippingAddress = address;
contact.PreferredShippingAddressId = address.AddressId;
}

The lines in bold return a null even though an address is present. This is happening only when I try to assign an orgnization address as a PreferredBillingAddress/PreferredShippingAddress.

Limit the selection option of ISelectionFactory checkboxes

$
0
0


I have ISelectionFactory which provides collection of ProductNode and it gives me checkboxes of nodes in admin mode. User can select multiploe options over there. But I want to allow only 2.

Validation error when adding role to user with dashes in username

Is it possible to get content that IsPendingPublish:True

$
0
0

Hi!

I have a question if it possible to get content from Find that is 

"IsPendingPublish$$bool": true,

Lets say I create a new page, I set that it should be published tomorrow at 15:00. When I check the find index, I see that the page exists in the index, but with status 

"IsPendingPublish$$bool": true,

When I run my code to get pages that has a ContentOwner that matches a specific ID I get the correct result, but the page that has "IsPendingPublish: true" is not included in the search result. 

var results = search
.Filter(x => x.ContentOwner.ID.Match(id))
.Take(10).GetContentResult();

Is there any fancy and cool filter that I can use to include content that has "IsPendingPublish:true"?

/ Henric

Scheduled Publish

$
0
0

Hey,

Recently my schedule publish has just stopped working.  Sometimes it invalidates on remote servers but the current server hasn't been invalidated and some of the post publish code hadn't completed running.  Looking at http://joelabrahamsson.com/how-episerver-cms-caches-pagedata-objects/ and other pages, they suggest that EpiServer delayed publish does not invalidate the cache on the other servers.  Is this correct? and if so does anyone know why?


Create new promotion campaign in initialization module. SalesCampaignFolder.CampaignRoot is null.

$
0
0

I am trying to create a new campaign for a new promotion in a initialization module, but every time I try to run it, SalesCampaignFolder.CampaignRoot is null. Below is my current code.

_contentRepository = ServiceLocator.Current.GetInstance<IContentRepository>();
_campaign = _contentRepository.GetDefault<SalesCampaign>(SalesCampaignFolder.CampaignRoot);

Thanks for any help.

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.

It takes ages before new content shows on my 2 front ends

$
0
0

Hi

I have a load balanced setup with one edit server and 2 front ends. When editor does changes to existing content the changes will show on front end servers at once, but if they publish new content it takes a while, maybe minutes.
The edit server has the new content at once.

Can someone tell me the missing pice of setting/code here.

I just updated to latest version of cms in my staging enionment, but no improvement.

Regards Øyvind

Copied pages should not be published by default

$
0
0

I have seen https://support.episerver.com/hc/en-us/articles/360002559092 where the copying of a page means the new page is already published.

I would argue that this is bad design. As would the various people in these forum posts: 

https://world.episerver.com/forum/developer-forum/-Episerver-75-CMS/Thread-Container/2018/5/copy-and-pasted-pages-always-have-published-status/ 
https://world.episerver.com/forum/legacy-forums/Episerver-CMS-6-CTP-2/Thread-Container/2010/10/Copy-published-node-to-unpublished/ 
https://world.episerver.com/forum/developer-forum/-Episerver-75-CMS/Thread-Container/2016/12/copied-page-automatically-published/

I'd say there are probably many other Episerver developers who'd agree

A copied page should not be published (in any of its languages) until the back-office user says it is ready to go live as that page will start off having the exact same content as the original page.

Selecting default data source of a form

$
0
0

Hello,

I have a custom form container that is inherited from FormContainerBlock. How do I set its default data source to an existing implementation of IExternalSystem? I want every instance of this form container should have the default data source. 

Category AssetLink Id is always 0

$
0
0

I create an asset for a specific category (CMS -> Commerce -> Catalog -> select a category -> select All Properties -> Assets -> Add Media), indicate the name of the group. Then Publish changes.

But when I try to get assets for a category, I see that AssetLink ID is 0. My code:

public string GetNodeAssetUrl(NodeContent node, string groupName, bool relative)
{
    string url = string.Empty;
    if (node?.CommerceMediaCollection == null || !node.CommerceMediaCollection.Any())
    {
        return null;
    }
    var foundAsset = node.CommerceMediaCollection.FirstOrDefault(
        item => item.GroupName.ToLower().Contains(groupName.ToLower()));
    if (foundAsset == null)
    {
        return null;
    }
    if (!_contentLoader.Service.TryGet(foundAsset.AssetLink, out IContent content))
    {
        return null;
    }
...

I always see that the content is null and foundAsset.AssetLink.ID == 0. Can someone tell me why is that so? I'm using version 12 of Epi.

Saving of content as SaveAction.CheckIn skips Approval Process

$
0
0

Hi Episerver Community, my first post here.

Im programatically saving Content Images (ImageData) with the code:

_contentRepository.Save(media, SaveAction.CheckIn);

This saves the Image content sucessfully to a folder where I have setup an Approval Process.

When I save I catch the CheckedInContent event in a InitializableModule and I send an email to a user to Approve this image (this all works fine)

//In   [InitializableModule]
events.CheckedInContent += OnEventCheckedInContent;

However when I go into the CMS, click on the image  to approve it I do not get the Approval Process. The status is Ready to Publish and the Publish? button displays Publish Changes when what I want is to go through the Approval Process for this checked in content.

If I call save with Content Images (ImageData) with Default SaveAction as below then I get the correct approval process. 

However I have to catch the SavedContent event which kicks of every time content is saved - and I only want 1 approval email sent out. Yes I know I could work around this but Im intersted in the process.

_contentRepository.Save(media, SaveAction.Default);

Why is the CheckedInContent save not allowing me to go throug the Approval Process. Is this a bug or a 'featue' of the process?


Form Upload Access Rights

$
0
0

Hello,

I have a group that was created before I inherited our site, which allows members to view/download form-uploaded files. I tried to create another group, with the same exact access rights as the first group, but members of this group are unable to view/download form uploaded files.  Is there another place I need to set some kind of permissions for this new group? Could someone please provide some insight into how form-upload permissions work?

Thank you!

-Tim.

How to Remove CommerceMedia From CommerceMediaCollection

$
0
0

var commerceMediaToRemove=
writableCommerceMedia.FirstOrDefault(x => x.AssetLink.Equals(contentLink));

writableCommerceMedia.Remove(commerceMediaToRemove); // this returns false

Does anyone have any idea of what im doing wrong?

Group to Create Promotional Codes

$
0
0

I would like to create a group for users with permisions to only generate promotional codes. Is this possible? I created a group called "Generate Promo Codes", added the users to that group then granted permisions to Allows access to create/edit/view/delete promotions but how do I map the the virtual role? 

Episerver Find Typed search and fallback languages

$
0
0

We have a customer that has limited content available in English. If content is not available in English then they want to fallback to Dutch. So far so good, and in the CMS itself this works fine. However, when using Find to get a list of all pages of a specific type we can only get pages back in the current language without fallback. According to this page on Episerver World we can get results from a different language by calling InLanguageBranch, but here we can only specify a single language branch. We need GetContentResult to get the content in English if available, otherwise use the CMS setting for language fallback to get the Dutch version.

Is this possible at all? If so, how?

EPiServer CMS 6 R2 and TLS 1.2

Viewing all 9642 articles
Browse latest View live