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

How to get blob URL

$
0
0

Hi

I have a product that has a image resource. I need to get the blob URL to that image.

How do I get that?

I get the image from productContent.CommerceMediaCollection.First()

I have try IBlobFactory, but then I need to URI.

Any idea?

Thanks


Catalog Import throws "sql duplicate key error" although overwrite option is set as "true"

$
0
0

When we call to Mediachase.Commerce.Catalog.ImportExport.Import method in order to import one catalog from an xml file , we are getting an Sql error regarding "Violation of Unique Key" but it shouldn't happen because we set the method param "overwrite" as true.

Error Number:2627,State:2,Class:14
System.Data.SqlClient.SqlException (0x80131904): Violation of UNIQUE KEY constraint 'UQ__#B5DEE65__C86C24AB46D15906'. Cannot insert duplicate key in object 'dbo.@ContentProperty'. The duplicate key value is (101, 1, <NULL>, 17, en).
The data for table-valued parameter "@ContentProperty" doesn't conform to the table type of the parameter. SQL Server error is: 3602, state: 30

Any comment or direction will be appreciated. 

Custom ContentProvider performance issue

$
0
0

Hello

We're writing a custom ContentProvider to enable editors to reference data from an external system in the page properties.

It seems that when there are a lot of child nodes for a content item, then expanding that item will take a very long time to open. 

Even if we cache our entire content tree in memory, EPiServer will take minutes to expand a node with 1500 children.

What is the best practice here? Do we need to divide our content into smaller folders? If so, what is the optimal folder size for such a folder?

Looking at a SQL profiler, EPiServer is doing a lot of SQL calls when expanding a tree. Is that to be expected?

Dragging Image from Assets pane to WYSIWYG issue

Error creating new global setting

$
0
0

Hi there,

We recently upgraded the TinyMCE nuget package from 1.1.0.0 to 2.9.0.0 - Following the upgrade we were receiving the error below when attempting to create a new dropdown list via global settings (after hitting Save). 

To remedy the issue above I ran the following DB scripts (based on this):

UPDATE [dbo].[tblBigTableReference]
SET
ElementType = 'EPiServer.Cms.TinyMce.Core.TinyMceSettings, EPiServer.Cms.TinyMce, Version=2.9.0.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7'
WHERE ElementType = 'EPiServer.Editor.TinyMCE.TinyMCESettings, EPiServer.Cms.TinyMce, Version=1.1.0.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7';
UPDATE [dbo].[tblBigTable]
SET
ItemType = 'EPiServer.Cms.TinyMce.Core.TinyMceSettings, EPiServer.Cms.TinyMce, Version=2.9.0.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7'
WHERE ItemType = 'EPiServer.Editor.TinyMCE.TinyMCESettings, EPiServer.Cms.TinyMce, Version=1.1.0.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7';

Once the scripts executed, I tried to create a dropdown list again but I am now receiving the following error:

I was wondering if anyone has seen this issue before or if there are any ideas as to how I might resolve this?

Here is the relevant stack trace:

2019-11-05 14:41:18,220 [37] ERROR EPiServer.UI.Admin.EditPageTypeGlobalSettings: Error while saving property settings.
System.MissingMethodException: No parameterless constructor defined for this object.
   at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)
   at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
   at System.Activator.CreateInstance(Type type, Boolean nonPublic)
   at System.Activator.CreateInstance(Type type)
   at EPiServer.Data.Dynamic.Providers.Internal.DbDataStoreProvider.LoadObject(ProviderCallContext context)
   at EPiServer.Data.Providers.Internal.SqlDatabaseExecutor.<>c__DisplayClass31_0`1.<Execute>b__0()
   at EPiServer.Data.Providers.SqlTransientErrorsRetryPolicy.Execute[TResult](Func`1 method)
   at EPiServer.Data.Dynamic.DynamicDataStore.InternalLoad(Identity id, Type type, LoadAsObjectType loadAs, ProviderCallContext parentContext)
   at EPiServer.Data.Dynamic.Providers.Internal.DbDataStoreProvider.LoadSubObject(Identity id, Type type, String storeName, ProviderCallContext context)
   at EPiServer.Data.Dynamic.Providers.Internal.DbDataStoreProvider.LoadReferencesAndCollections(ProviderCallContext ctx)
   at EPiServer.Data.Dynamic.Providers.Internal.DbDataStoreProvider.LoadObject(ProviderCallContext context)
   at EPiServer.Data.Providers.Internal.SqlDatabaseExecutor.<>c__DisplayClass31_0`1.<Execute>b__0()
   at EPiServer.Data.Providers.SqlTransientErrorsRetryPolicy.Execute[TResult](Func`1 method)
   at EPiServer.Data.Dynamic.DynamicDataStore.InternalLoad(Identity id, Type type, LoadAsObjectType loadAs, ProviderCallContext parentContext)
   at EPiServer.Data.Dynamic.Providers.Internal.DbDataStoreProvider.LoadSubObject(Identity id, Type type, String storeName, ProviderCallContext context)
   at EPiServer.Data.Dynamic.Providers.Internal.DbDataStoreProvider.LoadReferenceMarkers(IList list, ProviderCallContext context)
   at EPiServer.Data.Dynamic.Providers.Internal.DbDataStoreProvider.LoadCollection(ProviderCallContext context, PropertyMap propertyMap)
   at EPiServer.Data.Dynamic.Providers.Internal.DbDataStoreProvider.LoadReferencesAndCollections(ProviderCallContext ctx)
   at EPiServer.Data.Dynamic.Providers.Internal.DbDataStoreProvider.LoadObject(ProviderCallContext context)
   at EPiServer.Data.Providers.Internal.SqlDatabaseExecutor.<>c__DisplayClass31_0`1.<Execute>b__0()
   at EPiServer.Data.Providers.SqlTransientErrorsRetryPolicy.Execute[TResult](Func`1 method)
   at EPiServer.Data.Dynamic.DynamicDataStore.InternalLoad(Identity id, Type type, LoadAsObjectType loadAs, ProviderCallContext parentContext)
   at EPiServer.Data.Dynamic.Internal.EPiServerDynamicDataStore.Load[TResult](Identity id)
   at EPiServer.Data.Dynamic.Internal.DynamicDataCollection`1.DynamicDataCollectionEnumerator.get_Current()
   at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source)
   at EPiServer.Core.PropertySettings.Internal.PropertySettingsRepository.LoadGlobalsHolder()
   at EPiServer.Core.PropertySettings.Internal.PropertySettingsRepository.SaveGlobal(PropertySettingsWrapper global)
   at EPiServer.UI.Admin.EditPageTypeGlobalSettings.Save()
   at EPiServer.UI.Admin.EditPageTypeGlobalSettings.SaveButton_Click(Object sender, EventArgs e)

Cheers,
Tom.

AntiForgeryToken

$
0
0

Hi!

We are working on styling Epi Forms, and therefore we are keeping the form in the browser for a long time - say 1 hour. If we then reload the page, we get an error message saying something about the antiforgerytoken not being valid. If we load the same page in a new tab, everything is ok. Is this a bug in epi forms, or is there something we can do to fix it?

Programatically creating Block in folder with Approval Sequence does not generate Notifications

$
0
0

Using: EPiServer.CMS version=11.12.0 

Programatically creating a Block in sub-folder whose parent has an Approval Sequence does not generate the Notification emails, is this a bug?

This works: Manually adding Block via the CMS back-end in blocks folder with inherited Approval Sequence. I investiagted what was happening in the database and this is what occurs when the Block is created in the CMS:

  1. Create Block
    1. Creates 1 record in the [tblNotificationSubscription] table
      1. e.g. projects://notification/21234/
    2. Publish the content set it to Ready for Review
      1. Creates 2 records in the [tblNotificationSubscription] table
        1. approvals://notification/17/ (one for each User in the Approval group)
        2. projects://notification/21235/
      2. Creates 1 record in the [tblNotificationMessage] table
    3. Run the Notification Dispatcher service – sends email to relevant people in the Aproval Sequence group

 

This does not create the Notifications: Programmatically creating a Block and adding to folder with inherited Approval Sequence is as below. The problem here is that the Notification email is never generated in the [tblNotificationMessage] table:

  1. Create Block with code below sets the Block to Ready for Review
_contentRepository.Save(contentBlock, SaveAction.RequestApproval, AccessLevel.NoAccess);
  1. Creates 1 record in the [tblNotificationSubscription] table
    1. e.g. approvals://notification/19/
    2. Note: There is no projects:// entry added
  2. No records are added to the [tblNotificationMessage] table

So when I programatically add the Block that is in a Approval Sequence NO notifications are generted = no emails sent to the relevant modertators.

Is this a bug?

Is there any way to tell Episerver to create the Notifications for the Approval Sequence other than programatically using the INotifier interface?

If I have to us the INotifier interface is it possible to use the epi-approval Channel and Approval type like in code below:

var notifier = ServiceLocator.Current.GetInstance<INotifier>();
INotificationUser sender = new NotificationUser("noreply@hop-episerver.com");
INotificationUser receiver = new NotificationUser(_settingsWrapper.HopSiteSettingsPage.CommentModeratorsGroupEmail);
notifier.PostNotificationAsync(new NotificationMessage()
{
    ChannelName = "epi-approval",
    // Content =  What Json do I add here for the email formatter or how do I access the formatter txt??
    Recipients = new[] { receiver },
    Sender = sender,
    TypeName = "Approval"
});

Publish menu not working

$
0
0

This is related to an old post: https://world.episerver.com/forum/developer-forum/-Episerver-75-CMS/Thread-Container/2019/1/cannot-read-property-contentdata-of-null----publish/

The issue was that the Publish menu was not responding due to a console error "Cannot read property 'ContentData' of null'. This was caused by a bug in Episerver.Marketing.Testing, and apparently fixed in v 2.5.5.

Just a heads up: I experienced the same problem running Episerver.CMS 11.13 and Episerver.Marketing.Testing 2.5.10.

The solution: I had to remove all temporary files from the browser.


Indexing poco object

$
0
0

Hi Team,

We are indexing the POCO object on our site. We need a language-based find the index.so we inherited the EPiServer.Core.ILocalizable class in our index class.

 public partial class SearchResultItem : EPiServer.Core.ILocalizable
    {
}

After indexing, we didn't see any language-based index in find backend UI. Refer image in below link

https://ibb.co/C2wpQ7C

Form fields reset to original values before redirect to thank you page

$
0
0

Hi -

We are using Episerver.Forms 4.10.0.0 and have found that when a user submits a form and is redirected to a thank you page (as defined in 'display page after submission'), the form fields are reset to their original state - which is visible to the user briefly - before the user is redirected.

The correct form values are submitted but it can look a bit strange.

Is this correct behavior? And if so, is there a way to avoid the form 'resetting' itself before users are forwarded to the thank you page?

Many thanks!

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

"For This Site" folder is not updating for different sites

$
0
0

We have a multisite setting on DXC with " Use site-specific assets" turned on every site. But when I go to the folder "For this Site" of each site, the content never change. The content I uploaded to current site always saved to the folder of the first site we set up. Not sure why. Any idea of it?

CMS Page Expire by Language

$
0
0

Hello, I have a breif question around page expiry. I saw a similar question from 2015 but hoping there has been an option added since then.

When on a page on going to: tools > manage expiration and archiving and expiring a page, i have to do this manually for each language. 

Is there an option to expire in all languages or will it be something I will have to write in the code.

Any help would be really appreciated.

Thanks

Jack

409 conflict creating block

$
0
0

Hi! I'm having an issue creating a certain block of mine. It occurs both in production and in development and also running version 10 and the latest version.

When creating the block I get an error in my browser console stating a 409 conflict error. It happens approx 80 % of the times trying to create the block.

  1. Request URL: http://mydomain/EPiServer/cms/Stores/contentdata/
  2. Request Method: POST
  3. Status Code: 409 Conflict

The request payload:

{"name": "New Blockaaaa","parentLink": "5_76891","contentTypeId": 46,"properties": {"icategorizable_category": [],"image": "/link/8690b853be154572967feb02028fef05.aspx","name": "xx","title": "xxxxx","mainBody": "

asdfasfd

","phone": "xxx","email": "xxxxx" },"createAsLocalAsset": true,"autoPublish": true }

I can't see anything strange with the block other than that it inherits from another blocktype. But thats alright isn't it?

Forever pending request fails to load "All Properties" mode while editing page

$
0
0

Hi all,

I'm experiencing issue when trying to edit existing page's properties. Basically "episerver/shell/Stores/metadata/EPiServer.Core.ContentData?modelAccessor={"contentLink":"3405081_3570991"}&dojo.preventCache=1573038813653" request is forever pending and prevent's "All Properties" screen to load. There is no response to that request. Preview mode works as well as I'm able to access that page as visitor/user.

Also I'm not able to create new pages of this problematic type.

Strangely it works for around 1 hour after "Recycling Pool" and then it happens.

Recently we have added a bunch of new properties to that page type:

[SelectOne(SelectionFactoryType = typeof(CustomSelectionFactory))]

And hid one property like this:

[ScaffoldColumn(false)]

Any pointers very much appreciated!


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?

noob question regarding alloy site: how to edit the non editable parts of the page, how to find which templates its based on?

$
0
0

If we take a sub page at random of the default alloy (MVC) site, e.g. the about us page, it has some editable content blocks on the right, a non editable navigation box on the left, and header and footer.

I found where you edit the header and footer - its in the start page.

But where do you edit the rest of that page?  I.e. where is the template for this page?

Having used other CMS system, they tell you which tempates the current page is based on, (which may be based on aonther template etc) so you can go to that template and edit it accordingly.

I cant see this info even in the "all properties" view?

Or is the template in the MVC code?  I.e. you cant edit the rest of the page in the editor, only in the code? If this is the case, how do you find a pages template file? Looking at the source, there is no "AboutUs" under views, but there are things like "LandingPage". How does one know which of these corresponds to a given published web page?

Support hosting a DXC site in multiple regions

$
0
0

Right now, when launching a DXC site, we can select a single Azure region for hosting websites. This cannot be changed afterwards.

But for sites with very global reach, it would be very nice to be able to deploy the DXC web apps in multiple Azure regions.

I know that Cloudflare supports load balancing based on regions. And this would make it possible to transparently serve visitors in different parts of the world from data centers closer to them.

Any plans to introduce such option?

noob question: where is the markup?

$
0
0

With the demo Alloy (MVC), if you look at a page, e.g. the start page, it has content which is outside of the editable content blocks. E.g. at the bottom of the page are 4 sets of links, each with a title. E.g "Products"

This is not in the model, view or controller. In the view, I was expecting to see HTML, along with a div for the Procuts block, and some sort of place holder for the title "Products" (asuming the text is pulled form the ml strings somewhere). But the view has no view code. Its just one line

Where is the pages markup?  E.g. if you wanted to put an icon infront of the word "Products", or wanted to put a horizontal rule after them?

If you want to style the word Products, where is this done? USing chrome developer tools in the preview mode, the entire page content is in a blank div - so you cant reverse engineer it to figure out class names or similar.

I am obviously missing something fundamental....

How to get PrincipalInfo in web api?

$
0
0

Hi!

I have a site which is built on AspNet Identity, and I would like to have an api method (not using Headless) that returns logged in status for the current user.

Is this possible?

It looks like this:

As you can see, I get Name "" and only the "Everyone" and "Anonymous" role, even thought the user is logged in.

Viewing all 6894 articles
Browse latest View live