Posts in 'Plone'

Members can’t add folders to Plone via WebDAV (401 Unauthorized)

This is a mirror of the (excellent) documentation at http://plone.org/documentation/error/unable-to-create-a-folder-through-webdav/, but just a short editorial to also highlight that this is still very applicable to Plone 4.x. Effectively, the symptom is that users will report seeing a “401 Unauthorized” error when trying to create folders within areas they have access to as an Owner.  Without further ado, the documentation:

Using a WebDAV client on a Plone site, site users are unable to create newfolders directories where they have Owner role.

Problem:

The WebDAV “make folder” method, MKCOL, requires the “Add Folders” permission. This is …

User IDs show as comment authors in Plone 4.x after migration from plone.app.discussion

If you’ve migrated your site from earlier versions of Plone to the latest ones in the 4.x series, or else have started using plone.app.discussion earlier than that, you might have come across a situation where comments on your site show user IDs as authors rather than a user’s full name. If you see this anywhere, chances are your comment’s migration didn’t go according to plan, and that the Creator information didn’t get recorded correctly on the comment.

I’ve just written this on the Collective developer docs: http://readthedocs.org/docs/collective-docs …

Epic-sized (Really Large) Files with Plone 4.1.2

In case you were ever curious, it’s definitely possible to upload epic-sized files within the Plone CMS. Browser support aside (Firefox and your 2 GB limits, I’m looking you), I’d previously had issues with being able to upload files larger than 4 GB, if memory serves correctly. Previously, there was an issue with files causing out-of-memory issues, and I’m fairly sure the errors I was getting were related to what was fixed by this change.

For today’s test, Google Chrome was able to upload a 26.3 GB (28212643840 bytes) .tar file into Plone on …

AttributeError: ‘NoneType’ object has no attribute ‘items’: Can’t upgrade Plone 3 to 4.x

You may have seen an error like the one below when you’ve gone to upgrade your Plone site to something in the Plone 4.x series from Plone 3:

2011-09-14 08:43:32 ERROR plone.app.upgrade Upgrade aborted. Error:
Traceback (most recent call last):
  File "/home/david/.buildout/eggs/Products.CMFPlone-4.1-py2.6.egg/Products/CMFPlone/MigrationTool.py", line 175, in upgrade
    step['step'].doStep(setup)
  File "/home/david/.buildout/eggs/Products.GenericSetup-1.6.3-py2.6.egg/Products/GenericSetup/upgrade.py", line 142, in doStep
    self.handler(tool)
  File "/home/david/.buildout/eggs/plone.app.upgrade-1.1-py2.6 …

Watch out: Python 2.4 ZEO client and Python 2.6 ZEO Server

Today was interesting when an issue with saving content on a Plone 3.3.5 site got reported to me. The system was producing undecipherable error messages about ZEO disconnections and database conflicts whenever someone would try and create some content within Plone (folders, particularly). Errors looked like:

Module ZEO.zrpc.connection, line 796, in wait. DisconnectedError" and "raise ReadConflictError().
ReadConflictError: database read conflict error"

and also:

ERROR ZEO.zrpc (2515) can't decode message: '(K\x11K\x01U\tserialnos(]((U\x08\x00\x00\x00\x00\x00X\x...'

— essentially the issue described here. My ZEO server was running ZODB3 3.9.5 …

Increasing Plone’s session timeout

What you may notice if you’re developing with Plone/Zope, is that if you’re storing small pieces of data within Plone’s session variable (the session_data_manager tool), data expires after a few minutes.  By default, this timeout is 20 minutes, but is far too short if you’re expecting the information stored to last for say the whole time a user is logged in.  In this situation, you’ll need to increase the timeout.

Documentation on changing the session timeout is potentially a little sketchy (Google “session-timeout-minutes zope”), but it’s clear that you need to change the …

Migrating Plone 2.5 content straight onto Plone 4

It’s my very last Plone 2.5 site and I’m very happy to see the back of it.  Using the joy that is quintagroup.transmogrifier, I was able to, without much manual effort, migrate my content from a Plone 2.5 site (constructed with instancemanager, of all things!) straight into a shiny new Plone 4 site on Buildout.

My only key need was to port the content and structure, and I was happy to make big allowances for the sake of certain content and time.  So, my thoughts here mightn’t (probably won’t!) suit everyone.My requirements …

Checking Plone REQUEST for Ajax’d requests (XMLHttpRequest)

Recently, I’ve needed a PloneFormGen (PFG) form of mine to have certain fields excluded when the form is displayed in one of Plone 4’s fancy popups.  At the same time, I need this field to still persist within the ‘standard’ view of the form.  It’s the request object to the rescue, and all I’ve had to do is insert this TALES expression against the Enabling Expression for my PFG field:

python:request.environ.get('HTTP_X_REQUESTED_WITH') != 'XMLHttpRequest'

and the end result is that unless the request is one of XMLHttpRequest, then we’ll show the field.

Shouldn …

Plone/Zope: Truncating a Data.fs back to a certain date/time

Okay. So, anyone out here who’s listening — particularly those overly-enthusiastic users — don’t try to recursively wget your Plone site (or other CMS, for that matter) whilst you’re logged in with an account that can make edits. It will lead to a very bad situation where your site administrator and technical team need to step in and fix your mistakes. For the uninitiated, a loose recursive wget (when logged in with some degree of Edit rights) will hit every link that’s on your pages, and I mean in the (X)HTML source. For a Plone site, this …

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 …