sitecore

Sitecore users edit item creates new version

核能气质少年 提交于 2019-12-05 21:47:43
In Sitecore, for all the users who do not have administrator privileges(Is administrator checkbox not clicked when creating the user) when they try to edit an item they have to select "Lock and Edit" option which would create a new version instead of editing the existing one. Is there a way I can make non admin users edit an item without creating a new version ? I am hoping whether this could be done using a user role. Here is the code responsible for creating new versions while editing Sitecore items: public Item StartEditing(Item item) { Error.AssertObject((object) item, "item"); if (

Query Sitecore Lucene-index with ContentSearch-API on DateTime-range

耗尽温柔 提交于 2019-12-05 19:26:01
At this moment i'm working on a project to implement Sitecore 7.0 Update 2 In my data template i have this field called Begin Date and another one End Date. These two fields are created with the type 'Date' (not Datetime). So it shows a datepicker when i edit and create items and i've filed some items with dummy-content and with Begin and End date from last month and the current month. What i want to achieve is to get all the items within a selected month. My method contains a month and a year integer as parameter. This should control the items with the begin and end date it should get from

How to display a popup when saving a Sitecore item?

馋奶兔 提交于 2019-12-05 14:17:24
When saving a Sitecore item I am trying to display a popup to interact with the user. Depending on data that they have changed I may display a series of 1 or 2 popups asking them if they want to continue. I have figured out how to tap in to the OnItemSaving pipeline. That is simple. What I can't figure out is how to display a popup and react to the input from the user. Right now I am thinking that I should be using the Sitecore.Context.ClientPage.ClientResponse object somehow. Here is some code that shows what I am trying to do: public class MyCustomEventProcessor { public void OnItemSaving

Sitecore - ControllerRendering complaining about Controller “not found or does not implement IController.”

可紊 提交于 2019-12-05 13:24:08
So I have created my Controller Rendering, that uses controller Sitecore.Social.Twitter.Client.Mvc.Areas.Social.Controllers.TwitterConnectorController like so: But when I try to access the page, I get an error complaining about the Controller not being controller enough: But if I inspect the dll with the Object Viewer, the controller in question indeed inherits from IController: So, what is going on here? Why am I receiving this error? EDIT: I suspect that perhaps the error message is merely a symptom, and Sitecore is somehow unable to access the controller in the DLL. What factors could cause

Sitecore - Hide Button in Ribbon

时光总嘲笑我的痴心妄想 提交于 2019-12-05 12:57:38
I created a Contextual Ribbon for a specific content item. I have two buttons that will "promote" or "demote" the item to a certain category (there can only be one in the section). Is it possible to hide one of the buttons based on the contents state in some sort of code behind? I understand how to link up to the Click event, but I was wondering if there was some sort of load event for the custom ribbon to access. Seems I can use the same class that inherits from Command to override the QueryState method. This is called when the buttons are loaded, and I can do a check there and return a

How to enable workflow state 'write' on selected item?

微笑、不失礼 提交于 2019-12-05 12:40:02
Some items don't have write access right due to workflow state write not being granted. When I click write access right in Access Viewer Access Viewer informs me that selected user don't have access right due to workflowstate write acess right: Unfortunately I'm not able to set it 'manualy' through security editor: Can anyone shed some light on this ? Thanks Browse to the item which represents this workflow state. According to your sample, it should be /sitecore/system/workflow/MediaPublishing/StartAndPublish. Make sure write access is allowed for that user to this workflow state item. 来源:

Sitecore package install never ends

偶尔善良 提交于 2019-12-05 11:20:49
问题 I got an interesting problem. When I install a Sitecore package the user interface never gets updated when the package is fully installed. The Sitecore package installation is hanging. In the Sitecore logs I see: ManagedPoolThread #18 11:36:00 INFO Installing item: items/master/sitecore/system/Tasks/Schedules/Portals/Default/{BEA47CD0-C3B3-4EFD-A781-997292620312}/nl/1/xml ManagedPoolThread #18 11:36:00 INFO Installing item: items/master/sitecore/system/Tasks/Schedules/Portals/Default/foobar/

Sitecore - rewrite “ ” to “-” in urls but still allow dashes as legal item names

元气小坏坏 提交于 2019-12-05 10:31:17
I've read a half dozen guides on rewriting spaces to something more friendly in Sitecore, but all of them rely on Sitecore's <encodeNameReplacements/> element which also reverses the replacement requiring "-" to be an illegal character for names. The problem with this is that the url of our application has a "-" in the hostname. Sitecore rewrites this resulting in a 404. Does anyone have ideas on how to do this url rewriting in Sitecore without relying on <encodeNameReplacements and still allowing "-" as a legal item name character? Our current best idea is to use something slighty more

Save Return Error in Sitecore Page Editor

痴心易碎 提交于 2019-12-05 10:06:22
I get an error when save a page in page editor.. Somehow when I edited the page from presentation > detail and display it in page editor it works fine.. The error logs is in below here.. ERROR After parsing a value an unexpected character was encountered: {. Path 'scLayout', line 38, position 85. Exception: Newtonsoft.Json.JsonReaderException Message: After parsing a value an unexpected character was encountered: {. Path 'scLayout', line 38, position 85. Source: Newtonsoft.Json at Newtonsoft.Json.JsonTextReader.ParsePostValue() at Newtonsoft.Json.JsonTextReader.ReadInternal() at Newtonsoft

How to use internal links with wildcard items in Sitecore?

霸气de小男生 提交于 2019-12-05 09:42:23
I have a multiple site Sitecore solution. All the sites share a product range which is stored inside a 'Shared data' node that sits at the same level as the root nodes of the sites. The individual product pages on a site use a wildcard item to lookup the product based on the last part of the URL. This means that we can't use internal links in the rich text editor to point to the product page on any of the sites because the product item does not have a specific site URL. Does anyone know of a way to overcome this, or perhaps know of a way to augment the default behavior of interal links? Wesley