Ticket #840 (new enhancement)

Opened 3 years ago

Last modified 3 years ago

remove deprecated '_usage' catalog queries.

Reported by: jmorliaguet Assigned to: gracinet
Priority: P3 Milestone: CPS 3.5.0
Component: CPS (global) Version: 3.0.0
Severity: normal Keywords: deprecation warning
Cc:

Description

Using query parameters ending with '_usage' is deprecated (since Zope 2.4...)

lots of products are still using the old notation (did a grep on 'modified_usage') and found: CPSBlog, CPSBoxes, CPSDefault, CPSMailBoxer, CPSNavigation, CPSPortlets, CPSSchemas, CPSSkins

there are too many changes and too little test coverage to target it for 3.3.5, this could be targeted for a 3.4.0 release.

ZCatalog query using 'modified_usage' detected.
Using query parameters ending with '_usage' is deprecated.
Consider using record-style parameters instead (see lib/python/Products/PluginIndexes/README.txt for details)
  warn("\nZCatalog query using '%s' detected.\nUsing query parameters ending with '_usage' is deprecated.\nConsider using record-style parameters instead (see lib/python/Products/PluginIndexes/README.txt for details)" % usage_param, DeprecationWarning)

Change History

11/30/05 19:21:31 changed by fguillaume

  • priority changed from P2 to P3.

12/14/05 21:14:01 changed by gracinet

  • owner changed from fguillaume to gracinet.

Ok I'll do it slowly :-)

12/16/05 20:35:40 changed by gracinet

I did a grep on '_usage'. Hits:

Some in CMF products, mostly related to the fact that CMFCore.CatalogTool._convertQuery converts on the fly queries for 'effective' and 'expires' indexes. * CPSBoxes: trivial hit * CPSDefault: modified_usage in

  • schemas & layouts
  • generic_lib_search_form.pt. I don't want to mess with the template. I'll just have search.py convert on the fly
  • CPSNavigation:
    • CatalogNavigation._buildQuery: automatic treatment at beginning of method should be adapted. No test available.
    • CPSNavigation._buildQuery: copy/paste (must refactor)
    • schemas
  • CPSPortlets: hits are tests that _convertQuery does its job !
  • CPSSchemas: skin script getSearchWidgetContents.py
  • CPSSkins: skins script cpsskins_cmf/cpsskins_getCalendar.py

false hits (nothing to do with ZCatalog) : CPSDirectory, LDAPUserGroupsFolder, PluggableUserFolder

A side note: if I understand correctly the above linked README.txt, '_usage' was common convention, the general form is <index id>_<additional param>. Will check for other additional params later

01/03/06 19:50:22 changed by fguillaume

  • severity changed from minor to enhancement.
  • milestone changed from CPS 3.4.0 to CPS 3.4.1.

05/16/06 11:34:47 changed by sfermigier

  • milestone changed from CPS 3.4.1 to CPS 3.4.2.

05/19/06 16:57:19 changed by sfermigier

  • milestone changed from CPS 3.4.2 to CPS 3.4.3.