Tuesday, August 30, 2016

Admin Pages in Sitecore

With the 8.0 Version of Sitecore, you now have a page that shows all of the common admin tools in Sitecore. For users like me who only occasionally look up these tools (and has to search through Google results), this is a blessing.

The page can be found at http://Sitecore/admin/default.aspx

In my opinion, the Jobs viewer should be available directly in the CMS but at least having it here will give you quick access.

Tuesday, December 29, 2015

Sitecore Analytics behind a load balancer

In order to enable Sitecore to work behind a load balancer and still get the origin IP address there are 2 settings you need to make. First on the load balancer you need to enable x-forward-for and in Sitecore you need to change the “Analytics.ForwardedRequestHttpHeader” value to “X-Forwarded-For”. Then you will get proper IP addresses.


Thursday, November 26, 2015

Unusual error - Sitecore CSS and JS disappearing

Had an issue with a client the other day that had me pulling out my hair in frustration, trying to troubleshoot. We had an environment setup with a base Sitecore v8 installation. Everything checked out properly. Could log on and publish the sample content so all was good.

Did a restart of the vm and suddenly when we refreshed the Sitecore admin panel all the CSS and JS code was getting 500 errors and you could not proceed to log in to the Sitecore admin.

Now when you browsed to the sample site home page you were presented with...

No windows log errors no event raised in Sitecore event log.

Then started the research.....

Are the compression settings somehow wrong? Nope

If I set the APP Pool to a know local administrator. This seemed to work.

Does the IUSR

Turns out a GPO rule has restricted the IUSR account and removed a single permission from a registry key HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\HTTP.

Going through this guide line by line was the only way to diagnose a specific permissions issue.


Monday, October 5, 2015

Donut caching and Sitecore

Donut caching (and it's opposite Donut Hole caching) in terms of Sitecore can most easily be thought of as thinking of your Sitecore component as a donut sitting on a table representing your page. Where the donut is solid, that is content being cached. Where there is no donut, that is the equivalent of no-cache. This gives you the ability to cache only specific pieces of content on a page outside of doing this at a higher level component level.

Where this gets interesting is when you think of this in terms of nested placeholders.

GlassMapper V4 comes with a new method to deal with caching at a field level by injecting a constructor to the object construction pipeline when you implement and register Glass.Mapper.Caching.ICacheManager to the GlassMapper IOC container.


Thursday, September 24, 2015

Unicorn - TDS alternative for Sitecore?

As an avid fan of Hedgehog's TDS product I try to make it standard in any project I work in.

Whenever the client has decided not to purchase a license or I'm working freelance and that licensing cost would come out of my pocket I am always looking for alternatives. Even using the serialization page within Sitecore to generate text files that could be manually imported back in.

When a colleague showed me unicorn, I thought I would download it and try it out on a project.

The first thing to note is that this is not a full TDS replacement. I doesn't offer some of the features like auto code generation based on T4 templates that I reply on in most projects. The one item it tries to address is the serialization of the Sitecore tree so that it can be amalgamated in a source control system.

There are two parts to the unicorn framework - a customized data provider that can see when a change is made to an item in Sitecore and the unicorn control panel that syncs items to the disk.

Within Sitecore - items that are controlled by unicorn display a message

So as a replacement for TDS. I think it takes a portion of what TDS does and improves on it quite well. It does have a little more of a learning curve for developers to learn a new approach but it is quite powerful (especially with the addition of rainbow - more on that later) and you do avoid those pesky licensing costs


Site core and Tif files

Had a client requirement to be able to Upload a TIF file though media gallery and then be able to use it in a image field. Looking at how the file was upload 1 noticed that it was uploading the filein the file template. This means that you cannot call it from an image field.

There are a couple of different pieces to connect. In the apps include folder these is a file called mime types. This config file lists all of the different media types that sitecore can deal with. if you search for. gif you will see that entry is commented out. Same for jpg and other image types. This is for a simple reason; if you comment it out here you can add a custom type under the media types node in the web config.

GlassMapper v4

I am a big fan of making things as easy as possible for developers. That's when the original version of glassmapper came out I jumped on the bandwagon. At the time an ORM solution was badly needed. When Glass made the jump to support MVC patterns this made the GlassMapper library a requirement on every project.

One of the most painful things dealing with GlassMapper was the dependency on Castle Core IOC. The latest version 4 of GlassMapper does away with this dependency.

Some of the other big changes are;

New caching feature
An example of where you would use this is in rendering forms to a page. To use this feature just use

[SitecoreType(Cachable = true

Extending a class that inherits from ICacheManager allows you to override the cache manager or use your own alternative cache provider.

Change in syntax
Although I was a big fan of GlassMapper razor syntax; not a lot of people were. This has now been removed and you can simply use more familiar syntax of