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!

Viewing Issue Simple Details Jump to Notes ] Wiki ] View Advanced ] Issue History ] Print ]
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 Project Name In-Portal CMS
Assigned To alex Developer
Priority normal Resolution fixed Fixed in Version 5.2.0
Status closed Product Version 5.2.0-RC1 Target Version 5.2.0
Time EstimateNo estimate
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
Tags No tags attached.
Change Log Message Fixes problem with multilingual field not being sorted including fallback code
Estimate Points 1
Attached Files patch file icon ml_sorting_fix_520.patch [^] (1,159 bytes) 2012-07-22 08:45 [Show Content]
patch file icon ml_sorting_fix_513.patch [^] (1,165 bytes) 2012-07-22 08:45 [Show Content]

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
User avatar (0004813)
alex (manager)
2012-07-22 08:55

Will test all together later.
User avatar (0004815)
alex (manager)
2012-07-23 08:57

Fix committed to 5.2.x branch. Commit Message:

Fixes 0001366: Multilingual field sorting not working in some cases
User avatar (0004822)
alex (manager)
2012-07-25 05:29

Since 5.2.0 version was released.

- Related Changesets
In-Portal CMS: 5.2.x r15466
Timestamp: 2012-07-23 08:57:39
Author: alex
Details ] Diff ]
Fixes 0001366: Multilingual field sorting not working in some cases
mod - /in-portal/branches/5.2.x/core/kernel/utility/formatters/multilang_formatter.php Diff ] File ]

- Issue History
Date Modified Username Field Change
2012-07-25 05:29 alex Note Added: 0004822
2012-07-25 05:29 alex Status resolved => closed
2012-07-23 08:57 alex Note Added: 0004815
2012-07-23 08:57 alex Status reviewed and tested => resolved
2012-07-23 08:57 alex Fixed in Version => 5.2.0
2012-07-23 08:57 alex Resolution open => fixed
2012-07-23 08:57 alex Assigned To !COMMUNITY => alex
2012-07-23 08:57 alex Changeset attached 5.2.x r15466
2012-07-22 08:55 alex Note Added: 0004813
2012-07-22 08:55 alex Status needs testing => reviewed and tested
2012-07-22 08:49 alex Assigned To => !COMMUNITY
2012-07-22 08:49 alex Developer => alex
2012-07-22 08:49 alex Status active => needs testing
2012-07-22 08:47 alex Reference =>
2012-07-22 08:45 alex File Added: ml_sorting_fix_513.patch
2012-07-22 08:45 alex File Added: ml_sorting_fix_520.patch
2012-07-22 08:44 alex New Issue
2012-07-22 08:44 alex Change Log Message => Fixes problem with multilingual field not being sorted including fallback code
2012-07-22 08:44 alex Estimate Points => 1

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

Powered by Mantis Bugtracker