BLOG  ›  2008  ›  5
Salsa - Tanzschule Jakob - Nikolas - Di 27.05.08
Samstag, 31. Mai 2008, Christoph Ertl

Vermutlich aufgrund des tollen Wetters etwas schlechter besucht. Aber wie immer ein super Abend und eine tolle Figur.

Salsa - Tanzschule Jakob - Nikolas - Di 20.05.08
Mittwoch, 21. Mai 2008, Christoph Ertl

Heute war eine Schrittfolge ohne Partner angesagt.

Abschließend haben wir dann doch auch noch paarweise was gelernt. Bin schon gespannt auf die nächste Fiesta, wie viele Damen in der Luft herumgewirbelt werden.

List categories of Umbraco blog
Sonntag, 18. Mai 2008, Christoph Ertl

I'm not sure if I deleted the xslt file or am just kind a blind. But I found nothing providing me a listing of all available categories and their count of occurrence. So here is my solution.

First of all we have to know the id of the data type used for the categories. Execute the following statement against the database and note the resulting dataTypeId.

SELECT dataTypeId FROM cmsPropertyType
WHERE alias =
'categories'

The resulting id (in my case: 1094) is used in the xslt macro to get all predefined values. The macro iterates over all predefined values of the dataType with the id 1094 and counts all nodes of type umbracoBlogPost containing this predefined value.

<xsl:for-each select="umbraco.library:GetPreValues(1094)/node()">
<
xsl:sort />
<
a>
  <
xsl:attribute name="href">
    <
xsl:text>/blog.aspx?filterBy=</xsl:text><xsl:value-of select="current()"/>
  </
xsl:attribute>
  <
xsl:value-of select="." />
</
a> (<xsl:value-of select="count($currentPage/ancestor-or-self::node/descendant-or-self::node [@nodeTypeAlias = 'umbracoBlogPost' and string(data [@alias='umbracoNaviHide']) != '1' and contains(./data [@alias='categories'], current())])" />)

  <br/>

</xsl:for-each>

To get the macro work properly you have to use the id of the dataType as described above and correct the url to point to the page supporting the filterBy parameter.

Salsa - Tanzschule Jakob - Nikolas - Di.13.05.08
Mittwoch, 14. Mai 2008, Christoph Ertl

Danke an Andi für das Video.

Salsa - Tanzschule Jakob - Nikolas - Di 06.05.08
Freitag, 09. Mai 2008, Christoph Ertl

How to change the creation date of an Umbraco CMS node
Freitag, 09. Mai 2008, Christoph Ertl

This is not a common task, that's why Umbraco doesn't support that directly. But sometimes it's useful to correct the creation date of a page to get consistent data.

In my case I moved old blog entries to my Umbraco blog and created posts out of notes I've taken in the past and wanted them both to occur in a correct timeline.

Ok, here we go:

The node ID

First we must know the id of the node we want to change. There are several ways to accomplish that:

  1. In the Umbraco UI move the mouse over the node you want to change and have a look at the URL displayed in the status bar (Internet Explorer).
    It's javascript:openContent(1111) where 1111 is the id of the node. This also works with the toolbar buttons (save and publish) of the content editor.
    At the end we have to publish this node so this is the preferred way.
  2. The other way is to find the node using an SQL statement. The field text represents the name of the node:
    SELECT * FROM umbracoNode WHERE text = 'nodename'
    To get all nodes where the name starts with the word CMS use the LIKE keyword combined with the wildcard character %.
    SELECT * FROM umbracoNode WHERE text LIKE 'CMS%'

Set the creation date

UPDATE umbracoNode
SET createDate = '20080430 18:00' -- see side note
WHERE id = 1111 -- id as evaluated before

This statement changes the creation date of the node but does not affect the rendering of this node. That's because Umbraco renders nodes using an internal XML structure which is generated while publishing a node.

Publish the Node

Republish the node to ensure that the XML structure is generated.
This task could also be done via an SQL statement, but I prefer using the built in functionality of the CMS.

The node now is rendered as expected.

Side notes

  • Using the ISO format for the date value ensures that the Microsoft SQL server correctly handles the value independent of the culture of the server.
    The ISO format is yyyymmdd hh:mm
  • Don't forget to use the owner of your db in the SQL statement
    e.g. SELECT * FROM owner.umbracoNode

Umbraco Upgrade from 2.1.1 to 3.0.3
Freitag, 02. Mai 2008, Christoph Ertl

Yesterday I decided to upgrade the CMS of my website to the newest version of Umbraco to get support for Windows LiveWriter. I used the book  "Install umbraco 3.0 on Windows Server 2003" from the Umbraco documentation page.

If you just upgrade, not all steps are necessary, therefore my steps were:

  • Backup files and database (optional but very recommended ;-)
  • Install .NET runtime 2.0
  • Install MSXML (just to be sure)
  • Install Ajax Extensions (just to be sure)
  • Copy the files to the webserver (change settings in web.config according to the old web.config)
  • Change the website in IIS to use .NET Framework 2.0
  • Set up umbraco from the web browser

That was easy und worked fine, but after checking the webpages I found two errors:

1.Error parsing XLST file

At the page displaying blog posts I got the following error:

"Error parsing XSLT file: \xslt\DisplayCategories.xslt"

and at the post page itself

"Error parsing XSLT file: \xslt\WordpressPosts.xslt"

The solution can be found here. Just a small correction in the javascript part and all works fine.

2.Failure when storing the xslt file via web interface

When I then started to change my blogs appearance I got the following error when storing the xslt file:

"FAILURE[object Object]"

Error Dialog

That failure was caused by an ownership permission problem. In my case I assigned permissions to the NETWORK user and everything worked fine. A detailed post about that problem and the solution can be found here.

Hosted by i.team med gmbh | Powered by Umbraco