maz
  • Member for 5 years, 3 months
  • Last seen more than a month ago
One index with multiple start locations
Accepted answer
15 votes

The generic crawler name is good when you will only have one crawler in your index. If you have multiple crawlers then you need to have nodes with distinct names: <locations hint="list:AddCrawler"&...

View answer
Get amount of components on final layout programmatically
Accepted answer
12 votes

This can be done by parsing the layout XML for each field (renderings and final renderings). The key is to use Sitecore.Data.Fields.LayoutField.GetFieldValue in order to obtain the XML value, ...

View answer
Update fields using Sitecore Powershell Extensions
8 votes

Since version 4.0, Sitecore PowerShell Extensions includes a -WithParent parameter to the Get-ChildItem command. This includes the item itself, thus making this much simpler: Get-ChildItem -Recurse . ...

View answer
How can I adjust the size of popup dialog in Experience Editor?
6 votes

Sitecore does not make this easy. For some reason, the dialog size is hard-coded as 720px by 470px (SC 8.2) inside the AddRendering command (Sitecore.Shell.Applications.WebEdit.Commands.AddRendering). ...

View answer
Is it possible to run Dianoga in an Azure Web App?
Accepted answer
6 votes

I've used this for a while and can confirm that it works (up to SC 8.2). Furthermore, I just tested it and it still works with Sitecore 9 in PaaS. Once installed, look for Dianoga informational ...

View answer
Updating parameters using SPE
Accepted answer
6 votes

It's actually easier than that (only showing partial code): if ($renderingInstance) { $renderingInstance.Cachable = 1 $renderingInstance.VaryByData = 1 Set-Rendering -Item $_ -Instance $...

View answer
SPE prevent Get-Item from throwing error if no item found
Accepted answer
6 votes

Just use the standard PowerShell error handling parameters: $localPath = $sourceItem.Paths.FullPath.SubString($source.Length) $targetPath = "master:" + $target + "/" + $localPath $targetItem = Get-...

View answer
Why did Sitecore display the wrong image?
Accepted answer
6 votes

When the Media.UseItemPaths Sitecore setting is set to true (the default), Sitecore uses the media item's path for a URL. For instance, if you have a PNG file at /sitecore/media library/Images/logo, ...

View answer
What do the release notes for the Express Migration Tool mean when they refer to "etalon"?
6 votes

Etalon means "standard" or "reference" in many languages: https://translate.google.com/#auto/en/etalon If you decompile the Express Migration Tool, you'll see that this is all over the place. There's ...

View answer
How to add a class img-responsive to RTE in Sitecore 8.x
Accepted answer
5 votes

Pointing to the entire bootstrap.css is a bit overkill. (And I suspect Sitecore / Telerik is having a hard time parsing it.) What you should do is ignore the ToolsFile.xml entirely (make sure the <...

View answer
Sitecore Powershell: Is it possible to prompt user for their password?
5 votes

Another way is with the Read-Host commandlet. If you ask it to return a SecureString, it will show a password field (as a modal dialog in Sitecore Powershell). You then have to convert the so-called ...

View answer
What is the benefit of including dependencies in Unicorn Configuration file
4 votes

As outlined in the release details for Unicorn 3.1 on Kam Figy's blog: Unicorn configurations may now declare dependency relationships between each other. This is useful for example when one ...

View answer
URLRedirection Custom HttpRequestProcessor
4 votes

In your configuration, you are overwriting (patch:instead) the Sitecore processor (ItemResolver) responsible for figuring out the context item based on the HTTP request. If you remove that, not much ...

View answer
Negate the criteria filter in Sitecore Powershell Find-Item call?
Accepted answer
4 votes

Although it's not mentioned in the official documentation, this feature has existed for some time with the Invert flag: Find-Item -Index sitecore_web_index ` -Criteria @{Filter = "Contains"...

View answer
Where is the schematool command in Sitecore Publishing Service 2.0?
Accepted answer
4 votes

According to the release notes, "The schema tools are now part of the Publishing Service." Therefore the command should now be: Sitecore.Framework.Publishing.Host schema upgrade This is also ...

View answer
Bulk deleting Sitecore users
3 votes

Another way to do this would be from User Manager, by leveraging the serialization feature. For this to work, you need direct access to the server. Click on "Serialize All Users". Go to your ...

View answer
Sitecore 8.1 with CosmosDB for xDB Issues
Accepted answer
3 votes

At this time, Sitecore doesn't officially support Cosmos DB / DocumentDB. But with all the push towards Azure, I would expect this to be ready sometime this year. See the notes here: https://kb....

View answer
Attachment Blob Not Uploading File
Accepted answer
3 votes

It looks like in Sitecore 8.2, you now need an "Extension" field for Sitecore to understand the attachment type properly. Add a single-line text field called "Extension" to your template, alongside ...

View answer
SPE - Cannot index into a null array
Accepted answer
3 votes

To distinguish positional parameters, Powershell uses spaces instead of commas. By changing your invocation to this, you will fix your problem: ImportTask $taskObj $contextItem By using a comma, you ...

View answer
GlassMapper: Unpublishable items are null in preview
Accepted answer
3 votes

This is normal behavior for the Preview feature. The purpose of this feature is to show you what the page will look like once published. Therefore the behavior you're encountering sort of makes sense, ...

View answer
Update the sitecore.configs at runtime possible?
3 votes

You can customize configuration by overriding the default ConfigReader defined in web.config. For example: <?xml version="1.0" encoding="utf-8"?> <configuration> <configSections> ...

View answer
Multiple fields with the same name in Habitat
2 votes

This is an improper implementation in Habitat's FieldRendererService. And another reason why you shouldn't start a new (real) project based on that source code. It's really meant as a demo. You can ...

View answer
Casting of SitecoreContext vs SitecoreService Which is fast?
2 votes

They are one and the same. SitecoreContext inherits from AbstractSitecoreContext which inherits from SitecoreService. If you look at the source code for the latter, you'll see that a call to Cast<...

View answer
Cannot setup content for same control multiple times in a page created using a template in sitecore 7.5
Accepted answer
2 votes

I am presuming Foreign_Language_Email_Block is currently a base template of your page item. If your pages will feature multiple controls of the same type, that pattern can't work. You need to use ...

View answer
How do I create surveys in Sitecore?
2 votes

I can see three options available to you at this point: Start from the shared source Sitecore Poll Module and adapt it for Sitecore 8.2. Don't forget to contribute back! Use one of the available ...

View answer
Patching an attribute using non-patching syntax
Accepted answer
1 votes

After some sniffing around, I finally understand what's happening. In Sitecore.Xml.Patch.ElementIdentification, there is a hard-coded list of "significant" attributes that Sitecore uses for ...

View answer
Patch forceDownload in Sitecore media types for PDF files
1 votes

To update element values like this, it's sufficient to just go down the unique path to the value you want to change, without specifying any patch attribute. This works just fine: <configuration>...

View answer
Get Optimized Image in sitecore
Accepted answer
1 votes

Sitecore's default setting for Media.Resizing.Quality is 95, i.e. 95% quality for JPEG compression. This is the most important setting —I would leave the other ones to their default value. In ...

View answer
Media Item not created in multiple languages
1 votes

We actually submitted this bug to Sitecore for 8.2-Update-5 (where it was definitely not fixed), and were essentially told that this was by design since version 8.2. The explanation given was that ...

View answer
How to fix msbuild path detection from Enterprise to Community edition
1 votes

The current master branch of Habitat is using v0.4.4 of the gulp-msbuild package. That version was still using an iterative process to figure out the location of msbuild. Priority is given to the ...

View answer