Skip to content

Commit

Permalink
The Plone site root is now cataloged
Browse files Browse the repository at this point in the history
Fixes #3314
  • Loading branch information
ale-rt authored and talarias committed Dec 23, 2021
1 parent 3d30aef commit cf0a6d6
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 14 deletions.
1 change: 1 addition & 0 deletions Products/CMFPlone/CatalogTool.py
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,7 @@ def indexObject(obj, path):
pass
self.manage_catalogClear()
portal = aq_parent(aq_inner(self))
indexObject(portal, '')
portal.ZopeFindAndApply(
portal,
search_sub=True,
Expand Down
13 changes: 0 additions & 13 deletions Products/CMFPlone/Portal.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,19 +222,6 @@ def isEffective(self, date):
# Override DefaultDublinCoreImpl's test, since we are always viewable.
return 1

# Ensure portals don't get cataloged.
def indexObject(self):
pass

def unindexObject(self):
pass

def reindexObject(self, idxs=None):
pass

def reindexObjectSecurity(self, skip_self=False):
pass


# Remove the IContentish interface so we don't listen to events that won't
# apply to the site root, ie handleUidAnnotationEvent
Expand Down
2 changes: 1 addition & 1 deletion Products/CMFPlone/tests/testCatalogTool.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
group2 = 'g2'

base_content = ['Members', 'aggregator', 'aggregator',
'events', 'news', TEST_USER_ID, 'doc']
'events', 'news', 'plone', TEST_USER_ID, 'doc']


class TestCatalogSetup(PloneTestCase):
Expand Down
7 changes: 7 additions & 0 deletions Products/CMFPlone/tests/testPortalCreation.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,13 @@ def testWorkflowIsActionProvider(self):
'portal_workflow' in self.actions.listActionProviders()
)

def testPortalIsIndexed(self):
# The Plone site should be cataloged
res = self.catalog(getId="plone")
self.assertEqual(len(res), 1)
self.assertEqual(res[0].getId, "plone")
self.assertEqual(res[0].Title, "Welcome to Plone")

def testMembersFolderMetaType(self):
# Members folder should have meta_type 'Dexterity Container'
members = self.membership.getMembersFolder()
Expand Down
1 change: 1 addition & 0 deletions news/3314.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The Plone site root is cataloged

0 comments on commit cf0a6d6

Please sign in to comment.