output
stringlengths
34
25.7k
instruction
stringlengths
81
31k
input
stringclasses
1 value
The fields are being indexed, but they are not all marked as storageType="YES" in the default Lucene configuration. This means that the fields will be tokenized in the index, but not stored, or visible in Luke. Note that they are still searchable even tho they are not stored. If you want to be able to see the values in Luke, you will need to change the storageType to "YES" in the raw:AddFieldByFieldTypeName section. Example below: <fieldTypes hint="raw:AddFieldByFieldTypeName"> <fieldType fieldTypeName="attachment" storageType="YES" indexType="TOKENIZED" vectorType="NO" boost="1f" type="System.String" settingType="Sitecore.ContentSearch.LuceneProvider.LuceneSearchFieldConfiguration, Sitecore.ContentSearch.LuceneProvider" /> <!-- others removed for brevity --> </fieldTypes> </fieldMap> Note: Doing this will dramatically increase the size of your index and could potentially affect performance.
Fields Not Being Indexed in Lucene I'm working with Sitecore 8.1. I have <indexAllFields>true</indexAllFields> in the <documentOptions> node of the DefaultIndexConfiguration.config file. When I open the index up in Luke and navigate to a document that I expect certain fields for, those fields are not present. It seems that only some base Sitecore fields are being stored, none of the template-specific ones. I tried adding <indexAllFields>true</indexAllFields> to the root of <defaultLuceneIndexConfiguration> as well, as I know that's the location it was in for previous versions of Sitecore. That didn't help either. I'm specifically looking in sitecore_master_index right now.
This issue has been fixed in Sitecore 7.2 update 6 and Sitecore 8.1 Update 2. The support issue that contains a hotfix is 452241. You can request the fix from Sitecore Support. Or alternatively, you can follow the instructions below. To fix the issue in Sitecore 8.1 (pre Update 2): 1) Download the hotfix here: https://www.dropbox.com/s/l36zqhwjtahl4q2/Sitecore.Support.452241.dll?dl=0 2) Put Sitecore.Support.452241.dll into the bin folder of your solution. 3) Replace one line in \sitecore\shell\Applications\Content Manager\Galleries\Links\Gallery Links.xml from: <CodeBeside Type="Sitecore.Shell.Applications.ContentManager.Galleries.Links.GalleryLinksForm,Sitecore.Client"/> To: <CodeBeside Type="Sitecore.Support.Shell.Applications.ContentManager.Galleries.Links.GalleryLinksForm,Sitecore.Support.452241"/>
Links menu item Throws Server 500 error I am trying to view items linked to a template in the master database but nothing is ever shown. Looking at the Request / Response in developer tools gives the following stacktrace [ArgumentNullException: Value cannot be null. Parameter name: ownerItem] Sitecore.Diagnostics.Assert.ArgumentNotNull(Object argument, String argumentName) +63 Sitecore.Data.Fields.Field..ctor(ID fieldID, Item ownerItem) +113 Sitecore.Shell.Applications.ContentManager.Galleries.Links.GalleryLinksForm.GetLinkTooltip(Item reference, ItemLink link) +314 Sitecore.Shell.Applications.ContentManager.Galleries.Links.GalleryLinksForm.RenderReferences(StringBuilder result, List`1 references) +404 Sitecore.Shell.Applications.ContentManager.Galleries.Links.GalleryLinksForm.OnLoad(EventArgs e) +782 [TargetInvocationException: Exception has been thrown by the target of an invocation.] System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) +0 System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) +128 System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +146 Sitecore.Reflection.ReflectionUtil.InvokeMethod(MethodInfo method, Object[] parameters, Object obj) +89 Sitecore.Web.UI.Sheer.ClientPage.OnLoad(EventArgs e) +594 System.Web.UI.Control.LoadRecursive() +68 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4498 Does anyone know why the owner item would be null as I suspect it should actually be the template or am I way off ? Edit: the request is : http://sitecoredev/sitecore/shell/default.aspx?xmlcontrol=Gallery.Links&amp;id=%7BF8F7723E-B13E-45D5-8C5A-DD39A588DEC8%7D&amp;la=en&amp;vs=1&amp;db=master&amp;sc_content=master&amp;ShowEditor=1&amp;Ribbon.RenderTabs=true and the id param is the template id.
You can't do that yourself. Contact one of the administrators (e.g. Mark van Aalst) to get you through that process.
How do I change the email address used in my Sitecore Community profiles? I need to change the email address I use to log into SDN, SPN, http://support.sitecore.net, dev.sitecore.net, and the rest of the community sites. How do I do this?
There are two ways to register goals from JavaScript that I am aware of: Federated Experience Manager Sitecore FXM allows you to make visits and trigger events from external websites. There's an FXM feature (that is not commonly used), allowing you to combine simultaneous site visits from the same browser into a single interaction. Visits will be combined even if one visit was on your Sitecore website, and the other on an external FXM-powered website. You should enable this feature with the setting FXM.ShareSessionsWhenPossible located in Sitecore.FXM.config. Since your "external" site will actually be your Sitecore instance, it will be hosted on the same domain name, and hence, all FXM API calls will be treated as the same logical visit. In other words, you shouldn't be worried about this compatibility table. Once you set up FXM, you can record goals using the following FXM code: SCBeacon.trackGoal(“Goal name”); You can find more API details on this official documentation page: https://doc.sitecore.net/sitecore_experience_platform/digital_marketing/federated_experience_manager/configuring/fxm_javascript_api Custom web endpoint If using FXM wouldn't work for you, then you should use the server-side goal registration API. You will need to expose it as a web service endpoint (WebAPI, MVC, .ashx, whatever suits you best). Here's the proper way to register a goal server-side: if (Sitecore.Analytics.Tracker.IsActive) { if (Sitecore.Analytics.Tracker.Current.CurrentPage != null) { var goalId = new Sitecore.Data.ID("{INSERT-GOAL-ID-HERE}"); Sitecore.Analytics.Data.Items.PageEventItem goalToTrigger = Sitecore.Analytics.Tracker.DefinitionItems.PageEvents[goalId]; if (goalToTrigger != null) { Sitecore.Analytics.Model.PageEventData eventData = Sitecore.Analytics.Tracker.Current.CurrentPage.Register(goalToTrigger); } else { Sitecore.Diagnostics.Log.Error("Goal with ID " + goalId + " does not exist", this); } } else { Sitecore.Diagnostics.Log.Error("Tracker.Current.CurrentPage is null", this); } } else { Sitecore.Diagnostics.Log.Warn("The tracker is not active. Unable to register the goal.", this); }
Can I register an event or goal through an API from Javascript? I have found that I can assign a goal or a page event to get triggered when a user hits a given page. So, we have a thank you page a user is redirected to after submitting a form and that successfully triggers our goal. However, we now have a new requirement to do this without the page redirect... Is there a way I can trigger this goal through some standard API or through JavaScript directly?
This looks like it's part of the Device Detection feature within the Sitecore.CES configuration. It's fair that you would want device detection yet not have the GeoIP feature of it enabled. Have you tried renaming the following two configuration files to disable them and see if that works? App_Config/Include/CES/Sitecore.CES.GeoIp.config App_Config/Include/CES/Sitecore.CES.GeoIp.LegacyLocation.config If you don't want device detection at all, it can be changed by patching the following setting in Sitecore.CES.DeviceDetection.config: <setting name="DeviceDetection.Enabled" value="true" />
GeoIP-related error in my log files, but GeoIP not enabled I have the following error showing up in my log file: > ManagedPoolThread #8 16:51:28 WARN Authentication on CES Discovery service failed. Exception: System.Net.WebException Message: The remote server returned an error: (403) Forbidden. Source: System at System.Net.HttpWebRequest.GetResponse() at Sitecore.CES.Client.WebClient.ExecuteRequest(String requestUri) at Sitecore.CES.Client.ResourceConnector`1.Request(String endpoint, Object[] parameters) at Sitecore.CES.Discovery.EndpointSource.GetEndpoint(String serviceName) Little googling shows that it's somehow related to GeoIP lookup. We're not using any GeoIP lookup functionality though. Is there something I'm missing? Is there a config setting I need to disable that is ON by default and I just don't know it? Thanks in advance!
Turns out that this came down to an issue with missing configuration files. I compared my instance against a default installation and noticed the discrepancy. I was missing Sitecore.Marketing.Search.config Thanks for your comments
Campaign Creator loading problem I'm researching the Campaign Creator functionality introduced in Sitecore 8.1 and have been able to successfully create campaigns and associate with content items. The issue I'm experiencing is that the campaign creator seems to endlessly load on access once a campaign has been created, thus preventing me from being able to edit the campaign I've just created. Has anyone made use of the Campaign Creator yet who could shine light on my problem ? I'm receiving the following error in the console: Failed to load resource: the server responded with a status of 500 (Internal Server Error) The request is hitting /sitecore/api/ssc/CampaignManagement/Campaign?pageSize=10&amp;pa‌​geIndex=0&amp;payLoad=fu‌​ll&amp;language=en&amp;name=‌​&amp;startDate=&amp;endDate=‌​&amp;classifications=&amp;sc‌​_lang=en which is responding with a JSON string of: {&quot;Message&quot;:&quot;An error has occurred.&quot;} Requesting that URL directly results in a 403 (Forbidden) response. Do I need to do something to allow Sitecore to communicate with it's own API?
We have built responsive forms using WFFM and it's certainly one that needs a little thinking about in advance. WFFM isn't the most flexible to start with so always try and make sure your forms are designed to be single column. Also try and avoid dependencies between fields as this can quickly descend into nightmare territory. If you make use of MVC, you can override the views used for individual fields which makes it much easier to write your markup, and gives more scope for jumping through the hoops that WFFM inevitably throws at you. Some useful information on implementation of WFFM and MVC on the Brainjocks blog http://jockstothecore.com/wffm-mvc-implementation-tips/
Has anyone made WFFM forms use responsive design? We are looking to use wffm on a responsive site and need to make wffm forms responsive. We are looking for advice or tips on how to go about this or any issues you have had regarding this.
In Sitecore 7.1-7.5 there is a configuration file called Sitecore.Speak.config in the include folder. In that file find the following line: <override xmlControl="Sitecore.Shell.Applications.Media.MediaBrowser" with="/sitecore/client/Sitecore/Common/Dialogs/SelectMediaDialog" /> And replace it with this <override xmlControl="Sitecore.Shell.Applications.Media.MediaBrowser" with="/sitecore/client/Sitecore/Common/Dialogs/SelectMediaViaTreeDialog" /> In Sitecore 8+, this particular configuration has been moved to a file called Sitecore.Speak.Applications.config For more information see http://ggullentops.blogspot.co.uk/2014/04/configure-media-browser-default-view.html
How to default the media browser to tree view This is a really minor issue. But is it possible to have the "Select Media" browser default to the tree view as opposed to list view? I imagine there would be a config setting somewhere. I just feel it would create better interaction and would also be one less click for most of our users.
Ensure that the component (either the sublayout, view rendering item or the controller rendering item) has it's "editable" checkbox checked.
Component not showing as an option to add to a placeholder? All my other components display as options to add when I click on my main placeholder in Experience Editor. However one component is not shown in the list and I can't see why. I've added it to the main placeholder placeholder settings in: /sitecore/layout/Placeholder Settings Am I missing something here? I'm running Sitecore 8.1 update 2.
From what I remember if you perform a full index rebuild from the Control Panel, index files will be removed. You don't need to do this manually. And yes, sometimes indexes may become corrupted for multiple reason. Like network connectivity issues or application restart. Rebuilding the whole index may be the easiest option in some cases.
Should indexes folder in data folder be removed every now and then? We had some issue with Lucene not indexing properly. Usually with the removal of the indexes folder within data folder and rebuilding the indexes through Control Panel's Indexing Manager helps; however, do people generally remove the indexes folder and rebuild indexes manually? What will be the best practice to help regulate performance of Lucene and indexing. https://codebuildplay.wordpress.com/2014/04/08/lucene-merge-thread-error-unhandles-exception-detected-the-asp-net-worker-process-will-be-terminated/
There is no one good answer for your question. I remember we had similar issue few years ago and at that time the answer from one of the Sitecore Solr experts was to start with defaults and observe. If you encounter any memory issues, double what you assigned. If you have problem again, repeat the step. There are drawbacks of assigning to much memory so don't go for maximum what your machine has. Remember that in some scenarios you will have to use 64bit java to be able to assign enough memory. And your question about what Sitecore does - hard to tell. My guess would be content of media items. In some scenarios Sitecore keeps separate document with all the content of the document for every single language version you have in your solution.
How much memory does the JVM for Solr need? My website went down last night and as we were looking through the log files on one of the CD instances we found this error: > 6684 23:20:21 ERROR <?xml version="1.0" encoding="UTF-8"?> <response> > <lst name="error"><str name="msg">java.lang.OutOfMemoryError: Java > heap space</str><str name="trace">java.lang.RuntimeException: > java.lang.OutOfMemoryError: Java heap space at > org.apache.solr.servlet.HttpSolrCall.sendError(HttpSolrCall.java:611) > at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:472) > at > org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:223) > at > org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:181) > at > org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) > at > org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) > at > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) > at > org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577) > at > org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223) > at > org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) > at > org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) > at > org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) > at > org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) > at > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) > at > org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215) > at > org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110) > at > org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) > at org.eclipse.jetty.server.Server.handle(Server.java:499) at > org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) at > org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) > at > org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) > at > org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) > at > org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) > at java.lang.Thread.run(Unknown Source) Caused by: > java.lang.OutOfMemoryError: Java heap space at > java.lang.Class.getEnclosingMethod0(Native Method) at > java.lang.Class.getEnclosingMethodInfo(Unknown Source) at > java.lang.Class.getEnclosingClass(Unknown Source) at > java.lang.Class.getSimpleBinaryName(Unknown Source) at > java.lang.Class.getSimpleName(Unknown Source) at > org.apache.solr.request.SolrQueryRequestBase.toString(SolrQueryRequestBase.java:170) > at > org.apache.solr.search.stats.LocalStatsCache.get(LocalStatsCache.java:42) > at > org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:372) > at > org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:273) > at > org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:156) > at org.apache.solr.core.SolrCore.execute(SolrCore.java:2073) at > org.apache.solr.servlet.HttpSolrCall.execute(HttpSolrCall.java:658) > at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:457) > at > org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:223) > at > org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:181) > at > org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) > at > org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) > at > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) > at > org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577) > at > org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223) > at > org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) > at > org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) > at > org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) > at > org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) > at > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) > at > org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215) > at > org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110) > at > org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) > at org.eclipse.jetty.server.Server.handle(Server.java:499) at > org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) at > org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) > at > org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) > </str><int name="code">500</int></lst> </response> In looking at the Solr JVM, we noticed that it defaults to a maximum memory of 512 Mb. This does not appear to be enough. We bumped it up to 1 Gig, and that brought up our website and we are not getting any errors in the Solr logs. So what kind of memory footprint are people giving to Solr? What is Sitecore doing that is filling up that much memory?
The question update is your answer. That's standard behaviour of Sitecore. You should also see red squares on the right top. There you can see all invalid fields as squares. It is not really visible but it is there... :) Update In Sitecore 8.2 update 1 it is fixed and they show you the validator bar for all invalid fields.
Validator bar not appearing for general link field I am working with Sitecore 8.1 and I am having a strange issue. I have a General Link field called 'Login Link' on which I am trying set required field validation. I have selected 'Required' for all the validation rules section in the template for that field such as : Quick Action Bar Validate Button Validator Bar Workflow Screenshot from validator bar section is given below: However, when I go to the item that uses this template, I do not see Validator Bar for the Login Link field when the value is blank. Since I have Required selected in validator bar, I was expecting to see a red validator bar if the item fails validation. However, I do not see the validator bar when the item fails the validation. It does show up for the other field which is a rich text field. Am I missing any step in this process? Please let me know! Thanks, Akshay UPDATE - 10/06/16 I did a little more digging into it and it turns out that only the first item that fails validation was getting the validator bar. When I moved my Login Link field to be the first item in my template, it did give me a validator bar. Please see the screenshot below: Hope this helps!
Controller: public class RotatorController : SitecoreController { public ActionResult Index() { var dataSourceId = RenderingContext.CurrentOrNull.Rendering.DataSource; var dataSource = Sitecore.Context.Database.GetItem(dataSourceId); var viewModel = new RotatorViewModel { RotatorItems = dataSource.Children }; return View(viewModel); } } View Model: public class RotatorViewModel { public IEnumerable<Item> RotatorItems { get; set; } } View: @model RotatorViewModel <h1>This is a rotator!</h1> @foreach (var item in Model.RotatorItems) { <h2>@item.Fields["Title"]</h2> }
Accessing the Data Source of a Control I have a control property with a data source pointing to a folder with items with fields. Is there a way to loop through the children of the item in the data source and display them on my view? In my view I have: @using Sitecore.Mvc.Presentation @using Sitecore.Mvc @model RenderingModel In my controller I have: public ActionResult Index() { var renderingModel = new Sitecore.Mvc.Presentation.RenderingModel(); var myTitle = renderingModel.PageItem.Fields["Title"].Value; var item = Sitecore.Mvc.Presentation.RenderingContext.Current.Rendering.Item; var itemPageContext = Sitecore.Mvc.Presentation.RenderingContext.Current.PageContext.Item; return View(); }
As I recall, a client from a while back wanted to have more content authors than they wanted to pay for content authoring licenses. (We're talking like 200+ authors). So, they contracted the company I was working for to bulid a completely custom authoring app that allowed this to happen without having to login as Sitecore users. So, as it stands to reason, I would say if you're building something that utilizes the ItemWeb API, and the users do not have to be logged into Sitecore as sitecore domain users, then you're probably safe. However, as a Sitecore Partner I would yield to asking your Sitecore Inside Sales Account Manager for clarity. EDIT: That's also based on the server instance licensing model. Consumption based licensing is based on production CD visits, not users.
Does Sitecore licensing affect API calls? As I understand it, your Sitecore license limits how many content authors can be logged into Sitecore concurrently. If I were to write a web application that uses the Sitecore ItemService API to allow users on our intranet to manage data in Sitecore (e.g., user profile or product details), would those API calls count against the content author limit in the license? For example, if my license allows a maximum of four content authors to be logged in simultaneously, would calls from the ItemService API be blocked from managing content in Sitecore?
Explaining the error message The error you are getting is not related to the checkbox issue. I believe the error is caused by the fact that your Reporting database is not directly available to your application. You can verify if that is indeed the case by commenting out the following section of the Sitecore.Analytics.config: <observer type="Sitecore.Analytics.Reporting.DefinitionData.Marketing.Observers.SaveDefinitionToRepositoryObserver`1[[Sitecore.Marketing.Definitions.Outcomes.Model.IOutcomeDefinition, Sitecore.Marketing]], Sitecore.Analytics"> <param desc="repositoryName" ref="marketingDefinitions/deploymentManagerTargetRepository" /> </observer> This will stop Sitecore from attempting to save outcomes to the RDB. Ideally, to stop the error from being logged, you should request Sitecore support for the right configuration of the deployment manager repository, since it is different with xDB cloud. Understanding the checkbox issue The checkbox values for both "Ignore Additional Registrations" and "Monetary Value Applicable" are not being saved properly due to a bug in the Sitecore.Marketing.dll. The method ItemOutcomeDefinitionRepository.OutcomeMapper.SetCultureInvariantFields() does not save the checkbox values correctly. It uses MainUtil.BoolToString() to convert boolean values to strings, and that results in the value 'true' being saved to the item database. 'true' is not a recognized value for the Checkbox field type, and hence, the checkboxes remain unchecked after the save. You can fix the values in the database with the following SQL query: UPDATE [VersionedFields] SET Value = '1' WHERE Value = 'true' After you clear item caches using the page /sitecore/admin/cache.aspx, you'll see the checkboxes checked. This is a workaround that you can use for now. Please report this issue to Sitecore support to get a proper fix. Edit: As @eat-sleep-code mentioned in the comments, Sitecore registered this as a bug with reference number 128651. Refer to this number via support to receive a hotfix.
Unable to check 'Ignore Additional Registrations' for any Outcomes I am currently unable to check the 'Ignore Additional Registrations' checkbox for any of the Outcomes in the Marketing Control Panel. The following error is written to the logs when I try to save the change. Event code: 3005 Event message: An unhandled exception has occurred. Event time: 10/5/2016 11:40:56 AM Event time (UTC): 10/5/2016 6:40:56 PM Event ID: 9aa236d1cd4e4eed8bf49754522b3c9d Event sequence: 754 Event occurrence: 1 Event detail code: 0 Application information: Application domain: /LM/W3SVC/1/ROOT-2-131201628730241453 Trust level: Full Application Virtual Path: / Application Path: E:\wwwroot\Sitecore\Website\ Machine name: MD1DEVVEXWEB09 Process information: Process ID: 3996 Process name: w3wp.exe Account name: IIS APPPOOL\SitecoreAppPool Exception information: Exception type: TargetInvocationException Exception message: Exception has been thrown by the target of an invocation. at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at Sitecore.Reflection.ReflectionUtil.InvokeMethod(MethodInfo method, Object[] parameters, Object obj) at Sitecore.Nexus.Pipelines.NexusPipelineApi.Resume(PipelineArgs args, Pipeline pipeline) at Sitecore.Pipelines.Pipeline.Start(PipelineArgs args, Boolean atomic) at Sitecore.Web.UI.Sheer.ClientPage.RunPipelines() at Sitecore.Web.UI.Sheer.ClientPage.OnPreRender(EventArgs e) at Sitecore.Shell.Applications.ContentManager.ContentEditorPage.OnPreRender(EventArgs e) at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) One or more exceptions occurred while processing the subscribers to the 'item:saved' event. at Sitecore.Events.Event.EventSubscribers.RaiseEvent(String eventName, Object[] parameters, EventResult result) at Sitecore.Events.Event.RaiseEvent(String eventName, Object[] parameters) at Sitecore.Events.Event.RaiseItemSaved(Object sender, ItemSavedEventArgs args) at System.EventHandler1.Invoke(Object sender, TEventArgs e) at Sitecore.Data.Engines.EngineCommand2.RaiseEvent[TArgs](EventHandler1 handlers, Func2 argsCreator) at Sitecore.Data.Engines.EngineCommand`2.Execute() at Sitecore.Data.Engines.DataEngine.SaveItem(Item item) at Sitecore.Data.Managers.ItemProvider.SaveItem(Item item) at Sitecore.Data.Items.ItemEditing.AcceptChanges(Boolean updateStatistics, Boolean silent) at Sitecore.Pipelines.Save.Save.Process(SaveArgs args) Request information: Request URL: https://stage.domainremovedforsecurity.com:443/sitecore/shell/Applications/Content Manager/default.aspx?he=Marketing Control Panel&amp;pa=0&amp;ic=People/16x16/megaphone.png&amp;ro={33CFB9CA-F565-4D5B-B88A-7CDFE29A6D71}&amp;mo=templateworkspace Request path: /sitecore/shell/Applications/Content Manager/default.aspx User host address: 172.16.102.103 User: sitecore\admin Is authenticated: True Authentication Type: Thread account name: IIS APPPOOL\SitecoreAppPool Thread information: Thread ID: 93 Thread account name: IIS APPPOOL\SitecoreAppPool Is impersonating: False Stack trace: at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at Sitecore.Reflection.ReflectionUtil.InvokeMethod(MethodInfo method, Object[] parameters, Object obj) at Sitecore.Nexus.Pipelines.NexusPipelineApi.Resume(PipelineArgs args, Pipeline pipeline) at Sitecore.Pipelines.Pipeline.Start(PipelineArgs args, Boolean atomic) at Sitecore.Web.UI.Sheer.ClientPage.RunPipelines() at Sitecore.Web.UI.Sheer.ClientPage.OnPreRender(EventArgs e) at Sitecore.Shell.Applications.ContentManager.ContentEditorPage.OnPreRender(EventArgs e) at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) Custom event details: It seems I can rename the item with no problem, I just can't check the box. I am running Sitecore 8.1 Update 2 and xDB Cloud. Update: This has now been confirmed as a bug by Sitecore (reference number 128651). A hotfix has been created for it.
The index.html actually exists in the zip, but is not visible under the standard Windows Expolorer unzipper for some reason. If you use 7Zip to unzip the the package, you should find all files there. We've addressed the problem and it should be solved in the upcoming release.
Export does not include an index.html file When exporting a site for agencies, the resulting zip file does not contain an index.html. Versions: Sitecore 8.2 (rev. 160729) Sitecore Experience Accelerator 1.0.0 for 8.2 Sitecore PowerShell Extensions-4.1 for Sitecore 8 Settings: Device: Default Exported Content: Whole Site Mode: Agency drop I also tried Author mode. Same problem. Any ideas?
Background The way in which you are using visitor profiles is non-standard, so I will first explain some details about the internals of the feature. Once you've defined a set of profile keys, some pattern cards and profile cards, you would normally assign profile cards to your website pages. Every time a user visits a page that has an associated profile card, Sitecore will go over profile key values of the card and add the non-negative values of profile keys to the user's profile. There are two important conclusions: The max value of user profile values is virtually unlimited and is not related to the max value of the corresponding profile key. Profile values are not supposed to be negative. When a user is matched to a pattern card, the matching process considers the user's profile and all available pattern cards into points in an N-dimensional space, where N is the number of defined profile keys. The profile is translated into a point based on the profile type (Sum, Percentage or Average). Whichever pattern card point has the smallest Euclidean distance to the user profile point, that pattern card becomes the user's new matched pattern that will be used in personalization rules from that point on. Recommendation You are not using Sitecore's profile scoring feature, instead you override the profile to have specific values. Only one profile key will have a value greater than zero—both in the pattern cards and in the visitor profile. Which is why it doesn't really matter what values you use for the non-zero key. I recommend that you put 0 to all profile keys and 1 to the one that you want to be matched to a specific pattern card. This is the simplest and least error-prone solution that will definitely work in your case.
Minimizing and Maximizing Profile Key Values Programmatically Background: One of our clients has contracted us to create a "siloing" feature on their site, using personalization. Basically, a visitor would come to the site and optionally self-identify as a particular type of professional. Each type of professional is associated with a single profile key and pattern card. If a user self-identifies as a particular type of professional, the visitor is scored to the max value of the associated profile key. Should the visitor re-identify as a different type of professional, the old identification is completely cleared out (set to the minimum value) and the new data is scored to the max. Question: This is the first time that I have had to set profile key values to a maximum or minimum. In Sitecore, I have set the maximum to 0 and the minimum to 100 for each of the profile key items that I have created. I know that these items do not control the profile key items that I am scoring in the code, but if in the code I set the scores to float.MinValue and float.MaxValue for minimum and maximum, respectively, will this cause an issue down the line for reporting? Side-note: The client does not intend to do any reporting/analytics based on this "siloing" feature. If they decide to add that in the future, we will add additional personalization events that do not get cleared out to the feature.
I found an older post on Sitecore fieldtypes and the way they are rendered in a blogpost. It's not the complete list, but a starting point: http://www.mtelligent.com/home/2014/8/29/sitecore-field-type-overview-reference.html
List of built-in Sitecore Field Types Sitecore provides a large number of fields out of the box, and while some of them are obvious (Checkbox, Single Line Text, ...) some fields are not obvious by name alone (eg. What is Droplist vs Droplink). Is there a listing for all the field types built into Sitecore, with an example of how they are rendered within the Content Editor?
As has been mentioned. You should do this in your Constructor action and view model. This is an example of how you could do this without and ORM. But really if you are not using an ORM you are making life more difficult for yourself. Have a look at Fortis (my preferred choice) or Glass Mapper (another very good choice). Create your view model properly: public class RotatorItem { public RotatorItem(Item item) { this.Title = new HtmlString(FieldRenderer.Render("Title", item)); this.ItemImage = new HtmlString(FieldRenderer.Render("Item Image", item)); } public IHtmlString Title { get; } public IHtmlString Text { get; } // You can add more fields here public IHtmlString ItemImage { get; } } public class RotatorViewModel { public RotatorViewModel() { this.Items = new List<RotatorItem>(); } public IHtmlString Title { get; set; } public IList<RotatorItem> Items { get; set;} } Now we can populate that in the action: public ActionResult Index() { var dataSourceId = RenderingContext.CurrentOrNull.Rendering.DataSource; var dataSource = Sitecore.Context.Database.GetItem(dataSourceId); var viewModel = new RotatorViewModel { Title = new HtmlString(FieldRenderer.Render("Title", dataSource)), Text = new HtmlString(FieldRenderer.Render("Text", dataSource)) } foreach(var child in dataSource.Children) { viewModel.Items.Add( new RotatorItem(child); ) } return View(viewModel); } Notice that the view model is just a straight POCO - no need to inherit any other rendering model here. Now your razor becomes: @using Sitecore.Mvc.Presentation @using Sitecore.Mvc @model RotatorViewModel @foreach (var item in Model.RotatorItems) { <h2>@item.Title</h2> @item.ItemImage <!-- etc... add other fields here --> } @Model.Title <br /> @Model.Text The only real "Sitecore" bit of this is populating the view model properties with rendered Sitecore fields - the rest is really just basic MVC stuff. Don't try to over think the MVC stuff and let Sitecore get in the way of doing it simply. And don't do any of the above - use an ORM!
Sitecore MVC - Images Inside foreach Loop & RenderingModel for Strongly Typed Views I have a couple follow-up questions for this question: Sitecore MVC - Accessing the Data Source of a Control In the foreach loop, how do I output an image? Since the model for the view is now strongly typed, how can I get the RenderingModel fields using the Html helper syntax? @Html.Sitecore().Field("Title") In my controller I have: public ActionResult Index() { var dataSourceId = RenderingContext.CurrentOrNull.Rendering.DataSource; var dataSource = Sitecore.Context.Database.GetItem(dataSourceId); var viewModel = new RotatorViewModel(); viewModel.RotatorItems = dataSource.Children; viewModel.Initialize(RenderingContext.Current.Rendering); return View(viewModel); } I am trying to inherit RenderingModel: public class RotatorViewModel : RenderingModel { public IEnumerable<Item> RotatorItems { get; set; } public HtmlString Title { get { return new HtmlString(FieldRenderer.Render(this.Item, "Title")); } } public HtmlString Text { get { return new HtmlString(FieldRenderer.Render(this.Item, "Text")); } } } In my view I have: @using Sitecore.Mvc.Presentation @using Sitecore.Mvc @model BentleyBootstrap.Controllers.HomeController.RotatorViewModel @foreach (var item in Model.RotatorItems) { <h2>@item.Fields["Title"]</h2> @item.Fields["Sub Title"] } @Model.Title <br /> @Model.Text
There are a number of steps to take here: as JammyKam mentioned check /siteore/admin/cache.aspx to see what is being stored in the cache also look at /sitecore/admin/stats.aspx also to see what components are cached check your cache settings, i.e do you have Caching.DisableCacheSizeLimits set to true or specific cache settings for templates and also your pre-fetch cache settings :https://reasoncodeexample.com/2013/03/20/sitecore-cache-settings-for-slackers/ check you have event queues enabled (EnableEventQueues) : http://sitecoreblog.patelyogesh.in/2013/07/sitecore-event-queue-scalability-king.html check Your publish:end and publish:end:remote handlers include the Sitecore.Publishing.HtmlCacheClearer class, with all sites included: https://rcchopra.wordpress.com/2013/01/28/sitecore-publishing-cache/ Take a look at the pages using the debug tool: http://practicaltinkering.essertown.com/2015/01/troubleshooting-sitecore-performance.html Look at the cache settings on your renderings on sitecore and on the layout details of pages and see what the 'vary by' settings are set to. Take a look at your page layout code and component/controller code and see if you have output caching enabled or custom caches. This should be a good start to finding out what the issue is.
Content does not show after publishing I have a site running Sitecore 8.0 (Win Forms) with some problems publishing. What steps should be taken to troubleshoot this? The site has problems both on a local development environment and in the Live scaled environment. Symptoms include: Content does not show up unless IIS is recycled. Content disappears that used to show. Primarily (maybe only?) images are affected. Some content shows up after several days. Some content does not show up at all no matter what steps are taken. Steps already taken: Checking that all related content is published such as templates, sublayouts, placeholder settings. Verifying that these exist in the web database. Republishing using Republish everything. Clearing Sitecore caches Reindexing In the case of content that shows up after resetting IIS, I suspect that there is some ASP.Net caching going on that I have not yet been able to find. How could that be confirmed or how could Sitecore be ruled out? What else should be suspected?
This seems like a perfect taks for Sitecore Powershell Extensions First of all I would get a list of template IDs to remove $templateIds = Get-ChildItem /sitecore/templates/you/better/know/where/to/look -Recurse | ? { $_.TemplateName -eq "Template" } Then you can search your other templates for inheritance Get-ChildItem "/sitecore/templates/neverland" - Recurse | ? { $_.TemplateName -eq "Template" } |% { $currentTemplate = $_ $templateIds |% { $currentTemplate."__Base Template" = $currentTemplate."__Base Template" -Replace "$($_.ID)\|", "" $currentTemplate."__Base Template" = $currentTemplate."__Base Template" -Replace "$($_.ID)", "" } } Finally for each of your templates you can go over your content and delete items which are based on it $templateIds |% { $deletingTemplate = $_ Get-ChildItem "/sitecore/content" -Recurse | ? { $_.TemplateName -eq $deletingTemplate.Name } | Remove-Item } This is a rough idea of how this can be done with SPE. You might need to tweak it here or there. Ok, fixed the code a bit. There still might be some small issues but it should moreover be correct. Remember though! Never run untested powershell scrips on production and always make a backup - this code can potentially damage your data!
How to delete data templates? I am trying to delete a large number of data templates - an entire section. However I have some content items that use those data templates and also there seems to be a lot of template inheritance and Standard Values that use these templates. I wish I could just delete the entire section of the content tree. However when I try to delete the entire section I always get a message telling me that I can't delete a certain template because it is in use. Then I have to hunt down all of the individual content items that use that data template. Once I do that then I can move to the next one. It is a very long and manual process. Is there any way to just delete an entire section of data templates and all of the content items that are based on those data templates?
Both options are valid and more of a principal discussion. As the page hasn't ever existed, a 301 redirect (moved permanently) may not be the right option, but from a user perspective, the /about may (or may not) be redirected to most important item under that group. a 404.0 (page not found) may the better option from a principal perspective, as, the page doesn't exist. Users may think that it's a badly build site, as a valid looking url results into a result that wasn't expected. (Is the site broken, do I miss information?). Especially because /about is part of the URL, and people tend to remove parts of the url to navigate through the site (well, I do ;)). I would choose the 301 redirect in this case, for those "group" url's, as they are part of the url's of the subpages. I would use 404 for pages that really don't exist, like /About1, /bla, /huppeldepup edit: as the question got changed as well ;) for this example, using the hero slider content, I would choose for a 404, as it are url's that people shouldn't navigate to.
Is there a recommended approach to handling navigable Items with no layout defined? I have a scenario in a site we're building where there are groups of pages organized into folders for organizational purposes. However, the folders aren't pages themselves. Here's an example: If someone navigates to http://site.com/mypage/components, they will get the typical "layout not found" Sitecore error: Is there a typical or recommended way to handle this? Do you use 301-redirects to redirect requests for site.com/mypage/components to another page or do you override a processor to throw a 404 error/page?
This is possible with Sitecore 8.2, since the GetChildren and Add methods became virtual with this version. (You could create an NSubstitute Sitecore 8.1 item, but NSubstiute would not be able to interact with its methods, so there would not be any point in doing so.) To create a Subsitute item, you need to: Create an item ID: var itemId = ID.NewID; Create an item definition: var definition = new ItemDefinition(itemId, string.Empty, ID.Null, ID.Null); Create an item data object: var data = new ItemData( definition, Language.Current, Sitecore.Data.Version.First, new FieldList()); Create a substitute database, which is easy in Sitecore 8.2 because the class is now abstract: Database db = Substitute.For<Database>(); Create the substitute item, passing in the itemID, ItemData object, and substitute database as parameters: Item item = Substitute.For<Item>(itemId, data, db); If the code under test interacts with the Paths property, you will need to set this: item.Paths.Returns(Substitute.For<ItemPath>(item)); Now that you have a Substitute item, you can use the Returns and Received methods as normal with NSubstitute: public class ProcessorTests { [Fact] public void Processor_ItemsFolderMissing_CreatesIt() { var sut = new DataSourceFolderCreator(); Item renderingItem = MakeSubstituteItem(); renderingItem.SetChildren(new ItemList()); renderingItem.Database.Should().NotBeNull(); var args = new GetRenderingDatasourceArgs(renderingItem, renderingItem.Database); sut.Process(args); renderingItem.Received() .Add("Items", new TemplateID(TemplateIDs.Folder)); } [Fact] public void Processor_ItemsFolderPresent_DoesNotCreateIt() { var sut = new DataSourceFolderCreator(); var folderItem = MakeSubstituteItem(); var renderingItem = MakeSubstituteItem(); folderItem.Name.Returns("Items"); folderItem.TemplateID.Returns(TemplateIDs.Folder); renderingItem.SetChildren(new ItemList { folderItem }); var args = new GetRenderingDatasourceArgs(renderingItem, renderingItem.Database); sut.Process(args); renderingItem.DidNotReceiveWithAnyArgs().Add("", new TemplateID()); } private Item MakeSubstituteItem() { var itemId = ID.NewID; var definition = new ItemDefinition( itemId, string.Empty, ID.Null, ID.Null); var data = new ItemData( definition, Language.Current, Sitecore.Data.Version.First, new FieldList()); var db = Substitute.For<Database>(); var item = Substitute.For<Item>(itemId, data, db); item.Paths.Returns(Substitute.For<ItemPath>(item)); return item; } } public static class ItemExtensions { public static void SetChildren(this Item item, ItemList items = null) { if (items == null) { items = new ItemList(); } item.GetChildren().Returns(new ChildList(item, items)); } }
How do I create an NSubstitute Sitecore item? Is it possible to create a mock Sitecore (using Sitecore 8.2) item using NSubstitute? I would like to write a unit test to cover the following pipeline processor code, which adds a child folder item called "Items" if it does not exist. public void Process(GetRenderingDatasourceArgs args) { var renderingItem = args.RenderingItem; if (!renderingItem.GetChildren().Any(item => item.Name == "Items" &amp;&amp; item.TemplateID == TemplateIDs.Folder)) renderingItem.Add("Items", new TemplateID(TemplateIDs.Folder)); } I would like to write unit tests that cover the following scenarios: When the passed in item does not have a child "Items" folder then one is created. The substitute item should return a child item of the correct type, and should be able to verify that the Add method was not called. When it does have a child "Items" folder another one is not created. The substitute item should not return any children, and should confirm that the Add method was called with the correct parameters.
Based on your question I think you need something that will require a bit more finesse, so here's my attempt - It will only show renderings that have no datasource, but need them function Test-DataSourceRequired { [CmdletBinding()] param([Sitecore.Data.ID]$RenderingId) $rendering = Get-Item master: -ID $RenderingId # if data source location and data source template are empty then it's ok for the rendering to have no data source defined return -not [string]::IsNullOrEmpty($rendering."Datasource Location") -or -not [string]::IsNullOrEmpty($rendering."Datasource Template") } function Test-ContainRenderingsWithoutDataSources { [CmdletBinding()] param( [Parameter(Mandatory=$true, Position=0, ValueFromPipeline=$true)] [Sitecore.Data.Items.Item]$Item) #Test Versioned Layout $BrokenRendering = Get-Rendering -Item $Item -FinalLayout | Where-Object { ($_.Datasource -eq "") -and (Test-DataSourceRequired $_.ItemID) } $BrokenRendering | %{ Write-Host "$($Item.Paths.Path) - '$((Get-Item master: -ID $_.ItemId).Name)' has no datasource" -ForegroundColor Red } } Get-Item -Path master:\content\Home | Test-ContainRenderingsWithoutDataSources In this case I'm checking whether the rendering that we are inspecting (that has no datasource specified) actually requires one. By requires I understand that the rendering has a value in "DataSource Location" and "DataSource Template". that filters out false positives where renderings that don't need datasource would be shown. You can pipe multiple items into the cmdlet as well like: Get-ChildItem -Path master:\content\Home -Recurse | Test-ContainRenderingsWithoutDataSources Sample output:
How to get list of all the renderings that has been configured to use data source We are almost complete with a large project. I am trying to find out which rendering in the page has been configured to use data source using a Powershell script. So that we can run in both UAT and Prod to make sure all rendering data source has been configured properly. Has anyone done this before?
You would have to perform request to the server to check whether your current template meet certain criteria. Request class: using Sitecore.ExperienceEditor.Speak.Server.Contexts; using Sitecore.ExperienceEditor.Speak.Server.Requests; using Sitecore.ExperienceEditor.Speak.Server.Responses; namespace Sitecore.Modules.ExperienceEditor { public class CanExecuteMyCommands : PipelineProcessorRequest<ItemContext> { public override PipelineProcessorResponseValue ProcessRequest() { var currentItem = RequestContext.Item; return new PipelineProcessorResponseValue { Value = currentItem.TemplateName.Equals("Desired") }; } } } In this case I just check whether Template name equals Desired. You can apply your own conditions inside that class. Configuration: <?xml version="1.0"?> <configuration xmlns:patch="http://www.sitecore.net/xmlconfig/"> <sitecore> <sitecore.experienceeditor.speak.requests> <request name="ExperienceEditor.YourNamespace.CanExecuteMyCommands" type="Sitecore.Modules.ExperienceEditor.CanExecuteMyCommands, Sitecore.Modules.ExperienceEditor"/> </sitecore.experienceeditor.speak.requests> </sitecore> </configuration> JS call: canExecute: function (context) { return context.app.canExecute("ExperienceEditor.YourNamespace.CanExecuteMyCommands", context.currentContext); }
How do I construct a reasonable JS implementation of canExecute() for an Experience Editor Button? I am trying to run a field editor for editing some meta data (tagging, description, title, image selection) in Experience editor. My starting point was https://blog.istern.dk/2015/03/02/running-sitecore-field-editor-from-a-speak-command-in-sitecore-experience-editor/, and it seems mostly functional. The last thing I need resolved is a proper implementation of the JS method canExecute(). I figured that I would need to look up the templates of the context item, but so far my searches have yielded little of use. The current JS for my button looks like this define([ "sitecore", "/-/speak/v1/ExperienceEditor/ExperienceEditor.js" ], function (Sitecore, ExperienceEditor) { Sitecore.Commands.LaunchFieldEditor = { canExecute: function (context) { //YOU COULD ADD FUNCTIONALITY HERE TO SEE IF ITEMS HAVE THE CORRECT FIELDS return true; }, execute: function (context) { //THIS IS THE ACCESSKEY ON LINK TAG "A" context.currentContext.argument = context.button.viewModel.$el[0].accessKey; ExperienceEditor.PipelinesUtil.generateRequestProcessor("ExperienceEditor.GenerateFieldEditorUrl", function (response) { var DialogUrl = response.responseValue.value; var dialogFeatures = "dialogHeight: 680px;dialogWidth: 520px;"; ExperienceEditor.Dialogs.showModalDialog(DialogUrl, '', dialogFeatures, null); }).execute(context); } }; }); I have considered rendering the template IDs of the context item into the page content and comparing that to a value stored together with the fields (in accessKey). Such a solution seems a little messy to me, since it would include rendering data into a completely different part of the page. I have considered doing some sort of service that could resolve the problem based on the field names + the id of the context item, but such a thing would need calling async, and that does not seem acceptable for canExecute(). My original script passed field names to the generateRequestProcessor call, by picking them out of the accessKey propery of the rendered button. I ended up passing the required templates around using the same field and a querystring-like syntax. This made checking for the required templates fairly simple serverside. Updated script below. define([ "sitecore", "/-/speak/v1/ExperienceEditor/ExperienceEditor.js" ], function (sitecore, experienceEditor) { sitecore.Commands.LaunchFieldEditor = { canExecute: function (context) { context.currentContext.argument = context.button.viewModel.$el[0].accessKey; return context.app.canExecute("ExperienceEditor.CanExecuteFieldEditor", context.currentContext); }, execute: function (context) { //THIS IS THE ACCESSKEY ON LINK TAG "A" context.currentContext.argument = context.button.viewModel.$el[0].accessKey; experienceEditor.PipelinesUtil.generateRequestProcessor("ExperienceEditor.GenerateFieldEditorUrl", function (response) { var DialogUrl = response.responseValue.value; var dialogFeatures = "dialogHeight: 680px;dialogWidth: 520px;"; experienceEditor.Dialogs.showModalDialog(DialogUrl, '', dialogFeatures, null); }).execute(context); } }; });
There are several things which doesn't work properly anymore. You can disable it in the config. Go to /App_Config/Include/Sitecore.Analytics.config and set Analytics.Enabled to false: <setting name="Analytics.Enabled" value="false" /> You also need to comment out all MongoDB connection stings: <add name="analytics" connectionString="mongodb://localhost/analytics" /> <add name="tracking.live" connectionString="mongodb://localhost/tracking_live" /> <add name="tracking.history" connectionString="mongodb://localhost/tracking_history" /> <add name="tracking.contact" connectionString="mongodb://localhost/tracking_contact" /> <add name="reporting" connectionString="user id=user;password=password;Data Source=(server);Database=Sitecore_Analytics" /> ‌ Source (with additional information): https://kb.sitecore.net/articles/296641 With Sitecore 8.1 there is a new mode called CMS-only mode. You find all information about this here: https://doc.sitecore.net/sitecore_experience_platform/setting_up__maintaining/experience_management/experience_management_an_overview
What happens if i remove Mongo server from a Sitecore 8 site A client wants to cut down on servers and since they do not use the Experience Platform I am wondering if i could just eliminate the Mongo server. There is as of now absolutely no data in the Mongo server. What settings do i need to change to not get flooded with errors when i turn it off? Is this even adviceble?
You shouldn't need to encrypt the ViewState on your CM servers, as the only people using it should be users you are aware of and are authorized to use it. If unauthorized users have access to it, you have other bigger security concerns that you need to look at. That said, as far as I'm aware it won't create any issues, as it should be transparent to Sitecore. I don't believe the Sitecore client does any direct reading of the ViewState that bypasses ASP.NET's API for it (and if it did, that would be asking for problems to occur). You've mentioned you're running multiple Content Delivery servers. I assume these are load balanced, are they sharing the same machineKey? If one isn't specified, then ASP.NET will generate one unique to just that machine and you will have problems if a request is served by one server, but the postback is handled by another. To fix this, you can generate a key and specify it in the machineKey element, making sure it is the same on each of your CD servers.
Can the ViewState be encrypted on the Content Management server? For a webforms website, running on a few content deliveries and a content management server, we got a request from a security audit. The request is to encrypt the viewstate (adding <machineKey validation="AES"/> in the config). We have already done this on the content delivery servers and that is running fine, but I was hoping anyone had experience with this on a Sitecore content management server... Would it give any issues? Also, the content management server already has some network security (don't know the exact details - only accessible on the local network and tunnel I think) so we are actually wondering if it is worth the trouble...
tl;dr: If you are on Sitecore 7.0 or newer, you should pretty much always be using ContentSearch indexes. If you are on Sitecore 6.X, you can only use the older Sitecore.Search.Index indexes. Rebuild Search Indexes This page will show indexes that are listed in the /sitecore/search/configuration/indexes section of the configuration. These indexes typically are of type Sitecore.Search.Index, an older type of search index available in Sitecore 6.x and earlier. This class hasn't changed substantially between Sitecore 6.6 and Sitecore 8.2. The Sitecore 8.2 build of Sitecore.Kernel has a [Obsolete("Must be removed in the next release.")] attribute attached to this class. Do not make any new indexes of this type on any site you think may ever be upgraded to Sitecore 8.2 Update-1 or later. Indexing Manager This page will show indexes that are listed in the /sitecore/contentSearch/configuration/indexes section of the configuration. These indexes will typically be of type Sitecore.ContentSearch.LuceneProvider.LuceneIndex or Sitecore.ContentSearch.SolrProvider.SolrSearchIndex. These are the newer style indexes you should be using. Use indexes of these types for all new indexes on Sitecore 7.0 or newer.
What is the difference between an index and a search index What is the difference between a regular index (e.g. sitecore_master_index) and a "search index"? Why do I see certain indexes under the Indexing Manager in Control Panel, yet different ones under Rebuild Search indexes? How should both of these types of index be used? Could answers bear in mind the different versions of Sitecore and cite any major changes to how these work between these, if known + applicable?
We don't have a single package, but a package for each web project. Every web project has its publishing profile set to Web Deploy Package and the Package location is set to a unique zip filename in a common directory, e.g. ../Target/Feature-Navigation.zip. The build server creates the packages with msbuild: /t:build /p:PublishProfile=Release /p:Configuration=Release /p:DeployOnBuild=true /p:VisualStudioVersion=12.0 /p:IncludeSetAclProviderOnDestination=False Then a PowerShell finds all generated batch files to deploy these packages: Get-ChildItem -Filter *.cmd | ` Foreach-Object { cmd /c $_.FullName /Y /M:target.machine.name /U:UserName /P:Password "-enableRule:DoNotDeleteRule" }
Helix deployment - How to use msdeploy Currently we have a setup where we have a single Sitecore solution (not Helix) and we use msdeploy for deployment. This works great as we have the exact same package that is deployed on all environments which in turn reduces possible issues during deployment. However, we're currently looking at Helix for our future projects and I'm finding it hard to combine the two, because as I see it Helix is very separate (and the Unicorn solution as proposed in Habitat also makes things more complicated). My question now is: does anyone have any experience/documentation on how to build a single msdeploy package out of a Helix(-like) setup? Or does this go against best practices and should we look into other deployment/packaging tools?
In the sitecore/Settings folder, set DeviceDetection.Enabled to true Add the enable Sitecore.CES.DeviceDetection.config file in the (App_Config/Include/CES/) folder
Enabling Sitecore Device Detection When trying to run the following code on my local machine var _deviceCache = new DeviceDetectionCache(); var device = _deviceCache.GetDeviceInformation(Request.UserAgent) I am getting the following exception device detection is disabled at Sitecore.CES.DeviceDetection Most of the articles I found spoke about how Sitecore uses Netbiscuits to detect devices, and how to set goals based on device detection but I still haven't found anything on where to enable to it, and if I can enable it on a local machine. Thanks. Further info : I'm using Sitecore 8.1 (rev. 151207)
Yes, use the glassCache attribute. A value of anything other than false means the cache will be enabled for that site: https://github.com/mikeedwards83/Glass.Mapper/blob/master/Source/Glass.Mapper.Sc/SitecoreService.cs#L116
Can GlassMapper caching be disabled at a site level? Sitecore's HTML caching can be disabled through the cacheHtml parameter on the website's definition. This is handy for a preview site that directly reads from the Master database. Can the same be done for the GlassMapper cache?
This should solve your problem: Sitecore.Context.ClientPage.Modified = true;
Custom field type in Sitecore 8. After completing the command successfully, I'd like to enable the save button I have a custom field type in Sitecore 8. I use the Context.ClientPage.SendMessage to call the contenteditor:save command. This works, but forces the page to reload producing a warning dialogue to pop up. I actually only want the Save button to be enabled, so just need the page to know the state has changed. This is my current code: protected void Run(ClientPipelineArgs args) { Assert.ArgumentNotNull((object) args, "args"); if (args.IsPostBack) { Context.ClientPage.SendMessage(this, "contenteditor:save"); return; } var urlString = new UrlString(args.Parameters["url"]); Context.ClientPage.ClientResponse.ShowModalDialog(urlString.ToString(), "700", "510", "", true); args.WaitForPostBack(); }
The Name Value List (and Name Value Lookup List which also inherits from it) only allows keys containing letters and numbers due to the Validate() method in Sitecore.Shell.Applications.ContentEditor.NameValue: if (!string.IsNullOrEmpty(input) &amp;&amp; !Regex.IsMatch(input, "^\\w*$")) { SheerResponse.Alert(string.Format("The key \"{0}\" is invalid.\n\nA key may only contain letters and numbers.", (object) input)); SheerResponse.SetReturnValue(false); return false; } Whilst the answer from @alan is correct that the raw data is stored in parameters, the field is able to handle special characters and I have created fields that use a guid as the key (which includes dashes and curly braces). You may want to ensure that values are URL encoded just in case though. In any case, there are no settings available to change this behvaiour, you have to create a custom field. Unfortunately the Validate() method is private so it's not just a simple case of overriding, but you could provide a new implementation of ParameterChange() method which is where Validate is called from. protected new void ParameterChange() { ClientPage clientPage = Sitecore.Context.ClientPage; if (clientPage.ClientRequest.Source == StringUtil.GetString(clientPage.ServerProperties[this.ID + "_LastParameterID"]) &amp;&amp; !string.IsNullOrEmpty(clientPage.ClientRequest.Form[clientPage.ClientRequest.Source])) { string str = this.BuildParameterKeyValue(string.Empty, string.Empty); clientPage.ClientResponse.Insert(this.ID, "beforeEnd", str); } NameValueCollection form = (NameValueCollection)null; System.Web.UI.Page page = HttpContext.Current.Handler as System.Web.UI.Page; if (page != null) form = page.Request.Form; if (form == null) /* || !this.Validate(form)) -- removed validation of Key field */ return; clientPage.ClientResponse.SetReturnValue(true); }
Why Sitecore does not allow to use special characters in Name Value List field as a key? I would like to use special characters as a key in a Name Value List field. Any idea why Sitecore doesn't allow this? Is there any nice way to disallow this validation?
The beacon is created by taking a series of scripts and 'bundeling' them together (minifying and caching them). Have a look in App_Config\Include\FXM\Sitecore.FXM.Bundle.config .. this shows all the parts that go into the 'bundeling' process. This is the place you can add or modify any extra scripts you need to be delivered to the client as part of the beacon.
How is the FXM bundle beacon constructed? I am trying to implement FXM for a customer, with the purpose of collecting data from a bunch of WordPress based sites into a single repository. An example of such a site is http://dev.verum.se/test/test1.php The customer has had other people implement the beacon on the page, so how that has been done is beyond my scope. As far as I can tell, the implementation of the beacon is OK, though. Even though the test page above is extremely simplified, I still get script errors from the beacon. As far as I can tell, the beacon JS rendered by the server is broken. The last line of the script looks like a duplicate. I assume that this problem occurs because part of the bundling logic for this script is misconfigured. I have been looking around the config files, but so far, I have failed to find a place that specifies how bundling should be performed. My question: Where are the settings that control the contents of the FXM beacon?
Conditional renderings work fine with MVC. For version 8, you must have Analytics.Enabled set to true so you can get to the personalization section of the presentation. "Global" conditional renderings do not work with MVC, so you need to stick to personalization of the rendering on the items presentation rather than a global rendering rule. Here is how you set a Personalization rule. Edit the items presentation and then edit the Device you need. Most likely the Default one. Select the rendering you want to personalize and click the Personalize button. If that button is not visible, Analytics is disabled: Then you can add a new condition: You can click the edit button to edit the rule for your condition. Add as many variants as you need, you can hide component, change the Datasource etc...
Is it possible to use conditional renderings with Sitecore MVC I have problems using conditional renderings with MVC (on Sitecore 8.0 rev. 150121) I've created a condition and assigned it to the controller rendering but this condition never gets called. From what I see the conditions attached to the renderings are triggered in the insertRenderings pipeline which doesn't seem to be executed when we have an MVC layout. Am I missing something or the conditional renderings are supported only with Web Forms? If so I am wondering is there a graceful way to make it work with MVC
I also ran into this issue when I had an item in Sitecore that had the same path as the item in TDS but a different ID. Look at your Content Tree and see if something is there with the same path and then compare the IDs between the TDS item and the Sitecore item.
Duplicate Sitecore ID's found in files when using TDS I'm currently having some issues with some of my TDS item files, where I get the following error: Duplicate Sitecore ID's found in files sitecore\templates\xxx\Data.item and sitecore\templates\xxx\Data.item TDSProject C:\Program Files (x86)\MSBuild\HedgehogDevelopment\SitecoreProject\v9.0\HedgehogDevelopment.SitecoreProject.targets I am not sure that this actually means, since it's basically telling me that the duplicated ID's are between the same file. Moreover, when I look in the Data.item file on the filesystem, it does not contain any internal ID duplicates, and I've verified that the file does not exist multiple places. Any suggestions on where I should be looking?
My particular issue was certainly unique, but may help someone in the future. We had mistakenly added three database entries on the server when only two exist: web web-preview web-delivery The web entry used the same connection string as the web-preview element. There were only two database targets defined- web-delivery and web-preview. Nonetheless, somehow the duplication confused a portion of the publishing process. I removed all traces of web from the configs on the authoring server and it is now performing as expected.
Sitecore 8: Item Being Skipped During Publish I am having trouble publishing an item. The item is not in a workflow state. Publishing.log: 12448 08:19:11 INFO [Publishing]: Starting to process 26 publishing options 12448 08:19:11 INFO [PublishOptions]: root:{2973AF61-669A-463A-96ED-A42D771787F0}, language:cs-CZ, targets:Web Preview, database:web-preview, mode:SingleItem, smart:False children:False, related:False 12448 08:19:11 INFO [PublishOptions]: root:{2973AF61-669A-463A-96ED-A42D771787F0}, language:da, targets:Web Preview, database:web-preview, mode:SingleItem, smart:False children:False, related:False 12448 08:19:11 INFO [PublishOptions]: root:{2973AF61-669A-463A-96ED-A42D771787F0}, language:nl-BE, targets:Web Preview, database:web-preview, mode:SingleItem, smart:False children:False, related:False 12448 08:19:11 INFO [PublishOptions]: root:{2973AF61-669A-463A-96ED-A42D771787F0}, language:en-GB, targets:Web Preview, database:web-preview, mode:SingleItem, smart:False children:False, related:False 12448 08:19:11 INFO [PublishOptions]: root:{2973AF61-669A-463A-96ED-A42D771787F0}, language:en, targets:Web Preview, database:web-preview, mode:SingleItem, smart:False children:False, related:False 12448 08:19:11 INFO [PublishOptions]: root:{2973AF61-669A-463A-96ED-A42D771787F0}, language:fi-FI, targets:Web Preview, database:web-preview, mode:SingleItem, smart:False children:False, related:False 12448 08:19:11 INFO [PublishOptions]: root:{2973AF61-669A-463A-96ED-A42D771787F0}, language:fr-BE, targets:Web Preview, database:web-preview, mode:SingleItem, smart:False children:False, related:False 12448 08:19:11 INFO [PublishOptions]: root:{2973AF61-669A-463A-96ED-A42D771787F0}, language:fr-CA, targets:Web Preview, database:web-preview, mode:SingleItem, smart:False children:False, related:False 12448 08:19:11 INFO [PublishOptions]: root:{2973AF61-669A-463A-96ED-A42D771787F0}, language:fr-CH, targets:Web Preview, database:web-preview, mode:SingleItem, smart:False children:False, related:False 12448 08:19:11 INFO [PublishOptions]: root:{2973AF61-669A-463A-96ED-A42D771787F0}, language:fr, targets:Web Preview, database:web-preview, mode:SingleItem, smart:False children:False, related:False 12448 08:19:11 INFO [PublishOptions]: root:{2973AF61-669A-463A-96ED-A42D771787F0}, language:de-AT, targets:Web Preview, database:web-preview, mode:SingleItem, smart:False children:False, related:False 12448 08:19:11 INFO [PublishOptions]: root:{2973AF61-669A-463A-96ED-A42D771787F0}, language:de-CH, targets:Web Preview, database:web-preview, mode:SingleItem, smart:False children:False, related:False 12448 08:19:11 INFO [PublishOptions]: root:{2973AF61-669A-463A-96ED-A42D771787F0}, language:de, targets:Web Preview, database:web-preview, mode:SingleItem, smart:False children:False, related:False 12448 08:19:11 INFO [PublishOptions]: root:{2973AF61-669A-463A-96ED-A42D771787F0}, language:el-GR, targets:Web Preview, database:web-preview, mode:SingleItem, smart:False children:False, related:False 12448 08:19:11 INFO [PublishOptions]: root:{2973AF61-669A-463A-96ED-A42D771787F0}, language:it-IT, targets:Web Preview, database:web-preview, mode:SingleItem, smart:False children:False, related:False 12448 08:19:11 INFO [PublishOptions]: root:{2973AF61-669A-463A-96ED-A42D771787F0}, language:ja-JP, targets:Web Preview, database:web-preview, mode:SingleItem, smart:False children:False, related:False 12448 08:19:11 INFO [PublishOptions]: root:{2973AF61-669A-463A-96ED-A42D771787F0}, language:ko-KR, targets:Web Preview, database:web-preview, mode:SingleItem, smart:False children:False, related:False 12448 08:19:11 INFO [PublishOptions]: root:{2973AF61-669A-463A-96ED-A42D771787F0}, language:nb-NO, targets:Web Preview, database:web-preview, mode:SingleItem, smart:False children:False, related:False 12448 08:19:11 INFO [PublishOptions]: root:{2973AF61-669A-463A-96ED-A42D771787F0}, language:pt-BR, targets:Web Preview, database:web-preview, mode:SingleItem, smart:False children:False, related:False 12448 08:19:11 INFO [PublishOptions]: root:{2973AF61-669A-463A-96ED-A42D771787F0}, language:ru, targets:Web Preview, database:web-preview, mode:SingleItem, smart:False children:False, related:False 12448 08:19:11 INFO [PublishOptions]: root:{2973AF61-669A-463A-96ED-A42D771787F0}, language:es-AR, targets:Web Preview, database:web-preview, mode:SingleItem, smart:False children:False, related:False 12448 08:19:11 INFO [PublishOptions]: root:{2973AF61-669A-463A-96ED-A42D771787F0}, language:es-CO, targets:Web Preview, database:web-preview, mode:SingleItem, smart:False children:False, related:False 12448 08:19:11 INFO [PublishOptions]: root:{2973AF61-669A-463A-96ED-A42D771787F0}, language:es-MX, targets:Web Preview, database:web-preview, mode:SingleItem, smart:False children:False, related:False 12448 08:19:11 INFO [PublishOptions]: root:{2973AF61-669A-463A-96ED-A42D771787F0}, language:es, targets:Web Preview, database:web-preview, mode:SingleItem, smart:False children:False, related:False 12448 08:19:11 INFO [PublishOptions]: root:{2973AF61-669A-463A-96ED-A42D771787F0}, language:sv-SE, targets:Web Preview, database:web-preview, mode:SingleItem, smart:False children:False, related:False 12448 08:19:11 INFO [PublishOptions]: root:{2973AF61-669A-463A-96ED-A42D771787F0}, language:tr-TR, targets:Web Preview, database:web-preview, mode:SingleItem, smart:False children:False, related:False 13072 08:19:11 WARN SingleItemPublish detected. PublishContext was overridden with MaxDegreeOfParallelism=1, DisableDatabaseCaches=False. 13072 08:19:11 INFO Starting [Publishing] - AddItemsToQueue 13072 08:19:11 INFO Finished [Publishing] - AddItemsToQueue in 0 ms 13072 08:19:11 INFO Starting [ParallelPublishing] - ProcessQueue 13072 08:19:11 INFO Processing queue 13072 08:19:11 INFO Finished [ParallelPublishing] - ProcessQueue in 198 ms 13072 08:19:11 INFO Publish Mode : SingleItem 13072 08:19:11 INFO Created : 0 13072 08:19:11 INFO Updated : 0 13072 08:19:11 INFO Deleted : 0 13072 08:19:11 INFO Skipped : 702 Log: 8696 08:13:43 INFO AUDIT (sitecore\admin): Publish, root: {2973AF61-669A-463A-96ED-A42D771787F0}, languages:cs-CZ, da, nl-BE, en-GB, en, fi-FI, fr-BE, fr-CA, fr-CH, fr, de-AT, de-CH, de, el-GR, it-IT, ja-JP, ko-KR, nb-NO, pt-BR, ru, es-AR, es-CO, es-MX, es, sv-SE, tr-TR, targets:Web Preview, databases:web-preview, incremental:false, smart:false, republish:true, children:true, related:false 8696 08:13:43 INFO AUDIT (sitecore\admin): [Publishing]: Starting to process 26 publishing options The item has an english version. Other sibling items that appear to be identical can be published without issue. There are no publishing restrictions on the item. I also verified that no parent items have publishing restrictions.
TL/DR; It Depends :) This was an exercise that we used to undertake at the start of every project, and it came down to Context and Content. Is what we're building essentially an application or a website? Most projects didn't gravitate to one extreme of those poles, but certainly lended themselves to be more aligned with one or the other. Are visitors coming to perform a specific action? Are they coming to consume content, or just get in and get out? What interactions are our visitors having with the site? Are they watching videos, filling out forms, creating lists and customized content? The more interactive the site was, the more consideration needed to be paid to specific interfaces for our visitors' devices. Then, we'd consider context: Are people visiting on a mobile platform more likely to perform an interaction than those on PC devices? If I'm a banking site, people on mobile may proportionally care more about finding a branch or ATM near them than another user. My team's reaction was always to assume responsive design unless the design phase moved us out of it. We always wanted to deliver all functionality of the site to all users, and use conditional rendering to service users of one platform or another where needed. If the interactions with the content were so radically different from two devices, or impossible to complete on one device (ye olde Flash Video!) we'd try to use devices in Sitecore to target specific presentation to those users. Edit: Given the clarified requirements you posted, I think the approach of starting with a responsive design makes a ton of sense. Well considered interactive components can also work with this approach. For example, in the past we've built appointment booking components utilizing React on the same responsive grid system the rest of the site used. Our designers and devs took the time to make sure the component worked with smaller touch targets, and that the sections collapsed in a way that was perfectly functional. We ended up using the exact same components for all viewpoints on a single responsive design. I think if your design and research leads you to a point where a separate component makes more sense, your thought about using dynamic presentation via some conditional rendering to replace that component will work well. Again, there are more devices, viewports, browsers and configurations than we'll ever be able to test and validate. By defaulting to responsive, we'll make an experience that should be optimal for them all, but at the very least, somewhat usable!
Best practice for mobile optimization for content-driven site? We are creating a new website using Sitecore, and it seems that we have several options for mobile optimization: Responsive design (like on any CMS) Mobile device/presentation layer with device detection Conditional rendering for mobile (personalization rules) The site is primarily content-driven ("brochureware"), but there are pieces of the site that are highly interactive and may merit a mobile-specific approach. We'd obviously like to avoid the costs of maintaining essentially a separate mobile site. How should I decide which of these (or which combination) to use for my site? It seems like a responsive approach will be lowest cost long-term. Can I use this with device detection as well? Should I use a device layer or conditional rendering on pages with a mobile-specific UX?
You can create complex conditions consisting of multiple rules in the Marketing Control Panel under Personalization > Predefined Rules (in 8.2, but similar location in earlier versions) - You can then treat the entire condition as a single rule where the condition is true, and apply this single rule to all applicable pages. You can then utilize the "where predefined condition is true" rule condition to reuse this complex condition.
Reusing a set of personalization rules? I am a marketer responsible for setting up a new campaign on our Sitecore website. We have content which we want to target at a very specific customer segment -- customers from a specific Geo on mobile who are coming in from links for our new campaign. I know how to set up the personalization rule for this, but I need to do it on dozens of pages. Is there a way I can do this without having to configure this complex rule on every page?
I think such functionality is absolutely an intended use case of xDB. From a high level, the approach would be: Create a custom facet for your customers which stores order history. Ensure that your customers are all imported into xDb, including order history. Ensure that when new orders are placed, that this facet is updated. Create a custom aggregation in your reporting database which effectively gives you "customers who bought X, also bought Y." Your "Fact" in this case would be: Purchased Product Other Product Count Create a rendering which queries the reporting table and displays recommended products, based on some sort of threshold and/or ordered by Count. The specifics of any of the above are too broad for this answer I think (since you are simply asking if it's possible). I think the big limitations at this time will be: The need to duplicate your order data in xDB. In theory your AggregationProcessor could read directly from your order database however, if it's easily available. XConnect may help with the importing of this in the future. You are potentially remotely querying the reporting database. Some performance testing and caching may be needed (though cache may be of limited use given the potential diversity of products / cache keys here). I assume that the forthcoming XConnect will help with this as well. The real power of xDB would be adding additional elements to that Fact -- customer personas, geo, campaigns, etc. This allows you to essentially say "Customers LIKE YOU also bought," which you can't do with the commerce system on its own.
Can I create "Other customers also bought..." recommendations using Sitecore xDB? I've been trying to figure out, whether or not I can use Sitecore's xDB related functionalities to create a "other customers also bought" recommendation system. The use case would be something like this: a user puts a set of products in a basket-like functionality and proceeds to the checkout. Once the user has decided to make the final purchase, I'd like to use Sitecore's xDB to show other products the user might be interested in, or perhaps something different in relation to the products, like guides or so. My initial thought was to create personas, and tie these together with the products, such that person A is a person that buys X, Y, and Z and should be shown related products 1, 2, 3, etc. However, I am not sure if this will work in practice, and whether Sitecore is fit for such features. So my question is, whether or not the default xDB functionalities in Sitecore can be used for this, and what the limitations are.
The lambda seems correct, and there are no obvious reason for failure. I think the next step is to log this as a big on Github: https://github.com/mikeedwards83/Glass.Mapper You can turn the lambda cache off using the following code in the GlassMapperScCustom class: public static class GlassMapperScCustom { public static IDependencyResolver CreateResolver(){ var config = new Glass.Mapper.Sc.Config(); config.UseGlassHtmlLambdaCache = false; var dependencyResolver = new DependencyResolver(config); // add any changes to the standard resolver here return dependencyResolver; } Another thing to try is wrapping your lambda's in a null check: @if(Model != null){ @Html.Glass().Editable(a=>a.Text) }
Disabling the Glass lambda cache I believe an issue we're running into might be related to the lambda cache in Glass - I'm also concerned about the performance ramifications if we were to disable it. Has anyone done this and experienced any performance issues? Edit - this was the original issue: Exception: System.NullReferenceException Message: Object reference not set to an instance of an object. Source: Anonymously Hosted DynamicMethods Assembly at lambda_method(Closure , ContentBlurbViewModel ) at Glass.Mapper.Sc.GlassHtml.MakeEditable[T](Expression`1 field, Expression`1 standardOutput, T model, Object parameters, Context context, Database database, TextWriter writer) in c:\TeamCity\buildAgent\work\8567e2ba106d3992\Source\Glass.Mapper.Sc\GlassHtml.cs:line 616 Lambda(s) that this fails on: @Html.Glass().Editable(a => a.Heading) @Html.Glass().Editable(a => a.Subtitle) @Html.Glass().Editable(a => a.RichText1) All of these lambdas are in the same cshtml view and share a view model. It looks like somehow or another the proxy object is returning nulls for the properties and Editable starts failing and it gets cached.
The problem is that on MyViewModel your RotatorContentItems are of type List<RotatorContentItem>, but dataSource.Children is of type Sitecore.Collections.ChildList. View Model: public class MyViewModel { public List<RotatorContentItem> RotatorContentItems { get; set; } } You're not using RotatorItems at all so no need to add that property to MyViewModel. Controller Action: public ActionResult Index() { var dataSourceId = RenderingContext.CurrentOrNull.Rendering.DataSource; var dataSource = Sitecore.Context.Database.GetItem(dataSourceId); var viewModel = new MyViewModel { RotatorContentItems = dataSource.Children.Select(c => new RotatorContentItem(c)).ToList() }; return View(viewModel); } View: @using Sitecore.Mvc.Presentation @using Sitecore.Mvc @model MyViewModel @foreach (var item in Model.RotatorContentItems) { <h2>@item.Title.Text</h2> @item.SubTitle.Text }
Sitecore MVC - Controller Renderings - View Model for Custom Item How do I bind a Custom Item generated with "Custom Item Generator" to my view model for a controller rendering? There is a data source that is returning a list of the Custom Items. Also, one of the custom items is an image. It sounds like I should be using Glass Mapper, but it's not clear to me what it does and how that relates to what I am trying to do. This code does not build. View: @using Sitecore.Mvc.Presentation @using Sitecore.Mvc @model MyCompanyBootstrap.CustomItems.RotatorContentItem @foreach (var item in Model.RotatorItems) { <h2>@item.Fields["Title"]</h2> @item.Fields["Sub Title"] } @Model.Title <br /> @Model.Text Controller Action: public ActionResult Index() { var dataSourceId = RenderingContext.CurrentOrNull.Rendering.DataSource; var dataSource = Sitecore.Context.Database.GetItem(dataSourceId); var viewModel = new RotatorContentItem(); viewModel.RotatorItems = dataSource.Children; viewModel.Initialize(RenderingContext.Current.Rendering); return View(viewModel); } Custom Item: public partial class RotatorContentItem : CustomItem { public static readonly string TemplateId = "{E493DF4A-E97E-49B5-BF9F-F70397EA8D21}"; #region Boilerplate CustomItem Code public RotatorContentItem(Item innerItem) : base(innerItem) { } public static implicit operator RotatorContentItem(Item innerItem) { return innerItem != null ? new RotatorContentItem(innerItem) : null; } public static implicit operator Item(RotatorContentItem customItem) { return customItem != null ? customItem.InnerItem : null; } #endregion //Boilerplate CustomItem Code #region Field Instance Methods public CustomTextField Title { get { return new CustomTextField(InnerItem, InnerItem.Fields["Title"]); } } public CustomTextField SubTitle { get { return new CustomTextField(InnerItem, InnerItem.Fields["Sub Title"]); } } public CustomImageField ImageLarge { get { return new CustomImageField(InnerItem, InnerItem.Fields["Image Large"]); } } public CustomImageField ImageSmall { get { return new CustomImageField(InnerItem, InnerItem.Fields["Image Small"]); } } public CustomGeneralLinkField Link { get { return new CustomGeneralLinkField(InnerItem, InnerItem.Fields["Link"]); } } public CustomCheckboxField IsOverlayBlack { get { return new CustomCheckboxField(InnerItem, InnerItem.Fields["Is Overlay Black"]); } } #endregion //Field Instance Methods } Edit: There are a number of things wrong with this code that I am seeing now. I think there should be a new class specifically for the View Model itself. And that class should have a list of RotatorContentItems. public List<RotatorContentItem> RotatorContentItems { get; set; } But, it is not clear to me how to bind that list in the controller action. public class MyViewModel { public List<RotatorContentItem> RotatorContentItems { get; set; } public IEnumerable<Item> RotatorItems { get; set; } } public ActionResult Index() { var dataSourceId = RenderingContext.CurrentOrNull.Rendering.DataSource; var dataSource = Sitecore.Context.Database.GetItem(dataSourceId); var viewModel = new MyViewModel(); viewModel.RotatorContentItems = dataSource.Children; viewModel.RotatorItems = dataSource.Children; return View(viewModel); } This will not build on the following line: viewModel.RotatorContentItems = dataSource.Children; Error is: Cannot implicitly convert type 'Sitecore.Collections.ChildList' to 'System.Collections.Generic.List<MyCompnayBootstrap.CustomItems.RotatorContentItem>'
There is no simple way to do that. You would have to do reverse installation (uninstall) and remove everything manually. If you are using Sitecore Powershell Extensions you could try to create so called Anti-Package. I believe you can do the same with Sitecore Rocks but I am not sure if this is still supported.
How to delete a Sitecore module? Is there any simple way to remove a Sitecore module from an instance? I am trying to remove WFFM and ECM from a 7.5 instance. The guidance I got from a Sitecore engineer was to look at the installation packages for both modules and simply remove all of the associated files and content items. Removing the files is easy enough. Removing the content items is proving to be much more complicated and labor intensive. Especially when you get to data templates. There are so many complicated dependencies with the data templates. It takes hours to figure out which data templates are dependent on which other ones. Sitecore won't let you delete a data template until it is not used anywhere on the site. So for each data template I have to go hunt down all of the items that use that template and remove them. For ECM especially it is a complicated web of data templates. Just wondered if there was some easier way of uninstalling a Sitecore module.
The information of which variation a particular visitor got should be stored in the Interactions Collection of your Analytics Mongo DB. You can look at a particular Interaction and look at the Pages element in the interaction. There is a lot of information in there that you should be able to see. Once you find that information in your Mongo DB, then you should be able to access the Contact Card for a particular visitor, and from that contact card you should be able to get the Sitecore Item ID of the particular variation that was displayed. Figuring out how to display that particular variation is going to depend on how you implemented the displaying of the information (depending if you did this through JavaScript/WebForms/etc), but I believe that this information should help you get the information that you are looking for.
How to request a specific variation of an A/B or Multivariate testing? For legal requirements we need to archive each variation of a page that will be served. Is there a way - via query string or a cookie or request headers - to request a specific variation of an A/B or Multivariate test?
This is a Unicorn/Rainbow error that occurs when the item being saved (serialized to disc) does not have its parent item serialized. This indicates that you are using Unicorn not only on your local machine, but also on your development server. In general, in most development processes there should be no reason to use Unicorn on a development server, especially with Sitecore data providers patched (see Unicorn.DataProvider.config). So make sure Unicorn's binaries and configuration don't get deployed. Apart from fixing your issue, your deployments will become simpler and cleaner. If you do need to use Unicorn in that environment, make sure that you also maintain an up-to-date copy of your serialized items in Unicorn's folder. You can do that in two ways: deploy serialized items together with the application; or, in case the Sitecore databases are already up to date, use the Unicorn Control Panel to manually serialize all items to disc.
Cannot save a Sitecore item. The error message says the parent item was not serialized I have a really odd problem when saving a Sitecore item. Locally, everything is fine. However, when deployed to our dev environment (which uses the same db and SOLR instance), I get: The parent item of {{item name}} was not serialized. You cannot have a sparse serialized tree. You may need to serialize this item's parents. It's strange it works on one environment but not the other. Especially when using the same databases.
Working with personas, profiles, and patterns take a lot of planning, a lot. But I understand where you are trying to get your feet wet, in the nice warm water of Sitecore XP. @sestocker is right that you do need to think about goals and the engagement value (EV), but your question was directly related to personalization based on the users' site behavior. The first level of planning is this: at a very high level, pick a specific section of your site that you feel you can clearly define into a profile, and then into a set of profile keys. When I talk about this, I usually resort to talking about Jets because we can all get our hands on the Sitecore Jets demo. The Jets demo has two profiles that are configured, but let's use the "Visit Profile" as an example. They are talking about vacations trips, and designing profiles that could clearly define the user's experience for each one of those trips. These are Profile Keys. Then they take the Profile Keys and define Profile Cards, which ranks on a defined scale how much a trip would fit into each one of these groups. It's a way of defining a set of profiles as a group, not one by one on each page, which would take forever to do. This is important to understand because a trip is unlikely be only for family, or only for business. It would be heavily family-based, with nice amenities for couples, and very few resources for business. In the image above, we see the Business profile card. The Business profile is defined as great for Business (5 on a scale of 1-5), good for Duration (4) and a moderate Nightlife (2). It has no Family benefits (0) and is not good for Couples (1). We do this over and over again, for a few defined profile cards that we can clearly outline our pages/products/news/etc as. Again, this takes planning and a good understanding of what you want your web site user to do. Where are you trying to get them to go? What are you trying to make them do? All the work in profile keys and profile cards is just for score keeping. Where the rubber hits the road is in pattern cards. Pattern cards is where we define our web user, based on the things they are doing. Pattern cards are similar to profile cards in that you have selectors that rank your profiles on a defined scale (1-10 now). But this time it's about an aggregation of points, not a value you are assigning to the user. Let's say a user visits a page with business value of 5, family 2, duration 3, then visits a page with a business 5, family 1, duration 2. They have now accumulated a score of busines 10, family 3, duration 5. Sitecore takes this information and tries to match it to one of your pattern cards. You are trying to identify if the user is looking at business trips, or shopping for a trip that is family-based. Not because they told you, but becasue they are looking at pages that you have defined and scored. Now you can personalize content for your web user when you select the rule "when the current visit matches the specific pattern card in the specific profile" in the personalization rules window. You can also see your top pattern hits on the dashboard for the Experience Analytics. Also check out Pattern Matches under the audience menu in Experience Analytics. It has tons of info. Again, it takes a lot of planning to get this right, and effectively define what the client is looking to accomplish, plus mix in the goals, events, outcomes, and EV as well.
Behavioral personalization? We currently have a site that uses some simple personalization based on some "if/then" conditions. For instance, we have one component that is personalized based on date. Another is based on whether the contact is anonymous. However, I've heard there are other ways to personalize based on browsing behavior... So, if a user is browsing one category of products, for instance, we can show them some content based on that product category... My google-foo has been failing me, so can someone point me in the right direction where I can start setting up this type of behavior-driven personalization? Over the last few months, we've gone through exercises of defining personas, I'm just not exactly sure how to start leveraging that information in Sitecore yet.
There are a couple ways you can do this. In the Custom Item Generator, each field has a .Rendered property you can reference which just runs the field renderer on that field. Use this if you want to run the Sitecore rendering pipeline for that field. https://github.com/Velir/Custom-Item-Generator/blob/master/Fields/BaseCustomField.cs So for your example, @foreach (var item in Model.RotatorContentItems) { <h2>@item.SubTitle.Text</h2> @item.Title.Text @Html.Raw(item.ImageLarge.Rendered) } Using this approach will make the image editable in Experience Editor. Alternately, you could just reference the url of the image and do this. @foreach (var item in Model.RotatorContentItems) { <h2>@item.SubTitle.Text</h2> @item.Title.Text <img src="@item.ImageLarge.MediaUrl" /> } https://github.com/Velir/Custom-Item-Generator/blob/master/Fields/SimpleTypes/CustomImageField.cs
Sitecore MVC - Controller Rendering - Output Image I am trying to output an image in the following code. But, I am not sure of the syntax in the View. I can type @item.ImageLarge and some intellisense pops up, but it is not clear how to get the image to display. View: @foreach (var item in Model.RotatorContentItems) { <h2>@item.SubTitle.Text</h2> @item.Title.Text } Controller: public ActionResult Index() { var dataSourceId = RenderingContext.CurrentOrNull.Rendering.DataSource; var dataSource = Sitecore.Context.Database.GetItem(dataSourceId); var myViewModel = new MyViewModel(); myViewModel.RotatorContentItems = dataSource.Children.Select(c => new RotatorContentItem(c)).ToList(); return View(myViewModel); } Model: public class MyViewModel { public List<RotatorContentItem> RotatorContentItems { get; set; } } Custom Item: public partial class RotatorContentItem : CustomItem { public static readonly string TemplateId = "{E493DF4A-E97E-49B5-BF9F-F70397EA8D21}"; #region Boilerplate CustomItem Code public RotatorContentItem(Item innerItem) : base(innerItem) { } public static implicit operator RotatorContentItem(Item innerItem) { return innerItem != null ? new RotatorContentItem(innerItem) : null; } public static implicit operator Item(RotatorContentItem customItem) { return customItem != null ? customItem.InnerItem : null; } #endregion //Boilerplate CustomItem Code #region Field Instance Methods public CustomTextField Title { get { return new CustomTextField(InnerItem, InnerItem.Fields["Title"]); } } public CustomTextField SubTitle { get { return new CustomTextField(InnerItem, InnerItem.Fields["Sub Title"]); } } public CustomImageField ImageLarge { get { return new CustomImageField(InnerItem, InnerItem.Fields["Image Large"]); } } public CustomImageField ImageSmall { get { return new CustomImageField(InnerItem, InnerItem.Fields["Image Small"]); } } public CustomGeneralLinkField Link { get { return new CustomGeneralLinkField(InnerItem, InnerItem.Fields["Link"]); } } public CustomCheckboxField IsOverlayBlack { get { return new CustomCheckboxField(InnerItem, InnerItem.Fields["Is Overlay Black"]); } } #endregion //Field Instance Methods }
To answer your question, really, I feel it's prudent to walk through the deployment steps and call out where places that might be gotchas. I'll finish with a summary of what I would do. Sitecore 7.5 - 8.0 Initial (141212) The first step that you'll want to do is upgrade to the 8.0 Initial release. You can find the Upgrade Guide here. During this upgrade, there is not much that is changed on the xDB front, however Step 1.2.8 - Redeploying Marketing Data is going to be taking portions of your analytics database and redeploying it to a new schema. With regard to xDB there is not much going on here. Also worth noting that schema changes in xDB kind of happen automatically, one of the pro's of using a schema-less data repository. Sitecore 8.0 (141212) - 8.1 (151003) The second step is going to be upgrading from 8.0 to the inital release of 8.1. You can find the Upgrade Guide here. This is a pretty involved upgrade step, mostly doing a lot of work on the SQL side, however, really starting to augment the xDB side of the house with content testing data in xDB. You'll want to pay careful attention to Step 1.3.3 - Upgrading Content Testing Data which has direct impacts on xDB and xDB configuration. Sitecore 8.1 Initial (151003) - 8.1-Update 3 (160519) The third upgrade step is going from 8.1 Initial to 8.1 Update 3, again you can find the Upgrade Guide here. In this particular upgrade, there are no specific xDB upgrade steps, short of making sure that you disable xDB in the config while the upgrade package is running. How I would do it 1) I would look into making a copy of your Mongo collections. To do this, as long as you are using MongoDB 2.1+, you can copy a collection using the following syntax in a tool, like Robomongo: db.example1.copyTo("example2"); In this example, the collection I want to copy is example1 and this will copy it to a new collection called example2. You'll want to do this for all of the mongo collections: analytics tracking_contact tracking_history tracking_live 2) I would then setup your second 7.5 site (upgrade environment) that you'll be using as your upgrade site and point the connection strings for mongo to the new collections. 3) Perform all of your upgrade steps in your upgrade environment. 4) Adjust/refactor your custom code base as needed. Now, in a perfect world, you would think that switching over IIS to the new site would work, and maybe in your case, the rate of change in your production content is minimal enough that this work. If that's the case, the I think that's all you need to do. However... if the rate of change is high, you may be looking at having to upgrade the Content Management environment in PRODUCTION again. Only this time, you know what to expect, you've done it once before in the upgrade environment, and now it's just a matter of doing the work. This will also include any changes to production xDB. At that point, use your standard deployment methodology to move code bits to the CD servers and any other role servers you might have deployed. And your off to the races. SUMMARY You really don't have to worry too much about xDB. I think the Content Testing changes are the only point that you'll want to pay attention to. The rest of the upgrade, for the most part, has xDB disabled.
How to handle xDB during a Sitecore upgrade? This may be a vague question or too broad for Stack Exchange, but I will try it anyway. We are doing an upgrade from v7.5 to v8.1-3. We are using a hosted instance of Mongo called ObjectRocket from Rackspace. My basic plan for doing the upgrade is as follows: Create a second web site on the CM and CD server using a separate IP address. Install fresh copies of v7.5 on the second web sites. Backup and restore the current production Sitecore SQL Server databases with new names and modify the fresh installs of Sitecore to point to these database copies. Perform the upgrade to go from 7.5 to 8.1-3 on these second sites. Deploy all of our custom code on to the servers. Switch over IIS to use these second sites. That's the rough set of steps. My real question is how does Mongo/xDB fit in to all of this? I guess I don't have a clear understanding of what data is in xDB in v7.5 and how exactly I should handle that during an upgrade given my above approach. Do I have to make copies of my xDB databases and create a second set of Mongo databases? Can I just hook up my second sites to the same Mongo databases during the upgrade process? My only understanding of xDB is a vague idea that it holds large amounts of "analytics" data that is eventually transferred to the analytics SQL Server database. I'm just wondering if I am missing something that I need to be doing for this upgrade with Mongo/xDB. Thanks, Corey
Sitecore has registered this as a bug and provided a custom SitecoreItemCrawler. The Sitecore issue number is 471497 and the public reference numbers for this issue are 124202, 103362, 127177.
Items with fallback language missing in Content Search index On our Sitecore 8.1 Update-2 site we have configured two languages: English German (which should fallback to English) So we have configured language fallback and it works as it should. We have also configured the sitecore_master_index to enable language fallback as described here. If my item only has 1 version in English and I rebuild the whole index, I see this item now twice in the search index (one item in English and one Item in German) with exactly the same content. This is exactly what I expect it to be. Today I have updated to Sitecore 8.1 Update-3 (due to a bug with public reference number 109119, see Release Notes). But when I now rebuild my index, I only have one item version in the index (in English). The item version which is fallbacked (German) is not added to the index. Did something change between Update-2 and Update-3? Or do I misunderstand how this should work? How can I be sure that both versions are in the index? The Sitecore API etc. always returns me correct versions and the fallback works. UPDATE In the Release Notes I found the following point: 108981: The index may have contained documents for non-existing item versions when item-level language fallback was enabled. Has this something to do with my issue? Was is wrong as it worked before and they fixed this now?
Sitecore 8.1 update 3 brought a change that allows custom Contact Data to be indexed. This means this Custom Contact data will be available to searched through the sitecore_analytics_index. This is implemented through a custom processor that extends the new contactindexable.loadfields pipeline. This allows data from custom xDB facets to be added to the collection of contact indexable fields. protected override IEnumerable<IIndexableDataField> GetFields(ContactIndexableLoadFieldsPipelineArgs args) { var fields = new List<IIndexableDataField>(); var customFacet = args.Contact.GetFacet<ICustomContactFacet>("CustomContactFacetName"); if (customFacet != null) { fields.Add(new IndexableDataField<bool>("contact.CustomFieldName", customFacet.CustomField)); } return fields; } I have since written a detailed blog post on how to do this
How to use custom Contact data in Segmentation rules in the List Manager I have varied information stored in xDB imported from a CRM system. This is stored against Contacts in custom Facets. What is the most scalable method to use this data for segmenting large number of Contact's in the List Manager? Creating the custom segmentation rules isn't a problem it's more retrieving that getting that Contact data in a scalable way.
Internal Link is a System field type. Unless you're creating new Sitecore features, I'd recommend you switch to one of the following: *Generallink Use this if your users can select both Sitecore Items and external URLs. *Droplink Use this if you want to force the user to select a Sitecore Item. These field types can be found under the "Linking" group when you define the Field on the Data Template.
Remove rootpath in Internal Link Field In Internal Link field, Sitecore adds rootpath like "/sitecore/content" as prefix if I use the "Insert Link" button. I would like to remove this. Is there a way to resolve this by updating .config file? or Do I have to include another config file to call process after Sitecore.Data.Fields.InternalLinkField.UpdateLink(), if it is right? When I click the "Insert Link" button, "Insert Item" dialog pops up.
wooot! solved my own issue. The CES certificate - cert-iis.p12 was not valid. Once I replaced this with the valid certificate, everything worked. I wish the error was a bit more informative.
Coveo diagnostics error: Invalid JSON primitive Fresh install of Sitecore 8.1 update 3 with July 2016 Coveo release. Invalid JSON primitive: . Search for information on search.coveo.com Hide details System.ArgumentException: Invalid JSON primitive: . at System.Web.Script.Serialization.JavaScriptObjectDeserializer.DeserializePrimitiveObject() at System.Web.Script.Serialization.JavaScriptObjectDeserializer.DeserializeInternal(Int32 depth) at System.Web.Script.Serialization.JavaScriptObjectDeserializer.BasicDeserialize(String input, Int32 depthLimit, JavaScriptSerializer serializer) at System.Web.Script.Serialization.JavaScriptSerializer.Deserialize(JavaScriptSerializer serializer, String input, Type type, Int32 depthLimit) at System.Web.Script.Serialization.JavaScriptSerializer.Deserialize[T](String input) at Coveo.Framework.Utils.JsonSerializer.DeserializeObjectFromString[T](String p_String) at Coveo.SearchServiceProvider.Rest.ResponseParser.ParseQueryResults(String p_JsonResponse) at Coveo.SearchServiceProvider.Rest.ClientSessionWrapper.ExecuteQuery(QueryParams p_QueryParams) at Coveo.SearchProvider.Applications.OnPremiseStateVerifier.VerifySearchService() at Coveo.SearchProvider.Applications.OnPremiseStateVerifier.<>c__DisplayClass14.<GetSearchServiceState>b__13() at Coveo.SearchProvider.Applications.BaseVerifier.VerifyComponent(Func`1 p_VerifyMethod, String p_ComponentName)
Check indexing.getDependencies pipeline INDEXING GET DEPENDENCIES This pipeline fetches dependant items when one item is being index. Useful for fetching related or connected items that also need to be updated in the indexes. You can add/remove entries from Dependencies collection (GetDependenciesArgs class) Answers for extra questions: yes you can, you can get info about your current job calling this Sitecore.Context.Job.Name (example result Index_Update_IndexName=sitecore_web_index). From this string you can get your custom index name, it doesn't matter. This is an abstraction for search providers. It mean Sitecore crawls dependent items here and passes everything at the end to the search provider. EDIT (problems with job name) I treat this as a last resort solution. Perhaps there is something else that can be done easier. Add dependencies in indexing.getDependencies pipeline. To filter your items let's use document builder, where normally Sitecore does filtering. Find following types LuceneDocumentBuilderand LuceneDocumentBuilderOptions. Options type inherits from DocumentBuilderOptions. Inside that type there is following property: public virtual HashSet<string> ExcludedTemplates and the most important one (which we can use for our filtering): public virtual string IndexName { get; set; } This ExcludedTemplates property is binded with values from config, example node: <configuration xmlns:patch="http://www.sitecore.net/xmlconfig/"> <sitecore> <contentSearch> <indexConfigurations> <defaultLuceneIndexConfiguration type="Sitecore.ContentSearch.LuceneProvider.LuceneIndexConfiguration, Sitecore.ContentSearch.LuceneProvider"> <exclude hint="list:ExcludeTemplate"> <MyTemplate>{6BF19F1C-DA51-123F-B7D9-B49B41FD1578}</MyTemplate> </exclude> </defaultLuceneIndexConfiguration> </indexConfigurations> </contentSearch> </sitecore> </configuration> I know this is not a solution but having that knowledge you could try to add your custom filtering somewhere there. LuceneDocumentBuilderand LuceneDocumentBuilderOptions types can be patched via standard Sitecore configuration. I assumed you are using Lucene as a serach provider. Solr has similar config nodes and it's own SolrDocumentBuilder as well.
How can I customize the dependencies of items when indexing? When an item gets indexed, Sitecore also updates certain "dependent" items in the index. I would like to change this set of items, or at least add some to the list. I want to get the items in the list that Sitecore uses for indexing, to avoid starting new index jobs per extra item (as the list of extra items might get big). How can I do this? And two extra questions: can I do this for each index separately? (I want this for my custom index, but not for all default Sitecore indexes) does it matter if I use Lucene or Solr for this?
In the SQL based versions of Sitecore (i.e. 7.2 and lower) the Dropout reports were available from the WFFM Form Reports section. Unfortunately on the xDB/Mongo verions of Sitecore (7.5 onwards) this report does not exist and there is no out of the box solution available to view this data, even in the latest version. The form dropout data is captured, assuming you have Enable Form Dropout Tracking checked then you can see in the Network tab of your browser the data is being recorded when a user moves away from a field: The data is saved to MongoDB but there are no reports to retrieve this information back unfortunately. I'm not sure if there any APIs available to retrieve this data, but you would write some queries over Mongo but you would have to create something custom (also also worry about bridging field information from Sitecore). The only other alternative is to contact Sitecore Support and request this feature is added back in.
WFFM Analytics - is it possible to report on dropouts by field? I know that WFFM captures form dropout data to some extent and there's a Dropouts count in the out-of-the-box Form reports. Is it possible to use the data that's already captured to report on dropouts on a by-field basis?
The insert option is actually defined by a pipeline processor in Coveo.UI.Controls.config. You can remove it using the following config patch: <processors> <uiGetMasters> <processor type="Coveo.UI.PipelineProcessors.GetMasters.AllowSearchPageProcessor, Coveo.UIBase"> <patch:delete /> </processor> </uiGetMasters> </processors> You can read more about this pipeline in this article about Understanding the Coveo UI Pipelines
Removing Coveo insert options Coveo adds a rule for insert options to add a new layout or MVC layout whenever you use Insert Item anywhere on the site. This is a little much for end-users, especially where I'm creating custom insert buttons in the experience editor for them and I don't want them creating these layouts. I looked in system/settings/rules but didn't see anything related. What's the best way to eliminate these? Thanks.
Refer to the following: https://sitecorepowershell.gitbooks.io/sitecore-powershell-extensions/content/troubleshooting.html (edited) https://kb.sitecore.net/articles/296641 Use this patch config: <configuration xmlns:patch="http://www.sitecore.net/xmlconfig/"> <sitecore> <settings> <setting name="Xdb.Enabled"> <patch:attribute name="value" value="false" /> </setting> <setting name="Xdb.Tracking.Enabled"> <patch:attribute name="value" value="false" /> </setting> </settings> </sitecore> </configuration>
Package installation hangs on Sitecore 8.1 I've encountered an issue on Sitecore 8.1 when installing Sitecore PowerShell Extensions. The same issue is happening for other larger packages as well. This is a vanilla installation. No instance of Mongo Db running. Update Adjusted the question to reflect to proper version of Sitecore. Turns out it was 8.1 and not 8.0.
If you only want to run your custom logic when the user saves an item from within the Sitecore client, you could use a saveUI pipeline processor instead. This would eliminate the need to check for these background job scenarios. Here is the basic structure of a saveUI processor: using Sitecore.Data.Items; using Sitecore.Pipelines.Save; namespace Example.Web.Pipelines.Save { public class MySaveProcessor { public virtual void Process(SaveArgs args) { foreach (SaveArgs.SaveItem saveItem in args.Items) { var item = Sitecore.Context.ContentDatabase.Items[saveItem.ID, saveItem.Language, saveItem.Version]; if (item != null) { DoCustomLogic(item); } } } protected virtual void DoCustomLogic(Item item) { // Do your thing } } } If you want this to run before the save actually occurs like the item:saving event does, you would want to patch this in before the Save processor: <configuration xmlns:patch="http://www.sitecore.net/xmlconfig/"> <sitecore> <processors> <saveUI> <processor mode="on" type="Example.Web.Pipelines.Save.MySaveProcessor, Example.Web" patch:before="processor[@type='Sitecore.Pipelines.Save.Save, Sitecore.Kernel']" /> </saveUI> </processors> </sitecore> </configuration> For more info, see this article from John West on the various ways to intercept item saves: https://community.sitecore.net/technical_blogs/b/sitecorejohn_blog/posts/repost-intercepting-item-updates-with-sitecore
Detecting when an item being saved is during package installation I have a custom item:saving event handler which contains some specific logic when a user user makes a change to an item. This works fine but when we create a content package from a different environment and then install it on another environment the item:saved and item:saving events are fired during the package installation. We only want the code to run when the save actions are done by the user and not during package install time, since in theory those actions were already carried out on the server we are packaging from. We are already checking if the Items are being Published, since that causes as similar item:saving event to be raised. protected void OnItemSaving(object sender, EventArgs args) { Assert.ArgumentNotNull(sender, "sender"); Assert.ArgumentNotNull((object)args, "args"); if (PublishHelper.IsPublishing()) return; Item obj = Event.ExtractParameter(args, 0) as Item; if (obj == null) return; this.DoCustomLogic(obj); } Is there a similar helper or how can I check if this save event is raised as a result of a package being installed?
Yes - you are using the Raw Value when you do @Html.Raw(Model.SampleItem.Text.Raw) - this bypasses the field renderer and so will not be editable in the Experience Editor. Instead of .Raw use .Rendered - this will render the field using Sitecore's Field Renderer and add the page editable parts. @Html.Raw(Model.SampleItem.Text.Rendered)
Sitecore MVC - Controller Rendering - Experience Editing I am not able to make changes to the text in the simple text fields using the Experience Editor. Is there some way to modify my code to make it work with the Experience Editor? View @model MyCompanyBootstrap.Models.HomePageViewModel <div class="container"> <div class="page-title"> <h1>@Html.Raw(Model.SampleItem.Title.Raw)</h1> </div> <div class="generic-content"> <div class="body-content hidden-xs"> <p> @Html.Raw(Model.SampleItem.Text.Raw) <br><br> </p> </div> <div class="body-content-small visible-xs"> <p> @Html.Raw(Model.SampleItem.Text.Raw) <br><br> </p> </div> </div> </div> Controller public ActionResult Index() { var dataSourceId = RenderingContext.CurrentOrNull.Rendering.DataSource; var dataSource = Context.Database.GetItem(dataSourceId); var homePageViewModel = new HomePageViewModel(); homePageViewModel.RotatorContentItems = dataSource.Children.Select(c => new RotatorContentItem(c)).ToList(); homePageViewModel.SampleItem = RenderingContext.CurrentOrNull.PageContext.Item; return View(homePageViewModel); } Model public class HomePageViewModel { public List<RotatorContentItem> RotatorContentItems { get; set; } public SampleItem SampleItem { get; set; } } Sample Item public partial class SampleItem : CustomItem { public static readonly string TemplateId = "{76036F5E-CBCE-46D1-AF0A-4143F9B557AA}"; #region Boilerplate CustomItem Code public SampleItem(Item innerItem) : base(innerItem) { } public static implicit operator SampleItem(Item innerItem) { return innerItem != null ? new SampleItem(innerItem) : null; } public static implicit operator Item(SampleItem customItem) { return customItem != null ? customItem.InnerItem : null; } #endregion //Boilerplate CustomItem Code #region Field Instance Methods public CustomTextField Title { get { return new CustomTextField(InnerItem, InnerItem.Fields["Title"]); } } public CustomTextField Text { get { return new CustomTextField(InnerItem, InnerItem.Fields["Text"]); } } #endregion //Field Instance Methods } RotatorContentItem public partial class RotatorContentItem : CustomItem { public static readonly string TemplateId = "{E493DF4A-E97E-49B5-BF9F-F70397EA8D21}"; #region Boilerplate CustomItem Code public RotatorContentItem(Item innerItem) : base(innerItem) { } public static implicit operator RotatorContentItem(Item innerItem) { return innerItem != null ? new RotatorContentItem(innerItem) : null; } public static implicit operator Item(RotatorContentItem customItem) { return customItem != null ? customItem.InnerItem : null; } #endregion //Boilerplate CustomItem Code #region Field Instance Methods public CustomTextField Title { get { return new CustomTextField(InnerItem, InnerItem.Fields["Title"]); } } public CustomTextField SubTitle { get { return new CustomTextField(InnerItem, InnerItem.Fields["Sub Title"]); } } public CustomImageField ImageLarge { get { return new CustomImageField(InnerItem, InnerItem.Fields["Image Large"]); } } public CustomImageField ImageSmall { get { return new CustomImageField(InnerItem, InnerItem.Fields["Image Small"]); } } public CustomGeneralLinkField Link { get { return new CustomGeneralLinkField(InnerItem, InnerItem.Fields["Link"]); } } public CustomCheckboxField IsOverlayBlack { get { return new CustomCheckboxField(InnerItem, InnerItem.Fields["Is Overlay Black"]); } } #endregion //Field Instance Methods }
We do our deployments as follows in our 8.1 environment using Team City, Octopus deploy and Unicorn (this is Simplified): a rewrite rule tells the load balancer to take CD1 out of the pool push the site NuGet packages to the CD and CM servers (we build this from Teamcity) deploy sitecore, the updated site code and serialised unicorn items to the CM sever deploy sitecore, the updated site code to CD1 call unicorn to push the sitecore items into the master db and publish them to CD1 ping a number of pages to warm up the site tell the load balancer to take CD2 out of the pool and put CD1 back in deploy sitecore and the updated site code to CD2 call unicorn to publish to CD2 ping a number of pages to warm up the site tell the load balancer to put CD2 back in the pool At the end of this process we have two updated CD servers and an update CM server and users should have experienced no downtime. We do however have downtime on the CM server. You may find you don't want to sync everything you need via unicorn so you could as ASURA says put in a manual pause in Octopus to do this between steps 6 and 7 and 10 and 11. This works well for us, is easy to manage and doesn't require switching databases but might not cut it for some sites.
How do I keep my production site online when doing deployments? I'm starting work on a new site (8.x), and I'd like to be able to eliminate downtime if possible during production deployments. What are my options for keeping my Content Delivery environment online during deployments? Code can often rely on content, so I typically end up with a delay while I wait for content to publish. Assume a separate CM server and two CD servers behind a load balancer. I've mostly used TDS, but am looking at Unicorn this time around as well (In case that's important to the solution). I'm hosting on Azure - but I'm looking for Sitecore specific details.
Previously I have seen a similar issue, if the core stylesheets are from a different version of Sitecore. This issue can typically occur, if the core stylesheets are deployed as a part of your solution, and have not been upgraded when upgrading Sitecore. Try comparing /sitecore/shell/themes/standard/default/Content Manager.css between the environments for any differences.
Overlapping Field Issue We are running into a strange issue with a Sitecore field overlapping in only one of our Sitecore 6.6 environments. We've verified that the field configuration is correct (and that the same configuration works well in other environments with the same code base). There's a div that is insisting on maintaining a 24 pixel height for just this one multilist field. Has anyone else run into this before?
Short answer, looks like the date formats are hard-coded in Sitecore.Cintel.Client.dll. Looks like you need to write a custom Transformer that uses its own TimeConverter for the views you would like to modify in the Experience Explorer. Here is a post I wrote on how to do just that. P.S: Just scroll to the bottom to get to the good stuff.
How do you change the date format in Sitecore Experience Profile journey timeline? Right now, if you click an outcome in the Sitecore Experience Profile journey timeline, the outcome details shows the time in the following format: 06.10.2016 14:49:55 Is it possible to change this to MM/dd/yyyy hh:mm:ss format? I am using Sitecore 8.1 Update 2 with xDB Cloud
I actually just discovered the answer to my own question after more poking around. Highlight the item in the Sitecore Content Explorer. From the Analyze ribbon select the Attributes button. In the Attributes dialog box that appears click the Settings tab. There is a "Disable analytics for this page" checkbox on this tab. Check it.
Is it possible to exclude some Sitecore Items from analytics tracking? Is it possible to exclude some Sitecore Items from analytics tracking? We have a few items under sitecore/Content/Sites/MySite/Third Party/ that are consumed by our support site (which does not reside in Sitecore). I want to exclude any items in the /Third Party/ folder from being tracked in Sitecore Analytics. I am running Sitecore 8.1 Update 2 and xDB Cloud
To answer your question, there are no differences in indexes between SOLR and Lucene (with the exception of the swap cores for SOLR, see Bonus Answer). What you are seeing is probably a product of too many configs activated. Let me explain. In Sitecore 8.2, the following indexes are active OOTB using Lucene: sitecore_core_index sitecore_master_index sitecore_web_index sitecore_marketing_asset_index_master sitecore_marketing_asset_index_web sitecore_marketing_definitions_master sitecore_marketing_definitions_web sitecore_testing_index sitecore_suggested_test_index sitecore_fxm_master sitecore_fxm_web sitecore_list_index social_messages_master social_messages_web In a vanilla instance, the various Lucene config files for these indexes will end with .config indicating that they are active. Their SOLR counterpart config would have a .example extension to the file. When activating SOLR, there is a fairly onorous task of having to go through /App_Config/Include folder (as well as child folders) and look for Lucene files to .disable and SOLR config files to enable by removing the .example (or .disabled or whatever you might call it) extension. However, not EVERY index is actually activated out of the box. There are three files that are also left as Lucene (and SOLR) example files: These configs, when enabled, expose a bunch more indexes: content_index_core system_index_core layouts_index_core medialibrary_index_core template_index_core content_index system_index layouts_index medialibrary_index template_index content_index_web system_index_web layouts_index_web medialibrary_index_web template_index_web These indexes are not exactly required. And when the Sitecore.ContentSearch.<Lucene|Solr>.Indexes.Shared.<db>.config files are enabled, they add a bunch more indexes to the indexing screen. I believe that this is what you are seeing. SUMMARY I would venture that the three configs above are enabled. You can probably safely disable them, if you don't want these extra indexes. However, yes, Sitecore is really going all in with indexing, so there are a lot more indexes in Sitecore 8.2. I expect this trend to continue as well. BONUS ANSWER When the SOLR Configs are enabled, and you also want to have the SwapOnRebuild functionality enabled, creating all of these SOLR cores can be a real chore. I've created a nice little cheat file for myself that can be used real easily with wget or curl. http://localhost:8983/solr/admin/cores?action=CREATE&amp;name=sitecore_core_index&amp;instanceDir=sitecore_core_index&amp;configSet=sitecore_configs http://localhost:8983/solr/admin/cores?action=CREATE&amp;name=sitecore_master_index&amp;instanceDir=sitecore_master_index&amp;configSet=sitecore_configs http://localhost:8983/solr/admin/cores?action=CREATE&amp;name=sitecore_web_index&amp;instanceDir=sitecore_web_index&amp;configSet=sitecore_configs http://localhost:8983/solr/admin/cores?action=CREATE&amp;name=sitecore_marketing_asset_index_master&amp;instanceDir=sitecore_marketing_asset_index_master&amp;configSet=sitecore_configs http://localhost:8983/solr/admin/cores?action=CREATE&amp;name=sitecore_marketing_asset_index_web&amp;instanceDir=sitecore_marketing_asset_index_web&amp;configSet=sitecore_configs http://localhost:8983/solr/admin/cores?action=CREATE&amp;name=sitecore_marketingdefinitions_master&amp;instanceDir=sitecore_marketingdefinitions_master&amp;configSet=sitecore_configs http://localhost:8983/solr/admin/cores?action=CREATE&amp;name=sitecore_marketingdefinitions_web&amp;instanceDir=sitecore_marketingdefinitions_web&amp;configSet=sitecore_configs http://localhost:8983/solr/admin/cores?action=CREATE&amp;name=sitecore_testing_index&amp;instanceDir=sitecore_testing_index&amp;configSet=sitecore_configs http://localhost:8983/solr/admin/cores?action=CREATE&amp;name=sitecore_suggested_test_index&amp;instanceDir=sitecore_suggested_test_index&amp;configSet=sitecore_configs http://localhost:8983/solr/admin/cores?action=CREATE&amp;name=sitecore_fxm_master_index&amp;instanceDir=sitecore_fxm_master_index&amp;configSet=sitecore_configs http://localhost:8983/solr/admin/cores?action=CREATE&amp;name=sitecore_fxm_web_index&amp;instanceDir=sitecore_fxm_web_index&amp;configSet=sitecore_configs http://localhost:8983/solr/admin/cores?action=CREATE&amp;name=sitecore_list_index&amp;instanceDir=sitecore_list_index&amp;configSet=sitecore_configs http://localhost:8983/solr/admin/cores?action=CREATE&amp;name=social_messages_master&amp;instanceDir=social_messages_master&amp;configSet=sitecore_configs http://localhost:8983/solr/admin/cores?action=CREATE&amp;name=social_messages_web&amp;instanceDir=social_messages_web&amp;configSet=sitecore_configs http://localhost:8983/solr/admin/cores?action=CREATE&amp;name=sitecore_core_index_swap&amp;instanceDir=sitecore_core_index_swap&amp;configSet=sitecore_configs http://localhost:8983/solr/admin/cores?action=CREATE&amp;name=sitecore_master_index_swap&amp;instanceDir=sitecore_master_index_swap&amp;configSet=sitecore_configs http://localhost:8983/solr/admin/cores?action=CREATE&amp;name=sitecore_web_index_swap&amp;instanceDir=sitecore_web_index_swap&amp;configSet=sitecore_configs http://localhost:8983/solr/admin/cores?action=CREATE&amp;name=sitecore_marketing_asset_index_master_swap&amp;instanceDir=sitecore_marketing_asset_index_master_swap&amp;configSet=sitecore_configs http://localhost:8983/solr/admin/cores?action=CREATE&amp;name=sitecore_marketing_asset_index_web_swap&amp;instanceDir=sitecore_marketing_asset_index_web_swap&amp;configSet=sitecore_configs http://localhost:8983/solr/admin/cores?action=CREATE&amp;name=sitecore_marketingdefinitions_master_swap&amp;instanceDir=sitecore_marketingdefinitions_master_swap&amp;configSet=sitecore_configs http://localhost:8983/solr/admin/cores?action=CREATE&amp;name=sitecore_marketingdefinitions_web_swap&amp;instanceDir=sitecore_marketingdefinitions_web_swap&amp;configSet=sitecore_configs http://localhost:8983/solr/admin/cores?action=CREATE&amp;name=sitecore_testing_index_swap&amp;instanceDir=sitecore_testing_index_swap&amp;configSet=sitecore_configs http://localhost:8983/solr/admin/cores?action=CREATE&amp;name=sitecore_suggested_test_index_swap&amp;instanceDir=sitecore_suggested_test_index_swap&amp;configSet=sitecore_configs http://localhost:8983/solr/admin/cores?action=CREATE&amp;name=sitecore_fxm_master_index_swap&amp;instanceDir=sitecore_fxm_master_index_swap&amp;configSet=sitecore_configs http://localhost:8983/solr/admin/cores?action=CREATE&amp;name=sitecore_fxm_web_index_swap&amp;instanceDir=sitecore_fxm_web_index_swap&amp;configSet=sitecore_configs http://localhost:8983/solr/admin/cores?action=CREATE&amp;name=sitecore_list_index_swap&amp;instanceDir=sitecore_list_index_swap&amp;configSet=sitecore_configs http://localhost:8983/solr/admin/cores?action=CREATE&amp;name=social_messages_master_swap&amp;instanceDir=social_messages_master_swap&amp;configSet=sitecore_configs http://localhost:8983/solr/admin/cores?action=CREATE&amp;name=social_messages_web_swap&amp;instanceDir=social_messages_web_swap&amp;configSet=sitecore_configs http://localhost:8983/solr/admin/cores?action=CREATE&amp;name=social_messages_master_swap&amp;instanceDir=social_messages_master_swap&amp;configSet=sitecore_configs http://localhost:8983/solr/admin/cores?action=CREATE&amp;name=social_messages_web_swap&amp;instanceDir=social_messages_web_swap&amp;configSet=sitecore_configs http://localhost:8983/solr/admin/cores?action=CREATE&amp;name=sitecore_analytics_index&amp;instanceDir=sitecore_analytics_index&amp;configSet=sitecore_analytic_configs These default SOLR Url's can assist in creating SOLR cores for the OOTB Sitecore 8.2 Indexes as well as their associated "swap" core. Note that these url's are using SOLR ConfigSets for Sitecore. Create a configset folder called sitecore_configs in your SOLR folder and put your Sitecore modified schema.xml file in there. All cores created by these url's will then use the sitecore_configs configset.
Different indexes between SOLR and Lucene? I'm having issues with getting my Sitecore 8.2 sandbox to index properly. I've been using SOLR, but on a whim decided to switch over to Lucene to see if I could get the indexing to work. When I went to rebuild my indexes, I noticed about 32 different indexes, where I have only about 20 when using SOLR. I just did an upgrade from my Sitecore 8.1 environment, and I didn't see any instructions for adding new SOLR indexes to my already existing indexes. Do I need to add all of these new indexes for my SOLR indexing?
TL;DR You can ignore the errors as long as you make sure you publish the installed items with a Full or Single Item publish. The details We have tested this and confirmed this as platform bug in 8.2 (rev 160729), when a package is installed the SaveItem event is not passed a language. This doesn't effect how Sitecore saves the item data itself, but the PublishingService saves this data to mark an item as 'needing to be published'. The service is sensitive to items that do not have a language and we have guard conditions to catch them (as they would be illegal items as far as we are concerned) so this is why the error is thrown. This needs to be fixed in the platform but we are looking to see if there is a workaround or patch we can issue but with a null language being returned with the item data we can't tell the difference between different language versions of an item being installed. Possible workaround When an item is created/edited/removed then an entry is added to the PublishOperation table. The entries in this table work in a similar way to the old Publish Queue and tell us what has changed since the last publish. Without a language being passed to the SaveItem event handler an error is thrown. The item is still installed into Sitecore but this entry is missing in the table. The result of this is that if you do a Site Publish (in old terms an incremental publish) then these recently installed items will not be marked as needing to be published and so will be skipped. If you are installing a large module where items could be in lots of different parts of the content tree then the workaround is, when you need to publish next, then to do a Full Publish (as an admin function from the Publishing Dashboard); this will publish only the changed items anyway (and the service is much faster than before!). If you are installing a package to a very specific part of the content tree then you can do a Single Item Publish (with subitems) from a parent node. This will have the same effect. Both of these methods work their way down the tree looking for changed items and don't use the PublisherOperation entries so the newly installed items will be picked up.
Error upgrading to SXA 1.1 with Publishing Service 1.8 : ItemLocator language cannot be null or empty I have Sitecore 8.2 rev 160729 installed with SXA 1.0 and Sitecore Publishing Service 1.8.0. During an upgrade to SXA 1.1 I receive the following message: ItemLocator language cannot be null or empty Parameter name: language Outlined in the upgrade guide for SXA is the following (which I have done). Remove the following files: Website\App_Config\Include\Feature\Sitecore.XA.Feature.Annotations .config Website\bin\Sitecore.XA.Feature.Annotations.dll Website\Views\Annotation\Annotation.cshtml Log error messages: ManagedPoolThread #19 20:07:15 ERROR Failed to save the item. Item ID: {AD71FACC-3C23-4DF8-A427-672020DB5612}, database: master Exception: System.ArgumentOutOfRangeException Message: ItemLocator language cannot be null or empty Parameter name: language Source: Sitecore.Framework.Publishing.Abstractions at Sitecore.Framework.Publishing.Data.Model.ItemLocator..ctor(Guid id, String language, Int32 version, Nullable`1 revision, String store) at Sitecore.Publishing.Service.PublishManager.EmitItemEvent(Item item, DateTime timestamp, ItemOperationRestrictions restrictions, PublisherOperationType operation, String itemPath) at Sitecore.Publishing.Service.PublishManager.DataEngine_SavedItem(Object sender, ExecutedEventArgs`1 e) at System.EventHandler`1.Invoke(Object sender, TEventArgs e) at Sitecore.Data.Engines.EngineCommand`2.RaiseEvent[TArgs](EventHandler`1 handlers, Func`2 argsCreator) at Sitecore.Data.Engines.EngineCommand`2.Execute() at Sitecore.Data.Engines.DataEngine.SaveItem(Item item) ManagedPoolThread #19 20:07:15 ERROR Error installing items/master/sitecore/templates/Branches/Feature/{AD71FACC-3C23-4DF8-A427-672020DB5612}/en/1/xml Exception: System.ArgumentOutOfRangeException Message: ItemLocator language cannot be null or empty Parameter name: language Source: Sitecore.Framework.Publishing.Abstractions at Sitecore.Framework.Publishing.Data.Model.ItemLocator..ctor(Guid id, String language, Int32 version, Nullable`1 revision, String store) at Sitecore.Publishing.Service.PublishManager.EmitItemEvent(Item item, DateTime timestamp, ItemOperationRestrictions restrictions, PublisherOperationType operation, String itemPath) at Sitecore.Publishing.Service.PublishManager.DataEngine_SavedItem(Object sender, ExecutedEventArgs`1 e) at System.EventHandler`1.Invoke(Object sender, TEventArgs e) at Sitecore.Data.Engines.EngineCommand`2.RaiseEvent[TArgs](EventHandler`1 handlers, Func`2 argsCreator) at Sitecore.Data.Engines.EngineCommand`2.Execute() at Sitecore.Data.Engines.DataEngine.SaveItem(Item item) at Sitecore.Data.Managers.ItemProvider.SaveItem(Item item) at Sitecore.Data.Managers.DefaultItemManager.ExecuteAndReturnResult[TArgs,TResult](String pipelineName, String pipelineDomain, Func`1 pipelineArgsCreator, Func`1 fallbackResult) at Sitecore.Data.Managers.DefaultItemManager.SaveItem(Item item) at Sitecore.Data.Items.ItemEditing.AcceptChanges(Boolean updateStatistics, Boolean silent) at Sitecore.Data.Items.ItemEditing.EndEdit(Boolean updateStatistics, Boolean silent) at Sitecore.Install.Items.ItemInstaller.GetVersionInstallMode(PackageEntry entry, ItemReference reference, XmlVersionParser parser, ItemInstallerContext context, Boolean&amp; removeVersions) at Sitecore.Install.Items.ItemInstaller.InstallEntry(PackageEntry entry) Update While waiting for a future release to come out that addresses the bug called out by Stephen, I've taken the following steps to ensure proper installation of packages. I needed to do this because the SPE module installation would halt as soon as the error was encountered. Disable Sitecore.Publishing.Service.config Install Sitecore PowerShell Extensions module (or any module that encounters the error) Enable Sitecore.Publishing.Service.config
Because you want to keep the content in the Master database, but you do not want to publish it to the web database, this may be a good opportunity to use Workflow. If you're using Workflow on these pages Here's how to fix your issue: Establish which Workflow your fr-FR pages are using. In that Workflow, create a new Workflow state called &quot;Archived&quot; or &quot;Disabled&quot;. Make sure the Archived State's Final field is not checked off. Use C#, Sitecore Rocks, or Powershell to set the Workflow State value of all fr-FR Item versions to the &quot;Archived&quot; state created above. Example Routine: public class Example { public void Process() { var database = Sitecore.Configuration.Factory.GetDatabase(&quot;master&quot;); var language = Language.Parse(&quot;fr-FR&quot;); var items = database.SelectItems(&quot;/sitecore/content//*&quot;); foreach (var item in items) { var localized = item.Database.GetItem(item.ID, language); SetWorkflowState(localized); var olderVersions = localized.Versions.GetOlderVersions(); foreach (var version in olderVersions) { SetWorkflowState(version); } } } private void SetWorkflowState(Item item) { item.Editing.BeginEdit(); item.Fields[FieldIDs.WorkflowState].Value = DisabledWorkflowStateId; item.Editing.EndEdit(); } } I'm sure a powershell ace will add the equivalent in Powershell here. If you're not using Workflow Yet You must first set the Workflow for these Page Templates in their Standard Values, then you can proceed as above. Don't Forget to Publish! You'll probably want to run a full-site smart Publish to remove the fr-FR language content from the site - Keep in mind that you only need to publish the fr-FR language, which should keep your smart-publish burden down.
"Unpublishing" a Language from a site There are currently five languages defined in a v7.2 site: en, en-GB, fr-FR, de-DE, en-AU, and zh-CN. Marketing has decided they no longer want to translate to fr-FR and would like to remove it from the site, however not lose all of the links. The site will be upgraded to 8.x soon (most likely 8.2) and we'd like to utilize language fallback to have the fr-FR fallback to en-GB. Conceptually, we know how to set this up on the languages and templates, but how to we bulk "unpublish" all of the fr-FR versions of our items? Update: The intention isn't to completely remove the language versions, just unpublish them so they are no longer in the web database. Looking at the publishing restrictions fields, they are all shared.
What we discovered after hours of troubleshooting is that there was a corrupted message in the queue. When we removed that one message, the rest of the messages were processed properly. I had to re-implement https://www.akshaysura.com/2015/05/01/add-max-message-limit-for-rabbitmq-for-coveo/ on the newer version of the CES and RabbitMQ in order to limit the damage in the future.
Coveo Rabbit MQ queues for Master and web Full Coveo Rabbit MQ on the Master CES server are getting loaded with over a million items and its causing CES to consume all the harddrive space on the CES Server. Soon after that the indexes go into the Read only mode. We tried deleting the million plus queue items but they keep reloading. Has anyone else faced this?
As I understand, your question is about the possibility not to include some parent items in a TDS project at all. I agree that it would have been nice if such items were not duplicated on the file system and you wouldn't see the same item being changed twice in the same commit to your code repository. TDS uses Sitecore's native serialization format and structure. It requires that the whole item path starting from root-level items (such as /sitecore/content and /sitecore/layout), and down to the particular node-level items, are all serialized to disc as *.item files. There is no way around it. The standard approach with TDS is to: Include such items in both projects; Set the item's "Item Deploy" field to "Deploy Once" in the Deployment Property Manager; Configure Multi-Project Properties so that your test content project has the main project listed in "Package bundling". This is a good practice, since you're effectively defining a project dependency this way and make sure the items from the main TDS project always get deployed along with your test content. If you would like to avoid syncing every TDS project to get changes of the same item, you can use the new TDS 5.5 feature "Sync all projects using history".
How to set a TDS item to 'not sync', even locally? In our typical setup, we try to keep a TDS project that has test content for the developers, while a separate TDS project contains the essential solution architecture such as renderings and templates. However, because of the parent/child structure in the project, sometimes top level items are required to be in both projects (such as sitecore\content). We have it there because it's required as a parent, but we want to make sure only one project is actively being updated for that item.Is there a way to specify in a project to 'never sync' a certain item? Even when a user sync's the whole project? NOTE: I understand 'Exclude' can be used for build configurations, but that excludes the whole subtree. In this case, we just want a specific parent to be ignored.
In TDS, the current way to only push part of an item, but not the whole thing is to use Field Level Deployments. For each item, right click on it and select 'Field Level Deployment'. Now select each of the fields, for each language that you wish to push. (Note: Ensure that the item is also marked as 'DeployOnce', not 'AlwaysUpdate' so that the full item is not pushed on deployment). I understand this could take a lot of time if you have a lot of items.... however this sounds more like deploying content items with TDS, instead of developer items, which isn't ideal anyway.
Generating a TDS content item package that has certain items in only one language A client has an unusual process where a small subset of their content items are stored in their code repository in a TDS project. The project is multilingual. Currently, changes to several of these content item are approved only in one language. So during the next couple of weeks, for all deployments, the client wants these items to be updated only in a single language, with all other language version remaining as they are. Is there a way to set up several specific items in TDS so that when a package is created, only one particular language version of these items will be included in the package?
There is a reliable fix. Go to Tools→Options→TDS Options and set Background Cache Loading to False. Restart Visual Studio. Set Background Cache Loading back to True. Errors will stop after these steps—courtesy of Angel from TDS support. The errors are caused by broken cache files. Changing the Background Cache Loading makes TDS rebuild the cache from scratch, hence fixing the issue.
Duplicate item errors when syncing a TDS project I am getting the following error messages when syncing a TDS 5.5 project: Item template with path ... already exists Found duplicate id ... for item ... and ... in project. Please remove one of these items from your project before attempting to sync with Sitecore. This error happens for many items, and there are definitely no duplicates—neither in the project file, nor on disk. This might have begun after I updated TDS to a newer version. How do I fix these errors?
You've seen the "Optimize SQL Server Performance" section (Not Applicable to Azure SQL) at https://doc.sitecore.net/sitecore_experience_platform/setting_up__maintaining/xdb/session_state/walkthrough_configure_a_shared_session_state_database_using_the_sql_server_provider as it relates to Session state? While no silver bullet, that approach can improve session management perf with SQL Server and we've been successful with that on a few occasions. Know that TempDB is recreated at service restart and the permissions [sql login to db user mapping] will be gone, so a better implementation involves scripting these permissions as an extension to SQL restart. We've also been known to isolate Private and Shared session state into their own SQL Server databases. That could help you isolate your issue, perhaps? More generally to your question, theoretically a load of significant size could raise perf problems with any aspect of Sitecore. I know that doesn't specifically help you, but using SQL Profiler or an APM tool (AppDynamics or NewRelic?) can assist in diagnosing this. You've probably done that and found the GetItemExclusive bottleneck, so I'm curious about underlying SQL Server architecture.
Performance problems with the Sitecore SQL Session Provider Has anyone seen any performance problems with Sitecore SQL Session Provider? We are noticing some problems with blocking queries under load, specifically the GetItemExclusive stored proc.
Yea. Change your code to this: var templatePath = "User Defined/Project/Common/Content Types/Links"; var template = TemplateManager.GetTemplate(templatePath, Context.Database); If your path starts with "/", Sitecore will assume it to be absolute.
TemplateManager.GetTemplates always returning null Got the following call: var templatePath = "/User Defined/Project/Common/Content Types/Links"; var template = TemplateManager.GetTemplate(templatePath, Context.Database); This is always returning null. I have checked the template path and can confirm 100% it is correct, the database is also present. This issue is happening in 8.2 any ideas on what I might be missing? Immediate Window Debug Information Context.Database {web} Aliases: {Sitecore.Data.AliasResolver} ArchiveNames: Count = 2 Archives: {Sitecore.Data.Archiving.DataArchives} Branches: {Sitecore.Data.BranchRecords} Caches: {Sitecore.Data.DatabaseCaches} ConnectionStringName: "web" DataManager: {Sitecore.Data.DataManager} DataProviders: Count = 1 Engines: {Sitecore.Data.DatabaseEngines} HasContentItem: true Icon: "Images/database_web.png" Items: {Sitecore.Data.ItemRecords} Languages: {Sitecore.Globalization.Language[1]} Masters: {Sitecore.Data.BranchRecords} Name: "web" NotificationProvider: null Properties: {Sitecore.Data.DatabaseProperties} Protected: false ProxiesEnabled: false ProxyDataProvider: {Sitecore.Data.SqlServer.SqlServerProxyDataProvider} PublishVirtualItems: true ReadOnly: false RemoteEvents: {Sitecore.Data.Eventing.DatabaseRemoteEvents} Resources: {Sitecore.Resources.ResourceItems} SecurityEnabled: true "sitecore": sitecore (en#1@web), id: {11111111-1111-1111-1111-111111111111} Templates: {Sitecore.Data.TemplateRecords} WorkflowProvider: null TemplateManager.GetTemplate("/sitecore/Templates/User Defined/Project/Common/Content Types/Icon Links", Context.Database) null TemplateManager.GetTemplate("/sitecore/templates/User Defined/Project/Common/Content Types/Icon Links", Context.Database) null TemplateManager.GetTemplate("User Defined/Project/Common/Content Types/Icon Links", Context.Database) null Snip of item path, on web database. Update TemplateManager.GetTemplate("/sitecore/templates/System/Templates/Standard template", Context.Database) null Using immediate window to try and get standard template also fails.
When syncMaster strategy initializes, it subscribes to all the Sitecore item events (e.g. ItemCopied, ItemMoved etc) and executes its Run method every time event is fired. public void Initialize(ISearchIndex index) { CrawlingLog.Log.Info(string.Format("[Index={0}] Initializing SynchronousStrategy.", index.Name), null); ... EventHub.ItemCopied += delegate(object sender, EventArgs args) { this.Run(events.ExtractParameter<ItemUri>(args, 0), true); }; } So when the item is changed (moved/deleted/added...), Run method is executed. It checks whether it should break the operation (database names different from what is defined, bulk update mode or indexing is paused) and checks if item is under the root of the index. Only if those conditions are met, IndexCustodian.UpdateItem method is executed. public void Run(...) { if (this.NeedBreakOperation(itemUri.DatabaseName)) { return; } if (!this.IsItemUnderCrawlerRoot(itemUri)) { return; } ... IndexCustodian.UpdateItem(this.index, indexableInfo); }
How does indexUpdateStrategy "syncMaster" behave on Solr with defined root? We've got a client with a Solr index, the index is updating fine but the frequency of updates seems a little high - I wondered (before digging in to this myself) if anyone knew exactly how the syncMaster strategy works? If you have a defined root and content in the master db gets updated outside of that root - I presume that the index doesn't update? Does it add a job to check? Or does it skip the job creation? Here's the config: <configuration type="Sitecore.ContentSearch.ContentSearchConfiguration, Sitecore.ContentSearch"> <indexes hint="list:AddIndex"> <index id="my_assets_master_index" type="Sitecore.ContentSearch.SolrProvider.SolrSearchIndex, Sitecore.ContentSearch.SolrProvider"> <param desc="name">$(id)</param> <param desc="folder">$(id)</param> <!-- This initializes index property store. Id has to be set to the index id --> <param desc="propertyStore" ref="contentSearch/indexConfigurations/databasePropertyStore" param1="$(id)" /> <configuration ref="contentSearch/indexConfigurations/defaultSolrIndexConfiguration" /> <strategies hint="list:AddStrategy"> <!-- NOTE: order of these controls the execution order --> <strategy ref="contentSearch/indexConfigurations/indexUpdateStrategies/syncMaster" /> </strategies> <commitPolicyExecutor type="Sitecore.ContentSearch.CommitPolicyExecutor, Sitecore.ContentSearch"> <policies hint="list:AddCommitPolicy"> <policy type="Sitecore.ContentSearch.TimeIntervalCommitPolicy, Sitecore.ContentSearch" /> </policies> </commitPolicyExecutor> <locations hint="list:AddCrawler"> <crawler type="Sitecore.ContentSearch.SitecoreItemCrawler, Sitecore.ContentSearch"> <Database>master</Database> <Root>/sitecore/media library/My Asset Folder</Root> </crawler> </locations> </index> </indexes> </configuration>
Please have a look at my answer to this question: How do I display an error dialog from content editor command? As far as I remember in Sitecore 8 support for Sheer has been droped in favour of Speak.
It does not appear that i can use SheerResponse.Confirm in Sitecore 8. What can I use? I have been trying to display a message inside a StandardValidator but when I use SheerResponse.Confirm i receive a null object exception in Sitecore 8. What should I use instead? private ValidatorResult IsValid(Item item) { //ClientPage in null Context.ClientPage.ClientResponse.Alert(String.Format(Sitecore.Globalization.Translate.Text(DictionaryKeys.EventCardCollectionNotSavedErrorMessage))); //throws null object exception SheerResponse.Confirm return ValidatorResult.Valid; } Thanks, Charlie
The Sitecore.CodeGenerator project can convert serialized Sitecore items into GlassMapper classes, and it contains support for the Rainbow serialization format (used by Unicorn 3). The project page has step-by-step instructions on how to install and configure it.
Using Unicorn to Generate Glass Mapper Models How can I use Unicorn to generate Glass Mapper models for my Sitecore items?
The package was renamed on nuget, what you want is the mongocsharpdriver package. You can get 1.10.0.62 by using: Install-Package mongocsharpdriver -Version 1.10.0 That package contains boths MongoDB.Driver.dll and MongoDB.Bson.dll. Here is the nuget page for the older project: https://www.nuget.org/packages/mongocsharpdriver/ Which has now been renamed to: https://www.nuget.org/packages/MongoDB.Driver/
Where can I find the NuGet package(s) for MongoDB required by Sitecore 8.1 (update 3) I've done an upgrade of Sitecore 8 to 8.1 update 3. I notice that this version of Sitecore references version 1.10.0.62 of MongoDB.Bson and MongoDB.Driver. Where can I find these NuGet packages? I've looked on nuget.org but that only seems to have version 2 onward.
It looks like your problem is the 1x being before the hash parameter - that part doesn't need to be included in the hash. Try changing to this: <img class="callout-grid__image" srcset="@Sitecore.Resources.Media.HashingUtils.ProtectAssetUrl(string.Format("{0}?w=300", Model.GlassModel.CalloutImage.Src)) 1x, @Sitecore.Resources.Media.HashingUtils.ProtectAssetUrl(string.Format("{0}?w=300", Model.GlassModel.CalloutImage.Src)) 2x" alt="@Model.GlassModel.CalloutImage.Alt"> The 1x and 2x should be after the Url, whereas the hash query string is part of the Url. This change would produce the url like this: <img class="callout-grid__image" srcset="http://url/imagename.jpg?w=300&amp;hash=8628BA4B70220C694175BAD0EDA760C280B00BC4 1x, http://url/imagename.jpg?w=600&amp;hash=8628BA4B70220C694175BAD0EDA760C280B00BC4 2x" alt="The Alt Text">
Sitecore Media request Protection hashing with srcset attribute I'm looking to implement hashing on images that we are resizing manually in the cshtml file. I've looked at a few articles on how to do this and ended up with the following <img class="callout-grid__image" srcset="@Sitecore.Resources.Media.HashingUtils.ProtectAssetUrl(string.Format("{0}?w=300 1x", Model.GlassModel.CalloutImage.Src)), @Sitecore.Resources.Media.HashingUtils.ProtectAssetUrl(string.Format("{0}?w=300 2x", Model.GlassModel.CalloutImage.Src))" alt="@Model.GlassModel.CalloutImage.Alt"> This outputs the url with the hash in it but the image doesn't show. I get the error below in the console: Failed parsing 'srcset' attribute value since it has an unknown descriptor. The image url renders like this: http://url/imagename.jpg?w=300 1x&amp;hash=8628BA4B70220C694175BAD0EDA760C280B00BC4 I assume that the invalid attribute is the hash. Is there a way to have the hash on a srcset attribute?
Yes, the presentation values of Item A are stored as an XML construct in the raw values of the Renderings field. You can see that field here: If you follow the blue arrows and click on Raw Values you'll see: Raw Values Method Select the rendering field value, copy, and then in Item B, do the same thing, but PASTE the field value there. Turn off Raw Values, and you should see the presentation on both Items now. Editor Method You can also use the Copy To dialogue as well. Which has been there forever, and I always forget about it. SPECIAL NOTE While this is the direct answer to your question, there is an architectural viewpoint that must be considered. Generally, adjusting presentation on Items directly is frown upon, because you break the association that it might have with the Template Standard Values that the Item derives from. In those cases, generally you only muck with Final Renderings on the item itself, and Renderings on the Template Standard Values that the Item is made from. For more information on that, take a peek at Sitecore's documentation on editing the layout of an item.
Possible to copy the presentation details of one item to another? From the content editor, is it possible to copy the presentation details, renderings, layout, etc.. from Item A and paste onto Item B? I'd like to avoid creating a duplicate of A and then resetting the content field values manually.
This is hard to answer because it's really several questions at once. To start with, YES Unicorn 3 handles things much better because it has more control over its serialization system. Unicorn 2 is a bit hamstrung because it's using the built in APIs which have some fun bugs. Unicorn 2.x should, however, support most kinds of renaming without issue. If your items are deeply nested, that could cause issues (the way Sitecore's serialization format handles long paths is ugly). Check your configuration and make sure the config files are unmodified. If you're using the same dataFolder\serialization root folder that Sitecore serialization uses, the "Dump Tree" button on the Developer tab of the ribbon should dump a single tree for you, making sure it's all serialized. If you have a different root, you'll need to reserialize but that dumps the whole thing. In Unicorn 3.x, it takes over the (dump/serialize) tree and item for items it knows about, enabling just this use case.
Unicorn (2.0.4) issue when renaming items We faced the following issue with Unicorn serialisation and I wanted to share it just in case someone has a better solution/workaround to it. We are using Unicorn 2.0.4 on a project where we cannot (at least by now) upgrade to Unicorn 3. When an item is renamed on Sitecore, unicorn doesn't detect it and *.item files remain on disk with their original names and content with the following attributes: path: Pointing to the original path which is wrong parent: Pointing to their parent Id which is right as the id didn't change in the rename. Moreover, if the renamed item has children then the *.item files representing those children are not updated either. They are kept in a folder with the old name and with their "path" attribute pointing to the wrong path. If the developer has several *.item files with changes to be comited it is easy commit them without realising about the issue in which case the changes are lost. Things can get even worse if additional changes are done to the renamed item (or its children) then Unicorn create new *.item files only for those items that are updated. If there are other descendant not being updated then their associated *.item file is not created. This scenario makes more difficult to detect the missing items and more time consuming to fix it. Once the issue is detected then we need to make sure all items in a subtree are serialised. The only way (I know) to do it is by manually modifying all descendants, one by one, which implied: Edit any field Save the item Restore the field to its original value Save the item again Once all items have been serialised, we have to delete the old *.item to avoid duplications when reverting serialised items. My main questions are: Does anyone know a way to make Unicorn detect item re-naming? Is there an easy way (without changing serialisation configuration) to make Unicorn serialise an item with its children? Additional questions are: Does Unicorn 3 handle this scenario better? Does TDS have this issue?
Alhough the information from Chris was very useful - and the issue is a registered bug now - I do want to share the workaround that we found. In the Sitecore content editor, as an admin locate the /settings/Buckets/Item Bucket Settings item. The first field is "Show Results in". Here you can choose how you want items from a bucket search to be displayed in the content editor. The default option is a new tab: New tab (default) New editor window : will open the item in a new window within the content editor environment New tab not selected: same as new tab but without setting the selection to it Note that this setting is for all buckets in your instance. Our workaround was to change this to "New Content Editor". The user experience for editing these items in the content editor was slightly changed this way, but the bug was no more.
Editing bucketed items with multiple versions in the content editor The issue is located in the content editor (using Sitecore 8.1-upd1 btw): we search for an item inside a bucket and go to it (it opens in a new tab in the requested version - here v3) - lets call this 'item1' we navigate to any other item outside the bucket we go back to our bucket we click on the tab (which is still there) with our first 'item1' this 'item1' is now shown in version 1, even if it does not exist anymore Does anybody know a fix for this? Is it still the case in later versions? And: is there maybe another way of viewing/editing bucketed items that we can use to work around this issue? Update: as this is a known bug now - is there another way to edit the items and keep the search interface for the editors?
Rather than an item named product, create an item named products that represents the entire collection, and then create a child item named * to represent any individual product. Wildcard items will be resolved with any path that doesn't match an existing item, so if your tree is: /products /products/example /products/* A request to http://example.com/products/example will get you the /products/example item, whereas a request to http://example.com/products/123 will get you the /products/* item. With your items named appropriately, it then makes sense that a request to http://example.com/products would return some sort of collection view of all products, whereas http://example.com/products/123 would return the details for the product with an ID of 123. It will be up to you to parse the current URL for the ID of the product. Additionally, you will need to manually handle 404 errors, as Sitecore can't tell whether or not a given path is meant to exist. As far as assigning renderings, presentation details set on the * item will be applied to the given request.
Passing a parameter to controller rendering through URL I have a component on my page that is a controller rendering and I'd like to pass a parameter in through the URL, but not as a query string parameter. So, instead of site.com/product?id=123, I want: site.com/product/123 /product is a valid page with a layout and renderings, but when I try to go to /product/123, I naturally get "document not found". Do I just need to add a custom route for this page in the initialize pipeline? I should know this, but, alas, I don't.
Upgrade Script: ConvertUsersToContact.aspx This script utilizes the standard Task Manager in Sitecore in order to process contacts. If for some reason, you have the processing\taskManager disabled, stopped, or otherwise not activated, the ConvertUsersToContact.aspx will hang on Task is waiting for processing. private string GetStatusString(ProcessingTaskStatus status) { switch (status) { case ProcessingTaskStatus.New: return "Task is waiting for processing"; case ProcessingTaskStatus.Processing: return "Processing..."; case ProcessingTaskStatus.Processed: return "Completed"; case ProcessingTaskStatus.Failed: return "Failure. See log file for details"; default: return string.Empty; } } Contextual Information: With the advent of xDB in Sitecore 8, there are now two repositories that contain user/contact/visitor information. In Sitecore, one is the User profiles These are the actual user accounts that Sitecore uses stored via the Membership provider mechanism. These are identified via a domain/ and can have custom profile information stored with them. And they have an email address. In xDB, they are called Contacts. Contacts are identified by usually an email address and monitor and track interactions and page visits. Contacts contain a unique ID (GUID) that are key associated to the Interactions. (Note: this means that you could have multiple contacts with the same Email Address, but different Contact ID's. Out of scope of this answer) xDB can have custom facets for storing additional information. Enter ECM/EXM: In Legacy ECM, there was no such thing as xDB, so the only user profile was from the membership provider. When ECM would create the user (say if you imported through CSV file), the User Name was in the manner of domain/emailaddress_at_somedomain_dot_com In EXM, EXM now uses xDB Contacts as the main contact record. Generally (OOTB) the email address is considered the primary identifier, especially when using the List Manager CSV upload (it can be changed though). ONE BIG NOTE ABOUT IDENTIFIERS When using the conversion tool above, notice the create user logic below: namespace Sitecore.Analytics.Conversion.UserToContact.ConversionLogic { public class UserToContactConvertor { public ProcessingResult Convert(Guid itemId) { User user = this.GetUser(itemId); if ((Account) user == (Account) null) return ProcessingResult.Processed; ContactRepositoryBase contactRepositoryBase = Factory.CreateObject("tracking/contactRepository", true) as ContactRepositoryBase; Assert.IsNotNull((object) contactRepositoryBase, "tracking/contactRepository"); LeaseOwner owner = new LeaseOwner("UserToContactConvertor", LeaseOwnerType.OutOfRequestWorker); LockAttemptResult<Contact> lockAttemptResult = contactRepositoryBase.TryLoadContact(user.Name, owner, TimeSpan.FromMinutes(1.0)); Contact contact; switch (lockAttemptResult.Status) { case LockAttemptStatus.Success: contact = lockAttemptResult.Object; break; case LockAttemptStatus.NotFound: contact = contactRepositoryBase.CreateContact(itemId); contact.get_Identifiers().set_Identifier(user.Name); break; default: return ProcessingResult.Postpone; } //snip } } } Notice here that, if the contact is not found LockAttemptStatus.NotFound, the creates a Contact and sets the identifier as the User.Name. I bring this up, because if at any point in time in the future, you load up a List from List Manager's CSV upload using the email address as the identifier, or you utilize the Tracker.Current.Session.Identify(string identifier) from the website using email address as the identifier, you will effectively have two distinct contacts with different identifiers.
Converting users to contacts when upgrading from v7.5 to v8.0 We have a v7.5 instance that we are going to upgrade to v8.1-3. Current we have ECM 2.2 installed and we have used it a bit. We have a large number of users that have been imported in to the system through ECM. We have made the decision to remove ECM 2.2 from our instance (because the ECM to EXM upgrade is a nightmare), upgrade to v8.1-3 then install EXM 3.3 and sort of start over. However we don't want to lose the users that have already been imported. It is my understanding that as part of the ECM to EXM upgrade there is a utility called ConvertUsersToContacts.aspx that is run. Should I run this utility as part of my upgrade from v7.5 to v8.0 even though we will have removed ECM 2.2? I just finished my upgrade from v7.5 to v8.0 (haven't gone all the way to 8.1-3 yet) and I have tried running it. However the page doesn't seem to do anything. It just sits there and refreshes every 4 seconds saying "Task is waiting for processing". I don't get the sense that it is doing anything. Any guidance or direction here would be a great help. Thanks, Corey
In de HttpPost action method, capture your file by using a model object as parameter that has a property of the type HttpPostedFileBase with the same name as your input file field. // The model public class MyModel { public HttpPostedFileBase UploadedFile { get; set; } } // The action method [HttpPost] public ActionResult MyAction(MyModel model) { var file = model.UploadedFile; } In the view you posted, only the name attribute is missing to comply with this example code. <input value="choose file" type="file" id="bulk-upload" name="UploadedFile">
Posting a file to a controller action in Sitecore I want to post a file to a controller/action in my Sitecore project via a "file" input tag. <input value="choose file" type="file" id="bulk-upload"> I see examples, similar to below, online using forms. Is there a better/other way to do this? @using (Html.BeginForm ("file", "upload", FormMethod.Post, new { enctype = "multipart/form-data" })) 
At the very least, you'll want the Sitecore.Kernel assembly which contains the core API and most of the utilty classes you will use when working with Sitecore: Sitecore.Kernel For working with MVC, grab the MVC package: Sitecore.Mvc If you are going to be using ContentSearch and will work with Lucene indexes, you can get: Sitecore.ContentSearch.Linq.Lucene Each of these packages has a .NoReferences suffix variant which will get that single assembly and reference no other packages.
Which Sitecore Nuget Package should I use? If I am starting a basic Sitecore MVC project, which package(s) should I install? The main Sitecore package seems like overkill. For now I will just be creating some basic components, though some will probably need to use the Content Search APIs. I have read the doc page and this blog from Jeremy Davis, but I haven't found anything that identifies the best meta-packages to use for common taks.
You can't mix configuration methods in Glass Mapper. Your IPage model is using attribute configuration but your IGlassBase model is using fluent configuration. Remove the SitecoreField attributes from your IPage properties or add SitecoreField attributes to all of your IGlassBase properties and remove your fluent configuration map.
Glass Models not populating We are int he process of upgrading out solution and found that some of our glass models are not populating. IPage implementations are not showing up values in the IGlassBase. Here are the sample models: IPage public interface IPage : IBasePage { [SitecoreField] string Title { get; set; } [SitecoreField] string Body { get; set; } } IGlassBase public interface IGlassBase { Guid Id { get; set; } Language Language { get; set; } int Version { get; set; } Guid BaseTemplateIds { get; set; } string TemplateName { get; set; } Guid TemplateId { get; set; } string Name { get; set; } string Url { get; set; } } GlassGlassBaseMap public class GlassGlassBaseMap : SitecoreGlassMap<IGlassBase> { public override void Configure() { Map(x => { x.AutoMap(); x.Info(y => y.BaseTemplateIds).InfoType(SitecoreInfoType.BaseTemplateIds); }); } }
In order to remove the properties in the WFFM editor for custom fields, you need to inherit from your base control and then provide new implementations for the properties but do not specify any attributes. To hide all fields in the List section you need to provide new implementations of all fields with [VisualCategory("List")] attribute set. For example, you can hide the Items, Selected Value and Empty Choice properties by creating a custom field with the following implementation. public class CustomDropList : Sitecore.Form.Web.UI.Controls.DropList { public new ListItemCollection Items { get { return this.items; } set { this.items = value; } } public new string EmptyChoice { get { return false.ToString(); } } public new ListItemCollection SelectedValue { get { return this.selectedItems; } set { this.selectedItems = value; } } } When you create the item in Sitecore for your Custom Field, make sure Assembly and Class fields match your custom implementation. This is what is used in the form designer, even if your solution is using MVC. Be sure to specify the correct MVC Type as well though if required for the the front end.
How do I prevent a WFFM field from displaying inherited properties? I am creating a custom dropdown field for WFFM (SC 8.1 MVC). I've got it working nicely. However I am populating the data from an external API and I want to prevent content editors from thinking they can add Sitecore items to it from the form properties in the form designer. My code ignores these items and clears them, but It's not a great user experience for content editors. I'm inhering from droplist like so: public class MyDropDownListWebForms : DropList { } I've tried inheriting from ListControl or BaseUserControl instead but I don't want to loose all the properties, just the list items selection.
To do this quickly using PowerShell, without any new tools, see snippet below. It will handle dated packages generated by TDS as well. # use name of package without .update extension $packageName = "MyPackage" get-childitem -recurse -filter "*.config.$($packageName)*" | ? {$_.FullName -notmatch "\\temp\?"} | % { Move-Item $_.FullName $_.FullName.Substring(0, $_.FullName.LastIndexOf(".")) -Force }
Activate all configs after installing Update Package After installing a Sitecore Update Package via the Update Installation Wizard, there is still a manual step required to active any config files that would be overwritten. Does anyone have a script or other means of activating them all quickly, for cases where you are confident in your config management?
I disabled the Coveo config files in the Coveo folder in App_Config\Includes, by appending .example to the end of each of them. I restarted the website and was able to access the content editor just fine. I may have been able to download and install the Coveo Sitecore package, but I have not tried that. Will update this if I do.
Loading Content Editor Leads to A Coveo Licensing Error The site was recently upgrdaded to 8.1 and although I can access the Desktop, the content editor throws an error when launched. This is a local instance of Sitecore that uses Coveo. After all the database restoration, getting the project working etc. - I go to open the Content Editor only to get a "Could not retrieve Coveo for Sitecore license" message. The Coveo license is in the same folder as the Sitecore license (which is correct since Sitecore login works just fine). I cannot seem to update the Coveo license via the control panel - there is no option to do so. In fact, I don't even need Coveo to do the work I am trying to get done, I just want to get into the Content Editor - any suggestions?
Change your build target from 4.5 to 4.5.2 in your project properties. The MS dependencies will not be compatible with 4.5 since that is now unsupported. So it can't find a dependency that matches your project target and fails.
Dependency issue in 8.1u3 NuGet package Using a blank .NET 4.5 web project, the Sitecore NuGet package from https://sitecore.myget.org/F/sc-packages/api/v3/index.json for 8.1.160519 (u3) fails to install with the error message: Unable to find a version of 'Microsoft.AspNet.WebApi.Core' that is compatible with 'Microsoft.AspNet.WebApi.Cors 5.1.2 constraint: Microsoft.AspNet.WebApi.Core (>= 5.1.2 &amp;&amp; < 5.2.0)'. The issue appears to affect several of the component packages depended on by the 'Sitecore' package. Has anyone installed the NuGet package for this version successfully, or found a way around this dependency issue?
I'm not sure you're going to find a silver bullet for this. The primary problem with building a generic solution for an ETag/Last-Modified feature in Sitecore is that cache invalidation is hard. So, unless you already have a strategy in place for handling cache eviction for all of the items you mentioned (page-level item, datasources &amp; dynamic search results) you won't be able to avoid recalculating the value for your ETag/Last-Modified header on dynamic pages. That said, if you're OK with performing that recalculation on each page request, and simply want to save some bytes in transmission when the client performs a HEAD/GET 'If-Not-Modified*' request, you can certainly do that. My recommendation would be to do this with an HTTP Module - you should be able to hook into the EndRequest event, perform your ETag calculation, and then add your custom ETag or Last-Modified header there. Further information exists in MSDN as well: https://msdn.microsoft.com/en-us/library/ms227673.aspx NB: This will only work if you don't flush your headers prior to the EndRequest event being fired. Once the headers are sent, you can't modify them, so be sure you're not manually flushing them anywhere else in the application earlier in the ASP lifecycle.
ETag or Last-Modified on sitecore pages How to implement ETag or Last-Modified on sitecore pages (not media library) Based on the page item, rendering datasources, index search results having changed. Get a hash of the generated page content for the ETag? Or get the last modified date out of the page, each rendering data source last modified date, and search result last modified date?? Return a 304 if the ETag or Last-Modified date hadn't changed. Either would work. Ideally would prefer not to have to process the entire request to see if has modified. But still worth doing to save bandwidth.
In my humble Opinion 3 is the best as it works out of the box, no modules required, no code required and what is more important you do not rely on LinkDatabase which can be sometimes outdated. Option 1 If you can use Sitecore PowerShell Extensions for that. Here you go, complete code snippet $item = Get-Item -Path "/sitecore/templates/Project/Playground/Page" [Sitecore.Globals]::LinkDatabase.GetItemReferrers($item,$true) | %{ $_.GetSourceItem()} | ? { $_.Name -eq "__Standard Values"} Option 2 You can easily translate it into C# code and run it in some aspx page to display results. var item = Sitecore.Data.Database.GetDatabase("master").GetItem("/sitecore/templates/Project/Playground/Page"); var itemReferrers = Sitecore.Globals.LinkDatabase.GetItemReferrers(item, true) .Select(link => link.GetSourceItem()) .Where(i => i.Name.Equals("__Standard Values")); Option 3 Using modified @dan-solovay approach, get results using Sitecore query: Open url: http://domain/sitecore/shell/default.aspx?xmlcontrol=IDE.XPath.Builder Run query: /sitecore/templates//*[@@name = '__Standard Values' and Contains(@__Masters, '{92CF4650-4D5C-4A55-9A56-651858682E6D}')] PS. Don't forget to change an ID ;)
How can I find all usages of template in insert options? Doing a template refactor, I wanted to add a new base template and move a lot of scattered functionality to this template, including insert options. I did not know exactly where one specific template was configured as an insert option, so I checked the "Navigate" -> "Links". However, every content item using any template that had this single template as an insert option showed up in the list of links (apologies for the large black boxes; had to blank out client content): I could browse through this list and find all of the "__Standard Values" items, but that's not very smart (I'm a human, I could very easily miss one or more). Is there a way for me to do a smarter search? Sitecore 7.2 rev 140526
First and foremost, WFFM's email editor is really just an RTE field. If your toolbar is missing, but your errors are not related to the issue (doesn't look like they are) then the issue is likely with your Html Editor Profi.e Start by verifying that all of the items that should be there are present for the Rich Text Mail profile that is included with WFFM. This profile should be installed at the path /sitecore/system/Settings/Html Editor Profiles/Rich Text Mail, in the Core database. There are two ways that you can compare what you find in the Core database with what comes with WFFM: Install the same version of WFFM on a clean Sitecore instance and compare Download a fresh copy of WFFM, unzip and go into the items/core folder. From there, you can drill down until you find all of the serialized items that you should see in Sitecore. (This route is quicker, but it is easier to miss things) I have seen similar issues with missing buttons before on projects using TDS/Unicorn, after items in the Rich Text Mail profile have been accidentally deleted from the project.
WFFM Email Editor Buttons - Where did they go? When I open the Send Email Save Action, the toolbar of the email editor is empty. Is this a config? Did I break it with a patch? Is that customizable? UPDATE 10/11 In the console I get a whole bunch of these: jsnlog.min.js:1 : {"stack":"Script error. \n at :undefined:undefined","message":"Script error.","logData":"Script error."}i.cerror @ jsnlog.min.js:1 Application.js:1 Uncaught TypeError: Cannot read property 'attributes' of null WFFM Version: 8.1 rev. 160304 Sitecore 8.1 rev. 160304
If cookies are cleared, there is no way if you hadn't gotten them to self identify first. More info: You want to get users to self identify with an email address of some kind as quickly as possible. Then you want to utilize the Tracker.Current.Session.Identify (string identifier) method in order to convert the anonymous user to a Known Contact. The Identify method merges interactions from the anonymous contact to the known contact. Additional Info Once a user is Identified through that method, all interactions going forward are logged to the known contact. If this user walks away without logging out specifically (nor doing a Tracker.Current.Session.EndVisit()), if the session timeout doesn't occur, then the next person browsing on that computer will be of that contact. Care should be taken to adequately Identify as well as log out contact visits. Comment Scenario You have to find some kind of information that they would be willing to give you, that can be unique enough. So then in that example, you could, generate a user code dynamically and Identify() with that generated code that is unique enough. The next time they come back, have some process where they provide that code you gave them, and you can pick up the contact record by Identify using that code. The moment that they provide an email address, identify with the user code first, then modify the contact record (and change the identifier to the email address. If you need examples on how to edit the contact record, I've a few on my SitecoreHacker.com blog.
Is there a foolproof way to recognize a returning anonymous user in Sitecore using xDB? I have a requirement where I need to identify returning users on the website. The users could be anonymous (It's for a movie chain, so people purchase without creating accounts too) Will xDB be able to recognize the contact even if the cookies are cleared on the user's machine? Has anyone implemented anything similar?
You actually need to use a completely different pipeline: httpRequestProcessed. This pipeline executes after the session has been initialized. The example below is taken from this blog by Brian Pedersen: namespace MyNamespace { public class MyClass : HttpRequestProcessor { public override void Process(HttpRequestArgs args) { Assert.ArgumentNotNull(args, "args"); if (Context.Site == null) return; if (Context.Site.Domain != DomainManager.GetDomain("extranet")) return; if (args.Url.FilePathWithQueryString.ToUpperInvariant().Contains("redirected=true".ToUpperInvariant())) return; // already redirected if (Context.PageMode.IsPageEditor) return; // DO CODE } } }
Which pipeline should I patch:after my new processor so that I have access to Context.Session This is what I am trying to do, If the user is authenticated in sitecore, and not authenticated in external system then log out the user from sitecore. So, here is the pipeline I use: <processor patch:after="*[@type='Sitecore.Pipelines.HttpRequest.UserResolver, Sitecore.Kernel']" type="xxx.SitecoreExtensions.Pipelines.HttpRequest.ExternalSystemUserAuthenticationResolver, xxx.SitecoreExtensions"> The processor xxx.SitecoreExtensions.Pipelines.HttpRequest.ExternalSystemUserAuthenticationResolver reads some data from Session and returns true or false if the external system token is present in session or not. This is what is happening: When I sign in (sign in logs me in both the systems, sitecore and external), a token is set in the session and the ExternalSystemUserAuthenticationResolver method gives me correct status of authentication. When I am redirected to other page after login, the ExternalSystemUserAuthenticationResolver method does not find anything in session and says that I am not logged into external system so the overall authentication status is false. Here is the implementation of the new method: public class ExternalSystemUserAuthenticationResolver: HttpRequestProcessor { protected override void SiteSpecificProcess(HttpRequestArgs args) { try { if (Sitecore.Context.User.IsAuthenticated &amp;&amp; !AccountHelper.IsExternalSystemAuthenticated()) { AuthenticationManager.Logout(); } } catch (Exception ex) { Log.Error(ex.Message, ex, this); } } } AccountHelper.IsExternalSystemAuthenticated() reads data from the session to check if the token and if the session is null then I am redirected to another page after login. Where should I place my new processor so that the session object is populated?
As Geoff already pointed out; the package seems to contain content for a database called "live". You can see (and remove, if you want) this by opening the package file. I'm using WinRAR for this example: When opening up the package archive, you will find package.zip. And opening that up, you will find a structure like this: The "items" folder is the one you're after. In my example here; all I have are items in the "core" database - but presumably yours would have additional folders. Including one called "live". You can rename or delete this folder (as appropriate, I don't know enough about your package to make that call), and the package should be able to roll on without issue.
Sitecore Rocks Package Installation Error - "Could not find configuration node: databases/database[@id='live']" Getting this error when trying to install a package to my local Sitecore instance via Sitecore Rocks. I am not aware of a "live" database so I am not sure where this is coming from. I have checked the ShowConfig to ensure there is only core, master, web in the databases/database nodes. No "live" db in there.
In my experience, when you plan major changes in your solution, the worst thing you can do is apply all of them at once. When you inevitably run into problems, you won't know which of the changes caused them; that will make debugging and fixing so much harder. Generally, the most reliable approach is to split your changes into as many small steps as possible. After you apply a single step, you'll be able to test if everything in the solution still works properly. You'll be able to fix issues related to that particular step in an isolated manner—without other changes, and unrelated issues, standing in the way. Suggested approach I propose that you split your upgrade process into four stages: 1. Upgrade to 8.2 When you upgrade, your current DI container integration will still work. Hence, you can perform the upgrade process and debug upgrade-specific issues without having to worry about DI integration changes. 2. Replace Sitecore's MS DI with your current container At this stage, you will replace Sitecore's underlying container with the one you've been using. I wrote an article that describes how to do this: Replacing the Default DI Container in Sitecore 8.2 If you are using SimpleInjector, check out this answer by Richard Seal for an extra required step. Once you've replaced Sitecore's container, nothing in the app should break (in most cases), as your application code will still use your custom DI approach. So the DI container will be configured in two separate ways: directly with ASP.NET MVC, and in Sitecore internally. 3. Migrate your service registrations to use the Sitecore way Change the way you register services from your DI container's API to Sitecore's configurators or direct registration. After you've completed this step, removing your DI container's integration with ASP.NET dependency resolver should not break anything. This is because all of your services will be wired up through Sitecore, which will already have its dependency resolver hooked into MVC. 4. Switch Sitecore's DI container back to MS DI Remove your DI container from the solution and revert Sitecore to use Microsoft's default dependency injection implementation. This should go smoothly, since the Sitecore way of registering services works with any DI container configured in Sitecore. You services will now be injected in your controllers and modules via Sitecore and MS DI. Conclusion It may sound like some extra work, but I believe that this is the most reliable way, since you'll have to worry about fewer simultaneous issues at any given point in time.
Dependency Injection migration path to 8.2 With native support for Dependency Injection in Sitecore 8.2, what is the easiest path for upgrading from previous versions in solutions utilizing a third party DI framework (Castle Windsor, SimpleInject etc.), if the goal is to make use of the built in DI? Should we migrate to Microsofts Dependency Injection framework in the existing solution prior to the upgrade? Or can we easily upgrade with the current DI framework and migrate later? Update The current solution is a simple implementation of a Unity container, so I do not expect to be missing out on any features when migrating.
By default, the publishing service will publish Blobs if they are created/referenced by the following fields: /sitecore/templates/System/Media/Versioned/File/Media/Blob Guid = {DBBE7D99-1388-4357-BB34-AD71EDF18ED3} /sitecore/templates/System/Media/Unversioned/File/Media/Blob Guid = {40E50ED9-BA07-4702-992E-A912738D32DC} In case of you defined your own field, you will need to configure the publishing service to use it. In order to do that, you can pass the new field Id to the RequiredPublishFieldsResolver options (check the sc.publishing.services.xml). Should be something like: <Settings> <Sitecore> <Publishing> <Services> <RequiredPublishFieldsResolver> <As>Sitecore.Framework.Publishing.IRequiredPublishFieldsResolver, Sitecore.Framework.Publishing.Service.Abstractions</As> <Type>Sitecore.Framework.Publishing.RequiredPublishFieldsResolver, Sitecore.Framework.Publishing</Type> <Options> <AdditionalMediaFieldsIds> <Id>**The Guid of your Blob Field**</Id> </AdditionalMediaFieldsIds> </Options> </RequiredPublishFieldsResolver> </Services> </Publishing> </Sitecore> </Settings> You can put this in a file (for example codefield_patch.xml) and place it in the global folder of the Publishing Service. This will mean it will be available for all environments (You can place it in 'developement' or 'production' folders to be environment specific - See the install guide for more info about these options) Hope this helps
Sitecore Publishing Service 1.8.0 does not publish blob data for custom field using type Attachment I've created a new file template called Code which contains many of the same fields as the File template but does not inherit it. While publishing using the Sitecore Publishing Service the blob data does not appear. Field: Missing attachment Settings: sc.global.xml <Settings> <Sitecore> <Publishing> <ConnectionStrings> <Master>user id=sa;password=pass123;data source=(local);database=demo.dev.localsitecore_Master;MultipleActiveResultSets=True;</Master> <Core>user id=sa;password=pass123;data source=(local);database=demo.dev.localsitecore_Core;MultipleActiveResultSets=True;</Core> <Web>user id=sa;password=pass123;data source=(local);database=demo.dev.localsitecore_Web;MultipleActiveResultSets=True;</Web> </ConnectionStrings> <LogLevel>Information</LogLevel> </Publishing> </Sitecore> </Settings>
I don't believe robot detection is related to your problem. As you correctly suggested in the comments, changing session state provider should not affect robot functionality and the way it overrides session timeout. Hypothesis This may be the root of your problem: Note that we share the same session collection/db between test and uat environments. The private session store is not supposed to be shared between unrelated instances. The biggest reason for that is the fact that only one instance will be able to handle the Session_End event from the store. If it's not the instance that actually created the session, there will be errors (check your logs on both instances). Note that this is not a problem with non-sticky load-balanced instances of the same cluster, as all of them are equal. It's only a problem with instances that share the private session and don't share other things, such as the web database, the Shared Session state store, Sitecore configuration, etc. I.e. instances that are not part of the same CD cluster. Another problem with sharing the private session state is if Sitecore instances don't have matching date/time settings. In that case, one instance will create a session, and another instance may think the session has already expired, so it will remove session data from the store and attempt to process the Session_End event. Solution Create a separate session database/collection corresponding to each of your Sitecore instances. In the future, never share one store between multiple Sitecore instances, unless they have exactly the same configuration and belong to the same content delivery cluster.
Content delivery session times out in 1/2 minute with MongoDB session provider We are using the MongoDB session state provider for our Sitecore 8.1 CD instance hosted in Azure web apps. We are facing an issue with our CD instance where the session keeps expiring within 1–2 minutes. But the form authentication is still active. I.e. the user is still logged in, but can't access the session; therefore, the user can't proceed with page actions, e.g. submit form etc. Below is our configurations for session and forms: <sessionState mode="Custom" customProvider="mongo" cookieless="false" timeout="30" sessionIDManagerType="Sitecore.SessionManagement.ConditionalSessionIdManager"> <providers> <add name="mongo" type="Sitecore.SessionProvider.MongoDB.MongoSessionStateProvider, Sitecore.SessionProvider.MongoDB" sessionType="Standard" connectionStringName="session" pollingInterval="2" compression="true" /> <!-- <add name="mssql" type="Sitecore.SessionProvider.Sql.SqlSessionStateProvider, Sitecore.SessionProvider.Sql" sessionType="Standard" connectionStringName="session" pollingInterval="2" compression="true" /> --> </providers> </sessionState> <authentication mode="Forms"> <forms loginUrl="/login" requireSSL="false" name=".ASPXAUTH" slidingExpiration="true" protection="All" path="/" timeout="120" cookieless="UseCookies" /> </authentication> Note that we share the same session collection/db between test and uat environments. If I change the mode to 'InProc', the issue goes away. As suggested by Dymtro, we stood up separate collections for session and analytics. The issue still persists. What's the best way to troubleshoot why/how sitecore is identifying real users as bots? The session time out doesn't occur on our test environment where we haven't implemented this below: @using Sitecore.Mvc.Analytics.Extensions @Html.Sitecore().VisitorIdentification()
I came across this old question, and I'm sharing this link for posterity: https://grantkillian.wordpress.com/2017/02/17/auto-suggest-with-solr-facets-in-sitecore/ Sitecore’s dependence of the Solr “terms” component has changed with Sitecore 8.1 update-1 (rev. 151207). Sitecore now uses faceting with Solr instead of terms.
Is Solr term support required for versions of Solr prior to 8.2? Sitecore documentation on Solr set up has a section on Enabling Solr term support, which is required to power dropdowns in the UI. Which versions of Sitecore require this? Sitecore 8.2 only, or Sitecore 8.0 and 8.1?
For those who can't upgrade to 8.2, sitecore support has provided a solution. I'll post the code here as I don't know a better way of sharing the library. As a reference Ticket number: 471609 | Sitecore Support - Bug #109428 Code provided contains 2 classes and a javascript change. LinkRenderer.cs overrides default RenderFieldResult method GetLinkFieldValue.cs calls method in LinkRenderer.cs \sitecore\shell\client\Sitecore\ExperienceEditor\ExperienceEditor.js amends method postServerRequest to encode string. LinkRenderer.cs public class LinkRenderer : Sitecore.Xml.Xsl.LinkRenderer { private readonly char[] _delimiter; public LinkRenderer(Item item) : base(item) { this._delimiter = new char[] { '=', '&amp;' }; } public override RenderFieldResult Render() { SafeDictionary<string> safeDictionary = new SafeDictionary<string>(); safeDictionary.AddRange(base.Parameters); if (MainUtil.GetBool(safeDictionary["endlink"], false)) { return RenderFieldResult.EndLink; } Set<string> set = Set<string>.Create(new string[] { "field", "select", "text", "haschildren", "before", "after", "enclosingtag", "fieldname", "disable-web-editing" }); LinkField linkField = base.LinkField; if (linkField != null) { safeDictionary["title"] = HttpUtility.HtmlAttributeEncode(StringUtil.GetString(new string[] { safeDictionary["title"], linkField.Title })); safeDictionary["target"] = StringUtil.GetString(new string[] { safeDictionary["target"], linkField.Target }); safeDictionary["class"] = StringUtil.GetString(new string[] { safeDictionary["class"], linkField.Class }); } string text = string.Empty; string rawParameters = base.RawParameters; if (!string.IsNullOrEmpty(rawParameters) &amp;&amp; rawParameters.IndexOfAny(this._delimiter) < 0) { text = rawParameters; } if (string.IsNullOrEmpty(text)) { Item targetItem = base.TargetItem; string text2 = (targetItem != null) ? targetItem.DisplayName : string.Empty; string text3 = (linkField != null) ? linkField.Text : string.Empty; text = HttpUtility.HtmlAttributeEncode(StringUtil.GetString(new string[] { text, safeDictionary["text"], text3, text2 })); } string url = this.GetUrl(linkField); string linkType; if ((linkType = base.LinkType) != null &amp;&amp; linkType == "javascript") { safeDictionary["href"] = "#"; safeDictionary["onclick"] = StringUtil.GetString(new string[] { safeDictionary["onclick"], url }); } else { safeDictionary["href"] = HttpUtility.HtmlEncode(StringUtil.GetString(new string[] { safeDictionary["href"], url })); } StringBuilder stringBuilder = new StringBuilder("<a", 47); foreach (KeyValuePair<string, string> current in safeDictionary) { string key = current.Key; string value = current.Value; if (!set.Contains(key.ToLowerInvariant())) { FieldRendererBase.AddAttribute(stringBuilder, key, value); } } stringBuilder.Append('>'); if (!MainUtil.GetBool(safeDictionary["haschildren"], false)) { if (string.IsNullOrEmpty(text)) { return RenderFieldResult.Empty; } stringBuilder.Append(text); } return new RenderFieldResult { FirstPart = stringBuilder.ToString(), LastPart = "</a>" }; } } GetLinkFieldValue.cs public class GetLinkFieldValue : Sitecore.Pipelines.RenderField.GetLinkFieldValue { protected override Sitecore.Xml.Xsl.LinkRenderer CreateRenderer(Item item) { return new Sitecore.Support.Xml.Xsl.LinkRenderer(item); } } sitecore\shell\client\Sitecore\ExperienceEditor\ExperienceEditor.js postServerRequest: function (requestType, commandContext, handler, async) { var token = $('input[name="__RequestVerificationToken"]').val(); jQuery.ajax({ url: "/-/speak/request/v1/expeditor/" + requestType, data: { __RequestVerificationToken: token, /*Sitecore Support - Bug #109428*/ data: jQuery("<div/>").text(decodeURIComponent(JSON.stringify(commandContext))).html() }, success: handler, type: "POST", async: async != undefined ? async : false }); } Config patch <sitecore> <pipelines> <renderField> <processor type="Sitecore.Support.Pipelines.RenderField.GetLinkFieldValue, Sitecore.Support.109420" patch:instead="*[@type='Sitecore.Pipelines.RenderField.GetLinkFieldValue, Sitecore.Kernel']"/> </renderField> </pipelines> </sitecore>
GeneralLink field breaks in CE when using ampersand (&) in description Using sitecore 8.1 update -1 When adding a description that includes &amp; (e.g. hola &amp; hello) to a GeneralLink field, the error below is thrown and the value is not shown on either content editor or content tree. The issue is that CE is not translating &amp; to &amp;amp; -confirmed by checking raw values. However, if I add the value using content tree, it saves &amp;amp; but doesn't show using normal view and will break again if any changes are made using content tree. I heard this was fixed in 8.2 but can't find the fix. Error: 13684 10:45:48 ERROR First 200 characters: 13684 10:45:48 ERROR Call stack: at Sitecore.MainUtil.GetCallStack() at Sitecore.Xml.XmlUtil.LoadXml(String xml) at Sitecore.Shell.Applications.ContentEditor.Link.SetValue() at Sitecore.Shell.Applications.ContentEditor.EditorFormatter.RenderField(Control parent, Field field, Item fieldType, Boolean readOnly, String value) at Sitecore.Shell.Applications.ContentEditor.EditorFormatter.RenderField(Control parent, Field field, Item fieldType, Boolean readOnly) at Sitecore.Shell.Applications.ContentEditor.Pipelines.RenderContentEditor.RenderSkinedContentEditor.RenderInput(Field field) at Sitecore.Shell.Applications.ContentEditor.Pipelines.RenderContentEditor.RenderSkinedContentEditor.RenderElement(XmlNode element) at Sitecore.Shell.Applications.ContentEditor.Pipelines.RenderContentEditor.RenderSkinedContentEditor.RenderChildElements(XmlNode element) at Sitecore.Shell.Applications.ContentEditor.Pipelines.RenderContentEditor.RenderSkinedContentEditor.RenderMarker(XmlNode element) at Sitecore.Shell.Applications.ContentEditor.Pipelines.RenderContentEditor.RenderSkinedContentEditor.RenderElement(XmlNode element) at Sitecore.Shell.Applications.ContentEditor.Pipelines.RenderContentEditor.RenderSkinedContentEditor.RenderChildElements(XmlNode element) at Sitecore.Shell.Applications.ContentEditor.Pipelines.RenderContentEditor.RenderSkinedContentEditor.RenderSectionPanel(XmlNode element) at Sitecore.Shell.Applications.ContentEditor.Pipelines.RenderContentEditor.RenderSkinedContentEditor.RenderElement(XmlNode element) at Sitecore.Shell.Applications.ContentEditor.Pipelines.RenderContentEditor.RenderSkinedContentEditor.AddText(XmlNode element) at Sitecore.Shell.Applications.ContentEditor.Pipelines.RenderContentEditor.RenderSkinedContentEditor.RenderElement(XmlNode element) at Sitecore.Shell.Applications.ContentEditor.Pipelines.RenderContentEditor.RenderSkinedContentEditor.AddText(XmlNode element) at Sitecore.Shell.Applications.ContentEditor.Pipelines.RenderContentEditor.RenderSkinedContentEditor.RenderElement(XmlNode element) at Sitecore.Shell.Applications.ContentEditor.Pipelines.RenderContentEditor.RenderSkinedContentEditor.Render(XmlDocument skin) at Sitecore.Shell.Applications.ContentEditor.Pipelines.RenderContentEditor.RenderSkinedContentEditor.Process(RenderContentEditorArgs args) at (Object , Object[] ) at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) at Sitecore.Shell.Applications.ContentManager.Editor.Render(RenderContentEditorArgs args, Control parent) at Sitecore.Shell.Applications.ContentManager.ContentEditorForm.RenderEditor(Item item, Item root, Control parent, Boolean showEditor) at Sitecore.Shell.Applications.ContentManager.ContentEditorForm.UpdateEditor(Item folder, Item root, Boolean showEditor) at Sitecore.Shell.Applications.ContentManager.ContentEditorForm.Update() at Sitecore.Shell.Applications.ContentManager.ContentEditorForm.OnPreRendered(EventArgs e) at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at Sitecore.Reflection.ReflectionUtil.InvokeMethod(MethodInfo method, Object[] parameters, Object obj) at Sitecore.Shell.Applications.ContentManager.ContentEditorPage.OnPreRender(EventArgs e) at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest() at System.Web.UI.Page.ProcessRequest(HttpContext context) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&amp; completedSynchronously) at System.Web.HttpApplication.PipelineStepManager.ResumeSteps(Exception error) at System.Web.HttpApplication.BeginProcessRequestNotification(HttpContext context, AsyncCallback cb) at System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) at System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags) at System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags) at System.Web.Hosting.UnsafeIISMethods.MgdIndicateCompletion(IntPtr pHandler, RequestNotificationStatus&amp; notificationStatus) at System.Web.Hosting.UnsafeIISMethods.MgdIndicateCompletion(IntPtr pHandler, RequestNotificationStatus&amp; notificationStatus) at System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags) at System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)
You can do this with Sitecore PowerShell Extensions. PowerShell Extensions 4.5 or Higher Use the Set-ItemTemplate commandlet with the -FieldsToCopy parameter. $rootItem = Get-Item master:/content; $sourceTemplate = Get-Item "Template-B-Path-Or-Guid-Here"; $targetTemplate = Get-Item "Template-A-Path-Or-Guid-Here"; Get-ChildItem $rootItem.FullPath -recurse | Where-Object { $_.TemplateName -eq $sourceTemplate.Name } | ForEach-Object { Set-ItemTemplate -Item $_ -TemplateItem $targetTemplate ` -FieldsToCopy @{ Title2 = "Title1"; SubText2 = "SubText1"; Body2 = "Body1" } } The value you pass to the -FieldsToCopy parameter takes the following form: @{ OldField1 = "NewField1"; OldField2 = "NewField2"; OldField3 = "NewField3" }. PowerShell Extensions 4.4.1 or Lower $rootItem = Get-Item master:/content; $sourceTemplate = Get-Item "Template-B-Path-Or-Guid-Here"; $targetTemplate = Get-Item "Template-A-Path-Or-Guid-Here"; Get-ChildItem $rootItem.FullPath -recurse | Where-Object { $_.TemplateName -eq $sourceTemplate.Name } | ForEach-Object { $title2 = $_.Title2; $subText2 = $_.SubText2; $body2 = $_.Body2; $_.ChangeTemplate($targetTemplate); $updatedItem = Get-Item $_.ID; $updatedItem.Title1 = $title2; $updatedItem.SubText1 = $subText2; $updatedItem.Body1 = $body2; } With PowerShell Extensions 4.4.1 or lower, be careful that you do the following or you may experience data loss: Store the source field value into a variable before you change the item’s template. Get the updated item out of the database before you set the target field.
How to change item templates and retain existing data We are refactoring our project and are trying to clean up the usages of templates throughout the project. There are a number of templates that are very similar that could all be using the same data template, which would also mean we can better utilize the "Compatible Renderings" functionality in Sitecore making it easier for editors to change components. The problem is we have existing content and it would be a pain have to re-create all the datasources and copy across the data manually. For example, given the following data templates: Template A Title1 Single-Line Text SubText1 Multi-Line Text Body1 Rich Text Image1 Image Template B Title2 Single-Line Text SubText2 Rich Text Body2 Rich Text How can we change all items which use Template B to instead use Template A and still retain all existing data?