Posts tagged 'problem'

Python eggs and missing files (like ‘docs’)

This is pretty trivial (and trivial to fix), but I’m chronicling it for my knowledge as much as anyone else’s.  The issue is that a given Python egg is missing some form of files, most commonly the ‘docs’ directory in my experience, because the build wasn’t configured correctly.

The error goes somewhat like this:

Getting distribution for 'my.theme'.
error: docs/HISTORY.txt: No such file or directory
An error occured when trying to install my.theme 1.5.0. Look above this message for any errors that were output by easy_install.

The solution is simple: just …

DIY - Replace your Logitech Premium Notebook Headset foam ear pads

So, I’m the proud owner of a set of a Logitech Premium Notebook Headset. I purchased these headphones a fair while ago - around 2 years - and just like any set of headphones, the foam ear pads deteriorated away when I took them out to use them after a long spell in storage. Usually, this wouldn’t be a problem if it were a set of headphones that used a standard shaped ear pad — just buy some replacement foam pages and put them on. These headphones aren’t so, with the shape being more like a D shape rather than …

Bad relationships: RelationChoice, RelationCatalog and removed Dexterity content in Plone

Disclaimer: this post isn’t giving relationship advice (or..it is in some twisted way).  Unsurprisingly, removing content in Plone via the ZMI when Plone says something can’t be deleted is likely to cause problems.

In my case, the fact I removed a Dexterity-based container (“Project”) caused users to no longer add or edit content of my Project type.  The reason for this boiled down to my use of RelationChoice fields, in order link Projects to Person objects and vice versa.  The backend storage for the RelationChoice field is an instance of z3c.relationfield.index.RelationCatalog, and this keeps …

Plone: running Plone without copies of blobs

Having a bad day? Just bombed your only copies of some files that you’d been storing as blobs together with your Plone database? Maybe you had the blobs stored incorrectly on your Zeo client, rather than the server, and then in a hasty effort to free some space (due to an on-going issue with blobs eating HDD space), deleted them. Whoops..they’re gone and their references are still in your Plone database. Or, in a less disastrous situation, maybe you just want to be able to run your Plone database without needing lost blobs? Read on.The suggestion …

Plone: Overrides.zcml gets auto-included with z3c.autoinclude

Unsurprisingly, specifying a z3c.autoinclude entry point in your Plone product egg means your ZCML gets automatically included. That’s great because it means you don’t have to specify your product under the ZCML section of your instance in buildout. One thing that isn’t so obvious (it’s not mentioned that I can see on plone.org) is that if your package is marked for ZCML autoinclude, then Plone will automatically load an overrides.zcml file in your product.

Nothing hits you like a slippery wet fish in the face more than hitting this issue and having it …

Plone 4: Local Zeo blobs conflict with Plone instance

As the title suggests, there’s a conflict between a Zeo database instance being run together with a Plone 4/Zope instance, and them trying to share the same blob storage folder.  But, this only happens if you misunderstand or incorrectly set the option of  shared-blob = off, and blob-storage to be the same location as for Zeo in your buildout. If that previous set of (seemingly jumbled) thoughts doesn’t make any sense to you, then move along, nothing to see here.

By default, at the time of writing, blob support within Zeo runs with the bushylayout, and creates …

Plone: SiteManager leftovers; not the good kind

Note

Update: You should check out wildcard.fixpersistentutilities - it’s a fantastic solution to problems like this. Many thanks to Nathan Van Gheem, the author of the add on. Check out the link and see how to install it (temporarily) on your Plone instance that needs its site manager cleaned up.

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 …

Plone, Dexterity, and Incorrect Widgets

A nice ‘gotcha’ is the distinction between Zope’s schema.Date and schema.Datetime. The difference is obvious and straightforward when the two terms are laid out side-by-side: one is for dates only and the other adds a time component. Where things fell down for me in my usage of these fields with a Dexterity-based content type in Plone is the human component. When these fields are mashed in together within a lot of other text/Python/names, it’s easy to miss those 4 little letters of ‘time’. This lead me trying to use a DatetimeFieldWidget when I really …

CSS: Internet Explorer and Self-Imposed Limitations (+ Plone)

Microsoft and IE are insane.  Yes, we all knew this, but here’s the proof:

IE won't accept more than 30 style sheets to be loaded via <style> tags within a single page.

Insanity?  Yes.  It’s made even worse by the fact they openly admit this lunacy!  See the relevant support article from MS as proof.

Good gosh.  I can just imagine the staff (managers, probably) from Microsoft thinking “30 style sheets?  Who needs more than 30 style sheets?  Just kill off anything after that and those sites that use that many can BURN.”

I mean, really, who does …

Apache: Directories and trailing slashes

Apache does something interesting (yes, I still think it’s logical) when you’re accessing a directory that it’s serving: if you access it without a trailing slash, it’ll add one by default. This makes sense if you’re going after some static content or a folder index (or pretty much any sane usage) but it didn’t fit my use case of serving Plone using rewrite rules in a .htaccess file.

The issue that arises for myself with Plone is that my sites need to have their access customised through that .htaccess file and that’s been …