I’ve had a pretty frustrating few hours today where TeamCity appeared to be very slow pulling from Git. I removed the VCS root and added it again, changed from HTTPS to SSH after which point it couldn’t even seem to pull anything from BitBucket.
After a bit of searching around I finally found my answer on stack overflow here – http://stackoverflow.com/questions/18766875/teamcity-getting-stuck-at-updating-sources-on-one-git-repo
By default TeamCity will only pull files <= 128mb. To change this you need to create an internal property that increases the size.
Create a new file in <Team City Data Directory>/config/ folder (c:\ProgramData\JetBrains\TeamCity\config by default) called internal.properties. Inside this file put the following:
In my previous Sitecore MVC post I showed how to create the menu for my sample website using a View Rendering. Now I’m going to turn that into a Controller Rendering in order to highlight the menu item for the current page.
This is my second Sitecore MVC post following on from Creating your first Sitecore MVC website. In this post I’ll extend what was built in that post to create a dynamic menu using a View Rendering.
In my last post I wrote about setting up your Sitecore solution. I’m now going to extend that to creating your first Sitecore MVC website. This post will build upon the solution created in my other post using TDS and code generation. I’ll keep this post just to the basics of getting the site up an running and then will write further posts to cover the different areas of Sitecore MVC.
In this post I’m going to set up a new Sitecore solution with TDS. I’ll then enable code generation to create glass mapper compatible objects.
Sitecore uses log4net for logging. If you want to write to the log in your own code just use the following.
Sitecore.Diagnostics.Log.Error("Error message", exception);
In Sitecore there are two types of binding, static and dynamic. Static is when you use the Sublayout web control directly in your layout and specific the sublayout you want to use. Dynamic binding is when you use a Placeholder web control and set the sublayout that will appear in that placeholder in Sitecore via the placeholder key. When using dynamic binding you can give your sublayout a Parameters Template and set parameters in Sitecore, but how do you set parameters on a sublayout using static binding?
I’ve been playing around some more with Twitter Bootstrap and MVC and wanted to create a top level menu where the active class was added automatically to the item corresponding to the current page. Initially I had an action link inside the list item tag, but as the active class needs to be added to the list item so I decided to create an extension method to generate the entire item for me.
Over on my MongoDB C# Tutorial Richard asked how you would prevent multiple users from updating the same document. In this post I’m going to update the project in the tutorial to support this.
In my blog example this issue could occur when user 1 clicks to edit a post. While editing, user 2 also edits the same post. User 2 finishes their edit before user 1 and saves the post. User 1 continues editing and saves their changes. User 2′s changes are completely overwritten and neither user has any idea that it happened.
In this implementation, based on the above scenario I’m going to display an error to user 2 to tell them somebody else has updated to the post. They won’t be able to save their changes and it would be up to them to reload the post and make their changes again. Of course you could do something much more exciting, like show the two versions side by side and allow the user to merge the changes.