The odd bit

Once is an accident, twice is a coincidence, three times is an enemy action.

The odd bit - Once is an accident, twice is a coincidence, three times is an enemy action.

Regular expression datatype v2.1

I’ve just updated my regular expression datatype, regexpline, to version 2.1. The latest version of this eZ publish extension brings you these changes:

  • Enhanced contentclass view template
  • Fixed naming pattern if no subpatterns have been defined
  • Fixed display of object content when using it as a line field
  • Possible fix for excessive whitespace when using text block mode
  • Removed debug
  • Added possibility to “negate” regular expressions/presets. (must *not* match this regexp instead of must match)
  • Implemented hasObjectAttributeContent() (has_content in templates)

As usual, you can find a download on its contribution page.

Development mode for templates

eZ systems‘ Jan Borsodi finally provided a solution for one of the biggest issues a developer encounters when developing with eZ publish: compiled templates don’t check the modified times of their source files.

Jan’s patch alleviates this problem by adding an ini setting DevelopmentMode. When enabled, compiled templates contain code to check their source files’ modified times and refresh when needed. It’s recommended to keep this setting disabled on live sites because it could cause slowdowns, but preliminary testing on Windows (which has slow I/O) shows little to no slowdown. It remains to be seen how the setting impacts a full-blown live site. The point releases posted today already contain this new feature.
Meanwhile, Jan has posted a second patch on the mailing list that will make the view cache expire when an “involved” template has been modified. It should be in the code RSN.

Thanks Jan!

Regular expression datatype updated

In the past few days I’ve released two new versions of my regular expression datatype for eZ publish, regexpline. Version 1.1 contains these changes:

  • Fixed: CS issues
  • Fixed: Only use internal function to fetch the regular expression
  • Fixed: Naming pattern (title function) does not return an empty string when given no input or invalid input
  • Added: Custom name pattern similar to the object name pattern of a contentclass

And version 2.0 has been published today. Here’s what’s new in this version:

  • Added: Multiple regular expressions can be entered
  • Added: Multiple presets can be active
  • Added: Custom error messages per regular expression/preset
  • Added: Display as text line or textarea (in object edit)

More info and download locations can be found on its contribution page.