output
stringlengths
34
25.7k
instruction
stringlengths
81
31k
input
stringclasses
1 value
This depends on the WAF. If the WAF works as a proxy and replaces origin IP with its own IP, then you can do the following steps to get Sitecore Analytics using the correct IP. This applies to any Proxy (i.e. load balancer etc.): Make sure that the WAF sets the origin IP into the X-Forwarded-For header attribute (can use a different one, but this is the standard) In Sitecore.Analytics.Tracking.config change the Analytics.ForwardedRequestHttpHeader setting to the value: X-Forwarded-For This tells Sitecore to instead of the request IP to use the X-Forwarded-For header attribute (which is passed on by the Proxy) for Analytics.
WAF on Sitecore Delivery Servers and Analytics Tracking We are hosting one of our clients Sitecore Application on Azure with WAF in place. I would like to know will there be any impact on Sitecore Analytics as all the web request will be first hitting to WAF and then will be routed to actual delivery servers for processing. In such scenario, how we can efficiently track IPs of the visitors. Does anyone come across such scenarios.
What if you just patch your custom controllers into the <allowedControllers> section in Sitecore.config, instead of changing the Security Policy. <sitecore> <api> <services> <configuration> <allowedControllers> <allowedController desc="DummyCustom">Namespace.DummyController, Dummy.Assembly</allowedController> </allowedControllers> </configuration> </services> </api> </sitecore>
Does implementing a WebApi service using ServicesApiController expose a significant security risk? I have been following Anders Laub's tutorials on implementing some WebAPI controllers using ServicesApiController and just like at the bottom of this page I received the 403 Forbidden error when making the API call. I changed the Sitecore.Services.SecurityPolicy from ServicesLocalOnlyPolicy to ServicesOnPolicy and confirmed that the calls now work with this new setting. Does this create a security risk that I should be concerned about? If I understand correctly, this security setting exposes Sitecore's internal API to remote clients and somebody with an understanding of Sitecore's API would be able to write their own calls to mess with things they shouldn't be messing with. Am I correct in this understanding? Is there a simple enough way to secure my website from malicious API calls or should I find an alternative method of enabling WebAPI functionality that doesn't use ServicesApiController?
It's Sitecore.Data.ItemUri format. You can use var itemUri = ItemUri.Parse(string itemUriString) to get ItemUri class object and then Sitecore.Data.Database.GetItem(ItemUri itemUri) to get the Item
How do I get an Item from Sitecore's internal URI protocol? I have a reference to an item that uses the sitecore: protocol: "sitecore://master/{...GUID HERE...}?lang=en&amp;ver=0" I could attempt to parse this URI manually to look up the item, but I'm pretty certain there's an existing utility somewhere to do this. Of course, searching for sitecore: protocol URIs leads to a lot of answers about generating URLs from items, and that's not what I want in this case.
As you mentioned Replication is required for some Sitecore databases, but SQL Azure (PaaS) does not support SQL read-write geo-replication currently just read-only(https://docs.microsoft.com/en-us/azure/sql-database/sql-database-designing-cloud-solutions-for-disaster-recovery), so the only option is to have all CD locations connect to the central Core database. On the other hand Web databases could be set up in different locations for every CD using publishing targets.
How to handle multiple Core Databases in a multi-datacenter setup on Azure PaaS I'm wondering how to handle multiple datacenters for CD servers in Azure PaaS. According to this ( https://kb.sitecore.net/articles/610106 ) you can use transactional replication for your Web databases (even though it's not really necessary, and has some limitations/caveats), but what to do about the Core databases? I can't seem to find any official information about how to handle those using Azure SQL Databases. I'm asking this question related to Sitecore 8.2 update 2 with official Azure PaaS support.
using Sitecore.Data; using Sitecore.WFFM.Abstractions.Actions; using Sitecore.WFFM.Abstractions.Shared; namespace Sample.Namespace { public class SendMessage : global::Sitecore.WFFM.Actions.SaveActions.SendMessage { public SendMessage(ISettings settings, IMailSender mailSender) : base(settings, mailSender) { } public override void Execute(ID formId, AdaptedResultList adaptedFields, ActionCallContext actionCallContext = null, params object[] data) { var dataToAppend = "Get user profile data here... I had a custom extension method" //Note that Mail is a property inherited from the base class //There are many other properties with setters that allow //customization of other things if necessary which can be //seen with the IsBodyHtml and IsIncludeAttachments properties Mail = $@"{dataToAppend}{Mail}"; IsBodyHtml = true; IsIncludeAttachments = true; base.Execute(formId, adaptedFields, actionCallContext, data); } } }
WFFM Append Custom Data To Email I'm working on an upgrade from Sitecore 7.5 (rev. 141003) to 8.2 u2. There is a custom save action in the old project that ends up appending some data about the user currently filling out the form. The issue I'm running into is with attaching files. The function IncludeAttachments is not in Sitecore.WFFM.Actions.SaveActions.SendMessage so I'm not too sure how I can replicate that. Is overriding the entire email functionality for wffm really necessary or is there some kind of pipeline/property in the SendMessage class I can override to append this user data to instead of overriding the Execute action? If not I think I'm going to need to manually attach the files by duplicating the functionality that was in the IncludeAttachments method and looping through the fields being passed into my class's Execute method which sounds kind of brutal.
It may happen if pipeline steps are not enabled. Select pipeline step and look at under Administration section. Set as enabled and run it again. Hope that was a single problem.
Data Exchange Framework No Processor Definitions Assigned Error I am sure I am missing something. I am getting a &quot;Processing will abort because there are no processor definitions are assigned to the pipeline&quot; error when running the pipeline batch. I have my converter type and processor type defined correctly on my pipeline step. The converter step gets called. I have the pipeline selected on the pipeline batch. Any ideas? Thanks in advance. public class CheckforContacts : BasePipelineStepConverter<ItemModel> { private static readonly Guid TemplateId = Guid.Parse(&quot;{F9F53BC3-093F-4ABB-A2AA-097FB0A03D16}&quot;); public CheckforContacts(IItemModelRepository repository) : base(repository) { this.SupportedTemplateIds.Add(TemplateId); } protected override void AddPlugins(ItemModel source, PipelineStep pipelineStep) { AddEndpointSettings(source, pipelineStep); } private void AddEndpointSettings(ItemModel source, PipelineStep pipelineStep) { var settings = new EndpointSettings(); pipelineStep.Plugins.Add(settings); } } public class ReadContactsStepProcessor : BaseReadDataStepProcessor { public override bool CanProcess(PipelineStep pipelineStep, PipelineContext pipelineContext) { return base.CanProcess(pipelineStep, pipelineContext); } public override void Process(PipelineStep pipelineStep, PipelineContext pipelineContext) { base.Process(pipelineStep, pipelineContext); } protected override void ReadData(Endpoint endpoint, PipelineStep pipelineStep, PipelineContext pipelineContext) { throw new NotImplementedException(); } }
Yes, you can implement a custom field. You have several ways to do this. One of our project I used iframe field type for it. In my opinion this is the easiest way for complex custom fields. Actually I wrote a blogpost about the basics 2 days ago. Here is the whole solution which contains a similar custom field (for Sitecore 8.2 update 2, I gues it works for Sitecore 8.0 too). So basically you can build up your MVC structure and use this in your iframe. You need to register your root: using Sitecore.Pipelines; using System.Web.Mvc; using System.Web.Routing; namespace MyProject.Pipelines { public class RegisterRoutes { public void Process(PipelineArgs args) { RouteTable.Routes.MapRoute("SimpleField", "myFields/SimpleField/Render", new { controller = "SimpleField", action = "Render" }); } } } Controller: using Sitecore.Configuration; using Sitecore.Data; using System.Web.Mvc; namespace MyProject.Controllers { public class SimpleFieldController : Controller { public ActionResult Render() { return View("~/Views/SimpleField/Render.cshtml"); } } } View: <link href="https://fonts.googleapis.com/css?family=Open+Sans:400,300italic,400italic,600italic,700italic,300,600,700,800" rel="stylesheet"> <link rel="stylesheet" type="text/css" href="/sitecore/shell/themes/standard/default/Default.css" /> <link rel="stylesheet" type="text/css" href="/sitecore/shell/themes/standard/default/Content Manager.css" /> <style> #ll-fields { padding: 10px 10px 10px 10px; } </style> <div id="ll-fields" class="scEditorSections"> <div class="scEditorFieldMarker"> <div class="scEditorFieldLabel">Text:</div> <div> <input type="text" id="ll-text" class="scContentControl scCombobox" /> </div> </div> </div> <script type="text/javascript" src="/scripts/field/field-base.js"></script> <script type="text/javascript" src="/scripts/field/text-field.js"></script> <script> textField.getValue(); document.getElementById('ll-text').onchange = function () { textField.setValue(); }; textField.updateIframeDisplaySettings(); </script> field-base.js: function fieldBase () {} fieldBase.getParentIframe = function () { var iframes = window.parent.document.getElementsByTagName('iframe'); var parent; Array.prototype.forEach.call(iframes, function (el, i) { if (fieldBase.getIframeDocument(el) === window.document) { parent = el; return; } }); return parent; }; fieldBase.getIframeDocument = function (iframe) { return iframe.contentDocument || iframe.contentWindow.document; }; text-field.js: function textField() { } textField.setValue = function () { fieldBase.getParentIframe().setAttribute('sc_value', document.getElementById('ll-text').value); } textField.getValue = function () { document.getElementById('ll-text').value = fieldBase.getParentIframe().getAttribute('sc_value'); } textField.updateIframeDisplaySettings = function () { var parentIframe = fieldBase.getParentIframe(); parentIframe.style = "height: 87px"; parentIframe.scrolling = "no"; } So this is just a base idea. But from this point you can do everything what you want in your Controller and View. You can check the github solution what I linked above.
Cascading Droplist field in Sitecore I have item in sitecore which contains a field country and region. Now when I select the country I need to load the related region like cascading dropdown. Is there any possiblity of creating custom fields type for cascading dropdown
Renaming items will not be sufficient, especially if you've used any sort of framework to build up all three. If any of your GUIDs collide, you will be overwriting templates/content/media etc. during your serialization steps. You also may have namespace conflicts in your code or pipeline customizations that may interfere with each other. Moving to a single Sitecore 'Include' structure for your configs may also expose that you've used the same folders/file-names for the config changes as well. You'll also need to examine any third-party DLLs that you've placed in the bin folder and check whether you have conflicts between the three sites as you will be merging into a single 'bin'. Also, your Web.config changes may not be compatible with each other. You will need to merge these and test. You will need to look at how you have done your Sitecore security roles and users as well. Your users need to be merged into a single database and your roles may have different inheritance structures or conflicting names. Content security settings in the tree may be incompatible as well, so you need to take a look at whatever security you set up in the tree as well. If you've used the rules engine in any way to provide insert options or other rules, you will need to look at whether these rules conflict with each other. Many assume a single site and are not prepped for multi-site/multi-tenancy. If you have implemented any modules, you need to check for compatibility of the modules between the different sites as they usually have common file names and items. If you have implemented multi-lingual, you will need to look at the languages implemented and see if there are conflicts. If there are conflicts, can they be merged safely? Do you have fall-back rules in place? Are they compatible between the different sites? There's probably more... In general, as @Hishaam Namooya mentions, this is usually a complete re-architecture exercise. You can start with the steps you mentioned, but you will quickly find that you likely have a lot of issues to look through...
3 separate Sitecore sites at 3 different servers and Need to migrate it to 1 instance on a Single Server I've 3 separate Sitecore sites at 3 different servers and Need to migrate it to 1 instance on a Single Server so can someone help me with the best possible approach for doing it: The way I know to do it is : Create a new instance on the destination server Create the IA to support Multisite implementation have the clear separation of all the websites in the IA (having Site1, Site2 and Site3 as 3 different home node, 1 global folder having common fields) Rename the Sitecore Home node as per the new node created in destination server instance and then serialize the node for Site1. Repeat Step 3 for Site2 and Site3 Copy the serialization folders and merge it to destination server (this is tricky need a better approach if there exist one) Use the Serialization.aspx from admin and do a revert database so sync all the items into my content tree. (I'm not sure this will be fool proof :( :( :( ) Have the code base migrated into same solution for Multisite MVC Area implementation. Can anyone please suggest if there is any alternate solution apart from above and also if there is problem with above. I'm gonna go with above if there is no better approach. Thanks in advance.
Does the Sitecore CMS allow for meta-data tagging using the schema.org taxonomy? Yes it does. And pretty much any other taxonomy I can think of. Sitecore allows you to organise and structure your content in any way you see fit, including the adding of additional metadata to support both internal and external searching and filtering. A few references, but there would be hundreds out there: Content Tagging with Sitecore Editing Metadata and non-page content in the Sitecore page editor Create and implement a custom marketing taxonomy That said, you may in some cases need to expose this tagging to your HTML, so full support for something such as schema.org does require a modest implementation effort. It really depends on a lot of things; schema.org covers a lot of different things, like dining reservations to volcanos. Can you please clarify the purpose of such taxonomy? The purpose of a commonly recognised taxonomy is, that it allows external sites (like search engines and browsers) to better understand the content. Like for instance, if Google knew that a particular button on your restaurant page leads to "Reserve Table" (and understands what this is) - it allows them to provide any user with a better link and experience, if a user was searching for "dinner reservations". Just as an example.
Meta-data tagging using the schema.org taxonomy working on RFP (for Sitecore project), I have encountered the following question within Metadata Management section: Does the Sitecore CMS allow for meta-data tagging using the schema.org taxonomy? What would be the best answer in favor of Sitecore? Can you please clarify the purpose of such taxonomy and share any experience doing tagging with schema.org taxonomy.
So after talking to Adam and Vlad I figured out was wrong. First thing I needed was to define the endpoint settings in the pipeline step. I was doing the wrong plugin. When using BaseReadStepProcessor in your Pipeline processor endpoint settings must be added as a plugin. protected override void AddPlugins(ItemModel source, PipelineStep pipelineStep) { AddEndpointSettings(source, pipelineStep); } private void AddEndpointSettings(ItemModel source, PipelineStep pipelineStep) { var settings = new EndpointSettings(); settings.EndpointFrom = base.ConvertReferenceToModel<Endpoint>(source, ContactReadStepItemModel.EndpointFrom); pipelineStep.Plugins.Add(settings); } The second thing I had wrong was my spelling for Converter in my endpoint in Sitecore was off. I had an extra space.
Data Exchange Framework Pipeline Step is Missing at least one required plugin I am getting the following error when running the pipeline bathc. "Pipeline step is missing at least one required plugin." I have an AddPlugins method in my pipeline step: protected override void AddPlugins(ItemModel source, PipelineStep pipelineStep) { AddEndpointSettings(source, pipelineStep); } I also have it in my end point converter. I doesn't look like this gets hit: protected override void AddPlugins(ItemModel source, Endpoint endpoint) { var settings = new ContactSettings(); settings.CollectionName = base.GetStringValue(source, "Collection Name"); endpoint.Plugins.Add(settings); } I looked through the DEF dlls using dotPeek, but wasn't quite sure where this error is coming from. What could of I have missed? Thanks. Processor code: public class ReadContactsStepProcessor : BaseReadDataStepProcessor { public override bool CanProcess(PipelineStep pipelineStep, PipelineContext pipelineContext) { return base.CanProcess(pipelineStep, pipelineContext); } public override void Process(PipelineStep pipelineStep, PipelineContext pipelineContext) { base.Process(pipelineStep, pipelineContext); } protected override void ReadData(Endpoint endpoint, PipelineStep pipelineStep, PipelineContext pipelineContext) { var contactSettings = pipelineStep.GetPlugin(); if (contactSettings != null) { pipelineContext.PipelineBatchContext.Logger.Info( "Hello world! Create some items here..." + contactSettings.CollectionName); } //add the plugin to the pipeline context pipelineContext.Plugins.Add(contactSettings); } }
Clicked means that the recipient clicked on a link from the email and entered the site. Browsed means that the user visited multiple pages in their visit. Productive means that the visitor generated engagement value.
What is the difference between "clicked", "browse", and "productive" in the EXM report? Can anyone tell me the differences between clicked, browse, and productive in the report (recepients behavior) in Email Experience Manager? I have read the explanation from sitecore documentation but i am still confused :/
In short; No. These exist in Sitecore 8.2. In 8.0, these do not exist. As seen here. You could attempt to move them backwards, but it will likely be fairly involved given the changes to xDB between 8.0 and 8.2. Alternatively, as you say, you are stuck writing custom conditions for these.
Sitecore 8.0 Visitor Rules availability Do we have below 2 conditions available in Rule Set Editor for Personalization in Sitecore 8.0? If not, do we have any alternatives except custom rule creation? Where the specific campaign was triggered during a past or current interaction and when the number of elapsed days compares to number and when the past number of interactions compares to number Where the specific campaign was triggered during a past or current interaction and when the number of elapsed days compares to number and when the past number of interactions compares to number and the custom data compares to value
You can call Item.IsFallback, which returns true if the item in question is fallback item. Source: https://doc.sitecore.net/sitecore_experience_platform/setting_up_and_maintaining/language_fallback/setting_up/language_fallback__changes_to_apis
Programatically Check if the items if the item's version that is returned is a Fall Back I have a scenario where I have to enable the fallback for a template and on some particular scenarios I have to show the language versions only if it has that particular version. Ex: If it has a non english version show that version only in that language(no fall back) Item.Versions.count>0 returns true if I set Enable fall back to true. Is there a way I check if the version that is returned is fall back version speifically
Certain property names do trigger that - same as Id gets automapped to the ID of the Sitecore element. To get around that you would simply need to map the Name property normally using attribute / fluent configuration.
Sitecore item name being auto-mapped to "Name" field in Glass Mapper We're using interfaces for our models with [SitecoreType(AutoMap=true)]. The templates we're using (for a refit, we didn't create them) have "Name" fields, but when I just declare string Name {get; set;} it's grabbing the Sitecore item name and not the Name field defined in the template. I have the template name field being declared with the SitecoreInfo property to a different "ItemName" field to prevent conflicts. We've used the Name field before in other templates, thinking it was pulling from the template and not the item name, so I don't know if this is a change in the latest Glass Mapper or something we didn't previously notice. For now, I'm having our developers use the SitecoreField("Name") attribute and call the field something like "NameField" - this is getting the correct field, so we have a workaround. But I was curious if this is something that changed, if it's been that way and I hadn't noticed, or if this is a bug and "Name" should map to a field template first, and only if there is no field with that appellation use the item's name.
As Kasper Gadensgaard mentioned in the comments, the StandardValuesManager requires a provider inherited from the StandardValuesProvider class: public static class StandardValuesManager { private static readonly ProviderHelper<StandardValuesProvider, StandardValuesProviderCollection> _helper = new ProviderHelper<StandardValuesProvider, StandardValuesProviderCollection>("standardValues"); ... }
Patching in a custom StandardValues provider I am trying to add a custom StandardValues provider to a Sitecore 8.1 site (8.1.0 rev 160519) and I am not having a good time. To do this I reflected the standard Sitecore.Data.StandardValuesProvider in Sitecore.Kernel, copied all the codez and made the change I want. It compiles, so I assume it'll work :D btw I am modifying the behaviour of private SafeDictionary<ID, string> GetStandardValues(Item item), for reasons I attempt to wire up the patch thusly: - <configuration xmlns:patch="http://www.sitecore.net/xmlconfig/"> <sitecore> <standardValues> <providers> <add name="sitecore"> <patch:attribute name="type">[REDACTED].Web.Sitecore.Providers.[REDACTED]StandardValuesProvider, [REDACTED].Web</patch:attribute> </add> </providers> </standardValues> </sitecore> </configuration> But although my patch looks like it's worked in /showconfig.aspx, the site itself doesn't load: - Server Error in '/' Application. Unexpected provider type: [REDACTED].Web.Sitecore.Providers.[REDACTED]StandardValuesProvider Expected: Sitecore.Data.StandardValuesProvider Kind of like.. it doesn't want to see another kind of provider besides the default one ? Has anyone tried to do this and succeeded ?
While both answers so far will work. I believe it would be far simpler to setup the email as a "campaign" style page on the site. Most emails that contain html should have a "cannot view this page? click here to view in a browser" link anyway, so this could serve as that page. Then it would be a simple WebClient to get the html and insert into the body of your email. using(var client = new WebClient()) { var html = client.DownloadString(pageUrl); return html; } Nice and simple, and now you have a way of viewing the page in the browser for those email clients that don't play nice with complex markup or block markup in emails.
Sitecore Item - Generated HTML One of client wants to send email using standard .NET SMTP client. I would like to know How I can generate HTML of my Sitecore item which has all layouts and renderings configured and assigned that HTML to MailMessage.Body property? I dont want to use Sitecore EXM module.
If you are using Sitecore 8.0 Update 3 upwards then a couple of new default processors were added to the Health Monitors to periodically dump the Cache Status and Rendering Statistics to files on disk. By default this process is run every 10 minutes, and they are run on the CD servers as well so you can use these files to check how your caches have been behaving. From the Sitecore 8 Update-3 release notes: Periodic dumping data from /sitecore/admin/stats.aspx and /sitecore/admin/cache.aspx pages to the file system has been implemented. New processors have been added to the pipeline. The location and format of the log file can be configured as part of the processor configuration. By default, dump files are stored in /diagnostics/health_monitor in the Data folder. (415409, 415411) The specific processors are: <healthMonitor> <!-- Dumps the information that the /sitecore/admin/cache.aspx page contains --> <processor type="Sitecore.Pipelines.HealthMonitor.HealthMonitor, Sitecore.Kernel" method="DumpAllCacheStatus"> <dumpFile>$(dataFolder)/diagnostics/health_monitor/CacheStatus.{date}.{time}.html</dumpFile> </processor> <!-- Dumps the information that the /sitecore/admin/stats.aspx page contains --> <processor type="Sitecore.Pipelines.HealthMonitor.HealthMonitor, Sitecore.Kernel" method="DumpRenderingsStatistics"> <dumpFile>$(dataFolder)/diagnostics/health_monitor/RenderingsStatistics.{date}.{time}.html</dumpFile> </processor> </healthMonitor> The processors simply read the caches and rendering statistics, create an HTML table of the values and then dump them in the folder location specified. The output is very similar to what you see when you visit /sitecore/admin/cache.aspx or /sitecore/admin/stats.aspx. When tuning caches, particularly during performance or load testing you may want to record the statistics more frequently, which you can do by reducing the configuration setting to a more suitable value: <!-- HEALTH MONITOR INTERVAL Specifies the interval between running the healthMonitor pipeline. Default value: 00:10:00 (10 minutes) --> <setting name="HealthMonitorInterval" value="00:10:00"/> You can read more about this feature in this blog post which I previously wrote.
How do I get to know the CD server Cache details Sitecore Admin will not present in CD server, how to get to know the Cache limit and usage in CD server. In local environment, where CD and CM are available we'll use the below URL. http://[domain]/sitecore/admin/cache.aspx But is there any other way to check the CD server cache utilization? Update: The below link will provide information like how to disable the Sitecore capability in CD. So you can set appropriate 'Authentication' (may be Windows authentication ) and access the 'Sitecore' folder! http://jondjones.com/learn-sitecore-cms/sitecore-developers-guide/sitecore-deployments/how-to-disable-sitecore-admin-from-your-content-delivery-servers
I think it's okay if you change that. Also don't see any other option. But it's only possible if you are on Sitecore 8.2 update 1 or higher regarding to the release notes. https://dev.sitecore.net/Downloads/Sitecore%20Experience%20Platform/82/Sitecore%20Experience%20Platform%2082%20Update1/Release%20Notes - reference number 105306 I found this information here - http://www.sitecorecoffee.com/2016/12/language-fallback-on-final-layout.html?m=1
Enable Field level fallback for Final Renderings Field I want to enable field level fallback for Layout->Final Renderings so when ever content editor creates a version in new language he/she will get all the content from Fallback language. But whats the best way to do this. Enabling field level fallback checkbox on /sitecore/templates/System/Templates/Sections/Layout/Layout/__Final Renderings item seems to be the only way. But this gets override on sitecore upgrade? Is there a better way to do it?
The only thing you need to do is to set Sortorder of Services Rendering Parameters Data section to value lower than General section Sortorder. Find Services Rendering Parameters Data section item in Content Editor Make sure that Standard Field checkbox is checked in View ribbon Find Sortorder field in the Appearance section Set its value to -100.
Change the Order that Component Properties Display In I have created a new rendering parameter to be used with a specific page layout. Everything is sync'd up but when I go to edit the Control Properties, my new section shows up below the "General" section. How can i make it so that my new section (Services Rendering Parameters Data) shows up first? I was reading something that says to make a copy of the template instead of inheriting so that my fields will show first but I'm not sure I understand what that means. Any help would be greatly appreciated!
I think you are restricting the wrong domain. In your code you are checking against the Sitecore domain but you said you are accessing the page as a webpage which by default uses the Extranet domain. More information on domains can be found here.
Sitecore restrict users from accessing the page using Sitecore security I have restricted the the access for the role "AdminUser" in the Access viewer as above. Later in the code when I am accessing using the below code try { if (Sitecore.Security.Accounts.User.Exists(@"Sitecore\AdminUser")) { isAuthenticated = Sitecore.Security.Authentication.AuthenticationManager.Login(@"Sitecore\AdminUser", true); } } It is authenticating the user and I am able to see the user role in the Sitecore.Context.User.Roles as "Admin User" But when we access the Page it loads well and fine. Is there a way I can stop the user with Role "AdminUser" from accessing the page Note: I am not accessing the item from Sitecore but as a webpage. http://domain/Support/Global-editor
You want to set the InstanceName to unique values on your CDs, such as abc12efdcms01-cd1 and abc12efdcms01-cd2 The servers are looking at that value to see if it has already completed the actions in the queue. With both servers set to the same name, the second one is thinking it has already completed the task. https://doc.sitecore.net/sitecore_experience_platform/setting_up_and_maintaining/xdb/configuring_servers/configure_a_content_delivery_server#_Changes_to_configuration_1 We use a patch file in a zzz folder that has a different value for each server. <?xml version="1.0"?> <configuration xmlns:patch="http://www.sitecore.net/xmlconfig/"> <sitecore> <settings> <setting name="InstanceName"> <patch:attribute name="value">CD1</patch:attribute> </setting> </settings> </sitecore> </configuration>
Scalability Setting on two CD servers We have set up one CM and two CD nodes( CD1 &amp; CD2 ). After publishing cache not gets cleared on CD1 node but on CD2 it's working fine i.e. we can see published content immediately on CD2 but for CD1 I have to clear cache going through /admin/cache.aspx page. I have gone through some articles and find out below which I'm planning to implement on production but just wanted to confirm if caching issue on CD1 will be really fixed. We have same connection string on CM and CD server. CM node <setting name="InstanceName"> <patch:attribute name="value">abc12efdcms01</patch:attribute> </setting> <setting name="Publishing.PublishingInstance"> <patch:attribute name="value">abc12efdcms01</patch:attribute> </setting> where abc12efdcms01 is CM node machine name CD1 node <setting name="InstanceName"> <patch:attribute name="value"></patch:attribute> </setting> <setting name="Publishing.PublishingInstance"> <patch:attribute name="value">abc12efdcms01</patch:attribute> </setting> CD2 node <setting name="InstanceName"> <patch:attribute name="value"></patch:attribute> </setting> <setting name="Publishing.PublishingInstance"> <patch:attribute name="value">abc12efdcms01</patch:attribute> </setting> Is this correct settings on both node. In IIS the name of website in CMS Website. Should I put abc12efdcms01-CMS Website OR the current one is fine. We already have below settings: <setting name="EnableEventQueues" value="true"> <eventQueue> <!-- Time between checking the queue for newly queued events. If new events are found they will be raised. --> <processingInterval>00:00:02</processingInterval> </eventQueue>
I can give some input regarding App Initialization in general on Azure App Service: During slot swap, you don’t want your 'preprod' to be activated into production (swap) without having been warmed up beforehand. Using AppInit the swapping operation will only occur once the load balancer received an HTTP Response from the init module. (Note this response can be anything, also a 404 or 500 so take that into account). If you are using Swap with Preview and running smoke tests or UI tests on that slot before swapping then the appinit will have less impact. During scale up: in Web apps, scale up of an App Service Plan means the Web App is moved onto new machines. These are going through cold start. Again using the AppInit the scale up will only take place through the DNS load balancer once a response has been received from the module. During scale out: when a new machine is added to the App Service plan, you’d want the requests to be distributed to the new machine as well, but only after cold start. App Init will also have effect here as the new machine will only be added to the load balancer after going through the appinit. In all cases, ongoing requests to the production slot, or to the smaller scale app will be gracefully completed, and new requests will end up on the new slot/machine). See also this article: http://ruslany.net/2015/09/how-to-warm-up-azure-web-app-during-deployment-slots-swap/
Best Practice around <applicationInitialization> for Sitecore WebApps Is there any best practice or recommendation around applicationIntialization? Should we use this? What is the best way to warm up or improve start up time of CMS and CD website after swap deployment slot? Any recommendation or best practice? Pros and cons if any? Suggestion Warmup around prefetch cache after app pool recycle or changes to production?
Please see this class: https://github.com/mikeedwards83/Glass.Mapper/blob/master/Source/Glass.Mapper.Sc.Mvc/Pipelines/Response/GetRenderer/GetViewRenderWithItemValidation.cs and this blog post: http://sitecorepromenade.blogspot.co.uk/2015/05/passing-invalid-id-in-rendering.html
Handling null datasource with Glass Mapper GlassView I'm using interfaces for my Glass Mapper mappings, and I have a scenario where a view rendering I'm creating has a null datasource (due to the item being marked as never publish). I'm getting the message "the model item passed into the dictionary is of type 'Sitecore.Mvc.Presentation.RenderingModel' but this dictionary requires..." as a YSOD. Normally I'd create a model entry in Sitecore and hook it to the rendering, which usually covers this, but when I did it using an interface I got a message saying a constructor was required, which you can't create in an interface. I have code in the rendering to check if it has a datasource, but it never gets there and errors out immediately. Is there any way to do what I'm trying to do with interfaces for models, or do I either a) need a concrete class, or b) need to use a controller rendering? The main reason for the interface models is there are a number of inheritances that I'm trying to set up, where a template might be inheriting from six others, and I didn't want to "junk up" the model with all of the repeated properties, if that makes sense. I'm trying to figure out the best practice here.
If you added/changed/removed item access for a role, you don't need to package that role and install it in the other environment. Role is not changed. The only thing you have to do is to add the item which has new security rules to the package. Find your item in Content Editor, make sure that Standard Fields checkbox is checked and scroll to the Security section to see how Sitecore stores your new item rights: Here is a link to Security Administrator´s Cookbook. It's for Sitecore 6 but the concepts haven't changed. It all works in the same way in Sitecore 8.x.
Role will not be installed as it already exists I have created a sitecore security accounts package with an updated permissions on roles. When i try to install it, its says "Role will not be installed as it already exists". Is that mean i can't override permissions on the roles using sitecore packages? is there a way to achieve this?
I'm also going through the Professional Sitecore 8 Development book and ran into the same issue. Not sure if you found the fix but thought I'd share my findings. I'm using Visual Studio 2017 Professional (toolsVersion = 15) and it turns out that gulp-msbuild doesn't support VS 2017. I made the following edits to the gulp-msbuild files to make this work: SolutionRoot/node_modules/gulp-msbuild/lib/constants.js: Modified the MSBUILD_VERSIONS from ... MSBUILD_VERSIONS: { 1.0: 'v1.0.3705', 1.1: 'v1.1.4322', 2.0: 'v2.0.50727', 3.5: 'v3.5', 4.0: 'v4.0.30319', 12.0: '12.0', 14.0: '14.0' } to this ... MSBUILD_VERSIONS: { 1.0: 'v1.0.3705', 1.1: 'v1.1.4322', 2.0: 'v2.0.50727', 3.5: 'v3.5', 4.0: 'v4.0.30319', 12.0: '12.0', 14.0: '14.0', 15.0: '15.0' } SolutionRoot/node_modules/gulp-msbuild/lib/msbuild-finder.js: I added the following starting at line 31 ... if (version === '15.0') { var env_var_dir = process.env['ProgramFiles(x86)'] || process.env['ProgramFiles']; var pathRoot = env_var_dir || path.join('C:', is64Bit ? 'Program Files (x86)' : 'Program Files'); return path.join(pathRoot, 'Microsoft Visual Studio', '2017', 'Professional', 'MSBuild', version, 'Bin', 'MSBuild.exe'); } I'm sure there are more elements in that path that could/should be parameterized but I'm just interested in getting this to work for this project. After I made these changes I had to reboot and then running the "Publish-Site" task worked as expected. Finally, I updated my gulpfile.js to look like this: var gulp = require("gulp"); var msbuild = require("gulp-msbuild"); var debug = require("gulp-debug"); var foreach = require("gulp-foreach"); var gulpConfig = require("./gulp-config.js")(); module.exports.config = gulpConfig; gulp.task("Publish-Site", function () { return gulp.src("./{Feature,Foundation,Project}/**/**/*.csproj") .pipe(foreach(function (stream, file) { return stream .pipe(debug({ title: "Publishing" })) .pipe(msbuild({ targets: ["Build"], gulpConfiguration: gulpConfig.buildConfiguration, properties: { publishUrl: gulpConfig.webRoot, DeployDefaultTarget: "WebPublish", WebPublishMethod: "FileSystem", DeployOnBuild: "true", DeleteExistingFiles: "false", _FindDependencies: "false", VisualStudioVersion: "15.0" }, verbosity: "diagnostic", toolsVersion: 15.0 })); })); }); Notice the two extra parameters: VisualStudioVersion and toolsVersion. I hope that helps. Cheers
When using Gulp to build a Helix based solution, what does "MSBuild failed with code 1" mean? I bought the Professional Sitecore 8 Development book and I am following the Sitecore Helix architecture approach. And following the examples in the book and online I am using Gulp in the Task Runner Explorer window to build and deploy the solution. Often times when I run the "Publish-Site" Gulp task I see error codes in red that say MSBuild failed with code 1. I have no idea what that means or how to troubleshoot it. Can anyone help me understand what that message means and how to troubleshoot it? Here is a screen shot: Here is the code from my gulpfile.js var gulp = require("gulp"); var msbuild = require("gulp-msbuild"); var debug = require("gulp-debug"); var foreach = require("gulp-foreach"); var gulpConfig = require("./gulp-config.js")(); module.exports.config = gulpConfig; gulp.task("Publish-Site", function () { return gulp.src("./{Feature,Foundation,Project}/**/**/*.csproj") .pipe(foreach(function (stream, file) { return stream .pipe(debug({ title: "Publishing" })) .pipe(msbuild({ targets: ["Build"], gulpConfiguration: gulpConfig.buildConfiguration, properties: { publishUrl: gulpConfig.webRoot, DeployDefaultTarget: "WebPublish", WebPublishMethod: "FileSystem", DeployOnBuild: "true", DeleteExistingFiles: "false", _FindDependencies: "false" } })); })); }); EDIT: I also noticed that when I do a rebuild of the entire solution that I get a few warnings about versions of System.Web.Mvc. Below is the text of the warning in Visual Studio: 8> No way to resolve conflict between "System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" and "System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35". Choosing "System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" arbitrarily. 8> Consider app.config remapping of assembly "System.Web.Mvc, Culture=neutral, PublicKeyToken=31bf3856ad364e35" from Version "3.0.0.0" [] to Version "5.2.3.0" [C:\Projects\SitecoreDev\Foundation\Ioc\SitecoreDev.Foundation.Ioc\bin\System.Web.Mvc.dll] to solve conflict and get rid of warning. 8>C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(1820,5): warning MSB3247: Found conflicts between different versions of the same dependent assembly. In Visual Studio, double-click this warning (or select it and press Enter) to fix the conflicts; otherwise, add the following binding redirects to the "runtime" node in the application configuration file: 8> SitecoreDev.Foundation.Repository -> C:\Projects\SitecoreDev\Foundation\Repository\SitecoreDev.Foundation.Repository\bin\SitecoreDev.Foundation.Repository.dll I believe that what this is telling me is that I need to add some assembly binding redirection to the web.config of the SitecoreDev.Foundation.Repository project to resolve this. However I am not completely sure how to accomplish this in the Helix architecture. If I understand correctly I don't want to have a web.config file in any of my projects. If I do then it will overwrite the Sitecore web.config file when it copies files from the dev root to the web root. Right? So I'm not sure how to fix problems like this in a particular project in my solution.
This problem was related to the site definition configuration. Our site mistakenly had multiple pipe-separated hostnames in the targetHostName property (it should have just one hostName value). I found this out by decompiling the SXA assembly Sitecore.XA.Foundation.Multisite.dll and creating a copy of the class Sitecore.XA.Foundation.Multisite.LinkManagers.LocalizableLinkProvider with some additional exception handling and logging code.
"The hostname could not be parsed." Error while rebuilding Link database When I try to rebuild the link database I get the following error from the dialog: Job started: RebuildLinkDatabasesIndex|System.UriFormatException: Invalid URI: The hostname could not be parsed. at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind) at Sitecore.XA.Foundation.Multisite.LinkManagers.LocalizableLinkProvider.GetLocalizedUrl(Item item, String url, UrlOptions options) at Sitecore.XA.Foundation.Multisite.LinkManagers.LocalizableLinkProvider.GetItemUrl(Item item, UrlOptions options) at Sitecore.Xml.Xsl.LinkUrl.GetInternalUrl(Database database, String url, String itemID, String anchor, String queryString) at Sitecore.Xml.Xsl.LinkUrl.GetUrl(XmlField field, Database database) at Sitecore.Data.Fields.LinkField.get_InternalPath() at Sitecore.Data.Fields.LinkField.ValidateLinks(LinksValidationResult result) at Sitecore.Links.ItemLinks.AddLinks(Field field, List`1 links, ItemLinkState linkState) at Sitecore.Links.ItemLinks.GetLinks(ItemLinkState linkState, Boolean allVersions, Boolean includeStandardValuesLinks) at Sitecore.Links.ItemLinks.GetAllLinks(Boolean allVersions) at Sitecore.Links.LinkDatabase.UpdateReferences(Item item) at Sitecore.Links.LinkDatabase.RebuildItem(Item item) at Sitecore.Links.LinkDatabase.RebuildItem(Item item) at Sitecore.Links.LinkDatabase.RebuildItem(Item item) at Sitecore.Links.LinkDatabase.RebuildItem(Item item) at Sitecore.Links.LinkDatabase.RebuildItem(Item item) at Sitecore.Links.LinkDatabase.RebuildItem(Item item) at Sitecore.Links.LinkDatabase.RebuildItem(Item item) at Sitecore.Links.LinkDatabase.RebuildItem(Item item) at Sitecore.Links.LinkDatabase.RebuildItem(Item item) at Sitecore.Links.LinkDatabase.RebuildItem(Item item) at Sitecore.Links.LinkDatabase.RebuildItem(Item item) at Sitecore.Links.LinkDatabase.RebuildItem(Item item) at Sitecore.Links.LinkDatabase.Rebuild(Database database) at Sitecore.Shell.Applications.Dialogs.RebuildLinkDatabase.RebuildLinkDatabaseForm.Builder.Build()|Job ended: RebuildLinkDatabasesIndex (units processed: ) I'm using Sitecore 8.2 with SXA. Possibly related; when I view the broken links report many of the broken links show a blank field. Presumably because the content was installed from a package including content and templates which had changed. So those blanks probably relate to removed template fields. It is possible there are orphaned field items lying around, but I'm not sure how I would delete those.
You can access MongoDB directly through the C# driver: string connectionString = ConfigurationManager.ConnectionStrings["analytics"].ConnectionString; var client = new MongoDB.Driver.MongoClient(connectionString); var database = client.GetServer().GetDatabase("your_database_name"); var contacts = database.GetCollection("Contacts"); var results = contacts.Aggregate( new BsonDocument { { "$lookup", new BsonDocument { {"from", "Interactions"}, {"localField", "_id"}, {"foreignField", "ContactId"}, {"as", "Interactions"} } } }); // This may be a very large string, depending on the amount of data you have string json = results.ResultDocuments.ToJson(); In the mongo shell, you can execute the same query using the following command: db.Contacts.aggregate({ $lookup: { from: "Interactions", localField: "_id", foreignField: "ContactId", as: "Interactions" } }) This query performs a sort of a join between Contacts and Interactions. An array of Interactions will be nested in every contact object. Here's an example of the output: [ { "_id" : NUUID("35d21c9d-5135-436f-8da4-fd3cb9fe597d"), "System" : { "VisitCount" : 2, "Value" : 0 }, "Lease" : { "ExpirationTime" : ISODate("2017-02-10T16:47:39.985Z"), "Owner" : { "Identifier" : "default-cd-cluster", "Type" : 0 } }, "Interactions" : [ { "_id" : NUUID("5395b002-f305-4210-82b1-7f89329f04e8"), "_t" : "VisitData", "ContactId" : NUUID("35d21c9d-5135-436f-8da4-fd3cb9fe597d"), "StartDateTime" : ISODate("2017-02-10T11:46:53.949Z"), "EndDateTime" : ISODate("2017-02-10T11:46:53.949Z"), "SaveDateTime" : ISODate("2017-02-10T12:07:40.522Z"), "ChannelId" : NUUID("b418e4f2-1013-4b42-a053-b6d4dca988bf"), "Browser" : { "BrowserVersion" : "56.0", "BrowserMajorName" : "Chrome", "BrowserMinorName" : "56.0" }, "Screen" : { "ScreenHeight" : 480, "ScreenWidth" : 640 }, "ContactVisitIndex" : 1, "DeviceId" : NUUID("35d21c9d-5135-436f-8da4-fd3cb9fe597d"), "Ip" : { "$binary" : "fwAAAQ==", "$type" : "00" }, "Language" : "en", "LocationId" : NUUID("d98c1dd4-008f-04b2-e980-0998ecf8427e"), "OperatingSystem" : { "_id" : "WinNT" }, "Pages" : [ { "DateTime" : ISODate("2017-02-10T11:46:54.189Z"), "Duration" : 0, "Item" : { "_id" : NUUID("110d559f-dea5-42ea-9c1c-8a5df7e70ef9"), "Language" : "en", "Version" : 1 }, "PageEvents" : [ { "Name" : "Long running request", "ItemId" : NUUID("110d559f-dea5-42ea-9c1c-8a5df7e70ef9"), "Timestamp" : NumberLong(0), "Data" : "7448", "DataKey" : "7,449", "Text" : "Request took 7,449ms to complete", "PageEventDefinitionId" : NUUID("dc6f6aff-6aa9-423f-a824-49f9ee741aa9"), "DateTime" : ISODate("2017-02-10T11:46:57.028Z"), "Value" : 0 } ], "PersonalizationData" : { "ExposedRules" : [] }, "SitecoreDevice" : { "_id" : NUUID("fe5d7fdf-89c0-4d99-9aa3-b5fbd009c9f3"), "Name" : "Default" }, "MvTest" : { "ValueAtExposure" : 0 }, "Url" : { "Path" : "/" }, "VisitPageIndex" : 1 } ], "SiteName" : "website", "TrafficType" : 20, "UserAgent" : "Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36", "Value" : 0, "VisitPageCount" : 1 } ] } ]
How to Join MongoDb Collections Using Sitecore Mongo Db Report Data Source Am using sitecore 8.0, below code gets the analytics from the mongo db. I have two collections "ineractions" and "ContactId", I want to join both the collections using common field "contact" from interactions collection and "_id" from contacts collection. Please refer my code below: MongoDbReportDataSource mongoDBSource = new MongoDbReportDataSource("analytics"); string queryInteractions = "{collection: \"Interactions\",query: {_t: \"VisitData\"},fields: [\"_id\",\"ContactId\",\"StartDateTime\",\"Pages.Item._id\",\"Pages.Duration\",\"Pages.Url.Path\",\"Pages.Url.QueryString\",\"Pages.PageEvents.Timestamp\"]}"; ReportDataQuery interactionsReportQuery = new ReportDataQuery(queryInteractions); DataTable interactions = mongoDBSource.GetData(interactionsReportQuery); string queryContacts = "{collection: \"Contacts\",fields: [\"_id\",\"Identifiers.Identifier\"]}"; ReportDataQuery contactsReportQuery = new ReportDataQuery(queryContacts); DataTable contacts = mongoDBSource.GetData(contactsReportQuery); Please suggest best approach to achieve this.
One reason I can think of is decoupling To subscribe to a regular .NET Event, I need to reference the assembly wherein it is defined. With Sitecore events, this is handled via configuration and therefore the Sitecore Configuration Factory. No reference to your assembly is necessary.
When to define a new Sitecore event There are numerous articles describing how to define and register a new Sitecore event: Sitecore Community Docs: Sitecore Events Old SDN (still actual): Using Events Are there any recommendations when to do so? One can simply raise and handle .NET events in code. Sitecore events can be registered in a config file which might add some visibility and maintenance flexibility; Sitecore events have built-in support for remote communication. Any other reasons to define a Sitecore event?
There is a module on Sitecore Marketplace which does exactly what you need and even more. It's called ENVIRONMENT STYLER FOR SITECORE. You can find it here: https://marketplace.sitecore.net/Modules/E/Environment_Styler_for_Sitecore.aspx You can read more about it on author's blog: https://jammykam.wordpress.com/2017/01/03/environment-styler-for-sitecore/ I'm not 100% sure but I think it's this css line which changes the color of the header: .sc-globalHeader { background-color: #FF0000; background: radial-gradient(circle, #FF0000, #FF8C00, #FF0000); }
How to change the default header color in Sitecore's internal applications? We use several environments in Sitecore and sometimes developers get confused about which environment they're currently using. Is it possible to edit the Sitecore applications header somehow, so that each environment has a different color? It would be even nicer to put some text in that space, if possible.
Edit 14/6/17: This has indeed been fixed in v2.0 Update 1 (release notes) This is a bug - the UI should use the Publishing Target Item name, not display name, when queuing the job. . We will aim to fix this in the upcoming release ("2.0 Update 1", May-ish 2017). To work around this problem in the mean time, you could provide your configuration in JSON form, this will allow you to provide the Target display name with spaces. (Obviously this won't be good enough if you want to set different display names across multiple languages.) For example, you would provide a file, e.g. 'sc.publishing.custom.Targets.ProductionDR.json', with the following contents: { "Sitecore": { "Publishing": { "Services": { "StoreFactory": { "Options": { "Stores": { "Targets": { "Production Disaster Recovery": { "Type": "Sitecore.Framework.Publishing.Data.TargetStore, Sitecore.Framework.Publishing.Data", "ConnectionName": "DisasterRecovery", "FeaturesListName": "TargetStoreFeatures", "Id": "964c28ac-46be-409a-8ff8-ba5412694a2b", "ScDatabase": "disaster_recovery" } } } } } } } } }
Change in Publishing Target Display Name Breaks Target Mapping in Publishing Service I want to be able to change the display name of the publishing target item and not change the item name as follows: In the config/global folder for the Sitecore Publishing Service, there is a XML file to apply the additional publishing targets. Below is an example leaving out some of the other targets: <Settings> <Sitecore> <Publishing> <Services> <StoreFactory> <Options> <Stores> <Targets> <!--Additional targets can be configured here--> <Production_DR> <Type>Sitecore.Framework.Publishing.Data.TargetStore, Sitecore.Framework.Publishing.Data</Type> <ConnectionName>DisasterRecovery</ConnectionName> <FeaturesListName>TargetStoreFeatures</FeaturesListName> <!-- The id of the target item definition in Sitecore. --> <Id>964c28ac-46be-409a-8ff8-ba5412694a2b</Id> <!-- The name of the Database entity in Sitecore. --> <ScDatabase>disaster_recovery</ScDatabase> </Production_DR> </Targets> </Stores> </Options> </StoreFactory> </Services> </Publishing> </Sitecore> </Settings> After changing the display name from Production_DR to Production Disaster Recovery, publishing fails for that specific target: I understand that the targets configured for Sitecore Publishing Service must match the publishing targets in Sitecore. Is there another way to achieve the same results? Or, how would you configure publishing targets that have spaces in the name?
No. There is no way to do this with Sitecore 8.2 or earlier.
Checking for Locked/In Session Contact Running Data Exchange Framework I am running a process in the Data Exchange Framework so I don't really have access to the tracker. Is there a way to tell if a contact is locked/in session other than using the following and checking the status (already locked)? LockAttemptResult<Contact> lockResult = contactRepository.TryLoadContact(emailAddress, leaseOwner, TimeSpan.FromMinutes(1)); That returns a status, but also tries and locks it. I just need to know if it is already locked. I was hoping var contact = contactRepository.LoadContactReadOnly(email); would also include a lock status, but does not seem to be a way to get it. I need a way basically to pass in an email and return a lock status. This post was helpful, but I am hoping there is another way to do it. Thanks. Identify contact without using Tracker.Current.Session.Identify()
From the experience I have with Sitecore, we have rolled out 70+ sites on sitecore. Below are the following points/practice we usually follow when implementing our sites. Content Sharing You may have a main content repository which stores all the common content for the different sites. Contents that are specific to a site are created under the site node. Content Size It is preferable to make use of Sitecore buckets to store contents because it is the number of contents which will keep on growing. Indexing Make use of Sitecore indexes so that you index the contents and when loaded on the site, instead of performing a call to the database, perform a call to the indexes to retrieve the contents. Environment Cluster Breaking the different sites on different cluster may helps in terms of performance. For example, if you have sites found in the Europe, Middle East, Americas, you may have different server clusters such as EU which will hold all Europe Sites, NALA which will hold the different sites in the North ou South of America. Query Perform query which does not have to loop through the whole content tree. Example, when using the Axes.GetDescendents(). I saw many times that the item is the root site and when the mention method is used, it loops through all items in the sites. So, you need to try as much as possible to perform a call ti the database which targets the item precisely and also make use of query instead of fast query because fast query is not cache. Assets Make use of CDN to load the different assets such as images, JavaScript and CSS. Server Configuration As for server configuration, please follow the scalability guide of Sitecore found at the Sitecore knowledge base.
Sitecore Content Limitation, best strategy way forward I just want to understand the best content strategy that we need to employ for future large content sites. In a scenario the customer is using the Sitecore 7.x for about 4+ years, pure content site, which got rolled out for 10+ countries. Over time the Content authors created as much content as possible and the site performance is in unacceptable limit, with the consideration and limitation of using caching at CD, Load Balance Cache. As we know this could be the case for many future websites as well. I just want to understand from the architecture perspective and content management perspective, what factors do we need to consider to manage large content and ever growing content. The below may not be right, but just a thought. Anyway the master / core database can be split ? What archive strategy we can apply to manage such situations? Is sitecore is going to move away from SQL server to No SQL ? to maintain the scale and volume ? Can anyone share your experience on how did you manage/managing huge content ?
In v2.0, the publishing service module exposes a new event in Sitecore: publishingservice:publishend When the publishing service completes a publishing job, this event is triggered once for the entire job in addition to the three events from the existing publishing system: publish:begin publish:complete publish:fail So apparently the publish:end is not yet supported but you could use the new event from the service or the publish:complete. I tested that last one and it works, but has a small bug: the published languages are not all send to the event (just the first one). That has been fixed in a hotfix though (can give the number as soon as I can access the support site again). Be aware that the arguments for the events are not the same, so you will need to write the event code again.
Publishing service with Sitemap XML I've got the Sitemap XML package installed and I'm interested in using the new publishing service. Because the publish:end pipeline is no longer used with the publishing service, where would I put that call for the Sitemap XML now so it fires after the publishing service runs?
I have been able to do it by using the event change:selectedItemId. Below is the code that I have used: define(["sitecore", "jquery"], function (sitecore, $) { var initStepDefinition = sitecore.Definitions.App.extend({ initialized: function () { this.getOptions(); this.getChangeOption(); }, getOptions: function () { var app = this; $.get("/api/experimental/getoptionlist").done( function (data) { app.OptionBox.set("items",data); } ); }, getChangeOption: function (){ var app = this; app.OptionBox.on("change:selectedItemId", (function (){ alert(app.OptionBox.viewModel.selectedItemId()); })); } }); return initStepDefinition; });
SPEAK Combobox options binding I am currently implementing a module on SPEAK UI. I have a dialog which shows up when the user clicks on a button. Then, on the dialog, I have a label with a combo box which displays a list of items. The list is retrieved as follows: define(["sitecore", "jquery"], function (sitecore, $) { var initStepDefinition = sitecore.Definitions.App.extend({ initialized: function () { this.getOptions(); }, getOptions: function () { var app = this; $.get("/api/experimental/getoptionlist").done( function (data) { app.OptionBox.set("items",data); } ); } }); return initStepDefinition; }); Now, I need to display a form under the combo box when the user selects an item from the list. The data being returned from the server is a list of objects (Value and Text) and converted into JSON. Question: I don't know how to bind in the change event so that on each selection, I get the Id of the selected item. Note I've seen that Sitecore makes use of the Knockout.js and that it is the options: items data bind which I need to check but I don't know how. I am new to the SPEAK Framework and this is the first module I am implementing using SPEAK.
After much debugging and decompiling I found the answer. This can be done by implementing a ValueAccessor that uses PropertyValueReader("Tags") and IndexerPropertyValueWriter("tagname"). I was on the wrong track for long because the class structure of the tags seems related to how email addresses and phone numbers are implemented, however reading and setting them using DEF is completely different. When running a repeating import, be aware that visitor tags are timestamped values, so be sure to add an "Objects Are Different Mapping Rule", which comes with the Sitecore provider, to prevent the contact tags filling with useless duplicate values.
Setting contact tags with data exchange framework I am working on getting the Data Exchange Framework to update xDB contacts. I have it working for email and phone numbers, but now I have some properties that I'd like to store in the contacts' tags. I have tried different setups with a Facet Collection Property Value Accessor and a Facet Indexer Property Value Accessor, but that results in failed mappings. Is there anyone who has managed to update the contacts visitor tags with DEF?
I recently came across with the same situation where we have created Virtual user and also created some custom property. At the early stage it was working properly as Sitecore user works but one day suddenly it stopped working. In my solution still Sitecore.Context.User.IsAuthenticated this was always true but all the profile properties was empty at this time. Then I started digging into our latest change we made for project and found we just added a view rendering on LogIn page (Login Item). And that rendering was having var customPropValue = Sitecore.Context.User.Profile.GetCustomProperty("customProp"); code and some other code too. To just test I removed the rendering from the login item and it seems functionality again started working because after login it was either redirecting me to home page or RedirectURL page. Then it was proved that Virtual user was not working because of the new rendering which contains code to get custom property of user. I again applied that rendering to item and this time I removed all other code from the rendering and still keep var customPropValue = Sitecore.Context.User.Profile.GetCustomProperty("customProp"); code into it and this time again issue was same I lost all the profile properties of virtual user. At last I removed the var customPropValue = Sitecore.Context.User.Profile.GetCustomProperty("customProp"); code from the rendering and it started working for me. I want that code on other pages but not on login page so I added a condition on top if page is login page then don't execute this code and execute for all other pages. After making this change it started working for me. On the other pages I was using same code so there was no issue with the code I found that issue is with the code on Login page. After login and redirect user on any page everything works perfect in virtual user. I already opened a ticket in Sitecore for same they are into investigation why it is not working if we are getting any profile properties at the time of login. We have tested this Virtual user functionality with multiple login at the same time and honestly it is working perfect. So I would say the Virtual feature is the really cool feature provided by Sitecore but on one point we need to be more careful. I hope Sitecore will resolve this issue in next releases or will provide patch for same.
Sitecore Virtual User is lost on new page request We have created a Virtual User in Sitecore (to reside in Sitecore memory) - we are able to see the virtual user with all the profile data we save but on a redirect to a new page, the Virtual user and its data is lost. We are just seeing a normal anonymous user which is not a virtual user. The virtual user is created using the below code syntax - Sitecore.Security.Accounts.User user = Sitecore.Security.Authentication.AuthenticationManager.BuildVirtualUser(@"domain\user", true); if (user != null) { string domainRole = @"domain\role"; if (Sitecore.Security.Accounts.Role.Exists(domainRole)) { user.Roles.Add(Role.FromName(domainRole)); } user.Profile.Email = "[email protected]"; user.Profile["Custom Property"] = "Custom Value"; user.Profile.Save(); Sitecore.Security.Authentication.AuthenticationManager.LoginVirtualUser(user); } Are we missing something to make the virtual user available on all pages of our application.
Since there is one rendering for many items you can almost follow Amit's answer but you will need to use an edit frame. Glass has a method that helps start an edit frame in mvc. For more info about incorporating that see the following link: https://visionsincode.wordpress.com/2015/01/08/how-to-use-editframe-in-sitecore-mvc/ You will have to pass the edit frame helper the current item that will have the checkbox to change and the id or path to your custom experience button. My example item: https://www.screencast.com/t/y3WnJod3 @foreach(var bannerItem in myBannerList) { using (Html.BeginEditFrame(bannerItem, "{FDE5A219-C691-4978-B9D2-939E98582626}") { ...banner html here... } } Your id will be different and should be maintained in a constants file instead of as a raw unnamed string but this should demonstrate the idea. There is another more elegant option too but it takes a little more work and I have not actually tried it myself. You can create an Edit Frame Small Button and give it a command. You would then assign this button to the edit frame instead of the one shown earlier. This type of button takes a command which you will want to insert into the command section of Sitecore's configuration through a patch config. It would be worth while to make the code the command points to somewhat generic in that it should read in a parameter for the name/id of the field that it will try to toggle. This method allows a user to simply click the button that appears on the edit frame and toggle the checkbox. The other way opens a modal which displays the checkbox field.
How to edit a checkbox field in experience editor Using sc8.0 with MVC. There is a rendering to render banner items. Each banner item has a checkbox field "Is Featured". I would like to give the author to use the checkbox field in experience editor. Below is something I tried, following an online article. I change the option in the dropdown and click on Save. It shows the red banner under menu - an error occurred. But there are no logs in console or in the data folder. @if (isPageEditorEditing) { <div> <select onchange="Sitecore.WebEdit.setFieldValue('@myitem.Uri', '@Fields.IsFeatured.ToShortID()', this.options[this.selectedIndex].value);"> <option value="1">Yes</option> <option value="0">No</option> </select> </div> }
There is another option - define your own user access role - sitecore/YourOwnUserRole - then give that user all the same access as a sitecore/Author and sitecore/Designer and then make sure they have access in the core database to: /sitecore/client/Applications/ExperienceProfile /sitecore/client/Applications/ExperienceAnalytics ref: https://kb.sitecore.net/articles/820320
Access to both Experience Profile and Presentation Details I have a user that needs access to both Experience Profile and Presentation Details. We found a Sitecore KB reference (https://kb.sitecore.net/articles/820320) that stated if a user had the Author or Designer permissions assigned, they couldn't see the Experience Profile. This appears accurate, as my user - when they had those permissions - would click Experience Profile and be bounced to the login page. If I take away Author/Designer, they can access the Experience Profile, but then trying to access presentation details in either Content or Experience Editors is not available (they can still edit content, but not presentation). Beyond assigning the user full admin rights, does anyone have experience with this setup? Or is this a case where they might need an analytics user account separate from their authoring account? They use AD integration, but I could create a sitecore domain user for it, I'd rather not have to go that route though.
I've been using the AD module for some time now and here are some items for consideration. The LDAPLogin.aspx page could be substituted for the /sitecore/login/default.aspx in the event you want all users to use AD. I recommend you make the entire site HTTPS for Content Authors, that way there is no special setup for the login page. There is a post here that provides a more detailed example as to which files to rename.
Redirecting to /sitecore/admin/LDAPLogin.aspx and Forcing Login We are having some issues with Active Directory and redirecting to the /sitecore/admin/LDAPLogin.aspx page. What should be properly setup so users are redirected to this page to login? Also just to confirm this is the correct page? The goal is to have it redirect to an HTTPS (secured login).
No, this is not doable with the existing General Link Field. Your options are: Have a Single Line Text field for first part, and generic link for the second part Use Rich Text Custom Field Type (this is definitely the most complicated options) I'd recommend first option if this only is needed in a few places. The third option is not trivial, so wouldn't recommend that if you only need this once or twice.
Partial LinkField for Sitecore 8.1 rev. 160302 My issue is that I need to be able to allow a user to use the General Link FieldType and when the field is rendered I only want part of the text to be linkable. Example: Link Description: This is my link to test please click here I only want the "click here" portion to be clickable. Is there any way to do this with the current field types in SiteCore or would I have to create a custom Field Type? P.S. I wasn't sure how to name my request so I went with Partial LinkField.
This can certainly be performed using Sitecore PowerShell Extensions. Read more about setting up SPE Remoting here. Example: The following gets an item and uploads through SPE Remoting. $session = New-ScriptSession -Username "sitecore\admin" -Password "b" -ConnectionUri "https://remotesitecore" $localFilePath = "C:\temp" $filename = "kitten.jpg" $filenameWithoutExtension = [System.IO.Path]::GetFileNameWithoutExtension($filename) Get-Item -Path "$($localFilePath)\$($filename)" | Send-RemoteItem -Session $session -RootPath Media -Destination "Images/" If you wish to update using a GUID then the command changes slightly like this: ... | Send-RemoteItem -Session $session -RootPath Media -Destination "{GUID}" Check out the modules directory for more samples here.
Reattach images to media library items after optimization? I was able to download all the legacy image files in my media library via an ASP.net script (https://gist.github.com/DaveGoosem/6289015), in order to optimize them. I've finished doing this and now want to re-upload/attach them to the media items and replace the old ones. Wondering if there is an easy way to do this either via .Net or via a Powershell script? There are hundreds, so I'm not keen on replacing them manually within the content editor!
Just as luck might have it, fiddling around with the Sitecore Web Url mysteriously fixed the error. I'm not sure what caused it, possibly a badly cached URL within TDS.
TDS shows error 500 when syncing with Sitecore - how to fix? I've deployed a local instance of our Sitecore project and I'm trying to get TDS to work. The tests page shows all green: However when attempting to click on Sync with Sitecore I receive a 500 error: And the TDS log shows the following: Exception ProtocolException: Server stack trace: at System.ServiceModel.Channels.HttpChannelUtilities.ValidateRequestReplyResponse(HttpWebRequest request, HttpWebResponse response, HttpChannelFactory`1 factory, WebException responseException, ChannelBinding channelBinding) at System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout) at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout) at System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout) at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout) at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation) at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message) Exception rethrown at [0]: at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData&amp; msgData, Int32 type) at HedgehogDevelopment.SitecoreProject.VSIP.SitecoreConnector.TdsServiceSoap.Version(VersionRequest request) at HedgehogDevelopment.SitecoreProject.VSIP.SitecoreConnector.TdsServiceSoapClient.HedgehogDevelopment.SitecoreProject.VSIP.SitecoreConnector.TdsServiceSoap.Version(VersionRequest request) at HedgehogDevelopment.SitecoreProject.VSIP.SitecoreConnector.TdsServiceSoapClient.Version() at HedgehogDevelopment.SitecoreProject.VSIP.Utils.Support.CheckClientVersion(TdsServiceSoapClient client, SitecoreProjectNode project, Boolean retry) Inner Exception Details: Exception The remote server returned an error: (500) Internal Server Error. (WebException): at System.Net.HttpWebRequest.GetResponse() at System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout) Exception An error occured getting the TDS service version. Please review the Sitecore logs and/or windows events on the server to determine the problem. (ApplicationException): at HedgehogDevelopment.SitecoreProject.VSIP.Utils.Support.GetTdsServiceSoapClient(String sitecoreWebUrl, String sitecoreAccessGuid, SitecoreProjectNode project, Boolean checkVersion) at HedgehogDevelopment.SitecoreProject.VSIP.Utils.Support.GetTdsServiceSoapClient(SitecoreProjectNode project, Boolean checkVersion) at HedgehogDevelopment.SitecoreProject.VSIP.ToolWindows.SyncWithSitecoreToolWindow.SyncItemsWithSitecore(SitecoreProjectNode project, SitecoreItemNode syncRoot, Boolean sycnChildren) at HedgehogDevelopment.SitecoreProject.VSIP.SitecoreProjectPackage.ShowSitecoreSyncWindow(SitecoreProjectNode project, SitecoreItemNode selectedItem, Boolean syncChildren) Exception ProtocolException: Server stack trace: at System.ServiceModel.Channels.HttpChannelUtilities.ValidateRequestReplyResponse(HttpWebRequest request, HttpWebResponse response, HttpChannelFactory`1 factory, WebException responseException, ChannelBinding channelBinding) at System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout) at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout) at System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout) at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout) at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation) at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message) Exception rethrown at [0]: at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData&amp; msgData, Int32 type) at HedgehogDevelopment.SitecoreProject.VSIP.SitecoreConnector.TdsServiceSoap.Version(VersionRequest request) at HedgehogDevelopment.SitecoreProject.VSIP.SitecoreConnector.TdsServiceSoapClient.HedgehogDevelopment.SitecoreProject.VSIP.SitecoreConnector.TdsServiceSoap.Version(VersionRequest request) at HedgehogDevelopment.SitecoreProject.VSIP.SitecoreConnector.TdsServiceSoapClient.Version() at HedgehogDevelopment.SitecoreProject.VSIP.Utils.Support.CheckClientVersion(TdsServiceSoapClient client, SitecoreProjectNode project, Boolean retry) Inner Exception Details: Exception The remote server returned an error: (500) Internal Server Error. (WebException): at System.Net.HttpWebRequest.GetResponse() at System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout) Exception An error occured getting the TDS service version. Please review the Sitecore logs and/or windows events on the server to determine the problem. (ApplicationException): at HedgehogDevelopment.SitecoreProject.VSIP.Utils.Support.GetTdsServiceSoapClient(String sitecoreWebUrl, String sitecoreAccessGuid, SitecoreProjectNode project, Boolean checkVersion) at HedgehogDevelopment.SitecoreProject.VSIP.Utils.Support.GetTdsServiceSoapClient(SitecoreProjectNode project, Boolean checkVersion) at HedgehogDevelopment.SitecoreProject.VSIP.ToolWindows.SyncWithSitecoreToolWindow.SyncItemsWithSitecore(SitecoreProjectNode project, SitecoreItemNode syncRoot, Boolean sycnChildren) at HedgehogDevelopment.SitecoreProject.VSIP.SitecoreProjectPackage.ShowSitecoreSyncWindow(SitecoreProjectNode project, SitecoreItemNode selectedItem, Boolean syncChildren) The Sitecore log doesn't show any relevant errors. I am also able to access the /_DEV/TdsService.asmx page without an error. What could I do to fix the TDS connection?
There are a couple good ways to do this Provide a different interface when the page is in edit mode. Image with retina/non-retina support using Glass: @if (Sitecore.Context.PageMode.IsExperienceEditorEditing) { <div class="container-fluid" style="width: 100%;"> <h3>Logo Images</h3> <div class="col-sm-6"> <h4>1x - non-retina</h4> @RenderImage(m => m.Image, isEditable: true, parameters: new { @class = "img-responsive" }, outputHeightWidth: true) </div> <div class="col-sm-6"> <h4>2x - retina</h4> @RenderImage(m => m.Image_Retina, isEditable: true, parameters: new { @class = "img-responsive" }, outputHeightWidth: true) </div> </div> } else /* Normal or Preview Mode */ { <img src="@Model.Image.Src" srcset="@Model.Image_Retina.Src 2x"> } When the page is in edit mode the view is rendered completely differently, with in-page edit fields for the two images. (@Editable will also work here, but @RenderImage is more appropriate for Image fields) Add a Custom Experience Button Create a custom experience button that will expose all of the source image fields in a dialog: In the Core database: Add a new item to /sitecore/content/Applications/WebEdit/Custom Experience Buttons, based on the Field Editor Button template Set the Fields field to a pipe-separated list of the field names that you want to edit (the names of your image source fields) In the Master database: Navigate to the rendering that outputs these images Find the Experience Editor Buttons field in the Editor Options section Add the new custom experience button to the Selected list Now you'll have this new button in the context menu for the rendering when in edit more. Clicking it will open a dialog with the fields that you set in the Fields field of the button item. Talk to your content authors If this is a possibility, it's good to get input from the people who will actually be using this. Preferences vary from person to person
How can I make responsive images editable? I've been given this markup from the front-end developers and am working on figuring out how to implement it so that it is editable. <img src="img/[email protected]" srcset="img/[email protected] 2x"> I found some examples online, but they all seemed fairly complex. Is there a simple way of making this editable? Thanks! Edit: I am looking to be able to change images from within the experience editor. I don't need to edit image properties. I've been using Glass Mapper throughout this project and for images without the srcset attribute I've just been using @RenderImage(x => x.CompanyLogo, isEditable: true). I don't know how to maintain the same type of functionality now that the front-end devs have added the srcset attribute to the images.
After reviewing the Mongo logs on the primary server, I found that I was receiving authentication errors for each connection attempt. Without specifying the authSource, Mongo uses the database defined in the connection string. Therefore a connection string like: <add name="analytics" connectionString="mongodb://rootAdmin:[email protected]/analytics?replicaSet=test-rs" /> uses the analytics database when authenticating the rootAdmin user. Since there are no users defined in this database, the authentication fails. To get around this, you need to add an additional parameter: authSource. Following the MongoDocs verbatim ends up causing a configuration error: ...analytics?authSource=admin&amp;replicaSet=test-rs The solution is to encode the &amp; character. This allows you to pass in as many parameters as you wish: ...analytics?authSource=admin&amp;amp;replicaSet=test-rs Finally, to ensure a connection to all members in the replica set, the multiple members need to be defined as follows: <add name="analytics" connectionString="mongodb://rootAdmin:[email protected],192.168.1.203,192.168.1.194/analytics?authSource=admin&amp;amp;replicaSet=test-rs" /> I was able to confirm that data is now being written to both the Primary and Secondary servers and the arbiter is participating in voting properly. Also of note, the Arbiter MUST be able to authenticate with the given user. I redid my arbiter and made sure to create the users against the admin database. By default, users are created in the test database.
Mongo Replica Set Connection Error, Sitecore 81 I have a POC of a Mongo Replica (Mongo 3.0.14) set created locally using VirtualBox. I have a Primary, Secondary and Arbiter created and initiated in the replica set: Using Robomongo from my host machine (local OS, Win10), I am able to connect to the Primary and Secondary servers. I am unable to connect to the arbiter- though I think this may be expected? I wasn't able to find a clear answer to that question. My connection string is as follows in a native 8.1 rev 160519 install: <add name="analytics" connectionString="mongodb://rootAdmin:[email protected]/analytics?replicaSet=test-rs" /> <add name="tracking.live" connectionString="mongodb://rootAdmin:[email protected]/tracking_live?replicaSet=test-rs" /> <add name="tracking.history" connectionString="mongodb://rootAdmin:[email protected]/tracking_history?replicaSet=test-rs" /> <add name="tracking.contact" connectionString="mongodb://rootAdmin:[email protected]/tracking_contact?replicaSet=test-rs" /> I have tested with and without (current) the secondary server and arbiter included in the connection string, yet I receive the same error in the logs, always: ERROR Unable to connect to a member of the replica set matching the read preference Primary This error is followed by a number of other connection related issues, though this is the first error present. The Mongo VM's are all running Ubuntu (v 16.04.2). From the Primary VM, I can authenticate to the Primary and Secondary instances, but not the arbiter. Prior to initiating the replica set, I created the same users on all Mongo instances and was able to login prior to the creation of the replica set. I'm not 100% convinced that my issue is with the Arbiter, but it appears that I should be able to log in to it.
In Sitecore 8.1 and above there is a setting which can be turned on to allow the content authors to start test via experience editor. Please add the below settings either as patch config file or You can edit the value in the config file (Sitecore.ContentTesting.config). Setting name is “ContentTesting.AlwaysShowTestCandidateNotification”
AB testing: Only getting "Item has a test in draft message" in Sitecore 8.1 AB Testing: In Test Definition Item under the Test Lab I have set the workflow as sample Workflow and workflow state as Awaiting Approval. But when I saved the item I am only getting "item has a test in draft" notification message. There is no submit option visible in experience editor's notification area. How can I get "Create a test" option?
IIRC the languages in the Core database relate the the language versions that the Sitecore admin pages are displayed in. So this would change the text in the Sitecore interface. This is known as the Client Language The languages in the master DB relate the the Content Language
Language settings in master vs core Recently we discovered than we have some versioned items in Sitecore tree, in languages not supported by our sites, event not set as language in our Sitecore settings. Today we were removing these versioned items of not supported languages, when we noticed that the languages added in core database are different than languages added in master database. Which is the purpose of the languages defined in core? In master we have set the supported languages in our web sites, but in core all the languages set are language which we never have supported them. Looking at it, we have several questions. First of all why Sitecore allow to have different languages set in Core and Master? Which are the purpose of Core language? In master we added only the languages supported in our sitecore websites is it that right? In the future our current Sitecore websites will support more languages, these new languages have to be added only in Master as we have done until now, or is it recommend to add to in Core too? Thanks!
When getting the index it seems like it is better to call an index by name I was calling the index like so: var indexableItem = new SitecoreIndexableItem(currentStory); var index = ContentSearchManager.GetIndex(indexableItem); But it didn't work as expected. So I changed it to this: var index = ContentSearchManager.GetIndex("sitecore_master_index"); And it works properly.
SearchResultItem POCO not populated I have a class (SBJSearchItem) that inherits SearchResultItem that I'm using with the ContentSearchManager. The problem is that some of my SBJSearchItem properties are not populating. I'm using Azure Search as part of Sitecore Azure PaaS. public class SBJSearchItem : SearchResultItem { #region Public Properities // Type is working. This stores an ID and comes back as a string, which is fine. [IndexField("type")] public string Type { get; set; } // Authors is working. This stores a list of IDs. [IndexField("authors")] public string Authors { get; set; } // Title is working. It stores a string. [IndexField("title")] public string Title { get; set; } /* Publish Date does not work. This is just a date/time field in Sitecore. It is stored as a string type in the index. I made it nullable because I get an error that says that it cannot convert null to DataTime. I believe that's because it also pulls the template which doesn't have a date set. */ [IndexField("publish_date")] public DateTime? PublishDate { get; set; } // Section does not work. It is a computed field that I set to a string. [IndexField("section")] public string Section { get; set; } /* DateSearch does not work. This is a computed field. It is stored as a DateTimeOffset type. I get a DateTime.MinValue. */ // EDIT: Added this per comments [TypeConverter(typeof(IndexFieldDateTimeValueConverter))] [IndexField("date_search")] public DateTime DateSearch { get; set; } #endregion } Edit 4 Apparently getting the index in the manner that I was doesn't work the same as getting the index specifically by name. Here's an example of how I'm executing the query: // Be careful if you use the commented lines here: //var indexableItem = new SitecoreIndexableItem(currentStory); //var index = ContentSearchManager.GetIndex(indexableItem); // This apparently is DIFFERENT than the previous index declaration above var index = ContentSearchManager.GetIndex("sitecore_master_index"); using (var context = index.CreateSearchContext()) { var query = context.GetQueryable<SBJSearchItem>() .Where(i => i.TemplateId == SitecoreItemIds.BLOG_STORY_TEMPLATE &amp;&amp; i.ItemId == currentStory.ID) .ToList(); } The query works except those few properties that I mentioned above are null in my list of items (well one item in this case). Here's my patch that adds the computed fields into the index. I have verified that the values are actually in the index. <index id="sitecore_master_index"> <configuration> <!-- EDIT: Added per comments --> <fieldMap type="Sitecore.ContentSearch.Azure.FieldMaps.CloudFieldMap, Sitecore.ContentSearch.Azure"> <fieldNames hint="raw:AddFieldByFieldName"> <field type="System.String" fieldName="section" cloudFieldName="section" boost="1f" settingType="Sitecore.ContentSearch.Azure.CloudSearchFieldConfiguration, Sitecore.ContentSearch.Azure"/> <field type="System.DateTime" fieldName="date_search" cloudFieldName="date_search" boost="1f" format="yyyy-MM-ddTHH:mm:ssZ" settingType="Sitecore.ContentSearch.Azure.CloudSearchFieldConfiguration, Sitecore.ContentSearch.Azure"/> </fieldNames> </fieldMap> <!-- END EDIT --> <fields hint="raw:AddComputedIndexField"> <field fieldName="section" storageType="yes" indexType="tokenized"> SBJSitecore.Components.Editorial.SectionComputedField,SBJSitecore </field> <field fieldName="date_search" storageType="yes" indexType="tokenized" type="System.DateTime"> SBJSitecore.Components.Editorial.DateSearchComputedField,SBJSitecore </field> </fields> </configuration> </index> EDIT 2 Per comments added my Computed fields into the Map. Reindex and tried again. Still not returning <cloudTypeMapper type="Sitecore.ContentSearch.Azure.Schema.CloudSearchTypeMapper, Sitecore.ContentSearch.Azure" patch:source="Sitecore.ContentSearch.Azure.Index.SectionField.config"> <maps hint="raw:AddMap" patch:source="Sitecore.ContentSearch.Azure.Index.SectionField.config"> <map type="System.Char" cloudType="Edm.String"/> <map type="System.String" cloudType="Edm.String"/> <map type="System.Guid" cloudType="Edm.String"/> <map type="System.Int32" cloudType="Edm.Int32"/> <map type="System.Int64" cloudType="Edm.Int64"/> <map type="System.Double" cloudType="Edm.Double"/> <map type="System.Single" cloudType="Edm.Double"/> <map type="System.Boolean" cloudType="Edm.Boolean"/> <map type="System.DateTime" cloudType="Edm.DateTimeOffset"/> <map type="System.DateTimeOffset" cloudType="Edm.DateTimeOffset"/> <map type="System.String[]" cloudType="Collection(Edm.String)"/> <map type="System.Guid[]" cloudType="Collection(Edm.String)"/> <map type="System.Int32[]" cloudType="Collection(Edm.String)"/> <map type="System.Object[]" cloudType="Collection(Edm.String)"/> <map type="Sitecore.ContentSearch.IIndexableId, Sitecore.ContentSearch" cloudType="Edm.String"/> <map type="Sitecore.ContentSearch.IIndexableUniqueId, Sitecore.ContentSearch" cloudType="Edm.String"/> <map type="Sitecore.Data.ID, Sitecore.Kernel" cloudType="Edm.String"/> <map type="Sitecore.Data.ItemUri, Sitecore.Kernel" cloudType="Edm.String"/> <map type="Sitecore.ContentSearch.SitecoreItemId, Sitecore.ContentSearch" cloudType="Edm.String"/> <map type="Sitecore.ContentSearch.SitecoreItemUniqueId, Sitecore.ContentSearch" cloudType="Edm.String"/> <map type="Sitecore.Marketing.Taxonomy.Model.TaxonUri, Sitecore.Marketing.Taxonomy" cloudType="Edm.String"/> <map type="Sitecore.Marketing.Definitions.TaxonomicClassification, Sitecore.Marketing" cloudType="Edm.String"/> <!-- Patched these values in --> <map type="SBJSitecore.Components.Editorial.SectionComputedField,SBJSitecore" cloudType="Edm.String" patch:source="Sitecore.ContentSearch.Azure.Index.SectionField.config"/> <map type="SBJSitecore.Components.Editorial.DateSearchComputedField,SBJSitecore" cloudType="Edm.DateTimeOffset" patch:source="Sitecore.ContentSearch.Azure.Index.SectionField.config"/> <!-- End Patch --> </maps> </cloudTypeMapper> Snippit of the index: "value": [ { "date_search": "2017-02-14T17:23:00Z", "publish_date": "20170214T122300", } ] EDIT I made a couple of edits per comments. Neither of these changes seem to have any impact. I am in touch with Sitecore support on this issue. I also noticed that the CreatedDate &amp; Updated fields are DateTime.MinValue on my search results (var query above).
Out of the box Azure Search is only available on Sitecore 8.2 update 1 and above. If you wanted to use it on earlier versions you would have to write your own provider for it.
Any guide to implement Azure Search with Sitecore 8.1x? Is there a way to implement Azure Search with Sitecore 8.1x? Currently I can see only one option to update current Sitecore instance to 8.2x.
TDS Classic 5.7 (released after this question was initially posted) now has a 'Sync all projects with Sitecore' feature. This is a context menu option on the solution (under the Team Development for Sitecore group) when you have TDS 5.7 installed, and allows you to run a sync across all TDS projects in the solution. https://www.teamdevelopmentforsitecore.com/TDS-Classic-5-7 Obviously, with many projects, and therefore, likely many items, this Sync could take a long time. Therefore, TDS Classic 5.7 also introduces a 'Lightning Sync Mode' (found within the TDS Options in the Visual Studio Options dialog), which saves comparison time by only comparing the Revision IDs of the TDS and Sitecore items, and not all of the fields. https://www.teamdevelopmentforsitecore.com/Blog/tds-classic-5-7-lightning-mode On top of this, your question specifically asks about force-updating the Sitecore items, even those with 'DeployOnce' set. TDS Classic 5.7 also introduces the 'Quick Push all TDS Projects' feature in the solution context menu. This does exactly that, it pushes every item, in every project, to your Sitecore instance, even those with 'DeployOnce'. So instead of doing a 'Sync with Sitecore' -> select all -> select 'Update/Add to Sitecore' -> click 'Do Updates', you can now save the sync comparison time and a couple of those clicks by using the Quick Push feature instead.
TDS: Sync Project with Sitecore for entire solution I am working on a large Sitecore solution based on the Helix principles, with +20 different TDS projects. In general this works fine, but if one of the developers changes a value for a "Deploy Once" item, it is difficult to update the item across all developer machines. Our usual process is to do a "Deploy" on the solution, but this does not update "Deploy Once" items if they are already there. Instead we have to sync each TDS project using the "Sync Project with Sitecore" option. Is there a way to sync all projects, perhaps by forcing Sitecore to be updated with all TDS items, even the items with "Deploy once"?
It looks like in Sitecore 8.2, you now need an "Extension" field for Sitecore to understand the attachment type properly. Add a single-line text field called "Extension" to your template, alongside the blob field. Make sure it has the same specs as the blob field (unversioned or shared). Once this field is in place, Sitecore will properly fill it out for files you attach. As a bonus, Sitecore will now render the file preview properly for known types. To fix existing attachments, I can see three possible solutions: Put together a script to fill out the Extension field. Presumably you are saving the file name in addition to the blob, so this should be possible. If you know what extension to expect, you could set it using standard values. Re-attach existing attachments. For the new Publishing Service to publish your blob fields, see this answer: https://sitecore.stackexchange.com/a/999/890
Attachment Blob Not Uploading File I have a field on a template using the "Attachment" type. There's only 1 attachment field on the template and it's named "Blob" (I read that these were requirements of that field type). The upload worked great in 8.1. We recently upgraded to 8.2. Now when I click "Attach" it lets me select a file and it appears to upload but then I get a prompt to "Save" the file. It renames the file to the name of the Sitcore item but it is the file I just uploaded and nothing has been uploaded to the field. This has been attempted in Chrome, Edge, FF and IE11 in multiple environments with the same result.
For an existing site, you would want to create the site manually in IIS. Create a new website in IIS, point the folder to your website folder. Make sure the binding is setup to something like mywebsite.local. Make sure the permissions on the website folder are set to allow the AppPool user for your new website to have read &amp; write access. Restore the database Update the /app_config/ConnectionStrings.config file with your database connection details Make sure the data folder is set correctly /app_config/include/datafolder.config Update the site definition to include your host name in the binding. That should allow you to load up the site, then you can rebuild the indexes and should be ready to go.
How to setup sitecore site from existing database and website folder? I have a database and website folder backup provided by the client. How can I configure a sitecore site manually or by using the Sitecore Instance Manager?
Having the need to use the QueryBuilder fieldtype aswell i was digging around with ILspy too see how i could actually execute the query generated by the field. In sitecore 8.2 (not sure if this is valid for newer or older versions), there is a helper method defined in the namespace Sitecore.ContentSearch.Utilities You can do something like this to execute the query: var index = ContentSearchManager.GetIndex("sitecore_web_index"); using (var context = index.CreateSearchContext()) { var solrSearchContext = context as Sitecore.ContentSearch.SolrProvider.SolrSearchContext; var searchQuery = Sitecore.ContentSearch.Utilities.SearchStringModel.ExtractSearchQuery( sourceItem["SearchQuery"]); var results = Sitecore.ContentSearch.Utilities.LinqHelper.CreateQuery<SearchResultItem>(context, searchQuery); } the result of the query will yield the Solr results and you can use this as you please.
Using the Query Builder Field Type I'm trying to set up an item to allow a content editor to easily select a group of items in a subtree. I can use a droptree that points to a root item and then a Multilist to select template types to use but I ran into the field type Query Builder. That seems like it can do what I want and more (potentially omit specific items that would be a match using the droptree/multilist method which I cannot do for the other option but would like to be able to do). I'm having trouble using this though. I didn't see any fields that made sense to cast a field with the type Query Builder to but tried to do a few anyway which didn't seem to work out. I also tried using Sitecore.Data.Database.SelectItems but got errors about the string being invalid (sample raw values: +location:{ID};template:{ID}). If anyone has any input on using this field that would be appreciated. I know that you can use the query builder while setting the datasource of a rendering so I will look into how that is set (ItemResolver?). Based on Filtering results when field is empty with query builder fields it looks like I will need to get a search context and pass this query to that.
There are some ideas here that you might be able to use Steve: Dealing with jQuery version collisions in WFFM e.g unloading jquery after testing it: if (typeof jQuery != 'undefined' &amp;&amp; jQuery.fn.jquery == "1.4.2") { jQuery.noConflict(true); } Or the answer I posted on the above link about using HTML Agility Pack, loading in the DOM, removing JQuery version added by Sitecore and then adding your own.
Sitecore jQuery version compatibility We are using Sitecore 7.2 Update 4, jQuery 1.9.1 and Bootstrap 3.2.2 We are using TypeAhead which uses Bootstrap but it's not working in our solution as it's picking up jQuery version 1.5.1 included by Sitecore which isn't compatible. We are not in preview mode - the Sitecore toolbar is not visible. jQuery 1.9.1 is included in the head jQuery 1.5.1 is added by Sitecore towards the end of the body Bootstrap is included at the end of the body I've tried adding jQuery.noConflict(true); And moving jQuery 1.9.1 to the end of the body but this didn't change things.
You need to make sure: 1- the user CSFndRuntimeUser is an administrator 2- on the CSService on IIS you set Windows Authentication and Anonymous Authentication as enabled 2.1 - on the Catalog and Profile sites on IIS you set only Windows Authentication as enabled
Can't access CFSolutionStorefrontSite_CatalogWebService/CatalogWebService I am setting up commerce server site. But I can't access CSServices site. I followed all steps mentioned at commercesdn site: Create a folder named C:\inetpub\CSServices\ In IIS, add a new website named CSServices, with the physical path pointing to the folder that you previously created. Make sure this IIS site listens on port 1004, which will be used in a later stage. Create a new app pool "CSServices", and set its identity to .\CSFndRuntimeUser Depending on your IIS hostname binding, you may need to disable the loop back check. Please refer to http://support.microsoft.com/kb/896861 for more details. I run commands to grant admin rights as well. But can't access following url: http://localhost:1004/CFSolutionStorefrontSite_CatalogWebService/CatalogWebService It is showing below error: HTTP Error 401.2 - Unauthorized You are not authorized to view this page due to invalid authentication headers.
The issue turned out to be due to a custom 404 error handler (Sitecore Climber was on the right track when he mentioned about the IIS rewrite module - redirects can mess up WFFM!). It was intercepting requests (with a httpRequestBegin pipeline handler) and returning the 404 page content. The solution was to change the 404 handler to ignore requests where the URL started with /form. Note: if you create a 404 handler, make sure it can ignore certain paths where a sitecore item is not resolved, otherwise you will break lots of things in Sitecore!
WFFM Error - An Item with the same key has already been added On my local environment all WFFM forms are working ok, however on our test environment when any form is submitted we get the error: An item with the same key has already been added. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.ArgumentException: An item with the same key has already been added. Source Error: Line 24: if (!IsPost) Line 25: { Line 26: queryString.Add(&quot;wffm.&quot; + Constants.FormItemId, Model.Item.ID.ToGuid()); Line 27: queryString.Add(&quot;wffm.&quot; + Constants.Id, Model.UniqueId); Line 28: } Source File: D:\home\site\wwwroot\Views\Form\EditorTemplates\FormViewModel.cshtml Line: 26 Note: I have tried uncehcking the field on the form Is Ajax Mvc Form and this seems to resolve the issue. Is there some configuration setting which could be causing this, since there is no difference in the form content itself between the two environments.
At this point this appears to be from a bug in Unicorn 3.3.2. Upgrading to Unicorn 4.0 prerelease 9 resolved the issue. See https://github.com/kamsar/Unicorn/issues/219 for more information.
Unable to Serialize item, but running admin serialization works fine We're running Sitecore 8.1 Update-3 (160519) and are running into issues with serialization. Using the standard admin account, if we select an item, for example /sitecore/content/home and run "Serialize item" in the Developer tab there's no message in the Sitecore Desktop, no browser console errors (Chrome or IE, see Edit 1), and no messages of any sort in the standard Sitecore logs. Sadly, no serialization directory is created, and if one exists, it is not populated with any files. If we visit https://example.com/sitecore/admin/serialization.aspx and run the serialization process, however, the serialization directory is properly populated. We've checked permissions and the user account associated with the site does have the appropriate rights to the entire data directory, and can obviously populate it if we use the admin page. After the admin serialization took place we also tried renaming the master directory in the serialization folder and running Serialize item on an individual item again, to no avail. Is there a reason serializing an individual item might not work? What would be the recommended next steps to determine why the Serialize item command isn't working? Edit 1 There are three console errors in Chrome, all with the same text: X-Frame-Options may only be set via an HTTP header sent along with a document. It may not be set inside . These are on the following items, after starting up the Content Editor in Sitecore Desktop. They've been going on for a while, and don't seem to have an impact on using the content editor. EditorWindow.aspx:4 Sitecore.Shell.Applications.Analytics.TrackingFieldDetails.aspx?db=master&amp;id={110D559F-DEA5-42EA-9C…:39 Sitecore.Shell.Applications.Security.SecurityDetails.aspx?db=master&amp;id={110D559F-DEA5-42EA-9C1C-8A5…:41 This appears to be a known issue so I don't typically count these. Edit 2 After digging into the code, and posting to a Sitecore Slack channel, it appears there may be a bug in Unicorn where serialization is not passed back to Sitecore. Per the documentation it should be. Issue created and will update as I find out more.
Looking into the logs, it appeared I had the same error as here but in french. I solved it adding a new constructor to the controller, public SectionTitleController() { _repository = new SectionTitleRepository(); } I also miswrote the return value of GetModel(), I was returning base.GetModel() instead of model.
"Could not find the rendering in the HTML loaded from server" when adding custom rendering to SXA Using Sitecore 8.2 along with SXA 1.2 rev. 161216, I am trying to add a simple SectionTitle (a title and a bit of HTML below it) rendering to the available renderings in SXA. I followed a few tutorials, each of them presenting quite different approaches, still none worked. This is what I did, Created the View @using Sitecore.XA.Foundation.MarkupDecorator.Extensions @using Sitecore.XA.Foundation.SitecoreExtensions.Extensions @model myworkspace.Models.SectionTitle <div @Html.Sxa().Component("section-title", Model.Attributes)> <div class="component-content text-green section-title"> @Html.Sxa().Field("Title", Model.Item, Model.GetRenderingWebEditingParams()) <span class="underline-shape-line"></span> <span class="underline-shape-disc"></span> </div> </div> Created the Model public class SectionTitle : RenderingModelBase { public SectionTitle() { } public string Title { get; set; } } Created the Controller public class SectionTitleController : StandardController { private readonly ISectionTitleRepository _repository; public SectionTitleController(ISectionTitleRepository repository) { _repository = repository; } protected override object GetModel() { return _repository.GetModel(); } } Created a Repository class (to be honest, I didn't fully understand why it is better than just ue CreateModel()) public interface ISectionTitleRepository: IModelRepository { } public class SectionTitleRepository : ModelRepository, ISectionTitleRepository { public override IRenderingModelBase GetModel() { SectionTitle model = new SectionTitle(); FillBaseProperties(model); model.Title = GetTitle(); return base.GetModel(); } private string GetTitle() { return PageContext.Current[Templates.SectionTitle.Fields.Title]; } } Created a Parameters Template Called SectionTitle, inherits from IStyling and Standard Rendering Parameters Created a Template Called SectionTitle, with a section called Section and a field called Title (Rich Text) Created a Controller Rendering Controller: SectionTitle Controller Action: Index Parameters Template: The one created above Datasource Location: query:$site/[@@name='Data']/[@@templatename='Text Folder'] Datasource Template: The template created above. Still, when I try to add a new item in Experience Editor, I get "Could not find the rendering in the HTML loaded from server" I have tried lots of other configurations and always get this error, does someone have a hint ?
I found a possible solution to your problem, besides checking what @Pete saids about settings. We need to check if you get all items created to analytics works, it including Profiles and Keys Profile Cards (that you assign to some content) Pattern Cards (that sitecore based on the analytics automaticly will set to your visit) "Profile vs Pattern The main concept that must be understood is that Profiles are related to your content (i.e. they are statically assigned to your Sitecore items) and Pattern Cards are related to your visitors (i.e. they are dynamically assigned to visitors). Sitecore assigns a pattern card to the visitor according to the content they see on the website." You can find more about how profiles works Incredible as it may seem on coveo community Coveo Community Like this:
Tracker.Current.Interaction.Profiles PatternLabel is always null This is Sitecore.NET 7.5 (rev. 141003), already with MongoDB; I have created some Profile Cards: With some matching Pattern Cards with same values: Then I assigned these profile cards to lots of pages: Published and browsed my pages several times to make sure xDB is registering, then I have a code looking the Tracker.Current.Interaction.Profiles property. I see some results as expected in there, but the PatternLabel property in specific always comes NULL: Anyone knows how that property can be fed? EDIT We have tested our solution in a fresh installation of Sitecore 8.2 update 1, along with all the checks proposed by @Pete - great summary of important things to check! But indeed the key to my problem was that I needed to have proper Pattern Cards created (and published) with scores matching to their respective Profile Cards, so @Hedipo got the answer. Thank you very much to all who contributed!
I'm not sure if security is the problem here. Actually having Anonymous Denied on External Sources is normal, since it will by default fall on the Email Security Provider. So your external Shared source should have the *@* identity Allowed. On the Sitecore side, Coveo for Sitecore will send security in the Expended Security Provider which falls back on the Email Security Provider. So in brief, all Coveo for Sitecore identities (aka all Sitecore user and roles) are in the *@* group so they do not need the external content to be Anonymous allowed. This said, apart from security and the externalSources property, you also need to check the filters on your page. I would suggest to open the Network tab and look for the aq and cq parameters. Then paste them in the Content Browser and see if your external content is returned. If not, then your filter is the problem.
Coveo external source - anonymous users denied We are using the Coveo Cloud edition, and I've added an external data source to the index. I see the results in the context browser in the admin tool, but not on the search page after adding the CoveoForSitecore.componentsOptions.externalSources.push('source'); command (I do see the source in the headers of the REST call). When I look at an item in the content browser, under Permissions, it says anonymous users are denied. I set the source security to "shared" when I created it, and there's no authentication on the site (it's publicly browsable). I don't see anywhere to tell it that anonymous users are allowed (my Sitecore items say anonymous users are allowed as I'd expect). I figure it's a setting somewhere, but I'm not seeing where to change it, whether it's in the cloud admin or something I need to add to the code of the search page.
After working with Adam N. and him pointing me in the right direction I discovered a few things. Confirm that the Drag and Drop settings is enabled while in the Experience Editor. Confirm that the Editing Theme in your site's theme has the BaseLayout themes added and in the right order. Take notice that the first Base Theme in the list is for Editing Theme. This is an SXA theme that includes the toolbox.js required to show the theme. Now the beautiful toolbox appears!
SXA toolbox missing when editing pages and partial designs Somewhere between upgrading Sitecore/SXA and merging conflicts with the themes, all of a sudden the toolbox does not appear. What should I verify to get it working again?
I figured it out. For the buttons parameter, I needed to use the filepath/Guid for the folder continaing the buttons I want to be displayed on the edit frame. This worked when I used the Guid of the datasource item containing my logo images, which is what I thought it should be. I'm not sure why it didn't work initially.
How to use Glass Mapper's BeginEditFrame(string buttons, string dataSource, string title) I've created my own custom experience button to edit some responsive images for a logo in my header and I added the button to the rendering. It works as expected and I am not having any problems with it. However, I would like to move the button to an edit frame using Glass Mapper's BeginEditFrame so that the content manager can just click on some placeholder text to access the custom button. I'm trying to use the edit frame with this signature - BeginEditFrame(string buttons, string dataSource, string title). My code is as follows: using (BeginEditFrame(&quot;{CDA69877-442C-47CC-87D3-E1D2BF61E5B8}&quot;, &quot;{6F455DBC-29FE-40FC-9803-0A738677EC04}&quot;, &quot;Logo Images&quot;)) { <p>Click here to edit the logo.</p> } The first Guid represents the ID of my custom button. The second Guid represents the datasource item containing my logo images. I also tried using the filepaths instead of Guids but got the same results. In case it helps, my button is found at /sitecore/content/Applications/WebEdit/Custom Experience Buttons/Responsive Images And my datasource item is at /sitecore/content/siteroot/Data/Headers/Header I don't get any errors with this code, but the edit frame that pops up does not have anything useful. I've pasted it below. Am I correct in using my custom button filepath/Guid for the buttons parameter? (Edit: I just figured this part out. I needed to use the filepath/Guid for the folder containing the buttons and not the filepath/Guid for the button item itself.) And is the datasource item that holds the logos in question the datasource parameter that the method signature is asking for?
Just use the standard PowerShell error handling parameters: $localPath = $sourceItem.Paths.FullPath.SubString($source.Length) $targetPath = "master:" + $target + "/" + $localPath $targetItem = Get-Item $targetPath -ErrorAction Ignore Sounds like in your case this would be more than enough. But if you want the ability to check for other potential errors, you could combine the SilentlyContinue action with the ErrorVariable option, and then act out based on what's in the variable. For instance: # ... $targetItem = Get-Item $targetPath -ErrorAction SilentlyContinue -ErrorVariable myError if ($myError.Count -gt 0 -and !($myError[0].FullyQualifiedErrorId.Contains("ItemDoesNotExist"))) { Write-Warning $myError[0] } Lots more details in this blog post: https://blogs.technet.microsoft.com/heyscriptingguy/2014/07/09/handling-errors-the-powershell-way/
SPE prevent Get-Item from throwing error if no item found I'm writing a script to show the missing/new items between two content branches. For the target of the comparison, I build an item path and then call Get-Item on that path to see if there is an equivalent item. The problem is that Get-Item throws an exception if no item is found - I would just like to handle a case of a 'null' item in my script. #$source is the root path of the source branch $localPath = $sourceItem.Paths.FullPath.SubString($source.Length) $targetPath = "master:" + $target + "/" + $localPath $targetItem = Get-Item $targetPath The script works in that $targetItem is null if no item is found using $targetPath but I would like to suppress the error message in the script.
Well I must admit before attempting to answer this question, I've never tried to build a form within a separate Area, but I thought it would be easy, so I went ahead and created my own test in my local sandbox environment. Turns out, it was relatively straight forward, but you might run into issues once you start putting this form on more complex pages. So I started out with a basic MVC project. My environment is 8.2 update 3 with Mvc 5.2.3. So if you are in a much older version of Sitecore, I could see how this might be more challenging. I know support for Areas, was only built in, with more recent versions of Sitecore. In that basic MVC project, I created an area called Site. Once it was done scaffolding, I created a new FormController and defined the following code in that Controller: namespace Example.Web.Areas.Site.Controllers { public class FormController : GlassController { public ActionResult Submit() { var model = new SubmitModel(); return View(model); } [HttpPost] public ActionResult Submit(SubmitModel model) { if (ModelState.IsValid) { Response.Redirect("/"); } return View(model); } } } So really quick explanation, is that I have to action results with the same name. The one without the http verb attribute, will be get by default. Then I specify HttpPost for the submit action, which will run on the click of the submit button. My model for this, just looks like the follow. So nothing too crazy, and I'm skipping the handling of validation, but you should probably add in atleast e-mail validation. namespace Example.Web.Areas.Site.Models { public class SubmitModel { public string FirstName { get; set; } public string LastName { get; set; } public string Email { get; set; } } } Lastly I define the view with the code below. Very straight forward, but the difference is that I'm triggering the entire page to post back, which is typically what you'd want to do. You would just use the Sitecore Mvc Route here instead and it'll take care of everything for you. @using Example.Web.Areas.Site.Models @using Sitecore.Mvc @using Glass.Mapper.Sc.Web.Mvc @model SubmitModel @using (Html.BeginRouteForm(Sitecore.Mvc.Configuration.MvcSettings.SitecoreRouteName, FormMethod.Post)) { @Html.Sitecore().FormHandler() <div class="form-control"> @Html.LabelFor(x => x.FirstName) @Html.TextBoxFor(x => x.FirstName) </div> <div class="form-control"> @Html.LabelFor(x => x.LastName) @Html.TextBoxFor(x => x.LastName) </div> <div class="form-control"> @Html.LabelFor(x => x.Email) @Html.TextBoxFor(x => x.Email) </div> <button type="submit">Submit</button> } So basically my Website structure looks like this: App_Config Areas Site Controllers FormController.cs Models SubmitModel.cs Views Form Submit.cshtml Controllers Models Views Once all of that is setup, you'll need to go into Sitecore. Go to Sitecore/Layouts and open up Renderings. Create a new Controller Rendering and make sure to set it's Controller, Controller Action and Area correctly to match the controller Action Submit that we created early. That is it, now you should be able to assign this rendering to a view, and publish your changes to start seeing your form. Like I said this is a fairly quick setup, but should get you running with making a more advanced page. Also just to clarify, if you are doing multi-tenancy, than yes Areas is a good approach to achieve this.
Sitecore MVC Form Post with Area I'm using Areas in my Sitecore MVC solution. I THINK I want to post to my form back to the same controller just like a typical MVC project (having a HttpPost attribute in my controller). Maybe that's not the best practice with Sitecore, I don't know. I've found how to do this without areas, but not with. Can this be done with Areas? Or why should I not do with with Areas?
This issue turned out to be related to a cache setting on the parent rendering, rather than the rendering itself. Don't forget: if using personalisation, turn off caching. Sitecore does not do this automatically for you!
Personalization on SXA Partial Design Is it possible to use personalization on a SXA partial design? I am building a header component and want to use a personalization rule to alternate menu items shown depending on whether or not the user is authenticated. I have disabled caching entirely on the rendering for the menu items, but the partial design seems to cache the rendering per-page. I'm using Sitecore 8.2 with SXA 1.2 rev 161216
While Sitecore would be able to store that many documents, There are some things you may want to consider: Maintenance With the Search API in the content editor maintenance will be easier than it used to be, but still managing that amount of documents will not be simple. e.g there is no way to bulk edit documents, or bulk move documents around. Sure you could use Sitecore PowerShell Extentions for that, but its still not the easiest. Database Size Another potential problem would be the size of the master and web DB's once you have that amount of documents in. This will make backup/restoring and general DB maintenance take longer, disk requirements will go up etc.. Publishing Because you are on 8.1 the new publishing service is not available, so if you ever need to publish large parts of the media library, or worst case need to republish the entire site, this will take an extremely long time. Publishing media items is slower than normal items anyway because of the blob data. With those considerations, if I were looking at storing that many documents and the budget allowed for it, I would look at a dedicated Digital Asset Management system (DAM) - Sitecore have DAM for Sitecore and there are others around. A dedicated DAM will solve a number of the above issues as they are built to manage that many documents. If you have no budget for that, then Sitecore will be able to handle it, but plan the content tree carefully so you have the min amount of maintenance to do once the documents are there.
Good or bad:: Keeping large volume of documents in sitecore 8.1 Media Library Do we have any limitation for documents( pdfs , excels , msword ) in media library in sitecore 8.1. Actually We are planning to upload around 60,000 documents in media library. As I know the purpose of CMS is that we can full have control on content as per our need but sure not sure about this scenario
In addition to what you have done you can do the following using a role: In the master database deny field read and write access to /sitecore/templates/System/Templates/Sections/Layout/Layout/__Renderings. This will keep the user from being able to manually edit the shared field. This is not necessary is you already deny access to view standard fields in any way. After doing that you will need to go to the file webroot/sitecore/shell/Applications/Content Manager/Dialogs/LayoutDetails/LayoutDetails.xml and change the CodeBeside to point to a custom class that inherits from Sitecore.Shell.Applications.ContentManager.Dialogs.LayoutDetails.LayoutDetailsForm. Here is an something you could use: using Sitecore.Shell.Applications.ContentManager.Dialogs.LayoutDetails; using System; namespace MyProject.Common { public class CustomLayoutDetailsForm : LayoutDetailsForm { private const string DenySharedLayoutViewRole = &quot;{YOUR_ROLE}&quot;; protected override void OnLoad(EventArgs e) { if (Sitecore.Context.User.IsInRole(DenySharedLayoutViewRole)) { SharedLayoutTab.Active = false; FinalLayoutTab.Active = true; Tabs.Active = (int)TabType.Final; SharedLayoutTab.Visible = false; } base.OnLoad(e); } //Had to add this because the base TabType enum the base //type uses is private. You can just use a number if you //really wanted to where I use this if you are worried //someone will see that Shared/Unknown aren't used and //remove them private enum TabType { Shared, Final, Unknown, } } } You would copy in your role with its domain where I put {YOUR_ROLE}. You could put the role in a config file. If you need multiple roles to do this make a base role to deny access to the shared layout and have those inherit that.
Remove access to Shared presentation? I am trying to remove access to shared presentation for a particular role. I have denied read on this item: /sitecore/content/Applications/WebEdit/Ribbons/Chunks/Layout Modes/Shared Layout. This works as the user is no longer able to toggle between shared and final. Now, my user role can still open the presentation details dialog and edit the shared layout from there. They can also use the reset presentation dialog to reset the shared presentation. How do I deny access to these items?
I am not 100% sure what you are trying to achieve but if you want to map a model after it has been instantiated then you can use the Map method: https://github.com/mikeedwards83/Glass.Mapper/blob/master/Source/Glass.Mapper.Sc/SitecoreService.cs#L1511 This was originally designed for working with Sitecore search. Your model will need ID and Language properties that already have values so that Glass can work out which item to map onto your model.
How to GlassCast to an item type at runtime? I have a factory of sorts that gets the proper instance of an object at runtime. public AbstractPrompt GetPrompt(object prompt, EducationAwardsModel model) { var apiType = prompt.GetType(); var type = Type.GetType("TI.Web.Models.Education.AwardPrompts." + apiType.Name) ?? Type.GetType("TI.Web.Models.Education.AwardPrompts.LegacyAwardPrompts." + apiType.Name) ?? apiType; return Activator.CreateInstance(type, prompt, model) as AbstractPrompt; } I'd like to turn those models into glass mapper models with Sitecore fields on them. Is it possible to do that after the instance has been created? Something like educationAwards.GlassCast(myInstance)? The alternative I've come up with is to package each model with a SitecoreFieldCollection class and then each model will have a property of that class which is then glasscast in the constructor. Example: Folder Structure: Models > Education > AwardPrompts > LegacyAwardPrompts > RedundantAwardPrompt > RedundantAwardPrompt.cs // SitecoreFieldCollection.cs public class RedundantAwardPrompt : AbstractPrompt { public RedundantAwardPrompt() { Fields = item.GlassCast<SitecoreFieldCollection>(); } public RedundantAwardPrompt(object prompt, EducationAwardsModel model) { RedundantAwards = ((EducationGateway.RedundantAwardPrompt)prompt).RedundantAwards; using (var g = GatewayManager.Provider.Create<ClubDataGatewayClient>()) { ClubNames = g.GetClubByClubId(AuthorizationUtility.ApplicationKey, RedundantAwards.Select(c => c.ClubAwarded).Distinct().ToArray()) .ToDictionary(x => x.Id, x => x.Name); } } public IEnumerable<LegacyEducationProgramAward> RedundantAwards { get; set; } public IDictionary<ClubID, string> ClubNames { get; set; } public SitecoreFieldCollection Fields { get; set; } public override IEnumerable<object> GetResponse() { return new[] { new RedundantAwardPromptResponse() }; } } And I would do that for each prompt, but that seems redundant.
Can you try this? [SitecoreNode(Id = MySpecificItem.RootId)] public virtual MySpecificItem MyItem { get; set; } It sounds good regarding to the source code of Glass.Mapper.
How to map an object to a specific item ID using Glass Mapper attributes? I have a class where I have a set of objects such as: [SitecoreQuery("./*[@@templateid='" + MyItem.TemplateId + "']", IsRelative = true, IsLazy = false)] public virtual IEnumerable<MyItem> MyItems { get; set; } Now I would like to add a new object which would be mapped to a specific item ID, rather than a template. I've therefore tried adding: [SitecoreQuery("//*[@@id='{" + MySpecificItem.RootId + "}']", IsRelative = false, IsLazy = false)] public virtual MySpecificItem MyItem { get; set; } However Glass Mapper seems to return a null object when I run the code. I could map the object using Sitecore.Context.Database.GetItem within the constructor, however I'd prefer to use the attributes for consistency.
Pointing to the entire bootstrap.css is a bit overkill. (And I suspect Sitecore / Telerik is having a hard time parsing it.) What you should do is ignore the ToolsFile.xml entirely (make sure the <classes> element is empty), and point the WebStylesheet setting to a custom CSS file that only includes classes that should be exposed for selection. Since you will be including bootstrap.css in your layout, you can leave the class selectors empty in your custom editor CSS: a.blue-button {} a.red-button {} img.img-responsive {} You could also add your editor-specific styling in there, or you could use the technique described in this blog post to add other CSS files to the editor. An important point here is that the RTE in Sitecore hasn't been getting much love. One issue you'll likely run into is that if you right-click your image and select "Properties", the CSS class list in the dialog will be empty. I've never been able to find a workaround for that. Other elements like tables and links work as expected. Let us know if you figure out a fix. Meanwhile, the "Apply CSS Class" dropdown which is part of the toolbar at least works as expected. Finally, you can still set your classes in ToolsFile.xml, which will allow you to present user-friendly names instead of direct CSS class names. But then, you will need to keep both CSS and XML in sync.
How to add a class img-responsive to RTE in Sitecore 8.x I would like to add an option to change class on an image that is inserted into the RTE of the content item. In particularly I would like to add bootstrap class "img-responsive". So what i have done: Added bootstrap.css to the directory Changed Sitecore.config to point to the bootstrap.css <setting name="WebStylesheet" value="/sitecore/shell/Controls/Rich Text Editor/bootstrap.css" /> Edited Website\sitecore\shell\Controls\Rich Text Editor\ToolsFile.xml <classes> <class name="Bootstrap Img Responsive" value=".img-responsive"/> </classes> Nothing shows up in the RTE. What have I missed?
We run VS Load Tests against Sitecore and get results consistently.For some tests, we force session close, to make writing tests easier, so that we don't have to wait for 20 mins to session to close and the data to get written to Mongo. One obvious thing that can cause Sitecore to skips analytics is robots detection. I.e. if sitecore thinks the page is from a robot/crawler, it doesn't get included. See: https://doc.sitecore.net/sitecore_experience_platform/setting_up_and_maintaining/xdb/robot_detection/visitor_identification_using_robot_detection So try disabling Robot detection or including mouse movement into the tests. Secondly, make sure that your User Agent or IP is not in the excluded list: https://doc.sitecore.net/sitecore_experience_platform/setting_up_and_maintaining/xdb/robot_detection/robot_detection
How do you get analytics when you use automated tools? I'm working on practicing some good solid DevOps/Agile methodologies, and so one of the things that I'm working on is testing some custom reporting logic that I've written. Here's the scenario that I'm trying to test: Navigate to the home page (this triggers a page event that I'm looking to track) Navigate to another page that does not trigger this page event. Wait for an agent to run (it runs every 30 seconds) to process the page event count. Run an API call to verify that my page event count logic is working. So, doing this manually, I am able to do each of these steps without issue. However, I really want to automated this because it is error prone, takes time (and concentration) to run, and when my manager comes back and asks if I tested this scenario, I can tell them "Yes, we've been testing that every time that we commit code changes". Here's what I've tried: Visual Studio: I've written a call to the website (using WebRequest), but I never get any Contact/Interaction information written to the Mongo DB. LoadCompletePro: I've used this tool to simulate someone clicking around on the website, but again, I don't get any Contact or Interaction information written to the Mongo DB. Selenium: I ran our Smoke Test on my local computer, which simulates about 20 minutes of solid traffic to the website, but again, I don't get any Contact or Interaction information written to the Mongo DB. So at this point, I'm stuck at step #2, as I can't seem to get the data recorded to run my custom queries against. I believe that once I get past this hurdle, I can have the code wait for a certain amount of time to give Sitecore a chance to write the data to Mongo, and then for my agent to process the new data. Has anyone been able to get any automated tools to trigger Sitecore's Analytics? If so, what did you do to make that happen? I'm currently running on Sitecore 8.1 (original release).
Persisting data with an interaction If you want your custom data to be stored as part of every interaction in the Collection database, then you should use the CustomValues dictionary. Tracker.Current.Interaction.CustomValues["CUSTOM_DATA_KEY"] = someObject; Since CustomValues does not restrict what you can store, your custom data type will need to meet some requirements: It has to be marked as [Serializable]. It needs to be registered in the MongoDB driver like this: using Sitecore.Analytics.Data.DataAccess.MongoDb; // [...] MongoDbObjectMapper.Instance.RegisterModelExtension<YourCustomClassName>(); This only needs to be done once per application lifetime—for example, in an initialize pipeline processor. Temporary interaction data Some data you might only need during an interaction's session, and such data should not be stored in the Collection database. Then you can use the tracker session API: Tracker.Current.Session.CustomData["CUSTOM_DATA_KEY"] = someObject; Also, you don't even have to use the xDB API for this. You can just store your data in the ASP.NET session: HttpContext.Current.Session["CUSTOM_DATA_KEY"] = someObject;
Extend the interactions xDB object I need to extend the interactions object so I can add some custom data for the user's interactions. The data isn't page related, so I can't use a page event. And its in the tracker initialized pipeline, so I don't even have a page yet. I can't find much information on extending the interactions object. I imagined it is similar to extended the contact object, but none of the interaction properties (browser version, geoip, region, etc...) are in configs. All there are is the fields on the analytics index.
We noticed that the List on the Form Designer has lost its Items during the upgrade. If we re-enter the Items in the Form Designer it works correctly. Form Designer - List in 7.5: Form Designer - List in 8.1:
WFFM - Email Body Inserted Value from Drop list Should be the Display Text, Not the Hidden Value I have a several fields that are of type "Drop list". The fields are added to the body of the "Send Email Editor" email. In Sitecore 7.5, the email body was getting the displayed text on the drop list. Now that we upgraded to Sitecore 8.1, the email body is getting the hidden value of the drop list. I need the displayed text, not the hidden value. I'm not sure if this is relevant, but the drop list is being populated with metadata. In terms of the metadata, the value I want displayed in the email body is the Title. But, the value is being displayed instead. The problem is that the values are coded and not useful to the people getting the emails. Sitecore Version - 8.1 rev. 160519 (Update-3) WFFM Version - 8.1 rev. 160523 Send Email Editor: HTML From Email Editor: <p>Province China: [<label id="{A7421C76-8AAF-4782-865B-42868AF7AA48}">Province_China</label>]<br /> <em>default: Anhui</em></p> Metadata: Email Body (Should say Anhui, not 110): Update: We noticed that the List on the Form Designer has lost its Items during the upgrade. If we re-enter the Items in the Form Designer it works correctly. Form Designer - List in 7.5: Form Designer - List in 8.1:
You need to disable ItemNameValidation. Add a config file to App_Config/Include named z.DisableItemNameValidation.config and put this in it: <configuration xmlns:patch="http://www.sitecore.net/xmlconfig/"> <sitecore> <settings> <setting name="ItemNameValidation"> <patch:attribute name="value"></patch:attribute> </setting> </settings> </sitecore> </configuration>
Sitecore WFFM installation error :- An item name cannot contain any of the following characters I am using Sitecore version : Sitecore.NET 7.2 (rev. 140526) and Web form version 2.4.0 rev. 140117. At the time of installing Web Forms for Marketers I am getting below error : An item name cannot contain any of the following characters: /:?"<>|[]- I have removed the value for the InvalidItemNameChars setting but still I am getting the same error. <setting name="InvalidItemNameChars" value="" />
You can use the SecurityDisabler, which runs the code in the context of an administrator. using (new Sitecore.Security.Accounts.SecurityDisabler()) { //Get your link here } there is also a Sitecore.Security.Accounts.UserSwitcher(user), where you can have more control over the access rights for the context you run the code in. More can be read about this in the Security API Cookbook (section 4.2 and 4.3): https://sdn.sitecore.net/upload/sitecore6/60/security_api_cookbook_sc60_and_later-a4.pdf
Link to secured page is empty in emails I have a number of EXM Automated Email Campaigns which include links to Sitecore items that are protected by one or more Sitecore roles. It seems that when the emails are sent, all of the links are resolved to empty strings, instead of links to the correct sitecore items (which then requires login). If I insert links to unsecured pages, the links works as expected. Is there any way of disabling this security check when the emails are generated?
Edit 14/6/17: This has indeed been fixed in v2.0 Update 1 (release notes) The error message you are seeing is indeed the cause of the Publish Service ceasing to function. Basically, the Service is configured to always assume it's running in a multi-instance setup. On a repeating interval, it will try to obtain an 'activation lock', i.e. it will try and nominate itself as the leader instance. If it fails (i.e. there is already another leader or the DB is down), then the service will become dormant. In fact, you are encountering an unforeseen scenario (which we have never seen before), hence the exception propagation - something is causing the underlying connection to be closed during the lifetime of this activation algorithm. The algorithm should be tolerant of this - it's a bug that we will aim to include in the next release. For now, if you are only running the Publishing Service in a single instance setup, you can switch to the simpler 'single instance activation strategy' that is shipped with the service, but is not enabled by default. The following Service configuration will set the activation strategy to the Single instance implementation. This will always set the Service to be the leader, and doesn't require any DB communication. Please see the Service documentation for details on how to provide custom configuration. <Settings> <Sitecore> <Publishing> <Services> <InstanceActivationStrategy> <Type>Sitecore.Framework.Publishing.InstanceActivation.SingleInstanceActivationStrategy, Sitecore.Framework.Publishing</Type> </InstanceActivationStrategy> </Services> </Publishing> </Sitecore> </Settings>
Sitecore Publishing Service "MultiInstanceActivationStrategy" causing publishing failure I'm seeing a weird inconsistent problem that causes the Publishing Service to fail (we're on 2.0.0). Roughly once per day, usually in the morning, the Publish Jobs start failing. Doing an iisreset fixes the problem for a while, but that won't be acceptable on our Production environment. I've seen this on our local dev computers, our dev server, and our production server. All of them have the Sitecore Publishing site running on the same machine as the Sitecore CM. It's inconsistent, of course today I haven't been able to reproduce it locally so I don't have any screenshots, I'll post more information next time I see it happen. The best lead I have is something I'm seeing in the logs: 2017-04-25 10:22:39.961 -04:00 [Fatal] Instance Activation strategy "MultiInstanceActivationStrategy" on "af7a5a55-de82-45a3-abad-4e196ca74604" failed to communicate with the ActivationLockRepository. The Guid is different for the different environments, but it does not seem to be the id of an item in Sitecore master or core. I guess I can't be entirely sure that this message is related to our problem, but it seems very likely. Here's the full log message: 2017-04-25 10:22:39.961 -04:00 [Fatal] Instance Activation strategy "MultiInstanceActivationStrategy" on "af7a5a55-de82-45a3-abad-4e196ca74604" failed to communicate with the ActivationLockRepository. System.AggregateException: One or more errors occurred. ---> System.AggregateException: One or more errors occurred. ---> System.InvalidOperationException: Invalid operation. The connection is closed. at System.Data.SqlClient.SqlConnection.GetOpenConnection() at System.Data.SqlClient.SqlConnection.BeginTransaction(IsolationLevel iso, String transactionName) at System.Data.SqlClient.SqlConnection.BeginDbTransaction(IsolationLevel isolationLevel) at Sitecore.Framework.Publishing.Service.Sql.InstanceActivation.ActivationLockProvider.<>c__DisplayClass0_0.<<TryObtainLock>b__0>d.MoveNext() in C:\builds\1\s\src\Sitecore.Framework.Publishing.Service.Sql\InstanceActivation\ActivationLockProvider.cs:line 17 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Sitecore.Framework.Publishing.Data.AdoNet.NoRetryConnectionBehaviour.<ExecuteAsync>d__10`1.MoveNext() in C:\builds\1\s\src\Sitecore.Framework.Publishing.Data\AdoNet\NoRetryConnectionBehaviour.cs:line 50 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Sitecore.Framework.Publishing.Data.AdoNet.DatabaseConnection`1.<ExecuteAsync>d__27`1.MoveNext() in C:\builds\1\s\src\Sitecore.Framework.Publishing.Data\AdoNet\DatabaseConnection.cs:line 106 --- End of inner exception stack trace --- at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification) at Sitecore.Framework.Publishing.Service.Sql.InstanceActivation.ActivationLockProvider.<>c.<TryObtainLock>b__0_1(Task`1 x) in C:\builds\1\s\src\Sitecore.Framework.Publishing.Service.Sql\InstanceActivation\ActivationLockProvider.cs:line 40 at System.Threading.Tasks.ContinuationResultTaskFromResultTask`2.InnerInvoke() at System.Threading.Tasks.Task.Execute() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Sitecore.Framework.Publishing.Service.Sql.InstanceActivation.ActivationLockProvider.<TryObtainLock>d__0.MoveNext() in C:\builds\1\s\src\Sitecore.Framework.Publishing.Service.Sql\InstanceActivation\ActivationLockProvider.cs:line 15 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Sitecore.Framework.Publishing.InstanceActivation.ActivationLockRepository.<TryObtainLock>d__3.MoveNext() in C:\builds\1\s\src\Sitecore.Framework.Publishing\InstanceActivation\ActivationLockRepository.cs:line 28 --- End of inner exception stack trace --- at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification) at Sitecore.Framework.Publishing.InstanceActivation.MultiInstanceActivationStrategy.ObtainActivationLock(IActivationLockRepository repo) in C:\builds\1\s\src\Sitecore.Framework.Publishing\InstanceActivation\MultiInstanceActivationStrategy.cs:line 121 ---> (Inner Exception #0) System.AggregateException: One or more errors occurred. ---> System.InvalidOperationException: Invalid operation. The connection is closed. at System.Data.SqlClient.SqlConnection.GetOpenConnection() at System.Data.SqlClient.SqlConnection.BeginTransaction(IsolationLevel iso, String transactionName) at System.Data.SqlClient.SqlConnection.BeginDbTransaction(IsolationLevel isolationLevel) at Sitecore.Framework.Publishing.Service.Sql.InstanceActivation.ActivationLockProvider.<>c__DisplayClass0_0.<<TryObtainLock>b__0>d.MoveNext() in C:\builds\1\s\src\Sitecore.Framework.Publishing.Service.Sql\InstanceActivation\ActivationLockProvider.cs:line 17 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Sitecore.Framework.Publishing.Data.AdoNet.NoRetryConnectionBehaviour.<ExecuteAsync>d__10`1.MoveNext() in C:\builds\1\s\src\Sitecore.Framework.Publishing.Data\AdoNet\NoRetryConnectionBehaviour.cs:line 50 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Sitecore.Framework.Publishing.Data.AdoNet.DatabaseConnection`1.<ExecuteAsync>d__27`1.MoveNext() in C:\builds\1\s\src\Sitecore.Framework.Publishing.Data\AdoNet\DatabaseConnection.cs:line 106 --- End of inner exception stack trace --- at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification) at Sitecore.Framework.Publishing.Service.Sql.InstanceActivation.ActivationLockProvider.<>c.<TryObtainLock>b__0_1(Task`1 x) in C:\builds\1\s\src\Sitecore.Framework.Publishing.Service.Sql\InstanceActivation\ActivationLockProvider.cs:line 40 at System.Threading.Tasks.ContinuationResultTaskFromResultTask`2.InnerInvoke() at System.Threading.Tasks.Task.Execute() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Sitecore.Framework.Publishing.Service.Sql.InstanceActivation.ActivationLockProvider.<TryObtainLock>d__0.MoveNext() in C:\builds\1\s\src\Sitecore.Framework.Publishing.Service.Sql\InstanceActivation\ActivationLockProvider.cs:line 15 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Sitecore.Framework.Publishing.InstanceActivation.ActivationLockRepository.<TryObtainLock>d__3.MoveNext() in C:\builds\1\s\src\Sitecore.Framework.Publishing\InstanceActivation\ActivationLockRepository.cs:line 28 ---> (Inner Exception #0) System.InvalidOperationException: Invalid operation. The connection is closed. at System.Data.SqlClient.SqlConnection.GetOpenConnection() at System.Data.SqlClient.SqlConnection.BeginTransaction(IsolationLevel iso, String transactionName) at System.Data.SqlClient.SqlConnection.BeginDbTransaction(IsolationLevel isolationLevel) at Sitecore.Framework.Publishing.Service.Sql.InstanceActivation.ActivationLockProvider.<>c__DisplayClass0_0.<<TryObtainLock>b__0>d.MoveNext() in C:\builds\1\s\src\Sitecore.Framework.Publishing.Service.Sql\InstanceActivation\ActivationLockProvider.cs:line 17 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Sitecore.Framework.Publishing.Data.AdoNet.NoRetryConnectionBehaviour.<ExecuteAsync>d__10`1.MoveNext() in C:\builds\1\s\src\Sitecore.Framework.Publishing.Data\AdoNet\NoRetryConnectionBehaviour.cs:line 50 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Sitecore.Framework.Publishing.Data.AdoNet.DatabaseConnection`1.<ExecuteAsync>d__27`1.MoveNext() in C:\builds\1\s\src\Sitecore.Framework.Publishing.Data\AdoNet\DatabaseConnection.cs:line 106<--- <---
It's actually easier than that (only showing partial code): if ($renderingInstance) { $renderingInstance.Cachable = 1 $renderingInstance.VaryByData = 1 Set-Rendering -Item $_ -Instance $renderingInstance } This will update the checkboxes on the shared layout. You can omit the Cachable (sic) setting if your rendering instances are already set to be cached, or if don't want to activate caching for all of them.
Updating parameters using SPE I'm running a script in which I want to mark as checked all renderings of a specific template with the Vary By Data parameter. But running the script it is adding to the Additional Parameters the value as opposed to checking the checkbox for the respective parameter as shown bellow: Anyone know what I'm missing? Here is my script $items = Get-ChildItem -Recurse | Where-Object {$_.TemplateID -match "{79A0F7AB-17C8-422C-B927-82A1EC666ABC}"} | ForEach-Object { $renderingInstance = Get-Rendering -Item $_ -Rendering $rendering if($renderingInstance){ Set-Rendering -Item $_ -Instance $renderingInstance -Parameter @{ VaryByData = "$true" } }}
You can use Sitecore Client Services to expose data from Sitecore Sitecore.Services.Client provides a service layer on both the server and the client side of Sitecore applications that you use to develop data-driven applications. Sitecore.Services.Client is configurable and extendable, and the framework and scaffolding it provides help you create the client-server communication in an application in a consistent way. Sitecore.Services.Client uses the ASP.NET Web API as a foundation. Links: https://doc.sitecore.com/xp/en/developers/91/sitecore-experience-manager/sitecore-services-client.html https://doc.sitecore.com/xp/en/developers/91/sitecore-experience-manager/sitecore-services-client-security.html https://doc.sitecore.com/xp/en/developers/92/sitecore-experience-manager/the-restful-api-for-the-itemservice.html
Best way to expose sitecore data to external system as web api In sitecore 7.2 I had customized sitecore web api to expose data from sitecore to external system as API. I am just wondering if something new/enhanced has been added in sitecore 8.2 to expose data from sitecore to external system.
It turned out that it had nothing to do with the medialinkprefix setting, which was fine. Rather it turned out to be an issue with how the url was being generated on the delivery end. This particular sublayout apparently had never been used to link to media files, only to internal or external urls, and so the code behind did not account for media item links, which are different. I ended up using some of the code specified in this helpful post: https://briancaos.wordpress.com/2012/08/24/sitecore-links-with-linkmanager-and-mediamanager/
Insert Media Link does not create a valid path to media item Just started noticing this recently, I don't think it was an issue before but can't see what would have changed to cause this. We have General Link field for one of our templates and when I click the Insert Media Link in it and find the media item I want to link to, it inserts the correct path but leaves out the initial /~/media and so when that item is published, we get a 404 when clicking on that link. If I manually add /~/media at the beginning of that inserted path, however, the link resolves fine. Can anyone give me a hint as to why either the /~/media isn't being inserted when clicking on this button, or why the path without that prefix wouldn't be resolving (if indeed it should be able to)? Just looked at my configs and the medialink prefix is set to "" and there's a customhandler: <handler trigger="~media/" handler="sitecore_media.ashx"> As far as I can tell, this should all be working fine, but I still don't get this prefix added to paths when clicking the Insert Media Link button for the content item...
You could create site-specific rules for insert options in /sitecore/System/Settings/Rules/Insert Options/Rules For each rule you can select a condition (for a site-specific rule it would probably be 'where the item is the specific item or one of its descendants' for your site root) and an action (adding/removing specific insert options). If you want to have custom rules per site and add them under each site node you could create site-specific folders with rules and override the default uiGetMasters/runrules processor with a custom class. Links: Site Specific Insert Option Rules For Sitecore https://www.markstiles.net/blog/2013/1/18/site-specific-insert-option-rules-for-sitecore/ All About Insert Options in the Sitecore ASP.NET CMS https://community.sitecore.net/technical_blogs/b/sitecorejohn_blog/posts/all-about-insert-options-in-the-sitecore-asp-net-cms Insert Rules using Rule Magic https://trayek.wordpress.com/2013/05/24/insert-rules-using-rules-magic/
How to handle insert rules in multisite environment? I've got some insert rules defined for my website, now I have to convert this into a multi site solution. My current insert rules apply to the new site. How can I restrict insert rules to work only on a single site in multi site environment?
Looking at the assembly in ILSpy, you need 4.5.2. [assembly: TargetFramework(".NETFramework,Version=v4.5.2", FrameworkDisplayName = ".NET Framework 4.5.2")]
Error message trying to install Unicorn We are happily running unicorn in VS2015 with Sitecore 8.2, but we need to bring in some items from a Sitecore 7.2 instance. Unfortunately I cannot get Unicorn to install via NuGet. Every time I try, it errors out on Rainbow with this message: Install-Package : Could not install package 'Rainbow.Core 1.4.1'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.5.1', but the package does not contain any assembly references or content files that are compatible with that framework. I don't see anywhere that a particular .NET framework version is required. SC82 is running on 4.6.1, but I don't think I can do that for SC72. I've also tried installing Rainbow by itself first, which attempts to install 1.4.2, but that fails with the same error. Lastly, I tried adding the NuGet package with a new Visual Studio 2015 project created by the SIM tool and it errors out with the same message (except it is using .NET 4.5) Anything I can try?
I haven't heard anything about Vision Stencils for Sitecore. But on an architecture visualization perspective I would recommend you to try Sitecore UML Tool. Its an architecture visualization tool helps visualize existing Sitecore architectures in UML and to create, visualize and deploy new Sitecore template architectures directly from their UML diagrams. It even has the power to generate MSDN-style documentation for any Sitecore architecture. https://github.com/zkniebel/SitecoreUML
Sitecore Visio Stencils I've seen a few diagrams on the Sitecore developer sites and but does anyone know if they are distributing the stencils somewhere? I'd like to capture the infrastructure topology at our client.
To add a user to an engagement plan (EP) with code is very simple. You just need to new up an AutomationStateManager and enroll the user in the EP. Just supply the ID of the EP. var a = AutomationStateManager.Create(Tracker.Current.Contact); a.EnrollInEngagementPlan([ID of the EngagementPlan], IDs.EngagementPlans.State.BeginingState);
Add Anonymous Users into an Engagement Plan Is there a way to automatically add visitors to a specific site definition to a specific engagement plan OOTB? Is there a way this could be implemented programmatically?
The event queue table has two columns related to the matter. They are RaiseGlobally (true by default) and RaiseLocally (false by default). These flags control the event execution appropriately (i.e. if RaiseGlobally is false, the event will not be processed by remote servers) In order to control those flags, you can use the second overload of the QueueEvent<T> method: EventManager.QueueEvent<EventRemote>(new EventRemote {ItemId = "bas"}, true, true) The first flag is for RaiseGlobally, the second is for RaiseLocally.
Can a server subscribe to its own remote events? I am creating a custom event to allow CD to inform CM about a specific user action in a production environment. My local development environment is a single server. Despite subscribing to the remote event, I do not see the remote event handler firing in my environment. Is this the expected behavior? Does my server not see the remote event because it is the server that raised it? Code: using Sitecore.Pipelines; using System; namespace Test.Website.Configuration.Events { public class EventRemote { public string ItemId { get; set; } } public class EventHandlers { public virtual void InitializeFromPipeline(PipelineArgs args) { Sitecore.Diagnostics.Log.Error("EventHandlers.InitializeFromPipeline() called", this); var action = new Action<EventRemote>(RaiseRemoteEvent); Sitecore.Eventing.EventManager.Subscribe<EventRemote>(action); } private void RaiseRemoteEvent(EventRemote myEvent) { Sitecore.Diagnostics.Log.Error("EventHandlers.RaiseRemoteEvent() called", this); Sitecore.Events.Event.RaiseEvent("event:happened:remote", new object[] { myEvent.ItemId }); } } public class EventManager { public static void RaiseEventRemote() { Sitecore.Diagnostics.Log.Error("EventManager.RaiseEventRemote() called", typeof(EventManager)); var parameters = new object[] { new Guid().ToString() }; Sitecore.Events.Event.RaiseEvent("event:happened", parameters); Sitecore.Eventing.EventManager.QueueEvent<EventRemote>(new EventRemote {ItemId = "bas"}); } public void OnEvent(object sender, EventArgs args) { Sitecore.Diagnostics.Log.Error("EventManager.OnEvent() called", this); } public void OnEventRemote(object sender, EventArgs args) { Sitecore.Diagnostics.Log.Error("EventManager.OnEventRemote() called", this); } } } Config patch: <configuration xmlns:patch="http://www.sitecore.net/xmlconfig/"> <sitecore> <pipelines> <initialize> <processor type="Test.Website.Configuration.Events.EventHandlers, Test.Website" method="InitializeFromPipeline" /> </initialize> </pipelines> <events> <event name="event:happened"> <handler type="Test.Website.Configuration.Events.EventManager, Test.Website" method="OnEvent" /> </event> <event name="event:happened:remote"> <handler type="Test.Website.Configuration.Events.EventManager, Test.Website" method="OnEventRemote" /> </event> </events> </sitecore> </configuration>
Well there's almost two questions there. One is how to get a friendly Url from a General Link Field. This will first require you to determine if it's an internal link and therefore there is an ID for the item they link to, or if it's external, that should already have a friendly url. Keep in mind the General Link field stores everything in Xml, so you'll need to parse this xml to determine the link type. If it's an internal Url and therefore ID, you can get the Item by it's ID and then pass it into the Link Manager to get it's friendly url based on Link Manager settings for your site. ID itemId = new ID("{EB18D6BC-4264-42B0-9480-21C10BA13706}"); Sitecore.Links.UrlOptions urlOptions = Sitecore.Links.UrlOptions.DefaultOptions; string friendlyUrl = string.Empty; if (itemId != null) { Item urlItem = Sitecore.Context.Database.GetItem(itemId); if (urlItem != null) { friendlyUrl = Sitecore.Links.LinkManager.GetItemUrl(urlItem, urlOptions); } } So you would want to get the id from the xml, whereas I just show how to get the Url using the LinkManager once you have an id above. If you wanted to build that into a class that represents the Rendering Parameter Template, that's fairly straight forward as well, just create a Property on your class called Url or something like that, and inside that Property declaration you can perform the logic I mention above.
Getting generic link's friendly url from rendering parameters I have a rendering parameter template with a generic link field, now I want to get the friendly url (No glass mapper in this project), is there a way to convert rendering parameters to fields based on the template?
Alright, I figured it out ! There are basically two ways of doing so. In every case, the first div inside the slide shouldn't have any attributes (else SXA Carousel breaks !) First Way, with rendering variants It is the most easy to use and also the quickest, but you can't use any controller's logic here Create Rendering Variant Go to /sitecore/system/Settings/Foundation/Experience Accelerator/Rendering Variants/Rendering Variants/Page Content Insert Variant Definition In inserted variant definition, click insert > field and insert the fields you want to have in you custom slide. You can also add html structure and css classes using section but be sure the first HTML tag does not contain any class ! Create custom slide template Create custom slide template with appropriate fields (must be exact same names that in variant definition). The template should inherit from Carousel Slide Add Standard Values Design Layout on Standard Values, add Page Content in section-content placeholder with Styling > Variant set to the ID of the variant definition you have just defined Add Template to Carousel's insert options Second Way, with a rendering This way is closer to the classic way of using renderings Create custom slide rendering Create Controller Create View Create Rendering Create custom slide template Create custom slide template with appropriate fields. The template should inherit from Carousel Slide Add Standard Values Design Layout on Standard Values, just add your custom slide rendering in section-content placeholder? Add Template to Carousel's insert options That's it !
SXA: Add custom slide template to Carousel In SXA's carousels, slides only take one rich text to display their content. I would like to have a testimonial slide which has a title and a content, so that the contributor doesn't have to structure its text with HTML but just fill in the two fields. I have created a TestimonialSlide template inheriting from SXA's Slide template and adding three fields, Name JobTitle Testimonial The template is referenced in carousel's insert options. I can therefore add a TestimonialSlide to a carousel but then it freezes. Of course, it is not linked with any Model, Controller nor any View. Here is my problem, I want to link this template to a View, Model, Controller, Rendering but I don't get how the link is done in SXA to copy the same structure. I get the impression that we only link a template and not a rendering... I am confused ! Can someone help me link my custom slide template to a View, Model, Controller and Rendering so that it can be added to a Carousel ?
It looks like a bug in the Languages Gallery form (Sitecore.Shell.Applications.ContentManager.Galleries.Languages.GalleryLanguagesForm). The following code in the OnLoad method is expected to skip rendering languages if a user hasn't got Read access rights granted. foreach (Language language in languages) { Item languageItem = LanguageManager.GetLanguageItem(language, item.Database); // this is ALLWAYS null if a user hasn't got Read access if (languageItem != null) { if (!languageItem.Access.CanRead()) { continue; } ... Problem The problem is in the if (languageItem != null) statement which is expected to be true to skip a language, but in fact it's always false because the user hasn't got the read access and cannot read the language item. Workaround You may try override the entire form code-behind class and skip languages if there are no corresponding language items found: foreach (Language language in languages) { Item languageItem = LanguageManager.GetLanguageItem(language, item.Database); // do not render language if it cannot be read if (languageItem == null) { continue; } if (!languageItem.Access.CanRead()) { continue; } The side effect of that is that all the languages from the core database that have not been duplicated in master will disappear. That's happening because in the code above the LanguageManager tries to read and check availability for languages from the item.Database only (which is master): LanguageManager.GetLanguageItem(language, item.Database);
Restrict Content Editor Language Dropdown Options I am trying to only display certain languages for Editors in the Sitecore Content Editor Language dropdown/selector. In the access viewer, it shows the permission correctly for the editors. (i.e. only have language read/write permission to the few languages in /system/languages for the editors). But, in content editor, it still display all the language options in the language selector. When a language without permission selected, it displays "The security settings for the current language prevent you from seeing this item." warning. But what I need is totally remove the languages without permission from the editor dropdown. Any idea/help on this highly appreciated.
Habitat is an example implementation of the Helix guidelines and shouldn't be used as a starter kit. With that said, you should review what you will need now and remove what you can. It can always be brought back in at a later time if it's deemed appropriate.
Sitecore Habitat Performance We are about to push a site to live developed using habitat. There are chances that more localization and multi-sites would be developed in future. But some of the default habitat feature will not be relevant for us (even in future). Is this a right-time to remove those features from solution before pushing to development or will there be any performance issues when un-used feature/foundation deployed to production.
It seems that you have something wrong with caching of images(not necessary on Sitecore MediaLibrary Cache level). You have 2 different keys: ?as=False&amp;bc=0&amp;h=0&amp;iar=False&amp;mh=0&amp;mw=0&amp;sc=0&amp;thn=False&amp;w=0 and ?as=False&amp;bc=0&amp;h=300&amp;iar=False&amp;mh=0&amp;mw=0&amp;sc=0&amp;thn=False&amp;w=1200&amp;cha=l Based on this keys MediaLibrary cache should return different cached images. If I were you I would look why cache return wrong image for request without cropping parameters. And now answer on your question about altering keys that are stored in the media cache: Media cache key is built based on Sitecore.Resources.Media.MediaRequest parameters. Sitecore uses Sitecore.Resources.Media.MediaUrlOptions properties and CustomOptions of MediaRequest to build cache key. It is hard to extend MediaUrlOptions, but easy to add anything to CustomOptions. Here is example how I am adding custom option inside MediaRequestHandler: public class MediaRequestHandler : Sitecore.Resources.Media.MediaRequestHandler { protected override bool DoProcessRequest(HttpContext context, MediaRequest request, Media media) { if (context?.Request.AcceptTypes != null &amp;&amp; (context.Request.AcceptTypes).Contains("image/webp")) { request.Options.CustomOptions["extension"] = "webp"; } return base.DoProcessRequest(context, request, media); } private static bool AcceptWebP(HttpContext context) { return context?.Request.AcceptTypes != null &amp;&amp; (context.Request.AcceptTypes).Contains("image/webp"); } } It works fine for me. I get additional &amp;extension=webp to key for requests, when it is required.
How to provide default values for custom parameters with the Sitecore Media Cache I have a custom pipeline processor that is patched in before the ResizeProcessor in the getMediaStream pipeline. When I request an image from sitecore that has no query parameters, such as site/-/media/.../my-image.jpg, the media cache entry for that file will have the [key] stored as the list of query parameters with all values set to 0 or false (depending on type). An example entry looks like this [key] ?as=False&amp;bc=0&amp;h=0&amp;iar=False&amp;mh=0&amp;mw=0&amp;sc=0&amp;thn=False&amp;w=0 [extension] jpg [headers] Content-Type: image/jpeg [dataFile] 9ec21b9f3d964272a32da412422fec97.jpg ;----- This is what I would expect, but a problem occurs when using custom parameters and requesting an image with parameters before requesting the original. Say I request the same image, but with my custom cropping parameters added, as such, site/-/media/images/test/rally-scoob?w=1200&amp;h=300&amp;cha=l&amp;c=1&amp;hash=682947F3A745596DF0B8991F41BEC2709CED7755 which generates the following media cache entry: [key] ?as=False&amp;bc=0&amp;h=300&amp;iar=False&amp;mh=0&amp;mw=0&amp;sc=0&amp;thn=False&amp;w=1200&amp;cha=l [extension] jpg [headers] Content-Type: image/jpeg [dataFile] b0ae589092754a6b9376f0c6d76351cd.jpg ;----- This is fine, as long as the image with the query parameters is requested after the original. If the order is switched, then the returned image for the parameterless image is not correct. The only workaround that I can think of is to append my custom parameters to the [key] of the media entry in the same way that the other parameters are defaulted. The problem is that I'm not sure what needs to be patched in order to add custom parameters to the Media Cache keys by default. Does anyone have any experience with altering the way that keys are stored in the media cache? Thanks in advance.
It’s a bug, public reference number 91385. Problem <sc.include> cannot be expanded, when it is used in a config file under the Include folder Workaround Manually include items from the referenced configs (or move your configuration to sitecore.config)
Does it matter that sc.include elements display in the admin showconfig page? We're currently in the process of upgrading to Sitecore 8.2 Update-3, and as part of this are finally moving customizations out of the Sitecore.config into patch files. One of our needs is to define a new database element for a production/content delivery database on our authoring server. This means that we have a patch file that looks like this on the server: <?xml version="1.0"?> <configuration xmlns:patch="http://www.sitecore.net/xmlconfig/"> <sitecore> <databases> <!-- Edit will need to be able to point to both the edit and production databases. --> <database id="prodweb" singleInstance="true" type="Sitecore.Data.DefaultDatabase, Sitecore.Kernel" patch:after="database[@id='web']"> <param desc="name">$(id)</param> <icon>Network/16x16/earth.png</icon> <securityEnabled>true</securityEnabled> <dataProviders hint="list:AddDataProvider"> <dataProvider ref="dataProviders/main" param1="$(id)"> <disableGroup>publishing</disableGroup> <prefetch hint="raw:AddPrefetch"> <sc.include file="/App_Config/Prefetch/Common.config"/> <sc.include file="/App_Config/Prefetch/Webdb.config"/> </prefetch> </dataProvider> </dataProviders> <proxiesEnabled>false</proxiesEnabled> <proxyDataProvider ref="proxyDataProviders/main" param1="$(id)"/> <archives hint="raw:AddArchive"> <archive name="archive"/> <archive name="recyclebin"/> </archives> <cacheSizes hint="setting"> <data>20MB</data> <items>10MB</items> <paths>500KB</paths> <itempaths>10MB</itempaths> <standardValues>500KB</standardValues> </cacheSizes> </database> </databases> </sitecore> </configuration> If we pull up the admin page that shows the final config, https://example.com/sitecore/admin/showconfig.aspx we have the following, where we can see that sc.include elements aren't being replaced as they are with the other sites. <?xml version="1.0"?> <sitecore xmlns:patch="http://www.sitecore.net/xmlconfig/" database="SqlServer"> <databases> <!-- web --> <database id="web" singleInstance="true" type="Sitecore.Data.Database, Sitecore.Kernel"> <param desc="name">$(id)</param> <icon>Images/database_web.png</icon> <securityEnabled>true</securityEnabled> <dataProviders hint="list:AddDataProvider"> <dataProvider ref="dataProviders/main" param1="$(id)"> <disableGroup>publishing</disableGroup> <prefetch hint="raw:AddPrefetch"> <childLimit>100</childLimit> <logStats>false</logStats> <template desc="template">{AB86861A-6030-46C5-B394-E8F99E8B87DB}</template> <template desc="template section">{E269FBB5-3750-427A-9149-7AA950B49301}</template> <template desc="template field">{455A3E98-A627-4B40-8035-E683A0331AC7}</template> <template desc="node">{239F9CF4-E5A0-44E0-B342-0F32CD4C6D8B}</template> <template desc="folder">{A87A00B1-E6DB-45AB-8B54-636FEC3B5523}</template> <template desc="language">{F68F13A6-3395-426A-B9A1-FA2DC60D94EB}</template> <template desc="device">{B6F7EEB4-E8D7-476F-8936-5ACE6A76F20B}</template> <item desc="root">{11111111-1111-1111-1111-111111111111}</item> <children desc="main sections">{11111111-1111-1111-1111-111111111111}</children> <!-- scdev: 10MB scstage: 10MB scedit: 75MB scprod: 150MB --> <cacheSize>50MB</cacheSize> <template desc="alias">{54BCFFB7-8F46-4948-AE74-DA5B6B5AFA86}</template> <template desc="layout">{3A45A723-64EE-4919-9D41-02FD40FD1466}</template> <template desc="xsl rendering">{F1F1D639-4F54-40C2-8BE0-81266B392CEB}</template> <item desc="home">{110D559F-DEA5-42EA-9C1C-8A5DF7E70EF9}</item> <children desc="main items">{110D559F-DEA5-42EA-9C1C-8A5DF7E70EF9}</children> </prefetch> </dataProvider> </dataProviders> <proxiesEnabled>false</proxiesEnabled> <proxyDataProvider ref="proxyDataProviders/main" param1="$(id)" /> <archives hint="raw:AddArchive"> <archive name="archive" /> <archive name="recyclebin" /> </archives> <cacheSizes hint="setting"> <data>100MB</data> <items>50MB</items> <paths>2500KB</paths> <itempaths>50MB</itempaths> <standardValues>2500KB</standardValues> </cacheSizes> <Engines.DataEngine.Commands.AddFromTemplatePrototype patch:source="Sitecore.Buckets.config"> <obj type="Sitecore.Buckets.Commands.AddFromTemplateCommand, Sitecore.Buckets" /> </Engines.DataEngine.Commands.AddFromTemplatePrototype> </database> <!-- Edit will need to be able to point to both the edit and production databases. --> <database id="prodweb" singleInstance="true" type="Sitecore.Data.Database, Sitecore.Kernel" patch:source="Wsb.Sites.config"> <param desc="name">$(id)</param> <icon>Network/16x16/earth.png</icon> <securityEnabled>true</securityEnabled> <dataProviders hint="list:AddDataProvider"> <dataProvider ref="dataProviders/main" param1="$(id)"> <disableGroup>publishing</disableGroup> <prefetch hint="raw:AddPrefetch"> <sc.include file="/App_Config/Prefetch/Common.config" /> <sc.include file="/App_Config/Prefetch/Webdb.config" /> </prefetch> </dataProvider> </dataProviders> <proxiesEnabled>false</proxiesEnabled> <proxyDataProvider ref="proxyDataProviders/main" param1="$(id)" /> <archives hint="raw:AddArchive"> <archive name="archive" /> <archive name="recyclebin" /> </archives> <cacheSizes hint="setting"> <data>20MB</data> <items>10MB</items> <paths>500KB</paths> <itempaths>10MB</itempaths> <standardValues>500KB</standardValues> </cacheSizes> </database> </databases> </sitecore> I can't find any documentation about this, so while things appear to be working properly, I'm unclear whether it's okay that the sc.include elements are not being expanded in this view for the site being patched in. Should I update the patch file to manually include the items from the two config files (/App_Config/Prefetch/Common.config and /App_Config/Prefetch/Webdb.config) or will Sitecore still do the necessary replacements? Or is there a better way to add a new site via Sitecore patch files? Thanks!
Option #3 actually does work. I forgot to do a hard refresh in my browser during testing. Oops. So you can add this to your main web.config <configuration> <location path="themes"> <system.webServer> <staticContent> <clientCache cacheControlCustom="public" cacheControlMode="UseMaxAge" cacheControlMaxAge="365.00:00:00" /> </staticContent> </system.webServer> </location> </configuration> Or if you prefer, you can create a new web.config in the themes folder with the following content which achieves the same thing: <?xml version="1.0" encoding="utf-8"?> <configuration> <system.webServer> <staticContent> <clientCache cacheControlCustom="public" cacheControlMode="UseMaxAge" cacheControlMaxAge="365.00:00:00" /> </staticContent> </system.webServer> </configuration> When testing caching settings, don't forget to do a hard refresh!
How to configure caching for static resources in Sitecore How can I enable caching for static resources such as CSS and JavaScript files in a Sitecore solution? I need these resources to have the following response header present: Cache-Control:public, max-age=14400 I have the following settings in web.config with no success. #1 system.webServer/caching This breaks Sitecore completely. Returns 500 response code with no error information. <configuration> <system.webServer> <caching enabled="true" enableKernelCache="true"> <profiles> <add extension=".js" policy="CacheForTimePeriod" duration="365.00:00:00"/> </profiles> </caching> </system.webServer> </configuration> #2 system.webServer/staticContent/clientCache This makes no change to the response headers. <configuration> <system.webServer> <staticContent> <clientCache cacheControlCustom="public" cacheControlMode="UseMaxAge" cacheControlMaxAge="365.00:00:00"/> </staticContent> </system.webServer> </configuration> #3 location/system.webServer/staticContent/clientCache This also makes no change to the response headers. <configuration> <location path="themes"> <system.webServer> <staticContent> <clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="00:00:15" /> </staticContent> </system.webServer> </location> </configuration>
I went down this path in this question. To this point I don't think anyone has pulled it off. And its mainly because there is so much Sitecore functionality in the RTE (i.e. Links, photos, etc...) Your best bet it to just allow the editors to have a custom HTML editor similar to what Michael West did. You can wire in your client side editor the same way Mike did. See his module here http://marketplace.sitecore.net/en/Modules/Code_Editor.aspx A great video on it here http://youtube.com/watch?v=JgOSdjgG_qs
Has anyone ever tried to replace an RTE in Sitecore, with something custom like tinyMCE? If there is there any instructions? I would like to replace the default RTE in Sitecore with tinyMCE, how would I do it? Where do I start?
This ended up being to do with the missing WFFM Javascript as mentioned by Matthew. We'd removed some of this as it was causing problems with our own css and js. Oddly this was still working previously but then stopped working. So to fix this ensure you have the following in your WFFM \Views\Form\Index.cshtml file and these exist in the /libs folder: var scripts = new List<string> { "libs/jquery/jquery-2.1.3.min.js", "libs/jquery/jquery-ui-1.11.3.min.js", "libs/jquery/jquery.validate.min.js", "libs/jquery/jquery.validate.unobtrusive.min.js", "libs/bootstrap/bootstrap.min.js", "wffm.min.js", "main.min.js" }; These seem to be required in order to set the form post url correctly and avoid the issue with the ?wffm.FormItemId param being added to the url.
Strange behaviour with WFFM form submissions (?wffm.FormItemId in url) On my local Environment and Staging Environment we have a problem where WFFM is appending the following querystring format to the urls after a form is submitted: ?wffm.FormItemId=79961446-e442-4b54-aee7-c6288041e852&amp;wffm.Id=f09e1638-3610-42f7-9008-4ba91547b053 It wasn't doing this previously but I re-installed the WFFM Module and since then it has been happening. It doesn't do this in our dev environment so it's a bit odd as the database used is the same as that used locally where it does append the querystring to the url. This suggests some file differences or config differences but I can't see anything obvious. Other info: Sitecore 8.1 Update 2 WFFM 8.1 rev. 160304 (Update-2)
Yeah, you are right, ItemTreeView doesn't support external source. I ran into this during imlementing a module where I've overrided a the defoult select rendering dialog but the "TreeViewEx" control is used there. It is a bit different with control that you are going to customize, but the meaning of changes is the same You actually need to override (my recommendation add your own control based on the existing) some functions at the ItemTreeView.cshtml and at the ItemTreeView.js. You can find them by the following paths: \sitecore\shell\client\Business Component Library\Layouts\Renderings\ListsAndGrids\TreeViews\ItemTreeView.cshtml \sitecore\shell\client\Business Component Library\Layouts\Renderings\ListsAndGrids\TreeViews\ItemTreeView.js As far as I can see ItemTreeView.cshtml is used just for initialize attributes which are subsequently used by the javascript for building the control. You need to debug the ItemTreeView.js and see what is a data a passes to the following method (at the bottom of the file): _sc.Factories.createJQueryUIComponent(_sc.Definitions.Models, _sc.Definitions.Views, control); I guess the "control" parameter is the most important for you. The source of the tree should be there. You need to prepare your own source with the same structure and pass the instead. I can see there are two ways how to prepare data: 1) You can call your api at the CustomItemTreeView.cshtml (that you will be added, for example) and build the source for tree and put that entirely to a data attribute. It is easer way but I am not recommend it as your data can have a large size and it can exceed the limits. 2) You can call your api at the CustomItemTreeView.cshtml and put to a data attributes just values that needs for building tree. Then, at the "CustomItemTreeView.js", You can get those values and build the source use the ajax call. I've described just an idea how it can be implemented. Some pitfalls can be there. Put a further comments and I will try to help you. Also you can see the implementation of the treeview that I've added for my module: Recommended Renderings Tree View
Using SPEAK ItemTreeView with an external data source I want to display an list of folders and images within them as clickable folders that expand and contract within a SPEAK modal page. However these are not items in Sitecore, they need to be loaded from an 3rd party API. The ItemTreeView seems like the right component to use but looking at the ItemTreeView.cshtml file and the documentation (https://doc.sitecore.net/speak/components/itemtreeview) it doesn't seem to support an external data source and expects and root item path passing into it from Sitecore. Short of Creating an Custom Data Provider to pull the items from the API into Sitecore I can't think of how best to do this. Any advice would be appreciated.
Yes, you can do the sync with almost any kind of script. Basically you can call the /unicorn.aspx with parameters. Here you can find the whole documentation about this. This example is working with PowerShell. Generate a very long random shared secret key, preferably using a password generator. There are no limits on character count, character types, etc but it must be > 30 characters. Install the shared secret into the Unicorn.UI.config file - or a patch thereof, under the authenticationProvider/SharedSecret node. There are comments to help. To call the tool API from a script, a PowerShell module is provided. Acquire the module and its supporting files from the doc\PowerShell Remote Scripting folder of the Unicorn git repository. Review the sample.ps1 file and adapt it to your needs, including putting the shared secret into it and setting the URL as needed. Don't worry the guts of sample.ps1 are two simple lines of code :) Here is the sample.ps1 provided by Unicorn: $ErrorActionPreference = 'Stop' $ScriptPath = Split-Path $MyInvocation.MyCommand.Path # This is an example PowerShell script that will remotely execute a Unicorn sync using the new CHAP authentication system. Import-Module $ScriptPath\Unicorn.psm1 # SYNC ALL CONFIGURATIONS Sync-Unicorn -ControlPanelUrl 'https://localhost/unicorn.aspx' -SharedSecret 'your-sharedsecret-here' # SYNC SPECIFIC CONFIGURATIONS Sync-Unicorn -ControlPanelUrl 'https://localhost/unicorn.aspx' -SharedSecret 'your-sharedsecret-here' -Configurations @('Test1', 'Test2') # SYNC ALL CONFIGURATIONS, SKIPPING ANY WITH TRANSPARENT SYNC ON Sync-Unicorn -ControlPanelUrl 'https://localhost/unicorn.aspx' -SharedSecret 'your-sharedsecret-here' -SkipTransparentConfigs # Note: you may pass -Verb 'Reserialize' for remote reserialize. Usually not needed though. # Note: If you are having authorization issues, add -DebugSecurity to your cmdlet invocation; this will display the raw signatures being used to compare to the server. Here is my demo with a concrete example, maybe it also helps you.
How to use Unicorn for continuous deployment between environments (UAT, Prod, etc.)? We are using Unicorn as sync mechanism for items between the dev machines.Currently we are manually deploying the yml files to different environments like SIT, UAT and PROD. Is it possible to use Unicorn for Continuous deployment between environments like SIT, UAT and PROD. If so how can we achieve this.
Web Forms for Marketers 8.2 rev. 161129 NOT SC PACKAGE is not a Sitecore Package like its name say. This zip file contains 3 other zip file: one for CM,one for Content Delivery and one for Reporting. Please unzip this file and install packages for CM or for other servers. Please see below picture:
Can't install WFFM on Sitecore 8.2 update 1 I am trying to install Web Form for marketers (Web Forms for Marketers 8.2 rev. 161129 NOT SC PACKAGE) on my sitecore 8.2 update 1 instance. It's not installing, neither throwing any error or nothing logging in logs. I checked windows event viewer but there is nothing related to wffm. Any clue what could be the issue?
The EXM checks if email has the “Set Page Title” rendering (/sitecore/layout/Renderings/Email Campaign/Set Page Title) at the presentation. And if it is not, EXM will skip subject and leave it empty. As a result, EXM throws the exception. You need to add the “Set Page Title” rendering to the presentation and the issue will be solved. The “Set Page Title” rendering has to be added between the <head></head> tags. Please, take into account that the rendering have to be added at the Shared Layout. If it is added to the Final Layout, it will not work.
Subject field is empty We are using an Email Experience Manager (EXM) on a current project. After applying new design (we added new layout and list of renderings to the presentaion of email), we’ve got an issue with subject field. Every time when we try to fill and save it (using EXM’s interface), it always appears empty and email can’t be send (“The message status has been changed to 'Paused'” message is shown). Do you have any idea why it happens?
As you said that it looks like it gets the web database not the master. If you post the whole GetLayoutItem<T>() methond then I can add a more precise answer, but it looks like that something wrong in that method. Possible reason I assume that you initialize somewhere an ISitecoreContext object and you use the GetItem<T>() method of ISitecoreContext. Could be that you initialize it as a Singleton if you are using IOC. But it should be at least LifestylePerWebRequest because if you call the new SitecoreContext() without parameters then it's using the context database. So if it's a Singleton then it uses always that database which was the context initially. These are just assumptions but could be helpful if you have this case.
'No model set' after choosing Create new Content for the datasource of the rendering We're experiencing the 'No model set' error message in the markup where we are calling the Glass Editable method. This is present after adding the rendering via the Experience Editor and choosing to 'Create New Content' for the datasource. No model set at Glass.Mapper.Sc.GlassHtml.MakeEditable[T](Expression1 field, Expression1 standardOutput, T model, Object parameters, Context context, Database database, TextWriter writer) in ~\Glass.Mapper.Sc\GlassHtml.cs:line 565 I'm assuming it's because after selecting to create the new Item the rendering is reloaded but before the Item has finished being created hence the Model not being set. The code isn't particularly fancy View @if (Html.Glass().IsInEditingMode || !string.IsNullOrEmpty(Model.HeadingTitle)) { <h3>@Html.Glass().Editable(Model, x => x.HeadingTitle)</h3> } <div class="sitecore-content"> @Html.Glass().Editable(Model, x => x.Information, x => Html.Sitecore().Field(I_BaseInformationConstants.InformationFieldName).ToString()) </div> Controller public ActionResult TextBlock() { // GetLayoutItem method from GlassController var basicContent = GetLayoutItem<ITextBlock>(); return View("/Views/Shared/Components/TextBlocks/TextBlock.cshtml", basicContent); } I can wrap the code in a Null check to prevent the error but then the Editable aren't present to enter content. Anyone address this problem before?
Even though Sitecore automaticallly adds the "_uniqueid" column, it seems that explicitly adding the column to the configuration fixes this issue. <productSearchConfiguration type="Sitecore.ContentSearch.LuceneProvider.LuceneIndexConfiguration, Sitecore.ContentSearch.LuceneProvider"> <fieldMap> <field fieldName="_uniqueid" storageType="YES" indexType="TOKENIZED" vectorType="NO" boost="1f" type="System.String" settingType="Sitecore.ContentSearch.LuceneProvider.LuceneSearchFieldConfiguration, Sitecore.ContentSearch.LuceneProvider"> <analyzer type="Sitecore.ContentSearch.LuceneProvider.Analyzers.LowerCaseKeywordAnalyzer, Sitecore.ContentSearch.LuceneProvider" /> </field> </fieldMap> <include hint="list:AddIncludedField"> <fieldId>_uniqueid</fieldId> </include> </productSearchConfiguration>
Duplicate Item in Lucene Index I have a Lucene index for the Master db. It seems like every save creates a new entry in the Lucene index. At first I thought it was versioning but as you can see in the screen shot, it's the same version (varsion is "1" for all entries). The only columns that are different are "Doc. Id","_updated" and any content fields have have changed between saves. If i do a rebuild of the index, everything looks correct. We are running 8.2. I saw this behavior in 8.1 as well. Is there a configuration or column that I am missing to ensure there's only 1 entry per item? here is my configuration <indexes hint="list:AddIndex"> <index id="foo_bar_index" type="Sitecore.ContentSearch.LuceneProvider.LuceneIndex, Sitecore.ContentSearch.LuceneProvider"> <param desc="name">$(id)</param> <param desc="folder">$(id)</param> <param desc="propertyStore" ref="contentSearch/indexConfigurations/databasePropertyStore" param1="$(id)" /> <configuration ref="contentSearch/indexConfigurations/masterProductConfiguration" /> <strategies hint="list:AddStrategy"> <strategy ref="contentSearch/indexConfigurations/indexUpdateStrategies/syncMaster" /> </strategies> <commitPolicyExecutor type="Sitecore.ContentSearch.CommitPolicyExecutor, Sitecore.ContentSearch"> <policies hint="list:AddCommitPolicy"> <policy type="Sitecore.ContentSearch.ModificationCountCommitPolicy, Sitecore.ContentSearch"> <Limit>300</Limit> </policy> </policies> </commitPolicyExecutor> <locations hint="list:AddCrawler"> <crawler type="Sitecore.ContentSearch.SitecoreItemCrawler, Sitecore.ContentSearch"> <Database>master</Database> <Root>/sitecore/content/FooBar/Home</Root> </crawler> </locations> <enableItemLanguageFallback>false</enableItemLanguageFallback> <enableFieldLanguageFallback>false</enableFieldLanguageFallback> </index> </indexes> I saw this thread, which looks similar to my issue but my issue does not have to do with media files or publishing. Sitecore 8: Items Duplicated in Web Index After Publish
You can use next code to stop a Sitecore job : Sitecore.Jobs.Job job = Sitecore.Jobs.JobManager.GetJob("yourjobname"); if (job != null) { job.Status.State = Sitecore.Jobs.JobState.Finished; job.Status.Expiry = DateTime.Now.AddMinutes(-1.0); } I used jobviewer from your link and I stopped few jobs and in jobview appear like on above picture
I have a stuck Sitecore.Jobs.Job, now how do I kill that? I need to kill a job that is surfacing back from a: Sitecore.Jobs.JobManager.GetJobs I can see it after I've copy/paste this resource in a "Jobs.aspx" : https://briancaos.wordpress.com/2014/11/11/sitecore-job-viewer-see-what-sitecore-is-doing-behind-your-back/ But how do I GET RID OF IT? Where I right-click the corresponding Windows Server 'Scheduled Tasks' and select "End all instances of this Task" it is followed by no effect. I see a deprecated Sitecore.Jobs.JobManager.removeJob(Handle handle) in John West's article. Beyond this, the desert or read-only stuff showing the jobs (already good). I thought it could be a flag in the Sitecore back-end database tables, but found nothing. Someone's help much appreciated..
It looks like web compares to web when you publish from the web database. Installed a module with a lot of changes and published from web. The event looked the same in the log. Sitecore Log From web: 4788 22:43:54 INFO AUDIT (sitecore\admin): Publish, root: null, languages:en, targets:Internet, databases:web, incremental:false, smart:true, republish:false, children:false, related:true 4788 22:43:54 INFO AUDIT (sitecore\admin): [Publishing]: Starting to process 1 publishing options From master 16620 22:45:36 INFO AUDIT (sitecore\admin): Publish, root: null, languages:en, targets:Internet, databases:web, incremental:false, smart:true, republish:false, children:false, related:true 16620 22:45:36 INFO AUDIT (sitecore\admin): [Publishing]: Starting to process 1 publishing options Publishing Log But when I look in the publishing log it tells a different story. from web (No items updated): 4788 22:43:54 INFO [Publishing]: Starting to process 1 publishing options 4788 22:43:54 INFO [PublishOptions]: root:null, language:en, targets:Internet, database:web, mode:Full, smart:True children:True, related:True 3204 22:43:55 WARN SitePublish detected. PublishContext was overridden with DisableDatabaseCaches=True. 3204 22:43:55 INFO Starting [Publishing] - AddItemsToQueue 3204 22:43:55 INFO Finished [Publishing] - AddItemsToQueue in 0 ms 3204 22:43:55 INFO Starting [Publishing] - ProcessQueue 3204 22:43:59 INFO Finished [Publishing] ProcessQueue in 3720 ms 3204 22:43:59 INFO Publish Mode : Smart 3204 22:43:59 INFO Created : 0 3204 22:43:59 INFO Updated : 0 3204 22:43:59 INFO Deleted : 0 3204 22:43:59 INFO Skipped : 4593 from master (73 updated, 503 created): 16620 22:45:36 INFO [Publishing]: Starting to process 1 publishing options 16620 22:45:36 INFO [PublishOptions]: root:null, language:en, targets:Internet, database:web, mode:Full, smart:True children:True, related:True 10640 22:45:37 WARN SitePublish detected. PublishContext was overridden with DisableDatabaseCaches=True. 10640 22:45:37 INFO Starting [Publishing] - AddItemsToQueue 10640 22:45:37 INFO Finished [Publishing] - AddItemsToQueue in 0 ms 10640 22:45:37 INFO Starting [Publishing] - ProcessQueue 10640 22:46:42 INFO Finished [Publishing] - ProcessQueue in 65023 ms 10640 22:46:42 INFO Publish Mode : Smart 10640 22:46:42 INFO Created : 503 10640 22:46:42 INFO Updated : 73 10640 22:46:42 INFO Deleted : 0 10640 22:46:42 INFO Skipped : 4523
What happens if you perform a publish in Sitecore desktop while on the web database If I am using the Sitecore desktop and have switched to view the web database in the bottom right corner, what happens if I perform a publish (assuming I have only the web DB as a publishing target).