calendar portlet error with Enfold Desktop

If you’re experiencing problems with the calendar portlet after you installed Enfold Deskop 4.6 or older in your buildout you would be interresting with this parts :

recipe = plone.recipe.distros
urls =
nested-packages =
version-suffix-packages =

recipe = collective.recipe.cmd
on_install = true
on_update = true
cmds =
    rm -rf Calendaring
    svn export Calendaring
    rm -rf parts/desktop/Calendaring
    mv Calendaring parts/desktop

Enfold Desktop embed a very old version of Calendaring product. May next Enfold Desktop version will be available as eggs with refreshed code.

Week 49 web logs

This week I cheat a little with older articles


A full example of commiting and merging a patch


Indexes in catalog.xml considered harmful


Recombining ZODB Storage


Asynchronous Google Analytics

Disappearing content

On having layout

10 HTML tag crimes you really shouldn’t commit

10 Usability crimes you really should’t commit

30 CSS best practices for beginners

More next week.

Don’t forget to write tests for your patches

As all new major releases Plone 3.2 is heavy tested by early integrators that want the new version. They report bugs and sometimes patches. Hopefully most of them are using ‘svn diff’ or ‘diff -u’ to prepare those patchesinstead of saying: « Replace the line XX by this and add that line here »…

But the one thing they never do it is to add a test to demonstrate their bugs. Then one of the maintainer have to take time to write a test around what (s)he think to be the bug. Often, the patch is just applied, Plone is growing with another untested code and the life continue.

Please help maintainers: if you are able to write a patch you should be able to write the associated test.

Fix PIL 1.1.6 installation from sources under debian

Today I found a bug in kupu integration in Plone. I prepared a patch and I tried to reinstall plonenext environment. But this time it fails to install on the PIL egg.

The PIL egg is very dependant to your architecure. It depends of libjpeg, tkinter (tcl/tk), and some other libraries. I’m working with a Debian unstable with 3 versions of tcl/tk for various programs: 8.3, 8.4 and 8.5.

The errors was the following:

getting distribution for ‘PIL’.
libImaging/Effects.c:210: warning: ‘perlin_init’ defined but not used
libImaging/Geometry.c:236: warning: ‘quadratic_transform’ defined but not used
libImaging/Quant.c:311: warning: ‘test_sorted’ defined but not used
libImaging/Quant.c:676: warning: ‘checkContained’ defined but not used
libImaging/QuantHash.c:136: warning: ‘_hashtable_test’ defined but not used
_imagingtk.c:20:16: error: tk.h: Aucun fichier ou répertoire de ce type
_imagingtk.c:23: error: expected ‘)’ before ‘*’ token
_imagingtk.c:31: error: expected specifier-qualifier-list before ‘Tcl_Interp’
_imagingtk.c: In function ‘_tkinit’:
_imagingtk.c:37: error: ‘Tcl_Interp’ undeclared (first use in this function)
_imagingtk.c:37: error: (Each undeclared identifier is reported only once
_imagingtk.c:37: error: for each function it appears in.)
_imagingtk.c:37: error: ‘interp’ undeclared (first use in this function)
_imagingtk.c:45: error: expected expression before ‘)’ token
_imagingtk.c:51: error: ‘TkappObject’ has no member named ‘interp’
_imagingtk.c:55: warning: implicit declaration of function ‘TkImaging_Init’
error: Setup script exited with error: command ‘gcc’ failed with exit status 1

All development libraries was installed, but the installer cannot find /usr/include/tk.h. There are /usr/include/tcl8.3/tk.h, /usr/include/tcl8.4/tk.h, /usr/include/tcl8.5/tk.h. Then I wrote the little patch below for the file:

—    (révision 460)
+++    (copie de travail)
@@ -199,6 +199,9 @@
add_directory(library_dirs, « /usr/lib »)
add_directory(include_dirs, « /usr/include »)

+        if os.path.isfile(os.path.join(‘/usr/include’, ‘tcl’+TCL_VERSION,’tk.h’)):
+            add_directory(include_dirs, os.path.join(‘/usr/include’, ‘tcl’+TCL_VERSION))
# insert new dirs *before* default libs, to avoid conflicts
# between Python PYD stub libs and real libraries

I hope this patch is generic enough to be merged in the next Imaging release. Waiting this next release, I’m searching for a method to patch an egg before it is compiled by zc.buildout.

Update: this patch is included in PIL 1.1.7beta1