Quantcast
Channel: Developer to developer
Viewing all 9076 articles
Browse latest View live

Scheduled jobs and HttpContext

$
0
0

It always used to be that you could work out whether a job was running via scheduled execution or run via the Admin mode interface by checking within the job whether there was an HttpContext. If there was, then the job was run via Admin mode. If not it was scheduled.

Has this behaviour changed?

I'm on CMS 10.10.1 and HttpContext is always null, so I can't see a way to identify the context in which the job is run. I'm guessing may this changed with some of the improvement work around making jobs stoppable / supporting dependency injection etc. Are jobs run in their own new thread now perhaps?

Does anybody know if this is a deliberate thing?  

Can anybody think of a way to work out if the job was manually started?


Link Status report shows HTTPS external links

$
0
0

The Link Status report contains the valid https external links included in our site content. The link status is "Connection Error". 

Is there a way to configure this, that the job can read secure connections properly? 

Url to views for custom reports and admin plugins

$
0
0

Hello!

I am working on a hobby project that will add an admin plugin and a couple of cms reports. I plan to package it as a nuget package for others to use. Currently I am stuck on how to set the url for the view files (Razor) and where to place them in the project.

I have been looking at a couple projects on GitHub and I currently have this (simplified) file structure:

ProjectRoot
  Controllers
    MyPluginController.cs
  modules
    _protected
      MyProjectName
        Views
          MyPlugin
            Index.cshtml

My controller looks like this:

    [GuiPlugIn(
        Area = PlugInArea.AdminConfigMenu,
        UrlFromModuleFolder = "Views/MyPlugin/Index",
        DisplayName = "This is my plugin"
    )]
    public class MyPluginController : Controller
    {
        public ActionResult Index()
        {
            return View();
        }
    }

To test my code I have set up the AlloyMvc site as a second project in the solution and set Alloy to depend on my project. My plugin is detected and shows up in the admin interface but the view is not found. (error message reports searched physical path as {pathToSolution}\{theAlloyMvcProjectName}\EPiServer\CMS\Admin\MyPlugin\Index)

The EPiServer documentation on custom reports specifies a url in a hardcoded way and adds a route in the global.asax file but that is not an option.

I hope for a solution that makes it easy to test while coding and that also will work when package as a nuget and installed by someone else. What do I need to configure and where?

Showing private IP under azure loadbalancer

$
0
0

I got issue while I go to admin /Episerver it redirects to private IP under an Azure load balancer with two cms instance hosted on azure VM machine.

Url: http://PRIVATE-IP/util/login.aspx?ReturnUrl=%2FEPiServer

But it works if directly go to https://DOMAIN-NAME/util/login.aspx?ReturnUrl=%2FEPiServer

Seems like HTTPs redirect issue under a load balancer.

Why /Episerver redirect to insecure HTTP ?

How to fix this issue. Your help will be appreciated.

Edit blob Uri from Guid to filename

$
0
0

Hi,

I wrote some code so when an editor uploads an image different sizes of the uploaded image are created and save to a blob in aws, in the format epi.fx.blob://[provider]/[container]/[blob]] 

While I can change the container portion, I am having problems figuring out how to change the blob portion of uri which is the image, to the image name plus the size it was changed to.

Any ideas on how to do this?

Base data for Epi Personalized find

$
0
0

Hi Team,

Epi Personalization find works(boosting the result) based on the only commerce attributes(name, brand..etc) or else any other tracking data too.

Advance thanks,

Epi:StateMarker cookie - what is it and how can I make it secure?

$
0
0

After upgrading to Episerver 11, I've noticed session cookies like EPi:StateMarker and EPi:ViewedPages, with value "true" and "244" respectively in our production environment only. They aren't a problem in themselves, but they are not marked secure nor httpOnly, which triggers warnings from our security scanning tool.

Does anyone have any idea where they come from and how to secure them?

Custom Media Provider Under Global Site Root.

$
0
0

Im having troubles getting my route to get picked up.  It always returns "/Recycle-Bin/filename" as the resolved url. 

I have the following routes enabled.

RouteTable.Routes.MapContentRoute(
                    name: "MyMedia",
                    url: "mymedia/{node}/{partial}/{action}",
                    defaults: new { action = "index" },
                    contentRootResolver: (s) => root.ContentLink);
            // EPiServer UI needs the language segment
            RouteTable.Routes.MapContentRoute(
                name: "MyMediaEdit",
                url: CmsHomePath + "mymedia/{language}/{medianodeedit}/{partial}/{action}",
                defaults: new { action = "index" },
                contentRootResolver: (s) => root.ContentLink);

What i don't understand is i specified the root content link but always get /recycle-bin/xxxx.jpg.  Any ideas.
I have specifed the following versionable items in my createcontentwithidientiy method as well

if (content is IVersionable versionable)
            {
                versionable.IsPendingPublish = false;
                versionable.Status = VersionStatus.Published;
                versionable.StartPublish = DateTime.MinValue;
            }
 var securable = content as IContentSecurable;
            securable.GetContentSecurityDescriptor().AddEntry(new AccessControlEntry(EveryoneRole.RoleName, AccessLevel.Read));

How to tell if current visitor is identified by submitting a form?

$
0
0

We are currently setting up our integration with episerver forms, profile store and insight. I have some logic I want to execute if the current user is no longer anonymous, having previously filled out any form with an email address. 

A second question I have is how do I tell if the user has filled out a certain form previously? I can see methods on the FormDataRepository to query form responses, but no way to filter by the person who submitted it. I hope I do not have to cycle thru all entries just to see a certain identified person has already submitted it. 

Any help on both of these matters would be greatly appreciated.

Conditional Sorting Issue

$
0
0

I have a requirement to sort products using a condition.

For ex -

First, products need to be sorted from the boolean property Featured

Then by a dynamic product category (coming from a algorithm which decides the category which the user has mostly bought)

Then by the created date

Following is the search query:

Please note that desiredCategory is the product category which describes above (This value is dynamic). 

MainCategoryForFind is the top category of the product

Following exception throws from the query when trying to get the result.

Error - System.ApplicationException: 'Unable to retrieve the field type (such as return value) from expression of type MethodBinaryExpression.'

Then Modified code as below.

it also didn't work. Following error throws when trying to get the result.

System.NotSupportedException: 'Sorting by expressions of type EPiServer.Find.DelegateFilterBuilder is not supported. Change the sorting expression x => x.CourseTypeForFind.Match(value(EPiServer.UTS.Web.UTS.Features.ContentListing.ContentListingService+<>c__DisplayClass5_0`1[EPiServer.UTS.Web.UTS.Features.CourseProduct.CourseProduct]).courseType). Supported types to sort by are native value types such as int, DateTime, nullable versions of the same and strings.'

Is there any other proper way to fulfill this requirement ?

Autoboost

$
0
0

I am trying to boost product search results based on the score of frequently used hits (hit boosting), and tracking is enabled. I have played around with different values for hitBoostScale and decayScale, but I seem to get the same result no mather how I change the values.

Could someone indicate what would be the correct values for hitBoostScale if I want to boost the results based on frequently used hits?

It may be because I am blond, but the documentation:

To control the rapidity of the decay, set the hitBoostScale parameter, which sets the half-life, where the boost is at 50%. By default, hitBoostScale is set to 0.1 (10%). Lowering the scale makes the inverted decay more rapid. If you set a value higher than 0.1, it leads to cut-off where the hit boost cannot reach the upper range limit.

do not make me more wise. ;)

Custom Access denied page for EPiserver media files

$
0
0

Hello,

I am new to Episerver and trying to figure out below mentioned issue.

I have implemented a 404 page based httperrors from web.config. I have implemented a custom access denied page so that users see this page instead of redirecting to start page. The reference used is from 

https://world.episerver.com/forum/developer-forum/-Episerver-75-CMS/Thread-Container/2014/8/Display-Insufficient-Permission-Messaging-instead-of-redirecting-to-login/

This access denied logic works for page types but when I have a media file (pdf etc) on click of it, this still takes me to start page instead of access denied page.

Any inputs on how can I redirect to my access denied page instead of start page when navigating to a media file and user doesnt have appropriate access.

Thanks.

 

Error on notifications for content approval

$
0
0

Added content approval on our stage site but when i click on the notification bell, it doesn't show anything and console show this error:

Anyone with the same problem?

Episerver CMS: 11.10.5

Custom login page

$
0
0

So I am trying to create a custom login page instead of the EPi Server. Right now I have created a custom controller and model and page using this tutoiral

https://world.episerver.com/blogs/Daniel-Ovaska/Dates/2016/6/creating-a-custom-login-page/

The thing is when I type http://localhost:53067/LoginPage/Index in the browser window I get null for the currenPage in the below code

        public ActionResult Index(LoginPage currentPage, [FromUri]string ReturnUrl)
        {
            /* Implementation of action. You can create your own view model class that you pass to the view or
             * you can pass the page type for simpler templates */
            var model = new LoginModel(currentPage);
            model.LoginPostbackData.ReturnUrl = ReturnUrl;
            return View(model);
        }

Does anyone know what am I missing here?

Find - Index Updation

$
0
0

Hi team,

We purchased the FIND index with default(English) language. Now we need to update FIND Index with additional language.

How to update FIND? IS there any possible way to do this?

Thanks in Advance.

Regards

Mekala V


A lovely cryptic message when publishing content "Culture is not supported. Parameter name: name h is an invalid culture identifier"

$
0
0

h is a veeery strange culture identifier, so the error seems legit.

After some time debugging i came to realise that this is yet another issue caused by having a lot of languages (Our instance has 125 enabled epi languages)

Here is the stacktrace:

at System.Globalization.CultureInfo.GetCultureInfo(String name)
at EPiServer.Commerce.Catalog.Provider.Construction.CatalogBuilder.ReadCatalogProperties(DataTable table, Dictionary`2 contentMap)
at EPiServer.Commerce.Catalog.Provider.Construction.CatalogBuilder.CreateVersions(IList`1 contentLinks)
at EPiServer.Commerce.Catalog.Provider.CatalogContentLoader.ConstructContent(IList`1 contentLinks, Func`3 createContentFunc)
at EPiServer.Commerce.Catalog.Provider.CatalogContentLoader.LoadSpecificContentVersions(IList`1 contentVersions)
at EPiServer.Commerce.Catalog.Provider.CatalogContentProvider.BatchLoad(IList`1 contentLinks, Func`2 dbLoader)
at EPiServer.Commerce.Catalog.Provider.CatalogContentProvider.LoadContents(IList`1 contentReferences, ILanguageSelector selector)
at EPiServer.Core.ContentProvider.GetContentBatch(IList`1 batch, ILanguageSelector selector, List`1& contents, Dictionary`2& contentMap)
at EPiServer.Core.ContentProvider.GetScatteredContents(IEnumerable`1 contentLinks, ILanguageSelector selector)
at EPiServer.Core.Internal.ProviderPipelineImplementation.GetItems(ContentProvider provider, IList`1 contentLinks, LoaderOptions loaderOptions)
at EPiServer.Core.Internal.DefaultContentLoader.GetItems(IEnumerable`1 contentLinks, LoaderOptions loaderOptions)
at EPiServer.Find.Commerce.CatalogEventIndexer.IndexContentInAllLanguages(IContent content)
at EPiServer.Find.Commerce.CatalogContentEventListener.IndexContentsIfNeeded(IEnumerable`1 contents, Action`1 indexAction, IDictionary`2 cachedReindexContentOnEventForType, Func`1 isReindexingContentOnUpdates)
at EPiServer.Find.Commerce.CatalogContentEventListener.IndexContentsIfNeeded(IEnumerable`1 contentLinks, Action`1 indexAction)
at EPiServer.Find.Commerce.CatalogContentEventListener.CatalogNodeUpdated(CatalogContentUpdateEventArgs catalogContentUpdateEventArgs, Action`1 indexAction)
at EPiServer.Find.Commerce.CatalogContentEventListener.CatalogEventUpdated(Object sender, EventNotificationEventArgs e)
at EPiServer.Events.Clients.Event.Raise(Guid raiserId, Object param, EventRaiseOption raiseOption)

After some sql profiling i found this sproc was called: "ecfVersion_ListByWorkIds", which in turn calls this sproc: "ecfVersionCatalog_ListByWorkIds"

When i run it i see the languages for our catalog comes out as "ar-ae;ar-bh;ar-dz;ar-eg;ar-iq;ar-jo;ar-kw;ar-lb;ar-ly;ar-ma;ar-om;ar-qa;ar-sa;ar-tn;ar-ye;az;bg;bg-bg;bs;cs-cz;da-dk;de-at;de-de;el-gr;en;en-ag;en-ai;en-au;en-bb;en-bm;en-bs;en-bz;en-ca;en-dm;en-gb;en-gd;en-gy;en-hk;en-id;en-ie;en-il;en-jm;en-kn;en-ky;en-lc;en-ms;en-my;en-nz;en-ph;en-pr;en-sg;en-si;en-tt;en-us;en-vc;en-vg;en-vi;en-za;es-419;es-ar;es-bo;es-cl;es-co;es-cr;es-do;es-ec;es-es;es-gt;es-hn;es-mx;es-ni;es-pa;es-pe;es-py;es-sv;es-uy;es-ve;fi-fi;fr-be;fr-ca;fr-fr;fr-gp;fr-ht;fr-mq;hi-in;hr-hr;hu-hu;h"

That last one is lovely, right? :)

As it turns out "ecfVersionCatalog_ListByWorkIds" calls a custom function called "fn_JoinCatalogLanguages()" that has this lovely nugget in it: "DECLARE @RetVal nvarchar(512)"

that means that a maximum of 512 characters of combined comma-delimited language codes can be returned, if it goes over then you get to see the if you are lucky to have the alst language code being complete or incomplete.

Could someone at epi please increase the retval of this function for the (admittedly few) of us that have a lot of languages.

Cheers

AvailableContentTypes does not work as intended?

$
0
0

Hello!

I think I am using the attribute AvailableContentTypes correctly but still the content type with the attribute is available under ALL pagetypes when i create a new page. Check added image below:

Episerver version: 11.12.0.0
Episerver UI version: 11.20.1.0

Can anyone help me figure out what iam doing wrong here?  Thank you, best regards Jonas C :) 

Cannot save/update overridden properties

$
0
0

I have overridden properties to make them culture-specific and required.I cannot save/update after overridding them. e.g. I have overridden category property of PageData Class and miquantity, maxquantity of VariationContent Class.

CMS Personalization on cached pages in Akamai

$
0
0

Hi,

We have a CMS website developed in EPI 11 and hosted on Cloud EPI DXC. We have Akamai CDN on top of Cloudflare CDN what Episerver provides.

In Akamai CDN we cache the pages to serve from there instead of calling for server every time for better response.

We are now want to use built in Episerver visitor group criterias for personalization. 

The issue is, as we are caching a page in CDN, we are not able to personalize it via CDN.

For example, we have following issues:

1.for the first time users which does not have any cookie, session etc, we will not be able to identify that user which page to serve.

2.as editor can apply mutiple visitor group criterias, how to cache those number of permutations and server those via CDN for all the users.

Does, anyone have faced or came across such scenario. It will be great help.

Thanks,

Sanket Mahimkar

After Updating Episerver to latest version - No owin.Environment item was found in the context.

$
0
0

Hi,

After upating the packages to the latest version and on hosting the solution in IIS Server, I am getting this error .

No owin.Environment item was found in the context.
When apicontrollers are hit from a different domain. Help me with this issue.
Viewing all 9076 articles
Browse latest View live