sitecore

Sitecore: GetMediaStream is always null

岁酱吖の 提交于 2019-12-11 12:18:27
问题 I have files stored in my master and web databases (Sitecore). I need to read the content of the a selected file. This is the code I use: MediaItem mediaItem = Sitecore.Context.Database.Items.GetItem(id); if (mediaItem != null) { Stream stream = mediaItem.GetMediaStream(); } stream is always null! I've tried this for several files. If I try to download the files, they do download successfully. I need to read the contents of the file. The mediaitem returns all the meta data (file name,

how to programmatically set a value of Treelist in sitecore

℡╲_俬逩灬. 提交于 2019-12-11 12:17:16
问题 I have a job description page, and I am adding values to it programmatically. One of the fields is "Office Locations", with a data type of Treelist. How can I add values to the Treelist so that I can set the office location? 回答1: Sitecore Treelist stores the ids of selected items in a pipeline separated form. If you want to set the value of Treelist programmatically you need to set it to a string which looks like: {110D559F-DEA5-42EA-9C1C-8A5DF7E70EF9}|{EA015A5F-C41B-4510-B538-438EF204F5E2}

Modifying WFFM Information Using c#

拜拜、爱过 提交于 2019-12-11 12:09:17
问题 We have setup a simple form using Web Forms For Marketers on our Sitecore 6.4.0 site. The form is logging information just fine, and we have written a page to allow end-users to view the results, using the code from http://r-coding-sitecoreblog.blogspot.com/2011/11/extracting-data-from-sitecore-wffm.html mainly. The next step in the progression is to allow a user to approve/reject a submission, and to either pass that form submission's information to a method, or to delete that form

Sitecore 7 highlight search results

感情迁移 提交于 2019-12-11 11:54:01
问题 I am working on the upgrade of a project from Sitecore 6.2 to Sitecore 7. I have found out that in Sitecore 6.2, the highlighting of the search results are implemented with the Lucene.Net.Search.Highlight.Highlighter, QueryScorer and Formatter classes in sitecore.client dll. Which classes and/or functions does Sitecore 7 provide to do highlighting in search results? I searched the web but I could not find the required information/examples. 回答1: Highlighting of results is not supported

How to clean up after Sitecore template “Shared” setting was “packaged” and “installed” and items using this field are unaware

狂风中的少年 提交于 2019-12-11 11:16:55
问题 we faced very specific scenario in our Sitecore enviroment. In our Sitecore we have a item, lets call it "Promotion". Promotion was using "End date" field that was shared. On our dev instance we "unshared" the field. Which naturally triggers the background process that changes the items to use field in unshared mode. Similar process is described here: http://sitecoreblog.alexshyba.com/2011/10/changing-field-sharing-settings-in.html So then we packaged and installed change of "unsharing field"

Sitecore Analytics Robots SessionTimeout causing premature session timeout

醉酒当歌 提交于 2019-12-11 11:13:37
问题 On one of our project we been experiencing random session timeout issues. With recent discovery I've notice that Sitecore Analytics.Robots.SessionTimeout maybe the thing that's causing it. We notice that at random session timeout, the timeout value was set to 1min instead of our 120min. After searching through all the config files we notice only one configuration has timeout set to 1min. We think by increasing the analytics robots session timeout to 120min will fix our random timeout issue,

Sitecore ECM: Can't access Email Campaign Manager

亡梦爱人 提交于 2019-12-11 11:07:29
问题 I installed Sitecore ECM by using the installation guide (https://sdn.sitecore.net/Products/ECM/ECM%202,-d-,2/Installation.aspx). This is what I did: install SPEAK1.O update ConnectionString install ECM2.2 Run Sitecore.EmailCampaing.sql against Reporting DB Published Site After completing these steps, I can see installed rendering items, templates, modules in System, and sample items in Content. However, I can't find any listed "E-mail Campaign" link for Email Campaign Manager in Sitecore

Handling internal links in Sitecore 6.4 cloned sites

徘徊边缘 提交于 2019-12-11 10:28:47
问题 We are attempting to establish a Sitecore 6.4 architecture whereby we clone several sites from a "repository" site. We have addressed many issues regarding data structure, but are left with one key problem: How do we handle internal links within a cloned site? The idea of cloning was to allow local modification of small parts of data, but central editing of the main body of content. Editing directly in a cloned item breaks inheritance from its parent, at least in the field that is edited. But

Multiple TemplateIds not working in Sitecore's Advanced Database Crawler

橙三吉。 提交于 2019-12-11 09:33:25
问题 I have a "Featured" widget to lead visitors to items I want to feature on certain pages. So I'm trying to get Alex Shyba's Advanced Database Crawler for Sitecore to return all the items that refer to the context item. If I put in one template ID, it works fine. But if I pipe delimit the two templates, I never get a result. What am I doing wrong? var searchParam = new MultiFieldSearchParam() { Database = Sitecore.Context.Database.Name, Language = Sitecore.Context.Language.Name, TemplateIds = "

Sitecore ERROR rebuilding “Quick Search Index” after WFFM 2.4 install attempt - System.Threading.LockRecursionException

喜你入骨 提交于 2019-12-11 09:20:11
问题 I attempted to install WebForms for Marketers 2.4 on Sitecore 7.2 Initial Release. The install process would just hang, and never finish. I ultimately restored the databases from a backup, and restored the file structure. However, we started seeing hundreds (1300+ in the last 12 hrs) of these errors in the logs: ManagedPoolThread #11 23:59:31 ERROR Could not update index entry. Action: 'Saved', Item: '{656E306F-8837-42E6-8334-38E44D39B736}' Exception: System.Threading.LockRecursionException