Error Processing File Viewers / Unable to Format URL for page forum_thread_legacy values

I am seeing a number of new errors related to the processing and rendering of file viewers in 12.0.1.15778:

UnknownException: Error processing file viewers. (An unexpected error prevented your requested action from completing. The error has been logged for the administrator to review.) ---> System.Threading.ThreadAbortException: Thread was being aborted.
   at Telligent.Evolution.Components.FileViewerService.Render(Uri url, FileViewerViewType viewType, Int32& width, Int32& height, Boolean outputIsPersisted, Boolean limitToThemeMaximums)
   at Telligent.Evolution.Components.FileViewerService.Render(Uri url, FileViewerViewType viewType, Int32 width, Int32 height, Boolean outputIsPersisted, Boolean limitToThemeMaximums)
   at Telligent.Evolution.Api.Plugins.FileViewers.HtmlFileViewerPlugin.GetRenderedViewer(Uri url, FileViewerViewType viewType, Int32 width, Int32 height, FileViewerMediaType mediaType)
   at Telligent.Evolution.Api.Plugins.FileViewers.HtmlFileViewerPlugin.<>c__DisplayClass8_0.<ProcessFileViewers>b__0(Match x)
   at System.Text.RegularExpressions.RegexReplacement.Replace(MatchEvaluator evaluator, Regex regex, String input, Int32 count, Int32 startat)
   at System.Text.RegularExpressions.Regex.Replace(String input, MatchEvaluator evaluator)
   at Telligent.Evolution.Api.Plugins.FileViewers.HtmlFileViewerPlugin.ProcessFileViewers(String html, String target)

UnknownException: An error occurred while rendering a file viewer. [Url = {Forum Thread URL}]  See inner exception for details. (An unexpected error prevented your requested action from completing. The error has been logged for the administrator to review.) ---> System.Threading.ThreadAbortException: Thread was being aborted.
   at System.Threading.Thread.AbortInternal()
   at System.Threading.Thread.Abort(Object stateInfo)
   at System.Web.HttpResponse.AbortCurrentThread()
   at Telligent.Evolution.Forums.Plugins.Content.ForumApplicationType.ParseForumContext(PageContext context)
   at Telligent.Evolution.Forums.Plugins.Content.ForumApplicationType.ParseForumThreadContext(PageContext context)
   at Telligent.Evolution.Urls.Routing.UrlManager.ParseContext(RouteValueDictionary values)
   at Telligent.Evolution.Components.UrlFileViewer.RenderView(String url, FileViewerViewType viewType, Boolean isPersisted, Int32& width, Int32& height)
   at Telligent.Evolution.Components.UrlFileViewer.Render(Uri url, IFileViewerOptions options)
   at Telligent.Evolution.Components.FileViewerService.Render(Uri url, FileViewerViewType viewType, Int32& width, Int32& height, Boolean outputIsPersisted, Boolean limitToThemeMaximums)

InternalException: Unable to format url for page 'forum_thread_legacy' Values: {} (An internal issue occurred that prevented your action from completing successfully. Details have been logged for site administrators to resolve.)
   at Telligent.Evolution.Urls.Routing.UrlManager.<>c__DisplayClass15_0.<FormatUrl>b__0()
   at Telligent.Evolution.Caching.Implementations.CacheService.Get[T](String key, Func`1 load, CacheScope scope, Func`1 tags, Nullable`1 expiresAfter, Object syncObj)
   at Telligent.Evolution.Urls.Routing.UrlManager.FormatUrl(String pageName, Dictionary`2 parms, RouteCollection routes)
   at Telligent.Evolution.Urls.Routing.UrlManager.FormatGroupUrl(String pageName, Group group, Dictionary`2 parms)
   at Telligent.Evolution.Api.Services.Url.BuildUrl(String urlName, Int32 groupId, Dictionary`2 parameters)

Interestingly to me is that they seem to come from paged content views more often than not and from tag pages. (The thread URL referenced in the second exception actually contains no media)

I am not sure if it matters, but the Site Theme Media Width and Height  fields for maximums have always been empty for us. Is it possible this is a null reference?



Added forum_thread_legacy values exception to report and updated title of post as it hadn't been clear that these three exceptions seem to occur as a trio.
[edited by: starksk at 1:52 PM (GMT 0) on Fri, May 21 2021]
Parents
  • The first two exceptions are caused by a thread abort exception -- the application was being forced to shut down. Be sure that your application pools do not have memory limits, scheduled restarts, or any other application restarting logic configured. Instead of an application pool memory limit, the cache should be configured through Administration > Site > Cache.

  • The app pool memory limit is only set for recycling the entire app pool (which hasn't happened when this error occurs). There is no virtual memory limit set.

    The cache is at defaults (500) but again, when this issue occurs, it doesn't affect site wide operations.

    I can trigger these three exceptions on demand by visiting the URL reported in them. The user sees that an exception occurred and has been logged. I can start a support case if needed, but I figure I would start here.

  • Is it possible that the URL manager failing is causing the thread to abort?

  • The first exception appears to be from an external thread abort (unless there is an inner exception that was omitted from your first post with more details). The origin method does not throw any exceptions (thread abort or others), so this was external.

    The second exception can be ignored. When a URL to a forum includes incorrect data (not the forum's current group, for example), it will redirect to the correct URL with a 301 HTTP status code and end the current request. When ending the current request, a thread abort exception is thrown but can be ignored.

    The third exception is related to URL generation for an old URL format that was not supplied with the correct parameters (I don't see any attempts to use this URL format in 12.0.1). Are there any custom plugins on your site that may be attempting to format this legacy URL (named: "forum_thread_legacy")?

  • The first exception is the inner exception. (the outer is the exception handler)

    The second exception seems to be happening mostly on paginated URLs on their get request through the Utility/Scripted-file.ashx (usually on the primary rendering vm (eg. list.vm))

    Regarding the third exception: There is an application enabled called "Legacy Forum Url Redirect" (that doesn't show any exceptions logged itself) enabled. This site has been upgraded from v2 upwards so it is entirely possible that there is something asking for that but I'm not at all sure where to start looking for that. Is there a way to search the widget files without having to open each and every one individually?

  • Ok, that helps--I was under the impression these were logged separately.

    The second exception is likely the inner exception for the first exception and the file viewer is attempting to preview a forum URL that is referencing a thread using an old URL (possibly referencing an old group, old thread title, etc). When parsing the URL to preview, it is attempting to redirect which will cause the thread abort exception.

    The third exception may also be related to the embedded forum URL -- when forums redirects to the correct URL it attempts to use the same URL that matched when handling the request (or the embedded URL in this case). If the URL is very old, it may be matching the legacy URL but does not contain the details required to redirect properly.

    Is it possible to get the embedded URL that is causing this issue? It will help to log and resolve the issue.

    The workaround for this issue is to update the embedded forum URL to be the current URL for the forum. 

  • Sorry if that wasn't clear that all three exceptions happen together.

    So the URL from the second exception is in the old format:

    sitename.com/group/f/###/t/#####

    If you need the exact URL, I can PM you that separately.

    We have tens of thousands of threads that used the original URL formatting. I'm not sure how I'd update the URLs for all of them. This one happens to be coming from a list query for tags.

  • I will say that in most instances where it is failing, the original format "short" URL resolves to usually a quite long new URL when entered manually. In some cases, the original URL would have gone to a group that has been moved and/or renamed.

    Are there any known issues with URL Manager having either character limits or too many redirects as it bounces through the paths of where things have moved?

  • Are there any known issues with URL Manager having either character limits or too many redirects as it bounces through the paths of where things have moved?

    No, this is a unique case where the URL parser should not be redirecting the request. This is a parse request used for an internal URL preview. For a URL preview to the local community, the URL is parsed (not actually navigated to) and details from the parsing are used to form the preview.

  • Thank you. I have been able to reproduce this issue and verify the cause. I've logged the issue as:

    TE-16887: Cannot render URL preview of legacy forum thread URL

    Completed for 12.0.2

    Unfortunately, I was not able to find a work-around other than editing the original content with the embedded web preview to the thread to use the correct group. Note that I was only able to reproduce the issue when the group path in the URL (even though the URL is a legacy URL) was not the group the forum currently resides within.

Reply
  • Thank you. I have been able to reproduce this issue and verify the cause. I've logged the issue as:

    TE-16887: Cannot render URL preview of legacy forum thread URL

    Completed for 12.0.2

    Unfortunately, I was not able to find a work-around other than editing the original content with the embedded web preview to the thread to use the correct group. Note that I was only able to reproduce the issue when the group path in the URL (even though the URL is a legacy URL) was not the group the forum currently resides within.

Children
  • That makes sense and I believe that the URLs that are seeing this do indeed fall under the pattern of those that were either re-parented or their parent was re-parented.

    So this does seem to prevent some paginated results from loading (and raises the error to the user that something went wrong). How does one edit the embedded web preview to the thread to use the correct group?

    Strangely, this is only happening in our production environment. It is not happening in the dev environment with the same data. Do you think caching is still at play (since we don't have hundreds to thousands of users hitting the dev environment)?