Archive for the Category Systems

 
 

eZ Publish Dev Tip #2 – Nodes and objects

A lot of developers starting out with eZ Publish have a hard time and this is generally attributed to a steep learning curve. Whilst this is true, a lot of the initial issues are terminology related, unless you know what it is called, you can’t search for it – and in technical documentation like that of eZ Publish, if you can’t name it then you won’t find it.

One common issue is trying to work out the difference between a node and an object. Everyone knows that screen – in the details pane on the admin interface, where you see “Node ID” and “Object ID”. But what do they mean and why do they get used?

Objects

Every piece of content in eZ Publish is an object. Many of these are defined by your content classes, but suffice to say that objects actually contain content and by themselves are the single place in which 99% of your content actually resides.

Objects themselves have no hierarchy, you could imagine these are blobs of data just floating around in your database. In order to actually give our site structure, hierarchy, navigation we need to associate these objects (pieces of content) to a node.

Nodes

Nodes exist for one reason, to provide hierarchy to those objects that we just covered. In giving an object a node id, we in turn place it within the node hierarchy, it has a parent, could have children and from this we can base our navigation and other structures.

Objects have a one to many mapping with nodes, meaning that a single piece of content can be referenced by more than one node id. A single node cannot reference multiple pieces of content. The benefit this provides is locations or cross-pubishing in eZ Publish talk, allowing you to have the same piece of content multiple times within your structure, and editing any of those locations edits that single piece of content, the effect of course being that those edits are shown in all locations at once.

Summary

Object IDs are used when referencing a piece of content directly.

Node IDs are used when referencing a specific location in the node tree/hirerarchy of your website.

You will find these terms used througout the documentation and depending on the operations and functions you are calling will determine whether you need to provide a node id or object id for your operation.

eZ Publish newsletter options

At the recent eZ Publish conference in January it was announced that eZ Newsletter would be phased out in support for CJW Newsletter, a new system to be certified by eZ Systems and built by several eZ Partners.

This is certainly good news as support and maintenance for eZ Newsletter has been sorely lacking for a couple of years now.

Whilst not yet released, the presentation slides from CJW Newsletter are promising and I am looking forward to giving this extension a thorough workout in the coming weeks.

Also only this week, NV Newsletter has been released onto http://projects.ez.no/nvnewsletter which is also something worth giving a go if you are looking for new newsletter options.

Newsletters are something that I know have been on a lot of minds over the past 18 months and it is great to see some good work coming out of it.

eZ Publish Dev Tip #1 – Removing index.php

Ok, this one seems to popup in the forums just all too often, and it’s not an easy one to address – because a lot depends on your server environment and setup.

Removing index.php is done through Apache mod_rewrite which in turn interprets your URLs and passes them through index.php silently while everything looks pretty in your browser address bar. In order to get this working on your site you need to do the following.

1. Locate .htaccess_root in your root eZ Publish directory, this helpful file has a default set of htaccess rules to set you on your way.

2. Rename .htaccess_root to .htaccess, or paste the contents of the file into your VirtualHost configuration.

At this point in time your new URLS should hopefully work, but in many cases won’t. eZ Publish is meant to detect your virtual hosting configuration but this doesn’t always work. Never fear, we can force that option through the eZ Publish configuration files.

3. Edit settings/override/site.ini.append.php and under the [SiteAccessSettings] block add the line

ForceVirtualHost=true

Now you should hopefully be seeing much nicer URLs.

What about my old URLs?

If you have been using your eZ Publish installation already then search engines may have already indexed your content with the index.php in the URL. In this case all those existing records will bounce as errors. This is never good for your search rankings, so with some extra mod_rewrite magic in your .htaccess you can fix that up at the same time.

RewriteRule ^/index\.php/(.*)$ /$1 [L,R=301]

This should hopefully get you up and running with nice URLs. This guide is specifically for those running Apache, which is recommended for eZ Publish installations. If you choose to run a different webserver then modify the mod_rewrite rules and configuration to specifically suit your own webserver options.

My pet hate from Wordpress

Auto updates in Wordpress are great. They make it so easy it’s actually enjoyable to update, well for some people it is. For those of us who want to override one specific thing in the Wordpress core with an enhancement, such as my archive listing, we have our changes overriden with each update. In my case my archives page is broken until I go and reapply my patches again.

Thank god eZ Publish made some great design decisions and made overriding internal functionality easy… now we just have to simplify the upgrade process a little and we can have the best of both worlds.

eZ Publish Dev Tips

I’ve been thinking recently I should publish some dev tips on my blog, preferrably as a series of tips and hints about working with eZ Publish. I would like to commit to doing it daily, but I don’t think about my blog that often – so perhaps every couple of days.

We shall see what happens.

ezadmin2 a bittersweet improvement

For those keeping up with eZ Publish and their new development schedules you will know of course that the next release, 4.3, is just around the corner. Among it are a number of updates and perhaps one of those most eagerly awaited would be an administration interface refresh, something which hasn’t happened since eZ Publish 3.

For those who work frequently with eZ Publish there is probably not much doubt in your mind that the admin interface requires a refresh, could do with a good dose of javascript/ajax and some speed enhancements. And to be honest, that is what you have to look forward to in 4.3.

Unfortunately however the new admin2 design doesn’t really come with many usability enhancements in mind. The javascript additions simplify some operations to remove page loads – but all in the all the admin interface does look very very similar to its predecessor.

I wonder then is it that the eZ Publish admin is at its best layout and optimised design considering the functions and features available, or could it be improved even further with some thoughts about design and usability? Perhaps improving the code base to make it easier to extend and override specific areas of the admin interface, perhaps making things like the top tabs ACL dependent so they don’t appear if you don’t have access to them..

There are mixed reactions to the 4.3alpha1 release on twitter, it should be interesting to see how things go prior to launch.

Bug 11577

I managed to run into an issue today with content editing on eZ Publish when working with multiplexers.

For anyone working with eZ Publish multiplexers and issues with child processes cancelling your publish operation check out the patches at issues.ez.no/11577, hopefully this will make it into the next release.

eZ Publish 4.2alpha1

It was great to see the recent release of the latest eZ Publish alpha. This may mean in fact that they will indeed reach their 4.2 release milestone of 29 September

It would certainly be good to see that happen and would instill further confidence in this new development approach.

I look forward to the 29th.

Multi priced multi options for eZ Publish

Working with a new client on eZ Publish last month we came across an unusual request for multiple fixed priced addons. On the surface it sounds like a simple request until you get down into the nuts and bolts of what that means, what you have to store and how it all fits together in the realm of eZ Publish.

Why oh why would you ever request such a thing? In the case where you are a distributor across multiple countries you run into the unique problem of wanting to fix your price list to ignore foreign exchange fluctuations. This price book approach works well offline and really well in spreadsheets… in eZ Publish it simply doesn’t exist, until now.

When looking at the requirements for the implementation it became immediately apparent there were two datatypes very close to the functionality we were looking to introduce, the multi-price datatype and the multioption2 datatype.

  • Multioption2 provides an enhanced product option datatype that allows you to specify product additions, their prices and associated images along with rules for how these options can be chained together.
  • Multi-price integrates directly into to multi-currency system to provide automatic or fixed pricing for given products.

This gave an excellent base for extending multioption2 to support multi price values. The resulting datatype uses the same underlying option and rule logic from multioption2 with the multi-price functionality of the multiprice datatype allowing customisable fixed or automatic pricing based on forex rates.

The extension remains rough around the edges and will be tidied up in coming project enhancements and released back to the community should it be of value to others.

Updated eZ Publish Roadmap

It has often been mentioned on the forums that the eZ Publish Roadmap needs some love and that a product without a roadmap inspires the confidence of no-one. Luckily this has been updated as recently as June 12th and the new roadmap is looking pretty nice.

From cluster and performance enhancements and eZ Flow updates through to new extensions and updates to eZ Find there is something in there for everyone. Unfortunately Admin Interface redesigns don’t make the cut until the 4.3 release slated for March 30th 2010, but then that is only 9 months away in any case.

If eZ Systems manages to deliver on these promises there is some really nice looking functionality for both partners and customers alike, but as recent history has shown I will remain optimistically cautious and continue delivering the services I need now rather than waiting for something to materialise based on an ever-shifting roadmap.

500 mile email

What do you do when confronted with a technical problem that simply can’t be true? If someone came to you and told you they couldn’t send email outside a 500 mile radius

This one should bring a smile to face of any technical administrator. The joys of technology.

http://www.ibiblio.org/harris/500milemail.html

ImageMagick 6.4.x on CentOS 5

As is always the case with RedHat and CentOS, a number of packages in the usual yum repositories lack heavily behind the advancements made by their authors and teams. One such package is ImageMagick, which as of writing is back at 6.2.8 as opposed to 6.4.8. 

This for the most part isn’t an issue unless there is a specific upgrade, bug fix or enhancement you are looking to implement from within the ImageMagick library. In my case it was the use of the caret(^) character for specifying minimum geometric resize values. 

Unfortunately none of the yum repositories we regularly use have an updated package for 6.3.x or 6.4.x which left us in a bit of bind. We could either code our way around the issue (expensive, frustrating and time consuming) or seek another upgrade path. 

As no stranger to compiling packages from source I grabbed the latest tar.gz from the ImageMagick download page and proceeded to decompress it and compile. I then removed the yum installed package. Unfortunately at the end of this process, whilst the installation had succeeded I received strange error messages from the convert command line utility:

convert: no decode delegate for this image format `Book_icon.png' @ magick/constitute.c/ReadImage/526.
convert: missing an image filename `image.jpg' @ wand/convert.c/ConvertImageCommand/2710.

It turns out this is an easy enough problem to diagnose and resolve. The use of the following command provides an overview of the formats currently supported by our ImageMagick installation.

identify -list format

Well damn, no jpg support, no png, infact lots of things are missing. I guess we are missing some other rather important libraries prior to compilation. After installing the appropriate devel libraries via yum, we can configure again, make clean and install. Phew, thank god it works this time. 

yum remove ImageMagick
yum install tcl-devel libpng-devel libjpeg-devel ghostscript-devel bzip2-devel freetype-devel libtiff-devel
wget url to ImageMagick download  
tar zxvf ImageMagick-6.4.8-3.tar.gz
configure --prefix=/usr/local --with-bzlib=yes --with-fontconfig=yes --with-freetype=yes --with-gslib=yes --with-gvc=yes --with-jpeg=yes --with-jp2=yes --with-png=yes --with-tiff=yes
make clean
make
make install 

Too easy. Unfortunately you won’t get updates to your ImageMagick pushed from yum anymore, so keep the additional administration costs in mind, but for those requiring the latest versions this is the quick way to get setup and running.

eZ Systems Expansion

eZ Systems, the company behind the eZ Publish product is continuing to grow internationally having recently opened their newest office in Japan earlier this month, an office in the United States earlier in 2008 and now announcing further expansion in Europe. 

In an article posted to the company news section of the eZ Systems website, plans for a new office in Paris during 2009 is mentioned as well as the continued explosive growth of enterprise clients throughout Western Europe.

This is great news for partners both within Europe and abroad, further reinforcing our sales efforts and providing valuable projects, references and leads for the continued growth of the ecosystem. 

Read the original article – Continuous Growth in Western Europe

eZ Publish Debugging Tips by Damien Pobel

Damien Pobel has recently posted some great tips about debugging for all those up and coming eZ Publish developers.

Definitely worth checking out – Some tips about the eZ PUblish debug.

eZ Publish in Western Europe

I stumbled across an interesting promotional video for eZ Publish in Western Europe the other day, hosted at Youtube it gives brief insight into how and why the system is being deployed by major organisations throughout Western Europe. It is definitely something that will be useful as a sales tool for partners in any country.