Consider following scenario:
- You are using MVC
- You have a /content/page1 item
- There is some specific requirement, that for specific users, request on this URL should end with custom 404 error page
- You will implement custom 404 handlers in the httpRequestBegin pipeline following way
this.sitecoreContext.Item = error404Item;
this.sitecoreContext.Items["httpStatus"] = httpStatusCode.NotFound;
args.HttpContext.Response.TrySkipIisCustomErrors = true;
Continue reading Incorrect behavior when custom item set into Context.Item?
- You test it for some non-existing page (/content/some-page-does-not-exists), and everything works correctly (404 page is displayed)
- You try to access /content/page1, and …. regardless that in httpRequestBegin processor you injected your 404 page into the Sitecore.Context, original /content/page1 appears
On one of our Sitecore based projects we initiated an upgrade from Sitecore 9.2 to Sitecore 9.3. Upgrade was straightforward, with one exception.
The original project was using Glass.Mapper in its 9.2 version (5.5.28), and during upgrade we updated Glass.Mapper to its 9.3 version 5.6.160, including the takeover of original, vanilla, configuration files.
The following exception was … little bit unwanted result of the upgrade process.
22248 11:45:18 WARN Could not find constructor in ReflectionUtil.CreateObject: Glass.Mapper.Sc.Pipelines.GetChromeData.EditFrameBuilder. The constructor parameters may not match or it may be an abstract class. Parameter info: Count: 0
Continue reading Glass Mapper and Sitecore 9.3 Upgrading Issues
Why customize the default Sitecore workflow?
Sitecore is by default shipped with Simple Workflow covering simple draft – approval – publish scenario.
In this scenario, publish state of the workflow is set as final. This fact causes that when the content author needs to edit item fields, a new version of the item is created automatically, and changed content is subject to the approval process.
Some customers may need to extend this workflow by an additional state to control the moment when the item is published (and they don’t want to use time-based publishing) by adding the additional step between approval and published states.
The resulting workflow then looks like
draft – approving – approved – publish
with publish state as the only with final flag.
Everything looks fine, but…
… there is one unpleasant side effect. It allows content editors to change values of items in approved state without enforcing of creation of the new version.
Insert options, and their proper configuration is the crucial part of the solution development. It is the only way how to provide a way to the content editors to create new content.
Unfortunately, regardless that Helix is the current buzzword, still, there are some areas, where Sitecore does not provide out-of-the-box support for the stricter following of Helix principles.
One of them are Insert options configuration.
Continue reading Helix Compatible Insert Options
Sitecore 9.1 was finally released. Although everyone expected to have at least of technical preview of new UX experience “Horizon”, it is not included. But, still, there are couple features to be explored.
The first updated and improved experience include installation process. In comparison with previous Sitecore versions, few improvements were added to setup Sitecore with less effort.
Continue reading Sitecore 9.1 – Updated installation experience
Namely in multilingual solutions you may face request to limit content editors to edit just specified language variant of content.
In Sitecore, the way how to reach this objective is very quick and effective, but “by default” the way how to perform this restriction is hidden, and you need to do some additional steps.
Continue reading How to restrict content editor to edit content only in specified languages?
Do you remember how Sitecore configuration files for multiple environments and server configurations were handled? Times, when files needed to be removed during deployment process, renamed, overwritten or transformed? These times are definitively out!
Continue reading Sitecore 9: Rule based configuration
In latest versions of Sitecore there are two new features available for public audience. Sitecore Forms and integrated EXM.
Typical usecase for use of these two features will involve newsletter subscribing offered by Newsletter Subscription Form and maintaining double opt-in process inside of EXM.
Unfortunately, there is no straightforward way how to manage double opt-in together with Sitecore Forms, and we will need to make some additional (development) steps.
Sitecore Forms represents new feature introduced in Sitecore 9 and newer versions. It is considered as replacement of WffM, but current situation is still little bit painfull. Some features from WffM are missing, and many behavior aspects are not configurable as they are hardcoded in code provided by Sitecore.
In this article we will cover one of missing features – “Identify Contact” submit action, which allows us simply “Identify” anonymous contacts by filling subscription form.
This article reuses and simplifies scenario used in Sitecore Documentation here.
Continue reading Sitecore Forms: How to identify Contact?
I guess that I am not only one, who was really annoyed during creation empty solution for Sitecore development project.
It is not so much complicated – but many steps to do. Create solution, create web project, create TDS project, configure code generation, configure nuget packages, refer proper versions of nuget packages and many others, cook cup of cofee.
Visual Studio furtunately provides way how to automate that and create complete Sitecore solution by one click.
On github, you can find my repository https://github.com/Tragedie-v-JZD/Sitecore.Projects, containing source files required to build own VSIX extension with Sitecore project templates (Visual Studio SDK must be installed).
And because building of VSIX is not so straightforward solution of problem from beginnig of post, I have also precompiled final VSIX available for you.
UPDATE 15th December: Added support for creation of SC 9.0 initial release projects.
Continue reading Sitecore project templates for Visual Studio (updated)