Posts – Page 12

plone.app.blob and Failed Migrations

Another fun-and-games style problem I’ve come across when using plone.app.blob: sometimes migrations won’t work when converting a standard site’s files over to blobs.

That’s a pretty ambiguious description, but essentially, the error you might see will have a semi-normal traceback to start, and then garbage (contents of a file, presumably) - which, depending on the file size might hurt your browser.  The last part of the (normal) traceback reads thus:

File "/home/buildout/instance/eggs/plone.app.linkintegrity-1.0.11-py2.4.egg/ plone/app/linkintegrity/handlers.py", line 158, in referencedObjectRemoved raise LinkIntegrityNotificationException, obj LinkIntegrityNotificationException …

User-selectable Themes In Plone

It’s something I came across a while ago, but wasn’t exactly something that stayed in the fore-front of my mind: how to let users choose or select a theme (arbitrarily) on a Plone site.  Normally, I stick to having one theme per site for continuity but a new theme-test site for clients is an exception.

If you were to search Google for the right terms, you’ll find out how to let this happen, but I ended up having to go hunt it down myself. Hopefully this entry will help people (if I go and include as many …

DateTime in Python/Zope/Plone is painful

Alright, now for today’s problem:  why do two dates that look different when outputted actually end up being the same date?

Answer: I’m not sure, but I’m pretty sure it’s got something to do with the wacky support the above-mentioned 3 products have for timezones.

The background: Plone stores a DateTime object to record a user’s last login time.  It doesn’t really matter what’s purpose is, because Plone (this time) isn’t at fault.  The DateTime gets stored, no worries.  The problem arises when you try to put that value back into a …

Webpage content underneath Flash content

So, you’ve got a website that you’ve made and you’ve used a Flash movie on it.  Okay, no worries.  Now, what if you tried to add a (non-form-element) drop-down menu or some AJAX-ed content into the site, and found the Flash movie actually acted as an overlay?

This problem doesn’t seem consistent.  Different OSs, browsers, and Flash versions don’t indicate consistency - that’s what I’ve seen anyway.  Nevertheless, the problem persists for some users and it’s down-right annoying.

The fix?  Make your Flash code look similar to this:

<object data="my-movie.swf …

Virtualenv, Plone, and Ubuntu 9.04 Jaunty

What a complicated situation it is trying to use all of the above-mentioned pieces of software together. In all seriousness, Virtualenv is now appearing to be the best thing since sliced bread for me to help out with making Plone/Zope usable under Jaunty.

By default, as everyone should know by now, a whole bunch of old Python 2.4 packages got removed from Jaunty, throwing us Plone developers into peril.  Well, those of us who hadn’t discovered the joys of virtualenv yet, that is.

Here’s how to convert an existing buildout folder over to Virtualenv without too …

Unix: Removing Open Logical Volumes in Centos/RHL

Because I still haven’t remembered to set myself up with a limited-access account for blogging on my new site, I’m back here again. (EDIT: Migrated from old site)

This time is a lot of fun and games with removing an “open” logical volume from within a CentOS environment. The dom0 machine has a set of logical volumes in a volume group for each of the VMs and one of them went and failed dismally, and after its xen destruction (xm destory foo) its LV was left with it being “open”.

It’s not exactly easy to see how …

Plone: Issues with products

Oh dear. Products in Plone that don’t care to uninstall themselves at all when removed. One such product that comes to mind is ZipFileTransport.

I could go into depth all day about its failure to uninstall, but in specific, it’s this line of code in its setupHandlers.py file that kills me:

sm.registerUtility(ZipFileTransportUtility('zipfiletransport'), IZipFileTransportUtility)

Now, where’s the unregisterUtility called? Nowhere, unfortunately. So when one tries to go and install/uninstall/reinstall/do certain things on the site, you get a nasty failure message about trying to unpickle a python object:

2009-04-23 10:19:19 …

Plone: Clamping down on categories

Probably my last blog entry here because I’ll be moving to the AWESOME WordPress very soon @ http://davidjb.com/blog (with a nice new site design, too)  (EDIT: Migrated from my old blog 8-) ) . (2013 edit: Goodbye Wordpress, I really hate PHP and its security issues. I’m a Python developer and I really should be eating my own dogfood).

Anyway, how to prevent the addition of new categories to the Plone listing (the inline comments aren’t mine, they’re copied):

It’s a bit hidden and probably undocumented but here we go: ZMI -> portal_metadata -> schema tab (should …

My new site

Welcome to my new website and in particular, my new blog. My aim is to use this site now and slowly (but surely!) move away from the old haunts of Wikidot. It’s especially intelligent considering that I’m actually paying for webspace on a yearly basis (albeit not much money) but I figure I should be using it all the same.

So, without further ado - I declare my new site open for business. Much like Queensland Transport and the local city council around here, the road is under construction. So, please don’t blame me (to my face ;) ) for …

Plone: Plone4Artists Video - Can’t Edit Videos

Wow..I just keep hitting these problems. The latest issue is chronicled here: http://dev.plone4artists.org/pm/p/plone4artists/ticket/160

which essentially boils down to this problem when you try and edit a video subtyped File from p4a.plonevideo (or p4a.video or whatever it’s called now):

Traceback (innermost last):
* Module ZPublisher.Publish, line 119, in publish
* Module ZPublisher.mapply, line 88, in mapply
* Module ZPublisher.Publish, line 42, in call_object
* Module zope.formlib.form, line 769, in __call__
* Module p4a.video.browser.video, line 362, in update
* Module Products.Five.formlib.formbase, line 55, in update …