Skip to content

Conversation

@DavidHenne
Copy link
Contributor

Adds Search Settings tab in the CastleCMS control panel to allow excluding different content types from searches

@DavidHenne DavidHenne requested a review from zombified August 16, 2021 14:35
@DavidHenne DavidHenne self-assigned this Aug 16, 2021
Copy link
Contributor

@zombified zombified left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On the /@@search page there's a link to the "search exclusion panel" which leads to /@@search-exclusion-controlpanel -- but that is a mostly empty page AFAICT

I also got this error when going to the castlecms control panel after having visited there once to enable and add some types to search exclusion:

2021-11-30 15:21:55 ERROR Zope.SiteErrorLog 1638307315.480.106382470763 http://localhost:8080/Castle2/@@castle-settings
Traceback (innermost last):
  Module ZPublisher.Publish, line 138, in publish
  Module ZPublisher.mapply, line 77, in mapply
  Module ZPublisher.Publish, line 48, in call_object
  Module plone.z3cform.layout, line 66, in __call__
  Module plone.z3cform.layout, line 50, in update
  Module castle.cms.browser.controlpanel.settings, line 74, in update
  Module plone.z3cform.fieldsets.extensible, line 59, in update
  Module plone.z3cform.patch, line 30, in GroupForm_update
  Module z3c.form.group, line 132, in update
  Module z3c.form.form, line 129, in updateWidgets
  Module plone.app.registry.browser.controlpanel, line 50, in getContent
  Module plone.registry.registry, line 78, in forInterface
KeyError: 'Interface `castle.cms.interfaces.controlpanel.ICastleSettings` defines a field `exclude_from_searches`, for which there is no record.'

@DavidHenne
Copy link
Contributor Author

Okay, I combined the existing search exclusion view which listed content that had been individually selected to be excluded from searches, as well as the form from this pr that can exclude content by type

@zombified
Copy link
Contributor

still getting:

2021-12-01 13:13:35 ERROR Zope.SiteErrorLog 1638386015.590.863452793559 http://localhost:8080/CastleForSearchExclusion/@@search-exclusion-controlpanel
Traceback (innermost last):
  Module ZPublisher.Publish, line 138, in publish
  Module ZPublisher.mapply, line 77, in mapply
  Module ZPublisher.Publish, line 48, in call_object
  Module plone.z3cform.layout, line 66, in __call__
  Module plone.z3cform.layout, line 50, in update
  Module plone.z3cform.fieldsets.extensible, line 59, in update
  Module plone.z3cform.patch, line 30, in GroupForm_update
  Module z3c.form.group, line 132, in update
  Module z3c.form.form, line 129, in updateWidgets
  Module plone.app.registry.browser.controlpanel, line 50, in getContent
  Module plone.registry.registry, line 78, in forInterface
KeyError: 'Interface `castle.cms.interfaces.controlpanel.ISearchExclusionSettings` defines a field `exclude_from_searches`, for which there is no record.'

@zombified
Copy link
Contributor

reapplying 3002 upgrade step seemed to work fine -- but when I go and add the Parallax and Slideshow types to the exclusion times, and check the box to enable the exclusion, then create a slideshow with a single slide, then try to search for the title of the slideshow, I still get the slideshow in search results

@DavidHenne
Copy link
Contributor Author

alright, it should now constrain the allowed types when the catalog is queried on searches. should be good to go now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants