Friday, 11 April 2014
HTTPS Redirect Umbraco Package Infinite Redirect Loop
Monday, 31 March 2014
Umbraco css folder always modifying files in background without me touching them
I thought this was Umbraco and because I had my style sheet linked to the rich text editor datatype, but it turned out to be the uSync package. I was synchronizing Stylesheets so by turning this off in the uSyncSettings.config file this stopped the problem. I don't need uSync to manage these files for me.
Umbraco Relationships Datatype
Vizioz Relationships Datatype for Umbraco
Wednesday, 19 March 2014
Umbraco fails to Publish! We get an exception within a load balanced environment.
This was the error:
ERROR Umbraco.Web.UmbracoApplication - [Thread 36] An unhandled exception occurred
System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.TypeInitializationException: The type initializer for 'umbraco.presentation.cache.dispatcher' threw an exception. ---> System.NullReferenceException: Object reference not set to an instance of an object.
at umbraco.presentation.cache.dispatcher..cctor()
--- End of inner exception stack trace ---
at umbraco.presentation.cache.dispatcher.Refresh(Guid factoryGuid, Int32 Id)
at umbraco.library.UpdateDocumentCache(Document doc)
at umbraco.cms.presentation.editContent.Publish(Object sender, EventArgs e)
at System.Web.UI.WebControls.ImageButton.OnClick(ImageClickEventArgs e)
at System.Web.UI.WebControls.ImageButton.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.HandleError(Exception e)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
This seemed to be an error with the distributed call from server 1 to server 2 in the load balancer.
- First I thought it might be a rewrite rule in \config\UrlRewriting.config - it wasn't
- Then I recycled the app pools - this didn't help
- I then made sure I could access the Umbraco web service on both servers:
- http://serverip1/umbraco/webservices/CacheRefresher.asmx - worked
- http://serverip2/umbraco/webservices/CacheRefresher.asmx - worked
- I disabled distributed calls and then Publish worked, but this wasn't a solution
- Finally the solution was due to incorrect config in \config\umbracoSettings.config. I somehow didn't have the <user>0</user> tag:
Wednesday, 12 February 2014
Umbraco render macro within macro
public static string RenderMacro(string alias, int nodeId, Dictionary<string string=> parameters)
{
var macroEngine = new RazorMacroEngine();
var macro = new MacroModel();
macro.ScriptLanguage = "cshtml";
macro.ScriptName = alias + ".cshtml";
foreach (var parameter in parameters)
{
macro.Properties.Add(new MacroPropertyModel(parameter.Key, parameter.Value));
}
return macroEngine.Execute(macro, new umbraco.NodeFactory.Node(nodeId));
}
This is the code that wasn't working:
umbraco.library.RenderMacroContent(string.Format("</?UMBRACO_MACRO>", alias, args), model.Id)
Thursday, 28 February 2013
Duplicate trees in Umbraco CMS after uninstalling uComponents
Wednesday, 23 January 2013
Umbraco drop down list prevalues using razor
http://blog.dampee.be/post/2012/04/15/Get-a-prevalues-dropdownlist-in-Razor-(umbraco)-for-a-datatype.aspx
Monday, 14 January 2013
Umbraco "Oops...the installer can't connect to the repository!"
I had all the correct permissions on my website folder but it was still failing to display when visiting my dev URL setup in IIS.
The solution was to add the same user/group for the website folder to the C:\Windows\Temp folder. Umbraco was failing permissions trying to access this folder.
Hope this helps someone.
Wednesday, 23 March 2011
Setting the first clause in a Lucene query to a SHOULD clause using Umbraco Examine
Wednesday, 9 March 2011
Manual Umbraco Setup
Setup Umbraco Development Environment
Technologies used:
· Visual Studio 2010
· IIS7 (using hosts file)
· Tortoise-SVN
· Windows 7
· Umbraco 4.6.1
· SQL Server 2008 (management studio)
· .NET 4.0
Get Umbraco
1. Download the version of Umbraco you want from http://umbraco.codeplex.com/releases/view/59502
2. Create an Umbraco folder on your computer where you will extract the files to e.g. C:\Development\Umbraco\4.6.1.
3. Copy the downloaded file to C:\Development\Umbraco\4.6.1 and once there right click on the zip file and select Properties. Under the General tab click Unblock and then Ok.
4. Unzip the files here. They will be extracted into sub-folders but you need to copy the actual files under the build folder into C:\Development\Umbraco\4.6.1.
5. Delete the sub folders generated by un-zipping.
6. Add NetworkService user to C:\Development folder with full permissions.

7. Click the orb in Windows 7 and type %SystemRoot%\system32\drivers\etc\ into the search textbox and open the folder.
8. Locate the hosts file. This file must not have a extension. Open this file.
9. Add a new entry with the IP 127.0.0.1 (localhost) and space and then your site name e.g. fuelcelltoday.local.
10. Save the file.
11. Click the orb in Windows 7 and type cmd. Once the command line window has opened type ping fuelcelltoday.local and hit enter. If you get a reply then you site is setup correctly.
SQL Server 2008 setup
12. Open SQL Server 2008 Management Studio.
13. Add a new database called e.g. FuelCellToday. This is the database Umbraco will use.
14. Add a new login e.g. fuelcelltoday/password
15. Add a new user e.g. fuelcelltoday/password
IIS7 setup
16. Open IIS7 and right click on Sites then select Add Web Site.
17. Add the site name e.g. FuelCellToday.
18. Point the physical path to C:\Development\Umbraco\4.6.1.
19. Add the host name you chose e.g. fuelcelltoday.local
20. Click Ok.
21. Click on the Application Pools. Right click the application pool created for your site e.g. FuelCellToday and select Advanced Settings.
22. Change the .NET Framework Version to v4.0.
23. Make sure Managed Pipeline Mode is set to Integrated.
24. Set the Identity to NetworkService.
25. Set Load User Profile to False.
26. Click Ok.
Install Umbraco
27. In your browser open the new IIS site URL e.g. http://fuelcelltoday.local.
28. Walk through the Umbraco setup and make sure you select the database we created above. You will also be able to create an admin Umbraco user login during this process. It’s very simple step-by-step process. Once this is done the Umbraco tables will be installed to the database.
29. Test you can login into the Umbraco admin section e.g. http://fuelcelltoday.local/umbraco/umbraco.aspx
30. Test you can see the Umbraco default screen e.g. http://fuelcelltoday.local.
Create SVN repository using Tortoise-SVN
31. In your SVN provider create a new repository e.g. FuelCellToday. Copy the URL created.
32. Create a new folder where the web application will live e.g. C:\Development\Websites.
33. With Tortoise-SVN Checkout the SVN repository here so a new folder is created link to SVN e.g. C:\Development\Websites\FuelCellToday.
Setup Visual Studio 2010 solution
34. Open Visual Studio 2010 and create a new ASP.NET Empty Web Application project. I keep the solution file in the root so I uncheck Create directory for solution option. It’s up to you. Select the folder location you wish to create your project e.g. C:\Development\Websites\FuelCellToday.
35. Copy all the files and folders from the Umbraco folder e.g. C:\Development\Umbraco\4.6.1 to this new website folder. Overwrite any of the files generated by the application with the files from Umbraco folder.
36. In Visual Studio click the Show all files icon in the solution explorer and then Include all the folders and files you just copied into the solution. This might take a while.
37. Build the solution to make sure everything is in order.
Add files to source control using Tortoise-SVN
38. The following files/folders must be ignored. This is so we can easily copy newer versions of Umbraco to this folder and not files that aren’t needed to be under source control:
a. App-Code
b. App-Data
c. bin
d. data
e. install
f. obj
g. python
h. umbraco
i. umbraco_client
j. *.user
k. *.sln
l. *.suo
39. Commit the folder using Tortoise-SVN.
40. Build the solution.
41. Point IIS physical folder to the new website folder e.g. C:\Development\Websites\FuelCellToday.
42. Check the site URLS work e.g. http://fuelcelltoday.local.
New developers
43. Create a checkout folder and download the SVN code e.g. C:\Dev1\Webistes\FuelCellToday.
44. Download Umbraco and unzip files, then copy them into the website folder.
45. Open Visual Studio 2010 and select Open Web Site and select the new folder e.g. C:\Dev1\Webistes\FuelCellToday.
46. Setup IIS as explained above to point to the new folder.
47. Open the site URL.
Sunday, 16 May 2010
Umbraco bug with deleting data types
Node node exists with id '1609'.
After a lot of searching it seems Umbraco did not delete a record in cmsPropertyType with the dataTypeId = 1609 - the data type I deleted. After deleting this record I could modify the document type without getting an error.






