Go to page content

Upgrading to Zotonic 0.5

If you're upgrading to 0.5 from an older release, keep the following in mind.

Although Zotonic is still at a 0.x stage, we try to document the changes along the way for people that want to run the newest release. Upgrading from an older version of Zotonic is not very hard. A lot was changed under the hood, but as far as we could we have tried to kept things backward compatible. However, the following is the list of changes that you'll need to adapt your site to:

  • Some filters disappeared and changed into expression syntax: |eq, |ne, |lt,|gt, |not, etc.:
    {% if id|eq:2 %} becomes {% if id == 2 %}
    {% if id|not %} becomes {% if not id %}
    et cetera.
  • Meaning of hassubject', 'hasobject', 'hassubjectpredicate' and 'hasobjectpredicate' has been reversed:

    m.search[{query hasobject=id}]           becomes
    m.search[{query hassubject=id}]          (and reverse)

    m.search[{query hasobjectpredicate=id}]  becomes 
    m.search[{query hassubjectpredicate=id}] (and reverse)
  • resource_staticfile's root dir has changed from site/templates/xx to site/xx
  • m_group model no longer exists
  • When you first install zotonic and want to logon into /admin, you dont need to give a password, just the username, 'admin'. It will then ask you to set the admin password.
  • user accounts need to be published otherwise their logon will be denied. Use this query to enable every user in the database (thanks, Alain O'Dea):
	update rsc set is_published=true 
	where category_id in 
		(select distinct(id) from rsc where name='person')

  • If you have an overruled base template, make sure that a {% block content_area %} that spans the full width if your site is in there, because this is used to render the logon dialog for the admin.

This page is part of the Zotonic documentation, which is licensed under the Apache License 2.0.