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
0001432 [In-Portal CMS] Front End bug report always 2012-11-05 11:02 2012-11-08 07:54
Reporter alex View Status public Project Name In-Portal CMS
Assigned To alex Developer
Priority normal Resolution fixed Fixed in Version 5.2.1-B1
Status resolved Product Version 5.2.0 Target Version 5.2.1
Time EstimateNo estimate
Summary 0001432: Change first visit detection with language negotiation enabled
Description In-Portal has a feature (disabled by default), which allows automatically change website language to one, that matches language from "Accept-Language" header, sent by user's browser on first visit.

This way, when user opens http://www.website.tld/ (website on primary language, since no language in url) he is automatically redirected to http://www.website.tld/user-language/index.html.

There is only one major problem: first visit detection. We presume, that first visit is when no page has been specified = home page.

Since home page url is / instead of /index.html user is redirected to http://www.website.tld/user-language/index.html each time he wants to change language back to primary website language while staying on Home Page.

Solution:
Instead of redirect on empty url perform redirect only if referer isn't our website (using kHTTPQuery::refererIsOurSite method) in LanguagesItem::Load method (where redirect is made).
Additional Information
Tags No tags attached.
Reference https://groups.google.com/d/topic/in-portal-bugs/JfZfDA0uuko/discussion
Change Log Message Fixes redirect with language negotiation
Estimate Points 1
Attached Files patch file icon first_visit_language_1432.patch [^] (1,532 bytes) 2012-11-07 09:29 [Show Content]
patch file icon first_visit_language_1432_v3.patch [^] (1,551 bytes) 2012-11-07 11:25 [Show Content]
patch file icon first_visit_language_1432_v4.patch [^] (913 bytes) 2012-11-08 07:51 [Show Content]

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
User avatar (0005265)
erik (manager)
2012-11-07 06:21

Done. Patch attached. Needs testing
User avatar (0005268)
alex (manager)
2012-11-07 07:28

1. Proposed solution in task advised to REPLACE current check for empty url with referrer check. Please re-read task and fix.
User avatar (0005275)
erik (manager)
2012-11-07 09:31

1. Removed current check for empty url
2. Improved code formatting in work area (by use automatic formatting of IDE).
User avatar (0005286)
alex (manager)
2012-11-07 10:59

1. Used method "kHTTPQuery::refererIsOurSite" isn't declared as static and notice is issued on each call.
Please look at other code, that uses kHTTPQuery class and how it's been actually used.

2. Don't delete old patch version, but add "_vN" (e.g. "_v2", "_v3", etc.) to patch number and upload it. This way later on comments can be matched to uploaded patches.

User avatar (0005287)
erik (manager)
2012-11-07 11:26

Fixed usage of non-static method. New patch attached. Needs testing.
User avatar (0005291)
alex (manager)
2012-11-08 07:53

In "first_visit_language_1432_v4.patch" patch some changes that were not related to fixing were reverted and code rearranged to easily see what actually was changed.
User avatar (0005292)
alex (manager)
2012-11-08 07:53

OK
User avatar (0005293)
alex (manager)
2012-11-08 07:54

Fix committed to 5.2.x branch. Commit Message:

Fixes 0001432: Change first visit detection with language negotiation enabled

- Related Changesets
In-Portal CMS: 5.2.x r15621
Timestamp: 2012-11-08 07:54:14
Author: alex
Details ] Diff ]
Fixes 0001432: Change first visit detection with language negotiation enabled
mod - /in-portal/branches/5.2.x/core/units/languages/languages_item.php Diff ] File ]

- Issue History
Date Modified Username Field Change
2012-11-08 07:54 alex Changeset attached 5.2.x r15621
2012-11-08 07:54 alex Note Added: 0005293
2012-11-08 07:54 alex Status reviewed and tested => resolved
2012-11-08 07:54 alex Fixed in Version => 5.2.1-B1
2012-11-08 07:54 alex Resolution open => fixed
2012-11-08 07:53 alex Note Added: 0005292
2012-11-08 07:53 alex Status needs testing => reviewed and tested
2012-11-08 07:53 alex Note Added: 0005291
2012-11-08 07:51 alex File Added: first_visit_language_1432_v4.patch
2012-11-07 11:26 erik Note Added: 0005287
2012-11-07 11:26 erik Assigned To erik => alex
2012-11-07 11:26 erik Status needs work => needs testing
2012-11-07 11:25 erik File Added: first_visit_language_1432_v3.patch
2012-11-07 10:59 alex Note Added: 0005286
2012-11-07 10:59 alex Assigned To alex => erik
2012-11-07 10:59 alex Status needs testing => needs work
2012-11-07 09:31 erik Note Added: 0005275
2012-11-07 09:31 erik Assigned To erik => alex
2012-11-07 09:31 erik Status needs work => needs testing
2012-11-07 09:29 erik File Added: first_visit_language_1432.patch
2012-11-07 09:29 erik File Deleted: first_visit_language_1432.patch
2012-11-07 07:28 alex Note Added: 0005268
2012-11-07 07:28 alex Assigned To => erik
2012-11-07 07:28 alex Status needs testing => needs work
2012-11-07 06:21 erik Note Added: 0005265
2012-11-07 06:21 erik Developer => erik
2012-11-07 06:21 erik Status active => needs testing
2012-11-07 06:21 erik File Added: first_visit_language_1432.patch
2012-11-05 11:02 alex New Issue
2012-11-05 11:02 alex Reference => https://groups.google.com/d/topic/in-portal-bugs/JfZfDA0uuko/discussion
2012-11-05 11:02 alex Change Log Message => Fixes redirect with language negotiation
2012-11-05 11:02 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