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
0000349 [In-Portal CMS] Admin Interfaces bug report always 2009-10-05 06:36 2010-01-11 22:01
Reporter alex View Status public Project Name In-Portal CMS
Assigned To alex Developer
Priority critical Resolution fixed Fixed in Version 5.0.2-B1
Status closed Product Version 5.0.1 Target Version 5.0.2
Time EstimateNo estimate
Summary 0000349: Interface language is not changed, when language is switched from top frame
Description When I switch language in top frame, then all administrative console is still shown on same language as before. I think, that data display language is changed instead of interface language.
Additional Information This is latest version of fixed kApplication::GetDefaultLanguageId method

function GetDefaultLanguageId($init = false)
    {
        static $language_info = null;

        if (!isset($language_info)) {
            // cache primary language info first
            $table = $this->getUnitOption('lang', 'TableName');
            $id_field = $this->getUnitOption('lang', 'IDField');

            $sql = 'SELECT ' . $id_field . ', IF(AdminInterfaceLang, "Admin", "Front") AS LanguageKey
                    FROM ' . $table . '
                    WHERE (AdminInterfaceLang = 1 OR PrimaryLang = 1) AND (Enabled = 1)';
            $language_info = $this->Conn->GetCol($sql, 'LanguageKey');
        }

        $language_key = ($this->IsAdmin() && $init) || count($language_info) == 1 ? 'Admin' : 'Front';

        if (array_key_exists($language_key, $language_info) && $language_info[$language_key] > 0) {
            // get from cache
            return $language_info[$language_key];
        }

        $language_id = $language_info && array_key_exists($language_key, $language_info) ? $language_info[$language_key] : false;

        if (!$language_id && defined('IS_INSTALL') && IS_INSTALL) {
            $language_id = 1;
        }

        return $language_id;
    }
Tags No tags attached.
Reference http://wiki.intechnic.lv/index.php/%D0%97%D0%B0%D1%8F%D0%B2%D0%BA%D0%B0:%D0%A3%D0%B1%D1%80%D0%B0%D1%82%D1%8C_AdminPrimaryLang_%D1%84%D1%83%D0%BD%D0%BA%D1%86%D0%B8%D0%BE%D0%BD%D0%B0%D0%BB%D1%8C%D0%BD%D0%BE%D1%81%D1%82%D1%8C
Change Log Message
Estimate Points 0
Attached Files patch file icon admin interface language changing.patch [^] (14,843 bytes) 2009-10-05 08:36 [Show Content]
patch file icon admin login screen language incorrect_v2.patch [^] (2,850 bytes) 2009-10-12 05:46 [Show Content]
patch file icon admin_interface_language_change_fix_v3.patch [^] (20,564 bytes) 2009-11-18 07:21 [Show Content]
patch file icon admin_interface_language_change_fix_v4.patch [^] (29,296 bytes) 2009-12-22 05:01 [Show Content]

- Relationships Relation Graph ] Dependency Graph ]
parent of 0000464closed (5.0.2)alex Changes in "External Url" processing 
parent of 0001304closed (5.2.0)alex Parameters "use_section" and "pass_category" are ignored by m_RequireLogin tag in mod-rewrite 
parent of 0001413resolvedalex Simultaneous editing message not shown 

-  Notes
User avatar (0000820)
alex (manager)
2009-10-05 08:38

Patch "admin interface language changing.patch" is from CVS (not SVN), but some file matches and what doesn't match should go to core module files.
User avatar (0000881)
alex (manager)
2009-10-12 05:15
edited on: 2009-10-12 05:47

Patch "admin login screen language incorrect.patch" fixed problem in "admin interface language changing_v2.patch", that front-end primary language is used on login screen to administrative console.

User avatar (0000925)
Dmitry (manager)
2009-10-18 02:52

2nd Patched tested ok
User avatar (0000989)
Dmitry (manager)
2009-10-26 14:06

Moving this bug to 5.0.2 release.

Patch is tested successfully and should be applied.
User avatar (0001014)
Dmitry (manager)
2009-10-28 01:29

This needs some more tests and detailed review
User avatar (0001018)
alex (manager)
2009-10-29 03:33

All seems to be working now. Need to assemble all code/patches attached into one valid SVN patch against 5.0.x version and could give for testing then.
User avatar (0001077)
Dmitry (manager)
2009-11-10 12:03

Please proceed with creating Path for 5.0.x and return back for testing.
User avatar (0001154)
alex (manager)
2009-11-18 07:21

Use "admin_interface_language_change_fix_v3.patch" patch for testing.
User avatar (0001173)
Dmitry (manager)
2009-12-20 01:57

I have applied and it seems to be working, but by testing Languages functionality I have noticed some weird behavior and want to ask if you can shad some light here.

Please kindly explain how this should be working:

1. Language setting - User Primary - what's effected when set
2. Language setting - Admin Primary - what's effected when set
3. Top Frame setting - what's effected when set to 2nd language.

The problem that I have experienced is that no matter if I have set all or one of above settings had NO effect on the data. I have added 2nd language Russian selected and translated one of the Sections to Russian and EXPECT to see it's in Russian by setting at 1 or all above setting to Russian - nothing help.

Can you please revie and get back.


Thanks.
User avatar (0001180)
alex (manager)
2009-12-20 05:53

Both user primary and user primary are used to detect what language should be used for interface (phrases) only, when none is specified explicitly in url.
Language dropdown in top frame only changes admin interface language, not data display language in forms.

Language dropdown in top of each form, that has multilingual fields only affects language, used to display data from multilingual fields on that form (sam with FCKEditor popup).
User avatar (0001201)
alex (manager)
2009-12-21 14:31

Final changes in specs:
1. top frame dropdown changes admin interface & admin data language
2. when add/edit form is opened pass "m_lang" as front-end primary language to make data language in this form to primary front-end languge. This will solve "primary_lang_required" error, when working with multilingual fields.
User avatar (0001202)
Dmitry (manager)
2009-12-21 14:34

Please proceed with the final specs.
User avatar (0001208)
alex (manager)
2009-12-22 05:02
edited on: 2009-12-22 05:04

I will commit it right away, so test on commited code.
Patch (v4) also includes patch from: 0000464 (Changes in "External Url" processing), because it can't work without it.

User avatar (0001209)
alex (manager)
2009-12-22 05:02

Fix committed to 5.0.x branch. Commit Message:

Fixes 0000349: Interface language is not changed, when language is switched from top frame
User avatar (0001210)
alex (manager)
2009-12-22 05:03

Reminder sent to: Dmitry

See 0000349:0001208.
User avatar (0001305)
Dmitry (manager)
2010-01-11 22:01

Closing completed tasks.

- Related Changesets
In-Portal CMS: 5.0.x r12970
Timestamp: 2009-12-22 05:02:37
Author: alex
Details ] Diff ]
Fixes 0000349: Interface language is not changed, when language is switched from top frame
mod - /in-portal/branches/5.0.x/core/admin_templates/catalog/advanced_view.tpl Diff ] File ]
mod - /in-portal/branches/5.0.x/core/admin_templates/catalog/catalog.tpl Diff ] File ]
mod - /in-portal/branches/5.0.x/core/admin_templates/catalog/item_selector/item_selector_toolbar.tpl Diff ] File ]
mod - /in-portal/branches/5.0.x/core/admin_templates/catalog_tab.tpl Diff ] File ]
mod - /in-portal/branches/5.0.x/core/admin_templates/categories/categories_edit_permissions.tpl Diff ] File ]
mod - /in-portal/branches/5.0.x/core/admin_templates/incs/form_blocks.tpl Diff ] File ]
mod - /in-portal/branches/5.0.x/core/admin_templates/login.tpl Diff ] File ]
mod - /in-portal/branches/5.0.x/core/admin_templates/reviews/reviews.tpl Diff ] File ]
mod - /in-portal/branches/5.0.x/core/admin_templates/users/user_edit_items.tpl Diff ] File ]
mod - /in-portal/branches/5.0.x/core/install/install_schema.sql Diff ] File ]
mod - /in-portal/branches/5.0.x/core/install/upgrades.sql Diff ] File ]
mod - /in-portal/branches/5.0.x/core/kernel/application.php Diff ] File ]
mod - /in-portal/branches/5.0.x/core/kernel/db/db_event_handler.php Diff ] File ]
mod - /in-portal/branches/5.0.x/core/kernel/languages/phrases_cache.php Diff ] File ]
mod - /in-portal/branches/5.0.x/core/kernel/nparser/nparser.php Diff ] File ]
mod - /in-portal/branches/5.0.x/core/kernel/processors/main_processor.php Diff ] File ]
mod - /in-portal/branches/5.0.x/core/kernel/session/inp_session.php Diff ] File ]
mod - /in-portal/branches/5.0.x/core/units/admin/admin_tag_processor.php Diff ] File ]
mod - /in-portal/branches/5.0.x/core/units/helpers/permissions_helper.php Diff ] File ]
mod - /in-portal/branches/5.0.x/core/units/languages/languages_event_handler.php Diff ] File ]
mod - /in-portal/branches/5.0.x/core/units/languages/languages_tag_processor.php Diff ] File ]
mod - /in-portal/branches/5.0.x/core/units/users/users_config.php Diff ] File ]
mod - /in-portal/branches/5.0.x/core/units/users/users_event_handler.php Diff ] File ]

- Issue History
Date Modified Username Field Change
2012-10-15 10:53 alex Relationship added parent of 0001413
2012-05-29 06:06 alex Relationship added parent of 0001304
2010-01-11 22:01 Dmitry Note Added: 0001305
2010-01-11 22:01 Dmitry Status resolved => closed
2009-12-22 05:15 alex Relationship added parent of 0000464
2009-12-22 05:04 alex Note Edited: 0001208 View Revisions
2009-12-22 05:03 alex Issue Monitored: Dmitry
2009-12-22 05:03 alex Note Added: 0001210
2009-12-22 05:02 alex Note Added: 0001209
2009-12-22 05:02 alex Status needs testing => resolved
2009-12-22 05:02 alex Fixed in Version => 5.0.2-B1
2009-12-22 05:02 alex Resolution open => fixed
2009-12-22 05:02 alex Assigned To !COMMUNITY => alex
2009-12-22 05:02 alex Changeset attached 5.0.x r12970
2009-12-22 05:02 alex Note Added: 0001208
2009-12-22 05:02 alex Assigned To alex => !COMMUNITY
2009-12-22 05:02 alex Status needs work => needs testing
2009-12-22 05:01 alex File Added: admin_interface_language_change_fix_v4.patch
2009-12-21 14:34 Dmitry Note Added: 0001202
2009-12-21 14:34 Dmitry Assigned To Dmitry => alex
2009-12-21 14:34 Dmitry Status needs feedback => needs work
2009-12-21 14:31 alex Note Added: 0001201
2009-12-20 05:54 alex Assigned To alex => Dmitry
2009-12-20 05:53 alex Note Added: 0001180
2009-12-20 01:57 Dmitry Note Added: 0001173
2009-12-20 01:57 Dmitry Assigned To !COMMUNITY => alex
2009-12-20 01:57 Dmitry Status needs testing => needs feedback
2009-11-18 07:21 alex Note Added: 0001154
2009-11-18 07:21 alex Assigned To alex => !COMMUNITY
2009-11-18 07:21 alex Status needs work => needs testing
2009-11-18 07:21 alex File Added: admin_interface_language_change_fix_v3.patch
2009-11-10 12:03 Dmitry Note Added: 0001077
2009-11-10 12:03 Dmitry Assigned To Dmitry => alex
2009-11-10 12:03 Dmitry Status needs feedback => needs work
2009-10-29 03:33 alex Note Added: 0001018
2009-10-29 03:33 alex Assigned To alex => Dmitry
2009-10-29 03:32 alex Additional Information Updated View Revisions
2009-10-28 01:29 Dmitry Note Added: 0001014
2009-10-28 01:29 Dmitry Status reviewed and tested => needs feedback
2009-10-26 14:06 Dmitry Note Added: 0000989
2009-10-26 14:06 Dmitry Target Version Icebox => 5.0.2
2009-10-25 13:53 alex Priority normal => critical
2009-10-18 02:52 Dmitry Note Added: 0000925
2009-10-18 02:52 Dmitry Assigned To !COMMUNITY => alex
2009-10-18 02:52 Dmitry Status needs testing => reviewed and tested
2009-10-12 05:47 alex Note Edited: 0000881 View Revisions
2009-10-12 05:47 alex File Deleted: admin login screen language incorrect.patch
2009-10-12 05:46 alex File Added: admin login screen language incorrect_v2.patch
2009-10-12 05:15 alex Note Added: 0000881
2009-10-12 05:15 alex File Added: admin login screen language incorrect.patch
2009-10-05 08:38 alex Assigned To => !COMMUNITY
2009-10-05 08:38 alex Status active => needs testing
2009-10-05 08:38 alex Note Added: 0000820
2009-10-05 08:36 alex File Added: admin interface language changing.patch
2009-10-05 06:54 alex Reference => http://wiki.intechnic.lv/index.php/%D0%97%D0%B0%D1%8F%D0%B2%D0%BA%D0%B0:%D0%A3%D0%B1%D1%80%D0%B0%D1%82%D1%8C_AdminPrimaryLang_%D1%84%D1%83%D0%BD%D0%BA%D1%86%D0%B8%D0%BE%D0%BD%D0%B0%D0%BB%D1%8C%D0%BD%D0%BE%D1%81%D1%82%D1%8C
2009-10-05 06:37 alex Target Version => Icebox
2009-10-05 06:36 alex New Issue



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

Powered by Mantis Bugtracker