Posts tagged '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 …

Extracting a Buildout versions.cfg from a Zope instance script

Today, I needed to migrate some legacy Plone installs set up using Buildout. If I were to simply move the buildout files and re-run buildout, I’d end up with the latest versions of add-on products - and since I’m using legacy versions of Plone 3, that’d almost certainly break the system.  I do know about the Buildout extension buildout.dumppickedversions (which does what its name suggests and exports picked versions of eggs) but I can’t re-run buildout to get this extension for risk of updating existing products (what I’m trying to avoid!).

The good news is …

Can’t run Plone/Zope buildout on Ubuntu 11.04 after upgrade from 10.10

After upgrading from Ubuntu 10.10 (Maverick Meerkat) to Ubuntu 11.04 (Natty Narwhal), you’ll probably find that if you’re running a Plone 4 buildout where you need to upgrade the Plone version, that compilation of Zope will fail. The output will look something like this:

Getting distribution for 'Zope2==2.12.17'.
In file included from src/AccessControl/cAccessControl.c:51:0:
include/ExtensionClass/ExtensionClass.h:83:20: fatal error: Python.h: No such file or directory
compilation terminated.
error: Setup script exited with error: command 'gcc' failed with exit status 1
An error occured when trying …

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 …