1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Fixed Fatal Error on "Category" pages if they are disabled

Discussion in 'Resolved Bug Reports' started by Shadab, Dec 18, 2010.

  1. Shadab

    Shadab Well-Known Member

    1. Enable the "Create Pages for Categories" setting, in Admin Panel » Options » Node & Forum List

    2. Go to Forum list, and make note of any category URL.

    3. Disable the "Create Pages for Categories" setting.

    4. Visit the URL you noted down in #2.

    Fatal error: Cannot use object of type XenForo_Link as array
    in /library/XenForo/Controller.php on line 513
    Example: http://xenforo.com/community/categories/official-forums.1/


    Traced it down to XenForo_Route_Prefix_Categories::buildLink() which returns a XenForo_Link object if "categoryOwnPage" option is false. It should return a plain string.
  2. Mike

    Mike XenForo Developer Staff Member

    Actually returning a XenForo_Link object is correct - this allows you to return more arbitrary strings (such as just including a hash, or a URL that is outside of XF).

    The canonicalization system didn't handle that. It now strval's the string. This fixes this issue and should allow canonicalization to work even if it included a full URL.

Share This Page