shouldUseCommunityPortal()) { return; } // Register 'support' as a known FC route so FC's Vue router treats // it as a valid path and does not fire the NotFound → all_feeds // redirect chain on client-side navigation. add_filter('fluent_community/app_route_paths', [$this, 'registerSupportRoute']); // Handle the support route entirely in the SSR hook — mirrors the add_action('fluent_community/rendering_path_ssr_support', [$this, 'renderSupportPortal']); // FC's Vue Router intercepts all portal-domain clicks. Since /support // is not a registered FC Vue route, the router falls through to NotFound // which redirects to all_feeds. This beforeEach guard converts any SPA // navigation to /support into a full page load, which then hits the SSR hook. // Must run on ALL community portal pages, not just the support route. add_action('fluent_community/portal_footer', [$this, 'outputRouterGuard'], 999); } public function registerSupportRoute($paths) { $paths[] = 'support'; return $paths; } public function renderSupportPortal($parts = []) { if (!is_user_logged_in()) { wp_safe_redirect($this->getCommunityAuthUrl()); exit; } (new PortalRenderer())->render(); } public function outputRouterGuard() { $supportUrl = \FluentCommunity\App\Services\Helper::baseUrl('support/'); ?>