Index: branches/5.2.x/core/install/upgrades.sql =================================================================== diff -u -N -r16538 -r16560 --- branches/5.2.x/core/install/upgrades.sql (.../upgrades.sql) (revision 16538) +++ branches/5.2.x/core/install/upgrades.sql (.../upgrades.sql) (revision 16560) @@ -2940,3 +2940,5 @@ UPDATE Modules SET ClassNamespace = 'InPortal\\Core' WHERE `Name` IN ('Core', 'In-Portal'); + +DELETE FROM CachedUrls; Index: branches/5.2.x/core/kernel/utility/http_query.php =================================================================== diff -u -N -r16513 -r16560 --- branches/5.2.x/core/kernel/utility/http_query.php (.../http_query.php) (revision 16513) +++ branches/5.2.x/core/kernel/utility/http_query.php (.../http_query.php) (revision 16560) @@ -1,6 +1,6 @@ ' . $_SERVER['REQUEST_URI'] . '" used', E_USER_NOTICE); $this->Application->Redirect('', $url_params); } + + if ( $this->Application->GetVar('is_friendly_url') ) { + $url_params = $this->getRedirectParams(); + + // No idea about how to check, that given template + // require category to be passed with it, so pass anyway. + $url_params['pass_category'] = 1; + + $this->Application->Redirect('', $url_params); + } } else { $this->Application->VerifyThemeId(); Index: branches/5.2.x/core/units/categories/categories_event_handler.php =================================================================== diff -u -N -r16554 -r16560 --- branches/5.2.x/core/units/categories/categories_event_handler.php (.../categories_event_handler.php) (revision 16554) +++ branches/5.2.x/core/units/categories/categories_event_handler.php (.../categories_event_handler.php) (revision 16560) @@ -1,6 +1,6 @@ Application->recallObject('kRewriteUrlProcessor'); - if ($friendly) { + if ( $friendly ) { + $vars['is_friendly_url'] = true; $vars['m_cat_id'] = $friendly['CategoryId']; $vars['t'] = preg_replace('/^Content\//i', '', $friendly['NamedParentPath']);