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 ]  Related Changesets ] View Advanced ] Issue History ] Print ]
ID Category Type Reproducibility Date Submitted Last Update
0000472 [In-Portal CMS] Front End feature request N/A 2009-12-23 02:04 2010-10-10 10:20
Reporter Dmitry View Status public Project Name In-Portal CMS
Assigned To alex Developer
Priority normal Resolution fixed Fixed in Version 5.1.0-B1
Status closed Product Version 5.0.2-B1 Target Version 5.1.0
Time EstimateNo estimate
Summary 0000472: Domain-based site auto-configuration
Description New Section (probably under Configuration->Website) that will allow
to configure multiple Domains that this website is running on.

2. Each domain (sub-domain) should have Default and Available for user
to select
(change)

- Geo-Location Match - by IP or Country (location).
a. List (range) of IP addresses / networks will be entered.
b. List of Countries + somehow we need to match IP to Country.
c. Force redirect for User to this domain if his IP (remote address)
falls.

- Primary Theme (drop-down) + Available Themes
- Primary Language (drop-down) + Available Languages
- Primary Currency (drop-down) + Available Currencies

3. By Default will be empty and won't make ANY changes to the current
default functionality.
Additional Information
Tags No tags attached.
Reference http://groups.google.com/group/in-portal-dev/browse_thread/thread/fceaac790c383560?hl=en
Change Log Message Ability to run and manage multiple Website-domains
Estimate Points 0
Attached Files patch file icon site_domains_core.patch [^] (57,116 bytes) 2010-02-03 06:21 [Show Content]
patch file icon site_domains_modules.patch [^] (12,703 bytes) 2010-02-03 06:21 [Show Content]
patch file icon site_domains_application_only_v2.patch [^] (5,086 bytes) 2010-03-09 12:50 [Show Content]
patch file icon site_domains_lang_theme_v2.patch [^] (1,075 bytes) 2010-03-09 13:00 [Show Content]
patch file icon site_domains_core_v2.patch [^] (56,354 bytes) 2010-05-01 11:24 [Show Content]
patch file icon site_domains_modules_v2.patch [^] (23,623 bytes) 2010-05-01 11:24 [Show Content]
patch file icon site_domains_core_v3.patch [^] (64,906 bytes) 2010-05-05 09:23 [Show Content]
patch file icon site_domains_modules_v3.patch [^] (25,776 bytes) 2010-05-05 09:23 [Show Content]

- Relationships Relation Graph ] Dependency Graph ]
related to 0000614closed (5.1.0)alex Ability to load kDBItem class object from hash 
related to 0000095closed (5.1.0)alex Support for Multi-Domain Installation 
parent of 0000773closed (5.1.0)Dmitry New Icons for "Site Domains" and "Countries & States" configuration sections 
related to 0000563closed (5.0.3)alex Toolbar button phrase translation doesn't work 
related to 0000564closed (5.0.3)alex Parameter "hint_label" isn't processed by "inp_edit_textarea" block 
related to 0000724closed (5.0.4)alex Original field values are not set after kDBItem::Create method call 
related to 0000884closed (5.1.1)alex Fatal error "Method name must be a string" on home page after Memcached server restart 

-  Notes
User avatar (0001447)
Dmitry (manager)
2010-02-01 14:28

2 Additional things that we need is (discussed in Groups, link above)

1. Email Events FROM Address (or just domain part of it)

2. SSL settings should be Site based too.
User avatar (0001449)
Dmitry (manager)
2010-02-02 10:57

Additional notes in regards to:

1. Regex option (check-box) for Domain and SSL Domains
2. Geo-Location:
  a. List of IPs or IP networks (one per line)
  b. "Force Redirect to this Domain" if IP matched
User avatar (0001451)
alex (manager)
2010-02-02 11:29

My interpretation:

1. add IPRange field (textarea) for to make this domain current no matter what domain was visited by user
2. add UseRegExpInDomainName, UseRegExpInSSLUrl to determine if regular expression is entered as domain/ssl domain name
User avatar (0001453)
alex (manager)
2010-02-03 06:22

Ready to be test, but we need to draw new icon for the tree.
User avatar (0001526)
alex (manager)
2010-03-09 09:12

TODO: move querySiteDomain and related functionality method from event handler to helper
User avatar (0001527)
alex (manager)
2010-03-09 12:51

Without "site_domains_application_only_v2.patch" method kApplication::siteDomainField fails to store current domain object in static variable. Patch uses kApplication class attribute for that purpose.
User avatar (0001528)
alex (manager)
2010-03-09 13:00

Patch "site_domains_lang_theme_v2.patch" fixes problem, that language/theme defined in site domain wasn't used as default, when mod-rewrite mode was off.
User avatar (0001529)
alex (manager)
2010-03-09 13:05

Also DomainIPRange field must not be "NOT NULL", since it's of "text" data type. Without it we will get SQL error, when we are creating domain without that field filled.
User avatar (0001533)
alex (manager)
2010-03-10 03:18

BUG: SiteDomains table isn't listed in "core/install/remove_schema.sql" file.
User avatar (0001893)
alex (manager)
2010-04-18 05:45
edited on: 2010-04-18 05:46

There have been new ideas on how to improve interface of this feature here:
http://groups.google.com/group/in-portal-dev/browse_thread/thread/448bb75ce0b078f7

Based on it there is what should be changed:
1. move all In-Commerce related fields to new tab named "In-Commerce" in site domain adding/editing form (added by In-Commerce module)
2. perform ALTER statement when In-Commerce is installed to all In-Commerce only used columns to SiteDomains table

Also we need to all "alt"/"title" attribute to "Use Regular Expressions" checkbox near domain name and domain ssl path fields.

User avatar (0002034)
alex (manager)
2010-05-01 11:25

Only apply "site_domains_core_v2.patch" and "site_domains_modules_v2.patch" files.
User avatar (0002051)
Dmitry (manager)
2010-05-02 22:13
edited on: 2010-05-02 23:06

Tested the patch, overall results are good!

Please find the notes below:

1. I get the following Warning on any installation step

Warning: Table 'inportal_51X.Currencies' doesn't exist (1146)
SQL:
    SELECT ISO
    FROM Currencies
    WHERE IsPrimary = 1
    LIMIT 0,1 in w:\SVN\in-portal-5.1.x\core\kernel\application.php on line 2679

Sounds like we need to move Currencies into the CORE module?


2. Clear "CachedUrls" table on change of Site Domains or other related operation (need to think what else is effected here).


3. We might want to completely DISABLE languages that are not listed as Available for current SiteDomain. I have came across the situation when I had French language loaded (ie. http://domain1.riga.com/SVN/in-portal-5.1.x/french/index.html). while it's NOT even available for selection of Languages, but once I typed it the language name in URL it worked.

I propose we:

Make that User can't load the items that are in list of Selected (if there are any) and simple redirect to Primary one (if exists). This reflects on:

- Languages
- Currencies
- Payment Types.


Additional Question

I want to clarify on how to do the setup when I need to have the same domain (ie. www.jurmala.com), but based on User IP be able to load different settings as we have now. Like if I come from Latvia (checked by IP) I want them so see site in Latvian by default, if come from US they will see in English, but still the domain will be the same. It's kind of different content on the same Domain based on Geo-Location.

As fas as I can see right now we are trying to match/query the DOMAIN name in querySiteDomain by name once and ONLY if not found will go search through this:


foreach ($site_domains as $id => $site_domain) {
                if (ipMatch($site_domain['DomainIPRange'], "\n")) {
                    if ($site_domain['RedirectOnIPMatch']) {
                        $this->Application->Redirect('external:http://' . $site_domain['DomainName'] . $_SERVER['REQUEST_URI']);
                    }

                    return $id;
                }
            }


Does it make sense to you what I am asking?

User avatar (0002052)
Dmitry (manager)
2010-05-02 23:05

Please see my prev. comments.
User avatar (0002054)
Dmitry (manager)
2010-05-04 15:13

Based on our last discussion - let's do the following:

1. Cleanup when changes made to SiteDomains

Clear "CachedUrls" table on change of Site Domains or other related operation (need to think what else is effected here).


2. Disable NOT available languages, currencies (optional), payment types (optional)

We might want to completely DISABLE languages that are not listed as Available for current SiteDomain. I have came across the situation when I had French language loaded (ie. http://domain1.riga.com/SVN/in-portal-5.1.x/french/index.html). while it's NOT even available for selection of Languages, but once I typed it the language name in URL it worked.

I propose we:

Make that User can't load the items that are in list of Selected (if there are any) and simple redirect to Primary one (if exists). This reflects on:

- Languages
- Currencies
- Payment Types.


3. Fix for IP based match redirect:

Please make sure IP if range is changed and redirected first as it's discussed here - http://groups.google.com/group/tba-discussion/browse_thread/thread/0a0e0047ccf319df#

Also, I think we would need to set a COOKIE if we completed redirect already so it won't happen next time.


4. Additions to Site Domains

Please add:

1. Description field

2. Adjust Redirecting options:

a. Change "Force Redirect" check-box to drop-down with 2 options:

- Disabled (nothing done)
- This Domain if IP matched
- External Domain if IP matched

b. Add "ExternalRedirectDomain" field (translation External Redirect Domain) after IP textarea field.


5. Possible issues multiple-records of the same SiteDomain.

In some cases users might want to show different Primary language and other Domain based settings based on IP address (network), but still remain on the same domain.

For example if I would setup 2 site domains - jurmala.com and jurmala.com and both would have different Primary (available) languages and Force Redirect based on IP match.

Example:

a. jurmala.com/index.html (from Riga would should show Latvian as primary language)
b. jurmala.com/index.html (from Chicago would should show English as primary language)

Now if we have MOD-REWRITE enabled this will NOT be working since we are using CachedUrl table and look at URL based on the CRC32 from URL so both will be the same in the above case.

I propose:

Add currently loaded Domain as a new field to CachedUrls or add it to the CRC32 mix which ever is more efficient.
User avatar (0002063)
alex (manager)
2010-05-05 09:23

Please test.
User avatar (0002068)
Dmitry (manager)
2010-05-05 12:44

Tested okay, please commit.
User avatar (0002195)
alex (manager)
2010-05-12 04:36

Fix committed to 5.1.x branch. Commit Message:

Fixes 0000472: Domain-based site auto-configuration
User avatar (0002517)
alex (manager)
2010-07-22 15:06

Closing, since 5.1.0 release has been released.

- Related Changesets
In-Portal CMS: 5.1.x r13559
Timestamp: 2010-05-12 04:36:46
Author: alex
Details ] Diff ]
Fixes 0000472: Domain-based site auto-configuration
add - /in-portal/branches/5.1.x/core/admin_templates/site_domains File ]
add - /in-portal/branches/5.1.x/core/admin_templates/site_domains/site_domain_edit.tpl File ]
add - /in-portal/branches/5.1.x/core/admin_templates/site_domains/site_domain_list.tpl File ]
mod - /in-portal/branches/5.1.x/core/install/english.lang Diff ] File ]
mod - /in-portal/branches/5.1.x/core/install/install_schema.sql Diff ] File ]
mod - /in-portal/branches/5.1.x/core/install/remove_schema.sql Diff ] File ]
mod - /in-portal/branches/5.1.x/core/install/upgrades.sql Diff ] File ]
mod - /in-portal/branches/5.1.x/core/kernel/application.php Diff ] File ]
mod - /in-portal/branches/5.1.x/core/kernel/constants.php Diff ] File ]
mod - /in-portal/branches/5.1.x/core/kernel/globals.php Diff ] File ]
mod - /in-portal/branches/5.1.x/core/kernel/processors/main_processor.php Diff ] File ]
mod - /in-portal/branches/5.1.x/core/units/admin/admin_tag_processor.php Diff ] File ]
mod - /in-portal/branches/5.1.x/core/units/helpers/helpers_config.php Diff ] File ]
mod - /in-portal/branches/5.1.x/core/units/helpers/mod_rewrite_helper.php Diff ] File ]
add - /in-portal/branches/5.1.x/core/units/helpers/site_helper.php File ]
mod - /in-portal/branches/5.1.x/core/units/languages/languages_event_handler.php Diff ] File ]
mod - /in-portal/branches/5.1.x/core/units/languages/languages_item.php Diff ] File ]
add - /in-portal/branches/5.1.x/core/units/site_domains File ]
add - /in-portal/branches/5.1.x/core/units/site_domains/site_domain_eh.php File ]
add - /in-portal/branches/5.1.x/core/units/site_domains/site_domains_config.php File ]
mod - /in-portal/branches/5.1.x/core/units/themes/theme_item.php Diff ] File ]
mod - /in-portal/branches/5.1.x/core/units/themes/themes_eh.php Diff ] File ]
mod - /in-portal/branches/5.1.x/core/units/users/users_event_handler.php Diff ] File ]
Modules :: In-Commerce: 5.1.x r13558
Timestamp: 2010-05-12 04:17:46
Author: alex
Details ] Diff ]
Bug 0000472: Domain-based site auto-configuration
add - /w/in-commerce/branches/5.1.x/admin_templates/site_domains File ]
add - /w/in-commerce/branches/5.1.x/admin_templates/site_domains/site_domain_edit.tpl File ]
mod - /w/in-commerce/branches/5.1.x/install/english.lang Diff ] File ]
mod - /w/in-commerce/branches/5.1.x/install/install_schema.sql Diff ] File ]
mod - /w/in-commerce/branches/5.1.x/install/upgrades.sql Diff ] File ]
mod - /w/in-commerce/branches/5.1.x/units/addresses/addresses_event_handler.php Diff ] File ]
mod - /w/in-commerce/branches/5.1.x/units/currencies/currencies_event_handler.php Diff ] File ]
mod - /w/in-commerce/branches/5.1.x/units/orders/orders_event_handler.php Diff ] File ]
mod - /w/in-commerce/branches/5.1.x/units/payment_type/payment_type_event_handler.php Diff ] File ]
add - /w/in-commerce/branches/5.1.x/units/sections File ]
add - /w/in-commerce/branches/5.1.x/units/sections/section_eh.php File ]
add - /w/in-commerce/branches/5.1.x/units/sections/sections_config.php File ]

- Issue History
Date Modified Username Field Change
2010-10-10 10:20 alex Relationship added related to 0000884
2010-10-10 10:20 alex Relationship added related to 0000095
2010-07-22 15:06 alex Note Added: 0002517
2010-07-22 15:06 alex Status resolved => closed
2010-06-10 15:00 Dmitry Relationship added parent of 0000773
2010-05-12 04:36 alex Changeset attached 5.1.x r13559
2010-05-12 04:36 alex Note Added: 0002195
2010-05-12 04:36 alex Status reviewed and tested => resolved
2010-05-12 04:36 alex Fixed in Version => 5.1.0-B1
2010-05-12 04:36 alex Resolution open => fixed
2010-05-12 04:36 alex Assigned To !COMMUNITY => alex
2010-05-12 04:17 alex Changeset attached 5.1.x r13558
2010-05-05 12:44 Dmitry Note Added: 0002068
2010-05-05 12:44 Dmitry Status needs testing => reviewed and tested
2010-05-05 11:21 alex Relationship added related to 0000724
2010-05-05 09:23 alex Note Added: 0002063
2010-05-05 09:23 alex Assigned To alex => !COMMUNITY
2010-05-05 09:23 alex Status needs work => needs testing
2010-05-05 09:23 alex File Added: site_domains_modules_v3.patch
2010-05-05 09:23 alex File Added: site_domains_core_v3.patch
2010-05-04 15:13 Dmitry Note Added: 0002054
2010-05-02 23:06 Dmitry Note Edited: 0002051 View Revisions
2010-05-02 23:05 Dmitry Note Added: 0002052
2010-05-02 23:05 Dmitry Assigned To !COMMUNITY => alex
2010-05-02 23:05 Dmitry Status needs testing => needs work
2010-05-02 23:05 Dmitry Note Edited: 0002051 View Revisions
2010-05-02 22:23 Dmitry Note Edited: 0002051 View Revisions
2010-05-02 22:23 Dmitry Note Edited: 0002051 View Revisions
2010-05-02 22:13 Dmitry Note Added: 0002051
2010-05-01 11:25 alex Note Added: 0002034
2010-05-01 11:25 alex Assigned To alex => !COMMUNITY
2010-05-01 11:25 alex Status needs work => needs testing
2010-05-01 11:24 alex File Added: site_domains_modules_v2.patch
2010-05-01 11:24 alex File Added: site_domains_core_v2.patch
2010-05-01 07:59 alex Relationship added related to 0000614
2010-04-28 11:44 Dmitry Change Log Message => Ability to run and manage multiple Website-domains
2010-04-18 05:46 alex Note Edited: 0001893 View Revisions
2010-04-18 05:45 alex Note Added: 0001893
2010-04-18 05:45 alex Assigned To !COMMUNITY => alex
2010-04-18 05:45 alex Status needs testing => needs work
2010-03-10 03:18 alex Note Added: 0001533
2010-03-09 13:05 alex Note Added: 0001529
2010-03-09 13:00 alex Note Added: 0001528
2010-03-09 13:00 alex File Added: site_domains_lang_theme_v2.patch
2010-03-09 12:51 alex Note Added: 0001527
2010-03-09 12:50 alex File Added: site_domains_application_only_v2.patch
2010-03-09 09:12 alex Note Added: 0001526
2010-02-27 04:21 alex Developer => alex
2010-02-03 06:22 alex Time Estimate Removed 10 =>
2010-02-03 06:22 alex Note Added: 0001453
2010-02-03 06:22 alex Assigned To alex => !COMMUNITY
2010-02-03 06:22 alex Status needs work => needs testing
2010-02-03 06:21 alex File Added: site_domains_modules.patch
2010-02-03 06:21 alex File Added: site_domains_core.patch
2010-02-03 05:58 alex Relationship added related to 0000564
2010-02-02 11:29 alex Note Added: 0001451
2010-02-02 10:57 Dmitry Note Added: 0001449
2010-02-02 09:29 alex Relationship added related to 0000563
2010-02-01 14:28 Dmitry Assigned To => alex
2010-02-01 14:28 Dmitry Status active => needs work
2010-02-01 14:28 Dmitry Note Added: 0001447
2010-01-12 11:15 alex Time Estimate Added 10
2010-01-12 10:38 alex Target Version Icebox => 5.1.0
2009-12-23 02:22 alex Target Version => Icebox
2009-12-23 02:05 alex Reporter alex => Dmitry
2009-12-23 02:04 alex New Issue
2009-12-23 02:04 alex Reference => http://groups.google.com/group/in-portal-dev/browse_thread/thread/fceaac790c383560?hl=en



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

Powered by Mantis Bugtracker