Posts tagged 'plone' – Page 4

Deliverance, Plone, and tags

It’s been a little bit of time since my last post, and who can blame me with my site having been down for almost 2 full days over the last week!  I’m not paying that much for the webspace, thankfully, but if I was, I’d be seeing red over it.  Apparently some patch for MySQL broke everything; imagine how it looked to see my site with a ‘500 internal error’ plastered all over it and not being able to access my cPanel. Ugh.

Anyway, everything’s back again, assuming that you can see this.  Okay? Great!

Today …

Plone/Zope, Python and collective.autoreload / plone.reload

Here’s an interesting error message I got stumped with for a good set of hours.  The issue started with me using collective.autoreload with Plone and it does the trick, mostly.  With any such ‘operation’ and live reloading of code for Python, you’ve got to expect that not everything will go according to plan.  Most things do, but one issue I found presented with this error message:

< ... huge traceback ...>
TypeError: super(type, obj): obj must be an instance or subtype of type

The issue arises for me (and you’ll probably see it elsewhere) when I go ahead …

Missing content menus in Plone

Another dose of insanity please!  Coming right up, sir.

Today’s second discussion comes from an issue I was having recently with a new Plone site that I was hosting behind Apache and Deliverance.  No Varnish here yet, because I’d rather the site worked first before I try and cache the life out of it.

Now, the specific problem I was having was that the content menus in Plone (eg Add New, Display, State, Actions and for me, Sub-types) weren’t displaying.  I thought it a Deliverance issue - maybe I was dropping those content items accidentally or not including …

Migrating a Plone site off to another database (Zeo)

Another of the interesting things in my professional life has been migrating a Plone site from one database (where it lived as a dev site, along with many others) onto a nice, clean database of its own.  Now, yes, I’m aware that the export/import feature of Zope isn’t supposed to be used for migrating content or sites.  I am also aware, however, through personal experience, that things have always been fine because I’m using the same eggs and essentially the same installations everywhere, thanks to buildout.

So, the process goes as follows, with the above-mentioned points …

PloneFormGen (Plone) & Google Calendar Integration

It’s a little bit of a different mash-up, but it’s still nonetheless useful to have, given types of booking forms and so forth that could utilise it.  The easiest way I found (to avoid security issues with Python scripts in Plone) was to create an external method and just import it within a PFG Custom Adapter.

Parts

  • My GoogleCalendar.py external method.  I’ve had to add this into a policy product I have.  The function should be generalised enough to work with any Google account, hosted or not.  In short:

    • It takes in a variety of arguments …

Buildout: the biggest problems have the simplest answers…

..and how true that is.  Today’s time consumer is directly related to just 1 misplaced line of a buildout configuration (and presumably something that’s changed somewhere else).

The result

After much hunting and hunting, it turns out my Zope2 Fake Eggs weren’t being generated.

On my long quest I had to go through downloading new packages and trying to find something that had changed and even trying to establish new virtual environments on different VMs.  Nothing would fix the problem. To rub salt in the wound, my desktop Ubuntu ran the buildout fine, so methinks the underlying …

Deliver me from … Deliverance?

Always one for being on and beyond the bleeding edge of new technology, I’ve (with the help of colleagues) been setting up a new technology for applying themes to web sites.  In particular, I’m applying Deliverance to Plone and whilst I’m not the first one to venture out into the wilderness this way, I’ve got to be thinking that I could be one of the few people documenting their experience.  Ah, but where to begin?

The proxy

Ah yes, the proxy.  Deliverance is very kind to us in that it operates it’s own proxy.  This …

Plone: Re-ordering Viewlets

Just responded to a post on the Plone Nabble forums (here) about how to re-order viewlets.  In particular, this one is little different (but not terribly so) because the original poster wanted to put the breadcrumbs above the global sections (global tabs in Plone).  Normally, this is straight forward because you just use a Generic Setup profile (viewlets.xml) and use an order manager to move your viewlet.  This, however, is a teeny bit more complicated because you’ve got one viewlet that’s outside of another viewlet manager.

Without further ado, my post from the forums:

Check out http …

Creating & distributing a new Plone/PyPI product

It’s amazing to see how technologies can be so smoothly integrated these days.  I’m talking, at least in this instance, about how setuptools works with PyPI (and then Plone.org’s Products section) and allows you to distribute your product(s) to the world.  So far, I’ve just got the one — collective.portlet.googleapps — but I’m sure time will pass and I’ll have some more useful things to contribute. Here’s a summary of what I did:

  1. Create the product.  ZopeSkel is a wonderful help here for Plone products. [I lie a little bit in …

Virtualenv, Plone, and Centos 5.x

EDIT: Watch out for python-ldap 2.3.10, the latest version at time of writing. Seems like there’s an issue with it and Centos 5.4. Forcing python-ldap to be version 2.3.8 works, though. (easy_install python-ldap==2.3.8)

Previously, you might have read about setting up a Virtualenv on Ubuntu Jaunty. Now, that was reasonably painless since python-virtualenv and python-setuptools is in the Ubuntu repo. Whether it’s my Centos servers and their misguided repos or me just not being able to find such a related rpm packages, Centos just needs little more love to get …