Ticket #4344 (closed Bug: fixed)

Opened 11 years ago

folder_delete breaks IE if too many objects are deleted

Reported by: Anonymous User Owned by:
Priority: minor Milestone: 2.1.2
Component: General Version:
Keywords: Cc:


Not Uploaded Due To Size:

When a lot (tested with 100) of objects are deleted from a folder, Plone will generate a humongous portal_status_message, consisting of all titles concatenated together. This portal_status_message is then used as a query-string for a URL that the client is redirected to. This makes that, given enough titles, the URL becomes longer than the client can/wants to handle (in our case IE, FF doesn't seem affected by this problem, it just displays the full message), resulting in a nasty IE error page (something like 'Cannot find server or DNS error').

Patch included, which checks for the amount of deleted objects and displays a message without the titles if they are > 10 (currently hard-coded). This patch should be applied to CMFPlone/skins/plone_scripts/folder_delete.cpy.

Change History

comment:1 Changed 11 years ago by optilude

The patch didn't survive since you weren't logged in (or plone.org messed you up). I also expect this will apply to some other scripts that react to those buttons.

comment:2 Changed 11 years ago by limi

Please just paste in the patch directly - the issue tracker is old and buggy. :)


comment:3 Changed 11 years ago by alecm

This really needs to be fixed in the portal status message machinery, because there are many places where this may be an issue.

comment:4 Changed 11 years ago by Anonymous User

Here's my patch:

--- CMFPlone/skins/plone_scripts/folder_delete.cpy 2004-12-01 15:54:16.000000000 +0100 +++ CMFPlone/skins/plone_scripts/patched_folder_delete.cpy 2005-07-27 17:48:57.000000000 +0200 @@ -24,7 +24,10 @@

if ids:


  • message=', '.join(titles)+' has been deleted.'

+ if len(titles) < 10: + message=', '.join(titles)+' has been deleted.' + else: + message = 'Your objects have been deleted'

transaction_note('Deleted %s from %s' % (', '.join(titles_and_ids), context.absolute_url())) context.manage_delObjects(ids)

Note that it's really a fiddle-fix and should not be applied as-is, as noted by other commenters this problem will not just occur here, so should either be fixed in a number of places at the same time (in that case you can probably use my patch as an example, although it's really a bit ad-hoc) or, better yet, on a single location (probably the script that causes the redirect) where can be decided whether the query string is just too long for the browsers to consume. I fear that the latter solution will be a bit nasty, since by that time the actual meaning of the string can't be determined anymore and just cutting off a bit of the string may mean it doesn't make much sense as a status message anymore.

comment:5 Changed 11 years ago by hannosch

We have the code for general portal status message cleanup ready, which will not use GET (and therefore the URL) any more. So this will be resolved automagically than.

comment:6 Changed 11 years ago by optilude

  • Status changed from new to closed
  • Resolution set to fixed

Agree that the status message is the way to handle this, but another issue is that telling the user about 314 deleted items will just mess up the page and be useless. Manually applied/tweaked/redid the patch.

comment:7 Changed 4 years ago by davisagli

  • Component changed from Infrastructure to General
Note: See TracTickets for help on using tickets.