EPiServer Archive

React and EPiServer: Aggregated output with EPiServer.ContentDeliveryApi

If you read my previous article on React and EPiServer: Moving to EPiServer Headless (EPiServer.ContentDeliveryApi) with friendly URLs – Quick POC, you’ll know I wanted to output EPiServer Content information by friendly URL to a page rather than using the headless API’s own paths. This I did, but what about aggreagated information? You know, the stuff that are using for instance content from other EPiServer …

React and EPiServer: Moving to EPiServer Headless (EPiServer.ContentDeliveryApi) with friendly URLs – Quick POC

So EPiServer released a beta version of the ContentDeliveryApi. Nice. My current client uses the JOS Content Serializer for creating JSON data from EPiServer pages for view, preview and on-page-editing with React, as described in previous articles. However, sooner or later it will be neccessary to start using EPiServer’s own methods for this. I had a quick look at the API functionality, and it seems …

React and EPiServer – Generic pass-through property handler for JOS ContentSerializer

In a previous article I wrote about React and EPiServer – Custom rendering of EPiServer block in XhtmlString field without partial block controller, as we’re using the JOS Content Serializer to make JSON of our EPiServer content. This is in order to pass it to React. We were using the version 2.0.1, and it differs a bit on how things are done now (currently latest …

EPiServer TinyMCE 3 Wrapping selection in unsupported aside tag

For my current client, we had a need to allow EPiServer editors to wrap XHtmlSting field content in aside tags in a user friendly manner. The first most obvious thought went to the styles drop down list and EPiServer’s editor.css file, however after a few tries and a bit of Ilspy‘ing I realized that the aside tag element is not supported by the current implementation. …

React and EPiServer – Getting friendly URLs in EPiServer’s XHtml fields using JOS.ContentSerializer for React support

So just a follow up on the previous article React and EPiServer – Custom rendering of EPiServer block in XhtmlString field without partial block controller in regards to friendly URLs. We noticed that all our internal EPiServer links in the XHtml field properties remained on the internal form ~/link/{guid}.aspx, even in the view mode. The reason for this was really quite obvious since we had …

React and EPiServer – Custom rendering of EPiServer block in XhtmlString field without partial block controller

For my current client we’re building a component based platform as a common feature hub for serveral large EPiServer websites. For this, we have stripped away the default Razor based rendering that is normally used for the view and edit modes, and replaced it with React all the way through. Having React render blocks through ContentArea properties for the view and on-page-edit modes may not …

EPiServer Forms: JavaScript error – cannot read property ‘validate’ of undefined

I saw this JavaScript error earlier this week, and thought I’d write a few lines about it. It appears as you try to submit a form created with the EPiServer Forms functionality, that likely has custom validators on some of it’s fields. As EPiServer Forms tries to run it’s client side validation on the fields it gets presented with one requiring a custom validator; which …

EPiServer Forms: Adding custom client side validation to form field (Luhn algorithm)

When you’re developing custom EPiServer Forms field blocks you sometimes need to add your own custom validation as well. In this article you’ll see an example of how to add client side validation for the Luhn algorithm in a custom textfield block. This article assumes that you already have server side validation on your EPiServer Forms field; covered in article EPiServer Forms: Adding custom server …

EPiServer Forms: Adding custom server side validation to form fields (Luhn algorithm)

When you’re adding custom EPiServer Forms field blocks to your solution, you occasionally have the need for adding custom validation as well. Here is a sample of how to add a custom server side validation to your textfield block; you will probably also need client side validation for this, please see the article EPiServer Forms: Adding custom client side validation to form field (Luhn algorithm). …

EPiServer Forms: Forcing a field block to use a certain validator

There may arise situations where your custom EPiServer Forms field blocks make no sense without your custom validation code being applied as the website visitor submits the form. In these cases it may be useful to help the web editor by preventing the need to tick the correct validation checkbox in the form element block. Creds to my collegue Christer Bermar for his work on …

EPiServer Forms: Moving your EPiSever Forms views to another location

By default, EPiServer Form views goes in the directory /Views/Shared/ElementBlocks/, however if you’d like them placed elsewhere, this is easily done by adding a simple service configuration and extending EPiServer’s CustomViewLocationBase making an addition to it’s Paths array; see below. MyCustomViewLocationBase.cs Above code will allow you to keep views in a Forms directory in the Views/Shared folder.

NullReferenceException in EPiServer EPiResourcesController causing edit mode load to fail

In one of my current projects EPiServer‘s edit mode suddenly stopped working. Only the top bar loaded, while the rest failed due to a JavaScript error (see image below). NetworkError: 500 Internal Server Error caused by GetResourcesDictionary throwing NullReferenceException To investigate, we tried surfing to the failing JavaScript resource (http://{host}/EPiServer/Shell/10.7.1.0/ClientResources/EPi/shell/ui/nls/en-us/contenttypes.js) only to discover that the 500 Internal Server Error was caused by a NullReferenceException. Stack …

Assemblies not copied nor cleaned, and Visual Studio CS0006 Error when building

We were installing EPiServer Forms in a client’s EPiServer 9 website the other day, and encountered an issue with the binarier not being copied from the NuGet packages directory to the website’s bin folder. If we manually copied them there manually and then ran a Clean in Visual Studio, the EPiServer Forms assemblies would not be removed either. Also, if we tried adding references to …

Sitemap.xml links show up in Google Search result using EPiServer sitemap.xml generator

For my current client’s site we realized that our sitemap.xml was indexed by Google, making it appear in our search result. While we want search engines to crawl the sitemap, we do not want it indexed. We are currently using a version of the EPiServer sitemap.xml generator described in the article Sitemap.xml generator engine for Multi language EPiServer 7.5 websites as well as Updated sitemap.xml …

EPiServer Content Folders ‘For All Sites’, ‘For This Site’, ‘For this Page’ not showing up in edit mode

I was investigating a failing Selenium test the other day and ran into a bit of trouble. It occured as the EPiServer content database template had been restored and EPiServer was loading the site for the first time after an application pool recycle (For more information on the template database testing environment, please see this article: Keeping reliable test data in EPiServer content database for …

EPiServer edit mode dojo not working after switching to Visual Studio 2015

I recently got myself a brand new computer at work running the latest Visual Studio – Visual Studio 2015. After setting up a client’s EPiServer 10 environment I found everything working as expected; until I tried editing pages through EPiServer’s edit mode. In FireFox (version 50.1.0) I got a top menu, the site preview as well as the left and right content panels; however, I …