Index: core/install/upgrades.sql =================================================================== --- core/install/upgrades.sql +++ core/install/upgrades.sql @@ -2935,3 +2935,6 @@ UPDATE SystemSettings SET VariableValue = 1 WHERE VariableName = 'CSVExportEncoding'; ALTER TABLE Semaphores ADD MainIDs INT NULL DEFAULT NULL AFTER MainPrefix; + +# ===== v 5.2.2-B2 ===== +DELETE FROM CachedUrls; Index: core/kernel/utility/http_query.php =================================================================== --- core/kernel/utility/http_query.php +++ core/kernel/utility/http_query.php @@ -373,6 +373,16 @@ trigger_error('Non mod-rewrite url "' . $_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: core/units/categories/categories_event_handler.php =================================================================== --- core/units/categories/categories_event_handler.php +++ core/units/categories/categories_event_handler.php @@ -3014,7 +3014,8 @@ $rewrite_processor = $this->Application->recallObject('kRewriteUrlProcessor'); /* @var $rewrite_processor kRewriteUrlProcessor */ - if ($friendly) { + if ( $friendly ) { + $vars['is_friendly_url'] = true; $vars['m_cat_id'] = $friendly['CategoryId']; $vars['t'] = preg_replace('/^Content\//i', '', $friendly['NamedParentPath']);