Wednesday, November 12, 2014

Removing a Dexterity behavior in Generic Setup isn't possible

Post retracted. As Tres remarks, the output posted originally does not indicate a problem in GS but an invalid XML file.
 
I tried setting the attribute remove="true" on the element value="plone.app.multilingual.dx.interfaces.IDexterityTranslatable" in the property name="behaviors"

If the problem does exist, the workaround might be to set purge="true" on the property and list all the behaviors you want.

Friday, September 5, 2014

Fixing Berkeley DB version conflict while building openldap on Mac OSX

While building openldap on Mac OSX 10.9.4, i got this error: 
checking for Berkeley DB major version in db.h... 1
checking for Berkeley DB minor version in db.h... 0
checking if Berkeley DB version supported by BDB/HDB backends... no


The answer was at the end of  a looong Google search: http://www.openldap.org/faq/data/cache/1113.html, which translates to:
$ LD_LIBRARY_PATH="/usr/lib:/usr/local/lib:/opt/local/lib/db46:/usr/local/ssl/lib" LDFLAGS="-L/usr/local/lib -L/opt/local/lib/db46 -L/usr/local/ssl/lib" CPPFLAGS="-I/usr/local/include -I/opt/local/include/db46 -I/usr/local/ssl/include" ./configure $OTHER_OPTIONS

In a buildout using zc.recipe.cmmi, it looks like this:
[buildout]
parts =
    openldap-build
    ...


[openldap-build]
recipe = zc.recipe.cmmi
url = http://www.openldap.org/software/download/OpenLDAP/openldap-release/openldap-2.4.23.tgz
extra_options =
    --with-sasl --with-tls --enable-slapd=yes

environment =
    LD_LIBRARY_PATH=/usr/lib:/usr/local/lib:/opt/local/lib/db46:/usr/local/ssl/lib
    LDFLAGS=-L/usr/local/lib -L/opt/local/lib/db46 -L/usr/local/ssl/lib
    CPPFLAGS=-I/usr/local/include -I/opt/local/include/db46 -I/usr/local/ssl/include

Friday, July 4, 2014

AttributeError: render from plone.app.i18n.locales.languageselector

After migrating a Plone 3.3 site to Plone 4.3.3, the language selector refused to display:

error while rendering plone.app.i18n.locales.languageselector 

The log showed:

2014-07-04 10:39:11 ERROR plone.app.viewletmanager rendering of plone.portalheader in plone.app.i18n.locales.languageselector fails: render
Traceback (most recent call last):
  File "/Users/kees/.buildout/eggs/plone.app.viewletmanager-2.0.5-py2.6.egg/plone/app/viewletmanager/manager.py", line 105, in render
    html.append(viewlet.render())
  File "/Users/kees/.buildout/eggs/zope.viewlet-3.7.2-py2.6.egg/zope/viewlet/viewlet.py", line 59, in render
    raise AttributeError("render")
AttributeError: render


After googling for it, i found that a similar issue had existed in plonetheme.classic: https://dev.plone.org/ticket/12007 which referred to this commit: https://github.com/plone/plonetheme.classic/commit/3f36218d7b7e62a29fb67191eb6af49dd8242f2e

So i did an analogous change, replacing my existing viewlet registration:

           name="plone.app.i18n.locales.languageselector"
       for="*"
       manager="plone.app.layout.viewlets.interfaces.IPortalHeader"
       layer=".interfaces.IThemeSpecific"
       class="Products.LinguaPlone.browser.selector.TranslatableLanguageSelector"
       permission="zope.Public"
       />

With this:

 
               name="plone.app.i18n.locales.languageselector"
         for="*"
         manager="plone.app.layout.viewlets.interfaces.IPortalHeader"
         layer="argh.plonetheme.browser.interfaces.IThemeSpecific"
         class="Products.LinguaPlone.browser.selector.TranslatableLanguageSelector"
         template="locales/browser/languageselector.pt"
         permission="zope.Public"
         />
 

That fixed it.

Monday, June 2, 2014

Bitbucket's fluid layout: Where's the repository administration screen?

Under "settings", lower left corner of your screen. (Or via ${repo_url}/admin)

Friday, May 23, 2014

"Show Package Contents" in Mavericks

Before Mac OSX 10.9, you could "secondary click" an item in the Applications to get a menu with the option "Show Package Contents". In Mavericks, this option was removed from the menu.

In order to inspect the package contents, you can use the terminal:
$ cd /Applications
$ ls
...
MyApp
$ cd MyApp
$ ls
...
MyApp.app
...
$ cd MyApp.app
$ ls
Contents
$ cd Contents
$ ls
... 
$ open .

This last command will open the package contents in the Finder.