Urls for sitecore items are generated by the static class Sitecore.Links.LinkManager. In normal use you wont have any issues, but things can get trickier when you step out of a simple scenario.
I’ve had a blog hosted, mostly free, on WordPress.com for a while. I soon found that the ability to paste code, XML or HTML was severely limited by clean-up functions that would strip-out the data whenever I saved or switched between ‘Visual’ and ‘HTML’ views. Continue reading
There isn’t anything new here, more a case of just wrapping up some posts and tying some events together.
Update April 2011: This post and part 2 are now irrelevant for Sitecore 6.x See this post for details of important changes since this post was first published
If you want to duplicate the solution to add to a new source control system.
Whenever using Databound server controls with Sitecore need to be aware that Sitecore meddles with some controls. This nasty issue which can have you banging your head against the wall for hours (days?) has been previously blogged by Mark Cassidy but I guess it depends on what symptom you’re having first, and wether you relate it back to this obscure setting. In my case, I was previously aware of this issue but only relating to apparent loss of viewstate on controls. Unfortunately I didn’t think of it as affecting events too.
In my case most features worked, Edit buttons would invoke row editing mode, cancel button works fine, rowCommand event generally worked, but it wasRowUpdating that simply wasn’t working. Adding System.Web.UI.WebControls.GridView to <typesThatShouldNotBeExpanded> in web.config resolves this issue. your web.config would then look like :
This issue does now have a fleeting mention on http://sdn.sitecore.net/Scrapbook….. but requires login to view it.
While looking for that link, I also came across another blog post detailing the same issue and frustrations I’ve had with Gridview events that may have more detail.
In general ASP.net, this can be caused by calling DataBind() more than once on a databound control. Also be aware that this is influenced by automatic databind being on too.
Relating this to Sitecore CMS, you should be aware that Sitecore ships with the following line in web.config:
<!– AUTOMATIC DATA BIND
Indicates if the data bind function is run automatically
<setting name=“AutomaticDataBind“ value=“false“ />
This means that you will need to either call Databind whenever you need it, or you can simply set this value to true. This AutomaticDataBind setting will also cause problems with other types of databound controls, such as templated controls. It’s generally simpler to set it to ‘true’..
Sitecore v6 introduced another preview tool accessible from [Presentation] > [Preview] as opposed to [Publish] > [Preview]. The new preview mode opens another tab in the content editor which shows the preview of the current item.
This is all fine and well except that it is permanently looking at the web database rather than master database. This can be observed by creating a new item, saving it, and then selecting preview. You get a 404 error, unless you publish it first.
Unfortunately this nice feature is 80% broken and can only be used for looking at published content.
Update: This was a registered bug in February 2009 with a workaround available from Sitecore support, but this still has not been released and I believe the bug still exists in Sitecore 6.1
After installing Sitecore v6, you get the following error when viewing the website or sitecore UI:
Sitecore Could not load file or assembly ‘System.Data.SQLite, Version=22.214.171.124, Culture=neutral, PublicKeyToken=db937bc2d44ff139’ or one of its dependencies. An attempt was made to load a program with an incorrect format.
This is actually detailed in page 20 of the sitecore troubleshooting doc, but I missed it first time round. This is caused by the presence of System.Data.SqlLite in the bin folder when running on 64-bit OS. An alternative dll is available for 64bit OS from Sitecore.
Solution: If you’re are not using SQLite simply the delete the System.Data.SqlLite.dll from the bin folder and recycle your app to get back up and running. If you are using SQLite, download the alternative dll for 64bit OS.