Entries For: January 2007
2007-01-30
Problems with migrating AT content from Plone 2.0 to Plone 2.5
Latest problem that ate too much of my life already (took me a night to get through) was importing some content from a Plone 2.0 site to a new instance of Plone 2.5. The old content was created using an old version of AT (probably 1.2). To prepare the migration I've created a new content type using ArchGenXML that mimicked the old product name, classes and fields and exported the content from the old Zope instance as a .zexp file.
The process should have been pretty much straightforward, but I hit some problems: the content types for the objects and fields was broken (it was printed as <plain_text at broken>). I had to write a script (which used an ExternalMethod library that I used to examome objects) that changed the content type to text/structured and text/plain on several fields. Next, there were lots of unicode decoding problems that made impossible cataloguing the content. So I ran again a script to convert that content and finally things started to look right.
I believe the problem with the invalid content type was due to the fact that the mime_types package from MimetypesRegistry was refactored (moved or replaced) since Plone 2.0 was released with Archetypes 1.2.
2007-01-25
Hosting Zope 3 on FreeBSD
Today I had to setup the hosting of a Zope 3 application on a FreeBSD server. I don't have much love for FreeBSD as I'm used to the Debian way of doing things, but after a couple of hours of tweaking the apache configuration files and the application I managed to get it properly running on that server.
Some pointers to quickly getting things done:
default apache on FreeBSD doesn't have mod_proxy installed. You need to recompile apache from /usr/ports/www/apache22, specifically enabling mod_proxy
make WITH_PROXY_MODULES=yes
Then make deinstall & make reinstall
The following needs to be added to your httpd.conf:
LoadModule proxy_module libexec/apache22/mod_proxy.so
LoadModule proxy_balancer_module libexec/apache22/mod_proxy_balancer.so
LoadModule proxy_ftp_module libexec/apache22/mod_proxy_ftp.so
LoadModule proxy_http_module libexec/apache22/mod_proxy_http.so
LoadModule proxy_connect_module libexec/apache22/mod_proxy_connect.so
(thanks to this page: http://sneezr.net/articles/2007/01/03/apache-2-2-gotchas)
One issue that surfaced when testing the zope3 setup was that the resources were not found on the server, using the following vhost settings:
<VirtualHost *:80>The "test_site" was a simple folder with a index_html page, but when accessing @@contents.html, all the resources (images, css) were missing. Tracing the problem through this thread to Jim Fulton's response it seems that the 'test_site' should be made a site, in the Zope 3 sense, and things really start working after that.
ServerName pixelblaster.ro
ServerAlias www.pixelblaster.ro
RewriteEngine on
RewriteRule ^(/?.*) http://localhost:8080/test_site/++vh++http:%{SERVER_NAME}:80/++$1 [P,L]
ProxyVia On
## prevent the webserver from beeing used as proxy
<LocationMatch "^[^/]">
Deny from all
</LocationMatch>
</VirtualHost>
2007-01-12
Firebug getting close to 1.0
Wow! I am impressed. Following a discussion on slashdot I've installed the new 1.0 beta version of Firebug, an extension for web developers. Created by the same author as the classic Dom Inspector, Firebug didn't seem too useful for me until now. The version on the mozilla extensions site is old (0.4), not so featured and to me it seemed to be really buggy. The new version seems to work very good and offers for each area of focus a multitude of information and options that puts it on first place in my toolkit as Plone web developer.