Monday, December 15, 2008

New reCAPTCHA release for eZ Publish

Thanks to Łukasz Serwatka for pointing out some issues with JavaScript in IE7. I've applied the patch and released new versions for both eZ 3.x & eZ 4.x both on the contributions section of the main site and at

It's pretty old news now but the reCAPTCHA extension won the "Contribution of the year" at this years eZ Awards! A little embarrassing to tell the truth, given that the extension simply exposes the reCAPTCHA system which does all the hard work.

If you use the extension please drop a comment on the blog and link to your site. It's great to win awards but even better to see the extension in action.

Monday, December 08, 2008

eZtip: Character Encoding in Templates

Idea (by annais)Recently I was working on a multilingual site and had to add some static text in a number of languages. I added the supplied text and then viewed the resulting page. Having previously lost many hours of my life to dealing with character encoding issues I momentarily regretted I'd gotten out of bed when confronted with mess that was before me.

Quickly regaining my composure I realised that eZ Publish must be doing the transformation and with a bit of digging I discovered that by default templates are seen by the system as being in iso-8859-1 and are converted into utf-8 for display.
In my case eZ Publish was doing what it was told and converting the already utf-8 characters in utf-8.

There are 2 options for telling eZ publish the character encoding of a template. Firstly you can configure eZ publish that all templates are utf-8 by editing template.ini.append.php in overrides for the entire site or your specific siteaccess to limit the effect.

# The charset to use if no charset is specified in the template

The other option is to specifically indicate a template as being encoded using utf-8. This involves adding the following line to the top of the template.

{*?template charset=utf-8?*}

In end I utilised the latter method. As I was making a small change to a large site that I was not familiar with, the specific method allowed for the change to be limited the effected template only.

I must admit I was surprised that these defaults are in place, given that eZ moved to a Unicode default some time ago. From the comments on this issue it would appear that concerns about backward compatibility are the reason that the default remains iso-8859-1 while the output is set to utf-8. I do wonder what effect this has on performance though.

Wednesday, November 12, 2008

Read about French eZ Developer day with Google Readers inline Translations

There is a wonderful French eZ publish community and many of the members blog. In the past keeping up to date with these has been a quite painful and involved passing the link through an online translator.

Yesterday I read an announcement that Google have added automated translations to their online RSS reader product, Google Reader. Now reading these blogs is as simple as adding the feed and selecting "Translate into my language" from the feed settings options.

I discovered this great new feature at the same time that I read Damien Pobels post pointing out summaries of the eZ Developer day recently held in Paris:
Gauthiers post mentions that there is an International eZ Publish Developer day to be held in Barcelona on January 29, 2009. Can't find anything on the eZ site though.

Tuesday, November 11, 2008

eZtip: Errors can be misleading...what happens when the DB is dead

I recently received an email from an eZ community member stating after an abnormal system reboot that their working eZ Publish install was reduced to responding with "Error / kernel (1) Access denied"

My suspicion was that there was an issue with the database. More than likely it had not successfully started when the system was brought up again.

I tested this theory by stopping the database in my local development environment and accessing the associated eZ Publish site. Manually editing the settings/siteaccess/eng/site.ini/append.php to turn on debugging confirms the problem and gives an insight into what is happening:

Warning: PHP
mysqli_connect() [<a href='function.mysqli-connect'
(HY000/2002): Can't connect to local MySQL server through socket
'/var/run/mysqld/mysqld.sock' (2)
in /var/www/ezpublish-4.0.0-ezwebmin/lib/ezdb/classes/ezmysqlidb.php
on line 132

Error: eZMySQLiDB
Connection error: Couldn't connect to database.
Please try again later or inform the system administrator.
Can't connect to local MySQL server through socket
'/var/run/mysqld/mysqld.sock' (2)
One of the main concepts of eZ publish is that there is always a user associated with an access. If a specific user is not logged in then the special "anonymous user" is utilised. The anonymous user exists and must be retrieved from the database so that the roles that are associated with it can be access and the permissions system can determine if the user has access to the requested resource.

User not found, returning anonymous
Anonymous user not found, returning NoUser
Because the database is not accessible the Anonymous user cannot be retrieved so the system creates a "dummy" eZUser object (NoUser) and returns that. (This behavior can bee seen in the eZUser:instance method in kernel/classes/datatypes/ezuser/ezuser.php)

As NoUser does not exist and has no role information associated with it, not that any could be retrieved, the system responds with the access denied message.

Now I'm sure that at some point eZ Publish raised an error on database connectivity issues instead of attempting to continue. Having a poke through the source code I found kernel/error/errors.php contains:

No database connection

Interestingly this constant doesn't appear anywhere else within the source. I wonder why it is no longer used?

As eZ Publish is pretty much useless when database access is not present the system should raise a specific DB error error when access cannot be established. (Of course this could be overridden for each siteaccess). At the very least this would give the site owners a better indication of where to start looking for solutions.

I've raised an issue here. I can't think of any reasons why this isn't a good idea.

Update: The Admin siteaccess does display a the following error when the DB is not accessible:
  • No database connection could be made, the system might not behave properly.
Hat tip to @andrewduck. Will have to investigate...

Wednesday, October 29, 2008

eZtip: Get the current siteaccess from template

I'm currently working on a multilingual site and had to use the name of the siteaccess in the template code. Easy I thought...well it took quite a while to find.


$access_typearrayThe name of the siteaccess (as "name") and the ID number (as "type") of the access method that was used (1=URL, 2=Host, 3=Port).

Adding {$access_type|attribute(show,2)} to the pagelayout.tpl template will give the following:

name string 'ezwebin_site'
type integer 2

The siteaccess used to serve the current page is accessible via $

Wednesday, October 15, 2008

French version of "10 Tips for New eZ Publish Developers"

Some days I absolutely love the internet and the possibilities it enables. Today I got a real buzz when I leaned that Clochix has created a French version of my previous post, "10 Tips for New eZ Publish Developers". It doesn't appear to be a straight translation and contains additional thoughts on most of the points.

What Clochix does point out is that many of the tips could apply to most applications, and he's 100% correct on this. Many of them are common sense. Trouble is that time and time again I've see projects (and not just eZ projects ) that don't "follow the rules". Sometimes it's good not to assume that people know and to state the basics!

Thursday, October 09, 2008

10 Tips for New eZ Publish Developers

1/365 [dazed & confused] (by PhotoJonny)We've all been there, starting out with a new product and not knowing where to begin. Below are my top 10 tips for new eZ publish developers.

  1. Read the install documents and make sure your system meets the requirements before beginning. eZ Publish has some hefty needs in terms of memory limits and timeouts that may not be set at recommended levels in some PHP setups. Not having these values set to acceptable levels will impact on a successful install.
  2. Don't modify the core distribution. Just don't, no matter how tempting it is. There is no need to modify any files that come as part of the eZ Publish distribution. This will save you losing any changes when you upgrade.
  3. Understand the basics. eZ Publish doesn't store content in straight database tables like other Content Management Systems. Read the documentation and understand the content model. eZ Publish is all about content objects arranged in a tree, not data stored in tables.
  4. Debugging holds the answers. If something is not working as expected turn on debugging and check the output. Most times the answer or a pointer to what is wrong will be found in the debug output. Check the Web Server error logs for issues as well. If this still doesn't help, clear the caches and try again.
  5. Use the Community. If you still have trouble, use the forums. There is a great developer community around eZ publish and they are usually happy to help.
  6. Provide enough information. Include as much information as possible in your forum post. Include a detailed explanation of what you are attempting to achieve, what is or isn't happening, code samples, specifics of your setup and debug information.
  7. Don't "force" it. If something seems overly difficult it usually means that you aren't approaching it in an optimal way. As with most things there are several ways to achieve the same outcome, some better than others. Ask the community for help (see above).
  8. Comment your code. Before you start to write any code (templates, PHP, settings) describe what you are going to achieve in a comment. This will not only help you focus on what is required but serve as documentation for anyone who has to work with your code in the future. Remember this may be you in 6 months time.
  9. Write readable code. Follow a coding standard. eZ have a number for various aspects of the system: Templates, PHP & SQL. There used to be a PDF eznetwork_development_guidelines.pdf up on the eZ site that contains all this info and more but it longer exists - eZ people can this go back? If you are interested email me/comment for a copy.
  10. Plan ahead. Document what you are going to do before starting. This doesn't have to be elaborate or time consuming but will save you time in the long run as well as providing a guide to how the site was put together. I've found that the absolute basics are a sitemap, and a list of content types, their views and how they are applied in the site.
What do you wish someone had told you when you first started using eZ Publish?

Friday, October 03, 2008

Web Directions South 08 - Day 1

I'm been meaning to attend a Web Directions Conference since they started but it always clashed with other commitments.

This year I made the trip to Sydney for Web Directions South 08 and it was well worth it. Web Directions always provides a great program of both international and local speakers as well as a fantastic bunch of attendees.

As with most conferences there were a number of parallel sessions and often the choice of which to attend is difficult. On the first day I attended mostly technical sessions, which in retrospect was probably a mistake.

This is a run down on the sessions I attended on day one.

New media - new business

Lynne D Johnson presented the opening keynote which covered how various generations interact with of new technologies and what this means for traditional media providers. The content of the session was perhaps aimed at a less "online" savvy crowd but got interesting when examples and case studies came out. Some interesting ideas where raised regarding the mix of social networks as a means of getting the audience to engage traditional media.

Lynne's keynote (by Halans) Lynne presented a bunch of stats and one interesting fact came out for me and that was: The younger demographic assume what they put online is public unless specifically made private while older generation is the opposite.

The session finished up talking about the future of traditional media and concluded that there would be a decline in the demand and production of newspapers, books and magazines due to increasing online consumption. However print would not die out but become a niche market, with smaller print runs and increasing in cost.

The session has some interesting points but mostly missed the mark with the Web Directions crowd. Would have loved to hear more of Lynnes' experience as Community Director at

Start Using Web Vector Graphics TodayWebjam 8 - Bar Broadway - Sydney (by Charlie Brewer)

Dmitry Baranovskiys session started out giving an overview of the various web vector graphics technologies that are currently available in browsers, SVG, Canvas & VML and then introduced his Raphaël JavaScript library.

Raphaël is quite impressive as it allows you to create cross-browser vector graphic using JavaScript. Current supported browsers are Firefox 3.0+, Safari 3.0+, Opera 9.5+ and Internet Explorer 6.0+ as well as the iPhone & iTouch.

Raphaël has been on my list of things to check out for some time and this engaging talk pushed it up the list.

From disordered to managed usability in an Agile environment

Teale Shapcott gave a presentation about Agile methodologies utilised at Suncorp and the benefits (and challenges) of introducing usability into the production cycle. This was a great talk, providing many "real world" issues and solutions.

Teale is presenting what looks to be a similar talk at the Brisbane Web Design Meetup on October 9. Well worth attending even if you saw the WDS08 presentation!

Javascript libraries - Putting the cross in cross-browser compatible

Web Directions South (by CannedTuna)This session was a "compare and contrast" of a number of popular JavaScript libraries, as well as raw JavaScript. The session was chaired by Craig Sharkie, with Earle Castledine representing jQuery, Ben Askins Prototype/Scriptaculous, Jason Crane YUI, and Cameron Adams writing JavaScript from scratch. Each panel member introduced their library and then presented solutions to problems that had been posed by Craig.

It became quite clear very quickly that:
  • Using a library saves for a bunch of time. One problem took more than a day to do from scratch while all the library users achieved most solutions in less than 15 mins.
  • Libraries work across most platforms, achieving this in raw code is hard.
  • Most panel members actually use jQuery.
Nothing shocking there!

Although the panelists were quite entertaining the session got a bit repetitive (2 hours worth), with the library panelists presenting their minimal solutions (most one liners) and wading through the raw JavaScript version.

The session ended up with each panelist presenting a "free" exercise using their assigned library. The highlight of which was the remarkable Man in Blue's raw JavaScript sequencer.

Predicting the Past: Emotional Design and a Vision for Microsoft Surface

WDS08 (by Halans)August de los Reyes presented the closing keynote for day one and had some very interesting points on the part that emotion plays in design. However the talk was interspersed with a 2+minute Seinfeld clip (made a good point but was too long) as well as several Microsoft "marketing" clips, that seemed a little out of place. They presented a vague "Minority Report" future and left me feeling that I was being marketed to. This really detracted from the excellent research and ideas that August was talking about.

I found it hard to link the promise portrayed in the videos to what I saw in the Surface table at the Microsoft stand, especially in this day of portable connectivity. The Surface interface is impressive, I guess the table top arcade style casing makes it seem like something of that era and not of the future.

Day One Wrap

The thing I love about conferences is that you get to meet a bunch of great people and hear plenty of exciting ideas. Web Directions is no exception.

In hind site I probably would have skipped Dmitry's vector Graphic talk for Derek Featherstones Accessability beyond compliance talk. I also would have given the JavaScript comparism talk a miss and attended Hurol Inans session "Informing experience architecture with quantitative insights"

After the closing there were drinks and nibbles and then it was on to WebJam8.

Day 2 to follow....

Thursday, October 02, 2008

How to you handle Revision Control for eZ Publish Projects?

Ch-ch-changes (by TW Collins)
Revision control systems (RCS) play an essential part of any software development process. One reason for using a RCS is to enable applications to be rolled back and deployed from a known point in time. Due to the nature of eZ publish it's difficult to capture all changes in the RCS and this often leads to the requirement of manual adjustments when changes are deployed.

An eZ publish project is made up of a number of elements that are stored either on the file system or in the database. The database not only stores the site's content but also a number of "configuration" items, such as roles & policies, content class & workflow definitions, RSS feed configurations and URL translations (I'm sure there are more).

Another scenario where this feature will pose an issue is if you use a node override to utilise a specific template for a particular node. In this case the entry in override.ini relies on a specific node_id to link the template to the node. It's unlikely that the node_id of the development system will match the live system and the deployment will fail. Roles and policies will also suffer from this issue as they are reliant on content e.g. applied to a specific node subtree or applied to a user group.

These configuration items play an important role in a correctly functioning eZ Publish site. The reliance of configuration information stored in the database makes it difficult to capture this information in revision control in a way it can be automatically deployed or rolled back from the RCS.

Earlier this year Jérôme Renard published an great article entitled Using Subversion with eZ Publish that touched on this point, suggesting that some tables can be exported from the database and the resulting dump included in the RCS. While this would work ,it relies on the developer remembering to do it when changes are committed. It aslo means that the specific configuration changes are not captured in the RSC with any associated file changes. i.e. It's not easy to look at the diff from the previous commit and see what changed.

I suspect that eZ Publish is not the only platform effected by this issue. While not the exact problem, Ruby on Rails solves a similar issue though use of migrations where database changes for both the update and reverse it are stored in files and applied programatically.

How to you address this issue this for your eZ Publish projects? Database dumps? The eZ package system? Home grown scripts? Something else?

Tuesday, September 23, 2008

FriendFeed Room for eZ Publish

I've been playing with FriendFeed for a little while and today setup an eZ Publish room. FriendFeed is a content aggregator that is primarily targeted at "friends", but several projects have been using it at a convergence point for information.

In their own words:
FriendFeed enables you to keep up-to-date on the web pages, photos, videos and music that your friends and family are sharing. It offers a unique way to discover and discuss information among friends.
I've primed the room with RSS feeds from eZ Planet, the site, eZ Projects and a twitter search for "ezpublish" like terms.

Feel free to join and contribute, or simply add the RSS feed of the room to your reader and follow a bunch of eZ news from the one feed.

Friday, September 19, 2008

OpenID for eZPublish

Earlier this year I was investigating OpenID and decided to attempt to integrate it into eZ Publish. I got most of the way before I realised that the amount of existing code I had to replicate meant that the maintenance of the extension would be a nightmare.

After discussions at the eZ Developer Day I decided to upload the source to and invite anyone interested check it out. If you want to contribute feel free to add yourself to the group.

The extension uses the PHP OpenID Library by JanRain. The version of the library used in the extension is 2.1.1. In future I plan at evaluating the use of the eZ Components OpenID Authentication module.


The extension provides the following features:
  • Login using OpenID
  • Register Using OpenID
  • OpenID URL management
Both the OpenID Login and User Registration work in parallel to the existing systems, allowing users to login & register in a regular manor. The templates have been created for the admin & ezwebmin interface. The login screen will show the original as well as the OpenID login.

Clicking on the OpenID Register button will authenticate the user via the entered OpenID URL, retrieve some details from the OpenID profile and present the user with the registration form. Once the registration is processed the authenticated OpenID URL will be associated with the account. The user registration process has had the least testing.

The OpenID account management allows users to add and remove OpenID URLs that are associated with their account. The interface is available via a tab in the admin interface. Currently there are no ezwebmin (front end) specific templates.

The extension assumes you have an installed Website interface and works with eZ Publish 4.x.

Installing the OpenID extension

To use the extension, grab it from svn. From the extensions directory run

cd extension/
svn co openid

and enable in the usual manor.

Create the table the holds the link between the OpenID URLs & the eZ users:

mysql -u[user] -p [database] < sql/openid.sql

Clear caches.

Create an OpenID account

If you don't already have an open ID account get yourself one. I've used ClaimID, but there are plenty of other options. I've also used MyOpenID, SignOn and Sxipper which also has a great firefox identity/password manager add on.

Register an OpenID URL via Admin Interface

If the OpenID extension has been installed correctly you should see a OpenID Tab in the admin interface.

Clicking on the OpenID tab should produce a screen like:

You can now enter your OpenID URL into the field and click on "Register New OpenID" The extension will go off to the provider and ask you to authenticate. Once authenticated you will be asked if you want to:
  1. Login - Authorise login once
  2. Login and Trust - Authorise login for this and subsequent accesses
  3. Cancel - Don't authorise login
Choosing the either of the first two options will allow the OpenID URL to be registered against the currently logged in user. Choosing the "Cancel" option will result in the registration failing. (Note: These specific options are ClaimID specific. Other providers will have similar functionality but it may be presented differently)

You should be able to logout and log back in using the registered OpenID URL. If you have previously loged in and trusted the site you will not have to enter your password.

Register a new user with an OpenID URL

Users are able to register using their OpenID URL from the login form. Entering an OpenID URL and clicking on the register button will pass the user off to the OpenID provider to authenticate and trust the site. Users will be asked if some of your persona information can be passed back to eZ Publish to prefill the user registration form.

The persona information is quite specific and currently only the email address is used. The mapping of the availiable persona information to the eZ user is one area that would benefit from work.

Once authenticated the user is able to progress with the regular user registration process. once completed the user will be able to login using the registered OpenID URL.

The user registration process has not been fully tested.

Future of this extension

This extension was put together as a working prototype and as such is quite rough around the edges. It requires quite a bit of the existing user module & associated templates to be replicated and this makes it a pain to maintain.

The user authentication components of eZ Publish are not constructed in a way that makes it easy to implement OpenID style authentication systems. I hope and suspect that future versions of eZ publish will address this.

I may work on the extension from time to time but am unlikely to spend any real time on it in the near future. If you are interested feel free to signup as a project member, or contact me directly.

There is an existing Open Funding suggestion for OpenID support that may provide a means for getting OpenID support into eZ publish.

Friday, June 13, 2008

Micro-blogging the eZ Conference

For those who haven't heard of "Micro-blogging" wikipedia defines it as:
Micro-blogging is a form of blogging that allows users to write brief text updates (usually less than 200 characters) and publish them, either to be viewed by anyone or by a restricted group which can be chosen by the user. These messages can be submitted by a variety of means, including text messaging, instant messaging, email, MP3 or the web.
Twitter is currently the most popular micro-blogging service but can have reliability issues (these have been addressed recently). I've been using it for a couple of months now. It can be a bit of a time suck especially if you follow frequent tweaters. I've found it a good way to keep track of what friends, the web industry & eZ people are up to, pose questions and actually get answers.

One of the things that has always frustrated my about not attending the eZ conference in the past is that it takes about a week for news and coverage to filter out. I suspect people are too busy doing "conference stuff" to write blog posts during the event.

This year I'm finally attending the eZ Conference (eZ Community Developer Day & PHP Vikinger) and am planing to utilise twitter to micro-blog the event in an attempt to provide some "real time" coverage. I've had conservations with Tony Wood of Vision WT fame who is also interested. The frequency of content will depend on what kind of internet aceess is availiable, and I'll utilise SMS tweats as a backup if required.

Of course anyone can do this and the more the merrier! If you are going to use twitter, add "#ezconf" within the tweet. This is called a hashtag and allows for tweets about a particular topic to be grouped by services like Summize.

The following URL will display a list of tweets with the #ezconf hashtag. The tweats are also available as an RSS feed so you can follow along in your favourite Feed Reader.

Derick (PHP Vikinger unorganiser) has suggested using #phpvikinger & #ezconference hashtags (Lots of letters there! He must be much less lazy than me :) or simply follow all three.

If you do sign up with twitter, feel free to follow me and write a tweat with a #ezconf hashtag to let fellow twitters you are following along.

Help and an Etiquette Guide are available.

eZ Publish release clarifications

In case you haven't seen the comments generated out of my last couple of posts, this is intended to be a summary. Thanks to all the fine eZ crew that jumped on and clarified things.

It appears that jagels missed the middle '0' in 4.0.1 in his initial comment, making it seem (to me at least) like eZ were recommending that 4.0 should not be used and to hold off until 4.1. The advice was actually to wait for 4.0.1.

Version 4.1 will come with the new TinyMCE based OE instead of (as well as?) the existing OE. The new TinyMCE OE can can also be used in eZ 4.0.x sites (Will the old OE work in 4.1 ?)

eZ 4.1 will also include the following enhancements:
The microkernel changes will not be in 4.1. This is not surprising as I'd expect that this is not a trivial task. ( Though I am excited about the opportunities that this change will allow. Can't wait to hear details at the eZ Conference )

The release candidates 4.0.1rc1 & 3.10rc1 have been announced. The announcement contains important information about the troublesome "url alias" issue.

I'm assuming that we'll see 3.9.5 & 4.1.0 soon as well.

Wednesday, June 11, 2008

New versions of eZ Publish (4.0.1, 3.10.1 & 3.9.5) imminent

After my comment about following subversion commit comments to get an idea of what is happening with eZ Publish in my previous post, I realised it wasn't such a bad idea and added the RSS feed to my reader.

This morning I'm happy to report that the release trees for 4.0.1 & 3.10.1 & 3.9.5 have been created.

Nothing in the svn commits comments regarding 4.1. However this comment on my previous post has disturbed me:
I have been to a couple of seminars where we were recommended to wait for 4.1 before we upgrade to eZ4 (by eZ employees).
Anyone have details of why this is the case? With the launch of a 4.0 eZ site in the coming weeks I find this quite worrying.

Friday, June 06, 2008

eZ Publish News: "No he's not dead, he's restin'!"

No no he's not dead, he's, he's restin'! Remarkable bird, the Norwegian Blue, idn'it, ay? Beautiful plumage! from Monty Pythons "Dead Parrot" sketch.

Given that there hasn't been a release for the eZ publish 3 series since October 2007 and December 2007 for the initial eZ publish 4.0 release, coupled by the lack of any concrete information regarding new releases, one may be forgiven in thinking that eZ Publish had been consigned to the great bit bucket in the ether. Fortunately it appears that unlike the Norwegian Blue, eZ was actually restin'! (Actually I suspect they have been working very hard, just not telling us)

I'm not sure how many people are downloading and reading eZ's SHARE! magazine PDF but if you're not then you would have missed this news regarding eZ Publish 4.1 from the June issue:

eZ Publish 4.1 - what’s new?

The next version of our flagship product eZ Publish 4.1 will be released with an improved kernel and several extensions providing new or enhanced features. Highlights include:
  • A new Online Editor with support for more browsers and platforms (including IE7 on Vista, Safari)
  • A new extension providing multiple file upload from within the browser
  • Oracle support (from version 8), including support for the current cluster configurations
  • An extension providing functions for password expiry (typical use for intranets and extranets)
  • Solaris 10 support
  • Performance enhancements
In future releases, most new features will be made available through extensions as we are aiming more and more for a microkernel approach for eZ Publish.
No official word on release dates but forum posts seem to indicate that release candidates are possible for next week.

On Communications

I must admit I'm at a loss as to why the SHARE! magazine PDF is the primary communication method of a company that's flagship product is a Web CMS. It doesn't show off their "product" (now, if the PDF was produced out of the CMS that would be a different matter), and seems to be a quite outdated communication methodology in a time of microblogging, RSS feeds, social networking and content aggregation.

One the the main issues is that you can't link to specific information in a PDF (thats why I've reproduced the relevant information here) and it's a pain to have to download to view. This could be solved by simply adding the content to the eZ web does use a CMS right? Isn't utilising the eZ site for this information a great advertisment for the product?

Perhaps it's aimed at a difference audience than me but then I'm not sure what that leaves me with...subversion comments?

Anywhoo after that rant you might need something to put a smile on your face. If you're not familiar with Monty Pythons famous "Dead Parrot" sketch or simply need a laugh here it is. Enjoy!

Tuesday, May 27, 2008

eZ Publish on list of "PHP Apps that changed the World"

Federico Cargnelutti has listed a number of Open Source PHP applications that he believes has changed the world over the last 10 years and eZ Publish makes the list.

As with any lists of this nature, every one has their own opinion, and the comments make good reading.

One that isn't on the list or commented on is PHPList. What's missing in your option?

Monday, April 28, 2008

What's happening with eZ Publish?

If you want to know what's happening with eZ publish then it seems that the Paris Developer day was the place to be. You can read Damien Pobels excellent write up of the event (French). If like me your French is limited to "hello", "goodbye" and asking for a beer here's an English translation via google translate. Not perfect but you'll get the idea. Thanks Damien!

Wednesday, April 09, 2008

Australian Open Source Industry & Community Census report released

The report compiled from the Australian Open Source Industry & Community Census has been released.

I've only have the chance to skim over it at the moment, but my initial impression is that it looks very professional, contains quite a bit of detail and is interspersed with practitioner "stories".

Monday, March 03, 2008

Git and eZ Approve 2: checking in

My membership of the eZ Approve 2 project has been given the green light so as a follow up to my previous post Using Git with eZ Publish projects I can present the output of the commits back to the subversion repository.

$ git-svn dcommit
Authentication realm: eZ projects
Password for 'zabbie':
A design/standard/templates/node/view/plain.tpl
Committed r2501
M eventtypes/event/ezapprove2/ezapprove2type.php
Committed r2502
M classes/ezxapprovestatususerlink.php
Committed r2503
M collaboration/ezapprove2/ezapprove2collaborationhandler.php
Committed r2504
M collaboration/ezapprove2/ezapprove2collaborationhandler.php
Committed r2505
A design/standard/templates/node/view/plain.tpl
r2501 = e5a186160c1fab07a2894d180f932e3a6931b782 (git-svn)
M eventtypes/event/ezapprove2/ezapprove2type.php
r2502 = 43c5b3ba16bf4015ee8f9c2f2a1a9e4d4333972d (git-svn)
M classes/ezxapprovestatususerlink.php
r2503 = be6daf109a91319da0ee16c40b2344c0de18291d (git-svn)
M collaboration/ezapprove2/ezapprove2collaborationhandler.php
r2504 = 8113d8d1d58d92da6a4cee34c14b7d6db227ef86 (git-svn)
M collaboration/ezapprove2/ezapprove2collaborationhandler.php
r2505 = e9acd0e93e1c47dea1cd88a47b26e8b34a951552 (git-svn)
No changes between current HEAD and refs/remotes/git-svn
Resetting to the latest refs/remotes/git-svn

Checking the log of the subversion repository shows each of the local git commits as individual subversion commits along with there respective commit log messages.
$ svn log | head -n 30
r2505 | zabbie | 2008-03-03 10:09:47 +1000 (Mon, 03 Mar 2008) | 2 lines

Fix for placement of a previously unpublished object that is edited

r2504 | zabbie | 2008-03-03 10:09:37 +1000 (Mon, 03 Mar 2008) | 2 lines

Fixed method definitions to match eZCollaborationItemHandler to stop strict messages

r2503 | zabbie | 2008-03-03 10:09:26 +1000 (Mon, 03 Mar 2008) | 2 lines

Corrected typo in const for role approver

r2502 | zabbie | 2008-03-03 10:09:18 +1000 (Mon, 03 Mar 2008) | 2 lines

Typo in const

r2501 | zabbie | 2008-03-03 10:09:06 +1000 (Mon, 03 Mar 2008) | 2 lines

fixed "Placed in:" for items previously unpublished

r2500 | tw | 2008-01-15 02:15:14 +1000 (Tue, 15 Jan 2008) | 1 line

- Fixed missing static in ezinfo.php
r2499 | (no author) | 2008-01-15 00:37:38 +1000 (Tue, 15 Jan 2008) | 1 line

For all intents and purposes it's undetectable the other repository users that anything out of the ordinary has gone on.

A couple of the comments to the previous post pointed out alternatives to git:
I don't have the inclination to check them all out, especially given that git meets my requirements.

If you want some more info Dave Dribin has a couple of blog posts that contain a review of Git, Bazzar & Mercurial, and a explanation as to why he choose Mercurial. Dave says that in the end it was a gut choice and that for projects where "I still have to use Subversion, I will be using git-svn".

Friday, February 29, 2008

Using Git with eZ Publish projects

In my spare time I've been hanging out with a bunch of Ruby/Rails people. They are a fun bunch however they don't seem to like it when you point out that MVC existed well before Rails. One thing that have put me onto is Git.

Git is a distributed revision control / software configuration management project. You may have heard of it, Linus Torvalds (that clever guy behind Linux) wrote it to manage kernel development. There is plenty to read about it on Wikipedia

So why Git?

This week I've been working on an eZ Publish 4.0 project that needed the ezApprove2 workflow extension. The version in the contribs says it has 3.7 support...the eZ projects site says it work with 4.0 except in the subversion repository on the projects site!

So I check it out svn co to investigate if it meets the requirements.

As part of this process I notice some bugs and being a good open source user I fix them, however I can't commit them back to the repository as I'm not a member of the project (I've applied). I've got other things to do and probably won't remember to commit the changes when and if my membership is approved. I've posted most the the patches to the forums in case anyone is looking at using it.

Git allows for distributed revision control, effectively I can have a local repository and make local commits. git-svn also allows for the sync a local git repository with a subversion one.

Here is what I've done so far...I'm new to this so any git experts out there I'm happy to hear any pointers from you!

Install git

I use kubuntu so installation was pretty painless
sudo apt-get install git-core git-svn git-gui

Create a directory for the repository

$ cd /var/www/ezpublish-4.0.0/extension/
$ mkdir ezapprove2
$ cd ezapprove2

Find the revision I want to check out from the subversion repository

$ svn log | head
r2500 | tw | 2008-01-15 02:15:14 +1000 (Tue, 15 Jan 2008) | 1 line

- Fixed missing static in ezinfo.php
r2487 | tw | 2008-01-12 01:02:47 +1000 (Sat, 12 Jan 2008) | 1 line

- Added eZ Approve 2 for eZ Publish 4 (PHP5 port)

Initialise the git repository

$ git svn init
Initialized empty Git repository in .git/

Check out the revision I want from subversion

$ git-svn fetch -r2500
A sql/mysql/schema.sql
A ezinfo.php
A settings/module.ini.append.php
A settings/collaboration.ini.append.php
A settings/design.ini.append.php
A settings/extendedattributefilter.ini.append.php
A settings/workflow.ini.append.php
A settings/ezapprove2.ini.append.php
A settings/site.ini.append.php
A translations/ger-DE/translation.ts
A translations/nor-NO/translation.ts
A doc/upgrade/UPGRADE_0.1-0.2
A doc/upgrade/UPGRADE_0.2-0.3
A doc/upgrade/UPGRADE_0.3-0.4
A doc/upgrade/UPGRADE_0.4-0.5
A doc/upgrade/UPGRADE_0.5-0.6
A doc/upgrade/UPGRADE_0.6-0.7
A doc/upgrade/UPGRADE_0.7-0.8
A doc/changelogs/CHANGELOG_0.1-0.2
A doc/changelogs/CHANGELOG_0.2-0.3
A doc/changelogs/CHANGELOG_0.3-0.4
A doc/changelogs/CHANGELOG_0.4-0.5
A doc/changelogs/CHANGELOG_0.5-0.6
A doc/changelogs/CHANGELOG_0.6-0.7
A doc/changelogs/CHANGELOG_0.7-0.8
A eventtypes/event/ezapprove2/ezapprove2type.php
A collaboration/ezapprove2/ezapprove2collaborationhandler.php
A modules/ezapprove2/ezapprovefunctioncollection.php
A modules/ezapprove2/function_definition.php
A modules/ezapprove2/select_approver.php
A modules/ezapprove2/view_approve_list.php
A modules/ezapprove2/module.php
A modules/ezapprove2/add_approver.php
A design/standard/templates/notification/handler/ezcollaboration/view/ezapprove2/author.tpl
A design/standard/templates/notification/handler/ezcollaboration/view/ezapprove2/approve.tpl
A design/standard/templates/collaboration/handlers/view/full/ezapprove2.tpl
A design/standard/templates/collaboration/handlers/view/line/ezapprove2.tpl
A design/standard/templates/collaboration/message/view/element/ezapprove2_comment.tpl
A design/standard/templates/workflow/eventtype/edit/event_ezapprove2.tpl
A design/standard/templates/workflow/eventtype/view/event_ezapprove2.tpl
A design/standard/templates/workflow/eventtype/ezapprove2/view_approve_list.tpl
A design/standard/templates/workflow/eventtype/ezapprove2/add_approver.tpl
A design/standard/templates/workflow/eventtype/ezapprove2/select_approver.tpl
A classes/ezapprove2event.php
A classes/ezapproveextendedfilter.php
A classes/ezxapprovestatususerlink.php
A classes/ezxapprovestatus.php
r2500 = 2528a77b6478e87833cc59e376965dbc03b5d775 (git-svn)

Checked out HEAD: r2500

Now I want to create a local branch so I can distinguish which are my changes

$ git status
# On branch master
nothing to commit (working directory clean)
$ git checkout -b code_review
Switched to a new branch "code_review"
$ git status
# On branch code_review
nothing to commit (working directory clean)

Now I can fix the bugs add new files and commit locally

There was an issue in the default node plain view template which is used by the collaboration preview. To fix this I added a file ( design/standard/templates/node/view/plain.tpl ) to the extension that fixes the issue.

$ mkdir -p design/standard/templates/node/view
$ vi design/standard/templates/node/view/plain.tpl
$ git status
# On branch code_review
# Untracked files:
# (use "git add >file<..." to include in what will be committed)
# design/standard/templates/node/
nothing added to commit but untracked files present (use "git add" to track)

Like with subversion I had to add the new directory before I can make the commit to the git repository.

$ git add design/standard/templates/node
$ git status
# On branch code_review
# Changes to be committed:
# (use "git reset HEAD >file<..." to unstage)
# new file: design/standard/templates/node/view/plain.tpl
$ git commit -m'fixed "Placed in:" for items previously unpublished' design/standard/templates/node/view/plain.tpl
Created commit 0cc675c: fixed "Placed in:" for items previously unpublished
1 files changed, 45 insertions(+), 0 deletions(-)
create mode 100644 design/standard/templates/node/view/plain.tpl

So now we have made the change and have a local commit. I can go ahead and fix the bugs that I find, making local commits as I go. I can see the changes by checking the git log.

$ git log
commit e910175452f6d9b43331798926628e7bf0528d5c
Author: Bruce Morrison
Date: Fri Feb 29 16:42:57 2008 +1000

fixed "Placed in:" for items previously unpublished

commit d4f3036b90377b8c69d84dacaafff8e50680d61c
Author: Bruce Morrison
Date: Fri Feb 29 14:20:28 2008 +1000

Typo in const

commit cb0f79dc7da4ac86288c1c9e1fa06202b39c5ff1
Author: Bruce Morrison
Date: Fri Feb 29 14:19:44 2008 +1000

Fix for placement of a previously unpublished object that is edited

commit 842c439ce9ebe5f987c7807bf1d394306eafe681
Author: Bruce Morrison
Date: Fri Feb 29 14:17:31 2008 +1000

Fixed method definitions to match eZCollaborationItemHandler to stop strict messages

commit 4d7e93900c54feb7d91fb3d42cf94112aa3b7cbc
Author: Bruce Morrison
Date: Fri Feb 29 14:09:24 2008 +1000

Corrected typo in const

commit 2528a77b6478e87833cc59e376965dbc03b5d775
Author: tw
Date: Mon Jan 14 16:15:14 2008 +0000

- Fixed missing static in ezinfo.php

git-svn-id: b9bbbbba-8235-4206-939b-838bdeb4db37

If I'm granted write access to the subversion repository I can simply run

$ git-svn dcommit

and each local commit is transformed into an svn one.

I can update my working copy from the svn repository by running

$ git-svn rebase

Not only can I make local commits I can do so offline, syncing the changes when I have access to the repository.

The following sites greatly assisted this process:

Tuesday, February 26, 2008

New rating extension for eZ Publish

I've just uploaded a rating module to the contribution section on the eZ site. The Star Rating module introduces a datatype that can be added to any content classes to allow it to be rated. While I haven't checked the datatype has been designed so it should be possible to add multiple ratings to a single content class.

The extension has been designed with accessibility in mind and will function without javascript, images or CSS.

The catalyst for the extension was CSS star rating from Komodo Media and the extension contains CSS and images from this project.

To add some web 2.0 goodness, if the xajax extension is enabled and the user has access ratings will be done via ajax calls. The xajax component requires newer versions (0.5+) of the xajax library so it must be downloaded from the projects site an not from the contributions section of the eZ site.

View caching & dynamic content

One of the issues I came across is that by making the rating a datatype, is that the display gets "captured" in the view cache. This is not not good for a dynamic component. To prevent caching I tried setting the cache_ttl to zero in the datatype view, however this has no effect. It appears that this template setting only works when used in a view template...something to investigate.

An earlier strategy was to clear the view cache after each "vote" and while this works to some extent it fails with anonymous users. View caches are based on the user viewing the node, and because all non logged in users share the special anonymous user they also share the view caches. Once one anonymous user voted the page would be updated with the results and the voting disabled, however the next anonymous user to visit the page would see the cached page containing the result and be unable to vote.

A worthy addition to the eZ template system would be the ability to designate a block in any template as being dynamic and not cached.

The TODO list

Currently the TODO list stands at
  • Fetch most rated objects;
  • Set max rating in datatype (class or content?);
  • Ability to clear ratings from datatype;
  • Stats - An admin view of voting that displays an over view of the rated content. Allow filtering/ sorting by content type;
  • Options for vote uniqueness - currently per session only. This covers both Anonymous & logged in users. Could make it based on user_id or session so that logged in users can only vote once;
  • Ability to limit voting to logged in user;
  • Log IP addresses and add this in the mix of unique voting.
I'm not sure how quickly I'll get to these items, however the fetching of top rated items will be first cab off the rank.

If you find the extension useful, have any comments, or suggestions let me know via comments. Also if you use it in a public site drop me a line. Also nice to seeing ones creations in the wild!

eZ Publish xajax extension upgraded

Recently I've been playing about on the eZ Publish projects site
and have joined a couple of projects. One that I've previously has some involvement in is Kristof's xajax plugin.

I quite like xajax as it's takes care of most of the javascript and allows you to manipulate the browser DOM via PHP.

I've joined the project as a member, updated the xajax libraries to 0.5 beta 4 ( they were on beta 2) and created a download.

Initially I was going to upgrade the extension to work with eZ 4.0, however there was nothing to do. It works fine in eZ 4.0 and my changes are simply an upgrade to the xajax library.

Given the extension basically exposes the xajax libraries and is unlikely to change too much I wonder it it's worth linking the version of the extension to the xajax library version?

Happy xajaxing!

Friday, February 15, 2008

Is eZ Publish 4.0 like Microsoft Vista?

Disclaimers usually go at the bottom of a post but because this one is quite lengthy I've decided to put it at the top. Mostly the stuff I post here is of a technical nature, but this time I'm posting an option piece, and as such it is full of wild speculation, personal thoughts, suggestions and of course opinion, all of which may have no basis in any reality other than my own.

You are here - the current state of play

I've been using eZPublish 4.0 since the beginning of the year. It's not quite what I envisioned when the rumbling of version 4.0 first started, oh so long ago, actually it's nothing like what I imagined.

Hence the title of this post. Initially Vista (Longhorn) was slated as a "minor step" between Windows XP (Whistler) and Blackcomb. However it gradually took on many of the features slated for Blackcomb. People got excited, but it's release was delayed several times, the developers were given other priorities and finally development started afresh based on Windows 2003 server and a limited feature set.[1] When finally released the general consensus seems to be one of disappointment or at least significantly underwhelmed.

Over time there has been quite a bit of excitement of what a new version of our favourite CMS might provide. Given the quantum leap in functionality between eZ Publish 2.0 and 3.0 who knew what unimaginable ecstasy version 4.0 would bring! However time marched on, PHP4 end of life was announced and eZ Publish 4.0 became a port of eZ 3 to PHP5 (continuing the community effort by Paul and Kristof).

Now this is not a bad thing, on the contrary it's the best thing that happened to eZ Publish in recent times (including the Online Editor in the distribution would be a close second).

At the local PHP meetup I would get strange looks because I was still using PHP4. I could get people excited about eZ Publish but people soon lost interest when told that it required PHP4 and a specific version at that. No matter how good the product sounded it's was hard to get people interested about something that had "special requirements". "None of the other PHP CMS have those requirements" was the standard response. It was impossible to get a foot in the door. Hopefully now with PHP5 support more people will be willing to try eZ Publish.

PHP5 support also makes it easier to get eZ Publish into corporate environments. RedHat seems to be the Linux distribution of choice in the corporate world (at least here in Australia) and it's lack of support for php4.4 has meant that in situations where we were the "application provider" we either had to convince the systems people to install the newer unsupported (by RedHat) version of PHP or do it ourselves. Of course this just created a bunch of issues around support (of the custom PHP) and called into question the choice of eZ Publish as a CMS platform.

Oh yeah, eZ runs faster under PHP5 as well!

Three cheers for eZ4.0 on PHP5!

eZ Components to the rescue

I spend much of my time working with eZ Publish as a framework by coding extensions that merge existing data sources into a CMS managed environment as well as creating fully fledged applications that run parallel to the CMS. When I learned of the eZ Components project and that it would from the basis of the new eZ Publish version I was very happy.

There are a bunch of subsystems in the current version of eZ Publish that are tightly coupled with the main content module that makes them pretty difficult to reuse in custom modules. Two that come to mind are the Image system and the Rich Text/XML Block Datatype. It seems such a waste that these subsystems can't easily be reused outside of the content module.

From what I've seen of the eZ Components they will solve these type of issues. They will form the building blocks on which future versions of eZ publish are built. From what I can tell current version of eZ doesn't utilise components at all, although some of the components features have made their way into the eZ publish libraries. (Of course running under PHP5 allows the use of components in extensions).

New versions

Yesterday I was alerted to an update to the eZ Publish roadmap by a posting from Łukasz (eZ Fourm Guru) Serwatka. (I don't understand why eZ aren't talking about this themselves?)

The roadmap has the next point release, 4.1 (focusing on a new Online editor with support for IE7 for Vista) happening in Q1 2008. Given we are about half way through February that makes it due somewhere in the next month and a half.

Of more interest to me was version 4.5, with the focus points highlighting the integration of a new template & workflow engine based on eZ Components.

With a tentative release date of "Summer 2008" one would speculate that it is planned to be launched at the Summer conference. (Assuming that "Summer 2008" refers to a northern hemisphere summer, because we've in the middle of Summer, here down under. Come on eZ people, you're global!)

I do wonder what "Support for more runtime platforms" refers to?

Better, Faster, Shinyer or a Monster?

In terms of version numbers I'd like to see the version that incorporates eZ Components go up a major revision number and become eZ 5.0. This would signify the gravity of the change. We are not talking about some bug fixes and enhancements here, but replacing major components.

I'd even go so far to suggest that eZ4.0 goes into maintenance mode (feature freeze, whatever you want to call it) and eZ5.0 is written from scratch, built on eZ Components. I fear an eZ Publish that has it's underlying systems replaced bit by bit with eZ Component versions will quickly start to resemble a Frankenstein's monster.

The current system has been through ten major revisions and countless minor ones and is quite stable. I suspect there be teething problems if not major pain (but as the saying goes "no pain no gain") for many with this change. And of course the entire admin and various default user interface will have to be rewritten for to work with the new template syntax.

I suspect that given the current templating system is tied to the caching and translation systems (part of eZ Components 2008.1) that we'll also see those replaced with eZ Components ones as well.

Also of interest was Derick's post earlier this month about the eZ components 2008.1 roadmap. The majority of the listed new component and enhancements appear to have a specific eZ publish focus. These have tentative alpha & beta release dates in May 2008. This would make a tight squeeze if eZ 4.5 (eZ Components) was to utilise this eZ Components release. Does this mean that eZ 4.5 would not have Translation & Character set support?

So what do you think?
Is eZ publish 4.0 like Vista?
Do you want to see an eZ publish that is half components or a ground up rebuild?
Do you care? ;)

[1] Paraphrased from:

Friday, February 01, 2008

eZMail Debug updated for eZ publish 4.0.0

I realise that with the newish (introduced in version 3.9) "file" mail transport option can be used to debug mail, but in some cases it's easier if the system actually sends the mail (to me and not the intended precipitant). So I've updated the subversion repository of Kristof Coomans' eZMail Debug patch to work with eZ Publish 4.0.0

To use, simply download the patched ezmail.php from
and save it to lib/ezutils/classes/ezmail.php of your eZ Publish 4.0.0 install.

Remember that if you are using SMTP transport..."Due to a bug in eZ Publish 4.0.0, you need to download the updated version of the "ezsmtp" class and replace the corresponding file in your installation in order to use an SMTP relay server for mail delivery. This bug will be fixed in the upcoming eZ Publish 4.0.1 release." (From )

Tuesday, January 29, 2008

New reCAPTCHA extension (1.1) for eZ Publish

In response to some good suggestions I've just released version 1.1 of the reCAPTCHA extension for versions 3 & 4 of eZ Publish. The main changes are:
  • Support for multiple/domain keys
  • Utilising the permissions/role system to implement by pass of the captcha
As a side effect of the latter, the admin user will not have to fill out captchas.

Download from:

Please let me know about your sites that are using the extension, either via comments here or on the contribution pages at eZ.

Tuesday, January 08, 2008

eZ Publish 3 version of reCAPTCHA extension

This morning I created a eZ 3.x version of the reCAPTCHA extension. The changes were pretty simple and included:
  • Modifying the return vales in the datatype to be constants
  • Made the method parameters references in the datatype
  • Removed any static/public/private method declarations
The eZ 3.x version can be downloaded at

Friday, January 04, 2008

reCAPTCHA for eZ Publish

The other day I came across a site that was using the reCAPTCHA CAPTCHA. I'd heard of the project but hadn't had time to investigate.

The reCAPTCHA project (of the School of Computer Science at Carnegie Mellon University) provides both text and audio CAPTCHAs via a web service. It uses words scanned from books in the Internet Archive that have failed to be recognised by OCR, so using this on your site is helping to digitalise those books. See for more info on how it works.

With the Christmas break and the fact that we've had an intense low hanging about for the duration (strong winds & rain) I thought I'd check it out and see how easily it could be integrated into eZ Publish.

Turns out it was pretty simple. I've created an extension with a reCAPTCHA datatype that can be used in both regular content class (for forums, comments etc.) and as a information collector (feedback forms etc.). The datatype doesn't store any information but utilises datatype validation methods to check the CAPTCHA and return a pass or fail.

It's an initial version and I've only tested on eZ4.0. Hopefully I'll be able to test on earlier versions in the coming days. Mapping of languages also needs looking at.

For those interested it can be downloaded at