Posts Tagged ‘site’
Plone: SiteManager leftovers; not the good kind
Leftovers are typically useful when they’re in your fridge at home. They mean you don’t have to mess around making lunch for the next day for work, and can just grab them, and walk right out the door. Now, leftovers in the zope.component SiteManager aren’t so nice, especially when some Plone products fail to remove what they’ve registered. The consequences of this are that you’ve got references left which will break things when you uninstall/remove the physical eggs/files. These leftovers would be ones would be mutated food that comes to kill you after you’ve thrown it in the bin, assuming we follow the same analogy. But how to fix them? (more…)
Wget a Plone site (and make it actually work)
There’s a lot of different resources and posts on the web about how to export a Plone site to static html content, but no methodology would actually solve all of my problems. Now, Plone is inherently a complicated beast, given just how much it does, and that’s definitely putting it lightly. But here goes at my attempt to provide an actual, workable solution. Word for the wise though, this is for more than just your front-end administrator to handle. Also, instructions are designed for Ubuntu 9.10. Mileage may/will vary on other distros or OSes. (more…)
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 considered already:
- Head to the root of your ZMI and export your given Plone site as ZEXP
- Shut down your instance (or do what you will with your old site and installation)
- Copy the ZEXP file into the ‘import’ folder of your new Zope instance
- Start your new instance, with your new empty database
- Log in to the root of the ZMI
- Add a new Plone site and call it anything you want (eg ‘foo’). I’ll explain why shortly.
- Delete your ‘foo’ Plone site.
- Import your existing Plone site and be happy because it’s now arrived safe and sound.
Note
The reason I highlight adding a new Plone site a point 6 is because if originally, you were like me and imported your site first to a bare Zope install, you’ll get errors everywhere in your site. They’ll look like “AttributeError: getGroups” or possibly something more obscure (if possible!) and everything will fall over and die.
Now, by creating a new Plone site first ‘massages’ the root of Zope, and then your site should be fine. Among other things, adding a site changes the acl_users of the ZMI (seeing an abnormal acl_users is what led me to the solution). At a guess, given its type, this acl_users change probably has something to do with the error above.