In-Portal Issue Tracker

Welcome to the In-Portal Open Source CMS Issue Tracker! This is a central management / tracking tool for all types of tasks / issues / bugs for the In-Portal Project. Before reporting any issues, please make sure to read the Guide into Issue Tracker and How to Properly Test and Report Bugs!

Relationship Graph View Issue ] Dependency Graph ]
related to child of duplicate of

Viewing Issue Simple Details
ID Category Type Reproducibility Date Submitted Last Update
0001366 [In-Portal CMS] Data Management bug report always 2012-07-22 08:44 2012-07-25 05:29
Reporter alex View Status public  
Assigned To alex
Priority normal Resolution fixed  
Status closed      
Summary 0001366: Multilingual field sorting not working in some cases
Description In-Portal can operate on single record (via kDBItem class) and on lists/grids (via kDBList class). For lists additionally sorting can be specified in following ways:

* via "ListSortings -> ForcedSorting" setting (in unit config), which defines sorting that is always in effect and can't be changed by user (usually by Priority field)
* via "ListSortings -> Sorting" setting (in unit config), which defines default sorting for a list of none was set by user
* via configuration settings from SystemSettings database table, which is same as sorting above, but can be changed any time without a need to edit PHP files of that unit config
* via kDBList::AddOrderField method call from PHP, which accompanies default sorting (added after/before it), that comes all places described above

All sortings of described above are added via kDBList::AddOrderField method eventually and he does 2 things:

* if field isn't translatable then leave it's name as is
* if field is translatable and language is indicated (e.g. l2_Name), then we sort by this field value only
*if field is translatable and language isn't indicated (e.g. Name), then we sort by this field value with fallback to primary language

All seems to be working normally until we start to work with multilingual fields. With multilingual fields we have field value split across N fields (1 field for each language).

Method kDBList::AddOrderField can handle all cases, but all mentions of translatable fields in unit config are pre-processed by kMultiLanguage formatter resulting in "Name" in "ListSortings" setting to be replaced with "l1_Name" and this way disabling fallback to primary language.

I think, that this is incorrect behavior, especially for users, who don't usually enter data on non-primary language in hopes, that primary language value fallback will kick-in in all places and save the day.
Additional Information

Web Development by Intechnic
In-Portal Open Source CMS
In-Portal Open Source CMS
Copyright © 2000 - 2009 MantisBT Group

Powered by Mantis Bugtracker