Light-weight, fast, simple and powerful!

Releasing Wolf CMS 0.8.0

Hi there!

We’ve just released version 0.8.0 of Wolf CMS. This release introduces some changes to the core’s Record class which should be backwards compatible and has a number of fixes for bugs which should enhance stability and security. It also has the latest version of the translations that were available at our Transifex project at the time of release.

Remember, all of our translations are available at our project page. You can get the bleeding edge of translations there.

This release includes:

  • Added BETA feature: automatic find methods
  • Added Record::find()
  • Added Record::findById()
  • Added Record::findOne()
  • Added AutoLoader::register() to register the autoloader on the SPL stack
  • Fixed bugs related to Node::registerMethod()
  • Fixed input validation on Gravatar helper
  • Fixed duplicate username issue
  • Fixed Snippet add, delete, edit permissions issue
  • Fixed Snippet redirect url issue
  • Fixed issue allowing non-admins to set ‘is_protected’ setting on Page
  • Fixed issue with editing .html files using FileManager plugin
  • Fixed issue clearing cookies after logout
  • Fixed issue with unused Tags lingering in DB
  • Fixed use of deprecated pref_replace in Kses helper
  • Changed children() and childrenOf() page ordering to ‘page.position ASC, DESC
  • Updated jQuery to 1.8.3
  • Updated MarkItUp to 1.1.14
  • Updated translations to latest versions
  • Removed legacy (Prototype) JS functions
  • Minor fixes & cleanups

Where to get it

Just go to our download page or download the files from the “master” branch in GitHub.

Introducing new find..() methods to core’s Record class

In this release we’ve been changing the Record class quite a bit, including introducing a new, more generic Record::find() method and adding two new default methods: findById() and findOne(). The latter two are fairly self-explanatory but with regards to the first we’d like to give a short insight:

// give it a path
$page = Page::find('/the/path/to/your/page');

// or an array of options...
$page = Page::find(array('where' => 'created_by_id=12'));

The some of the basic options that can be supplied in the array include “where”, “order”, “offset” and “limit” among others.

Automatic find..By..() methods

This release introduces a BETA feature in the core’s Framework that can be of interest: automatic find..By..() methods. This feature introduces a Finder class which extends Record. Developers who are tired of writing custom find..By..() methods for their models can now extend the Finder class instead of the Record class. This allows them to use find..By..() methods without writing them.

For example:


class MyModel extends Finder {
    public $id;
    public $email;
    public $name;

$obj = MyModel::findByName('Peter');
echo $obj->name;

// echo's "Peter"

// Less trivial example: find users with same name
$objects = MyModel::findIdNameEmailByNameOrderedByIdAsc('mike');

Simply use a non-existing find..By..() method and it’ll respond. Try it out and let us know what you think! Please keep in mind that the implementation still needs some improvements, including performance, and once we start requiring PHP 5.4, this will likely switch to being a Trait.

Advice and Upgrade Notes

  • Make sure to read docs/updating.txt in the download!
  • If you are having problems after upgrading, make sure to disable all plugins and then re-enable each plugin one by one to make sure the problem isn’t being caused by a plugin.
  • If you see “MISSING_DEFAULT_STRING”, it means that no “translation” was found for a string in en-message.php This is most likely caused by either a missing translation string or a missing en-message.php file for a plugin. Please check with your plugin’s authors if they have included that translation file or add it yourself.

Show your support

We sincerely hope you like what we’ve given you with this latest release. If you do, consider supporting the project by contributing financially.

Contribute financially to help out with our budget.

— Martijn

Copyright 2010 / design by yello studio / Wolf CMS Inside