In-Portal Issue Tracker - In-Portal CMS
Viewing Issue Advanced Details
848 [In-Portal CMS] Database bug report always 2010-08-31 14:06 2011-03-30 09:53
alex  
alex  
normal  
closed 5.1.0  
fixed  
 
none 5.1.2-B1  
http://groups.google.com/group/in-portal-bugs/browse_thread/thread/cdf4e9e5e56557cb
Fixes multi-language data when Primary language is changed
0
0000848: Copying missing translatable data when Primary language is changed
There are 2 types of columns in database tables, that In-Portal uses:
* columns, that have different value on each language (e.g. l1_Name, l2_Name, l3_Name, l1_Description, etc.);
* columns, that have same value on each language (Status, FieldName, Type).

In case, when language-dependent column doesn't have value on given language, then value from primary language is displayed. All works fine, until primary language is changed.

Best way to solve this is to copy data language-dependent data from old primary language columns into new primary language columns.

I think, that kMultiLanguageHelper is perfectly suited for this task, since it already keeps track of all language-dependent columns through all database. For each language-dependent column will issue database query that will copy only missing data, so any entered data on new primary language will be preserved.

Code described above should on primary language change (Set Primary button on toolbar or primary checkbox on language editing).
patch copy_missing_data_on_primary_language_change.patch (5,104) 2011-01-04 05:01
http://tracker.in-portal.org/file_download.php?file_id=894&type=bug
Issue History
2011-03-30 09:53 Dmitry Note Added: 0003356
2011-03-30 09:53 Dmitry Status resolved => closed
2011-01-09 08:23 alex Note Added: 0003174
2011-01-09 08:23 alex Status reviewed and tested => resolved
2011-01-09 08:23 alex Fixed in Version => 5.1.2-B1
2011-01-09 08:23 alex Resolution open => fixed
2011-01-09 08:23 alex Assigned To !COMMUNITY => alex
2011-01-09 08:23 alex Changeset attached 5.1.x r14124
2011-01-05 13:44 Dmitry Note Added: 0003171
2011-01-05 13:44 Dmitry Status needs testing => reviewed and tested
2011-01-05 13:32 Dmitry Change Log Message => Fixes multi-language data when Primary language is changed
2011-01-04 05:01 alex Assigned To Dmitry => !COMMUNITY
2011-01-04 05:01 alex Developer Dmitry => alex
2011-01-04 05:01 alex Status needs work => needs testing
2011-01-04 05:01 alex File Added: copy_missing_data_on_primary_language_change.patch
2010-09-28 14:04 Dmitry Assigned To => Dmitry
2010-09-28 14:04 Dmitry Status active => needs work
2010-09-28 12:04 Dmitry Developer => Dmitry
2010-09-28 12:04 Dmitry Target Version Icebox => 5.1.2
2010-08-31 14:06 alex New Issue
2010-08-31 14:06 alex Reference => http://groups.google.com/group/in-portal-bugs/browse_thread/thread/cdf4e9e5e56557cb

Notes
(0003171)
Dmitry   
2011-01-05 13:44   
Tested good, please commit.
(0003174)
alex   
2011-01-09 08:23   
Fix committed to 5.1.x branch. Commit Message:

Fixes 0000848: Copying missing translatable data when Primary language is changed
(0003356)
Dmitry   
2011-03-30 09:53   
Closing, since 5.1.2 release has been released.