Ticket #2178 (closed defect: fixed)

Opened 9 years ago

Last modified 9 years ago

Fields validation not called (for Ascii field)

Reported by: gracinet Owned by: madarche
Priority: P2 Milestone: CPS 3.5.1
Component: CPSSchemas Version: TRUNK
Severity: blocker Keywords: ascii field unicode portlet


The CPS Ascii Field is supposed to enforce storage as plain string, guaranteed to be ascii, i.e. transtypable to unicode if needed, without error.

But actually the strings are still stored as unicode, which is unwanted for certain usages, like traversal. For example, the portlets upgrade step takes care of storing folder_rpath as plain str, but this is lost after any modification.

This issue is a showstopper for 3.5.1

Change History

comment:1 Changed 9 years ago by gracinet

  • Status changed from new to closed
  • Resolution set to fixed
  • Summary changed from Ascii field not really taken into account to Fields validation not called (for Ascii field)

Should be fixed now, simply by calling the ever-till-now unhooked validation method at the fields level. This method is now being called each time one wants to set anything in a datamodel and provides the last stage of normalization (in our case, casting to plain string) or refusal.

This has therefore also the advantage of tightening things up a lot, but can be harsh on client code relying on the fact that this has been quite lax till now.

All the components from the CPS-3 bundle have been checked and updated so that their unit tests pass in that new context. All of this has just been pushed to  http://hg.cps-cms.org

Note: See TracTickets for help on using tickets.