Support Thread

Forums Order By Selection Is Empty

Forums Order By Selection Is Empty — APG vNext Guide

Forums Order By Selection Is Empty — an archived discussion from the APG vNext support community.

About This Topic

This thread covers forums order by selection is empty in the context of APG vNext, the ASP.NET forum and community platform. The community includes APG developers and experienced administrators who can help with similar questions.

APG vNext Support

Forum Order-By Selection Dropdown is Empty in APG vNext

The "Order By" dropdown on forum thread lists becomes empty when the corresponding configuration table in the database is missing or empty. This can happen after a failed migration, a database restore from a partial backup, or after manually deleting rows from the settings table.

Diagnosing the Empty Dropdown

-- Check if the sort options exist:
SELECT * FROM apg_Settings
WHERE  SettingKey LIKE 'Forum.SortOption%';
-- If no rows returned, the settings are missing

Restoring Default Sort Options

-- Insert default sort options:
INSERT INTO apg_Settings (SettingKey, SettingValue) VALUES
  ('Forum.SortOption.LastPost',    'Most Recent Reply'),
  ('Forum.SortOption.CreateDate',  'Newest Thread'),
  ('Forum.SortOption.PostCount',   'Most Replies'),
  ('Forum.SortOption.ViewCount',   'Most Viewed'),
  ('Forum.SortOption.Default',     'LastPost');

Alternative: Hardcode Sort Options in web.config

<add key="APG.Forum.SortOptions"
     value="LastPost:Most Recent Reply,CreateDate:Newest Thread,PostCount:Most Replies" />
<add key="APG.Forum.DefaultSort" value="LastPost" />

Per-User Sort Preferences

APG vNext stores each member's preferred forum thread sort order in their account settings, so the forum remembers their preference across sessions. When a member selects a sort order in the forum thread list, the preference is saved to localStorage for guests and to the member's settings record in the database for logged-in members. If the sort selection dropdown appears empty or non-functional, check whether the browser's localStorage is blocked — Safari private browsing mode blocks localStorage writes — and verify that the APG vNext skin template includes the sort preference JavaScript module. The sort preference UI is rendered by the forum-sort.js module; if this file is missing from the skin's JavaScript bundle or blocked by a Content Security Policy header, the sort dropdown renders without options.

Sticky Thread Sorting Behaviour

Pinned (sticky) threads and announcement threads always appear at the top of the thread list regardless of the selected sort order. This is intentional — pinned threads are placed at the top by moderator action and their position is not subject to member-controlled sorting. If members are confused about why certain threads always appear first regardless of their selected sort order, add a visual pin indicator or announcement badge that distinguishes pinned threads from regular threads in the thread list, making the special status clear at a glance.

Configuring Per-Forum Default Sort Orders

APG vNext allows each forum to have its own default sort order, independent of the site-wide default. Configure per-forum sort defaults in Admin Panel → Forums → [Forum Name] → Display Settings → Default Thread Sort. This allows the Knowledge Base forum to default to Most Viewed (surfacing the most-read articles first), while the general discussion forum defaults to Most Recent Reply (surfacing active conversations first). Per-forum defaults are applied to new visitors and members who have not yet saved a sort preference for that specific forum.

Thread Sort and SEO

The thread sort order affects which threads are most visible to members browsing the forum, but has no direct impact on SEO because search engines crawl individual thread pages directly rather than relying on the forum thread list order. However, the default sort order influences member engagement patterns — forums sorted by Most Recent Reply tend to concentrate activity on a smaller number of trending threads, while forums sorted by Newest Thread distribute engagement more evenly across new content. Choose the sort default that best fits the forum's content model and moderation philosophy.

URL State for Shareable Sorted Views

APG vNext encodes the currently selected sort order and filter state in the page URL as query parameters, allowing members to bookmark and share sorted forum views. A URL like /community/General-Discussion-f5.aspx?sort=views&filter=week opens the General Discussion forum sorted by most viewed this week. This URL-based state persistence is important for community managers who want to share specific views (e.g., most active threads this month) in newsletters or announcements. If the sort selection dropdown is not updating the URL when a sort option is chosen, check whether the dropdown's change event handler is correctly calling the APG vNext URL state management module — this is a common regression when upgrading from an older skin version that pre-dates the URL state feature.

Database-Level Sort Configuration

When the web.config sort options are set but the dropdown still appears empty, the issue is likely that the APG vNext skin template is not reading the web.config values correctly, or the dropdown is being rendered before the JavaScript initialises. Enable browser developer tools (F12) and check the browser console for JavaScript errors on the forum thread list page. A JavaScript error in the sort dropdown initialisation code causes the dropdown to render as an empty select element. Fix by updating the APG vNext skin's JavaScript to the latest version from the default skin, which includes defensive coding for configuration value loading. After fixing the JavaScript, clear the browser cache to ensure the old cached script is not served to returning visitors.

Related Resources


Looking for more help? Browse the support forum or check the Knowledge Base.