Upgrade of blog engine succeeded

by Damiaan Peeters 12. February 2012 22:23

After running my blog for almost 3 years on BlogEngine.Net version 1.5, I’ve finally made some time to upgrade to the latest and greatest BlogEngine.Net 2.5.  The only difference is that I reactivated comments using Disqus!

So, feel free to send me some comments, or catch me on twitter!

How to understand umbraco better

by Damiaan Peeters 3. January 2012 15:37

Lets give this year a good start with some valuable umbraco tips.  We are now working with Umbraco more than a year as the default choice for every web based project we get. These are my findings on how to get to know Umbraco a little better.

Make a website

How difficult can it be. Right?  Just for exercise.  Don’t use a starterkit.  Add document types (and nest them), add templates, content pages, add razor scripts.  Add a blog or photo album package or create your own scripts or even try some XSLT (as long as you can).  Need something more exotic , create your own DataType.  It gives you the feeling of what you could do with just a little bit of imagination.

Get active on the forum

I am not a regulary forum visitor as I would like to be.  But you should be one!

  • you might be able to answer a question someone asks. 
  • If you don’t know the solution by heart, but you know you can find it, then look it up and post the solution on the forum. First of all you just trained yourself and you helped out someone else not as smart as you  Smile
  • Even if you don’t know the answer to an interesting question, maybe an extra question can help.  And you are notified by e-mail if someone else might know the solution

Don’t forget, be friendly.  It’s one of the core elements of the umbraco community. 

Get a video subscription

It sounds crazy but the video’s really helped me out to understand a few basics.  It might get you started on something you didn’t touch before…

Get certified

Begin of April 2011 my and my partner both got certified. She did a level 1 umbraco certification and I am now umbraco level 2 certified. There are too much core parts you should know.  E.g. members, examine, /base, and many other components.  Easy things you might not dare to touch otherwise.

Even if you don’t need it, get the certification.  You help the umbracoHQ financially.

Get into the source.

E.g. so you use the umbraco.library functions. So have you ever seen the source of this library? Have you any idea where it lives? I bet not, if you never looked at the source.

I don’t want you to be searching for a few hours or start decompiling.  Just visit the codeplex website, click the source and navigate to the right branch (4.7.1, …).  A lot of documentation is added to the functions.

Here is e.g. the direct link to the umbraco.library class on the 4.7 release

Create a package and share it

First of all, by creating a package, you need to create something general.  Useful for everyone.  That means you will need to think about how to extend and how to configure your extention.  You will learn a lot from the cavecats other users will post back. 

Complete the wiki

When I started with umbraco, I didn’t understand umbraco at all. The lack of information on the Wiki was enormous. So I insist, if you find an article with missing, wrong or outdated information. You can and should update the WIKI, that is why it’s called a wiki.

Make your own starterkit

Although the existing starterkits are fabulous, I stopped using them.  We created our own mini starter kit with the necessary document types and templates. We added our own razor scripts which we always configure.  It helped us to create new lightweight websites more easily and quickly.  It helps us to spread the word about umbraco.

Go to events

Events are the place to be to meet some friendly people.  To talk about how to work with umbraco.  To get (free) information and find some interesting Umbraco lovers.

How To: View Facefook events in Outlook

by Damiaan Peeters 21. December 2011 08:05

Open up your facebook profile. Then go to “View All”. 

image

At the bottom you will have a link: “export events” as shown on the screenshot below.  Click this link.

image

A dialog window will open. 

image

Click the link, and your outlook will contain now also your facebook events.

Why Umbraco is not a CMS

by Damiaan Peeters 13. December 2011 15:59

We are working with Umbraco for some time now. The more I use it, the more I like it. 

If you look at Umbraco for the first time, you might be dissappointed.  It has not as much plugin’s as other CMS’s.  (That is until now of course.) In contradiction to what everyone says, my believe is that we cannot call Umbraco a “Web Content Management System”.  Or in short CMS.  I know, they call it a CMS, it looks like a CMS, it smells like a CMS, but it is NOT a CMS. 

Let me look up the definition of a Web Content Management System.

Web content management system is a bundled or stand-alone application used to create, manage, store and deploy content on Web pages. Web content types can include text, graphics and photos, video or audio, and application code that renders other content or interacts with the visitor. WCM may also catalog or index content, select or assemble content at runtime, or deliver content to specific visitors in a personalized way or in different languages. (from wikipedia)

An application you say?

Umbraco is not just an application.  Although, it can be used pretty good as a stand-alone application, it always need some customization.  It contains a very brought base to start from.  That’s why everyone loves it so much.  It can be used as a starting point to build a web application.

Web pages and web content?

Umbraco can be to create, manage, store and deploy a lot more than only web pages.  You can use it as a back-end system for you CRM software.  That has nothing to do anymore with web pages.  If you think about Hive provider in Jupiter (umbraco v5), it’s not too hard to imagine you have a project without a real website but only use the back-end to manage the database.

Index, select and assemble!

That is true.  Umbraco has no difference in this part.  It is a monster in indexing and selecting.  It masters assembling new information very good thanks to Razor, XSLT and Deep .Net integration.  It handles multiple languages.  And you have even packages which help you in personalizing information.  And it goes much further than many other CMS’s with the caching policies, /Base extentions, Events, usercontrols, …)

So what is Umbraco

It has a framework which helps you to DRY (don’t repeat yourself).  It has lots of help what enables to do funky stuff with it. It’s something you use to build web applications on.  I agree, mostly websites.

I call it a Web Platform.

Remove Service Pack on Windows Server 2008 R2 (Compcln)

by Damiaan Peeters 4. December 2011 00:15

So you need to clean some valuble space on your harddrive.  One directory is probably the C:\Windows\winsxs directory which size is very big.  The SxS stands for Side by Side and keeps all dll’s for each version of each program.  (Or something like that…)

If you found on the net already that you need to use the compcln command on your windows 7 or windows 2008.  You are close – but no sigar.  On windows 2008 R2 the tool can not be found because it is part of Windows 2008 SP2. To clean you WinSxS direcory (or at least remove the service pack from the WinSxS) you can use the DISM command instead of complcln.

DISM stands for Deployment Image Servicing and Management tool.  Normally it is used to manage your WIM image, but you can use it on your current windows installation. 

Take care.  You will not be able to uninstall the service pack after you run this command!  It takes some time, so be patient.  I managed to recover 4,5 GB from my WinSxS folder.

C:\Windows\system32>dism /online /cleanup-image /spsuperseded /hidesp

image

I found this forum post on TechCenter to be pretty usefull in search of information on this problem.

Umbraco deployment issues: ClientDependency error gone with debug=true on IIS7 (SOLVED)

by Damiaan Peeters 10. October 2011 13:39

Problem

So you have downloaded the latest Umbraco from (http://umbraco.codeplex.com), created a new database and FTPed it to your webserver.  But the login screen doesn’t look like completely correct.  And if you log in, nothing is working and it doesn’t look right…

If you can identify you problem using the screenshots below, then read on!

image

and after you log in this screen:

image

A “quick and dirty” solution is to open the web.config and set debug=true.  This solves the problem.  To be honest, not even a littlebit – it is a WORKAROUND!  You just turned off a lot of the features that the ClientDependency framework gives you, e.g. SPEED in the back-end.

image

The cause, if you need to believe the forums are the writing permissions. So you probably end up activating the “network service” as app pool owner and giving full control to the application.   But even that didn’t solved the problem.  Otherwise you would not be reading here.

Is you are struggling giving permissions, is advice you to use WebSitePanel, it’s a free .net based control panel.  It creates separate windows users, creates separate IIS Application Pools sets writing permissions for us. 

Cause

It is the ClientDependency handler which is NOT FOUND (404 error).  You can see that if you look into fiddler.  That means that you are missing (combined) JavaScript and CSS files, which are pretty necessary for the Umbraco administration.

image

Solution

Kudos go to a colleague of mine (Raoul of opmaat.be), he has found the solution. 

Probably you are missing a complete section in your web.config file.  For one reason or another this section is missing in the WEBSERVER section.

Locate the System.WebServer section and verify you have a “httpHandlers” section.

image

If you have already added handlers (or installed packages which do so: e.g. imagegen) then copy the handlers section from earlier in your web.config.  Otherwise you find the default webServer.Handlers section below.

<handlers accessPolicy="Read, Write, Script, Execute">
 <remove name="WebServiceHandlerFactory-Integrated" />
 <remove name="ScriptHandlerFactory" />
 <remove name="ScriptHandlerFactoryAppServices" />
 <remove name="ScriptResource" />
 <remove name="Channels" />
 <remove name="Channels_Word" />
 <remove name="ClientDependency" />
 <remove name="SpellChecker" />
 <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
 <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
 <add name="ScriptResource" verb="GET,HEAD" path="ScriptResource.axd" preCondition="integratedMode" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
 <add verb="*" name="Channels" preCondition="integratedMode" path="umbraco/channels.aspx" type="umbraco.presentation.channels.api, umbraco" />
 <add verb="*" name="Channels_Word" preCondition="integratedMode" path="umbraco/channels/word.aspx" type="umbraco.presentation.channels.wordApi, umbraco" />
 <add verb="*" name="ClientDependency" preCondition="integratedMode" path="DependencyHandler.axd" type="ClientDependency.Core.CompositeFiles.CompositeDependencyHandler, ClientDependency.Core " />
 <add verb="GET,HEAD,POST" preCondition="integratedMode" name="SpellChecker" path="GoogleSpellChecker.ashx" type="umbraco.presentation.umbraco_client.tinymce3.plugins.spellchecker.GoogleSpellChecker,umbraco" />
</handlers>

Google Plus is SEO Sometimes you wonder why

by Damiaan Peeters 21. September 2011 23:23

Sometimes you wonder why you should invest into optimizing you website.   And certainly if you have lots of JavaScript on you page.

Let me give an example.  This is what I found in the top 10 results if I search on my name. 

image

You see, even the masters of search might struggle to get their SEO right.  Or is it the Google index failing this time?

Side note: you might wonder why this pages ranks so high.  I guess it’s the strong top domain.

Tags:

Seo

Delete duplicate relations in Umbraco using SQL

by Damiaan Peeters 21. September 2011 09:29

Somehow I got duplicate relations in my Umbraco Relations table (about 120 k).  That’s impossible to clean them up manually, so I decided to remove the duplicates using an SQL statement directly on the database.  

Apparently deleting duplicates is not so hard on newer SQL servers when using Common Table Expressions.  CTE’s are a kind of temporary result sets that can be used within a single statement.  The difference with a temporary table is that it is not stored as an object.

WITH Dublicates_CTE(parentId, childId, Id)
AS
(
SELECT parentId, childId , Min(Id) Id
from umbracoRelation
group by  parentId, childId
having COUNT(*) >1
)

DELETE FROM umbracoRelation
WHERE Id IN (
    SELECT umbracoRelation.Id
    FROM umbracoRelation
    INNER JOIN Dublicates_CTE
    ON umbracoRelation.parentId= Dublicates_CTE.parentId
    AND umbracoRelation.childId= Dublicates_CTE.childId
    AND umbracoRelation.id <> Dublicates_CTE.Id
)

I found the idea of removing duplicates on this blogpost.

Delete all items from recycle bin

by Damiaan Peeters 19. September 2011 22:05

Based on http://our.umbraco.org/forum/developers/api-questions/3550-Delete-items-in-Recycle-Bin but also removes the previewXML, ContentVersions and Relations.

-- Uncomment below to verify the number of nodes returned is the
-- same as the number of nodes that is in the Recycle Bin
-- select * from umbracoNode where path like '%-20%' and id!=-20

delete
from cmsPreviewXml
where nodeid in (select id from umbracoNode where path like '%-20%' and id!=-20)

delete
from cmsContentVersion
where contentId in (select id from umbracoNode where path like '%-20%' and id!=-20)

-- Delete all 'related' nodes and table contents...
delete from cmsContent where nodeId in (select id from umbracoNode where path like '%-20%' and id!=-20)

delete from cmsContentXML where nodeId in (select id from umbracoNode where path like '%-20%' and id!=-20)

delete from cmsDocument where nodeId in (select id from umbracoNode where path like '%-20%' and id!=-20)

delete from cmsPropertyData where contentNodeId in (select id from umbracoNode where path like '%-20%' and id!=-20)

delete
from umbracoRelation  where parentId in (select id from umbracoNode where path like '%-20%' and id!=-20) or
childId in (select id from umbracoNode where path like '%-20%' and id!=-20)

-- delete the XML nodes....
delete from umbracoNode where path like '%-20%' and id!=-20

 

EDIT 2014-08-06

in umbraco v6 you need to run this script a few times (because it's out of order) and include this:

    delete umbracodomains
    --select umbracodomains.*
    from umbracoDomains inner join umbracoNode on umbracodomains.domainrootstructureid = umbraconode.id
    where umbraconode.path like '%-20%' and umbraconode.id!=-20

Tags:

Umbraco

JavaScript editor extension for vs2010

by Damiaan Peeters 4. September 2011 15:41

If you have been developing JavaScript in visual studio 2010 and know you are missing the brace matching and cold folding capabilities. Apparently there is a plug-in supporting these useful features for JavaScript, it’s called the Jscript Editor Extensions.

Many thanks to Katrien De Grave who blogged about it!

Who.I.am

Certified Umbraco Master, Part of Umbraco Certified partner comm-it, .Net and Azure developer, seo lover. Magician in my spare time.

Month List