Posts tagged 'plone' – Page 5

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 …

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 …

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 …

Plone: Google Calendar Integration

Wouldn’t it be great if you could somehow add your Event content item within the Plone CMS onto your Google Calendar with just a click? (it’d be better with fewer, but 1 click is pretty good - give me a break!)

Try this placed inside the event_view page template (customise it in the ZMI) after the vCal and iCal links:

<a href="#"
tal:attributes="href python:'http://www.google.com/calendar/event?action=TEMPLATE'
+'&text='+here.title
+'&dates='+here.start().toZone('UTC').ISO8601().replace('-','').replace(':','').split('+')[0]+'Z/'
+here.end().toZone('UTC').ISO8601().replace('-','').replace(':','').split('+')[0]+'Z'
+'&location …

Buildout: Trying to create a Plone/Zope instance

Eeek…what’s this mean?

install() got an unexpected keyword argument 'allow_hosts'

after trying to build zope2zeoserver from my buildout configuration.

After some searching, I found that it was due to my bootstrap.py script (the one the gets buildout in the first place and creates the relevant scripts) was actually pulling down an outdated version of zc.buildout. So, the problem results because this old version of buildout doesn’t have a clue how to handle the given argument.

Solution: update the buildout. For me, that meant correcting the bootstrap script, but for you, it could be a matter …