Changing workflow state of many objects leads to FileStorageError

Hi all, I get this traceback when using the advanced status change form and try to change the workflow state of a folder and its many children. (Plone 5.1.6)

2022-03-26 14:19:08 ERROR Zope.SiteErrorLog 1648300748.020.591419022933 
Traceback (innermost last):
  Module ZPublisher.Publish, line 146, in publish
  Module Zope2.App.startup, line 303, in commit
  Module transaction._manager, line 131, in commit
  Module transaction._transaction, line 310, in commit
  Module transaction._transaction, line 301, in commit
  Module transaction._transaction, line 446, in _commitResources
  Module transaction._transaction, line 418, in _commitResources
  Module ZODB.Connection, line 481, in tpc_begin
  Module ZODB.mvccadapter, line 161, in tpc_begin
  Module ZODB.BaseStorage, line 212, in tpc_begin
  Module ZODB.FileStorage.FileStorage, line 775, in _begin
FileStorageError: description too long

This is caused by the change status description being longer than 65535 bytes. And so, the Zope transaction header cannot be written...

I worked around this by truncating the transaction description to much less than 64K in BaseStorage, just for this single case and reverted once done.

The proper way to solve this would be to have check how many objects will be affected by the intended state change and issue a warning to the user, and cover its behind a priori by providing a summary description of changes, rather than "Changed status of XXX at http://some.very.long/URL/for/every/object"

1 Like

This sounds familiar to me and I am mostly sure this was fixed already in a newer version of Plone. But a quick search was not enough to find the related issue.