eZ Publish 4.0: post-release notes
Here are some important information about changes in eZ Publish 4.0 and it's requirements (rest you can find in the official release announcement).
- Some scripts and classes in eZ Publish 4.0 relay on eZ Components. In order to be able to use those script, you need to have the eZ Components installed properly. One of those scripts is bin/php/ezpgenerateautoloads.php used for generating autoload arrays (extensions). The eZAutoloadGenerator class, which is used by setup/extensions, uses it as well. More information about installing the eZ Components you can find in the documentation.
- eZ Publish' autoload.php script has built-in support for eZ Components. There is no need to include another one dedicated to eZ Components.
- Always use the latest stable release of eZ Components for eZ Publish 4.0.
- Due to strict override rules keep your override templates always in design/(your_design)/override/templates folder. eZ Publish 4.0 contains a fix for issue http://issues.ez.no/9595
- Static class functions are now marked as static. One of the more important change is that eZContentObjectTreeNode::subTree() is no longer static. Because it is no longer marked as static, you can not call it as a static function any more. Instead, use eZContentObjectTreeNode::subTreeByNodeID() to fetch data and eZContentObjectTreeNode::subTreeCountByNodeID() to get count.
- Use the class constants of kernel/classes/ezerror.php e.g eZError::KERNEL_NOT_AVAILABLE instead of old constants such as EZ_ERROR_KERNEL_NOT_AVAILABLE to access error codes. Same applies to eZInputValidator class used in datatypes.
- Workflow events are now registered via eZWorkflowEventType::registerEventType() not as before with eZWorkflowEventType::registerType()
- Class constants: most of the constants declared in eZ Publish were changed to class constants. http://php.net/manual/en/language.oop5.constants.php. While porting, especially your own custom datatypes and workflow events need attention.
- eZContentObject::remove() renamed to eZContentObject::removeThis() and takes one parameter $nodeID
- The date.timezone directive must be set in php.ini or in .htaccess. For a list of supported timezones please see http://php.net/manual/en/timezones.php Observe the notes on each of the timezone group pages.
- The eZXML library is now deprecated, use the built-in PHP 5 DOM functions instead. Make sure your PHP 5 has it installed correctly. Remember about it while you are porting/creating extensions.
- A requirement for eZ Publish 4.0 is to have Unicode and UTF-8 enabled in your database.
I will keep this list up-to-date with further information.
Many thanks Łukasz !
Re: Template includes
Yes. You are correct.
Ok Lukasz, so can you confirm me that I can't include design/<mydesign>/override/templates/common/block1.tpl into design/<mydesign>/override/templates/pages/page1.tpl
the only way is tu put block1.tpl somewere into esign/<mydesign>/templates/...
Re: Template includes
If you include it from override templates then yes. You need to put it in design/<mydesign>/templates. More important in the same folder name what override template. If override template is in design/<mydesign>/override/templates/full/my.tpl then template to include in my.tpl must be in design/<mydesign>/templates/full/tpl_to_include.tpl
Many thanks for this post, but I have a question about the forth point :
When I use some templates in many other templates by including them, I am obliged to place it into design/(your_design)/templates and not in design/(your_design)/override/templates because there are not found by the include function.
Am I the only one to have this problem ?
This is really useful... Thanks