Ticket #5592 (closed Bug: fixed)

Opened 6 years ago

Last modified 6 years ago

Reverse bridge to INonStructuralFolder not being checked correctly

Reported by: optilude Owned by: optilude
Priority: major Milestone: 2.5.1
Component: Navigation/Folder listings Keywords:
Cc:

Description

On Plone 2.5, a RichDocument shows up as a folder (it becomes a tab if it's in the root, the add menu refers to file and image attachment rather than 'add to folder'). This is because context.is_folderish() is True. This shouldn't be the case, since RD implements INonStructuralFolder.

INonStructuralFolder was converted to a Z3 interface and uses a reverse bridge. This bridge works (RichDocument finds it, and sets it with implements), however, the actual checks for this interface are not working. These checks are in CatalogTool.py the isStructuralFolder() method of @@plone, and is_folderish.py (which is in plone_deprecated).

All of these simply check for INonStructuralFolder.providedBy(context), which apparently returns False when context is implementing the Z2 reverse-bridged interface.

I'm not sure what the correct means of checking is in that case... Unfortunately, this means that non-structural folders no longer work in 2.5 for legacy products. For new products that use the Z3 interface, it should be working still.

Change History

comment:1 Changed 6 years ago by alecm

Perhaps this is related to #5569

comment:2 Changed 6 years ago by alecm

  • Milestone changed from 2.5.x to 2.5.1

comment:3 Changed 6 years ago by alecm

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

(In [10364]) Made is_folderish and isStructuralFolder respect the z2 INonStructuralFolder interface as well as the z3 one. This fixes #5569 and #5592. Also, added a migration to reindex the catalog, which is needed for #5569 and #5231.

Note: See TracTickets for help on using tickets.