Posts

Showing posts with the label tips

eZ Publish 4.2 User module to get workflow triggers

The upcoming eZ Publish 4.2 ( due September 29th ) will add a bunch of workflow triggers to the user module . Workflows will be able to be attached to the following views: Activation Change Password Forgot Password Preferences Set Preferences This allows for custom workflow events to be run before and after each of these operations, resulting in a massive increase in the flexibility when interacting with users. Some potential uses that come to mind: Emailing users upon activation Creating user specific content upon activation Emailing users when they change their password An effect of these changes is that code for these actions is isolated into a class allowing calls to be easily made from elsewhere. Prior to these changes to activate a user outside of the user/activate view you would have replicate code contained in the view. This will also make it easier to test. I would have loved to see triggers added for login and logout but I suspect that would be a more involved exercise...

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

Image
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' >function.mysqli-connect</a>]: (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 c...

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. From http://ez.no/doc/ez_publish/technical_manual/4_0/templates/the_pagelayout/variables_in_pagelayout Variable Type Description $access_type array The 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 $access_type.name

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!

10 Tips for New eZ Publish Developers

Image
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. 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. 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. 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. Debugging holds the answers . ...