output
stringlengths
34
25.7k
instruction
stringlengths
81
31k
input
stringclasses
1 value
You can do this by using the Powershell Extensions module. $item = get-item master:\content\Demo\Int\Home $device =Get-Device -Default $contentDataSource = get-item master:\content\Demo\Int\Home\about-us\employee-stories\adam-najmanowicz $ImageDataSource = get-item master:\content\Demo\Int\Data\Images\d56cf7e777a2496a...
How can I programmatically add a rendering to all of my content items? I need to add a rendering to all of the pages in my Sitecore tree (i.e., items that have renderings, have a layout set, and live under /sitecore/Content). Content items that don't have renderings or a layout set don't need the rendering. I want to ...
I know that this is an old post, but I was looking through and just wanted to add some information to help anyone who is actually still hoping to implement similar behavior to this. At a high-level, @MarkCassidy is correct that there is no OOTB mechanism for what you are describing. However, you could achieve a limit...
What's the best way to update items created from a branch template When you create items based on a branch template, those items will contain a copy of the content, renderings etc. of the branch at the time the items were created - any changes applied to the branch template, once the items have been created, will not ...
No. But it won't take all that much custom development to achieve. A full detailed answer would be blog post sized; so am just posting the general principle here for inspiration. Your problem is; the Rules Engine operates on an if-else-then basis, and it does so by-component. You have no control over component relati...
Can I change the order of components in placeholder based on personalization? I've seen a few examples on how you can use personalization in Sitecore to personalize the way a component (rendering / sub-layout) is displayed on your webpage. However, most of these guides explain how you can show/hide a component, given ...
If you simply want to render out a partial view (either view rendering or controller rendering), from another view or layout, you could use the Sitecore MVC extension methods: Render view rendering: Html.Sitecore().ViewRendering("Path to the View") Render controller rendering: Html.Sitecore().Controller("Controller...
Is there any alternative to @Html.RenderAction in Sitecore? I want to load partial view using @Html.RenderAction("AccountNav", "Navigation", new { Area = "areassomething" }) but it throws an error. Is there any alternative? Is the semantic correct? I have requirement such that I have to use something like th...
When you set a conditional rendering, the data for the condition and action is stored inside the Layout. Here is an example of a rendering with an "Alternative Datasource" rule that is applied if the current date is Wednesday: <r xmlns:p="p" xmlns:s="s" p:p="1"> <d id="{FE5D7FDF-89C0-4D99-9AA3-B5FBD009C9F3}"> ...
How to invoke other actions in Conditional Renderings? Another question here (Can I change the order of components in placeholder based on personalization?) got me thinking - maybe there was a way to actually dynamically assign a placeholder to a rendering through personalization. And a bit of digging - turns out, ma...
A big question, so I will answer just a slice of it, what Personally Identifiable Information IPII) does xDB store out of the box. I'm tempted to say nothing: as an implementer, you have the option to identify a contact, and to tag that contact with information via the contact facet mechanism. xDB ships with predefine...
Sitecore, personal data and General Data Protection Regulation (GDPR) Across Europe new privacy legislation has been introduced; GDPR. In a nutshell it says that the following are the responsibility of not only the customer but also the supplier: Seeking consent from data subjects where personal data is stored on ...
Props to @rosscartwright, @cassidydotdk, and @jammykam for getting us to the answer at lightning speed and for the helpful links. The issue was a feature of Sitecore called AlwaysStripLanguage that is controlled by a Sitecore Setting in the Language group that controls the activation of a processor in the <preprocessR...
Why does my marketing URL redirect me to the site root? [Question transposed from Slack] We are trying to create a site with a virtualFolder of /chr. When we navigate to home page in the site, the system redirects us back to the site root. We have checked aliases, mod_rewrite/helicon ape/urlRewrite, and ignoreUrlPref...
The link to the instructions page is unreachable to me. So I'm just going to explain how I've done it. In the core db: Create a new layout under /sitecore/layout/Layouts/Custom Applications/ and set the path to the aspx page, starting from the website root (e.g. /path/to/page.aspx (note the forward slash at the star...
Difficulties setting up Application shortcuts in Sitecore 8.1 I'm attempting to set up a shortcut in the Sitecore (8.1) start menu to an application (basically a custom .aspx page sitting within the /sitecore folder). I've roughly followed these instructions (and have paid attention to this gotchya), but in detail I ...
A very large log file is symptomatic of the problem of no backups taking place. Under normal circumstances SQL log files get truncated on backup. It is quite normal that a CI environment gets quite many updates, and if your SQL is running in "Full" mode, this will grow your transaction log. I would propose setting i...
How can I remove / delete Sitecore database log (*.ldf) files Is there any special procedure to clear up large log files in Sitecore databases? Our integration server has a huge (25GB) log file which I would like to dispose of, but not sure of the procedure. On an aside, is a very large log file symptomatic of any pa...
There's already answer to similar problem on Stack Overflow: https://stackoverflow.com/questions/21452260/sitecore-tree-list-datasource-versionexist In a nutshell, what you need to do: Create DataView which will be responsible for filtering non-existing items LanguageFilteringMasterDataView : MasterDataView Override m...
How to filter items by language in Treelist field On a multilingual site, how can I make a treelist field to only show items of selected language in the editor -so editors can't select items that do not have versions or shouldn't exist on their site. We are needing this for a "taxonomy" field but some (could be lots...
I'm sure I came across an example of linked drop downs in WFFM in the past but can't find find it now. This might be a good basis to start from: http://sitecoreguild.blogspot.co.uk/2013/06/sitecore-country-and-region-dropdowns.html However you will obviously need to inherit from the right classes for your dropdowns to...
WFFM: dynamically populated dependent drop lists I have the requirement to create two lists: the second one being dynamically populated with Sitecore data after the user selects a value from the first one. I tried using some Rules for WFFM but can't seem to match any with what I want to have as results. I would like...
I wouldn't use Sitecore Powershell Extensions for this. SPE doesn't have anything for interacting with the clipboard and also doesn't execute custom JS from scripts (yet!). Additionally, there already exists a command within Sitecore for copying the path to the clipboard, so all you need to do is assign it to a new bu...
How to create Sitecore Context Item to copy Item Path using SPE? How to create Sitecore Context Item to copy Item Path using Sitecore PowerShell Extensions. Like in below screen we have for Layout Copy Renderings and Quick download package. Sometimes it requires to copy item path and paste in the item's field such as...
You can do this by making sure that your renderings are set to Vary by User. This adds the user to the cacheKey string like this "_#user:" + Context.GetUserName(); You can then use the following code to clear the html cache for that user: // Need to clear the cache for the header and the user profile.... var htmlCa...
How do I clear the HTML cache for a specific user? We have an action that updates some user profile information that is displayed in components that are cached with a vary by user setting. Is there a way to clear the cache for only that one user?
You can try to open the standard values item with the Experience Editor and add the renderings you like. If that doesn't work out, create an item based on the template, add the renderings and manually copy the values over to the standard values item.
Predicting the placeholder for a dynamic placeholder I am using the Dynamic Placeholders from Fortis, but need to setup a page template where the Dynamic Placeholders contains renderings. I am setting the page template up, by setting layout detail on the standard values of the page template. I have been unable to suc...
One option is to hook into Sitecore's user:updated event (and optionally user:updated:remote). This event is raised when a user has been updated, the remote event handler is raised when a user was updated on a remote Sitecore instance. EDIT: As pointed out in the comments by @SzymonKuzniak, you can also hook into the ...
How to send email, when users roles change - User Manager customization I've been tasked with an interesting challenge. The client wants a user to be sent an email informing them when they have been assigned to a specific role by an Admin. What will be the best way to go about this? Is it possible to do this via W...
Are you logged in as an Admin? Admins are not subject to workflow enforcement.
Workflow not being applied According to Sitecore's official documentation in order to set a workflow for items created from a template one have to set Default Workflow in the template's standard values. Well I did just that and... nothing is happening. More specifically all the newly created items are created without...
I typically disable caching for my local environment by setting the HTML cache lifetime to 1 second using the following config patch: <setting name="Caching.HtmlLifetime"> <patch:attribute name="value">00:00:01</patch:attribute> </setting> To make this specific to your local environment, you can patch it in using ...
Disable HTML cache for development I am currently making code changes to a view rendering in Sitecore, and when a deploy these changes to my local environment, they were not visible. I realized that the rendering was marked as Cacheable, so I was seeing a previously cached version. Besides unchecking Cacheable on t...
Ok. Well. Would definitely be possible to set something up with Unicorn for this - albeit it a highly unusual configuration. Steps I would take would look something like this: Set up Unicorn on the CM box to serialize all of the web content you want to regularly push across to CD This will ensure, the file system alw...
Publishing without SQL What approach should I use to enable a customer to deploy content (just items) from their CM environment to a CD environment, where the CD environment would not allow any SQL ports through the firewall? Something like zipping up a package or serialization files, uploading that over HTTP, unpacki...
Pipeline Method: Option 1: Deep in the bowels of Experience Editor, you will find that eventually, the Move Component button is enabled/disabled based on the Allowed Renderings set on the placeholder. You could add a processor to the getPlaceholderRenderings to weed out the rendering you are looking for so that it act...
Disabling 'Move Component' in Experience Editor for a specific rendering Is it possible to disable an option, Move Component, in the Experience Editor, for a specific rendering? I have looked at the rendering and rendering options, but neither gave the possibility. I have also looked into user rights, but to no avail...
Not sure if it is possible to call RegisterForEventValidation from inside RuleAction. You can try different approach. Instead of adding your values from javascript add all possible values into dropdown on WFFM form designer and then hide some of them with javascript. Thanks to this you will not have to register any va...
ClientScript.RegisterForEventValidation in a custom RuleAction class I managed to have my dependent droplists (WFFM dependent drop lists) populated via a custom WFFM RuleAction by using a lot of JavaScript but now since I add dynamically the values in my second droplist when I submit the WFFM form I get the error: ...
If your content authors are strictly following WorkFlow, use scheduled Incremental publishes. If workflow is not strictly used, use user manual publishes (Smart Publish), and try to cover related item publishes to reduce number of cache clears. For multisite, if you publish item of site-A. It will clear html cache for...
How should I configure publishing on Sitecore 8.2+? What are the best practices for publishing configuration on Sitecore these days, especially given the performance improvements on 8.2 when using the new publishing service? Scheduled incremental publishes? Workflow based publishes? Allow manual user publishes? Some...
The matching can happen immediately. Here's how it works: In a very basic case, you might have 2 values that are being considered: color and shape. A visitor can prefer red over green, and circles over triangles. There are 4 combinations: red circles, red triangles, green circles and green triangles. A visitor start...
How does Sitecore "match" a pattern card for personalization? I understand the basic concepts of pattern cards and profile keys. But how does Sitecore determine that a user matches a particular pattern card? How many pages tagged with that card does a user need to browse before matching it? And what if the user browse...
An options could be not to use courier, but to use TDS delta builds, considering the fact that you already use TDS, by going back to a certain date in time. This will also keep the packages small. You could, by the way, use TDS package deployer to automatically install these packages as well.(https://github.com/Hedgeh...
How should Courier be used as part of a CI build? I am looking at an existing setup of Sitecore that is using Courier as part of a continuous-integration process. The process is currently: Commits to a particular branch kicks off a Team City build The build contains a TDS project of serialized items Courier is exe...
In the Media Library there is a “List Manager” folder present in the Vanilla installation of Sitecore 8.1 Update-3. You can plainly see it here: If this folder goes missing, or is not present, the CSV Upload Wizard will error out like described in the question. This situation occurred after an upgrade was complete...
List Manager errors on any CSV Upload In Sitecore 8.1 List Manager (and confirmed in Sitecore 8.2), the List Manager CSV Import Wizard Dialog appears as though to throw an error, even though no error message box appears. The only way to notice that an error is occurring is that the upload dialog box is outlined in red...
I have never seen this before but here are some ideas I would try: Compare the security provider configuration on Coveo's admin tool against a working box looking for misconfigurations; Set this coveo user(temporarily) as a sitecore admin and see if this fixes the issue; Another thing I would try would be to go to th...
Coveo user in a new Sitecore 8.1 update 3 instance gets locked consistently I have cleared the security cache on Coveo several times, verified the certs, the encryption key and the Coveo license. I have also verified the password hash and physically gotten on the master and the mirrors of Coveo to reach the CM server...
The AutoMap and AutoMapSource fields are used to configure automatic mapping of the contact identifiers: When configured, one does not have to select a File field manually in a dropdown. The auto-mapped field is hidden on UI and the value for that field is taken from another field marked as AutoMapSource. By defaul...
List Manager CSV Upload Import Field AutoMap settings not working In Sitecore 8.1 (and 8.2) List Manager, we want to customize the data that we upload through CSV into custom Contact facets. This question is not asking how to add facets, and assumes that I have already correctly added facets to my contact model. In...
Typically empty + null values are not stored in the Lucene index, it's really designed for queries that are finding data rather than the absence of it. If you searched for +fieldName:* then that should find documents which have an entry (and therefore value) for fieldName. I'm not entirely sure how the query-builder m...
Filtering results when field is empty with query builder fields How I can use sitecore query fields to filter and not bring results if a specific field is empty? I have tried something like this: location:{41c52cce-69cc-444d-b505-044addf0d9e1};-custom:title|'' I have also tried double quotes but I get the same res...
If you want to get the building query and attach filters to the search you can do something like this: Coveo.$('#search').on("buildingQuery", function(e, args) { args.queryBuilder.advancedExpression.add('@Model.ToCoveoFieldName("templatename") == "MyTemplate"'); }).coveoForSitecore('init', CoveoForSitecore.compone...
Refining/executing query with Coveo Going by the examples out of the box in Coveo, I always see this bit to construct the query: Coveo.$(function() { Coveo.$('#search') .on(Coveo.QueryEvents.buildingQuery, function(e, args) { I want to add essentially my own faceting system to this, but not ...
So this depends on what you mean by predictive search. If you mean a simple autocomplete, then yes. Sitecore provide an n-gram analyzer for both Lucene and Solr. To use this, add a new field to the index and map the field to use the n-gram analyzer instead of the default. You will need a custom computed field and an ...
Do we have predictive search capability within Sitecore? I'm looking for predictive search for content page in Sitecore. Something similar, what google search provide. Do we have anything like this?
You can configure Sitecore to respond to requests with different home nodes based on the url. To do so, you need to perform the following steps: Configure DNS appropriately. Add a binding in IIS for each hostname. Copy or rename the config file App_Config/Include/SiteDefinition.config.example to App_Config/Include/S...
How do I configure Sitecore to serve multiple sites? I want to configure my instance of Sitecore to respond with different sites at different urls. How can I do this?
I don't have Sitecore 7.5 with WFFM module installed but this is listed as known bug in Sitecore knowledge base site. It was fixed in WFFM 8.0 Update-2 as mentioned in the link above. [Fixed in WFFM 8.0 Update-2] It is not possible to translate form in Form Designer. 'Language' dropdown doesn't show languages (249...
Why can't I select a different language for a form in WFFM? I have Sitecore 7.5 with Webforms for Marketers 2.5. I want to create a form in the French language. However I can't seem to select French as a language. When I open up the form designer there is a button and a dropdown to select a language other than Engl...
As a workaround, please perform the following steps: Create a backup before making any changes. Serialize the problem item (Developer > Serialize > Serialize Item). Open the created file (Data\serialization\dbname\itempath\itemname.item) with a text editor and set the master parameter: Master: {00000000-0000-0000-0...
How do I fix a broken 'Created from' reference when the branch no longer exists? We're using Branches in Sitecore 8.1 rev. 160519 when creating new pages. However, at some point a branch item was lost in all of our environments, possibly because of a bad package, since the item doesn't exist in the recycle bin. This ...
This agent uses the database referenced by the reporting connection string. Check if you see a Properties table in this database. If the table is missing, you can create it with this SQL statement: CREATE TABLE [dbo].[Properties]( [PropertyId] [uniqueidentifier] NOT NULL, [Key] [nvarchar](100) NOT NULL, [V...
Invalid object name 'Properties' Exception when executing agent experienceAnalytics/reduce/agent We are getting the following error message in our Sitecore log file. We can not tell if this is breaking anything though, as the site appears to work as expected. This is occurring after an upgrade from 7.2 to 8.1 U3. 8...
Because Sitecore does not provide you the hooks to validate the transaction you're after, your best bet is to hide the security features and manage them in code. Here's a few suggestions that aren't too onerous to implement. Prerequisite: Lock Sitecore Users out of Security Features Make sure no one has access to Sitec...
Restricting Item Access Rights to Roles - Prevent Users from being assigned Access Rights directly Best practice is to assign access rights to roles rather than users. So I would like to block changes that apply access rights for users. Sitecore does not seem to trigger the saveUI pipeline on access right changes, so ...
An alternative to using .net code or storing logs in the database: We used the forfiles command for things like this. Place the command(s together) in a batch file and have that executed as a scheduled task on the server. Works fast and puts no extra load on your .net application. You can delete files with it (based o...
Zipping/archiving old log files? Some time ago I wrote a blog post about rolling the Sitecore logs: Now I'm on a project that wants to keep their logs for 3 years, but doesn't want to use disk space. I modified it from an initialize pipeline processor to an agent and to compress the logs to a different directory. Is...
This one supports 8.0+ https://marketplace.sitecore.net/SearchResults#qr=helpfullcore - it works similar to the original Wildcard module, but doesn't use the rules engine to process the tokens. You can view the documentation on it here: https://vladimirhil.com/2016/02/22/wildcards-module-for-sitecore-7-using-content-s...
Availability/Upgradeability of Wildcard Module for Sitecore 8+ I'm trying to get hold of a version of the Wildcard Module for Sitecore 8.1. Unfortunately the version on the Marketplace (https://marketplace.sitecore.net/en/Modules/Wildcard_module.aspx) only goes up to v6.5. Is there a version of the Wildcard Module th...
We use a bunch of Marketplace Modules within our solutions usually. The way we use them heavily depends on how well the module is maintained but the general procedure that we use is to source code control the DLL's and any patch configs associated with the module. This allows the bits and configs to get transferred to...
Should we source control Sitecore modules? Once the right Sitecore module has been chosen, we need to sync all environments including developer, dev, test, prod etc. I'm thinking whether we should include items on to TDS and patch files on configuration etc. Is this a best practice or should we avoid it? Also not s...
If you have not already used a base template with presentation, this will be tricky. Normally I would have a base page template with some core presentation elements and then all other page templates would inherit from that - also I try to have very few page templates. For your problem you are probably going to have to...
Best way to add rendering in base template and inherit We are 80% from the completion of the project. And noticed that we need to create a couple of renderings that must exist on all pages. I thought the best place to do this would be presentation detail of base template standard values. However, it appears that whe...
Are you using shared database user for mongoDB? Make sure to grant it read rights. Refer: https://blog.horizontalintegration.com/2015/04/09/sitecore-8-xdb-using-shared-users-on-mongodb/
"not authorized on config to execute command" Error when rebuild path analyzer from historical data When trying to rebuild path analyzer from historical data the following error appears in log file: 16916 2016:09:21 08:50:19 ERROR [Path Analyzer] BuildMapAgent failed Exception: MongoDB.Driver.MongoCommandExceptio...
This might be slightly off topic, but I can give you a bit of background info. In EXM 3.3 you can move/change the email open handler by modifying the configuration setting EXM.OpenHandlerPath in Sitecore.EmailExperience.Core.config. The EXM 3.3 open handler does not require the tracker. It creates an interaction usin...
What are the implications of setting EnableTracking to True for "modules_shell" site? In ECM 2.2, the RegisterEmailOpened.aspx was located in sitecore_modules directory, which is mapped to the Sitecore site "modules_shell". In EXM 3.3, this page is moved to /sitecore/ and made an ashx. Okay, cool... Method #1: Use ...
ClusterName is a value of the cluster address to which a server belongs. The name should be identical for all content delivery servers that are in the same cluster. I usually use a string here, not a hosname. I believe this has nothing to do with multisites URLs. EXM documentation states: Ensure that the value o...
Analytics Tracker Config: What is the Proper Configuration for Multisite? In Sitecore 8.0+, the invention of the Sitecore.Analytics.Tracker was introduced to provide Session based Analytic tracking to be sent to xDB. This is maintained in the config file Sitecore.Analytics.Tracking.config. There are two settings: ...
To update the text next to the Documentation link, you need to edit the Title field just under it. See this screen shot for an example. Probably best not to use markup in that field: I'll have to leave adding another contributor to someone else as I couldn't see how to do that either!
How to Add contributors to published Sitecore marketplace module I have published a module in Sitecore marketplace. But now I can't add contributors or edit some of the text notes for the module. How can I do this?
So I had an issue with this custom Web API hosted inside my Sitecore solution, that will be used by a third party to call upon some Authentication and Authorization functionality. I did the following things to make it work: I mistakenly named my API as ApiController which is actually a built-in Abstract class, so cha...
How do I control access to Custom Item Web API controllers? I am creating a Web API (Controller) inside my Sitecore solution by inheriting ServicesApiController and EnableCors attribute. This service will be called from any IPhone/Android Application (currently not sure how they will call). For initial testing, I cr...
Found the solution. I used fieldNameFormat="PREFIX_{0}" in my fieldMap. This way Sitecore couldn't map my object to the Solr object.
Field values are being fetched as null while reading the data with SolrContentSearchManager with Solr custom FlatDataCrawler I'm busy creating a Crawler using FlatDataCrawler for custom non-sitecore data. Inserting the data into Solr works, but when i'm reading the data with SolrContentSearchManager my entities are in...
Sitecore.Social lives in \App_Config\Include\Social and is controlled by the various configs that live there. If you do not want to use the module at all, you can completely disable it by doing the following: Delete the Social folder. Delete all Sitecore.Social.*.dll from \bin I've tested this on Sitecore 8.1U3 an...
How to keep Sitecore.Social from complaining about Ninject? Sitecore Social loves to fill my logs with this: Sitecore.Social: Ninject, Version=3.2.0.0, Culture=neutral, PublicKeyToken=c7192dc5380945e7 is not loaded. Couldn't determine the Social channels. We're not using the module at all. Is there an easy way to d...
Hmm. You don't mention if you're using InProc or mongo session states. But it might not be relevant. Sitecore overrides the default ASP.NET SessionIdManager manager - not entirely sure why. What is clear however, that it is in this puppy it is controlled, whether a new Session ID should be issued on timeout. So 2 thin...
Session_Start not called unless browser is closed We have some logic that we trigger based on a new session starting by using Session_OnStart in Global.asax. This is fine, except that for some reason this is not being called when a page is viewed after the session times out but the browser is not closed. Is Sitecore...
I'm not sure if you're updating Glass Mapper at the same time, but I don't believe the Glass.Mapper.Sc.Mvc-5 package is required as of v4 (Apr 2015). If you have a look at the v4 release notes they have simplified things down to one Nuget package: Glass.Mapper.Sc, which also includes the .Mvc dll that you require. If...
Attempt by method 'Glass.Mapper.Sc.Utilities.get_IsPageEditor()' to access method 'Sitecore.Context+PageMode.get_IsPageEditor()' failed Just updated a simple instance of Sitecore 8.1 to 8.2, the actual solution contains a simple demo, some templates, items, nothing too complex. All went fine as I followed all the step...
I would suggest switch to Database Tasks (/sitecore/system/Tasks/Schedules/), it has out-of-box mechanism to handle scheduled tasks for load balanced environments. The benefit you will have is, it will get invoked only from one of multiple sitecore instance (whatever instance gets first chance) as it maintains state ...
Scheduled tasks on load balanced CM server How can I configure scheduled tasks in Sitecore to only run on one of the machines in a load balanced content management (CM) environment? I have a task configured via a config include and am using Sitecore 8.0.
If you don't want FilePath based language resolving, simple do below setting in Sitecore.config: <setting name="Languages.AlwaysStripLanguage" value="false" /> This will do nothing but ignoring the StripLanguage processor from preprocessRequest pipeline. By default first item (after domain name), Sitecore checks ...
How to prevent Sitecore resolving the Language based on the URL Our site is resolving some relative urls as languages, where it should be resolving items instead. e.g. mydomain.com/eu should be resolving the item EU under the home item. Instead, Sitecore is resolving the home item with the language as Basque (EU) ...
Here is the my final solution after the leads from other answers here. I use the media:request event along with the lesser known AddOnSendingHeaders method on Request object that basically gives me a final chance to change headers before IIS sends the request to the client. public class ChangeFileName { public voi...
Change default file name when downloading from Media Library I store user uploaded files in Media Library, which can later be downloaded by admins. When saving files, I change the file names to guarantee uniqueness, but later when admins download them I want them to see the original or user friendly file name. This ...
Does azure search uses Lucene as search engine? Azure Search is Microsoft's response to providing a cloud based indexer. It uses Elastic Search as the underlying driver, but the Elastic Search engine is not directly accessible. Currently Azure Search is only accessible using RESTful Web services or the Azure Resou...
Sitecore Azure Search vs. Solr Provider I've used both Solr and Lucene. The majority of our sites now use SOLR. Heard Azure Search provider will be introduced on 8.2.1 release. Has anyone played with Azure Search? Does Azure Search use Lucene as a search engine? Does Azure Search have a concept of Cores (similar t...
I'd recommend learning and using Apache JMeter. Yes, it's a technically a load testing tool, but in reality it's a highly configurable and very powerful tool to script simple and complex HTTP (and other) requests against one or many destinations. We use it for both load and stress testing. You can build up a suite of...
Tool to test long term execution footprint of your Sitecore solution So I'm coming up on the end of a project cycle; and I want to just give it a good shake around the hinges to see if everything is fine. I'm not looking for load testing (imo, load testing locally is pointless) - but my idea is to fire up dotProfile ...
I've seen (and tried) many different approaches to this problem. I'm going to propose one, but there will be quite many alternatives. Let's see what the community comes up with. Your first problem is the execution order of your components. In your scenario; the container component will execute its Action before any of...
Shared data between root- and subcomponents in placeholder while having a loose coupling between them I have a nested component structure, where my root element has a placeholder, which contains zero to many sub-components. Each sub-component has it's own price, which gets calculated inside the sub-component itself. ...
Instantiate a SitecoreContext and call the Cast<T>() method. ISitecoreContext context = SitecoreContext.GetFromHttpContext(); var myTemplateObject = context.Cast<MySite.Model.MyTemplate>(item);
How to convert a Sitecore Item object into a strongly-typed Glass model? I have a Sitecore template MyTemplate and a corresponding Glass model MySite.Model.MyTemplate. In my page code, I retrieve a raw Sitecore.Data.Items.Item object from a legacy data access class. This object represents an item of the template MyTe...
The Sitecore 8.2 Release Notes provide a wealth of information around the changes that come along with 8.2. I would definitely pay attention to the breaking changes section. Largely, the 8.2 Version of Sitecore was very Developer focused and not as much has changed on the marketing side. Specifically though, the bigg...
What are the main improvements of Sitecore 8.2, compared to 8.1? I have a Sitecore installation in production. Most standard features are being used—Content Editor, Experience Editor, xDB, Experience Profile, Experience Analytics, MVC, custom pipeline processors, Lucene indexes, etc. We're also using a dependency inje...
The entirety of the CMS Performance Tuning guide that you linked is relevant for Sitecore 8.X. The guidelines and features discussed have not changed. The underlying architecture for some of the elements have changed (such as Caching) but how you tune has not. What's not in here are the additional performance improvem...
CMS Performance Tuning for Sitecore 8+ Sitecore has previously published a CMS Performance Tuning Guide for Sitecore 6.x and 7.x on SDN. I do not see any similar content on doc.sitecore.net for Sitecore 8.x. Is most of the content in the 7.x document on SDN still relevant? Any new considerations on 8.x which have not ...
When an item is updated in the index, the indexing:updateditem event is raised with the index name and item ID as parameters. You could add a handler for this event and either clear the cache based on that item, or append to a queue that you then process and clear when the indexing:end event is fired. There is also in...
Get indexed items after index update We are using some (custom) caches that get cleared when data changes in Sitecore - it's written so that it only clears the cache when items from a certain template are published (we don't want this cache to be thrown away each time an editor publishes a small unrelated content chan...
Try clearing this setting: <setting name="RedirectURLPrefixes" value="/sitecore" /> If it makes a difference it's a reasonable assumption you got some less than ideal URLs going on in your solution. Like http://site.domain/sitecore/content/home/news - that type of thing.
Request is redirected to no layout page I noticed that in my logs there are a ton of entries like this: 5920 09:09:26 WARN Request is redirected to no layout page. Item: sitecore://web/{11111111-1111-1111-1111-111111111111}?lang=en&amp;ver=1 Device: {FE5D7FDF-89C0-4D99-9AA3-B5FBD009C9F3} (/sitecore/layout/Device...
Previously, the 9.1 packages were in a separate feed, as of March 4th 2019, these have now been moved back into the main feed. The NoReferences packages are still removed. To avoid link rot, here are the feed urls for the official feeds: For all versions: NuGet V3 feed URL (Visual Studio 2015+) https://sitecore.my...
How do I reference Sitecore binaries from NuGet? I've heard through the grapevine that Sitecore DLL's can be referenced through the use of NuGet Packages. I found Sitecore.NuGet, but I don't think that's the right option. I also found this blog post talking about the Sitecore NuGet Package Generator which looks prom...
I've not tried to set this up yet myself, but I can tell you that the solr support package is no longer required. So, I'm going to guess that you can simply enable all of the solr files and disable the lucene files.
Where can I find the instructions for setting up SOLR without using IOC? I'm trying to setup an instance of Sitecore 8.2 so I can see what it's going to take to upgrade my site from Sitecore 8.1 to it. I've heard that Sitecore 8.2 can run SOLR natively (without using IOC), but I can't find any documentation that tells...
Summary To summarise the comments on this question, which provide a reasonable answer. 7.5 does not have the fix applied. 7.2 update 6 does. They recommend upgrading to 8 for improved functionality Sitecore strongly recommends that you upgrade to the latest version of the Sitecore Experience Platform. [...] The...
Sitecore Page Editor Issues with Move and Add Components I have a page with "body" placeholder in which I have kept 10 controller renderings on a page. When I'm trying to order the component using Page editor or Content editor, the sort order randomly readjusts by itself. Does anyone know of a fix for this? This is...
Turns out to be a known Sitecore bug - request patch 81234 for a DLL/config from support.
Experience Editor search - requested document not found This is using Sitecore 8.1 Update 1. When I click the search icon to get the "navigate to item" and search for something in my website, I get a "requested document not found" error. It's quite clearly there, but even something like my home page will throw this er...
Looking at the OP, the comments, your code and Sitecore's, I believe that this issue is likely caused by a bug in the PageEvent.IsGoal property, whereby the property is not being correctly set to true for events that are goals. I have not yet confirmed this bug, but if I am correct then the following should help you wo...
Goals not being retrieved from Sitecore xDB ( MongoDB ) I upgraded my site from Sitecore 7.5 to 8.1, and following is the code that I'm using to retrieve the page events: foreach (PageData page in args.Context.Visit.Pages) { if (page.PageEvents != null) { foreach (var pageEvent in page.PageEvents) ...
You must change the maxAllowedContentLength setting to increase the maximum allowed download size of the update package. To do this: In a text editor, in the \wwwroot\\Website\sitecore\admin\web.config file, change the maxAllowedContentLength setting from: <requestLimits maxAllowedContentLength="1048576000" /> to:...
OutOfMemoryException running the 8.1->8.2 upgrade wizard On Step 3 of 1.2.3 in the upgrade guide, I'm getting a System.OutOfMemoryException pointing to Sitecore.Update.Utils.FileUtils.SerializeFile(Stream stream, String location) +137. Installation wizard installed fine and the UpdateInstallationWizard.aspx page com...
There are several pieces of documentation that are available for this: First is https://doc.sitecore.net/sitecore_experience_platform/setting_up__maintaining/security_hardening This contains a collection of documents relevant to your version of Sitecore. Second is The Security Hardening Guide which is the defacto gu...
How do I disable /sitecore access on a Content Delivery Server? I have 2 servers: Content Delivery - the live site pointing to the web database. Content Management - the internal only site pointing to the master database. I want to prevent access to /sitecore on the live site, and require Content Editors to access...
Messy; sure. But it should be without consequence. Templates and fields are language agnostic; even if the "field items" themselves get created with a language version. All fields on a field template are either [Shared] or [Unversioned]. The only exception to this that I'm aware of, is Enable versioned field level f...
Are there any issues with having multiple language versions of templates and template fields? We have a multilingual website based on Sitecore 8.1 rev. 151207 (8.1 Update-1) and Glass Mapper. It has four languages: English, Danish, Swedish and German. Some of the developers are native English speakers, and some are n...
It is a permissions issue. You've not shared your actual connection string sharedsession but the end result will be the same, the account you're using to connect to SQL does not have sufficient permissions. My first course of action would be to attempt a connection string based on the sa account and see if the problem ...
Configuring private sessionState database raises runtime error: I am trying to configure a mssql private sessionState database. I added the following to web.config's : <sessionState mode="Custom" customProvider="mssql" cookieless="false" timeout="20"> <providers> <add name="mssql" type="Sitecore.Session...
Based on your code snippet above, and compared with what I'm doing with my custom caches, you don't have to call base.SetObject(). As long as you provide a long maxSize in the base constructor call, the CustomCache class will take care of the rest. One of the changes Sitecore made was removing the need to calculate th...
Sitecore.Caching.CustomCache changes with 8.2 I'm upgrading my site from Sitecore 8.1 to Sitecore 8.2, and one of the compile errors that I'm getting is CS1503 Argument 3: cannot convert from 'long' to 'System.EventHandler' As I'm looking into this, I think that I remember reading how Sitecore completely c...
The simplest solution here seems to be to update your custom controller A.B.Controllers.AuthenticationController to have a unique name so that it doesn't conflict with the Sitecore one. The risk of trying to change the Sitecore references to that controller are high and it would potentially make any future upgrades mo...
How to override/replace the default Sitecore Authentication Controller I upgraded my site from 7.5 to 8.1 and when I try to click on Sitecore logout link I have the following error: Multiple types were found that match the controller named 'Authentication'. This can happen if the route that services this req...
Change your script in a following way: $targetTemplate = Get-item 'master:/sitecore/templates/User Defined/Common/Data'; $templateFilter = Get-Item "master:/sitecore/templates/System/Templates/Template Field"; Get-ChildItem $targetTemplate.FullPath -recurse | Where-Object { $_.TemplateName -eq $templateFilter....
Unable to get value of $_.Source using SPE I have a rich text field in my user defined template and I want to replace the source value of the rich text field. Below is my query where I'm able to read Name, type etc, however $_.source is something which returns nothing though the source value still exists. Any help ple...
Quick test confirms that the following allows you to set a rendering parameter on existing items. # Path to the Coveo rendering you need to update $rendering = Get-Item "master:\sitecore\layout\Sublayouts\Sample Sublayout" # Update this value for the path of all the templates whose std vals you wish to update $items ...
Update same rendering of several templates using SPE I have a bunch of templates that have a Coveo Search Box View rendering associated with the standard values. I need to update the property "Reveal Advanced Query Suggestions" of all of them(a lot of templates in this case) and set them all to checked = false. Althou...
In your command there is a QueryState method where you can hide or disable buttons. Return: CommandState.Hidden to hide the button CommandState.Disabled to disable the button CommandState.Enabled to enable the button An example is shown below: public class MyCommand: Command { public override void Execute(Com...
Enable Content Editor button depending on template type I'm building a custom content editor button which will issue a command passing the ID of the selected item. Is there a way to enable/disable my button based on the template of the selected item. I want my command to only be run-able for items of a specific templa...
The following setup may take some effort, but it will give you proper status codes, as well as "keeping" the requested URL, avoiding superfluous requests between Sitecore and IIS, and allow other processors and modules in your solution to seamlessly return a 404 page if required. It's been my experience that without th...
How do you setup a 404 and 500 error page for missing files and media items? When navigating to a url such as www.website.com/missing.pdf and www.website.com/-/media/missing.pdf you will either receive the IIS 404 Server Error message or a Sitecore document not found page. What is a solid approach to handling these...
From the vanilla instance it should be easy to package up the Roles you are missing and then just install that package on your client instance. I have had to do that before. Packaging roles is nice and simple.
Roles are missing from Role Manager. How would I restore the roles for the newer version? My client has fairly recently upgraded their Sitecore from 7.2 to 8.1 Update 3. They are using EXM. We realized today that many of the newer Sitecore 8 roles are missing from Role Manager (which is kept in the Core database as pa...
Pre Sitecore 8.1 (which splits out the Sitecore node into /App_Config/Sitecore.config) - I generally create my own Sitecore.config and patch that into the web.config in the same way as the connection strings is done. Then yes, I just have the resulting web.config from my Sitecore installation in the web project. With ...
What is the best practice for managing Web.config changes in a solution? To my knowledge, it is considered a best practice not to include any of Sitecore's out-of-the-box configuration files into Visual Studio web projects. The reason being, if you handle all configuration changes as custom patch files (rather than di...
It has been determined that List Manager in Sitecore 8.1 is not as efficient as it could be. Sitecore Support KB Reference Number 431777 assists with List Manager issues. With this installed, List Manager seems to function better, albeit still not as fast. Instead, the answer from Sitecore Support is that List Manager...
Is there anyway to improve the speed that List Manager builds a list? In Sitecore 8.X, the List Manager is the primary tool used to import contacts and create audience lists for Sitecore. This is a dependency in EXM as well for creating message dispatches against a List Manager list. When a list is created, it goes t...
You'll want to make sure that you update all your projects to .NET 4.5.2+ in the Project Properties Screen. You'll need to do this for every project in the solution. You will also want to make sure the VS Extention for Microsoft Practices is updated. Also, do not use the SOLR Support Packages DLL. SOLR is now nativel...
Microsoft.Practices.ServiceLocation assembly not loading I'm upgrading my Sitecore 8.1 Visual Studio project to use Sitecore 8.2, and I've made quite a bit of progress. I've switched to SOLR, updated Glass Mapper, and replaced out my DLL references to use the Sitecore supplied NuGet package manager. The issue that I'v...
When adding a new project, simply create the project "code", and then rename the project and namespace to your preferred name. Check out the following workshop video: https://youtu.be/4lC-SdYh4Xg?list=PL1jJVFm_lGnz0XzXU5uNJSgTGMxNFsOky The Yeoman generators are great for setting up additional parts like the .config,...
Changing the Helix file system folder structure Looking at Sitecore Habitat, each Visual Studio project is in a folder named 'code'. In Visual Studio, by default this folder is named the same as the project. I can rename this folder, but I have to jump through some hoops (remove the project from the solution, rename t...
When Sitecore gets reconfigured to use another container; will that container also be used to resolve these entries? It depends on how that other container gets configured, exactly. If you use the approach of patching the <serviceProviderBuilder>, then the container gets replaced completely and there's only one D...
Should I reference Microsoft.Extensions.DependencyInjection in modules I create for Sitecore 8.2+? So I'm in the process of upgrading various modules to Sitecore 8.2. Among other things this involves getting rid of IoC container project references and getting on board with the Sitecore one. And herein lies my questio...
Apparently the fact that we were using a custom index was an important factor after all. Sitecore Support gave us a solution: It seems that if you have a custom index with its own configuration the language is stored in the index in a short format. We had to include the _language field as defined in the standard conf...
Lucene _language field TOKENIZED - how do I search on language? In our Sitecore site we have a few 'English' languages: en en-GB en-US We wanted to do a search using the Lucene index (a custom one, but that doesn't actually matter) and included the language in it to get only results for the current language. But w...
As far as I remember, Sitecore 8 support for Sheer has been dropped in favour of SPEAK. Here you can find more information on how to convert a button from Sheer to SPEAK. In essence you have to use JavaScript for that and create a function according to the template below: define(["sitecore"], function (Sitecore) { ...
How do I display an error dialog from content editor command? How do I show an error style dialog (i.e. with red error logo and the expand text) from a content editor command? I've tried to use SheerResponse.ShowError(). The content editor greys out like it does for regular modals / dialogs, but no error message appe...
Root cause was - Item existed in EN version and when trying to preview in other language it should fallback to EN. Now twist here was EN version had publishing restrictions so effectively item didn't existed in any language versions which somehow gives error, from Item-level Language Fallback module, in page when tryin...
Item Language Fallback doesn't work for Sitecore query This is for Sitecore 7.5 update-2 version. We are using Item-level Language Fallback and everything works fine except this piece gives error every time except when in Page Editor mode. item.Axes.SelectSingleItem('ancestor::*[@@templateid='GUID']//*[@@templateid=...
This should give you what you want: @using (Html.Glass().BeginRenderLink(Model, m => m.MyLinkField, null, true) { @Html.Glass().RenderImage(Model, m => m.MyImageField, null, true) }
Editable Sitecore fields with Glass Folks I'm trying to do something basic here which is have a general link and an image field as editable in experience editor on my view using Glass. my end goal is to have two editable fields which are rendered as: <a><img></img><a> I am trying to do something like this but th...
It usually means that a Url for a media asset is missing the Hash query string parameter when being called. This was introduced in v7.5. It attempts to fix an image resize vunerability where you could potentially fill a disk with different image sizes. If you use a FieldRenderer you will get a valid url with the Hash...
MediaRequestProtection: An invalid/missing hash value was encountered My Sitecore error logs contain messages such as: ERROR MediaRequestProtection: An invalid/missing hash value was encountered. The expected hash value... What would be causing this? This is only for Sitecore 8 and newer. Does it have anything...
SIM doesn't perform the post-install steps (running the SQL script, updating the web.config for captcha, etc...). It does "complete", for all intents and purposes, but SIM gets stuck on the placeholder selection dialog at the end of the installation. But apart from that, everything is installed as it should be.
Installing WFFM with SIM - post-install steps When installing the WFFM module with SIM, does it perform the post-install steps for you, like running the SQL script against the reporting database or updating the web.config for the captcha controls? I noticed when I tried adding that module to a SIM install that the ...
I have implemented several search based sites on top of the Lucene provider, and for me the system is consistent and reliable. When I have had that sort of problems with the index in the past it was due to two reasons: The scope of my SearchContent: I was reusing it too much, meaning my results were not updated, even...
Lucene index corruption I've had a serious problem with several clients while utilising a Lucene search index where anomalies like content missing that should be there or duplicate content (more than one document of the same content item that both have the islatest flag). In many cases an index rebuild will fix it, b...
You can set this in the web.config. In your membership section. You can set a password strength regular expression. <add name="sql" type="System.Web.Security.SqlMembershipProvider" connectionStringName="core" applicationName="sitecore" minRequiredPasswordLength="8" minRequiredNonalphanumericCharac...
How do I set password complexity? I need to change the password complexity requirements for authors to meet corporate standards of a password being: Minium of 8 characters Contain at least one numeral Contain at least one symbol
Sitecore supports two ways to render the Content Editor. Standard Sitecore Render Themed XML Skin Rendering The pipeline you want to focus on is <renderContentEditor>. You'll find the following: For the purpose of this answer, I'll focus on how to override the Standard Content Editor. I would probably advoc...
How do I get my section icons in the Content Editor to show again? It used to be, that next to the collapsible sections in the Content Editor tab; the section icon would display on the tab. This made it very easy for me to identify the section I was looking for. To clarify; this is where I mean: In recent Sitecore...
It's a difficult one; a question I've considered many times over in the years I've been working with Sitecore. I can start with some numbers. I've done perhaps 30 or so projects that involved data integration of some kind. 29 of which, I ended up importing the data. I've only ever done 1 project where I've implemented...
What are some appropriate uses for Sitecore Data Providers? Data Providers are difficult to develop, given the performance and data mapping challenges they can present. But they are powerful when done correctly: Allowing real-time integration with external systems Present as Sitecore items that can be used for linki...
If it's slow for only the first insertion of a specific component, but subsequent insertions of the same component are relatively fast, then you may benefit from tuning the prefetch cache. Here's what the Sitecore manual states (source - Sitecore 6.6 manual): The following sample demonstrates the XML structure for...
Sitecore Experience Editor Slow on Servers? Does anyone have any ideas why Experience Editor would take 5-6 seconds to display a component I add when running on development or staging servers vs less than 2 seconds when running Sitecore and the DBs locally? I know there is likely some latency between the CD and DB ser...
The easiest solution is probably to find and replace characters rather than parse all of the html. Try this: # Home Item $rootId = "{110D559F-DEA5-42EA-9C1C-8A5DF7E70EF9}" # Get only the immediate children $items = @((Get-ChildItem -Path "master:" -ID $rootId)) foreach($item in $items) { $html = $item.Text if...
How do I parse a Rich Text in PowerShell in order to replace elements? I have a requirement to read each rich text field and then edit the content with unordered lists rather than ordered.
I think this URL speaks to your issue: https://kb.sitecore.net/articles/404548 Among the other suggestions there, try to reload the perf counters: Start an administrator command prompt. Run unlodctr .NETFramework. Run lodctr %WINDIR%\Microsoft.NET\Framework\\CORPerfMonSymbols.ini where is the directory of the .NET...
WARN Could not register counter in HealthMonitor warnings in logs I'm seeing a ton of these messages in my logs all the time. How can I clear them up? Heartbeat 13:07:35 WARN Could not register counter in HealthMonitor. Category: .NET CLR Memory, Name: # Bytes in all Heaps, Instance: , InstanceType: CLR ...
Please, verify that your attribute "stored" is set to true: <field name="_path" type="string" indexed="true" stored="true" multiValued="true" /> I had the behavior you mentioned when the stored attribute was set to false. Check you have that value set on all schemas
SOLR schema is Invalid? I have been tweaking my SOLR 5.4 schema and I have noticed this behavior: If I have _path defined in my schema.xml, I do not see _path_sm (or _path) in my raw SOLR index. However, if I remove the _path definition from my schema.xml, then I correctly see _path_sm in my index. The offending fi...
The problem with the simple injector container is that they do not provide a conforming container option. They don't like it. So to replace it with Simple Injector requires a bit more effort. In this post Habitat DI with Simple Injector - I explained how to use SI in a conforming way to register your dependencies for ...
SimpleInjector as default DI in Sitecore 8.2 I read this post today about replacing Sitecores 8.2 default DI (https://medium.com/@structuredcode/replacing-the-default-di-container-in-sitecore-8-2-4e65d4956c99), but the example is for Autofac. We use SimpleInjector, but I'm sure not how to do this for SimpleInjector; d...
Source: https://stackoverflow.com/questions/33235368/sitecore-current-contact-is-locked-for-identification Why this happens Normally, you will see this error when you forget to set Analytics.ClusterName in the configuration file Sitecore.Analytics.Tracking.config. This becomes a problem because in the beginning of ev...
Contact is locked by another operation I'm having an issue identifying xDB contacts... I'm trying to call the Identify() method in my controller action, but I see this error in the logs: Exception: System.InvalidOperationException Message: A contact is locked by another operation. What am I doing wrong? EDIT...
It turns out there were 2 issues I was having: Because I was customizing the core names I needed to include a node for sitecore_analytics_index. Based on this blog post I had left the node out thinking it wasn't needed. Patch config order. My include file was getting patched too soon so the correct core names were no...
Sitecore.ContentSearch.SolrProvider.SwitchOnRebuildSolrSearchIndex. No matching constructor was found I am trying to configure Solr for Sitecore 8.2. Solr is running and I have cores set up for each index and secondary cores set up for rebuilding. I'm not using the Solr support package. I am getting the following err...
So we got to the bottom of this. It was due to a custom media file pipeline in the end. What was confusing was that it was hard to track down/replicate due to the media cache getting in the way. In the end we needed to add some code to check the file types and skip our pipeline to get it to work. All the above commen...
PDF Downloads 0 Bytes We have an issue where all images from the media library display fine. But PDFs stored in the media library download with 0 bytes. We've tracked this down to an issue somewhere in the Multisites configuration as with a single site the PDF downloads without any issues. However with multiples site...
The accepted answer is valid for previous version of Sitecore, but it does not reset the password salt and doesn't in fact reset the password to 'b'. In order to do this, you need the following script (which also will unlock the admin user if locked): UPDATE [aspnet_Membership] SET [Password]='qOvF8m8F2IcW...
Is there a way to reset Sitecore admin password from database level? I forgot my Sitecore admin password and was thinking a way to reset from database level. Is there a SQL query to reset Sitecore admin password ?
Yes. But it can potentially involve a lot of steps, depending on how complex your solution is. I'll outline the headlines. Set up a new database to act as "web" for this site; e.g. approval_web Configure this database in your <databases> section Create a Publishing Target for your approval site Map up a new <site> e...
Trial publish to an alternate site Our content authors want to do a trial publish before making all their content live; part of their approval process is examining how the layouts pull in all the other 3rd party content etc. Could we setup a parallel site to the "real" site somehow, and allow people to push content t...
If you have direct access to the database, you can run the following from SQL Management Studio: UPDATE aspnet_Membership SET IsLockedOut = 0, FailedPasswordAttemptCount = 0 WHERE UserId IN (SELECT UserId FROM aspnet_Users WHERE UserName = 'sitecore\Admin') Run this from the Core database.
How to unlock the Sitecore admin user account? I know you can unlock normal Sitecore users from user manager by login in to Sitecore backend, as admin user. Is there any way to unlock Sitecore admin user, when the user account gets locked?