Unable to edit, add or remove renderings from the Presentation Details of standard values

I’ve experienced a problem recently where I would make changes to renderings on the standard values of a template, clicked OK and the changes showed up in the Layout Details window, clicked OK again to finish the update, only to find that the renderings didn’t actually change. This is a really odd issue that probably has something to do with the contents of the __Renderings field.

To solve this problem, I had to delete and re-create the standard values of the item. This always fixes it for me. However, I’m really curious as to what caused the issue in the first place. It doesn’t happen for all Standard values items, only a few here and there. Given my __Renderings field contents (screenshot below), I’m not really sure what happened here, but re-creating the item is a simple enough fix.

blog-rendering-corrupt

Advertisements

F2 [Rename] not working in all Sitecore instances

Feel dumb moment of the day.

If you use F2 to rename items and suddenly to your frustration, it’s not working anymore, you need to check if the Home tab is visible in the instances where it’s not working.

If it’s not visible, right click the dark gray tab section and click Home:

home tab unchecked sitecore

You’re welcome.

Creating a Coveo facet with Sitecore sub-domains and external sites as options

Take this example: you have multiple sub-domains hosted in your Sitecore site, and each one has its own node under Content and its own Home item. You also have various external sites not hosted in Sitecore as completely separate sites. You’re building a search page with Coveo and want to develop a basic facet to list all of your internal sub-domains and external sites so that the end-users can filter pages and content by site. How would one do this? In this blog post, I will explain. Disclaimer: When I did this, I was working with Coveo for Sitecore v4.1 – Hive Framework, so if your version is much different, it’s possible not everything in this post will be accurate. Additionally, please note that the XML/HTML code snippets in this blog post will have the greater than/less than symbols stripped out because WordPress can’t handle those.

Create a Coveo Field for Your Facet

Every new facet you create will need its own field, so let’s create one. This is going to be a string, single-value field representing the name of a particular site (i.e. “Store” or “Marketing”, etc). In your Coveo.SearchProvider.Custom.config file, add a new field entry in the fieldMap/fieldNames node. In my case, my field’s name was aopaSiteName, so that naming convention will be used in other parts of this post as well. Your field entry should look something like this:

fieldType fieldName="aopaSiteName" settingType="Coveo.Framework.Configuration.FieldConfiguration, Coveo.Framework" isExternal="true" isFacet="true" /

Note that the field definition has isExternal="true" – this specifies that the field is not a normal Coveo for Sitecore field, so the field name won’t need to be converted. So if you put isExternal="false", your field name will become something like fmyfield99999 instead of just myfield. I suggest you keep this setting true to make development easier. Then, isFacet=true is needed so that this field can be used in a facet.

Continue reading “Creating a Coveo facet with Sitecore sub-domains and external sites as options”

MediaCreatorOptions.KeepExisting is gone in Sitecore 9

I have a module I’ve been working on that sets the MediaCreatorOptions.KeepExisting setting to false. This module has several different versions for different versions of Sitecore, so there is always a version of it that works in any Sitecore version. In the master branch of the code repository we had version 8.1 (initial release) of Sitecore.Kernel.dll in the references. This has led to an interesting revelation regarding this KeepExisting property.

In Sitecore 8.1 Update 2 (rev. 160302), Sitecore deprecated KeepExisting but it could still be used in code. Instead, you were asked to use OverwriteExisting. When our module ran on this version or later (up to the final revision of 8.2), no errors occurred so we were oblivious to anything being wrong. Since our solution had 8.1 initial release DLLs referenced, we did not see a warning in Visual Studio.

Anyway, KeepExisting was still allowed all the way until Sitecore 9.0 (initial release) when they removed the property altogether. So when we began testing our module in Sitecore 9, we noticed this error:

Method not found: 'Void Sitecore.Resources.Media.MediaCreatorOptions.set_KeepExisting(Boolean)'.

So, the message is: If you have a module that uses KeepExisting, you’ll need to create a new release of it for Sitecore 9 and swap that out with OverwriteExisting. I had to do a lot of digging through the Sitecore.Kernel.dll file for each Sitecore version to find out when this was property was deprecated and when it was initially removed. Unfortunately, Sitecore did not include any of this information in their release notes / breaking changes. Boo!

When does Sitecore Certification expire?

An associate pinged me with this question the other day and I really had no idea. My first thought was that they didn’t expire, since I didn’t actually receive a certificate after becoming certified; instead, just an email reporting that I passed the exam, my score, and the instructor’s congratulations. Nothing about when to retake the exam or when my certification expires.

My first thought of who to ask about this was the Sitecore community on Slack. At first I received my mixed answers, but someone provided an accurate answer: every 3 years. This seemed kind of vague for me, so I decided to get an official answer. I ended up emailing back my instructor (after almost 3 years!) and asking about when it expires, and I got an even better answer:

Certification expiration dates are the same as the Mainstream Support End Date for the corresponding Sitecore version per Sitecore Product Support Lifecycle policy. You can find the mainstream support end date for every version of Sitecore here:  https://kb.sitecore.net/articles/641167

By checking the version of Sitecore I was trained on and its mainstream support end date, I was able to officially determine when my certification expires. However, you should make a point to get re-certified regularly as new versions of Sitecore come out with major changes. Hope this helps some of you out there!