Ticket #840 (new enhancement)

Opened 14 years ago

Last modified 13 years ago

remove deprecated '_usage' catalog queries.

Reported by: jmorliaguet Owned by: gracinet
Priority: P3 Milestone: CPS 3.5.7
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

comment:1 Changed 14 years ago by fguillaume

  • Priority changed from P2 to P3

comment:2 Changed 14 years ago by gracinet

  • Owner changed from fguillaume to gracinet

Ok I'll do it slowly :-)

comment:3 Changed 14 years ago 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

comment:4 Changed 13 years ago by fguillaume

  • Severity changed from minor to enhancement
  • Milestone changed from CPS 3.4.0 to CPS 3.4.1

comment:5 Changed 13 years ago by sfermigier

  • Milestone changed from CPS 3.4.1 to CPS 3.4.2

comment:6 Changed 13 years ago by sfermigier

  • Milestone changed from CPS 3.4.2 to CPS 3.4.3
Note: See TracTickets for help on using tickets.